Optimize "NEGW 'Rd+1 : Rd' to
neg Rd+1
neg Rd
sbci Rd+1, 0
Paths
| Differential D88658
[AVR] Optimize the 16-bit NEGW pseudo instruction ClosedPublic Authored by benshi001 on Oct 1 2020, 7:43 AM.
Details Summary Optimize "NEGW 'Rd+1 : Rd' to neg Rd+1
Diff Detail Event TimelineComment Actions 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 Actions
The asm level tests are added in llvm/test/CodeGen/AVR/neg.ll, thanks.
This revision is now accepted and ready to land.Nov 16 2020, 10:37 PM Closed by commit rG9f8f8db33967: [AVR] Optimize the 16-bit NEGW pseudo instruction (authored by benshi001). · Explain WhyNov 17 2020, 1:52 AM This revision was automatically updated to reflect the committed changes. benshi001 marked an inline comment as done.
Revision Contents
Diff 302118 llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/test/CodeGen/AVR/neg.ll
llvm/test/CodeGen/AVR/pseudo/NEGWRd.mir
|
I do not think this is true: the C flag (part of SREG) is used in sbci.