This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] fold fcmp with infinity constant using isKnownNeverInfinity
ClosedPublic

Authored by spatel on Jul 17 2020, 8:25 AM.

Details

Summary

This is a step towards trying to remove unnecessary FP compares with infinity when compiling with -ffinite-math-only or similar.
I'm intentionally not checking FMF on the fcmp itself because I'm assuming that will go away eventually.
The analysis part of this was added with rGcd481136 for use with isKnownNeverNaN. Similarly, that could be an enhancement here to get predicates like 'one' and 'ueq'.

Diff Detail

Event Timeline

spatel created this revision.Jul 17 2020, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 8:25 AM
arsenm accepted this revision.Jul 17 2020, 10:32 AM
This revision is now accepted and ready to land.Jul 17 2020, 10:32 AM
This revision was automatically updated to reflect the committed changes.