[llvm] [AArch64][GlobalISel] Add select to and combines (PR #200131)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 06:07:09 PDT 2026


================
@@ -157,20 +157,21 @@ define void @divergent_i1_phi_used_inside_loop_bigger_loop_body(float %val, floa
 ; GFX10-NEXT:  .LBB3_1: ; %loop_body
 ; GFX10-NEXT:    ; in Loop: Header=BB3_2 Depth=1
 ; GFX10-NEXT:    v_cvt_f32_u32_e32 v8, s6
-; GFX10-NEXT:    s_mov_b32 s8, exec_lo
+; GFX10-NEXT:    s_xor_b32 s4, s4, exec_lo
 ; GFX10-NEXT:    s_add_i32 s6, s6, 1
-; GFX10-NEXT:    s_xor_b32 s4, s4, s8
 ; GFX10-NEXT:    v_cmp_gt_f32_e32 vcc_lo, v8, v0
 ; GFX10-NEXT:    s_or_b32 s5, vcc_lo, s5
-; GFX10-NEXT:    s_andn2_b32 s7, s7, exec_lo
-; GFX10-NEXT:    s_and_b32 s8, exec_lo, s4
-; GFX10-NEXT:    s_or_b32 s7, s7, s8
 ; GFX10-NEXT:    s_andn2_b32 exec_lo, exec_lo, s5
 ; GFX10-NEXT:    s_cbranch_execz .LBB3_6
 ; GFX10-NEXT:  .LBB3_2: ; %loop_start
 ; GFX10-NEXT:    ; =>This Inner Loop Header: Depth=1
 ; GFX10-NEXT:    s_cmpk_le_i32 s6, 0x3e8
+; GFX10-NEXT:    s_cselect_b32 s9, 1, 0
----------------
arsenm wrote:

Yes, seems like it's making the condition be live cross block. That's a different set of issues to untangle.

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


More information about the llvm-commits mailing list