[llvm-branch-commits] [llvm] [LoongArch] Custom legalize vector_shuffle to `[x]vpermi.w` (PR #164945)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 27 04:43:31 PDT 2026
================
@@ -50,7 +51,8 @@ define <8 x i16> @widen_shuffle_mask_v8i16_to_v4i32(<8 x i16> %a, <8 x i16> %b)
define <8 x i16> @widen_shuffle_mask_v8i16_to_v2i64(<8 x i16> %a, <8 x i16> %b) {
; CHECK-LABEL: widen_shuffle_mask_v8i16_to_v2i64:
; CHECK: # %bb.0:
-; CHECK-NEXT: vshuf4i.d $vr0, $vr1, 12
+; CHECK-NEXT: vpermi.w $vr1, $vr0, 228
+; CHECK-NEXT: vori.b $vr0, $vr1, 0
----------------
zhaoqi5 wrote:
Maybe the answer is no. The `vori.b` is just used to move the result form `vr1` into `vr0` as the return vector.
https://github.com/llvm/llvm-project/pull/164945
More information about the llvm-branch-commits
mailing list