[llvm] [AArch64][SVE] Fold ADD+CNTB to INCB and DECB (PR #118280)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 10:16:40 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
----------------
rj-jesus wrote:

This can still increase code size as exemplified here.
I'm not sure how I can avoid it without doing the fold later.

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


More information about the llvm-commits mailing list