123 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 void @llvm.loongarch.lsx.vstelm.b(<16 x i8>, ptr, i32, i32)5 6define void @lsx_vstelm_b_lo(<16 x i8> %va, ptr %p) nounwind {7; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range8entry:9 call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 -129, i32 15)10 ret void11}12 13define void @lsx_vstelm_b_hi(<16 x i8> %va, ptr %p) nounwind {14; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range15entry:16 call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 128, i32 15)17 ret void18}19 20define void @lsx_vstelm_b_idx_lo(<16 x i8> %va, ptr %p) nounwind {21; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range22entry:23 call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 -1)24 ret void25}26 27define void @lsx_vstelm_b_idx_hi(<16 x i8> %va, ptr %p) nounwind {28; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range29entry:30 call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 16)31 ret void32}33 34declare void @llvm.loongarch.lsx.vstelm.h(<8 x i16>, ptr, i32, i32)35 36define void @lsx_vstelm_h_lo(<8 x i16> %va, ptr %p) nounwind {37; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2.38entry:39 call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 -258, i32 7)40 ret void41}42 43define void @lsx_vstelm_h_hi(<8 x i16> %va, ptr %p) nounwind {44; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2.45entry:46 call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 256, i32 7)47 ret void48}49 50define void @lsx_vstelm_h_idx_lo(<8 x i16> %va, ptr %p) nounwind {51; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2.52entry:53 call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 -1)54 ret void55}56 57define void @lsx_vstelm_h_idx_hi(<8 x i16> %va, ptr %p) nounwind {58; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2.59entry:60 call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 8)61 ret void62}63 64declare void @llvm.loongarch.lsx.vstelm.w(<4 x i32>, ptr, i32, i32)65 66define void @lsx_vstelm_w_lo(<4 x i32> %va, ptr %p) nounwind {67; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4.68entry:69 call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 -516, i32 3)70 ret void71}72 73define void @lsx_vstelm_w_hi(<4 x i32> %va, ptr %p) nounwind {74; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4.75entry:76 call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 512, i32 3)77 ret void78}79 80define void @lsx_vstelm_w_idx_lo(<4 x i32> %va, ptr %p) nounwind {81; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4.82entry:83 call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 -1)84 ret void85}86 87define void @lsx_vstelm_w_idx_hi(<4 x i32> %va, ptr %p) nounwind {88; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4.89entry:90 call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 4)91 ret void92}93 94declare void @llvm.loongarch.lsx.vstelm.d(<2 x i64>, ptr, i32, i32)95 96define void @lsx_vstelm_d_lo(<2 x i64> %va, ptr %p) nounwind {97; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8.98entry:99 call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 -1032, i32 1)100 ret void101}102 103define void @lsx_vstelm_d_hi(<2 x i64> %va, ptr %p) nounwind {104; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8.105entry:106 call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 1024, i32 1)107 ret void108}109 110define void @lsx_vstelm_d_idx_lo(<2 x i64> %va, ptr %p) nounwind {111; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8.112entry:113 call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 -1)114 ret void115}116 117define void @lsx_vstelm_d_idx_hi(<2 x i64> %va, ptr %p) nounwind {118; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8.119entry:120 call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 2)121 ret void122}123