[PATCH] D106139: [DAGCombine] Combine srX of add that intends to get the carry as uaddo

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 09:39:58 PDT 2021


abinavpp added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8818
+
+  DAG.ReplaceAllUsesOfValueWith(N0.getValue(0), UAddO.getValue(0));
+  return DAG.getZExtOrTrunc(UAddO.getValue(1), SDLoc(N), N->getValueType(0));
----------------
craig.topper wrote:
> abinavpp wrote:
> > craig.topper wrote:
> > > N0.getValue(0) and UAddO.getValue(0) don't have the same type do they?
> > Correct.
> If the types are different then calling ReplaceAllUsesOfValueWith seems incorrect. What am I missing?
I'm sorry, that ReplaceAllUsesOfValueWith() should not have been here, I have removed it. I have added some more comments since the update of uses here is tricky.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106139/new/

https://reviews.llvm.org/D106139



More information about the llvm-commits mailing list