projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96839be
)
Fix a bug in globalopt due to the recent cast patch.
author
Chris Lattner
<sabre@nondot.org>
Thu, 30 Nov 2006 17:26:08 +0000
(17:26 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 30 Nov 2006 17:26:08 +0000
(17:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32042
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalOpt.cpp
b/lib/Transforms/IPO/GlobalOpt.cpp
index 4ddc071681048f9a6c4a726bfd213051a94a341a..e0dfbe5aec6ee28ee165ab2de9397348825f72c9 100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
lib/Transforms/IPO/GlobalOpt.cpp
@@
-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)),