This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] propagate poison through FP ops
ClosedPublic

Authored by spatel on Jun 16 2021, 7:09 AM.

Details

Summary

We already have this fold:

fadd float poison, 1.0 --> poison

...via ConstantFolding, so this makes the behavior consistent if the other operand(s) are non-constant.

The fold for undef was added before poison existed as a value/type in IR.

This came up in D102673 / D103169 because we're trying to sort out the more complicated handling for constrained math ops.
We should have the handling for the regular instructions done first, so we can build on that (or diverge as needed).

Diff Detail

Event Timeline

spatel created this revision.Jun 16 2021, 7:09 AM
spatel requested review of this revision.Jun 16 2021, 7:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2021, 7:09 AM
nlopes accepted this revision.Jun 16 2021, 7:14 AM

LGTM!

This revision is now accepted and ready to land.Jun 16 2021, 7:14 AM
This revision was landed with ongoing or failed builds.Jun 16 2021, 8:33 AM
This revision was automatically updated to reflect the committed changes.