[PATCH] D38022: [X86] Convert X86ISD::SELECT to ISD::VSELECT just before instruction selection to avoid duplicate patterns

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 00:37:57 PDT 2017


craig.topper added a comment.

I did remove the usages from the td patterns. It wasn't used in very many places.

The true side of the ternary in this code also looks dead. We never get this far for vector types. So we never select X86ISD::SELECT. But its not strictly related to the goal of this patch.

  if (Subtarget.hasAVX512()) {
    SDValue Cmp = DAG.getNode(X86ISD::FSETCCM, DL, MVT::v1i1, CondOp0,
                              CondOp1, DAG.getConstant(SSECC, DL, MVT::i8));
    return DAG.getNode(VT.isVector() ? X86ISD::SELECT : X86ISD::SELECTS,
                       DL, VT, Cmp, Op1, Op2);
  }


https://reviews.llvm.org/D38022





More information about the llvm-commits mailing list