[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 02:08:16 PDT 2025


================
@@ -121,8 +146,11 @@ while.end:                                        ; preds = %while.body, %entry
 
 define i16 @load16predec(ptr %x, i16 %y) {
 ; CHECK-LABEL: load16predec:
-; CHECK: ld {{.*}}, -{{[XYZ]}}
-; CHECK: ld {{.*}}, -{{[XYZ]}}
+; TODO: ld {{.*}}, -{{[XYZ]}}
+; TODO: ld {{.*}}, -{{[XYZ]}}
+; CHECK: sbiw {{.*}}, 2
----------------
benshi001 wrote:

it would be better to show the register of `sbiw` is r26/r28/r30, something like   `sbiw [r26|r28|r30], 2`.

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


More information about the llvm-commits mailing list