[llvm] [LowerMemIntrinsics] Avoid udiv/urem when type size is a power of 2 (PR #81238)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 00:21:04 PST 2024
================
@@ -59,8 +59,9 @@ define void @issue63986(i64 %0, i64 %idxprom) {
; CHECK-NEXT: flat_store_byte v[8:9], v25 offset:12
; CHECK-NEXT: s_cbranch_vccz .LBB0_2
; CHECK-NEXT: ; %bb.3: ; %loop-memcpy-residual-header
-; CHECK-NEXT: s_and_b32 s4, 32, 15
-; CHECK-NEXT: s_mov_b32 s5, 0
+; CHECK-NEXT: s_mov_b32 s4, 0
+; CHECK-NEXT: s_mov_b32 s5, s4
+; CHECK-NEXT: s_cmp_lg_u64 s[4:5], 0
----------------
Pierre-vh wrote:
This is the case we talked about that can't be folded unless we can fold the umin too (which means folding addrspacecast & ptrtoint for any addrspace)
https://github.com/llvm/llvm-project/pull/81238
More information about the llvm-commits
mailing list