[llvm] r264147 - [mips][microMIPS] Delay slot filler modifications
Hrvoje Varga via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 03:29:39 PDT 2016
Author: hvarga
Date: Wed Mar 23 05:29:38 2016
New Revision: 264147
URL: http://llvm.org/viewvc/llvm-project?rev=264147&view=rev
Log:
[mips][microMIPS] Delay slot filler modifications
Differential Revision: http://reviews.llvm.org/D18181
Modified:
llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
llvm/trunk/test/CodeGen/Mips/micromips-delay-slot.ll
Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=264147&r1=264146&r2=264147&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Wed Mar 23 05:29:38 2016
@@ -562,6 +562,12 @@ bool Filler::runOnMachineBasicBlock(Mach
bool InMicroMipsMode = STI.inMicroMipsMode();
const MipsInstrInfo *TII = STI.getInstrInfo();
+ if (InMicroMipsMode && STI.hasMips32r6()) {
+ // This is microMIPS32r6 or microMIPS64r6 processor. Delay slot for
+ // branching instructions is not needed.
+ return Changed;
+ }
+
for (Iter I = MBB.begin(); I != MBB.end(); ++I) {
if (!hasUnoccupiedSlot(&*I))
continue;
Modified: llvm/trunk/test/CodeGen/Mips/micromips-delay-slot.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/micromips-delay-slot.ll?rev=264147&r1=264146&r2=264147&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/micromips-delay-slot.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/micromips-delay-slot.ll Wed Mar 23 05:29:38 2016
@@ -1,5 +1,7 @@
; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
; RUN: -relocation-model=static -O2 < %s | FileCheck %s
+; RUN: llc -march=mipsel -mcpu=mips32r6 -mattr=+micromips \
+; RUN: -relocation-model=static -O2 < %s | FileCheck %s -check-prefix=CHECK-MMR6
; Function Attrs: nounwind
define i32 @foo(i32 signext %a) #0 {
@@ -16,3 +18,5 @@ declare i32 @bar(i32 signext) #1
; CHECK: jals
; CHECK-NEXT: sll16
+; CHECK-MMR6: jal
+; CHECK-MMR6-NOT: sll16
More information about the llvm-commits
mailing list