1 ; RUN: llc < %s -march=xcore | FileCheck %s 2 %0 = type { i32, i32 } 3 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 10 define i32 @bitrev(i32 %val) { 11 ; CHECK: bitrev: 12 ; CHECK: bitrev r0, r0 13 %result = call i32 @llvm.xcore.bitrev(i32 %val) 14 ret i32 %result 15 } 16 17 define i32 @crc32(i32 %crc, i32 %data, i32 %poly) { 18 ; CHECK: crc32: 19 ; CHECK: crc32 r0, r1, r2 20 %result = call i32 @llvm.xcore.crc32(i32 %crc, i32 %data, i32 %poly) 21 ret i32 %result 22 } 23 24 define %0 @crc8(i32 %crc, i32 %data, i32 %poly) { 25 ; CHECK: crc8: 26 ; CHECK: crc8 r0, r1, r1, r2 27 %result = call %0 @llvm.xcore.crc8(i32 %crc, i32 %data, i32 %poly) 28 ret %0 %result 29 } 30 31 define i32 @zext(i32 %a, i32 %b) { 32 ; CHECK: zext: 33 ; CHECK: zext r0, r1 34 %result = call i32 @llvm.xcore.zext(i32 %a, i32 %b) 35 ret i32 %result 36 } 37 38 define i32 @zexti(i32 %a) { 39 ; CHECK: zexti: 40 ; CHECK: zext r0, 4 41 %result = call i32 @llvm.xcore.zext(i32 %a, i32 4) 42 ret i32 %result 43 } 44 45 define i32 @sext(i32 %a, i32 %b) { 46 ; CHECK: sext: 47 ; CHECK: sext r0, r1 48 %result = call i32 @llvm.xcore.sext(i32 %a, i32 %b) 49 ret i32 %result 50 } 51 52 define i32 @sexti(i32 %a) { 53 ; CHECK: sexti: 54 ; CHECK: sext r0, 4 55 %result = call i32 @llvm.xcore.sext(i32 %a, i32 4) 56 ret i32 %result 57 } 58