[llvm-commits] [llvm] r154199 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Chandler Carruth
chandlerc at gmail.com
Fri Apr 6 13:10:52 PDT 2012
Author: chandlerc
Date: Fri Apr 6 15:10:52 2012
New Revision: 154199
URL: http://llvm.org/viewvc/llvm-project?rev=154199&view=rev
Log:
There is no portable std::abs overload for int64_t, use the llvm::abs64
which exists for this purpose.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=154199&r1=154198&r2=154199&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Apr 6 15:10:52 2012
@@ -8616,9 +8616,9 @@
bool ARMTargetLowering::isLegalICmpImmediate(int64_t Imm) const {
// Thumb2 and ARM modes can use cmn for negative immediates.
if (!Subtarget->isThumb())
- return ARM_AM::getSOImmVal(std::abs(Imm)) != -1;
+ return ARM_AM::getSOImmVal(llvm::abs64(Imm)) != -1;
if (Subtarget->isThumb2())
- return ARM_AM::getT2SOImmVal(std::abs(Imm)) != -1;
+ return ARM_AM::getT2SOImmVal(llvm::abs64(Imm)) != -1;
// Thumb1 doesn't have cmn, and only 8-bit immediates.
return Imm >= 0 && Imm <= 255;
}
More information about the llvm-commits
mailing list