[llvm] PeepholeOpt: Fix looking for def of current copy to coalesce (PR #125533)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 08:46:40 PST 2025
================
@@ -26,14 +26,18 @@ define void @testMultiply(ptr nocapture noundef readonly %a, ptr nocapture nound
; CHECK-NEXT: std r29, -24(r30) # 8-byte Folded Spill
; CHECK-NEXT: mr r29, r5
; CHECK-NEXT: bl _Z15buildVectorPairPu13__vector_pairDv16_hS0_ at notoc
-; CHECK-NEXT: xxsetaccz acc0
-; CHECK-NEXT: xvf32gerpp acc0, v31, v30
+; CHECK-NEXT: xxsetaccz acc1
+; CHECK-NEXT: xvf32gerpp acc1, v31, v30
; CHECK-NEXT: lxv v3, 32(r1)
-; CHECK-NEXT: lxv v2, 48(r1)
-; CHECK-NEXT: xvf32gerpp acc0, v3, v2
+; CHECK-NEXT: lxv vs0, 48(r1)
+; CHECK-NEXT: xvf32gerpp acc1, v3, vs0
; CHECK-NEXT: lxv v31, -48(r30) # 16-byte Folded Reload
; CHECK-NEXT: lxv v30, -64(r30) # 16-byte Folded Reload
-; CHECK-NEXT: xxmfacc acc0
+; CHECK-NEXT: xxmfacc acc1
+; CHECK-NEXT: xxlor vs0, vs4, vs4
+; CHECK-NEXT: xxlor vs1, vs5, vs5
+; CHECK-NEXT: xxlor vs2, vs6, vs6
+; CHECK-NEXT: xxlor vs3, vs7, vs7
----------------
lei137 wrote:
These extra copies are a result of using `acc1` vs `acc0` on line 29. Any idea as to why this patch caused it to use `acc1` vs `acc0`?
https://github.com/llvm/llvm-project/pull/125533
More information about the llvm-commits
mailing list