From 6476cb620595299c361f55d0de8c32cc986f7a6f Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Mon, 30 Jul 2018 09:45:09 +0000 Subject: [PATCH] Revert "[X86] Correct the immediate cost for 'add/sub i64 %x, 0x80000000'." This reverts commit r338204. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338236 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86TargetTransformInfo.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index 0257c42def2..1b260d8d45d 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -2332,15 +2332,9 @@ int X86TTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, // immediates here as the normal path expects bit 31 to be sign extended. if (Idx == 1 && Imm.getBitWidth() == 64 && isUInt<32>(Imm.getZExtValue())) return TTI::TCC_Free; - ImmIdx = 1; - break; + LLVM_FALLTHROUGH; case Instruction::Add: case Instruction::Sub: - // For add/sub, we can use the opposite instruction for INT32_MIN. - if (Idx == 1 && Imm.getBitWidth() == 64 && isInt<32>(-Imm.getSExtValue())) - return TTI::TCC_Free; - ImmIdx = 1; - break; case Instruction::Mul: case Instruction::UDiv: case Instruction::SDiv: -- 2.50.1