[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp
Chris Lattner
sabre at nondot.org
Sun May 13 14:28:26 PDT 2007
Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.105 -> 1.106
---
Log message:
Fix Transforms/GlobalOpt/2007-05-13-Crash.ll
---
Diffs of the changes: (+4 -1)
GlobalOpt.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.105 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.106
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.105 Sun May 6 08:37:16 2007
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Sun May 13 16:28:07 2007
@@ -623,7 +623,10 @@
Loads.push_back(LI);
Changed |= OptimizeAwayTrappingUsesOfValue(LI, LV);
} else {
- assert(isa<StoreInst>(*GUI) && "Only expect load and stores!");
+ // If we get here we could have stores, loads, or phi nodes whose values
+ // are loaded.
+ assert((isa<StoreInst>(*GUI) || isa<PHINode>(*GUI)) &&
+ "Only expect load and stores!");
}
if (Changed) {
More information about the llvm-commits
mailing list