This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] fix CannotBeNegativeZero() to disregard 'nsz' FMF
ClosedPublic

Authored by spatel on May 5 2020, 8:08 AM.

Details

Summary

The 'nsz' flag is different than 'nnan' or 'ninf' in that it does not create poison. Make that explicit in the LangRef and fix ValueTracking analysis that misinterpreted the definition.

This manifests as bugs in InstSimplify shown in the test diffs and as discussed in PR45778:
https://bugs.llvm.org/show_bug.cgi?id=45778

Diff Detail

Event Timeline

spatel created this revision.May 5 2020, 8:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2020, 8:08 AM
This revision is now accepted and ready to land.May 5 2020, 10:20 AM
This revision was automatically updated to reflect the committed changes.