[all-commits] [llvm/llvm-project] 5527b2: [AVR] Do not use R0/R1 on avrtiny

Ayke via All-commits all-commits at lists.llvm.org
Mon Nov 28 09:06:24 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5527b215160cf202431881df3be59ed5c8dabb25
      https://github.com/llvm/llvm-project/commit/5527b215160cf202431881df3be59ed5c8dabb25
  Author: Ayke van Laethem <aykevanlaethem at gmail.com>
  Date:   2022-11-28 (Mon, 28 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
    M llvm/lib/Target/AVR/AVRFrameLowering.cpp
    M llvm/lib/Target/AVR/AVRISelLowering.cpp
    M llvm/lib/Target/AVR/AVRISelLowering.h
    M llvm/lib/Target/AVR/AVRInstrInfo.td
    M llvm/lib/Target/AVR/AVRRegisterInfo.cpp
    M llvm/lib/Target/AVR/AVRSubtarget.h
    M llvm/test/CodeGen/AVR/features/avr-tiny.ll
    M llvm/test/CodeGen/AVR/pseudo/NEGWRd.mir
    M llvm/test/CodeGen/AVR/pseudo/ROLBrd.mir
    M llvm/test/CodeGen/AVR/return.ll

  Log Message:
  -----------
  [AVR] Do not use R0/R1 on avrtiny

This patch makes sure the compiler uses R16/R17 on avrtiny (attiny10
etc) instead of R0/R1.

Some notes:

  * For the NEGW and ROLB instructions, it adds an explicit zero
    register. This is necessary because the zero register is different
    on avrtiny (and InstrInfo Uses lines need a fixed register).
  * Not entirely sure about putting all tests in features/avr-tiny.ll,
    but it doesn't seem like the "target-cpu"="attiny10" attribute
    works.

Updates: https://github.com/llvm/llvm-project/issues/53459

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




More information about the All-commits mailing list