[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)
Tom Vijlbrief via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 4 22:56:30 PDT 2025
================
@@ -57,7 +57,8 @@ class LLVM_LIBRARY_VISIBILITY AVRTargetInfo : public TargetInfo {
Int16Type = SignedInt;
Char32Type = UnsignedLong;
SigAtomicType = SignedChar;
- resetDataLayout("e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8");
+ resetDataLayout(
+ "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-n16:8-a:8");
----------------
tomtor wrote:
Yes, this change fixes the detection of induction variables. That is a precondition for loop-reduce, but it is also used in other rewrite passes. I think the correct way to proceed is to accept that predec is really a minimal optimization, and if it is no longer generated then that is ok.
https://github.com/llvm/llvm-project/pull/152028
More information about the llvm-commits
mailing list