xref: /llvm-project/llvm/test/CodeGen/LoongArch/lsx/intrinsic-ldi-invalid-imm.ll (revision 0c76f46ca676ebecbdf2c9f7e8b05421a234bbed)
1; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s
2
3declare <2 x i64> @llvm.loongarch.lsx.vldi(i32)
4
5define <2 x i64> @lsx_vldi_lo() nounwind {
6; CHECK: llvm.loongarch.lsx.vldi: argument out of range
7entry:
8  %res = call <2 x i64> @llvm.loongarch.lsx.vldi(i32 -4097)
9  ret <2 x i64> %res
10}
11
12define <2 x i64> @lsx_vldi_hi() nounwind {
13; CHECK: llvm.loongarch.lsx.vldi: argument out of range
14entry:
15  %res = call <2 x i64> @llvm.loongarch.lsx.vldi(i32 4096)
16  ret <2 x i64> %res
17}
18
19declare <16 x i8> @llvm.loongarch.lsx.vrepli.b(i32)
20
21define <16 x i8> @lsx_vrepli_b_lo() nounwind {
22; CHECK: llvm.loongarch.lsx.vrepli.b: argument out of range
23entry:
24  %res = call <16 x i8> @llvm.loongarch.lsx.vrepli.b(i32 -513)
25  ret <16 x i8> %res
26}
27
28define <16 x i8> @lsx_vrepli_b_hi() nounwind {
29; CHECK: llvm.loongarch.lsx.vrepli.b: argument out of range
30entry:
31  %res = call <16 x i8> @llvm.loongarch.lsx.vrepli.b(i32 512)
32  ret <16 x i8> %res
33}
34
35declare <8 x i16> @llvm.loongarch.lsx.vrepli.h(i32)
36
37define <8 x i16> @lsx_vrepli_h_lo() nounwind {
38; CHECK: llvm.loongarch.lsx.vrepli.h: argument out of range
39entry:
40  %res = call <8 x i16> @llvm.loongarch.lsx.vrepli.h(i32 -513)
41  ret <8 x i16> %res
42}
43
44define <8 x i16> @lsx_vrepli_h_hi() nounwind {
45; CHECK: llvm.loongarch.lsx.vrepli.h: argument out of range
46entry:
47  %res = call <8 x i16> @llvm.loongarch.lsx.vrepli.h(i32 512)
48  ret <8 x i16> %res
49}
50
51declare <4 x i32> @llvm.loongarch.lsx.vrepli.w(i32)
52
53define <4 x i32> @lsx_vrepli_w_lo() nounwind {
54; CHECK: llvm.loongarch.lsx.vrepli.w: argument out of range
55entry:
56  %res = call <4 x i32> @llvm.loongarch.lsx.vrepli.w(i32 -513)
57  ret <4 x i32> %res
58}
59
60define <4 x i32> @lsx_vrepli_w_hi() nounwind {
61; CHECK: llvm.loongarch.lsx.vrepli.w: argument out of range
62entry:
63  %res = call <4 x i32> @llvm.loongarch.lsx.vrepli.w(i32 512)
64  ret <4 x i32> %res
65}
66
67declare <2 x i64> @llvm.loongarch.lsx.vrepli.d(i32)
68
69define <2 x i64> @lsx_vrepli_d_lo() nounwind {
70; CHECK: llvm.loongarch.lsx.vrepli.d: argument out of range
71entry:
72  %res = call <2 x i64> @llvm.loongarch.lsx.vrepli.d(i32 -513)
73  ret <2 x i64> %res
74}
75
76define <2 x i64> @lsx_vrepli_d_hi() nounwind {
77; CHECK: llvm.loongarch.lsx.vrepli.d: argument out of range
78entry:
79  %res = call <2 x i64> @llvm.loongarch.lsx.vrepli.d(i32 512)
80  ret <2 x i64> %res
81}
82