1 ; RUN: llc < %s -march=xcore -asm-verbose=0 | FileCheck %s
2 define i32 @ashr(i32 %a, i32 %b) nounwind {
7 ; CHECK-NEXT: ashr r0, r0, r1
9 define i32 @ashri1(i32 %a) nounwind {
13 ; CHECK-LABEL: ashri1:
14 ; CHECK-NEXT: ashr r0, r0, 24
16 define i32 @ashri2(i32 %a) nounwind {
20 ; CHECK-LABEL: ashri2:
21 ; CHECK-NEXT: ashr r0, r0, 32
23 define i32 @f1(i32 %a) nounwind nounwind {
24 %1 = icmp slt i32 %a, 0
25 br i1 %1, label %less, label %not_less
32 ; CHECK-NEXT: ashr r0, r0, 32
35 define i32 @f2(i32 %a) nounwind {
36 %1 = icmp sge i32 %a, 0
37 br i1 %1, label %greater, label %not_greater
44 ; CHECK-NEXT: ashr r0, r0, 32
47 define i32 @f3(i32 %a) nounwind {
48 %1 = icmp slt i32 %a, 0
49 %2 = select i1 %1, i32 10, i32 17
53 ; CHECK-NEXT: ashr r0, r0, 32
55 ; CHECK-NEXT: ldc r0, 17
58 define i32 @f4(i32 %a) nounwind {
59 %1 = icmp sge i32 %a, 0
60 %2 = select i1 %1, i32 10, i32 17
64 ; CHECK-NEXT: ashr r0, r0, 32
66 ; CHECK-NEXT: ldc r0, 10
69 define i32 @f5(i32 %a) nounwind {
70 %1 = icmp sge i32 %a, 0
71 %2 = zext i1 %1 to i32
75 ; CHECK-NEXT: not r0, r0
76 ; CHECK-NEXT: mkmsk r1, 5
77 ; CHECK-NEXT: shr r0, r0, r1