[all-commits] [llvm/llvm-project] 565068: [AVR] Fix expanding MOVW for overlapping registers

Patryk Wychowaniec via All-commits all-commits at lists.llvm.org
Sun Jun 26 02:32:59 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5650688e7242b31b1447189176493aa12c99f355
  Author: Patryk Wychowaniec <pwychowaniec at pm.me>
  Date:   2022-06-26 (Sun, 26 Jun 2022)

  Changed paths:
    M llvm/lib/Target/AVR/AVRInstrInfo.cpp
    A llvm/test/CodeGen/AVR/pseudo/COPY.mir
    A llvm/test/CodeGen/AVR/rust-bug-98167.ll

  Log Message:
  [AVR] Fix expanding MOVW for overlapping registers

When expanding a MOVW (16-bit copy) to two MOVs (8-bit copy), the
lower byte always comes first. This is incorrect for corner cases like
'$r24r23 -> $r25r24', in which the higher byte copy should come first.

Current patch fixes that bug as recorded at

Reviewed By: benshi001

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

More information about the All-commits mailing list