1 ; RUN: llc < %s -march=xcore -asm-verbose=0 | FileCheck %s
2 define i32 @ashr(i32 %a, i32 %b) {
7 ; CHECK-NEXT: ashr r0, r0, r1
9 define i32 @ashri1(i32 %a) {
14 ; CHECK-NEXT: ashr r0, r0, 24
16 define i32 @ashri2(i32 %a) {
21 ; CHECK-NEXT: ashr r0, r0, 32
23 define i32 @f1(i32 %a) {
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) {
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) {
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, 10
58 define i32 @f4(i32 %a) {
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, 17
69 define i32 @f5(i32 %a) {
70 %1 = icmp sge i32 %a, 0
71 %2 = zext i1 %1 to i32
75 ; CHECK-NEXT: ashr r0, r0, 32
76 ; CHECK-NEXT: eq r0, r0, 0