AArch64: Silence -Wabsolute-value warning with std::abs
[oota-llvm.git] / lib / Target / AArch64 / AArch64ISelLowering.cpp
index 05a6ade726229dbd32159d2a5a6f23a4f7a80712..5357b7228bdbde1b601cd9f8dc3db28ddb70543a 100644 (file)
@@ -7939,7 +7939,8 @@ bool checkValueWidth(SDValue V, unsigned width, ISD::LoadExtType &ExtType) {
   }
   case ISD::Constant:
   case ISD::TargetConstant: {
-    if(abs(cast<ConstantSDNode>(V.getNode())->getSExtValue()) < 1<<(width-1))
+    if (std::abs(cast<ConstantSDNode>(V.getNode())->getSExtValue()) <
+        1 << (width - 1))
       return true;
     return false;
   }