[all-commits] [llvm/llvm-project] 2a6e39: [AVR] Do not emit 'LPM Rd, Z' on devices without F...

Ben Shi via All-commits all-commits at lists.llvm.org
Fri Mar 24 02:47:45 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a6e39dbf84af4b3f8b31930fed786b3c56287f5
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
    M llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
    M llvm/lib/Target/AVR/AVRInstrInfo.td
    M llvm/test/CodeGen/AVR/elpm.ll
    A llvm/test/CodeGen/AVR/pseudo/LPMBRdZ.mir

  Log Message:
  [AVR] Do not emit 'LPM Rd, Z' on devices without FeatureLPMX

The 'LPM' instruction has three forms:

| form       | feature |
| ---------- | --------|
| LPM        | hasLPM  |
| LPM Rd, Z  | hasLPMX |
| LPM Rd, Z+ | hasLPMX |

The second form is always selected in ISelDAGToDAG, even on devices
without FeatureLPMX. This patch emits "LPM + MOV" on devices with
only FeatureLPM.

Reviewed By: jacquesguan

Differential Revision: https://reviews.llvm.org/D141246

More information about the All-commits mailing list