mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 06:39:12 +00:00
Fix Transforms/LoopStrengthReduce/2005-08-17-OutOfLoopVariant.ll, a crash
on 177.mesa git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b061f1f49c
commit
8385e51e21
@ -744,7 +744,10 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
|
||||
// value of the IV. Do not put anything in the base, make sure it's all in
|
||||
// the immediate field to allow as much factoring as possible.
|
||||
if (!L->contains(UsersToProcess[i].Inst->getParent())) {
|
||||
std::swap(UsersToProcess[i].Base, UsersToProcess[i].Imm);
|
||||
UsersToProcess[i].Imm = SCEVAddExpr::get(UsersToProcess[i].Imm,
|
||||
UsersToProcess[i].Base);
|
||||
UsersToProcess[i].Base =
|
||||
SCEVUnknown::getIntegerSCEV(0, UsersToProcess[i].Base->getType());
|
||||
} else {
|
||||
|
||||
// Addressing modes can be folded into loads and stores. Be careful that
|
||||
|
Loading…
Reference in New Issue
Block a user