blob: 9bc4b5b7c511c293ed499b1127d570ce108e3a24 [file] [log] [blame]
David Goodwin7cdd24c2009-07-28 17:06:49 +00001; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2
2
3define i1 @test1(i64 %poscnt, i32 %work) {
4entry:
David Goodwin1f697672009-07-30 21:38:40 +00005; CHECK: rrx r0, r0
David Goodwin7cdd24c2009-07-28 17:06:49 +00006; CHECK: lsrs.w r1, r1, #1
7 %0 = lshr i64 %poscnt, 1
8 %1 = icmp eq i64 %0, 0
9 ret i1 %1
10}
11
12define i1 @test2(i64 %poscnt, i32 %work) {
13entry:
David Goodwin1f697672009-07-30 21:38:40 +000014; CHECK: rrx r0, r0
David Goodwin7cdd24c2009-07-28 17:06:49 +000015; CHECK: asrs.w r1, r1, #1
16 %0 = ashr i64 %poscnt, 1
17 %1 = icmp eq i64 %0, 0
18 ret i1 %1
19}