[llvm] [AArch64][SVE] Fold ADD+CNTB to INCB and DECB (PR #118280)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 06:50:20 PDT 2025
================
@@ -65,7 +65,8 @@ define void @quux() #1 {
; CHECK-NEXT: mov sp, x9
; CHECK-NEXT: sub x10, x29, #104
; CHECK-NEXT: stur x9, [x10, #-256] // 8-byte Folded Spill
-; CHECK-NEXT: addvl x9, x8, #1
+; CHECK-NEXT: mov x9, x8
+; CHECK-NEXT: incb x9
----------------
paulwalker-arm wrote:
What do you think about having a dedicated SubtargetFeature to use along with UseScalarIncVL. Something like HasFastIncDecVL? Doing this gives a route to disable the patterns if necessary, be that for code size of some other reason. We can still make the feature default on so that all targets that enable UseScalarIncVL (i.e. everything SVE2 onwards) will trigger the new patterns.
https://github.com/llvm/llvm-project/pull/118280
More information about the llvm-commits
mailing list