[PATCH] D43367: [X86] Turn selects with constant condition into vector shuffles during DAG combine

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 15:35:39 PST 2018


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

LGTM.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:31553
+      Mask[i] = i;
+      if (CondElt.isUndef() || isNullConstant(CondElt))
+        Mask[i] += Size;
----------------
This could use a comment like:
Arbitrarily choose from the 2nd operand if the select condition element is undef. 
TODO: Can we do better by matching patterns such as even/odd?


https://reviews.llvm.org/D43367





More information about the llvm-commits mailing list