mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +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:
@ -512,7 +512,8 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
|
|||||||
// Replace (x - (y - z)) with (x + (z - y)) if the (y - z) subexpression
|
// Replace (x - (y - z)) with (x + (z - y)) if the (y - z) subexpression
|
||||||
// is not used by anyone else...
|
// 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...
|
// Swap the two operands of the subexpr...
|
||||||
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
|
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
|
||||||
Op1I->setOperand(0, IIOp1);
|
Op1I->setOperand(0, IIOp1);
|
||||||
|
Reference in New Issue
Block a user