mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Fix a bug in globalopt due to the recent cast patch.
llvm-svn: 32042
This commit is contained in:
parent
6ba44b183b
commit
0b4753a96c
@ -1713,7 +1713,8 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
|
|||||||
getVal(Values, SI->getOperand(0)),
|
getVal(Values, SI->getOperand(0)),
|
||||||
getVal(Values, SI->getOperand(1)));
|
getVal(Values, SI->getOperand(1)));
|
||||||
} else if (CastInst *CI = dyn_cast<CastInst>(CurInst)) {
|
} else if (CastInst *CI = dyn_cast<CastInst>(CurInst)) {
|
||||||
InstResult = ConstantExpr::getCast(getVal(Values, CI->getOperand(0)),
|
InstResult = ConstantExpr::getCast(CI->getOpcode(),
|
||||||
|
getVal(Values, CI->getOperand(0)),
|
||||||
CI->getType());
|
CI->getType());
|
||||||
} else if (SelectInst *SI = dyn_cast<SelectInst>(CurInst)) {
|
} else if (SelectInst *SI = dyn_cast<SelectInst>(CurInst)) {
|
||||||
InstResult = ConstantExpr::getSelect(getVal(Values, SI->getOperand(0)),
|
InstResult = ConstantExpr::getSelect(getVal(Values, SI->getOperand(0)),
|
||||||
|
Loading…
Reference in New Issue
Block a user