llvm-project
0e570eb3 - [CodeGen] Workaround for compiler crash

Commit
13 days ago
[CodeGen] Workaround for compiler crash This patch implements a workaround for a "Getting frame offset for a dead object?" assertion triggered when compiling the target-generic-loops.f90 offloading test. A more concise reproducer for this issue: ```f90 ! flang -O0 -fopenmp -fopenmp-version=52 --offload-arch=gfx1100 test.f90 program main integer :: i, counter !$omp target teams distribute do i=1, 10 end do counter = 0 !$omp target map(tofrom: counter) !$omp parallel do reduction(+:counter) do i=1, 10 counter = counter + 1 end do !$omp end target end program ``` This is an AI-generated fix and needs a proper review by an expert in this area of the compiler, as I am not familiar enough to evaluate whether it is a valid approach or if there is a problem with the LLVM IR produced by Flang itself. However, it does address the problem and causes these tests to be successfully compiled and run as expected.
Author
Committer
Parents
Loading