Evan Cheng d99d68bcee Fix two-address pass's aggressive instruction commuting heuristics. It's meant
to catch cases like:
 %reg1024<def> = MOV r1
 %reg1025<def> = MOV r0
 %reg1026<def> = ADD %reg1024, %reg1025
 r0            = MOV %reg1026

By commuting ADD, it let coalescer eliminate all of the copies. However, there
was a bug in the heuristics where it ended up commuting the ADD in:

 %reg1024<def> = MOV r0
 %reg1025<def> = MOV 0
 %reg1026<def> = ADD %reg1024, %reg1025
 r0            = MOV %reg1026

That did no benefit but rather ensure the last MOV would not be coalesced.

rdar://11355268


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156048 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 01:45:13 +00:00
..
2011-11-23 04:03:08 +00:00
2012-01-27 02:31:29 +00:00
2012-01-05 00:43:34 +00:00
2012-02-02 19:00:49 +00:00
2012-03-20 17:20:46 +00:00
2012-02-02 19:00:49 +00:00
2012-01-05 00:43:34 +00:00
2012-02-18 00:05:45 +00:00
2011-11-15 07:13:03 +00:00
2011-11-22 06:36:25 +00:00
2011-12-08 19:21:39 +00:00
2012-05-02 15:24:32 +00:00
2012-04-20 23:36:09 +00:00
2012-01-19 01:13:47 +00:00
2012-03-30 00:26:54 +00:00