mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bdf0d7cfc1
commit
3cd389de39
@ -1828,7 +1828,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
|
||||
|
||||
// If all uses are addresses, consider sinking the immediate part of the
|
||||
// common expression back into uses if they can fit in the immediate fields.
|
||||
if (HaveCommonExprs && AllUsesAreAddresses) {
|
||||
if (TLI && HaveCommonExprs && AllUsesAreAddresses) {
|
||||
SCEVHandle NewCommon = CommonExprs;
|
||||
SCEVHandle Imm = SE->getIntegerSCEV(0, ReplacedTy);
|
||||
MoveImmediateValues(TLI, ReplacedTy, NewCommon, Imm, true, L, SE);
|
||||
|
Loading…
Reference in New Issue
Block a user