[PATCH] D36511: [SelectionDAG] When scalarizing vselect, don't assert on a legal cond operand.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 07:47:07 PDT 2017


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM, with one minor.

PS - nothing to do with this patch but those mask vector shifts are awful.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14538
+  // Lower these into extract_vector_elt which is already selectable.
+  if (Subtarget.hasAVX512() && ResVT == MVT::v1i1) {
+    MVT EltVT = ResVT.getVectorElementType();
----------------
Maybe better to assert that we only got here with AVX512:
```
if (ResVT == MVT::v1i1) {
  assert(Subtarget.hasAVX512() && "Boolean EXTRACT_SUBVECTOR requires AVX512")
  ...
```


https://reviews.llvm.org/D36511





More information about the llvm-commits mailing list