| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvld(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvld_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvld: argument out of range | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvld(ptr %p, i32 -2049) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| define <32 x i8> @lasx_xvld_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvld: argument out of range | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvld(ptr %p, i32 2048) | ||
| ret <32 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvld(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvld(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvld(ptr %p, i32 %a) | ||
| ret <32 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvld(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvld(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvld: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvld $xr0, $a0, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvld(ptr %p, i32 1) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvldx(ptr, i64) | ||
|
|
||
| define <32 x i8> @lasx_xvldx(ptr %p, i64 %b) nounwind { | ||
| ; CHECK-LABEL: lasx_xvldx: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvldx $xr0, $a0, $a1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvldx(ptr %p, i64 %b) | ||
| ret <32 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvldrepl_b_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.b: argument out of range | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr %p, i32 -2049) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| define <32 x i8> @lasx_xvldrepl_b_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.b: argument out of range | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr %p, i32 2048) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| declare <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr, i32) | ||
|
|
||
| define <16 x i16> @lasx_xvldrepl_h_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| %res = call <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr %p, i32 -2050) | ||
| ret <16 x i16> %res | ||
| } | ||
|
|
||
| define <16 x i16> @lasx_xvldrepl_h_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| %res = call <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr %p, i32 2048) | ||
| ret <16 x i16> %res | ||
| } | ||
|
|
||
| declare <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr, i32) | ||
|
|
||
| define <8 x i32> @lasx_xvldrepl_w_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| %res = call <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr %p, i32 -2052) | ||
| ret <8 x i32> %res | ||
| } | ||
|
|
||
| define <8 x i32> @lasx_xvldrepl_w_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| %res = call <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr %p, i32 2048) | ||
| ret <8 x i32> %res | ||
| } | ||
|
|
||
| declare <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr, i32) | ||
|
|
||
| define <4 x i64> @lasx_xvldrepl_d_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| %res = call <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr %p, i32 -2056) | ||
| ret <4 x i64> %res | ||
| } | ||
|
|
||
| define <4 x i64> @lasx_xvldrepl_d_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvldrepl.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| %res = call <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr %p, i32 2048) | ||
| ret <4 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,37 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvldrepl_b(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr %p, i32 %a) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| declare <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr, i32) | ||
|
|
||
| define <16 x i16> @lasx_xvldrepl_h(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr %p, i32 %a) | ||
| ret <16 x i16> %res | ||
| } | ||
|
|
||
| declare <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr, i32) | ||
|
|
||
| define <8 x i32> @lasx_xvldrepl_w(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr %p, i32 %a) | ||
| ret <8 x i32> %res | ||
| } | ||
|
|
||
| declare <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr, i32) | ||
|
|
||
| define <4 x i64> @lasx_xvldrepl_d(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr %p, i32 %a) | ||
| ret <4 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,50 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s | ||
|
|
||
| declare <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr, i32) | ||
|
|
||
| define <32 x i8> @lasx_xvldrepl_b(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvldrepl_b: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvldrepl.b $xr0, $a0, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <32 x i8> @llvm.loongarch.lasx.xvldrepl.b(ptr %p, i32 1) | ||
| ret <32 x i8> %res | ||
| } | ||
|
|
||
| declare <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr, i32) | ||
|
|
||
| define <16 x i16> @lasx_xvldrepl_h(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvldrepl_h: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvldrepl.h $xr0, $a0, 2 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <16 x i16> @llvm.loongarch.lasx.xvldrepl.h(ptr %p, i32 2) | ||
| ret <16 x i16> %res | ||
| } | ||
|
|
||
| declare <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr, i32) | ||
|
|
||
| define <8 x i32> @lasx_xvldrepl_w(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvldrepl_w: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvldrepl.w $xr0, $a0, 4 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <8 x i32> @llvm.loongarch.lasx.xvldrepl.w(ptr %p, i32 4) | ||
| ret <8 x i32> %res | ||
| } | ||
|
|
||
| declare <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr, i32) | ||
|
|
||
| define <4 x i64> @lasx_xvldrepl_d(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvldrepl_d: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvldrepl.d $xr0, $a0, 8 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <4 x i64> @llvm.loongarch.lasx.xvldrepl.d(ptr %p, i32 8) | ||
| ret <4 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvst(<32 x i8>, ptr, i32) | ||
|
|
||
| define void @lasx_xvst_lo(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvst: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvst(<32 x i8> %va, ptr %p, i32 -2049) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvst_hi(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvst: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvst(<32 x i8> %va, ptr %p, i32 2048) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvst(<32 x i8>, ptr, i32) | ||
|
|
||
| define void @lasx_xvst(<32 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvst(<32 x i8> %va, ptr %p, i32 %b) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,27 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvst(<32 x i8>, ptr, i32) | ||
|
|
||
| define void @lasx_xvst(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvst: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvst $xr0, $a0, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvst(<32 x i8> %va, ptr %p, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstx(<32 x i8>, ptr, i64) | ||
|
|
||
| define void @lasx_xvstx(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvstx: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: ori $a1, $zero, 1 | ||
| ; CHECK-NEXT: xvstx $xr0, $a0, $a1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstx(<32 x i8> %va, ptr %p, i64 1) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,121 +1,121 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.b(<32 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_b_lo(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 -129, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_b_hi(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 128, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_b_idx_lo(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 1, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_b_idx_hi(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 1, i32 32) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.h(<16 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_h_lo(<16 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 -258, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_h_hi(<16 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 256, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_h_idx_lo(<16 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 2, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_h_idx_hi(<16 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 2, i32 16) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.w(<8 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_w_lo(<8 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 -516, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_w_hi(<8 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 512, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_w_idx_lo(<8 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 4, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_w_idx_hi(<8 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 4, i32 8) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.d(<4 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_d_lo(<4 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 -1032, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_d_hi(<4 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 1024, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_d_idx_lo(<4 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 8, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_d_idx_hi(<4 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lasx.xvstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 8, i32 4) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lasx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.b(<32 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_b(<32 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_b_idx(<32 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 1, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.h(<16 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_h(<16 x i16> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_h_idx(<16 x i16> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 2, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.w(<8 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_w(<8 x i32> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_w_idx(<8 x i32> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 4, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.d(<4 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_d(<4 x i64> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lasx_xvstelm_d_idx(<4 x i64> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 8, i32 %b) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,50 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.b(<32 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_b(<32 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvstelm_b: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvstelm.b $xr0, $a0, 1, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.b(<32 x i8> %va, ptr %p, i32 1, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.h(<16 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_h(<16 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvstelm_h: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvstelm.h $xr0, $a0, 2, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.h(<16 x i16> %va, ptr %p, i32 2, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.w(<8 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_w(<8 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvstelm_w: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvstelm.w $xr0, $a0, 4, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.w(<8 x i32> %va, ptr %p, i32 4, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lasx.xvstelm.d(<4 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lasx_xvstelm_d(<4 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lasx_xvstelm_d: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: xvstelm.d $xr0, $a0, 8, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lasx.xvstelm.d(<4 x i64> %va, ptr %p, i32 8, i32 1) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vld(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vld_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vld: argument out of range | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 -2049) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| define <16 x i8> @lsx_vld_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vld: argument out of range | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 2048) | ||
| ret <16 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vld(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vld(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 %a) | ||
| ret <16 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vld(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vld(ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vld: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vld $vr0, $a0, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vld(ptr %p, i32 1) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vldx(ptr, i64) | ||
|
|
||
| define <16 x i8> @lsx_vldx(ptr %p, i64 %b) nounwind { | ||
| ; CHECK-LABEL: lsx_vldx: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vldx $vr0, $a0, $a1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vldx(ptr %p, i64 %b) | ||
| ret <16 x i8> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vldrepl_b_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.b: argument out of range | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 -2049) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| define <16 x i8> @lsx_vldrepl_b_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.b: argument out of range | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 2048) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| declare <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr, i32) | ||
|
|
||
| define <8 x i16> @lsx_vldrepl_h_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 -2050) | ||
| ret <8 x i16> %res | ||
| } | ||
|
|
||
| define <8 x i16> @lsx_vldrepl_h_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 2048) | ||
| ret <8 x i16> %res | ||
| } | ||
|
|
||
| declare <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr, i32) | ||
|
|
||
| define <4 x i32> @lsx_vldrepl_w_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 -2052) | ||
| ret <4 x i32> %res | ||
| } | ||
|
|
||
| define <4 x i32> @lsx_vldrepl_w_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 2048) | ||
| ret <4 x i32> %res | ||
| } | ||
|
|
||
| declare <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr, i32) | ||
|
|
||
| define <2 x i64> @lsx_vldrepl_d_lo(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 -2056) | ||
| ret <2 x i64> %res | ||
| } | ||
|
|
||
| define <2 x i64> @lsx_vldrepl_d_hi(ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vldrepl.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 2048) | ||
| ret <2 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,37 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vldrepl_b(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 %a) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| declare <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr, i32) | ||
|
|
||
| define <8 x i16> @lsx_vldrepl_h(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 %a) | ||
| ret <8 x i16> %res | ||
| } | ||
|
|
||
| declare <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr, i32) | ||
|
|
||
| define <4 x i32> @lsx_vldrepl_w(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 %a) | ||
| ret <4 x i32> %res | ||
| } | ||
|
|
||
| declare <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr, i32) | ||
|
|
||
| define <2 x i64> @lsx_vldrepl_d(ptr %p, i32 %a) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 %a) | ||
| ret <2 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,50 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s | ||
|
|
||
| declare <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr, i32) | ||
|
|
||
| define <16 x i8> @lsx_vldrepl_b(ptr %p, i32 %b) nounwind { | ||
| ; CHECK-LABEL: lsx_vldrepl_b: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vldrepl.b $vr0, $a0, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <16 x i8> @llvm.loongarch.lsx.vldrepl.b(ptr %p, i32 1) | ||
| ret <16 x i8> %res | ||
| } | ||
|
|
||
| declare <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr, i32) | ||
|
|
||
| define <8 x i16> @lsx_vldrepl_h(ptr %p, i32 %b) nounwind { | ||
| ; CHECK-LABEL: lsx_vldrepl_h: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vldrepl.h $vr0, $a0, 2 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <8 x i16> @llvm.loongarch.lsx.vldrepl.h(ptr %p, i32 2) | ||
| ret <8 x i16> %res | ||
| } | ||
|
|
||
| declare <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr, i32) | ||
|
|
||
| define <4 x i32> @lsx_vldrepl_w(ptr %p, i32 %b) nounwind { | ||
| ; CHECK-LABEL: lsx_vldrepl_w: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vldrepl.w $vr0, $a0, 4 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <4 x i32> @llvm.loongarch.lsx.vldrepl.w(ptr %p, i32 4) | ||
| ret <4 x i32> %res | ||
| } | ||
|
|
||
| declare <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr, i32) | ||
|
|
||
| define <2 x i64> @lsx_vldrepl_d(ptr %p, i32 %b) nounwind { | ||
| ; CHECK-LABEL: lsx_vldrepl_d: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vldrepl.d $vr0, $a0, 8 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| %res = call <2 x i64> @llvm.loongarch.lsx.vldrepl.d(ptr %p, i32 8) | ||
| ret <2 x i64> %res | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vst(<16 x i8>, ptr, i32) | ||
|
|
||
| define void @lsx_vst_lo(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vst: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vst(<16 x i8> %va, ptr %p, i32 -2049) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vst_hi(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vst: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vst(<16 x i8> %va, ptr %p, i32 2048) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vst(<16 x i8>, ptr, i32) | ||
|
|
||
| define void @lsx_vst(<16 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vst(<16 x i8> %va, ptr %p, i32 %b) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vst(<16 x i8>, ptr, i32) | ||
|
|
||
| define void @lsx_vst(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vst: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vst $vr0, $a0, -2048 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vst(<16 x i8> %va, ptr %p, i32 -2048) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstx(<16 x i8>, ptr, i64) | ||
|
|
||
| define void @lsx_vstx(<16 x i8> %va, ptr %p, i64 %c) nounwind { | ||
| ; CHECK-LABEL: lsx_vstx: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vstx $vr0, $a0, $a1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstx(<16 x i8> %va, ptr %p, i64 %c) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,121 +1,121 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.b(<16 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_b_lo(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 -129, i32 15) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_b_hi(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 128, i32 15) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_b_idx_lo(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_b_idx_hi(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.b: argument out of range | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 16) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.h(<8 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_h_lo(<8 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 -258, i32 7) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_h_hi(<8 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 256, i32 7) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_h_idx_lo(<8 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_h_idx_hi(<8 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.h: argument out of range or not a multiple of 2. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 8) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.w(<4 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_w_lo(<4 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 -516, i32 3) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_w_hi(<4 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 512, i32 3) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_w_idx_lo(<4 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_w_idx_hi(<4 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.w: argument out of range or not a multiple of 4. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 4) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.d(<2 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_d_lo(<2 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 -1032, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_d_hi(<2 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 1024, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_d_idx_lo(<2 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 -1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_d_idx_hi(<2 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK: llvm.loongarch.lsx.vstelm.d: argument out of range or not a multiple of 8. | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 2) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| ; RUN: not llc --mtriple=loongarch64 --mattr=+lsx < %s 2>&1 | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.b(<16 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_b(<16 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_b_idx(<16 x i8> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.h(<8 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_h(<8 x i16> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_h_idx(<8 x i16> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.w(<4 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_w(<4 x i32> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_w_idx(<4 x i32> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 %b) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.d(<2 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_d(<2 x i64> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 %b, i32 1) | ||
| ret void | ||
| } | ||
|
|
||
| define void @lsx_vstelm_d_idx(<2 x i64> %va, ptr %p, i32 %b) nounwind { | ||
| ; CHECK: immarg operand has non-immediate parameter | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 %b) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,50 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
| ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.b(<16 x i8>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_b(<16 x i8> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vstelm_b: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vstelm.b $vr0, $a0, 1, 15 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.b(<16 x i8> %va, ptr %p, i32 1, i32 15) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.h(<8 x i16>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_h(<8 x i16> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vstelm_h: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vstelm.h $vr0, $a0, 2, 7 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.h(<8 x i16> %va, ptr %p, i32 2, i32 7) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.w(<4 x i32>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_w(<4 x i32> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vstelm_w: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vstelm.w $vr0, $a0, 4, 3 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.w(<4 x i32> %va, ptr %p, i32 4, i32 3) | ||
| ret void | ||
| } | ||
|
|
||
| declare void @llvm.loongarch.lsx.vstelm.d(<2 x i64>, ptr, i32, i32) | ||
|
|
||
| define void @lsx_vstelm_d(<2 x i64> %va, ptr %p) nounwind { | ||
| ; CHECK-LABEL: lsx_vstelm_d: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vstelm.d $vr0, $a0, 8, 1 | ||
| ; CHECK-NEXT: ret | ||
| entry: | ||
| call void @llvm.loongarch.lsx.vstelm.d(<2 x i64> %va, ptr %p, i32 8, i32 1) | ||
| ret void | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| define i32 @sub_small() { | ||
| entry: | ||
| %val32 = load i32, ptr @var_i32 | ||
| ret i32 %val32 | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| define i32 @sub_small() { | ||
| entry: | ||
| %val32 = load i32, ptr @var_i32 | ||
| ret i32 %val32 | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| ret i32 %. | ||
|
|
||
| if.else: | ||
| %b = load i32, ptr @G | ||
| %c = add i32 %b, 1 | ||
| br label %foo | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
|
|
||
| define i32 @inc() { | ||
| entry: | ||
| %a = load i32, ptr @G | ||
| %b = add i32 %a, 1 | ||
| ret i32 %b | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| --- | | ||
|
|
||
| define i32 @test(ptr %a) { | ||
| entry: | ||
| %b = load i32, ptr %a | ||
| ret i32 %b | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| --- | | ||
|
|
||
| define i32 @test(ptr %a) { | ||
| entry: | ||
| %b = load i32, ptr %a | ||
| ret i32 %b | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| --- | | ||
|
|
||
| define i32 @test(ptr %a) { | ||
| entry: | ||
| %b = load i32, ptr %a | ||
| ret i32 %b | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| --- | | ||
|
|
||
| define i32 @test(ptr %a) { | ||
| entry: | ||
| %b = load i32, ptr %a | ||
| ret i32 %b | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
|
|
||
| define i32 @inc() { | ||
| entry: | ||
| %a = load i32, ptr @G | ||
| %b = add i32 %a, 1 | ||
| ret i32 %b | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ | |
|
|
||
| --- | | ||
|
|
||
| define i32 @test(ptr %a) { | ||
| entry: | ||
| %b = load i32, ptr %a | ||
| ret i32 %b | ||
| } | ||
|
|
||
|
|
||