================
@@ -0,0 +1,13 @@
+// Test passing of -Xarch_<arch> <option> to SYCL offload compilations.
+
+// Verify that -Xarch_spirv64 forwards options to the SYCL device compilation
+// and clang-linker-wrapper call.
+// RUN: %clang -fsycl -Xarch_spirv64 -O3 -### %s 2>&1 \
+// RUN: | FileCheck -check-prefixes=SYCL-DEVICE-O3,CLW-O3 %s
+// SYCL-DEVICE-O3: "-triple" "spirv64-unknown-unknown" "-O3"{{.*}} 
"-fsycl-is-device"
+// CLW-O3: {{"[^"]*clang-linker-wrapper[^"]*".* 
"--device-compiler=spirv64-unknown-unknown=-O3"}}
----------------
bader wrote:

I think the idiomatic way to use prefixes is one per test. 
```suggestion
// RUN: | FileCheck -check-prefixes=SYCL-DEVICE-O3 %s
// SYCL-DEVICE-O3: "-triple" "spirv64-unknown-unknown" "-O3"{{.*}} 
"-fsycl-is-device"
// SYCL-DEVICE-O3: {{"[^"]*clang-linker-wrapper[^"]*".* 
"--device-compiler=spirv64-unknown-unknown=-O3"}}
```

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

Reply via email to