[PATCH] D89786: [PowerPC] Avoid unnecessary fadd for unsigned to ppcf128
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 23:00:32 PDT 2020
efriedma added a comment.
> This is not PowerPC specific patch, though ppcfp128 could be expanded.
It's target-specific: no other target supports ppcfp128, and we don't "expand" other floats.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:1638
APInt(NVT.getSizeInBits(), 0)), dl, NVT);
+ HasUnsignedConv = TLI.isOperationLegalOrCustom(ISD::UINT_TO_FP, SrcVT);
+ unsigned ConvOp = (HasUnsignedConv && !isSigned)
----------------
Does the result of isOperationLegalOrCustom() actually matter here? Even if it's not legal, the UINT_TO_FP is going to be faster than the alternative.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89786/new/
https://reviews.llvm.org/D89786
More information about the llvm-commits
mailing list