mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 15:11:39 +00:00
Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.
llvm-svn: 11083
This commit is contained in:
parent
343ab20a2d
commit
f2a481f7f8
@ -512,7 +512,8 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
|
||||
// Replace (x - (y - z)) with (x + (z - y)) if the (y - z) subexpression
|
||||
// is not used by anyone else...
|
||||
//
|
||||
if (Op1I->getOpcode() == Instruction::Sub) {
|
||||
if (Op1I->getOpcode() == Instruction::Sub &&
|
||||
!Op1I->getType()->isFloatingPoint()) {
|
||||
// Swap the two operands of the subexpr...
|
||||
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
|
||||
Op1I->setOperand(0, IIOp1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user