blob: 171c3f18dc8bc2cf39ef7fce7032758f6cc93c3a [file] [log] [blame]
Evan Chengad753642012-05-18 01:33:51 +00001; 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
7define i32 @t(i32 %mask) nounwind readnone ssp {
8entry:
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}