[PATCH] D47437: [PowerPC] Fix the incorrect iterator inside peephole
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 06:43:11 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333415: [PowerPC] Fix the incorrect iterator inside peephole (authored by lei, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47437?vs=148775&id=148895#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47437
Files:
llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
Index: llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
===================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
+++ llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
@@ -43,10 +43,10 @@
; CHECK: .LCPI[[LC]]_1:
; CHECK: .long 0
; CHECK: @caller_const
-; CHECK: addi [[REG0:[0-9]+]], {{[0-9]+}}, .LCPI[[LC]]_0
-; CHECK: addi [[REG1:[0-9]+]], {{[0-9]+}}, .LCPI[[LC]]_1
-; CHECK: lfs 1, 0([[REG0]])
-; CHECK: lfs 2, 0([[REG1]])
+; CHECK: addis [[REG0:[0-9]+]], 2, .LCPI[[LC]]_0 at toc@ha
+; CHECK: addis [[REG1:[0-9]+]], 2, .LCPI[[LC]]_1 at toc@ha
+; CHECK: lfs 1, .LCPI[[LC]]_0 at toc@l([[REG0]])
+; CHECK: lfs 2, .LCPI[[LC]]_1 at toc@l([[REG1]])
; CHECK: bl test
define ppc_fp128 @result() {
Index: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
===================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -5169,8 +5169,7 @@
}
void PPCDAGToDAGISel::PreprocessISelDAG() {
- SelectionDAG::allnodes_iterator Position(CurDAG->getRoot().getNode());
- ++Position;
+ SelectionDAG::allnodes_iterator Position = CurDAG->allnodes_end();
bool MadeChange = false;
while (Position != CurDAG->allnodes_begin()) {
@@ -5858,8 +5857,7 @@
// unnecessary. When that happens, we remove it here, and redefine the
// relevant 32-bit operation to be a 64-bit operation.
- SelectionDAG::allnodes_iterator Position(CurDAG->getRoot().getNode());
- ++Position;
+ SelectionDAG::allnodes_iterator Position = CurDAG->allnodes_end();
bool MadeChange = false;
while (Position != CurDAG->allnodes_begin()) {
@@ -6016,8 +6014,7 @@
if (PPCSubTarget->isDarwin() || !PPCSubTarget->isPPC64())
return;
- SelectionDAG::allnodes_iterator Position(CurDAG->getRoot().getNode());
- ++Position;
+ SelectionDAG::allnodes_iterator Position = CurDAG->allnodes_end();
while (Position != CurDAG->allnodes_begin()) {
SDNode *N = &*--Position;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47437.148895.patch
Type: text/x-patch
Size: 2033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180529/0addcd31/attachment.bin>
More information about the llvm-commits
mailing list