[PATCH] D60397: [Sparc] Fix incorrect MI insertion position for spilling f128.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 18:55:04 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL358042: [Sparc] Fix incorrect MI insertion position for spilling f128. (authored by jimlin, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D60397?vs=194236&id=194436#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60397/new/
https://reviews.llvm.org/D60397
Files:
llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
llvm/trunk/test/CodeGen/SPARC/fp128.ll
Index: llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
+++ llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
@@ -188,7 +188,7 @@
MachineInstr *StMI =
BuildMI(*MI.getParent(), II, dl, TII.get(SP::STDFri))
.addReg(FrameReg).addImm(0).addReg(SrcEvenReg);
- replaceFI(MF, II, *StMI, dl, 0, Offset, FrameReg);
+ replaceFI(MF, *StMI, *StMI, dl, 0, Offset, FrameReg);
MI.setDesc(TII.get(SP::STDFri));
MI.getOperand(2).setReg(SrcOddReg);
Offset += 8;
@@ -200,7 +200,7 @@
MachineInstr *StMI =
BuildMI(*MI.getParent(), II, dl, TII.get(SP::LDDFri), DestEvenReg)
.addReg(FrameReg).addImm(0);
- replaceFI(MF, II, *StMI, dl, 1, Offset, FrameReg);
+ replaceFI(MF, *StMI, *StMI, dl, 1, Offset, FrameReg);
MI.setDesc(TII.get(SP::LDDFri));
MI.getOperand(0).setReg(DestOddReg);
Index: llvm/trunk/test/CodeGen/SPARC/fp128.ll
===================================================================
--- llvm/trunk/test/CodeGen/SPARC/fp128.ll
+++ llvm/trunk/test/CodeGen/SPARC/fp128.ll
@@ -53,6 +53,29 @@
ret void
}
+; CHECK-LABEL: f128_spill_large:
+; CHECK: sethi 4, %g1
+; CHECK: sethi 4, %g1
+; CHECK-NEXT: add %g1, %sp, %g1
+; CHECK-NEXT: std %f{{.+}}, [%g1]
+; CHECK: sethi 4, %g1
+; CHECK-NEXT: add %g1, %sp, %g1
+; CHECK-NEXT: std %f{{.+}}, [%g1+8]
+; CHECK: sethi 4, %g1
+; CHECK-NEXT: add %g1, %sp, %g1
+; CHECK-NEXT: ldd [%g1], %f{{.+}}
+; CHECK: sethi 4, %g1
+; CHECK-NEXT: add %g1, %sp, %g1
+; CHECK-NEXT: ldd [%g1+8], %f{{.+}}
+
+define void @f128_spill_large(<251 x fp128>* noalias sret %scalar.result, <251 x fp128>* byval %a) {
+entry:
+ %0 = load <251 x fp128>, <251 x fp128>* %a, align 8
+ call void asm sideeffect "", "~{f0},~{f1},~{f2},~{f3},~{f4},~{f5},~{f6},~{f7},~{f8},~{f9},~{f10},~{f11},~{f12},~{f13},~{f14},~{f15},~{f16},~{f17},~{f18},~{f19},~{f20},~{f21},~{f22},~{f23},~{f24},~{f25},~{f26},~{f27},~{f28},~{f29},~{f30},~{f31}"()
+ store <251 x fp128> %0, <251 x fp128>* %scalar.result, align 8
+ ret void
+}
+
; CHECK-LABEL: f128_compare:
; HARD: fcmpq
; HARD-NEXT: nop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60397.194436.patch
Type: text/x-patch
Size: 2259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190410/705e98b0/attachment.bin>
More information about the llvm-commits
mailing list