[llvm] [LoongArch] Custom lower vector trunc to vector shuffle (PR #130938)
Lu Weining via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 12 18:13:02 PDT 2025
================
@@ -0,0 +1,238 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc --mtriple=loongarch64 --mattr=+lsx %s -o - | FileCheck %s
+
+define void @load_trunc_2i64_to_2i32(ptr %ptr, ptr %dst) {
+; CHECK-LABEL: load_trunc_2i64_to_2i32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: addi.d $sp, $sp, -16
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: vld $vr0, $a0, 0
+; CHECK-NEXT: vpickve2gr.d $a0, $vr0, 1
+; CHECK-NEXT: st.w $a0, $sp, 4
+; CHECK-NEXT: vpickve2gr.d $a0, $vr0, 0
+; CHECK-NEXT: st.w $a0, $sp, 0
+; CHECK-NEXT: ld.d $a0, $sp, 0
+; CHECK-NEXT: st.d $a0, $a1, 0
+; CHECK-NEXT: addi.d $sp, $sp, 16
+; CHECK-NEXT: ret
+ %a = load <2 x i64>, ptr %ptr
----------------
SixWeining wrote:
remove extra indent
https://github.com/llvm/llvm-project/pull/130938
More information about the llvm-commits
mailing list