[all-commits] [llvm/llvm-project] cb5445: [RISCV] Lower masked_{u, s}{div, rem} and update TTI...

Luke Lau via All-commits all-commits at lists.llvm.org
Fri Apr 17 03:07:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb5445f0797b01fee6410319df09813bfc8021f6
      https://github.com/llvm/llvm-project/commit/cb5445f0797b01fee6410319df09813bfc8021f6
  Author: Luke Lau <luke at igalia.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/masked-divrem.ll
    M llvm/test/CodeGen/RISCV/rvv/masked-sdiv.ll
    M llvm/test/CodeGen/RISCV/rvv/masked-srem.ll
    M llvm/test/CodeGen/RISCV/rvv/masked-udiv.ll
    M llvm/test/CodeGen/RISCV/rvv/masked-urem.ll

  Log Message:
  -----------
  [RISCV] Lower masked_{u,s}{div,rem} and update TTI (#192543)

The loop vectorizer will soon emit llvm.masked.udiv intrinsics and
friends. The vast majority of the time these will be transformed to
vp.udiv on RISC-V thanks to tail folding, but if it doesn't tail fold or
uses a fixed VF then it will reach instruction selection.

This patch lowers the nodes to the masked pseudo for scalable and fixed
vectors, and updates the TTI to account for it.



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