Skip to content

Commit 6c6f8b1

Browse files
authored
[SPIR-V] Fixup tests (llvm#73371)
These tests are currently failing at tip-of-tree, but pass with minor FileCheck updates that look reasonable.
1 parent 5ca1f2a commit 6c6f8b1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
; CHECK: %[[#int64_ty:]] = OpTypeInt 64 0
1313
; CHECK: %[[#vec_ty:]] = OpTypeVector %[[#int64_ty]] 3
1414
; CHECK: %[[#func2_ty:]] = OpTypeFunction %[[#vec_ty]]
15+
; CHECK: %[[#int32_ty:]] = OpTypeInt 32 0
16+
; CHECK: %[[#i32ptr_ty:]] = OpTypePointer CrossWorkgroup %[[#int32_ty]]
1517
;; TODO: add 64-bit constant defs
1618
; CHECK: %[[#f2_decl]] = OpFunction %[[#vec_ty]] Pure %[[#func2_ty]]
1719
; CHECK: OpFunctionEnd
@@ -31,21 +33,21 @@ entry:
3133
%0 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
3234
%call = extractelement <3 x i64> %0, i32 0
3335
%conv = trunc i64 %call to i32
34-
; CHECK: %[[#i1:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
36+
; CHECK: %[[#i1:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
3537
; CHECK: OpStore %[[#i1:]] %[[#]] Aligned 4
3638
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 0
3739
store i32 %conv, i32 addrspace(1)* %arrayidx, align 4
3840
%1 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
3941
%call1 = extractelement <3 x i64> %1, i32 1
4042
%conv2 = trunc i64 %call1 to i32
41-
; CHECK: %[[#i2:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
43+
; CHECK: %[[#i2:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
4244
; CHECK: OpStore %[[#i2:]] %[[#]] Aligned 4
4345
%arrayidx3 = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 1
4446
store i32 %conv2, i32 addrspace(1)* %arrayidx3, align 4
4547
%2 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
4648
%call4 = extractelement <3 x i64> %2, i32 2
4749
%conv5 = trunc i64 %call4 to i32
48-
; CHECK: %[[#i3:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
50+
; CHECK: %[[#i3:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
4951
; CHECK: OpStore %[[#i3:]] %[[#]] Aligned 4
5052
%arrayidx6 = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 2
5153
store i32 %conv5, i32 addrspace(1)* %arrayidx6, align 4

llvm/test/CodeGen/SPIRV/struct.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
%struct.ST = type { i32, i32, i32 }
44

55
; CHECK-DAG: OpName %[[#struct:]] "struct.ST"
6-
; CHECK-DAG: %[[#char:]] = OpTypeInt 8 0
76
; CHECK-DAG: %[[#int:]] = OpTypeInt 32 0
87
; CHECK-DAG: %[[#struct]] = OpTypeStruct %[[#int]] %[[#int]] %[[#int]]
98
; CHECK-DAG: %[[#structP:]] = OpTypePointer Function %[[#struct]]
10-
; CHECK-DAG: %[[#intP:]] = OpTypePointer Function %[[#char]]
9+
; CHECK-DAG: %[[#intP:]] = OpTypePointer Function %[[#int]]
1110
; CHECK-DAG: %[[#zero:]] = OpConstant %[[#int]] 0
1211
; CHECK-DAG: %[[#one:]] = OpConstant %[[#int]] 1
1312
; CHECK-DAG: %[[#two:]] = OpConstant %[[#int]] 2

0 commit comments

Comments
 (0)