[all-commits] [llvm/llvm-project] 31daed: [RISCV] Prefer QC_EXTU to ANDI for certain 12-bit ...

Sudharsan Veeravalli via All-commits all-commits at lists.llvm.org
Thu Jun 12 09:31:32 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31daed868d69ac1ac6f6a29340d0b5e0e6dc39ab
      https://github.com/llvm/llvm-project/commit/31daed868d69ac1ac6f6a29340d0b5e0e6dc39ab
  Author: Sudharsan Veeravalli <quic_svs at quicinc.com>
  Date:   2025-06-12 (Thu, 12 Jun 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
    M llvm/test/CodeGen/RISCV/xqcibm-extract.ll

  Log Message:
  -----------
  [RISCV] Prefer QC_EXTU to ANDI for certain 12-bit mask immediates (#143838)

`QC_EXTU` can be compressed to `QC_C_EXTU` when the immediate is a `mask
>=63`. We currently only handle masks that don't fit in 12-bits in
`RISCVISelDAGToDAG`.

I have added ISEL patterns in `RISCVInstrInfoXqci.td` instead of
changing code in `RISCVISelDAGToDAG` since the other extract
instructions ( in `XTHeadbb` and `XAndesPerf`) don't have compressed
versions and it is a lot easier to maintain things this way.



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