================
@@ -21,3 +21,34 @@
 // HIPSTDPAR-COMPILE: "-include" "hipstdpar_lib.hpp"
 // HIPSTDPAR-LINK: "-rpath"
 // HIPSTDPAR-LINK: "{{.*hip.*}}"
+
+// Check that --hipstdpar is forwarded to the linker wrapper as a device
+// compiler arg when using the new offloading driver.
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
+// RUN:   --hipstdpar --hipstdpar-path=%S/Inputs/hipstdpar \
+// RUN:   -nogpulib -nogpuinc -c %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=HIPSTDPAR-NEW-DRV %s
+// HIPSTDPAR-NEW-DRV: {{".*clang-linker-wrapper"}}
+// HIPSTDPAR-NEW-DRV-SAME: "--device-compiler=amdgcn-amd-amdhsa=--hipstdpar"
+
+// Check that the base AMDGPU toolchain translates --hipstdpar to the backend
+// flag. This is the path taken by the inner clang invocation from the linker
+// wrapper (clang --target=amdgcn-amd-amdhsa --hipstdpar ...).
+// RUN: %clang -### --target=amdgcn-amd-amdhsa \
+// RUN:   --hipstdpar %s 2>&1 | \
----------------
maarquitos14 wrote:

Ah, sorry, I removed a part of this line that wasn't needed from my first 
approach and didn't realize about this.

https://github.com/llvm/llvm-project/pull/206497
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to