[PATCH] D14986: Fix Thumb1 epilogue generation

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 14:34:09 PST 2015


qcolombet added inline comments.

================
Comment at: lib/Target/ARM/Thumb1FrameLowering.cpp:411
@@ -411,3 +410,3 @@
     if (CSI.getReg() == ARM::LR)
-      IsV4PopReturn = true;
-  return IsV4PopReturn && STI.hasV4TOps() && !STI.hasV5TOps();
+      return true;
+
----------------
Add a comment saying that LR cannot be encoded with Thumb1, i.e., it requires a special fix-up.

================
Comment at: test/CodeGen/Thumb/pop-special-fixup.ll:3
@@ +2,3 @@
+
+target triple = "thumbv6m-none-none-eabi"
+
----------------
Is there a chance this test could be merged with the shrink-wrapping one since it explicitly checks with shrink-wrapping enabled?

If that is the case,  change the name of the function from test to popSpecialFixup.

================
Comment at: test/CodeGen/Thumb/pop-special-fixup.ll:8
@@ +7,3 @@
+define i32 @test(i32 %i, i32 %argc, i8** nocapture readonly %argv) {
+  %1 = icmp sgt i32 %argc, %i
+  br i1 %1, label %2, label %19
----------------
Please use opt -instnamer to get rid of the %num variables.


http://reviews.llvm.org/D14986





More information about the llvm-commits mailing list