[llvm] [X86] abs i8 - perform as abs i32 if we have access to CMOV (PR #95101)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 08:24:02 PDT 2024


================
@@ -28211,9 +28212,14 @@ static SDValue LowerABS(SDValue Op, const X86Subtarget &Subtarget,
   MVT VT = Op.getSimpleValueType();
   SDLoc DL(Op);
 
+  // Since X86 does not have CMOV for 8-bit integer, promote to 32-bit.
+  if (VT == MVT::i8)
----------------
phoebewang wrote:

Should we limit to 64-bit only? I assume we will reduce the available registers by promotion.

https://github.com/llvm/llvm-project/pull/95101


More information about the llvm-commits mailing list