[llvm] X86: Add pattern for optimized BLSIC IR form (PR #209814)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 01:01:54 PDT 2026
================
@@ -125,6 +125,11 @@ let Predicates = [HasTBM] in {
def : Pat<(or GR64:$src, (add GR64:$src, -1)),
(BLSFILL64rr GR64:$src)>;
+ def : Pat<(xor (and GR32:$src, (sub 0, GR32:$src)), -1),
+ (BLSIC32rr GR32:$src)>;
+ def : Pat<(xor (and GR64:$src, (sub 0, GR64:$src)), -1),
----------------
RKSimon wrote:
replace sub 0, x with ineg x
https://github.com/llvm/llvm-project/pull/209814
More information about the llvm-commits
mailing list