[all-commits] [llvm/llvm-project] c5e941: [LoongArch] Support VBIT{CLR, SET, REV}I patterns fo...
hev via All-commits
all-commits at lists.llvm.org
Tue Apr 28 05:52:44 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c5e941d7226573557d7fbef843a580a1d2c0d245
https://github.com/llvm/llvm-project/commit/c5e941d7226573557d7fbef843a580a1d2c0d245
Author: hev <wangrui at loongson.cn>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
M llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
M llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
M llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
M llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
M llvm/test/CodeGen/LoongArch/lasx/bitclr.ll
M llvm/test/CodeGen/LoongArch/lasx/bitrev.ll
M llvm/test/CodeGen/LoongArch/lasx/bitset.ll
M llvm/test/CodeGen/LoongArch/lsx/bitclr.ll
M llvm/test/CodeGen/LoongArch/lsx/bitrev.ll
M llvm/test/CodeGen/LoongArch/lsx/bitset.ll
Log Message:
-----------
[LoongArch] Support VBIT{CLR,SET,REV}I patterns for non-native element sizes (#193719)
Extend vsplat_uimm_{pow2,inv_pow2} matching to allow specifying an
explicit element bit width, enabling recognition of splat patterns whose
logical element size differs from the vector's native element type.
Introduce templated selectVSplatUimm{Pow2,InvPow2} helpers with an
optional EltSize parameter, and add corresponding ComplexPattern
definitions for i8/i16/i32 element widths. This allows TableGen patterns
to match cases such as operating on v8i32/v4i64 vectors with masks
derived from smaller element sizes.
With these changes, AND/OR/XOR operations using inverse power-of-two or
power-of-two splat masks are now correctly selected to VBITCLRI,
VBITSETI, and VBITREVI instructions instead of falling back to vector
logical operations with materialized constants.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list