[PATCH] D159203: [InstCombine] Fold (A/-B)==(A/B) to (A/B)==0

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 13:47:22 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3153
+}
+
 /// Return true if it is known that V1 != V2.
----------------
marcauberer wrote:
> goldstein.w.n wrote:
> > marcauberer wrote:
> > > goldstein.w.n wrote:
> > > > This at the very least should be a seperate patch and should probably fit into:
> > > > `IsCondKnownTrue` not be its own API.
> > > I cannot find `IsCondKnownTrue`. Where can I find it?
> > Crap I pasted the wrong thing. Mean: `simplifyICmpInst`
> I think I don't quite understand ... This newly added function is essentially the same as `computeKnownBitsFromAssume` or `isKnownNonZeroFromAssume` just for `isKnownNonEqual`. Why should this fit into `simplifyICmpInst`. Isn't this relevant overall for ValueTracking?
> I agree regarding the split into a new patch.
Sorry I misunderstood an aspect of you patch. Please split this part but you're right it belongs as it is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159203



More information about the llvm-commits mailing list