[all-commits] [llvm/llvm-project] b64d7b: [RISCV] Change the InstFormat for Zicbop prefetch ...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Jul 15 14:50:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b64d7baf9c0d37893ebabbe2539e725eb70b46e9
      https://github.com/llvm/llvm-project/commit/b64d7baf9c0d37893ebabbe2539e725eb70b46e9
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-07-15 (Tue, 15 Jul 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrFormats.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td

  Log Message:
  -----------
  [RISCV] Change the InstFormat for Zicbop prefetch instructions to InstFormatOther. (#148934)

The lower 5-bits of the immediate are not part of the address unlike
other InstFormatS instructions.

We use InstFormatS in RISCVRegisterInfo::needsFrameBaseReg and
RISCVRegisterInfo::getFrameIndexInstrOffset which is not aware of this
special encoding. Force the format to InstFormatOther so those functions
will ignore it.

InstFormatS is also used by relocation emission, but I don't believe we
ever emit these instructions with a relocation because of the encoding.



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