[llvm] AMDGPU/GlobalISel: Fix inst-selection of ballot (PR #109986)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 08:04:17 PDT 2024


================
@@ -65,7 +68,8 @@ define amdgpu_cs i32 @compare_int_with_constant(i32 %x) {
 define amdgpu_cs i32 @compare_floats(float %x, float %y) {
 ; CHECK-LABEL: compare_floats:
 ; CHECK:       ; %bb.0:
-; CHECK-NEXT:    v_cmp_gt_f32_e64 s0, v0, v1
+; CHECK-NEXT:    v_cmp_gt_f32_e32 vcc_lo, v0, v1
+; CHECK-NEXT:    s_and_b32 s0, vcc_lo, exec_lo
----------------
arsenm wrote:

v_cmp already treats inactive lanes as 0. SelectionDAG does not introduce the extra instruction 

https://github.com/llvm/llvm-project/pull/109986


More information about the llvm-commits mailing list