[llvm-branch-commits] [llvm] [LoongArch] Select `V{AND, OR, XOR, NOR}I.B` for bitwise with byte splat immediates (PR #192217)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 16 04:58:59 PDT 2026
================
@@ -1412,15 +1412,39 @@ def : Pat<(or (vt LASX256:$xj), (vt (vnot LASX256:$xk))),
// XVANDI_B
def : Pat<(and (v32i8 LASX256:$xj), (v32i8 (SplatPat_uimm8 uimm8:$imm))),
(XVANDI_B LASX256:$xj, uimm8:$imm)>;
+def : Pat<(and (v16i16 LASX256:$xj), (v16i16 (vsplat_i8_uimm8 imm16:$imm))),
----------------
wangleiat wrote:
Can these patterns be simplified using `foreach` or a `multiclass`? Also, since `imm16/imm32/imm64` do not appear to serve any real predicate purpose here, they could likely all be replaced with `grlenimm` or `imm64` for consistency and to reduce redundancy.
https://github.com/llvm/llvm-project/pull/192217
More information about the llvm-branch-commits
mailing list