Skip to content

Commit 5fc7ae1

Browse files
author
Artem Gindinson
authored
[SYCL][Driver][Test] Accept any host CPU name in -aux-target-cpu (#1363)
Excludes the "x86-64" dependence, which may lead to LIT failures on machines with a different host CPU handle. Signed-off-by: Artem Gindinson <[email protected]>
1 parent 94cd66e commit 5fc7ae1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/Driver/sycl-offload.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/// Check "-aux-target-cpu" and "target-cpu" are passed when compiling for SYCL offload device and host codes:
22
// RUN: %clang -### -fsycl -c %s 2>&1 | FileCheck -check-prefix=CHECK-OFFLOAD %s
33
// CHECK-OFFLOAD: clang{{.*}} "-cc1" {{.*}} "-fsycl-is-device"
4-
// CHECK-OFFLOAD-SAME: "-aux-target-cpu" "x86-64"
4+
// CHECK-OFFLOAD-SAME: "-aux-target-cpu" "[[HOST_CPU_NAME:[^ ]+]]"
55
// CHECK-OFFLOAD-NEXT: clang{{.*}} "-cc1" {{.*}}
66
// CHECK-OFFLOAD-NEXT-SAME: "-fsycl-is-host"
7-
// CHECK-OFFLOAD-NEXT-SAME: "-target-cpu" "x86-64"
7+
// CHECK-OFFLOAD-NEXT-SAME: "-target-cpu" "[[HOST_CPU_NAME]]"
88

99
/// Check "-aux-target-cpu" with "-aux-target-feature" and "-target-cpu" with "-target-feature" are passed
1010
/// when compiling for SYCL offload device and host codes:
1111
// RUN: %clang -fsycl -mavx -c %s -### -o %t.o 2>&1 | FileCheck -check-prefix=OFFLOAD-AVX %s
1212
// OFFLOAD-AVX: clang{{.*}} "-cc1" {{.*}} "-fsycl-is-device"
13-
// OFFLOAD-AVX-SAME: "-aux-target-cpu" "x86-64" "-aux-target-feature" "+avx"
13+
// OFFLOAD-AVX-SAME: "-aux-target-cpu" "[[HOST_CPU_NAME:[^ ]+]]" "-aux-target-feature" "+avx"
1414
// OFFLOAD-AVX-NEXT: clang{{.*}} "-cc1" {{.*}}
1515
// OFFLOAD-AVX-NEXT-SAME: "-fsycl-is-host"
16-
// OFFLOAD-AVX-NEXT-SAME: "-target-cpu" "x86-64" "-target-feature" "+avx"
16+
// OFFLOAD-AVX-NEXT-SAME: "-target-cpu" "[[HOST_CPU_NAME]]" "-target-feature" "+avx"

0 commit comments

Comments
 (0)