[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
Mon Apr 22 11:11:03 PDT 2024


goldsteinn 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`: https://github.com/llvm/llvm-project/pull/89643

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


More information about the llvm-commits mailing list