Quentin Colombet 2c6ef1c433 [InstCombiner] Expose opportunities to merge subtract and comparison.
Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:56:48 +00:00
..
2013-08-28 23:04:41 +00:00
2013-07-09 07:50:59 +00:00
2013-08-28 23:04:41 +00:00
2013-07-09 22:01:22 +00:00
2013-08-12 12:43:26 +00:00
2013-08-19 21:40:31 +00:00
2013-08-28 23:04:41 +00:00
2013-08-21 19:53:10 +00:00
2013-08-28 23:04:41 +00:00
2013-08-28 23:04:41 +00:00

This directory contains test cases for the instcombine transformation.  The
dated tests are actual bug tests, whereas the named tests are used to test
for features that the this pass should be capable of performing.