[PATCH] D35566: [DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 13:19:24 PDT 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15643
+        if (VT.getVectorNumElements() != InVecT.getVectorNumElements()) {
+          MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
+          SDValue ZeroIdx = DAG.getConstant(0, SDLoc(N), IdxTy);
----------------
I think you need to verify that VT and InVecT have the same element type here?


https://reviews.llvm.org/D35566





More information about the llvm-commits mailing list