summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll')
-rw-r--r--llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll19
1 files changed, 14 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll b/llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll
index e9a0c8a11045..65aff8071897 100644
--- a/llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll
+++ b/llvm/test/CodeGen/LoongArch/lsx/ir-instruction/insert-extract-element.ll
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
-; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
+; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lsx < %s | FileCheck %s --check-prefixes=CHECK,LA32
+; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s --check-prefixes=CHECK,LA64
define <16 x i8> @insert_extract_v16i8(<16 x i8> %a) nounwind {
; CHECK-LABEL: insert_extract_v16i8:
@@ -46,10 +47,18 @@ entry:
}
define <2 x i64> @insert_extract_v2i64(<2 x i64> %a) nounwind {
-; CHECK-LABEL: insert_extract_v2i64:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vextrins.d $vr0, $vr0, 1
-; CHECK-NEXT: ret
+; LA32-LABEL: insert_extract_v2i64:
+; LA32: # %bb.0: # %entry
+; LA32-NEXT: vori.b $vr1, $vr0, 0
+; LA32-NEXT: vextrins.w $vr1, $vr0, 2
+; LA32-NEXT: vextrins.w $vr1, $vr0, 19
+; LA32-NEXT: vori.b $vr0, $vr1, 0
+; LA32-NEXT: ret
+;
+; LA64-LABEL: insert_extract_v2i64:
+; LA64: # %bb.0: # %entry
+; LA64-NEXT: vextrins.d $vr0, $vr0, 1
+; LA64-NEXT: ret
entry:
%b = extractelement <2 x i64> %a, i32 1
%c = insertelement <2 x i64> %a, i64 %b, i32 0