Fix PR1896


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45568 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index 2e2648f..c3c0530 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/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!");
     }