[PATCH] D31944: [DAGCombiner] add (sext i1 X), 1 --> zext (not i1 X)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 09:03:50 PDT 2017


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

Besides better codegen, the motivation is to be able to canonicalize this pattern in IR (currently we don't) knowing that the backend is prepared for that.

This may also allow removing code for special constant cases in DAGCombiner::foldSelectOfConstants() that was added in https://reviews.llvm.org/D30180.


https://reviews.llvm.org/D31944

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/ARM/bool-ext-inc.ll
  test/CodeGen/X86/bool-ext-inc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31944.94837.patch
Type: text/x-patch
Size: 4198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/cd5c94df/attachment.bin>


More information about the llvm-commits mailing list