mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +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);
|
markOverdefined(&I);
|
||||||
else if (OpSt.isConstant()) {
|
else if (OpSt.isConstant()) {
|
||||||
// Fold the constant as we build.
|
// Fold the constant as we build.
|
||||||
Constant *C = ConstantFoldCastOperand(
|
Constant *C = ConstantFoldCastOperand(I.getOpcode(), OpSt.getConstant(),
|
||||||
I.getOpcode(), getValueState(I.getOperand(0)).getConstant(),
|
I.getType(), DL);
|
||||||
I.getType(), DL);
|
|
||||||
if (isa<UndefValue>(C))
|
if (isa<UndefValue>(C))
|
||||||
return;
|
return;
|
||||||
// Propagate constant value
|
// Propagate constant value
|
||||||
|
Loading…
Reference in New Issue
Block a user