diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
--- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
@@ -83,6 +83,11 @@
         .addReg(AVR::R0, RegState::Kill)
         .addReg(AVR::R0, RegState::Kill)
         .setMIFlag(MachineInstr::FrameSetup);
+    BuildMI(MBB, MBBI, DL, TII.get(AVR::EORRdRr))
+        .addReg(AVR::R1, RegState::Define)
+        .addReg(AVR::R1, RegState::Kill)
+        .addReg(AVR::R1, RegState::Kill)
+        .setMIFlag(MachineInstr::FrameSetup);
   }
 
   // Early exit if the frame pointer is not needed in this function.
diff --git a/llvm/test/CodeGen/AVR/interrupts.ll b/llvm/test/CodeGen/AVR/interrupts.ll
--- a/llvm/test/CodeGen/AVR/interrupts.ll
+++ b/llvm/test/CodeGen/AVR/interrupts.ll
@@ -8,6 +8,7 @@
 ; CHECK-NEXT: in r0, 63
 ; CHECK-NEXT: push r0
 ; CHECK: clr r0
+; CHECK-NEXT: clr r1
 ; CHECK: pop r0
 ; CHECK-NEXT: out 63, r0
 ; CHECK-NEXT: pop r1
@@ -24,6 +25,7 @@
 ; CHECK-NEXT: in r0, 63
 ; CHECK-NEXT: push r0
 ; CHECK: clr r0
+; CHECK-NEXT: clr r1
 ; CHECK: pop r0
 ; CHECK-NEXT: out 63, r0
 ; CHECK-NEXT: pop r1
@@ -40,6 +42,7 @@
 ; CHECK-NEXT: in r0, 63
 ; CHECK-NEXT: push r0
 ; CHECK: clr r0
+; CHECK-NEXT: clr r1
 ; CHECK: pop r0
 ; CHECK-NEXT: out 63, r0
 ; CHECK-NEXT: pop r1
@@ -56,6 +59,7 @@
 ; CHECK-NEXT: in r0, 63
 ; CHECK-NEXT: push r0
 ; CHECK: clr r0
+; CHECK-NEXT: clr r1
 ; CHECK: pop r0
 ; CHECK-NEXT: out 63, r0
 ; CHECK-NEXT: pop r1
@@ -72,6 +76,7 @@
 ; CHECK-NEXT: in r0, 63
 ; CHECK-NEXT: push r0
 ; CHECK: clr r0
+; CHECK-NEXT: clr r1
 ; CHECK: push r28
 ; CHECK-NEXT: push r29
 ; CHECK-NEXT: in r28, 61