In the recursive call to isAMCompletelyFolded(), the passed offset should be
the sum of F.BaseOffset and Fixup.Offset.
Review: Quentin Colombet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310462
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}