[PATCH] D27489: [DAG] allow more select folding for targets that have 'and not' (PR31175)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 15:30:32 PST 2016


spatel created this revision.
spatel added reviewers: mcrosier, evandro, efriedma.
spatel added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.

The original motivation for this patch comes from wanting to canonicalize more IR to selects and also canonicalizing min/max.

If we're going to do that, we need more backend fixups to undo select codegen when simpler ops will do. I chose AArch64 for the tests because that shows the difference in the simplest way. This should fix:
https://llvm.org/bugs/show_bug.cgi?id=31175


https://reviews.llvm.org/D27489

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/arm64-icmp-opt.ll
  test/CodeGen/AArch64/selectcc-to-shiftand.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27489.80495.patch
Type: text/x-patch
Size: 5717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/d79e6ace/attachment.bin>


More information about the llvm-commits mailing list