pgerell wrote:
> I think, CodeGenModule::MayBeEmittedEagerly also must be updated:
>
> ```
> // RUN: %clang_cc1 -verify -triple x86_64-unknown-unknown -emit-llvm-only
> -fopenmp -fopenmp-version=45 %s
> void g(int x) { __asm__("nop" : "=@"(x)); } // expected-error {{invalid
> output constraint '=@' in asm}}
> #pragma omp declare target to(g)
> ```
This also crashes at 4.5 without the declare target, since 4.5 emits everything
eagerly.
Simplest fix: don't emit functions eagerly at all when OpenMP && !OpenMPSimd.
It fixes both cases, but reorders the IR in 15 OpenMP CodeGen tests. I checked
that the output is otherwise unchanged.
OK to go that way, or would you prefer something narrower?
https://github.com/llvm/llvm-project/pull/220316
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits