[PATCH] D39999: [InstCombine] Simplify binops that are only used by a select and are fed by a select with the same condition.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 22:50:23 PST 2017
craig.topper created this revision.
This patch optimizes a binop sandwiched between 2 selects with the same condition. Since we know its only used by the select we can propagate the appropriate input value from the earlier select.
As I'm writing this I realize I may need to avoid doing this for division in case the select was protecting a divide by zero?
https://reviews.llvm.org/D39999
Files:
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39999.122776.patch
Type: text/x-patch
Size: 4011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/e16e6eb2/attachment.bin>
More information about the llvm-commits
mailing list