[PATCH] D117831: [AVR] Remove regalloc workaround for LDDWRdPtrQ
Ayke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 23 08:08:22 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG153359180a9d: [AVR] Remove regalloc workaround for LDDWRdPtrQ (authored by aykevl).
Changed prior to commit:
https://reviews.llvm.org/D117831?vs=401755&id=402335#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117831/new/
https://reviews.llvm.org/D117831
Files:
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/lib/Target/AVR/AVRRegisterInfo.td
llvm/test/CodeGen/AVR/lpmx.ll
Index: llvm/test/CodeGen/AVR/lpmx.ll
===================================================================
--- llvm/test/CodeGen/AVR/lpmx.ll
+++ llvm/test/CodeGen/AVR/lpmx.ll
@@ -22,13 +22,12 @@
; CHECK-O0-NEXT: out 61, r28
; CHECK-O0-NEXT: std Y+1, r24
; CHECK-O0-NEXT: std Y+2, r25
-; CHECK-O0-NEXT: ldd r24, Y+1
-; CHECK-O0-NEXT: ldd r25, Y+2
-; CHECK-O0-NEXT: lsl r24
-; CHECK-O0-NEXT: rol r25
-; CHECK-O0-NEXT: subi r24, -lo8(arr0)
-; CHECK-O0-NEXT: sbci r25, -hi8(arr0)
-; CHECK-O0-NEXT: movw r30, r24
+; CHECK-O0-NEXT: ldd r30, Y+1
+; CHECK-O0-NEXT: ldd r31, Y+2
+; CHECK-O0-NEXT: lsl r30
+; CHECK-O0-NEXT: rol r31
+; CHECK-O0-NEXT: subi r30, -lo8(arr0)
+; CHECK-O0-NEXT: sbci r31, -hi8(arr0)
; CHECK-O0-NEXT: lpm r24, Z+
; CHECK-O0-NEXT: lpm r25, Z
; CHECK-O0-NEXT: adiw r28, 2
@@ -95,11 +94,10 @@
; CHECK-O0-NEXT: out 61, r28
; CHECK-O0-NEXT: std Y+1, r24
; CHECK-O0-NEXT: std Y+2, r25
-; CHECK-O0-NEXT: ldd r24, Y+1
-; CHECK-O0-NEXT: ldd r25, Y+2
-; CHECK-O0-NEXT: subi r24, -lo8(arr1)
-; CHECK-O0-NEXT: sbci r25, -hi8(arr1)
-; CHECK-O0-NEXT: movw r30, r24
+; CHECK-O0-NEXT: ldd r30, Y+1
+; CHECK-O0-NEXT: ldd r31, Y+2
+; CHECK-O0-NEXT: subi r30, -lo8(arr1)
+; CHECK-O0-NEXT: sbci r31, -hi8(arr1)
; CHECK-O0-NEXT: lpm r24, Z
; CHECK-O0-NEXT: adiw r28, 2
; CHECK-O0-NEXT: in r0, 63
Index: llvm/lib/Target/AVR/AVRRegisterInfo.td
===================================================================
--- llvm/lib/Target/AVR/AVRRegisterInfo.td
+++ llvm/lib/Target/AVR/AVRRegisterInfo.td
@@ -178,26 +178,6 @@
R29R28, R17R16, R15R14, R13R12, R11R10, R9R8,
R7R6, R5R4, R3R2, R1R0)>;
-// The 16-bit DREGS register class, excluding the Z pointer register.
-//
-// This is used by instructions which cause high pointer register
-// contention which leads to an assertion in the register allocator.
-//
-// There is no technical reason why instructions that use this class
-// cannot use Z; it's simply a workaround a regalloc bug.
-//
-// More information can be found in PR39553.
-def DREGS_WITHOUT_YZ_WORKAROUND
- : RegisterClass<"AVR", [i16], 8,
- (
- // Return value and arguments.
- add R25R24, R19R18, R21R20, R23R22,
- // Scratch registers.
- R27R26,
- // Callee saved registers.
- R17R16, R15R14, R13R12, R11R10, R9R8, R7R6, R5R4, R3R2,
- R1R0)>;
-
// 16-bit register class for immediate instructions.
def DLDREGS : RegisterClass<"AVR", [i16], 8,
(
Index: llvm/lib/Target/AVR/AVRInstrInfo.td
===================================================================
--- llvm/lib/Target/AVR/AVRInstrInfo.td
+++ llvm/lib/Target/AVR/AVRInstrInfo.td
@@ -1394,7 +1394,7 @@
// ldd Rd, P+q
// ldd Rd+1, P+q+1
let Constraints = "@earlyclobber $dst" in def LDDWRdPtrQ
- : Pseudo<(outs DREGS_WITHOUT_YZ_WORKAROUND
+ : Pseudo<(outs DREGS
: $dst),
(ins memri
: $memri),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117831.402335.patch
Type: text/x-patch
Size: 3227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220123/f5229123/attachment.bin>
More information about the llvm-commits
mailing list