[PATCH] D36393: [DAGCombiner] Simplify shuffle mask index if the referenced input element is UNDEF

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 10:51:30 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15130
+    int Idx = SVN->getMaskElt(i);
+    if (BV0 && 0 <= Idx && Idx < (int)NumElts &&
+        BV0->getOperand(Idx).isUndef()) {
----------------
zvi wrote:
> Do the affected tests cover both the 'if' and the 'else'?
Not properly, I'll add some extra tests


Repository:
  rL LLVM

https://reviews.llvm.org/D36393





More information about the llvm-commits mailing list