[PATCH] D60365: [AVR] Fix codegen for rotate instructions

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 04:28:38 PDT 2019


dylanmckay added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRInstrInfo.td:1682
+                        "rolb\t$rd",
+                        [(set i8:$rd, (AVRrol i8:$src)), (implicit SREG)]>;
+
----------------
What does the `b` stand for in the instruction mnemonics?

Perhaps it would make sense to rename the AVR ISD nodes (such as `AVRrol` and `AVRror` to `AVRbrol` `AVRbror`).


================
Comment at: llvm/lib/Target/AVR/AVRInstrInfo.td:1687
+                        "rorb\t$rd",
+                        [(set i8:$rd, (AVRrol i8:$src)), (implicit SREG)]>;
+
----------------
This instruction is a right rotation, but the pattern matches on a left rotation `AVRrol`, which is also the exact same pattern as the other new instruction.

Should this be `AVRror`?


================
Comment at: llvm/lib/Target/AVR/AVRInstrInfo.td:1699
                     "ror\t$rd",
                     [(set i8:$rd, (AVRror i8:$src)), (implicit SREG)]>;
 
----------------
The patterns for `RORRd` and co still exist. Should these be removed so that we never ISel them by default?


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

https://reviews.llvm.org/D60365





More information about the llvm-commits mailing list