Patryk27 marked 2 inline comments as done. Patryk27 added inline comments.
================ Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1174 - auto MIBLO = buildMI(MBB, MBBI, OpLo) - .addReg(DstReg) - .addImm(Imm) - .addReg(SrcLoReg, getKillRegState(SrcIsKill)); + buildMI(MBB, MBBI, AVR::SBCIWRdK) + .addReg(DstReg, RegState::Define) ---------------- benshi001 wrote: > benshi001 wrote: > > Patryk27 wrote: > > > benshi001 wrote: > > > > The above built error is caused by this line, this should be a SUBI > > > > other than a SBCI. > > > Out of curiosity, why SUBI? (just trying to understand what is the > > > difference between both) > > > > > > It looks like currently - > > > https://github.com/llvm/llvm-project/blob/d9cea8d3a8fff86672174780312674871729578c/llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp#L101 > > > - we expand to SBCI. > > I thought this should be an old bug which has never been triggered. > > Actually if C bit in SREG is set before current `STWPtrPdRr`, then it is > > sure to run into wrong. > Sorry, I think this should be a SUBIW, neither SBCIW nor SUBI. Right, great catch - fixed! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122533/new/ https://reviews.llvm.org/D122533 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits