If the target lowering decides to create a call from a memory intrinsic (memcpy, memmove or memset), the call will not become a tail call even if it is possible.
This patch enables such conversion.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi Duncan. Owen seems to be MIA and you've been making changes to the SDAG code recently. Could you review?
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
---|---|---|
4598 | This code sequence is repeated in a few places. Could it be extracted (and commented)? |
Comment Actions
This is causing test failures for me, because it's jumping to _memset rather than memset (host platform is OS X). Probably needs an appropriate triple set.
/Users/kfischer/Projects/llvm2/test/CodeGen/X86/tailcall-mem-intrinsics.ll:20:10: error: expected string not found in input ; CHECK: jmp memset ^ <stdin>:17:13: note: scanning from here _tail_memset: ## @tail_memset ^ <stdin>:19:2: note: possible intended match here jmp _memset ## TAILCALL
Comment Actions
Sorry, I should have mentioned that the same problem occurs with AArch64 as
well, but adding -mtriple=aarch64-pc-linux-gnu fixes it.
2015-04-13 16:28 GMT-04:00 Krzysztof Parzyszek <kparzysz@codeaurora.org>:
Fixed the x86 testcase in r234793.
REPOSITORY
rL LLVMEMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
This code sequence is repeated in a few places. Could it be extracted (and commented)?