================
@@ -2,37 +2,92 @@
 
 // RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \
 // RUN:   --no-offload-new-driver --hip-path=%S/Inputs/hipspv -nohipwrapperinc 
%s \
-// RUN: 2>&1 | FileCheck %s
+// RUN: 2>&1 | FileCheck --check-prefixes=CHECK,OLD \
+// RUN:   -DTRIPLE=spirv64 %s
 
-// CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "spirv64"
+// RUN: %clang -### -target x86_64-linux-gnu \
+// RUN:   --offload=spirv64-unknown-chipstar \
+// RUN:   --offload-new-driver --hip-path=%S/Inputs/hipspv -nohipwrapperinc %s 
\
+// RUN: 2>&1 | FileCheck --check-prefixes=CHECK,NEW \
+// RUN:   -DTRIPLE=spirv64-unknown-chipstar -DHIP_PATH=%S/Inputs/hipspv %s
+
+// CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "[[TRIPLE]]"
 // CHECK-SAME: "-aux-triple" "{{.*}}" "-emit-llvm-bc"
 // CHECK-SAME: "-fcuda-is-device"
 // CHECK-SAME: "-fcuda-allow-variadic-functions"
-// CHECK-SAME: "-mlink-builtin-bitcode" 
{{".*/hipspv/lib/hip-device-lib/hipspv-spirv64.bc"}}
+// CHECK-SAME: "-mlink-builtin-bitcode" 
{{".*/hipspv/lib/hip-device-lib/hipspv-}}[[TRIPLE]].bc"
 // CHECK-SAME: "-isystem" {{".*/hipspv/include"}}
 // CHECK-SAME: "-fhip-new-launch-api"
-// CHECK-SAME: "-o" [[DEV_BC:".*bc"]]
+// CHECK-SAME: "-o" "[[OBJ_DEV:.*(o|bc)]]"
 // CHECK-SAME: "-x" "hip"
 
-// CHECK: {{".*llvm-link"}} "-o" [[LINK_BC:".*bc"]] [[DEV_BC]]
+// OLD: {{".*llvm-link"}} "-o" [[LINK_BC:".*bc"]] "[[OBJ_DEV]]"
+
+// OLD: {{".*opt"}} [[LINK_BC]] "-load-pass-plugin"
+// OLD-SAME: {{".*/hipspv/lib/libLLVMHipSpvPasses.so"}}
+// OLD-SAME: "-passes=hip-post-link-passes" "-o" [[LOWER_BC:".*bc"]]
 
-// CHECK: {{".*opt"}} [[LINK_BC]] "-load-pass-plugin"
-// CHECK-SAME: {{".*/hipspv/lib/libLLVMHipSpvPasses.so"}}
-// CHECK-SAME: "-passes=hip-post-link-passes" "-o" [[LOWER_BC:".*bc"]]
+// OLD: {{".*llvm-spirv"}} "--spirv-max-version=1.1" "--spirv-ext=+all"
+// OLD-SAME: [[LOWER_BC]] "-o" "[[SPIRV_OUT:.*out]]"
 
-// CHECK: {{".*llvm-spirv"}} "--spirv-max-version=1.1" "--spirv-ext=+all"
-// CHECK-SAME: [[LOWER_BC]] "-o" "[[SPIRV_OUT:.*out]]"
+// OLD: {{".*clang-offload-bundler"}} "-type=o" "-bundle-align=4096"
+// OLD-SAME: "-targets=host-x86_64-unknown-linux-gnu,hip-spirv64----generic"
+// OLD-SAME: "-input={{.*}}" "-input=[[SPIRV_OUT]]" 
"-output=[[BUNDLE:.*hipfb]]"
 
-// CHECK: {{".*clang-offload-bundler"}} "-type=o" "-bundle-align=4096"
-// CHECK-SAME: "-targets=host-x86_64-unknown-linux-gnu,hip-spirv64----generic"
-// CHECK-SAME: "-input={{.*}}" "-input=[[SPIRV_OUT]]" 
"-output=[[BUNDLE:.*hipfb]]"
+// NEW: {{".*llvm-offload-binary"}} "-o" "[[PACKAGE:.*.out]]"
+// NEW-SAME: "--image=file=[[OBJ_DEV]],triple=[[TRIPLE]],arch=generic,kind=hip"
 
-// CHECK: [[CLANG]] "-cc1" "-triple" {{".*"}} "-aux-triple" "spirv64"
+// NEW: {{".*clang-linker-wrapper"}} 
"--device-compiler=[[TRIPLE]]=--hip-path=[[HIP_PATH]]"
+// NEW-SAME: "--emit-fatbin-only" "-o" "[[BUNDLE:.*hipfb]]"
+
+// CHECK: [[CLANG]] "-cc1" "-triple" {{".*"}} "-aux-triple" "[[TRIPLE]]"
 // CHECK-SAME: "-emit-obj"
 // CHECK-SAME: "-fcuda-include-gpubinary" "[[BUNDLE]]"
 // CHECK-SAME: "-o" [[OBJ_HOST:".*o"]] "-x" "hip"
 
-// CHECK: {{".*ld.*"}} {{.*}}[[OBJ_HOST]]
+// OLD: {{".*ld.*"}} {{.*}}[[OBJ_HOST]]
+
+// NEW: {{".*clang-linker-wrapper"}}
+// NEW-SAME: "--linker-path={{.*ld.*}}" "-o" "a.out"
+// NEW-SAME: [[OBJ_HOST]]
+
+//------------------------------------------------------------------------------
+// Check the clang command, invoked by the linker wrapper, selects the HIPSPV
+// toolchain for the new offload driver.
+
+// RUN: %clang --offload-new-driver -nogpuinc -nogpulib \
----------------
linehill wrote:

Does fix-forwarding mean making a separate PR for addressing the failures?

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

Reply via email to