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
This commit is contained in:
Chris Lattner
2008-01-03 07:25:26 +00:00
parent 76327d9cf5
commit 3d73bce2d0
2 changed files with 28 additions and 0 deletions

View File

@ -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.
}