mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Remove the remaining uses of abs64 and nuke it.
std::abs works just fine and we're already using it in many places. NFC intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -10310,9 +10310,9 @@ bool ARMTargetLowering::isLegalAddressingMode(const AddrMode &AM,
|
||||
bool ARMTargetLowering::isLegalICmpImmediate(int64_t Imm) const {
|
||||
// Thumb2 and ARM modes can use cmn for negative immediates.
|
||||
if (!Subtarget->isThumb())
|
||||
return ARM_AM::getSOImmVal(llvm::abs64(Imm)) != -1;
|
||||
return ARM_AM::getSOImmVal(std::abs(Imm)) != -1;
|
||||
if (Subtarget->isThumb2())
|
||||
return ARM_AM::getT2SOImmVal(llvm::abs64(Imm)) != -1;
|
||||
return ARM_AM::getT2SOImmVal(std::abs(Imm)) != -1;
|
||||
// Thumb1 doesn't have cmn, and only 8-bit immediates.
|
||||
return Imm >= 0 && Imm <= 255;
|
||||
}
|
||||
@ -10323,7 +10323,7 @@ bool ARMTargetLowering::isLegalICmpImmediate(int64_t Imm) const {
|
||||
/// immediate into a register.
|
||||
bool ARMTargetLowering::isLegalAddImmediate(int64_t Imm) const {
|
||||
// Same encoding for add/sub, just flip the sign.
|
||||
int64_t AbsImm = llvm::abs64(Imm);
|
||||
int64_t AbsImm = std::abs(Imm);
|
||||
if (!Subtarget->isThumb())
|
||||
return ARM_AM::getSOImmVal(AbsImm) != -1;
|
||||
if (Subtarget->isThumb2())
|
||||
|
Reference in New Issue
Block a user