[PATCH] D34437: [InstCombine] Don't let folding (select (icmp eq (and X, C1), 0), Y, (or Y, C2)) create more instructions than it removes
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 23:16:07 PDT 2017
craig.topper created this revision.
Previously this folding had no checks to see if it was going to result in less instructions. This was pointed out during the review of https://reviews.llvm.org/D34184
This patch adds code to count how many instructions its going to create vs how many its going to remove so we can make a proper decision.
https://reviews.llvm.org/D34437
Files:
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select-with-bitwise-ops.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34437.103321.patch
Type: text/x-patch
Size: 7072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170621/5d4b9594/attachment.bin>
More information about the llvm-commits
mailing list