[all-commits] [llvm/llvm-project] acb4d1: [AVR] Fix incorrect expansion of pseudo instructio...

Ben Shi via All-commits all-commits at lists.llvm.org
Thu Apr 6 00:27:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acb4d143bdb75930eae8dc700e16e4950b8cc2c8
      https://github.com/llvm/llvm-project/commit/acb4d143bdb75930eae8dc700e16e4950b8cc2c8
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2023-04-06 (Thu, 06 Apr 2023)

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

  Log Message:
  -----------
  [AVR] Fix incorrect expansion of pseudo instructions LPMWRdZ/ELPMWRdZ

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 pseudo instructions
LPMWRdZ/ELPMWRdZ. But for devices without ELPMX and with only ELPM,
only the first form can be used.

Reviewed By: aykevl, Miss_Grape

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




More information about the All-commits mailing list