summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-08-09 11:27:46 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-08-09 11:27:46 +0000
commit5052771af344914dd68dc2e8000837b6a898a941 (patch)
treee70af2b2971b3afee402b5736afe6f7dd5f51941
parent630fc7b82a1150c87bee48b7ea9a0ec76f89f723 (diff)
downloadbcm5719-llvm-5052771af344914dd68dc2e8000837b6a898a941.tar.gz
bcm5719-llvm-5052771af344914dd68dc2e8000837b6a898a941.zip
[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. llvm-svn: 310462
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 44911983435..fb0d2b3de48 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1657,8 +1657,8 @@ static bool isAMCompletelyFolded(const TargetTransformInfo &TTI,
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;
}
OpenPOWER on IntegriCloud