When matching MipsISD::JmpLink t9, TargetExternalSymbol:i32'memset'...
wrong JALR16_MM is selected. This patch adds missing pattern for JmpLink,
so that JAL instruction is selected.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/MicroMipsInstrInfo.td | ||
---|---|---|
1454 ↗ | (On Diff #169969) | This is in the wrong place. It should proceed the tail call patterns on line 1274. |
test/CodeGen/Mips/micromips-target-external-symbol-reloc.ll | ||
1 ↗ | (On Diff #169969) | 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. |
test/CodeGen/Mips/micromips-target-external-symbol-reloc.ll | ||
---|---|---|
1 ↗ | (On Diff #169969) | Hello Simon, good to hear from you I tried the solution you proposed before submitting this one, but it didn't work. And for the second part of the comment, I will make these changes with new update. |