[llvm] 2b4745f - AMDGPU: Avoid relying on an undef value in test
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 06:21:07 PDT 2021
Author: Matt Arsenault
Date: 2021-09-14T09:20:52-04:00
New Revision: 2b4745fe057f9d84e7c73cf5b990c7bdcde8847f
URL: https://github.com/llvm/llvm-project/commit/2b4745fe057f9d84e7c73cf5b990c7bdcde8847f
DIFF: https://github.com/llvm/llvm-project/commit/2b4745fe057f9d84e7c73cf5b990c7bdcde8847f.diff
LOG: AMDGPU: Avoid relying on an undef value in test
This was really becoming a direct call during the DAG, so it wasn't as
true to the test purpose.
Added:
Modified:
llvm/test/CodeGen/AMDGPU/indirect-call-known-callees.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/indirect-call-known-callees.ll b/llvm/test/CodeGen/AMDGPU/indirect-call-known-callees.ll
index 9021a14db5f6..c6202a63f3b5 100644
--- a/llvm/test/CodeGen/AMDGPU/indirect-call-known-callees.ll
+++ b/llvm/test/CodeGen/AMDGPU/indirect-call-known-callees.ll
@@ -7,10 +7,12 @@
; FIXME: Passing real values for workitem ID, and 0s that can be undef
; CHECK-LABEL: indirect_call_known_no_special_inputs:
-; CHECK: s_mov_b64 s[8:9], 0
-; CHECK: s_mov_b32 s12, s6
-; CHECK: v_mov_b32_e32 v31, v0
-; CHECK: s_swappc_b64
+
+; CHECK-DAG: s_cselect_b64 [[CALL_TARGET:s\[[0-9]+:[0-9]+\]]]
+; CHECK-DAG: s_mov_b64 s[8:9], 0
+; CHECK-DAG: s_mov_b32 s12, s6
+; CHECK-DAG: v_mov_b32_e32 v31, v0
+; CHECK: s_swappc_b64 s[30:31], [[CALL_TARGET]]
; CHECK: .amdhsa_kernarg_size 0
; CHECK-NEXT: .amdhsa_user_sgpr_private_segment_buffer 1
@@ -28,7 +30,8 @@
; CHECK-NEXT: .amdhsa_system_vgpr_workitem_id 0
define amdgpu_kernel void @indirect_call_known_no_special_inputs() {
bb:
- %tmp = select i1 undef, void (i8*, i32, i8*)* bitcast (void ()* @wobble to void (i8*, i32, i8*)*), void (i8*, i32, i8*)* bitcast (void ()* @snork to void (i8*, i32, i8*)*)
+ %cond = load i1, i1 addrspace(4)* null
+ %tmp = select i1 %cond, void (i8*, i32, i8*)* bitcast (void ()* @wobble to void (i8*, i32, i8*)*), void (i8*, i32, i8*)* bitcast (void ()* @snork to void (i8*, i32, i8*)*)
call void %tmp(i8* undef, i32 undef, i8* undef)
ret void
}
More information about the llvm-commits
mailing list