-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIR-V] Fixup tests #73371
Merged
Merged
[SPIR-V] Fixup tests #73371
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These tests are currently failing at tip-of-tree, but pass with minor FileCheck updates that look reasonable.
@llvm/pr-subscribers-backend-spir-v Author: Natalie Chouinard (sudonatalie) ChangesThese tests are currently failing at tip-of-tree, but pass with minor FileCheck updates that look reasonable. Full diff: https://github.com/llvm/llvm-project/pull/73371.diff 2 Files Affected:
diff --git a/llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll b/llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll
index da6015d23d0549a..127804671cee475 100644
--- a/llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll
+++ b/llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll
@@ -12,6 +12,8 @@
; CHECK: %[[#int64_ty:]] = OpTypeInt 64 0
; CHECK: %[[#vec_ty:]] = OpTypeVector %[[#int64_ty]] 3
; CHECK: %[[#func2_ty:]] = OpTypeFunction %[[#vec_ty]]
+; CHECK: %[[#int32_ty:]] = OpTypeInt 32 0
+; CHECK: %[[#i32ptr_ty:]] = OpTypePointer CrossWorkgroup %[[#int32_ty]]
;; TODO: add 64-bit constant defs
; CHECK: %[[#f2_decl]] = OpFunction %[[#vec_ty]] Pure %[[#func2_ty]]
; CHECK: OpFunctionEnd
@@ -31,21 +33,21 @@ entry:
%0 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
%call = extractelement <3 x i64> %0, i32 0
%conv = trunc i64 %call to i32
-; CHECK: %[[#i1:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
+; CHECK: %[[#i1:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
; CHECK: OpStore %[[#i1:]] %[[#]] Aligned 4
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 0
store i32 %conv, i32 addrspace(1)* %arrayidx, align 4
%1 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
%call1 = extractelement <3 x i64> %1, i32 1
%conv2 = trunc i64 %call1 to i32
-; CHECK: %[[#i2:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
+; CHECK: %[[#i2:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
; CHECK: OpStore %[[#i2:]] %[[#]] Aligned 4
%arrayidx3 = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 1
store i32 %conv2, i32 addrspace(1)* %arrayidx3, align 4
%2 = call spir_func <3 x i64> @BuiltInGlobalOffset() #1
%call4 = extractelement <3 x i64> %2, i32 2
%conv5 = trunc i64 %call4 to i32
-; CHECK: %[[#i3:]] = OpInBoundsPtrAccessChain %[[#iptr_ty]] %[[#outOffsets]]
+; CHECK: %[[#i3:]] = OpInBoundsPtrAccessChain %[[#i32ptr_ty]] %[[#outOffsets]]
; CHECK: OpStore %[[#i3:]] %[[#]] Aligned 4
%arrayidx6 = getelementptr inbounds i32, i32 addrspace(1)* %outOffsets, i64 2
store i32 %conv5, i32 addrspace(1)* %arrayidx6, align 4
diff --git a/llvm/test/CodeGen/SPIRV/struct.ll b/llvm/test/CodeGen/SPIRV/struct.ll
index 3c4fc81b9200457..c3d2694cf929cc1 100644
--- a/llvm/test/CodeGen/SPIRV/struct.ll
+++ b/llvm/test/CodeGen/SPIRV/struct.ll
@@ -3,11 +3,10 @@
%struct.ST = type { i32, i32, i32 }
; CHECK-DAG: OpName %[[#struct:]] "struct.ST"
-; CHECK-DAG: %[[#char:]] = OpTypeInt 8 0
; CHECK-DAG: %[[#int:]] = OpTypeInt 32 0
; CHECK-DAG: %[[#struct]] = OpTypeStruct %[[#int]] %[[#int]] %[[#int]]
; CHECK-DAG: %[[#structP:]] = OpTypePointer Function %[[#struct]]
-; CHECK-DAG: %[[#intP:]] = OpTypePointer Function %[[#char]]
+; CHECK-DAG: %[[#intP:]] = OpTypePointer Function %[[#int]]
; CHECK-DAG: %[[#zero:]] = OpConstant %[[#int]] 0
; CHECK-DAG: %[[#one:]] = OpConstant %[[#int]] 1
; CHECK-DAG: %[[#two:]] = OpConstant %[[#int]] 2
|
Keenuts
approved these changes
Nov 27, 2023
sudonatalie
added a commit
to sudonatalie/llvm-project
that referenced
this pull request
Dec 5, 2023
Add a pre-commit CI workflow for the experimental SPIR-V backend. This action should only run when SPIR-V target or test files are modified. The `codegen-spirv` tests don't run as part of `check-all` because the SPIR-V backend is still experimental. Depends on llvm#73371 (for a green tree)
sudonatalie
added a commit
that referenced
this pull request
Dec 7, 2023
Add a pre-commit CI workflow for the experimental SPIR-V backend. This action should only run when SPIR-V target or test files are modified. The `codegen-spirv` tests don't run as part of `check-all` because the SPIR-V backend is still experimental. Depends on #73371 (for a green tree)
michalpaszkowski
approved these changes
Dec 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These tests are currently failing at tip-of-tree, but pass with minor FileCheck updates that look reasonable.