[PATCH] D14986: Fix Thumb1 epilogue generation

Jonathan Roelofs via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 17:32:48 PST 2015



On 11/25/15 5:41 PM, A. Skrobov wrote:
> tyomitch updated this revision to Diff 41198.
> tyomitch added a comment.
>
>> Would you mind leaving a FIXME in `emitPopSpecialFixUp`
>
>
> I can do better, and actually implement that missing optimization there :-)

:)

>
>
> http://reviews.llvm.org/D14986
>
> Files:
>    lib/Target/ARM/Thumb1FrameLowering.cpp
>    test/CodeGen/Thumb/pop-special-fixup.ll
>    test/CodeGen/Thumb/thumb-shrink-wrapping.ll
>

Index: test/CodeGen/Thumb/thumb-shrink-wrapping.ll
===================================================================
--- test/CodeGen/Thumb/thumb-shrink-wrapping.ll
+++ test/CodeGen/Thumb/thumb-shrink-wrapping.ll
@@ -39,7 +39,7 @@
  ;
  ; With shrink-wrapping, epilogue is just after the call.
  ; ENABLE-NEXT: add sp, #8
-; ENABLE-NEXT: pop {r7, lr}
+; ENABLE-NEXT: pop {r7, pc}
  ;
  ; CHECK: [[EXIT_LABEL]]:
  ;

This ^ does not look correct for v4t, which doesn't support changing the thumb 
bit via a pop into pc.

Can you please add `-triple armv4t-none-none-eabi`, `-triple 
armv5t-none-none-eabi`, and `-triple thumbv6m-none-none-eabi` RUN lines, and 
corresponding CHECKs to this testcase?  Same for the new testcase too, actually.


Jon

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded


More information about the llvm-commits mailing list