[llvm] Rework i1->i32 zext/anyext translation (PR #114721)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 11:53:13 PST 2024
================
@@ -740,10 +740,12 @@ define amdgpu_kernel void @fp_to_uint_f32_to_i1(ptr addrspace(1) %out, float %in
; SI-NEXT: s_load_dword s4, s[2:3], 0xb
; SI-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x9
; SI-NEXT: s_mov_b32 s3, 0xf000
-; SI-NEXT: s_mov_b32 s2, -1
; SI-NEXT: s_waitcnt lgkmcnt(0)
; SI-NEXT: v_cmp_eq_f32_e64 s[4:5], -1.0, s4
-; SI-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
+; SI-NEXT: s_and_b64 s[4:5], s[4:5], exec
+; SI-NEXT: s_cselect_b32 s4, 1, 0
+; SI-NEXT: s_mov_b32 s2, -1
+; SI-NEXT: v_mov_b32_e32 v0, s4
----------------
arsenm wrote:
Does it make a difference if you do? I would expect the default priority would check the uniform predicate first, as it has the additional predicate.
https://github.com/llvm/llvm-project/pull/114721
More information about the llvm-commits
mailing list