[PATCH] D99467: [AVR] Fix a bug in prologue of ISR
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 06:45:00 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc85175c5f6a9: [AVR] Fix a bug in prologue of ISR (authored by benshi001).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99467/new/
https://reviews.llvm.org/D99467
Files:
llvm/lib/Target/AVR/AVRFrameLowering.cpp
llvm/test/CodeGen/AVR/interrupts.ll
Index: llvm/test/CodeGen/AVR/interrupts.ll
===================================================================
--- llvm/test/CodeGen/AVR/interrupts.ll
+++ 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
Index: llvm/lib/Target/AVR/AVRFrameLowering.cpp
===================================================================
--- llvm/lib/Target/AVR/AVRFrameLowering.cpp
+++ 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99467.355218.patch
Type: text/x-patch
Size: 1702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/a01b21be/attachment.bin>
More information about the llvm-commits
mailing list