aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index dcdbd96276..5b3e31f0b1 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -10344,35 +10344,3 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
return false;
}
-unsigned
-ARMScalarTargetTransformImpl::getIntImmCost(const APInt &Imm, Type *Ty) const {
- assert(Ty->isIntegerTy());
-
- unsigned Bits = Ty->getPrimitiveSizeInBits();
- if (Bits == 0 || Bits > 32)
- return 4;
-
- int32_t SImmVal = Imm.getSExtValue();
- uint32_t ZImmVal = Imm.getZExtValue();
- if (!Subtarget->isThumb()) {
- if ((SImmVal >= 0 && SImmVal < 65536) ||
- (ARM_AM::getSOImmVal(ZImmVal) != -1) ||
- (ARM_AM::getSOImmVal(~ZImmVal) != -1))
- return 1;
- return Subtarget->hasV6T2Ops() ? 2 : 3;
- } else if (Subtarget->isThumb2()) {
- if ((SImmVal >= 0 && SImmVal < 65536) ||
- (ARM_AM::getT2SOImmVal(ZImmVal) != -1) ||
- (ARM_AM::getT2SOImmVal(~ZImmVal) != -1))
- return 1;
- return Subtarget->hasV6T2Ops() ? 2 : 3;
- } else /*Thumb1*/ {
- if (SImmVal >= 0 && SImmVal < 256)
- return 1;
- if ((~ZImmVal < 256) || ARM_AM::isThumbImmShiftedVal(ZImmVal))
- return 2;
- // Load from constantpool.
- return 3;
- }
- return 2;
-}