[PATCH] D92645: [X86] Add X86ISD::SUBV_BROADCAST_LOAD and begin removing X86ISD::SUBV_BROADCAST (PR38969)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 15:39:42 PST 2020


craig.topper added a comment.

I think this looks good to me. What about you @yubing?



================
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;
----------------
RKSimon wrote:
> RKSimon wrote:
> > 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
> @craig.topper Do you think we would be better off just replacing the old makeEquivalentMemoryOrdering(LoadSDNode*,SDValue) version entirely with the new makeEquivalentMemoryOrdering(SDValue,SDValue) one?
We can look at removing it as a follow up.


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