[PATCH] D91331: [NFC] Add hook for target to customize different legalization action according to the input type
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 02:38:11 PST 2020
steven.zhang added a comment.
In D91331#2404493 <https://reviews.llvm.org/D91331#2404493>, @craig.topper wrote:
> In D91331#2396746 <https://reviews.llvm.org/D91331#2396746>, @steven.zhang wrote:
>
>> I have to reopen this revision as the custom way still cannot meet PowerPC's requirement, because it will try to expand it first. From the implementation, it seems that we are trying our best to expand the node without checking the legalization of the expanded node, which results in several runtime call eventually. And sometimes, the expand never fall into libcall for some opcode ... See
>>
>> case ISD::SINT_TO_FP:
>> case ISD::STRICT_SINT_TO_FP:
>> Tmp1 = ExpandLegalINT_TO_FP(Node, Tmp2);
>> Results.push_back(Tmp1);
>> if (Node->isStrictFPOpcode())
>> Results.push_back(Tmp2);
>> break;
>>
>> What we are trying to do is to call the runtime call for such operations.
>>
>> Address Reviewer's comments.
>
> Yeah if you want to emit a libcall that is an issue. AArch64 and X86 both worked around this by emitting libcalls directly from Custom handling. See the callers of LowerF128Call in both targets. But this change might be better.
Thank you for the information. I will try to remove those code from AArch64 and X86 and use the way I did in D91757 <https://reviews.llvm.org/D91757> to common all the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91331/new/
https://reviews.llvm.org/D91331
More information about the llvm-commits
mailing list