[llvm] [llvm] Adding scalarization of `llvm.vector.insert` (PR #71614)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 00:41:36 PST 2023


================
@@ -5891,8 +5910,11 @@ SDValue DAGTypeLegalizer::WidenVecRes_SETCC(SDNode *N) {
     InOp1 = GetWidenedVector(InOp1);
     InOp2 = GetWidenedVector(InOp2);
   } else {
-    InOp1 = DAG.WidenVector(InOp1, SDLoc(N));
-    InOp2 = DAG.WidenVector(InOp2, SDLoc(N));
+    do {
----------------
arsenm wrote:

I think the correct way to handle this is by inserting an explicit conversion instruction from the widened v2f16 to match v4f16. i.e. create a new INSERT_SUBVECTOR v4f16:undef, (v2f16 GetWidenedVector), 0

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


More information about the llvm-commits mailing list