Fix PR1896
llvm-svn: 45568
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 2e2648f..c3c0530 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -640,7 +640,7 @@
// If we get here we could have stores, selects, or phi nodes whose values
// are loaded.
assert((isa<StoreInst>(*GUI) || isa<PHINode>(*GUI) ||
- isa<SelectInst>(*GUI)) &&
+ isa<SelectInst>(*GUI) || isa<ConstantExpr>(*GUI)) &&
"Only expect load and stores!");
}