[all-commits] [llvm/llvm-project] cd60ee: [RISCV] Prevent using dummy_reg_pair_with_x0 in mo...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri May 23 13:40:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd60ee9d6ed807a650d87f246e8c5fa7aa67ce98
      https://github.com/llvm/llvm-project/commit/cd60ee9d6ed807a650d87f246e8c5fa7aa67ce98
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-05-23 (Fri, 23 May 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

  Log Message:
  -----------
  [RISCV] Prevent using dummy_reg_pair_with_x0 in more places. (#141273)

Similar to #141261.

These aren't easy to test without write MIR tests in areas we don't
currently have tests. I'm not sure we use X0_Pair anywhere today.

I'm going to try to migrate RISCVMakeCompressible to use copyToReg so we
can share that code instead of basically duplicating it.

I'm still concerned that target independent code may fold an
extract_subreg operation and get an incorrect register if we do start
using X0_Pair. We may have to special case dummy_reg_pair_with_x0 in the
encoder and printer to be safe.



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