[all-commits] [llvm/llvm-project] 4fa9dc: [AVR] Fix incorrect expansion of the pseudo 'ELPMB...

Ben Shi via All-commits all-commits at lists.llvm.org
Mon Mar 20 20:37:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fa9dc948226e374372537250d046924d348307e
      https://github.com/llvm/llvm-project/commit/4fa9dc948226e374372537250d046924d348307e
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2023-03-21 (Tue, 21 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/ELPMBRdZ.mir

  Log Message:
  -----------
  [AVR] Fix incorrect expansion of the pseudo 'ELPMBRdZ' instruction

The 'ELPM' instruction has three forms:

--------------------------
| form        | feature  |
| ----------- | -------- |
| ELPM        | hasELPM  |
| ELPM Rd, Z  | hasELPMX |
| ELPM Rd, Z+ | hasELPMX |
--------------------------

The second form is always used in the expansion of the pseudo
instruction 'ELPMBRdZ'. But for devices without ELPMX but only
with ELPM, only the first form can be emitted.

Reviewed By: jacquesguan

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




More information about the All-commits mailing list