summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-20 01:15:41 +0000
committerChris Lattner <sabre@nondot.org>2009-01-20 01:15:41 +0000
commitc59945b4bdfd8887bf9efb1a69171084910acf14 (patch)
tree415569f7fdd96ff8b66fcbbab8d6b7256ec34367 /llvm/lib
parent83d2e066c12d2ff42f07c90a4cf5495d2669a28a (diff)
downloadbcm5719-llvm-c59945b4bdfd8887bf9efb1a69171084910acf14.tar.gz
bcm5719-llvm-c59945b4bdfd8887bf9efb1a69171084910acf14.zip
another fix for PR3354
llvm-svn: 62561
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 1a4f57320f7..d891eebf33c 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1559,6 +1559,11 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) {
// fold the conditions into logical ops and one cond br.
if (&BB->front() != BI)
return false;
+
+
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(BI->getCondition()))
+ if (CE->canTrap())
+ return false;
int PBIOp, BIOp;
if (PBI->getSuccessor(0) == BI->getSuccessor(0))
OpenPOWER on IntegriCloud