blob: 5cfd3f5198b742b98aa4ddfbd11ab3ee264d91ef [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=thumb -mattr=+thumb2
David Goodwin7cdd24c2009-07-28 17:06:49 +00002
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}