Skip to content

Commit 900059c

Browse files
matborzyszkowskiigcbot
authored andcommitted
Adjust ocloc/LIT tests for opaque and typed pointers
Adjust ocloc/LIT tests for opaque and typed pointers
1 parent 9379c8d commit 900059c

File tree

7 files changed

+159
-105
lines changed

7 files changed

+159
-105
lines changed

IGC/ocloc_tests/SPIRV-extenstions/SPV_INTEL_blocking_pipes/PipeBlocking.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
; REQUIRES: llvm-spirv, regkeys, dg2-supported, llvm-15-or-older
33

44
; TODO: This test fails on LLVM 16 with opaque pointers, but passes with typed pointers. Once the necessary fixes are made, remove llvm-15-or-older from the list above. llvm-15-or-older was added to the list above to prevent non-zero return from llvm-lit on LLVM 16 build with typed pointers forced.
5-
; XFAIL: llvm-16-plus
65

76
; LLVM with typed pointers/default pointer typing:
87
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
98
; RUN: llvm-spirv %t.bc -opaque-pointers=0 --spirv-ext=+SPV_INTEL_blocking_pipes,+SPV_INTEL_arbitrary_precision_integers -o %t.spv
10-
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
9+
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=0, ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
1110

1211
; ModuleID = 'test/CodeGenOpenCL/pipe_builtin.cl'
1312
source_filename = "test/CodeGenOpenCL/pipe_builtin.cl"

IGC/ocloc_tests/SPIRV-extenstions/SPV_INTEL_joint_matrix/joint_matrix_bfloat16.ll

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
; UNSUPPORTED: system-windows
2-
; REQUIRES: llvm-spirv, regkeys, dg2-supported
3-
; XFAIL: llvm-16-plus
2+
; REQUIRES: llvm-spirv, regkeys, dg2-supported, llvm-15-or-older
43

5-
; RUN: llvm-as %s -o %t.bc
6-
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_bfloat16_conversion,+SPV_INTEL_joint_matrix -o %t.spv
7-
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
4+
; TODO: This test should be adjusted to run with opaque pointers
5+
6+
; LLVM with typed pointers:
7+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
8+
; RUN: llvm-spirv %t.bc -opaque-pointers=0 --spirv-ext=+SPV_INTEL_bfloat16_conversion,+SPV_INTEL_joint_matrix -o %t.spv
9+
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=0, ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
810

911
; CHECK-LLVM: %spirv.JointMatrixINTEL._short_8_16_0_3
1012
; CHECK-LLVM: %[[GEP1:.*]] = getelementptr inbounds %"class.cl::sycl::ext::intel::experimental::bfloat16", %"class.cl::sycl::ext::intel::experimental::bfloat16" addrspace(4)* %{{.*}}, i64 0, i32 0

IGC/ocloc_tests/SPIRV-extenstions/SPV_INTEL_masked_gather_scatter/intel-gather-scatter.ll

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
; UNSUPPORTED: system-windows
2-
; REQUIRES: llvm-spirv, regkeys, dg2-supported, llvm-14-plus
3-
; XFAIL: llvm-16-plus
2+
; REQUIRES: llvm-spirv, regkeys, dg2-supported
43

54
; LLVM with opaque pointers:
6-
; TODO: llvm-as -opaque-pointers=1 %s -o %t.bc
7-
; TODO: llvm-spirv %t.bc -opaque-pointers=1 --spirv-ext=+SPV_INTEL_masked_gather_scatter -o %t.spv
8-
; TODO: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=1,ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
5+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
6+
; RUN: llvm-spirv %t.bc -opaque-pointers=1 --spirv-ext=+SPV_INTEL_masked_gather_scatter -o %t.spv
7+
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=1, ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
98

109
; LLVM with typed pointers/default pointer typing:
11-
; RUN: llvm-as %s -o %t.bc
12-
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_masked_gather_scatter -o %t.spv
10+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
11+
; RUN: llvm-spirv %t.bc -opaque-pointers=0 --spirv-ext=+SPV_INTEL_masked_gather_scatter -o %t.spv
1312
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
1413

1514
; CHECK-LLVM: %[[#VECGATHER:]] = load <4 x {{i32|ptr}} addrspace(4){{.*}}>, {{<4 x i32 addrspace\(4\)\*>\*|ptr}}

IGC/ocloc_tests/SPIRV-extenstions/SPV_INTEL_usm_storage_classes/intel_usm_addrspaces.ll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
; REQUIRES: llvm-spirv, regkeys, dg2-supported, llvm-14-plus
33

44
; LLVM with opaque pointers:
5-
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
6-
; TODO: Currently llvm-spirv fails with this test when run with -opaque-pointers=1. Change once fixed.
7-
; RUN: llvm-spirv %t.bc -opaque-pointers=0 --spirv-ext=+SPV_INTEL_usm_storage_classes -o %t.spv
5+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
6+
; RUN: llvm-spirv %t.bc -opaque-pointers=1 --spirv-ext=+SPV_INTEL_usm_storage_classes -o %t.spv
87
; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=1,ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM
98

10-
; RUN: llvm-spirv %t.bc -opaque-pointers=0 -o %t.no_usm.spv
9+
; RUN: llvm-spirv %t.bc -opaque-pointers=1 -o %t.no_usm.spv
1110
; RUN: ocloc compile -spirv_input -file %t.no_usm.spv -device dg2 -options " -igc_opts 'EnableOpaquePointersBackend=1,ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-LLVM-NO-USM
1211

1312
; LLVM with typed pointers/default pointer typing:

IGC/ocloc_tests/features/cache_controls/cl_intel_subgroups_buffer_prefetch/SPV_INTEL_subgroup_buffer_prefetch.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;
77
;============================ end_copyright_notice =============================
88

9-
; REQUIRES: llvm-spirv, regkeys, pvc-supported, llvm-15-or-older
9+
; REQUIRES: llvm-spirv, regkeys, pvc-supported
1010
; UNSUPPORTED: sys32
1111

1212
; LLVM with opaque pointers:
@@ -21,6 +21,7 @@
2121
; RUN: llvm-spirv %t.bc -opaque-pointers=0 --spirv-ext=+SPV_INTEL_subgroups,+SPV_INTEL_cache_controls -o %t.spv
2222
; RUN: ocloc compile -spirv_input -file %t.spv -device pvc -options " -igc_opts 'DumpVISAASMToConsole=1'" 2>&1 | FileCheck %s
2323

24+
2425
target triple = "spir64-unknown-unknown"
2526

2627
declare spir_func void @_Z34__spirv_SubgroupBlockPrefetchINTELPU3AS1Khj(i8 addrspace(1)*, i32)

0 commit comments

Comments
 (0)