summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-07-30 09:45:09 +0000
committerDean Michael Berris <dberris@google.com>2018-07-30 09:45:09 +0000
commit927b3da6c9501617d65ca4adf5bcb60c5a8f8398 (patch)
tree4b9956206cd1160f6a236744bd0c0ea54ec03ecf /llvm/lib/Target
parent7f0d05d53219716394760dd16af9562d36ab96d6 (diff)
downloadbcm5719-llvm-927b3da6c9501617d65ca4adf5bcb60c5a8f8398.tar.gz
bcm5719-llvm-927b3da6c9501617d65ca4adf5bcb60c5a8f8398.zip
Revert "[X86] Correct the immediate cost for 'add/sub i64 %x, 0x80000000'."
This reverts commit r338204. llvm-svn: 338236
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 0257c42def2..1b260d8d45d 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud