OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee85bbc
)
undef beats zero. Fix this missed optimization opportunity. Patch by Matt Elder!
author
Nick Lewycky
<nicholas@mxc.ca>
Thu, 20 Nov 2008 04:36:13 +0000
(
04:36
+0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Thu, 20 Nov 2008 04:36:13 +0000
(
04:36
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59705
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ConstantFolding.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ConstantFolding.cpp
b/lib/Analysis/ConstantFolding.cpp
index
9f94ee3
..
597eecc
100644
(file)
--- a/
lib/Analysis/ConstantFolding.cpp
+++ b/
lib/Analysis/ConstantFolding.cpp
@@
-281,7
+281,7
@@
static Constant *FoldBitCast(Constant *C, const Type *DestTy,
Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) {
if (PHINode *PN = dyn_cast<PHINode>(I)) {
if (PN->getNumIncomingValues() == 0)
- return
Constant::getNullValue
(PN->getType());
+ return
UndefValue::get
(PN->getType());
Constant *Result = dyn_cast<Constant>(PN->getIncomingValue(0));
if (Result == 0) return 0;