summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-15 06:42:04 +0000
committerChris Lattner <sabre@nondot.org>2007-05-15 06:42:04 +0000
commit66ad6fac2ff687d993776daf44ca934114cd00dc (patch)
treec5a553efd4f25dab97c5f6510dfac405fe999f6d /llvm/lib/Transforms/IPO
parenta6f88ced8b4bc88ac63d2d11a0bcbbe5a54b938a (diff)
downloadbcm5719-llvm-66ad6fac2ff687d993776daf44ca934114cd00dc.tar.gz
bcm5719-llvm-66ad6fac2ff687d993776daf44ca934114cd00dc.zip
selects can also reach here
llvm-svn: 37081
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 56f6390ea4b..516ba4363ee 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -623,9 +623,10 @@ static bool OptimizeAwayTrappingUsesOfLoads(GlobalVariable *GV, Constant *LV) {
Loads.push_back(LI);
Changed |= OptimizeAwayTrappingUsesOfValue(LI, LV);
} else {
- // If we get here we could have stores, loads, or phi nodes whose values
+ // If we get here we could have stores, selects, or phi nodes whose values
// are loaded.
- assert((isa<StoreInst>(*GUI) || isa<PHINode>(*GUI)) &&
+ assert((isa<StoreInst>(*GUI) || isa<PHINode>(*GUI) ||
+ isa<SelectInst>(*GUI)) &&
"Only expect load and stores!");
}
OpenPOWER on IntegriCloud