1; RUN: llc < %s -march=xcore | FileCheck %s 2%0 = type { i32, i32 } 3 4declare i32 @llvm.xcore.bitrev(i32) 5declare i32 @llvm.xcore.crc32(i32, i32, i32) 6declare %0 @llvm.xcore.crc8(i32, i32, i32) 7declare i32 @llvm.xcore.zext(i32, i32) 8declare i32 @llvm.xcore.sext(i32, i32) 9declare i32 @llvm.xcore.geted() 10declare i32 @llvm.xcore.getet() 11 12define i32 @bitrev(i32 %val) { 13; CHECK-LABEL: bitrev: 14; CHECK: bitrev r0, r0 15 %result = call i32 @llvm.xcore.bitrev(i32 %val) 16 ret i32 %result 17} 18 19define i32 @crc32(i32 %crc, i32 %data, i32 %poly) { 20; CHECK-LABEL: crc32: 21; CHECK: crc32 r0, r1, r2 22 %result = call i32 @llvm.xcore.crc32(i32 %crc, i32 %data, i32 %poly) 23 ret i32 %result 24} 25 26define %0 @crc8(i32 %crc, i32 %data, i32 %poly) { 27; CHECK-LABEL: crc8: 28; CHECK: crc8 r0, r1, r1, r2 29 %result = call %0 @llvm.xcore.crc8(i32 %crc, i32 %data, i32 %poly) 30 ret %0 %result 31} 32 33define i32 @zext(i32 %a, i32 %b) { 34; CHECK-LABEL: zext: 35; CHECK: zext r0, r1 36 %result = call i32 @llvm.xcore.zext(i32 %a, i32 %b) 37 ret i32 %result 38} 39 40define i32 @zexti(i32 %a) { 41; CHECK-LABEL: zexti: 42; CHECK: zext r0, 4 43 %result = call i32 @llvm.xcore.zext(i32 %a, i32 4) 44 ret i32 %result 45} 46 47define i32 @sext(i32 %a, i32 %b) { 48; CHECK-LABEL: sext: 49; CHECK: sext r0, r1 50 %result = call i32 @llvm.xcore.sext(i32 %a, i32 %b) 51 ret i32 %result 52} 53 54define i32 @sexti(i32 %a) { 55; CHECK-LABEL: sexti: 56; CHECK: sext r0, 4 57 %result = call i32 @llvm.xcore.sext(i32 %a, i32 4) 58 ret i32 %result 59} 60 61define i32 @geted() { 62; CHECK-LABEL: geted: 63; CHECK: get r11, ed 64; CHECK-NEXT: mov r0, r11 65 %result = call i32 @llvm.xcore.geted() 66 ret i32 %result 67} 68 69define i32 @getet() { 70; CHECK-LABEL: getet: 71; CHECK: get r11, et 72; CHECK-NEXT: mov r0, r11 73 %result = call i32 @llvm.xcore.getet() 74 ret i32 %result 75} 76