Skip to content

Commit 7eb082c

Browse files
author
LU-JOHN
authored
[NFC] Ensure only one SPV file is generated in bitreverse lowering tests (#15401)
Bitreverse lowering tests check a SPV file to ensure that SPIRV bitreverse insn is not used. Ensure that only one SPV file is generated to facilitate SPV file checking. Use -fno-sycl-allow-device-dependencies to ensure only one file is generated. Signed-off-by: Lu, John <john.lu@intel.com>
1 parent c9dde00 commit 7eb082c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sycl/test-e2e/LLVMIntrinsicLowering/bitreverse.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
// Ensure that SPV_KHR_bit_instructions is disabled so that translator
99
// will lower llvm.bitreverse.* intrinsics instead of relying on SPIRV
1010
// BitReverse instruction.
11-
// Also build executable with SPV dump.
12-
// RUN: %{build} -Wno-error=psabi -Wno-error=constant-conversion -o %t.out -O2 -Xspirv-translator --spirv-ext=-SPV_KHR_bit_instructions -fsycl-dump-device-code=%t.spvdir
11+
// Also build executable with SPV dump. Use -fno-sycl-allow-device-dependencies to
12+
// ensure that only one SPV file is generated.
13+
// RUN: %{build} -Wno-error=psabi -Wno-error=constant-conversion -o %t.out -O2 -Xspirv-translator --spirv-ext=-SPV_KHR_bit_instructions -fsycl-dump-device-code=%t.spvdir -fno-sycl-allow-device-dependencies
1314

1415
// Rename SPV file to explictly known filename.
1516
// RUN: mv %t.spvdir/*.spv %t.spvdir/dump.spv

sycl/test-e2e/LLVMIntrinsicLowering/sub_byte_bitreverse.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
// Ensure that SPV_KHR_bit_instructions is disabled so that translator
1414
// will lower llvm.bitreverse.* intrinsics instead of relying on SPIRV
1515
// BitReverse instruction.
16-
// Also build executable with SPV dump.
17-
// RUN: %{build} -o %t.out -O2 -Xspirv-translator --spirv-ext=-SPV_KHR_bit_instructions -fsycl-dump-device-code=%t.spvdir
16+
// Also build executable with SPV dump. Use -fno-sycl-allow-device-dependencies to
17+
// ensure that only one SPV file is generated.
18+
// RUN: %{build} -o %t.out -O2 -Xspirv-translator --spirv-ext=-SPV_KHR_bit_instructions -fsycl-dump-device-code=%t.spvdir -fno-sycl-allow-device-dependencies
1819

1920
// Rename SPV file to explictly known filename.
2021
// RUN: mv %t.spvdir/*.spv %t.spvdir/dump.spv

0 commit comments

Comments
 (0)