[PATCH] D92645: [X86] Add X86ISD::SUBV_BROADCAST_LOAD and begin removing X86ISD::SUBV_BROADCAST (PR38969)
    Simon Pilgrim via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Dec 15 03:11:53 PST 2020
    
    
  
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8977
   SDValue NewChain = SDValue(NewMemOp.getNode(), 1);
-  if (OldChain == NewChain || !OldLoad->hasAnyUseOfValue(1))
+  if (OldChain == NewChain || !OldChain.getNode()->hasAnyUseOfValue(1))
     return NewChain;
----------------
craig.topper wrote:
> Shouldn't this just be OldChain.hasAnyUseOfValue()?   We shouldn't assume "1" and should get it from the SDValue. Not sure what to do with the 1 on the line above.
Nice catch - I've explicitly changed this to take the chains directly and used the SDValue::use_empty() wrapper to hasAnyUseOfValue
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92645/new/
https://reviews.llvm.org/D92645
    
    
More information about the llvm-commits
mailing list