[PATCH] D32230: [DAG] add splat vector support for 'and' in SimplifyDemandedBits

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 08:53:03 PDT 2017


spatel created this revision.
Herald added a subscriber: mcrosier.

The patch itself is simple: stop discriminating against vectors in visitAnd() and again in SimplifyDemandedBits().

Some notes for reference:

1. We're not consistent about calls to SimplifyDemandedBits in the various visitXXX functions. Sometimes, we check if the RHS is a constant first. Other times (like here), we just dive in.
2. I'd like to break the vector shackles in steps for the sake of risk minimization, but we could make similar simultaneous changes in other places if we think that would be better.
3. I don't know what the intent of the tests in this patch was supposed to be, but since they wiggled in a positive way, I'm just going with that. :)
4. In the rotate tests, note that we can see through non-splat constants. This is a result of https://reviews.llvm.org/D24253.
5. My motivation for being here now is to make https://reviews.llvm.org/D31944 look better, so this is step 1 of N towards improving the vector codegen in that patch without writing any actual new code.


https://reviews.llvm.org/D32230

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  test/CodeGen/X86/avx512-ext.ll
  test/CodeGen/X86/vector-rotate-128.ll
  test/CodeGen/X86/vector-rotate-256.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32230.95762.patch
Type: text/x-patch
Size: 6283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170419/715b755b/attachment.bin>


More information about the llvm-commits mailing list