[PATCH] D37017: [DAGCombiner] fold assertzexts separated by trunc
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 11:43:46 PDT 2017
spatel updated this revision to Diff 113565.
spatel added a reviewer: efriedma.
spatel added a comment.
Herald added a subscriber: sdardis.
Patch updated:
After finding that the same functionality exists in trunk, I think it makes sense to go ahead with this patch. Effectively, we're just taking a general fold that was hiding in the Mips backend and applying it to all targets.
Also, given that there is already another fold for assertzext(assertzext(x)), I assume there's already some scenario under which it makes sense to have folds for these nodes besides the one we're looking at. Therefore, there's not much benefit to trying to stub this pattern out at the source. We just account for the potential inefficiency in argument lowering with this fold.
https://reviews.llvm.org/D37017
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/Mips/MipsISelLowering.cpp
test/CodeGen/X86/bool-zext.ll
test/CodeGen/X86/critical-edge-split-2.ll
test/CodeGen/X86/fp128-select.ll
test/CodeGen/X86/illegal-bitfield-loadstore.ll
test/CodeGen/X86/mask-negated-bool.ll
test/CodeGen/X86/negate-i1.ll
test/CodeGen/X86/select_const.ll
test/CodeGen/X86/sext-i1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37017.113565.patch
Type: text/x-patch
Size: 13482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170901/facad860/attachment.bin>
More information about the llvm-commits
mailing list