llvm-project
665c2e91 - [Flang][OpenMP] Remove dead restoreIP in OpenMP taskloop lowering (#187222)

Commit
2 days ago
[Flang][OpenMP] Remove dead restoreIP in OpenMP taskloop lowering (#187222) This fixes an intermittent crash in `OpenMP` taskloop lowering. In `OMPIRBuilder::createTaskloop`, the `restoreIP` in `PostOutlineCB` was immediately overwritten by the following `Builder.SetInsertPoint(StaleCI)` with no instructions created in between, so it was effectively dead. This patch removes that dead restore, which is the smallest change and preserves the intended IR placement. Adds a regression test that compiles a taskloop to LLVM IR and verifies the bounds casts and __kmpc_taskloop call are present.
Author
Parents
Loading