mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[SCCP] Try to follow the DRY principle, use OpSt
.
Thanks to Eli Friedman for pointing out in his post-commit review! llvm-svn: 275084
This commit is contained in:
parent
b465fe9970
commit
2f0dd2eaeb
@ -761,9 +761,8 @@ void SCCPSolver::visitCastInst(CastInst &I) {
|
||||
markOverdefined(&I);
|
||||
else if (OpSt.isConstant()) {
|
||||
// Fold the constant as we build.
|
||||
Constant *C = ConstantFoldCastOperand(
|
||||
I.getOpcode(), getValueState(I.getOperand(0)).getConstant(),
|
||||
I.getType(), DL);
|
||||
Constant *C = ConstantFoldCastOperand(I.getOpcode(), OpSt.getConstant(),
|
||||
I.getType(), DL);
|
||||
if (isa<UndefValue>(C))
|
||||
return;
|
||||
// Propagate constant value
|
||||
|
Loading…
Reference in New Issue
Block a user