[all-commits] [llvm/llvm-project] e72876: [RISCV] Mask integer and float loads as canFoldAsL...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Oct 31 07:42:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e72876a519b1c65dc2cee96d512ac6967c6a1555
      https://github.com/llvm/llvm-project/commit/e72876a519b1c65dc2cee96d512ac6967c6a1555
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2025-10-31 (Fri, 31 Oct 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfo.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoD.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoF.td
    M llvm/test/CodeGen/RISCV/rv64-stackmap.ll

  Log Message:
  -----------
  [RISCV] Mask integer and float loads as canFoldAsLoad for stackmaps (#165761)

We have two mechanisms used in inline spilled for folding a load into a
consuming instruction. One is used for stack reloads, the other for
other load instructions (usually argument loads). We currently only
implement optimizations for the first case, but stackmaps have generic
support in target independent code for the other. We can go ahead and
set the flag to enable that optimization.

The primary motivation for this is that if we enable load
rematerialization without it, we run into crashes where we can't make
progress through rematerialization.

We probably should enable the other foldMemoryOperand hook for RISCV
specific instructions, but that's a separate optimization.



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