Index: llvm/lib/Target/AVR/AVRFrameLowering.cpp =================================================================== --- llvm/lib/Target/AVR/AVRFrameLowering.cpp +++ llvm/lib/Target/AVR/AVRFrameLowering.cpp @@ -79,9 +79,9 @@ .addReg(AVR::R0, RegState::Kill) .setMIFlag(MachineInstr::FrameSetup); BuildMI(MBB, MBBI, DL, TII.get(AVR::EORRdRr)) - .addReg(AVR::R0, RegState::Define) - .addReg(AVR::R0, RegState::Kill) - .addReg(AVR::R0, RegState::Kill) + .addReg(AVR::R1, RegState::Define) + .addReg(AVR::R1, RegState::Kill) + .addReg(AVR::R1, RegState::Kill) .setMIFlag(MachineInstr::FrameSetup); } Index: llvm/test/CodeGen/AVR/interrupts.ll =================================================================== --- llvm/test/CodeGen/AVR/interrupts.ll +++ llvm/test/CodeGen/AVR/interrupts.ll @@ -7,7 +7,7 @@ ; CHECK-NEXT: push r1 ; CHECK-NEXT: in r0, 63 ; CHECK-NEXT: push r0 -; CHECK: clr r0 +; CHECK: clr r1 ; CHECK: pop r0 ; CHECK-NEXT: out 63, r0 ; CHECK-NEXT: pop r1 @@ -23,7 +23,7 @@ ; CHECK-NEXT: push r1 ; CHECK-NEXT: in r0, 63 ; CHECK-NEXT: push r0 -; CHECK: clr r0 +; CHECK: clr r1 ; CHECK: pop r0 ; CHECK-NEXT: out 63, r0 ; CHECK-NEXT: pop r1 @@ -39,7 +39,7 @@ ; CHECK-NEXT: push r1 ; CHECK-NEXT: in r0, 63 ; CHECK-NEXT: push r0 -; CHECK: clr r0 +; CHECK: clr r1 ; CHECK: pop r0 ; CHECK-NEXT: out 63, r0 ; CHECK-NEXT: pop r1 @@ -55,7 +55,7 @@ ; CHECK-NEXT: push r1 ; CHECK-NEXT: in r0, 63 ; CHECK-NEXT: push r0 -; CHECK: clr r0 +; CHECK: clr r1 ; CHECK: pop r0 ; CHECK-NEXT: out 63, r0 ; CHECK-NEXT: pop r1 @@ -71,7 +71,7 @@ ; CHECK-NEXT: push r1 ; CHECK-NEXT: in r0, 63 ; CHECK-NEXT: push r0 -; CHECK: clr r0 +; CHECK: clr r1 ; CHECK: push r28 ; CHECK-NEXT: push r29 ; CHECK-NEXT: in r28, 61