[PATCH] D24077: [mips] LLVM PR/30197 - Tail call incorrectly clobbers arguments

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 05:59:36 PDT 2016


vkalintiris accepted this revision.
vkalintiris added a comment.
This revision is now accepted and ready to land.

LGTM but make sure that the checks from the new test enforce the correct ordering of loads/stores.


================
Comment at: test/CodeGen/Mips/tailcall/tail-call-arguments-clobber.ll:19
@@ +18,3 @@
+
+define i32 @func1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f){
+
----------------
We need a CHECK-LABEL in order to avoid sourcing instructions from func3 (similarly for func3).

================
Comment at: test/CodeGen/Mips/tailcall/tail-call-arguments-clobber.ll:21-24
@@ +20,6 @@
+
+; MIPS32: lw ${{[0-9]+}}, {{[0-9]+}}($sp)
+; MIPS32: lw ${{[0-9]+}}, {{[0-9]+}}($sp)
+; MIPS32: sw ${{[0-9]+}}, {{[0-9]+}}($sp)
+; MIPS32: sw ${{[0-9]+}}, {{[0-9]+}}($sp)
+  %retval = tail call i32 @func1(i32 %a, i32 %f, i32 %c, i32 %d, i32 %e, i32 %b)
----------------
I don't think that this set of checks will enforce the ordering of loads/stores (similarly for func3).


Repository:
  rL LLVM

https://reviews.llvm.org/D24077





More information about the llvm-commits mailing list