blob: 881fa37f99cb8c0e402cf6f9528bc564078d04ca [file] [log] [blame]
Evan Cheng22d405f2012-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:
Stephen Lind24ab202013-07-14 06:24:09 +00009; CHECK-LABEL: t:
Evan Cheng22d405f2012-05-18 01:33:51 +000010; 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}