[PATCH] D89786: [PowerPC] Avoid unnecessary fadd for unsigned to ppcf128
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 22 20:12:17 PDT 2020
    
    
  
efriedma added inline comments.
================
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)
----------------
qiucf wrote:
> efriedma wrote:
> > 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.
> Ah, that's right.
With that change, I think ConvOp is just N->getOpcode()?
Also, the SIGN_EXTEND/ZERO_EXTEND isn't necessary.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89786/new/
https://reviews.llvm.org/D89786
    
    
More information about the llvm-commits
mailing list