[llvm] r310462 - [LoopStrengthReduce] Don't neglect the Fixup.Offset in isAMCompletelyFolded().
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 04:27:47 PDT 2017
Author: jonpa
Date: Wed Aug 9 04:27:46 2017
New Revision: 310462
URL: http://llvm.org/viewvc/llvm-project?rev=310462&view=rev
Log:
[LoopStrengthReduce] Don't neglect the Fixup.Offset in isAMCompletelyFolded().
In the recursive call to isAMCompletelyFolded(), the passed offset should be
the sum of F.BaseOffset and Fixup.Offset.
Review: Quentin Colombet.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=310462&r1=310461&r2=310462&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Aug 9 04:27:46 2017
@@ -1657,8 +1657,8 @@ static bool isAMCompletelyFolded(const T
if (LU.Kind == LSRUse::Address && TTI.LSRWithInstrQueries()) {
for (const LSRFixup &Fixup : LU.Fixups)
if (!isAMCompletelyFolded(TTI, LSRUse::Address, LU.AccessTy, F.BaseGV,
- F.BaseOffset, F.HasBaseReg, F.Scale,
- Fixup.UserInst))
+ (F.BaseOffset + Fixup.Offset), F.HasBaseReg,
+ F.Scale, Fixup.UserInst))
return false;
return true;
}
More information about the llvm-commits
mailing list