mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Fix a bug in globalopt due to the recent cast patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96839be87f
commit
9a989f0f97
@ -1713,7 +1713,8 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
|
||||
getVal(Values, SI->getOperand(0)),
|
||||
getVal(Values, SI->getOperand(1)));
|
||||
} 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());
|
||||
} else if (SelectInst *SI = dyn_cast<SelectInst>(CurInst)) {
|
||||
InstResult = ConstantExpr::getSelect(getVal(Values, SI->getOperand(0)),
|
||||
|
Loading…
Reference in New Issue
Block a user