[llvm] AMDGPU/GlobalISel: Fix inst-selection of ballot (PR #109986)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 08:20:35 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
----------------
petar-avramovic wrote:
Code is worse at the moment but correct. I don't see simple way to fix it.
Maybe if lower ballot earlier but most probably need new regbankselect first then remove extra AND in regbankcombiner.
https://github.com/llvm/llvm-project/pull/109986
More information about the llvm-commits
mailing list