[PATCH] D143895: [AArch64] Fix incorrect `isLegalAddressingMode`
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 03:44:44 PDT 2023
dmgreen added a comment.
I can certainly imagine that we haven't got Addressing modes without a BaseReg entirely correct in the past and just assumed it was present. The change in IsSimplerBaseSCEVForTarget I added recently and look more correct now.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3186
if (!isAlwaysFoldable(TTI, LSRUse::Address, AccessTy, /*BaseGV=*/nullptr,
- IncOffset, /*HasBaseReg=*/false))
+ IncOffset, /*HasBaseReg=*/true))
return false;
----------------
Can you give more details why this is changed to HasBaseReg? It seems that isAlwaysFoldable already sets ScaledReg to 1 or -1, so this now tests for BaseReg + 1/-1*ScaledReg + IncOffset?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143895/new/
https://reviews.llvm.org/D143895
More information about the llvm-commits
mailing list