Skip to content

Commit e22e2a8

Browse files
michalpaszkowskiigcbot
authored andcommitted
Adjust LITs to work on LLVM 16 with both opaque and typed pointers
Adjustments to RUN lines to make tests run on LLVM 16 with both opaque and typed pointers. By default, LLVM 16 tools emit opaque pointers, while IGC pointer typing can be controlled with a flag. This change ensures the typing is enabled/disabled explicitly.
1 parent 447e245 commit e22e2a8

File tree

22 files changed

+163
-50
lines changed

22 files changed

+163
-50
lines changed

IGC/Compiler/tests/PrivateMemoryResolution/SOA_promotion/soa-nested-load.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
; REQUIRES: regkeys,llvm-16-plus
1010
;
11-
; RUN: igc_opt --ocl --igc-private-mem-resolution --regkey EnablePrivMemNewSOATranspose=1 -S %s | FileCheck %s
11+
; RUN: igc_opt --ocl --igc-private-mem-resolution --regkey "EnablePrivMemNewSOATranspose=1,EnableOpaquePointersBackend=1" -S %s | FileCheck %s
1212
;
1313
; In JointMatrix SYCL test
1414
; https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_unroll.cpp

IGC/ocloc_tests/Builtins/2DBlockRead64xi16.ll

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

9-
; REQUIRES: pvc-supported
9+
; REQUIRES: pvc-supported, regkeys, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -igc_opts 'EnableOpaquePointersBackend=1, VISAOptions=-asmToConsole'" 2>&1 | FileCheck %s --check-prefixes=CHECK-ASM
14+
15+
; LLVM with typed pointers:
16+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1217
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -igc_opts 'VISAOptions=-asmToConsole'" 2>&1 | FileCheck %s --check-prefixes=CHECK-ASM
1318

1419
target triple = "spir64-unknown-unknown"

IGC/ocloc_tests/Builtins/joint_matrix/basic.ll

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

9-
; REQUIRES: pvc-supported, regkeys
9+
; REQUIRES: pvc-supported, regkeys, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1,DisableCodeScheduling=1,EnableOpaquePointersBackend=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
14+
15+
; LLVM with typed pointers:
16+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1217
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1,DisableCodeScheduling=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
1318

1419
target triple = "spir64-unknown-unknown"

IGC/ocloc_tests/Builtins/joint_matrix/basic_16bit.ll

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

9-
; REQUIRES: pvc-supported, regkeys
9+
; REQUIRES: pvc-supported, regkeys, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1,DisableCodeScheduling=1,EnableOpaquePointersBackend=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
14+
15+
; LLVM with typed pointers:
16+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1217
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1,DisableCodeScheduling=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
1318

1419
target triple = "spir64-unknown-unknown"

IGC/ocloc_tests/Builtins/joint_matrix/basic_checked.ll

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

9-
; REQUIRES: pvc-supported
9+
; REQUIRES: pvc-supported, regkeys, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1, EnableOpaquePointersBackend=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
14+
15+
; LLVM with typed pointers:
16+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1217
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'DumpVISAASMToConsole=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK-VISAASM
1318

1419
target triple = "spir64-unknown-unknown"

IGC/ocloc_tests/Builtins/joint_matrix/basic_vec_opt.ll

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

9-
; REQUIRES: pvc-supported, llvm-16-plus
9+
; REQUIRES: pvc-supported, regkeys, llvm-16-plus
1010

1111
; RUN: llvm-as %s -o %t.bc
12-
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'EnableOpaquePointersBackend=1 PrintToConsole=1,PrintAfter=Layout,JointMatrixLoadStoreOpt=2'" 2>&1 | FileCheck %s
12+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options "-cl-intel-enable-auto-large-GRF-mode -igc_opts 'EnableOpaquePointersBackend=1,PrintToConsole=1,PrintAfter=Layout,JointMatrixLoadStoreOpt=2'" 2>&1 | FileCheck %s
1313

1414
target triple = "spir64-unknown-unknown"
1515

IGC/ocloc_tests/DebugInfo/Dwarf/generate_enum.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2024 Intel Corporation
3+
; Copyright (C) 2024-2025 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
@@ -10,9 +10,15 @@
1010

1111
; UNSUPPORTED: sys32
1212

13-
; REQUIRES: regkeys, oneapi-readelf
13+
; REQUIRES: regkeys, oneapi-readelf, llvm-16-plus
1414

15-
; RUN: llvm-as %s -o %t
15+
; LLVM with opaque pointers:
16+
; RUN: llvm-as -opaque-pointers=1 %s -o %t
17+
; RUN: ocloc compile -llvm_input -file %t -device dg2 -options "-g -cl-opt-disable -igc_opts 'EnableOpaquePointersBackend=1, ElfDumpEnable=1, DumpUseShorterName=0, DebugDumpNamePrefix=%t_'"
18+
; RUN: oneapi-readelf --debug-dump %t_OCL_simd32_foo.elf | FileCheck %s
19+
20+
; LLVM with typed pointers:
21+
; RUN: llvm-as -opaque-pointers=0 %s -o %t
1622
; RUN: ocloc compile -llvm_input -file %t -device dg2 -options "-g -cl-opt-disable -igc_opts 'ElfDumpEnable=1, DumpUseShorterName=0, DebugDumpNamePrefix=%t_'"
1723
; RUN: oneapi-readelf --debug-dump %t_OCL_simd32__ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E13simple_kernel.elf | FileCheck %s
1824

IGC/ocloc_tests/DebugInfo/Dwarf/generate_enum_class.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2024 Intel Corporation
3+
; Copyright (C) 2024-2025 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
@@ -10,9 +10,15 @@
1010

1111
; UNSUPPORTED: sys32
1212

13-
; REQUIRES: regkeys, oneapi-readelf, dg2-supported
13+
; REQUIRES: regkeys, oneapi-readelf, dg2-supported, llvm-14-plus
1414

15-
; RUN: llvm-as %s -o %t
15+
; LLVM with opaque pointers:
16+
; RUN: llvm-as -opaque-pointers=1 %s -o %t
17+
; RUN: ocloc compile -llvm_input -file %t -device dg2 -options "-g -cl-opt-disable -igc_opts 'EnableOpaquePointersBackend=1, ElfDumpEnable=1, DumpUseShorterName=0, DebugDumpNamePrefix=%t_'"
18+
; RUN: oneapi-readelf --debug-dump %t_OCL_simd32_foo.elf | FileCheck %s
19+
20+
; LLVM with typed pointers:
21+
; RUN: llvm-as -opaque-pointers=0 %s -o %t
1622
; RUN: ocloc compile -llvm_input -file %t -device dg2 -options "-g -cl-opt-disable -igc_opts 'ElfDumpEnable=1, DumpUseShorterName=0, DebugDumpNamePrefix=%t_'"
1723
; RUN: oneapi-readelf --debug-dump %t_OCL_simd32_foo.elf | FileCheck %s
1824

IGC/ocloc_tests/Options/disable_scalarize_option.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2024 Intel Corporation
3+
; Copyright (C) 2024-2025 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; REQUIRES: regkeys,pvc-supported
9+
; REQUIRES: regkeys, pvc-supported, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-opt-large-register-file -igc_opts 'EnableOpaquePointersBackend=1,DisableOCLScalarizer=1,EnableVectorizer=0,PrintToConsole=1,PrintAfter=EmitPass'" 2>&1 | FileCheck %s --check-prefixes=CHECK
14+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-opt-large-register-file -igc_opts 'EnableOpaquePointersBackend=1,DisablePHIScalarization=1,EnableVectorizer=0,PrintToConsole=1,PrintAfter=EmitPass'" 2>&1 | FileCheck %s --check-prefixes=CHECK
15+
16+
; LLVM with typed pointers:
17+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1218
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-opt-large-register-file -igc_opts 'DisableOCLScalarizer=1,EnableVectorizer=0,PrintToConsole=1,PrintAfter=EmitPass'" 2>&1 | FileCheck %s --check-prefixes=CHECK
1319
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-opt-large-register-file -igc_opts 'DisablePHIScalarization=1,EnableVectorizer=0,PrintToConsole=1,PrintAfter=EmitPass'" 2>&1 | FileCheck %s --check-prefixes=CHECK
1420

IGC/ocloc_tests/Options/total_grf_precendence_over_api_opt.ll

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

9-
; REQUIRES: regkeys,pvc-supported
9+
; REQUIRES: regkeys, pvc-supported, llvm-14-plus
1010

11-
; RUN: llvm-as %s -o %t.bc
11+
; LLVM with opaque pointers:
12+
; RUN: llvm-as -opaque-pointers=1 %s -o %t.bc
13+
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-exp-register-file-size=64 -igc_opts 'EnableOpaquePointersBackend=1,TotalGRFNum=256,DumpVISAASMToConsole=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK
14+
15+
; LLVM with typed pointers:
16+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
1217
; RUN: ocloc compile -llvm_input -file %t.bc -device pvc -options " -ze-exp-register-file-size=64 -igc_opts 'TotalGRFNum=256,DumpVISAASMToConsole=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK
1318

1419
; Check that IGC_TotalGRFNum flag takes precedence over the value passed with -ze-exp-register-file-size api option.

0 commit comments

Comments
 (0)