[PATCH] D53366: [mips][micromips] Add pattern for JmpLink to TargetExternalSymbol

Aleksandar Beserminji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 03:04:34 PDT 2018


abeserminji added inline comments.


================
Comment at: test/CodeGen/Mips/micromips-target-external-symbol-reloc.ll:1
+; RUN: llc -mtriple=mips-mti-linux-gnu -mcpu=mips32r2 -mattr=+micromips -filetype=obj < %s | llvm-objdump -D -r - | FileCheck %s
+
----------------
sdardis wrote:
> This test can be made better by declaring an external function f rather than memset as the memset intrinsic could be expanded inline by the MIPS backend in the future in any number of ways, e.g. lwm/swm in a loop for O3.
> 
> Another thing is that the test can be quicker by stopping after the isel expand pseudos pass and checking for the presence of JAL_MM, rather than assemblying an object then disassembling it. Another approach would be to extend test/CodeGen/Mips/llvm-ir/isel.ll for this case.
Hello Simon, good to hear from you

I tried the solution you proposed before submitting this one, but it didn't work.
If I declare an external function, I don't get a call with JAL.
Then I found this very old post: 
http://lists.llvm.org/pipermail/llvm-dev/2006-October/006973.html
So I guess if it still stands, it explains why I couldn't use external function for this test.

And for the second part of the comment, I will make these changes with new update.



Repository:
  rL LLVM

https://reviews.llvm.org/D53366





More information about the llvm-commits mailing list