[llvm] [ValueTracking] Fix KnownBits conflict for calls (range vs returned) (PR #84353)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 10:46:55 PST 2024


nikic wrote:

> > LGTM. We should really get rid of these conflict assertions one day.
> 
> I guess that unionWith is a usual culprit of creating KnownBits that has conflicts. One idea could be to avoid hasConflict by letting unionWith reset the info by itself in case the result would be conflicting.

Long-term we'd like to just keep the conflict result and fold to poison based on it. Just annoying to carry that through. But short-term, doing the reset directly in unionWith does sound like a good way to avoid most of these issues...

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


More information about the llvm-commits mailing list