xref: /llvm-project/llvm/test/CodeGen/LoongArch/lsx/intrinsic-ld-invalid-imm.ll (revision ff9af4c43ad71eeba2cabe99609cfaa0fd54c1d0)
1; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s
2
3declare <16 x i8> @llvm.loongarch.lsx.vld(ptr, i32)
4
5define <16 x i8> @lsx_vld_lo(ptr %p) nounwind {
6; CHECK: llvm.loongarch.lsx.vld: argument out of range
7entry:
8  %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 -2049)
9  ret <16 x i8> %res
10}
11
12define <16 x i8> @lsx_vld_hi(ptr %p) nounwind {
13; CHECK: llvm.loongarch.lsx.vld: argument out of range
14entry:
15  %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 2048)
16  ret <16 x i8> %res
17}
18