mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
An instruction's operands aren't necessarily instructions or constants. They
could be arguments, for example. No testcase because this is a bug-fix broken out of a larger optimization patch. llvm-svn: 141951
This commit is contained in:
parent
0a11eb1b21
commit
610fc64d78
@ -4764,7 +4764,8 @@ static Constant *EvaluateExpression(Value *V, const Loop *L,
|
||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
|
||||
Instruction *Operand = dyn_cast<Instruction>(I->getOperand(i));
|
||||
if (!Operand) {
|
||||
Operands[i] = cast<Constant>(I->getOperand(i));
|
||||
Operands[i] = dyn_cast<Constant>(I->getOperand(i));
|
||||
if (!Operands[i]) return 0;
|
||||
continue;
|
||||
}
|
||||
Constant *C = EvaluateExpression(Operand, L, Vals, TD);
|
||||
|
Loading…
Reference in New Issue
Block a user