This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Use `isKnownNonZero` for checking if `sdiv`/`srem` are speculatable
AbandonedPublic

Authored by goldstein.w.n on Apr 30 2023, 10:01 PM.

Details

Summary

Previously was using KnownBits.isNonZero() which is weaker the
isKnownNonZero. KnownBits.isNonZero() requires us to actually know
a bit which is often not the case even when we know non-zero.

Diff Detail