[PATCH] D66243: [ARM][LowOverheadLoops] Fix generated code for "revert".
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 16:36:28 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL369069: [ARM][LowOverheadLoops] Fix generated code for "revert". (authored by efriedma, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D66243?vs=215206&id=215503#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66243/new/
https://reviews.llvm.org/D66243
Files:
llvm/trunk/lib/Target/ARM/ARMLowOverheadLoops.cpp
llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir
Index: llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
===================================================================
--- llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
+++ llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
@@ -4,7 +4,7 @@
# CHECK: bb.0.entry:
# CHECK: tBcc %bb.2, 3
# CHECK: bb.1.not.preheader:
-# CHECK: t2CMPri $lr, 0, 14
+# CHECK: t2CMPri renamable $lr, 0, 14
# CHECK: t2Bcc %bb.4, 0
# CHECK: tB %bb.2
# CHECK: bb.3.while.body:
Index: llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
===================================================================
--- llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
+++ llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
@@ -3,7 +3,7 @@
# CHECK-NOT: DoLoopStart
# CHECK-NOT: DLS
# CHECK: bb.1.for.body:
-# CHECK: t2CMPri $lr, 0, 14, $cpsr, implicit-def $cpsr
+# CHECK: t2CMPri $lr, 0, 14, $noreg, implicit-def $cpsr
# CHECK: t2Bcc %bb.3, 1, $cpsr
# CHECK: tB %bb.2, 14, $noreg
# CHECK: bb.2.for.cond.cleanup:
Index: llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir
===================================================================
--- llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir
+++ llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir
@@ -1,14 +1,14 @@
# RUN: llc -mtriple=thumbv8.1m.main -mattr=+lob -run-pass=arm-low-overhead-loops --verify-machineinstrs %s -o - | FileCheck %s
# CHECK: body:
# CHECK: bb.0.entry:
-# CHECK: t2CMPri $lr, 0, 14
+# CHECK: t2CMPri $r3, 0, 14
# CHECK-NEXT: t2Bcc %bb.3, 0, $cpsr
# CHECK-NEXT: tB %bb.1
# CHECK: bb.1.do.body.preheader:
# CHECK: $lr = tMOVr killed $r3
# CHECK: bb.2.do.body:
# CHECK: $lr = t2SUBri killed renamable $lr, 1, 14
-# CHECK-NEXT: t2CMPri $lr, 0, 14, $cpsr
+# CHECK-NEXT: t2CMPri $lr, 0, 14, $noreg, implicit-def $cpsr
# CHECK-NEXT: t2Bcc %bb.2, 1, $cpsr
# CHECK-NEXT: tB %bb.3, 14
Index: llvm/trunk/lib/Target/ARM/ARMLowOverheadLoops.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMLowOverheadLoops.cpp
+++ llvm/trunk/lib/Target/ARM/ARMLowOverheadLoops.cpp
@@ -251,10 +251,10 @@
MachineBasicBlock *MBB = MI->getParent();
MachineInstrBuilder MIB = BuildMI(*MBB, MI, MI->getDebugLoc(),
TII->get(ARM::t2CMPri));
- MIB.addReg(ARM::LR);
+ MIB.add(MI->getOperand(0));
MIB.addImm(0);
MIB.addImm(ARMCC::AL);
- MIB.addReg(ARM::CPSR);
+ MIB.addReg(ARM::NoRegister);
// TODO: Try to use tBcc instead
MIB = BuildMI(*MBB, MI, MI->getDebugLoc(), TII->get(ARM::t2Bcc));
@@ -292,7 +292,7 @@
MIB.addReg(ARM::LR);
MIB.addImm(0);
MIB.addImm(ARMCC::AL);
- MIB.addReg(ARM::CPSR);
+ MIB.addReg(ARM::NoRegister);
// TODO Try to use tBcc instead.
// Create bne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66243.215503.patch
Type: text/x-patch
Size: 2976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190815/f3caa921/attachment.bin>
More information about the llvm-commits
mailing list