[all-commits] [llvm/llvm-project] 3c8ed9: [RISCV] Fold vmnot.m of an integer compare into th...

Marton Moro via All-commits all-commits at lists.llvm.org
Mon Sep 21 02:25:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c8ed91159b2144284672cf490cedd7befaba3fa
      https://github.com/llvm/llvm-project/commit/3c8ed91159b2144284672cf490cedd7befaba3fa
  Author: Marton Moro <moro.marton at gmail.com>
  Date:   2026-09-21 (Mon, 21 Sep 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    A llvm/test/CodeGen/RISCV/rvv/combine-vmnot-setcc.ll

  Log Message:
  -----------
  [RISCV] Fold vmnot.m of an integer compare into the compare (#222553)

Fold a mask NOT of an integer vector compare into the compare by
inverting
the condition code, so `vmsne.vi` + `vmnot.m` becomes `vmseq.vi`:

    (vmxor_vl (setcc_vl a, b, cc), vmset_vl) -> (setcc_vl a, b, !cc)

Only `SETCC_VL` with integer operands, one use and an undef passthru is
handled. The NOT also flips the masked-off lanes, which the inverted compare
would copy unchanged from the passthru, so the passthru must be undef.
The mask can be anything. FP compares are excluded since the inverse of an
ordered compare is unordered.

Fixes #222158



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