[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 27 15:28:23 PDT 2005
Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.57 -> 1.58
---
Log message:
Fix a regression in my previous patch, fixing GlobalOpt/2005-09-27-Crash.ll
and PR632: http://llvm.cs.uiuc.edu/PR632 .
---
Diffs of the changes: (+1 -1)
GlobalOpt.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.57 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.58
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.57 Tue Sep 27 00:02:43 2005
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Tue Sep 27 17:28:11 2005
@@ -337,7 +337,7 @@
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);
More information about the llvm-commits
mailing list