[llvm] [LLVM][CodeGen] Add lowering for scalable vector bfloat operations. (PR #109803)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 08:39:52 PDT 2024
================
@@ -11917,3 +11923,38 @@ bool TargetLowering::LegalizeSetCCCondCode(SelectionDAG &DAG, EVT VT,
}
return false;
}
+
+SDValue TargetLowering::expandVectorNaryOpBySplitting(SDNode *Node,
+ SelectionDAG &DAG) const {
+ EVT VT = Node->getValueType(0);
+ // Despite its documentation, GetSplitDestVTs will assert if VT cannot be
+ // split into two equal parts.
+ if (!VT.isVector() || !VT.getVectorElementCount().isKnownMultipleOf(2))
+ return SDValue();
+
+ EVT LoVT, HiVT;
+ std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(VT);
----------------
huntergr-arm wrote:
Not a request, more of an style option to match the use of auto elsewhere in the patch for you to consider.
```suggestion
auto [LoVT, HiVT] = DAG.GetSplitDestVTs(VT);
```
That lets you get rid of the separate declaration line.
https://github.com/llvm/llvm-project/pull/109803
More information about the llvm-commits
mailing list