1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -march=xcore | FileCheck %s
4 declare i8 @llvm.bitreverse.i8(i8)
5 declare i16 @llvm.bitreverse.i16(i16)
6 declare i32 @llvm.bitreverse.i32(i32)
7 declare i64 @llvm.bitreverse.i64(i64)
9 define i8 @bitrev8(i8 %x) nounwind {
10 ; CHECK-LABEL: bitrev8:
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: bitrev r0, r0
13 ; CHECK-NEXT: shr r0, r0, 24
15 ; CHECK-NEXT: .cc_bottom bitrev8.function
17 %0 = call i8 @llvm.bitreverse.i8(i8 %x)
21 define i16 @bitrev16(i16 %x) nounwind {
22 ; CHECK-LABEL: bitrev16:
23 ; CHECK: # %bb.0: # %entry
24 ; CHECK-NEXT: bitrev r0, r0
25 ; CHECK-NEXT: shr r0, r0, 16
27 ; CHECK-NEXT: .cc_bottom bitrev16.function
29 %0 = call i16 @llvm.bitreverse.i16(i16 %x)
33 define i32 @bitrev32(i32 %x) nounwind {
34 ; CHECK-LABEL: bitrev32:
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: bitrev r0, r0
38 ; CHECK-NEXT: .cc_bottom bitrev32.function
40 %0 = call i32 @llvm.bitreverse.i32(i32 %x)
44 define i64 @bitrev64(i64 %x) nounwind {
45 ; CHECK-LABEL: bitrev64:
46 ; CHECK: # %bb.0: # %entry
47 ; CHECK-NEXT: bitrev r2, r1
48 ; CHECK-NEXT: bitrev r1, r0
49 ; CHECK-NEXT: mov r0, r2
51 ; CHECK-NEXT: .cc_bottom bitrev64.function
53 %0 = call i64 @llvm.bitreverse.i64(i64 %x)