[all-commits] [llvm/llvm-project] dbb6ed: [RISCV] Refactor SelectAddrRegRegScale. NFC

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Jul 15 23:07:08 PDT 2025


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

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

  Log Message:
  -----------
  [RISCV] Refactor SelectAddrRegRegScale. NFC

Rename UnwrapShl->SelectShl. Make it only responsible for matching
a SHL by constant.

Handle the fallback case of reg+reg with no scale outside of SelectShl.

Reorder the check so RHS is checked for shift first. The base pointer
is most likely on the LHS. It's very unlikely both operands are shifts.

This is preparation for adding better costing decisions to this code.



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