[PATCH] D37975: [X86][SSE] Improve support for vselect(Cond, 0, X) -> ANDN(Cond, X)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 07:10:51 PDT 2017


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:30157-30159
+  // Cond value must be 'sign splat' to be converted to a logical op.
+  if (DAG.ComputeNumSignBits(Cond) != CondVT.getScalarSizeInBits())
+    return SDValue();
----------------
We might be able to remove the legality checks below here now that we have this, but I agree that the bigger cleanup is to make this semi-generic in DAGCombiner, so x86 won't need to do anything else for these patterns.


Repository:
  rL LLVM

https://reviews.llvm.org/D37975





More information about the llvm-commits mailing list