[llvm] [LoongArch] Try to widen shuffle mask (PR #136081)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 18:25:14 PDT 2025


================
@@ -6,7 +6,8 @@ define <32 x i8> @widen_shuffle_mask_v32i8_to_v16i16(<32 x i8> %a, <32 x i8> %b)
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    pcalau12i $a0, %pc_hi20(.LCPI0_0)
 ; CHECK-NEXT:    xvld $xr2, $a0, %pc_lo12(.LCPI0_0)
-; CHECK-NEXT:    xvshuf.b $xr0, $xr1, $xr0, $xr2
+; CHECK-NEXT:    xvshuf.h $xr2, $xr1, $xr0
+; CHECK-NEXT:    xvori.b $xr0, $xr2, 0
----------------
heiher wrote:

Ah, I see -- since the `xd` operand in ``xvshuf.h` serves as both input and output, the use of `xvori.b` is indeed necessary. Looks good to me.

https://github.com/llvm/llvm-project/pull/136081


More information about the llvm-commits mailing list