[all-commits] [llvm/llvm-project] bc2004: [RISCV] Handle LHS == 0 in isVLKnownLE (#148860)

Luke Lau via All-commits all-commits at lists.llvm.org
Tue Jul 15 11:04:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc2004c2e42f633ee4099ea5652df41dba29c79c
      https://github.com/llvm/llvm-project/commit/bc2004c2e42f633ee4099ea5652df41dba29c79c
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsadd-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vsaddu-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vssub-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vssubu-vp.ll

  Log Message:
  -----------
  [RISCV] Handle LHS == 0 in isVLKnownLE (#148860)

If a VL is zero then it's known to be less than or equal to every other
VL.

This looks weird on its own since a VL of zero isn't that common. The
test diffs come from a type being split resulting in a VP intrinsic's
EVL being zero.

The motivation for this is to split off part of an upcoming patch I plan
on submitting for RISCVVLOptimizer, which generalizes it to handle
recurrences, and needs to reason about an initial state of demanded VLs
set to zero.



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