67 lines · plain
1; RUN: not llc --mtriple=loongarch32 --mattr=+32s,+lsx < %s 2>&1 | FileCheck %s2; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s3 4declare <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr, i32)5 6define <16 x i8> @lsx_vldrepl_b_lo(ptr %p) nounwind {7; CHECK: llvm.loongarch.lsx.vldrepl.b: argument out of range8entry:9 %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 -2049)10 ret <16 x i8> %res11}12 13define <16 x i8> @lsx_vldrepl_b_hi(ptr %p) nounwind {14; CHECK: llvm.loongarch.lsx.vldrepl.b: argument out of range15entry:16 %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 2048)17 ret <16 x i8> %res18}19 20declare <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr, i32)21 22define <8 x i16> @lsx_vldrepl_h_lo(ptr %p) nounwind {23; CHECK: llvm.loongarch.lsx.vldrepl.h: argument out of range or not a multiple of 2.24entry:25 %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 -2050)26 ret <8 x i16> %res27}28 29define <8 x i16> @lsx_vldrepl_h_hi(ptr %p) nounwind {30; CHECK: llvm.loongarch.lsx.vldrepl.h: argument out of range or not a multiple of 2.31entry:32 %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 2048)33 ret <8 x i16> %res34}35 36declare <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr, i32)37 38define <4 x i32> @lsx_vldrepl_w_lo(ptr %p) nounwind {39; CHECK: llvm.loongarch.lsx.vldrepl.w: argument out of range or not a multiple of 4.40entry:41 %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 -2052)42 ret <4 x i32> %res43}44 45define <4 x i32> @lsx_vldrepl_w_hi(ptr %p) nounwind {46; CHECK: llvm.loongarch.lsx.vldrepl.w: argument out of range or not a multiple of 4.47entry:48 %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 2048)49 ret <4 x i32> %res50}51 52declare <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr, i32)53 54define <2 x i64> @lsx_vldrepl_d_lo(ptr %p) nounwind {55; CHECK: llvm.loongarch.lsx.vldrepl.d: argument out of range or not a multiple of 8.56entry:57 %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 -2056)58 ret <2 x i64> %res59}60 61define <2 x i64> @lsx_vldrepl_d_hi(ptr %p) nounwind {62; CHECK: llvm.loongarch.lsx.vldrepl.d: argument out of range or not a multiple of 8.63entry:64 %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 2048)65 ret <2 x i64> %res66}67