diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-03 07:25:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-03 07:25:26 +0000 |
commit | f391883670caecc01973bc6c69fc1f22c20a2612 (patch) | |
tree | 8b16820834435abd4e8799bc5212d5a0a789577e /llvm/lib | |
parent | 705dc51f2c2bc19ff3cdc554920596354800b3ce (diff) | |
download | bcm5719-llvm-f391883670caecc01973bc6c69fc1f22c20a2612.tar.gz bcm5719-llvm-f391883670caecc01973bc6c69fc1f22c20a2612.zip |
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%.
llvm-svn: 45533
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index b838f94b790..f19adbd263c 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/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. } |