[PATCH] D91331: [NFC] Add hook for target to customize different legalization action according to the input type

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 19:09:54 PST 2020


craig.topper added a comment.

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.


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