llvm/lib/Transforms
Craig Topper 0612ed0350 [InstCombine] Simplify binops that are only used by a select and are fed by a select with the same condition.
Summary:
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?

Reviewers: spatel, majnemer

Reviewed By: majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39999

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318267 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-15 05:23:02 +00:00
..