[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic
    Craig Topper via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct  4 16:14:10 PDT 2018
    
    
  
craig.topper added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8937
+
+SDValue SelectionDAG::getExpandedSignedSaturation(SDNode *Node) {
+  assert(Node->getOpcode() == ISD::SSAT);
----------------
leonardchan wrote:
> craig.topper wrote:
> > I think maybe this should be in TargetLowering if I understand anything about our division of labor today. It feels similar to expandMUL_LOHI, expandMUL, expandFP_TO_SINT, scalarizeVectorLoad, scalarizeVectorStore.
> This function is essentially for preventing duplicating code. There are different instances where we want to expand the node in the event we find the type or operation is illegal, so for convenience we call this when expanding.
TargetLowering is available to all of the places that want to do an expansion. Those other functions i mention also exist to share code. So moving this would seem consistent.
Repository:
  rL LLVM
https://reviews.llvm.org/D52286
    
    
More information about the llvm-commits
mailing list