aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-03 07:25:26 +0000
committerChris Lattner <sabre@nondot.org>2008-01-03 07:25:26 +0000
commit3d73bce2d01c7537042bb214edb5fc597f07bf74 (patch)
tree00c12eee5788657b4eeeac62f8f91c00c7090583 /lib/Transforms/Utils/SimplifyCFG.cpp
parent76327d9cf598a17eb69ea928ca43fbacb6cc535e (diff)
don't hoist FP additions into unconditional adds + selects. This
could theoretically introduce a trap, but is also a performance issue. This speeds up ptrdist/ks by 8%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index b838f94b79..f19adbd263 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -372,6 +372,8 @@ static bool DominatesMergePoint(Value *V, BasicBlock *BB,
case Instruction::AShr:
case Instruction::ICmp:
case Instruction::FCmp:
+ if (I->getOperand(0)->getType()->isFPOrFPVector())
+ return false; // FP arithmetic might trap.
break; // These are all cheap and non-trapping instructions.
}