[PATCH] D68359: [LegalizeTypes][X86] When splitting a vselect for type legalization, don't split a setcc condition if the setcc input is legal and vXi1 conditions are supported

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 08:21:20 PDT 2019


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp:529-531
+      if (Cond.getValueType().getVectorElementType() == MVT::i1 &&
+          isTypeLegal(CondLHSVT) &&
+          getSetCCResultType(CondLHSVT) == Cond.getValueType())
----------------
spatel wrote:
> I'm not familiar with how we make this kind of choice, but we could leave off the MVT::i1 clause and get the same results.
> Ie, if the setcc has legal types and result, then it's a legal op independent of the exact vector element type?
I think if the cond doesn’t have an i1 type then it’s likely  the same size as the result type we’re splitting. But always has int type. Assuming that all same size  vectors need to be split, then it hits the case above.


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

https://reviews.llvm.org/D68359





More information about the llvm-commits mailing list