projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
641cfee
)
[SCCP] Try to follow the DRY principle, use `OpSt`.
author
Davide Italiano
<davide@freebsd.org>
Mon, 11 Jul 2016 18:21:29 +0000
(18:21 +0000)
committer
Davide Italiano
<davide@freebsd.org>
Mon, 11 Jul 2016 18:21:29 +0000
(18:21 +0000)
Thanks to Eli Friedman for pointing out in his post-commit review!
llvm-svn: 275084
llvm/lib/Transforms/Scalar/SCCP.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/SCCP.cpp
b/llvm/lib/Transforms/Scalar/SCCP.cpp
index
4eefc91
..
f93f4ee
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/
llvm/lib/Transforms/Scalar/SCCP.cpp
@@
-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