[PATCH] D110059: [SelectionDAG] Add PromoteIntOp_INSERT_SUBVECTOR.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 16:22:57 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:5089
+  SDValue Idx = N->getOperand(2);
+  EVT PromVT = V0.getValueType().changeVectorElementType(
+      V1.getValueType().getVectorElementType());
----------------
I have a bit of distrust for changeVectorElementType. If V0.getValueType() is representable as an MVT, but the promoted type isn't, it will fail. It branches a between an MVT code path and EVT path internally. The MVT path would require an LLVMContext to produce an EVT which it can't get so it will assert.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110059/new/

https://reviews.llvm.org/D110059



More information about the llvm-commits mailing list