[PATCH] D6229: [mips][microMIPS] Use swm32/lwm32 instructions in function prologue/epilogue

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 06:17:48 PDT 2018


sdardis added reviewers: atanasyan, smaksimovic, abeserminji.
sdardis requested changes to this revision.
sdardis added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: arichardson.

Please rebase this.



================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:492
   let DecoderMethod = "DecodeMemMMImm12";
   let mayStore = 1;
 }
----------------
This requires a target flag like hasForbiddenSlot, isUnsafeInDelaySlot to mark these instructions as being unsafe in delay slots. The delay slot filler should recognise that flag. That flag should also be added to lwp and swp.

That should be done as a separate patch.


================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:500
   let DecoderMethod = "DecodeMemMMImm12";
   let mayLoad = 1;
 }
----------------
As above.


================
Comment at: test/CodeGen/Mips/micromips-swm-lwm.ll:1
+; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
+; RUN:   -relocation-model=pic -O3 < %s | FileCheck %s
----------------
Use the update_llc_checks.py script to generate the tests.


================
Comment at: test/CodeGen/Mips/micromips-swm-lwm.ll:9
+
+define i32 @_Z3fooiiii(i32 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) #0 {
+entry:
----------------
Remove the #0 from this function definition.


================
Comment at: test/CodeGen/Mips/micromips-swm-lwm.ll:27
+
+declare i32 @_Z3bariiii(i32, i32, i32, i32) #0
+
----------------
Here too.


https://reviews.llvm.org/D6229





More information about the llvm-commits mailing list