[PATCH] D131867: [AVR] Do not emit instructions invalid for attiny10

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 00:53:21 PST 2022


benshi001 added inline comments.


================
Comment at: llvm/test/CodeGen/AVR/calling-conv/c/tiny.ll:49-59
 ; CHECK-NEXT:    in r29, 62
-; CHECK-NEXT:    ldd r30, Y+5
-; CHECK-NEXT:    ldd r31, Y+6
+; CHECK-NEXT:    in r16, 63
+; CHECK-NEXT:    subi r28, 251
+; CHECK-NEXT:    sbci r29, 255
+; CHECK-NEXT:    ld r30, Y+
+; CHECK-NEXT:    ld r31, Y+
+; CHECK-NEXT:    subi r28, 2
----------------
aykevl wrote:
> The code here is really terrible but it should be correct. I hope to optimize this in a later pass with a late pass that merges pointer adjustments.
Is such pattern common ? Is it necessary to introduce an extra pass just for this pattern? 

Since AVRTiny is a known low performance device serial, I think such pattern is OK. An extra pass will lead to longer run time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131867



More information about the llvm-commits mailing list