================
@@ -0,0 +1,11 @@
+// Check that if we are compiling with fgpu-rdc amdgpu-enable-hipstdpar is not
+// passed to CC1, to avoid eager, per TU, removal of potentially accessible
+// functions.
+
+// RUN: %clang -### --hipstdpar --offload-arch=gfx906 %s -nogpulib -nogpuinc \
+// RUN:   2>&1 | FileCheck -check-prefix=NORDC %s
+// NORDC: {{.*}}"-mllvm" "-amdgpu-enable-hipstdpar"
+
+// RUN: %clang -### --hipstdpar --offload-arch=gfx906 %s -nogpulib -nogpuinc 
-fgpu-rdc \
+// RUN:   2>&1 | FileCheck -check-prefix=RDC %s
+// RDC-NOT: {{.*}}"-mllvm" "-amdgpu-enable-hipstdpar"
----------------
AlexVlx wrote:

In this case it actually has to be "-mllvm" because we only care about it not 
being passed to the initial from source, per TU compilation; forming the check 
as you suggest would (erroneously) match the (intentional) passing of the 
argument via `-plugin-opt`, when we do the final lowering from bitcode. This 
merely tests/validates the change we did in 
`HIPAMDToolChain::addClangTargetOptions`.

https://github.com/llvm/llvm-project/pull/134753
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to