[llvm] [InstCombine] Check isGuaranteedNotToBeUndef in haveNoCommonBitsSetSp… (PR #74390)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 02:16:18 PST 2023


nikic wrote:

> Do we only want to do this when the caller is going to set the disjoint flag?

I'm pretty sure that some other uses that don't set the disjoint flag are also affected, just in ways that we don't notice. E.g. SCEV uses haveNoCommonBitsSet to create an `add nuw nsw` expression, which would also not be correct for undef values. So I think we should not try to distinguish whether disjoint will be used or not.

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


More information about the llvm-commits mailing list