1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
; RUN: not llc --mtriple=loongarch32 < %s 2>&1 | FileCheck %s
declare void @llvm.loongarch.cacop.w(i32, i32, i32)
declare i32 @llvm.loongarch.crc.w.b.w(i32, i32)
declare i32 @llvm.loongarch.crc.w.h.w(i32, i32)
declare i32 @llvm.loongarch.crc.w.w.w(i32, i32)
declare i32 @llvm.loongarch.crc.w.d.w(i64, i32)
declare i32 @llvm.loongarch.crcc.w.b.w(i32, i32)
declare i32 @llvm.loongarch.crcc.w.h.w(i32, i32)
declare i32 @llvm.loongarch.crcc.w.w.w(i32, i32)
declare i32 @llvm.loongarch.crcc.w.d.w(i64, i32)
declare i64 @llvm.loongarch.csrrd.d(i32 immarg)
declare i64 @llvm.loongarch.csrwr.d(i64, i32 immarg)
declare i64 @llvm.loongarch.csrxchg.d(i64, i64, i32 immarg)
declare i64 @llvm.loongarch.iocsrrd.d(i32)
declare void @llvm.loongarch.iocsrwr.d(i64, i32)
declare void @llvm.loongarch.asrtle.d(i64, i64)
declare void @llvm.loongarch.asrtgt.d(i64, i64)
declare i64 @llvm.loongarch.lddir.d(i64, i64 immarg)
declare void @llvm.loongarch.ldpte.d(i64, i64 immarg)
define void @cacop_arg0_out_of_hi_range(i32 %a) nounwind {
; CHECK: argument to 'llvm.loongarch.cacop.w' out of range
entry:
call void @llvm.loongarch.cacop.w(i32 32, i32 %a, i32 1024)
ret void
}
define void @cacop_arg0_out_of_lo_range(i32 %a) nounwind {
; CHECK: argument to 'llvm.loongarch.cacop.w' out of range
entry:
call void @llvm.loongarch.cacop.w(i32 -1, i32 %a, i32 1024)
ret void
}
define void @cacop_arg2_out_of_hi_range(i32 %a) nounwind {
; CHECK: argument to 'llvm.loongarch.cacop.w' out of range
entry:
call void @llvm.loongarch.cacop.w(i32 1, i32 %a, i32 4096)
ret void
}
define void @cacop_arg2_out_of_lo_range(i32 %a) nounwind {
; CHECK: argument to 'llvm.loongarch.cacop.w' out of range
entry:
call void @llvm.loongarch.cacop.w(i32 1, i32 %a, i32 -4096)
ret void
}
define i32 @crc_w_b_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crc.w.b.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crc.w.b.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crc_w_h_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crc.w.h.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crc.w.h.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crc_w_w_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crc.w.w.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crc.w.w.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crc_w_d_w(i64 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crc.w.d.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crc.w.d.w(i64 %a, i32 %b)
ret i32 %res
}
define i32 @crcc_w_b_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crcc.w.b.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crcc.w.b.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crcc_w_h_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crcc.w.h.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crcc.w.h.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crcc_w_w_w(i32 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crcc.w.w.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crcc.w.w.w(i32 %a, i32 %b)
ret i32 %res
}
define i32 @crcc_w_d_w(i64 %a, i32 %b) nounwind {
; CHECK: llvm.loongarch.crcc.w.d.w requires target: loongarch64
entry:
%res = call i32 @llvm.loongarch.crcc.w.d.w(i64 %a, i32 %b)
ret i32 %res
}
define i64 @csrrd_d() {
; CHECK: llvm.loongarch.csrrd.d requires target: loongarch64
entry:
%0 = tail call i64 @llvm.loongarch.csrrd.d(i32 1)
ret i64 %0
}
define i64 @csrwr_d(i64 %a) {
; CHECK: llvm.loongarch.csrwr.d requires target: loongarch64
entry:
%0 = tail call i64 @llvm.loongarch.csrwr.d(i64 %a, i32 1)
ret i64 %0
}
define i64 @csrxchg_d(i64 %a, i64 %b) {
; CHECK: llvm.loongarch.csrxchg.d requires target: loongarch64
entry:
%0 = tail call i64 @llvm.loongarch.csrxchg.d(i64 %a, i64 %b, i32 1)
ret i64 %0
}
define i64 @iocsrrd_d(i32 %a) {
; CHECK: llvm.loongarch.iocsrrd.d requires target: loongarch64
entry:
%0 = tail call i64 @llvm.loongarch.iocsrrd.d(i32 %a)
ret i64 %0
}
define void @iocsrwr_d(i64 %a, i32 signext %b) {
; CHECK: llvm.loongarch.iocsrwr.d requires target: loongarch64
entry:
tail call void @llvm.loongarch.iocsrwr.d(i64 %a, i32 %b)
ret void
}
define void @asrtle_d(i64 %a, i64 %b) {
; CHECK: llvm.loongarch.asrtle.d requires target: loongarch64
entry:
tail call void @llvm.loongarch.asrtle.d(i64 %a, i64 %b)
ret void
}
define void @asrtgt_d(i64 %a, i64 %b) {
; CHECK: llvm.loongarch.asrtgt.d requires target: loongarch64
entry:
tail call void @llvm.loongarch.asrtgt.d(i64 %a, i64 %b)
ret void
}
define i64 @lddir_d(i64 %a) {
; CHECK: llvm.loongarch.lddir.d requires target: loongarch64
entry:
%0 = tail call i64 @llvm.loongarch.lddir.d(i64 %a, i64 1)
ret i64 %0
}
define void @ldpte_d(i64 %a) {
; CHECK: llvm.loongarch.ldpte.d requires target: loongarch64
entry:
tail call void @llvm.loongarch.ldpte.d(i64 %a, i64 1)
ret void
}
|