1 ; RUN: llc < %s -march=xcore | FileCheck %s
4 declare i32 @llvm.xcore.bitrev(i32)
5 declare i32 @llvm.xcore.crc32(i32, i32, i32)
6 declare %0 @llvm.xcore.crc8(i32, i32, i32)
7 declare i32 @llvm.xcore.zext(i32, i32)
8 declare i32 @llvm.xcore.sext(i32, i32)
9 declare i32 @llvm.xcore.geted()
10 declare i32 @llvm.xcore.getet()
12 define i32 @bitrev(i32 %val) {
13 ; CHECK-LABEL: bitrev:
14 ; CHECK: bitrev r0, r0
15 %result = call i32 @llvm.xcore.bitrev(i32 %val)
19 define i32 @crc32(i32 %crc, i32 %data, i32 %poly) {
21 ; CHECK: crc32 r0, r1, r2
22 %result = call i32 @llvm.xcore.crc32(i32 %crc, i32 %data, i32 %poly)
26 define %0 @crc8(i32 %crc, i32 %data, i32 %poly) {
28 ; CHECK: crc8 r0, r1, r1, r2
29 %result = call %0 @llvm.xcore.crc8(i32 %crc, i32 %data, i32 %poly)
33 define i32 @zext(i32 %a, i32 %b) {
36 %result = call i32 @llvm.xcore.zext(i32 %a, i32 %b)
40 define i32 @zexti(i32 %a) {
43 %result = call i32 @llvm.xcore.zext(i32 %a, i32 4)
47 define i32 @sext(i32 %a, i32 %b) {
50 %result = call i32 @llvm.xcore.sext(i32 %a, i32 %b)
54 define i32 @sexti(i32 %a) {
57 %result = call i32 @llvm.xcore.sext(i32 %a, i32 4)
64 ; CHECK-NEXT: mov r0, r11
65 %result = call i32 @llvm.xcore.geted()
72 ; CHECK-NEXT: mov r0, r11
73 %result = call i32 @llvm.xcore.getet()