mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-24 12:36:30 +00:00
Revert r112432. It appears to be exposing a problem in the emacs build.
llvm-svn: 112638
This commit is contained in:
parent
c9c199c531
commit
6822b9d177
@ -3332,16 +3332,11 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
|
||||
// LLVM IR canonical form means we need only traverse the left operands.
|
||||
SmallVector<const SCEV *, 4> AddOps;
|
||||
AddOps.push_back(getSCEV(U->getOperand(1)));
|
||||
for (Value *Op = U->getOperand(0); ; Op = U->getOperand(0)) {
|
||||
unsigned Opcode = Op->getValueID() - Value::InstructionVal;
|
||||
if (Opcode != Instruction::Add && Opcode != Instruction::Sub)
|
||||
break;
|
||||
for (Value *Op = U->getOperand(0);
|
||||
Op->getValueID() == Instruction::Add + Value::InstructionVal;
|
||||
Op = U->getOperand(0)) {
|
||||
U = cast<Operator>(Op);
|
||||
const SCEV *Op1 = getSCEV(U->getOperand(1));
|
||||
if (Opcode == Instruction::Sub)
|
||||
AddOps.push_back(getNegativeSCEV(Op1));
|
||||
else
|
||||
AddOps.push_back(Op1);
|
||||
AddOps.push_back(getSCEV(U->getOperand(1)));
|
||||
}
|
||||
AddOps.push_back(getSCEV(U->getOperand(0)));
|
||||
return getAddExpr(AddOps);
|
||||
|
Loading…
Reference in New Issue
Block a user