benshi001 added a comment. avr-gcc does 1. use r0 as tmp_reg to save/restore SREG 2. clear r1 and then use it as zero_reg but llvm clears r0 instead of expected r1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99467/new/ https://reviews.llvm.org/D99467