[PATCH] D88658: [AVR] Optimize the 16-bit NEGW pseudo instruction

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 31 13:39:07 PDT 2020


aykevl added a comment.

I think it would be a good idea to add assembly level tests in llvm/test/CodeGen/AVR/neg.ll (see for example llvm/test/CodeGen/AVR/add.ll).



================
Comment at: llvm/lib/Target/AVR/AVRInstrInfo.td:747
+  // clr Rtmp
+  // sbc Rtmp, Rd+1
+  def NEGWRd : Pseudo<(outs DREGS:$rd),
----------------
Is this correct? I only see one `neg` while both avr-gcc (https://godbolt.org/z/hETcE9) and the code in AVRExpandPseudoInsts.cpp seem to suggest two `neg` instructions are needed.


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

https://reviews.llvm.org/D88658



More information about the llvm-commits mailing list