[llvm] [LegalizeVectorOps] Enable ExpandFABS/COPYSIGN to use integer ops for fixed vectors in some cases. (PR #109232)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 22:59:01 PDT 2024


================
@@ -1821,8 +1824,12 @@ SDValue VectorLegalizer::ExpandFABS(SDNode *Node) {
   EVT VT = Node->getValueType(0);
   EVT IntVT = VT.changeVectorElementTypeToInteger();
 
-  // FIXME: We shouldn't restrict this to scalable vectors.
-  if (!TLI.isOperationLegalOrCustom(ISD::AND, IntVT) || !VT.isScalableVector())
+  if (!TLI.isOperationLegalOrCustom(ISD::AND, IntVT))
+    return SDValue();
+
+  // FIXME: The FSUB check is here to force unrolling v1f64 vectors on AArch64.
----------------
arsenm wrote:

can you really not just delete this now? There are no more fsubs emitted 

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


More information about the llvm-commits mailing list