diff options
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-lsr3.ll')
-rw-r--r-- | test/CodeGen/Thumb2/thumb2-lsr3.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-lsr3.ll b/test/CodeGen/Thumb2/thumb2-lsr3.ll new file mode 100644 index 0000000000000..5cfd3f5198b74 --- /dev/null +++ b/test/CodeGen/Thumb2/thumb2-lsr3.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s -march=thumb -mattr=+thumb2 + +define i1 @test1(i64 %poscnt, i32 %work) { +entry: +; CHECK: rrx r0, r0 +; CHECK: lsrs.w r1, r1, #1 + %0 = lshr i64 %poscnt, 1 + %1 = icmp eq i64 %0, 0 + ret i1 %1 +} + +define i1 @test2(i64 %poscnt, i32 %work) { +entry: +; CHECK: rrx r0, r0 +; CHECK: asrs.w r1, r1, #1 + %0 = ashr i64 %poscnt, 1 + %1 = icmp eq i64 %0, 0 + ret i1 %1 +} |