mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
529429224c
commit
0517e72096
@ -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