HomePhabricator

[InstSimplify] simplify FP ops harder with FMF

Authored by spatel on Mar 12 2020, 6:10 AM.

Description

[InstSimplify] simplify FP ops harder with FMF

This is part of the IR sibling for:
D75576

(I'm splitting part of the transform as a separate commit
to reduce risk. I don't know of any bugs that might be
exposed by this improved folding, but it's hard to see
those in advance...)

Details

Committed
spatelMar 12 2020, 6:13 AM
Parents
rG1e686d268980: [X86] Add FeatureFast7ByteNOP flag
Branches
Unknown
Tags
Unknown

Event Timeline

srj added a subscriber: srj.EditedMar 12 2020, 4:36 PM

This seems to have injected a breakage into Halide; as of this change, one of our tests (a vectorized reduction of a bunch of infinities to find the minimum, which should also be infinity) now fails with the result being an apparently-garbage value that varies from run to run.

srj added a comment.EditedMar 12 2020, 4:46 PM

This seems to have injected a breakage into Halide; as of this change, one of our tests (a vectorized reduction of a bunch of infinities to find the minimum, which should also be infinity) now fails with the result being an apparently-garbage value that varies from run to run.

This might be a red herring on our part: the failing test appears to be running with the equivalent of -ffast-math enabled, in which case this sort of failure is quite allowable.

EDIT: yes, this was a test we were just getting lucky with before. Sorry for the false alarm.

This seems to have injected a breakage into Halide; as of this change, one of our tests (a vectorized reduction of a bunch of infinities to find the minimum, which should also be infinity) now fails with the result being an apparently-garbage value that varies from run to run.

This might be a red herring on our part: the failing test appears to be running with the equivalent of -ffast-math enabled, in which case this sort of failure is quite allowable.

EDIT: yes, this was a test we were just getting lucky with before. Sorry for the false alarm.

Thanks for letting me know. I guessed that we'd see some fallout like this. It's also possible that the improved simplifying will trigger some other transform(s) that may not be sound. If we need to revert to investigate, let me know.