[llvm] [LegalizeTypes][AMDGPU]: Allow for scalarization of insert_subvector (PR #104236)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 22:33:38 PDT 2024


================
@@ -882,6 +885,16 @@ SDValue DAGTypeLegalizer::ScalarizeVecOp_CONCAT_VECTORS(SDNode *N) {
   return DAG.getBuildVector(N->getValueType(0), SDLoc(N), Ops);
 }
 
+/// The inserted subvector is to be scalarized - use insert vector element
+/// instead.
+SDValue DAGTypeLegalizer::ScalarizeVecOp_INSERT_SUBVECTOR(SDNode *N,
+                                                          unsigned OpNo) {
+  auto Elt = GetScalarizedVector(N->getOperand(OpNo));
+  auto VecOp = N->getOperand(1 - OpNo);
----------------
arsenm wrote:

No auto? VecOp could be a better name, since both of the operands are typically vectors 

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


More information about the llvm-commits mailing list