Evan Cheng | ad75364 | 2012-05-18 01:33:51 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-macosx -pre-RA-sched=source | FileCheck %s |
| 2 | |
| 3 | ; Teach two-address pass to update the "source" map so it doesn't perform a |
| 4 | ; non-profitable commute using outdated info. The test case would still fail |
| 5 | ; because of poor pre-RA schedule. That will be fixed by MI scheduler. |
| 6 | ; rdar://11472010 |
| 7 | define i32 @t(i32 %mask) nounwind readnone ssp { |
| 8 | entry: |
| 9 | ; CHECK: t: |
| 10 | ; CHECK-NOT: mov |
| 11 | %sub = add i32 %mask, -65535 |
| 12 | %shr = lshr i32 %sub, 23 |
| 13 | %and = and i32 %mask, 1 |
| 14 | %add = add i32 %shr, %and |
| 15 | ret i32 %add |
| 16 | } |