[PATCH] D152248: [AVR] Fix incorrect expanded pseudo instruction ROLBRd

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 02:19:17 PDT 2023


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1488
+  // due to aykevl's comment in https://reviews.llvm.org/D152063 .
+  buildMI(MBB, MBBI, AVR::EORRdRr)
+      .addReg(TmpReg, RegState::Define)
----------------
Patryk27 wrote:
> Hmm, this feels kinda excessive - wouldn't adding `let Uses = [R1]` to `ROLBRd` be sufficient?
> 
> ```
> let Uses = [R1] in
> def ROLBRd : Pseudo<(outs GPR8
>                      : $rd),
>                     (ins GPR8
>                      : $src),
>                     "rolb\t$rd",
>                     [(set i8
>                       : $rd, (AVRrol i8
>                               : $src)),
>                      (implicit SREG)]>;
> ```
Because it maybe `R17` on AVRTINY.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152248/new/

https://reviews.llvm.org/D152248



More information about the llvm-commits mailing list