[X86] Update test/CodeGen/X86/avg.ll with the help of update_llc_test_checks.py....
[oota-llvm.git] / test / CodeGen / X86 / 2012-05-17-TwoAddressBug.ll
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-LABEL: 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 }