[PATCH] D36650: [X86] WIP support narrowing operations when only a subvector is demanded

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 13 06:22:44 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:35535
+    }
+  }
+
----------------
Should this be in DAGCombiner protected with a isExtractSubvectorCheap call?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:35587
+    auto *Idx2 = dyn_cast<ConstantSDNode>(SubVec.getOperand(2));
+    if (Idx2 && Idx2->getZExtValue() == 0) {
+      return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, OpVT, Vec,
----------------
Minor observation, we're assuming constant index above (IdxVal), but here we're checking for it.


https://reviews.llvm.org/D36650





More information about the llvm-commits mailing list