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:
ee35a4f
)
Fix a regression in my previous patch, fixing GlobalOpt/2005-09-27-Crash.ll
author
Chris Lattner
<sabre@nondot.org>
Tue, 27 Sep 2005 22:28:11 +0000
(22:28 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 27 Sep 2005 22:28:11 +0000
(22:28 +0000)
and PR632.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23484
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 3b2eee053140ec5337117a6b4352d044190952cf..839d7769ef7237ee7aec846488a241901fa81dd7 100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
lib/Transforms/IPO/GlobalOpt.cpp
@@
-337,7
+337,7
@@
static bool CleanupConstantGlobalUsers(Value *V, Constant *Init) {
Constant *SubInit = 0;
ConstantExpr *CE =
dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP));
- if (CE && CE->getOpcode() == Instruction::GetElementPtr)
+ if (
Init &&
CE && CE->getOpcode() == Instruction::GetElementPtr)
SubInit = ConstantFoldLoadThroughGEPConstantExpr(Init, CE);
Changed |= CleanupConstantGlobalUsers(GEP, SubInit);