[llvm] [ValueTracking] isNonZero trunc of sub of ptr2int's with recursive GEP where pointers are limited to a 32bit alloc. (PR #84933)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 14:03:11 PDT 2024


bipmis wrote:

> > > I think this special case is probably misplaced given that we have `trunc nuw/nsw`. I think this should be converted to a fold in InstCombine that adds `nuw` flag to the `trunc`. I have a patch to support `nuw`/`nsw` is isKnownNonZero for `trunc`: #89643
> > 
> > 
> > Could be done. I think we can have this here for now and I can possibly do an update to trunc in InstCombine once the patch lands.
> 
> That patch will land today.

Great. Made the changes.

https://github.com/llvm/llvm-project/pull/84933


More information about the llvm-commits mailing list