Skip to content

Commit f8013c2

Browse files
mateuszchudykigcbot
authored andcommitted
Clear LIT tests after translator switchover
- remove legacy translator checks in tests - rename CHECK-KHR to CHECK - remove khronos-translator feature - rename tests: - reduce_opt_for_khronos_translator.ll -> reduce_opt.ll - reduce_opt_for_khronos_translator-typed-pointers.ll -> reduce_opt-typed-pointers.ll - remove redundant "--check-prefixes="
1 parent bb79841 commit f8013c2

39 files changed

+567
-1218
lines changed

IGC/Compiler/tests/CorrectlyRoundedDivSqrt/basic-typed-pointers.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;
77
;============================ end_copyright_notice =============================
88
;
9-
; RUN: igc_opt -debugify -igc-correctly-rounded-div-sqrt -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
9+
; RUN: igc_opt -debugify -igc-correctly-rounded-div-sqrt -check-debugify -S < %s 2>&1 | FileCheck %s
1010
; ------------------------------------------------
1111
; CorrectlyRoundedDivSqrt
1212
; ------------------------------------------------
@@ -44,8 +44,7 @@ define spir_kernel void @test_fdiv(float %src1, float %src2) {
4444
; Testcase 3
4545
; Check that sqrt calls are renamed
4646
;
47-
; CHECK-LEGACY: call float @__builtin_spirv_OpenCL_sqrt_cr_f32(float %src1)
48-
; CHECK-KHR: call float @_Z19__spirv_ocl_sqrt_cr_f32(float %src1)
47+
; CHECK: call float @_Z19__spirv_ocl_sqrt_cr_f32(float %src1)
4948
; CHECK: call float @_Z7sqrt_cr_f32(float %src2)
5049

5150
%5 = call float @__builtin_spirv_OpenCL_sqrt_f32(float %src1)

IGC/Compiler/tests/CorrectlyRoundedDivSqrt/basic.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
;============================ end_copyright_notice =============================
88
;
99
; REQUIRES: llvm-14-plus
10-
; RUN: igc_opt --opaque-pointers -debugify -igc-correctly-rounded-div-sqrt -check-debugify -S < %s 2>&1 | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
10+
; RUN: igc_opt --opaque-pointers -debugify -igc-correctly-rounded-div-sqrt -check-debugify -S < %s 2>&1 | FileCheck %s
1111
; ------------------------------------------------
1212
; CorrectlyRoundedDivSqrt
1313
; ------------------------------------------------
@@ -45,8 +45,7 @@ define spir_kernel void @test_fdiv(float %src1, float %src2) {
4545
; Testcase 3
4646
; Check that sqrt calls are renamed
4747
;
48-
; CHECK-LEGACY: call float @__builtin_spirv_OpenCL_sqrt_cr_f32(float %src1)
49-
; CHECK-KHR: call float @_Z19__spirv_ocl_sqrt_cr_f32(float %src1)
48+
; CHECK: call float @_Z19__spirv_ocl_sqrt_cr_f32(float %src1)
5049
; CHECK: call float @_Z7sqrt_cr_f32(float %src2)
5150

5251
%5 = call float @__builtin_spirv_OpenCL_sqrt_f32(float %src1)

IGC/Compiler/tests/GASRetValuePropagator/simple_plus_dwarf_change-typed-pointers.ll

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

9-
; UNSUPPORTED: khronos-translator
9+
; XFAIL: *
1010

1111
; This test checks if DWARF attributes are updated correctly after changing address space from generic to SLM
1212

IGC/Compiler/tests/GASRetValuePropagator/simple_plus_dwarf_change.ll

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

9-
; UNSUPPORTED: khronos-translator
9+
; XFAIL: *
1010

1111
; This test checks if DWARF attributes are updated correctly after changing address space from generic to SLM
1212

IGC/Compiler/tests/ReduceOptPass/reduce_opt_for_khronos_translator-typed-pointers.ll renamed to IGC/Compiler/tests/ReduceOptPass/reduce_opt-typed-pointers.ll

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

99
; RUN: igc_opt --typed-pointers %s -S -o - -opt-reduce-pass | FileCheck %s
10-
; REQUIRES: khronos-translator
1110

1211
declare spir_func <3 x i64> @__spirv_BuiltInGlobalSize()
1312
declare spir_func <3 x i64> @__spirv_BuiltInGlobalOffset()
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
12
;=========================== begin_copyright_notice ============================
23
;
3-
; Copyright (C) 2022 Intel Corporation
4+
; Copyright (C) 2024 Intel Corporation
45
;
56
; SPDX-License-Identifier: MIT
67
;
78
;============================ end_copyright_notice =============================
89

9-
; RUN: igc_opt %s -S -o - -opt-reduce-pass | FileCheck %s
10-
; UNSUPPORTED: khronos-translator
10+
; RUN: igc_opt %s --opaque-pointers -S -o - -opt-reduce-pass | FileCheck %s
11+
; REQUIRES: llvm-14-plus
1112

12-
declare spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalSize()
13-
declare spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalOffset()
14-
declare spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalInvocationId()
15-
declare spir_func i32 @__builtin_spirv_OpGroupIMulKHR_i32_i32_i32(i32, i32, i32)
13+
declare spir_func <3 x i64> @__spirv_BuiltInGlobalSize()
14+
declare spir_func <3 x i64> @__spirv_BuiltInGlobalOffset()
15+
declare spir_func <3 x i64> @__spirv_BuiltInGlobalInvocationId()
16+
declare spir_func i32 @__spirv_GroupIMulKHR_i32_i32_i32(i32, i32, i32)
1617

1718
define spir_kernel void @kernel1(i32 addrspace(1)* %arg0, i32 addrspace(1)* %arg1) {
18-
%size = call spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalSize()
19+
%size = call spir_func <3 x i64> @__spirv_BuiltInGlobalSize()
1920
%size1 = extractelement <3 x i64> %size, i32 1
2021
%size0 = extractelement <3 x i64> %size, i32 0
21-
%id = call spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalInvocationId()
22+
%id = call spir_func <3 x i64> @__spirv_BuiltInGlobalInvocationId()
2223
%id2 = extractelement <3 x i64> %id, i32 2
2324
%id1 = extractelement <3 x i64> %id, i32 1
2425
%id0 = extractelement <3 x i64> %id, i32 0
25-
%offset = call spir_func <3 x i64> @__builtin_spirv_BuiltInGlobalOffset()
26+
%offset = call spir_func <3 x i64> @__spirv_BuiltInGlobalOffset()
2627
%offset2 = extractelement <3 x i64> %offset, i32 2
2728
%offset1 = extractelement <3 x i64> %offset, i32 1
2829
%offset0 = extractelement <3 x i64> %offset, i32 0
@@ -36,12 +37,12 @@ define spir_kernel void @kernel1(i32 addrspace(1)* %arg0, i32 addrspace(1)* %arg
3637
%gep0 = getelementptr inbounds i32, i32 addrspace(1)* %arg0, i64 %add1
3738
%addr0 = addrspacecast i32 addrspace(1)* %gep0 to i32 addrspace(4)*
3839
%ld = load i32, i32 addrspace(4)* %addr0, align 4
39-
%red = call spir_func i32 @__builtin_spirv_OpGroupIMulKHR_i32_i32_i32(i32 2, i32 0, i32 %ld)
40+
%red = call spir_func i32 @__spirv_GroupIMulKHR_i32_i32_i32(i32 2, i32 0, i32 %ld)
4041
%cnd = icmp eq i64 %add1, 0
4142
%tof = sitofp i32 %red to float
4243
; This pass optimized only reduce instruction
4344
;
44-
; CHECK: [[LD:%.*]] = load i32, i32 addrspace(4)* {{.*}}, align 4
45+
; CHECK: [[LD:%.*]] = load i32, ptr addrspace(4) {{.*}}, align 4
4546
; CHECK: [[TMP1:%.*]] = call spir_func i32 @__builtin_IB_WorkGroupReduce_WI0_IMulKHR_i32(i32 [[LD]])
4647
; CHECK: [[TOF:%.*]] = sitofp i32 [[TMP1]] to float
4748
%fadd0 = fadd float %tof, 1.000000e+02
@@ -54,15 +55,15 @@ define spir_kernel void @kernel1(i32 addrspace(1)* %arg0, i32 addrspace(1)* %arg
5455
}
5556

5657

57-
declare spir_func i32 @__builtin_spirv_OpGroupIAdd_i32_i32_i32(i32, i32, i32)
58-
declare spir_func <3 x i64> @__builtin_spirv_BuiltInLocalInvocationId()
59-
declare spir_func <3 x i64> @__builtin_spirv_BuiltInWorkgroupSize()
58+
declare spir_func i32 @__spirv_GroupIAdd_i32_i32_i32(i32, i32, i32)
59+
declare spir_func <3 x i64> @__spirv_BuiltInLocalInvocationId()
60+
declare spir_func <3 x i64> @__spirv_BuiltInWorkgroupSize()
6061

6162
define spir_kernel void @kernel2(i32 addrspace(1)* %arg0, i32 addrspace(1)* %arg1) {
62-
%size = call spir_func <3 x i64> @__builtin_spirv_BuiltInWorkgroupSize()
63+
%size = call spir_func <3 x i64> @__spirv_BuiltInWorkgroupSize()
6364
%size1 = extractelement <3 x i64> %size, i32 1
6465
%size0 = extractelement <3 x i64> %size, i32 0
65-
%lid = call spir_func <3 x i64> @__builtin_spirv_BuiltInLocalInvocationId()
66+
%lid = call spir_func <3 x i64> @__spirv_BuiltInLocalInvocationId()
6667
%lid2 = extractelement <3 x i64> %lid, i32 2
6768
%lid1 = extractelement <3 x i64> %lid, i32 1
6869
%lid0 = extractelement <3 x i64> %lid, i32 0
@@ -73,18 +74,17 @@ define spir_kernel void @kernel2(i32 addrspace(1)* %arg0, i32 addrspace(1)* %arg
7374
%gep0 = getelementptr inbounds i32, i32 addrspace(1)* %arg0, i64 %add1
7475
%addr0 = addrspacecast i32 addrspace(1)* %gep0 to i32 addrspace(4)*
7576
%ld0 = load i32, i32 addrspace(4)* %addr0, align 4
76-
%red = call spir_func i32 @__builtin_spirv_OpGroupIAdd_i32_i32_i32(i32 2, i32 0, i32 %ld0)
77+
%red = call spir_func i32 @__spirv_GroupIAdd_i32_i32_i32(i32 2, i32 0, i32 %ld0)
7778
%cnd = icmp eq i64 %add1, 0
7879
%add2 = add nsw i32 %red, 100
7980
; This pass optimized only reduce instruction
8081
;
81-
; CHECK: [[LD0:%.*]] = load i32, i32 addrspace(4)* {{.*}}, align
82+
; CHECK: [[LD0:%.*]] = load i32, ptr addrspace(4) {{.*}}, align 4
8283
; CHECK: [[TMP1:%.*]] = call spir_func i32 @__builtin_IB_WorkGroupReduce_WI0_IAdd_i32(i32 [[LD0]])
83-
; CHECK: [[ADD2:%.*]] = add nsw i32 [[TMP1:%.*]], 100
84+
; CHECK: [[ADD2:%.*]] = add nsw i32 [[TMP1]], 100
8485
%sel = select i1 %cnd, i32 %add2, i32 0
8586
%gep1 = getelementptr inbounds i32, i32 addrspace(1)* %arg1, i64 %add1
8687
%addr1 = addrspacecast i32 addrspace(1)* %gep1 to i32 addrspace(4)*
8788
store i32 %sel, i32 addrspace(4)* %addr1, align 4
8889
ret void
8990
}
90-

IGC/Compiler/tests/ReduceOptPass/reduce_opt_for_khronos_translator.ll

Lines changed: 0 additions & 90 deletions
This file was deleted.

IGC/Compiler/tests/lit.cfg.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
if llvm_version >= 16:
5959
config.available_features.add('llvm-16-plus')
6060

61-
config.substitutions.append(('%SPV_CHECK_PREFIX%', 'CHECK-KHR'))
62-
config.available_features.add('khronos-translator')
63-
6461
if not config.regkeys_disabled:
6562
config.available_features.add('regkeys')
6663
if config.opaque_pointers == '1':

IGC/VectorCompiler/test/ImportOCLBiF/spirv_builtin_log.ll

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

9-
; RUN: %opt_legacy_typed %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
10-
; RUN: %opt_legacy_opaque %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
9+
; RUN: %opt_legacy_typed %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
10+
; RUN: %opt_legacy_opaque %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
1111

12-
; TODO: %opt_new_pm_typed -passes=GenXTranslateSPIRVBuiltins,GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
13-
; RUN: %opt_new_pm_opaque -passes=GenXTranslateSPIRVBuiltins,GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=%SPV_CHECK_PREFIX%,CHECK
12+
; TODO: %opt_new_pm_typed -passes=GenXTranslateSPIRVBuiltins,GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
13+
; RUN: %opt_new_pm_opaque -passes=GenXTranslateSPIRVBuiltins,GenXImportOCLBiF -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
1414

1515
target datalayout = "e-p:64:64-i64:64-n8:16:32"
1616
; COM: datalayout should stay the same
@@ -23,6 +23,5 @@ define spir_func <16 x double> @spirv_log_vec_dbl(<16 x double> %arg) {
2323
ret <16 x double> %res
2424
}
2525

26-
; CHECK-LEGACY: define internal spir_func <16 x double> @__builtin_spirv_OpenCL_log_v16f64(<16 x double> {{(noundef )?}}[[ARG:%[^ ]+]]) {{(local_unnamed_addr)?}} [[ATTR:#[0-9]+]]
27-
; CHECK-KHR: define internal spir_func <16 x double> @_Z15__spirv_ocl_logDv16_d(<16 x double> {{(noundef )?}}[[ARG:%[^ ]+]]) [[ATTR:#[0-9]+]]
26+
; CHECK: define internal spir_func <16 x double> @_Z15__spirv_ocl_logDv16_d(<16 x double> {{(noundef )?}}[[ARG:%[^ ]+]]) [[ATTR:#[0-9]+]]
2827
; CHECK: attributes [[ATTR]] = { {{.*}}alwaysinline{{.*}} }

IGC/VectorCompiler/test/SPIRVBuiltins/import_with_inline.ll

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

9-
; RUN: %opt_legacy_typed %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefix=%SPV_CHECK_PREFIX%
10-
; RUN: %opt_legacy_opaque %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefix=%SPV_CHECK_PREFIX%
9+
; RUN: %opt_legacy_typed %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
10+
; RUN: %opt_legacy_opaque %use_old_pass_manager% -GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
1111

12-
; RUN: %opt_new_pm_typed -passes=GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefix=%SPV_CHECK_PREFIX%
13-
; RUN: %opt_new_pm_opaque -passes=GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefix=%SPV_CHECK_PREFIX%
12+
; RUN: %opt_new_pm_typed -passes=GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_TYPED_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
13+
; RUN: %opt_new_pm_opaque -passes=GenXTranslateSPIRVBuiltins -vc-spirv-builtins-bif-path=%VC_SPIRV_BIF_OPAQUE_PTRS% -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
1414

1515
declare spir_func <16 x double> @_Z15__spirv_ocl_logDv16_d(<16 x double>)
1616

@@ -19,9 +19,5 @@ define spir_func <16 x double> @spirv_log_vec_dbl(<16 x double> %arg) {
1919
ret <16 x double> %res
2020
}
2121

22-
; CHECK-LEGACY-LABEL: define internal spir_func {{(noundef )?}}<16 x double> @_Z15__spirv_ocl_logDv16_d
23-
; CHECK-LEGACY-SAME: (<16 x double> {{(noundef )?}}[[ARG1:%[^ ]+]]) #[[ATTR:[0-9]+]] {
24-
; CHECK-LEGACY: attributes #[[ATTR]] = { {{.*}}alwaysinline{{.*}} }
25-
2622
; COM: FIXME: Not much to check there. Remove the test once the switch is done.
27-
; CHECK-KHR-NOT: define internal spir_func <16 x double> @_Z15__spirv_ocl_logDv16_d
23+
; CHECK-NOT: define internal spir_func <16 x double> @_Z15__spirv_ocl_logDv16_d

0 commit comments

Comments
 (0)