This is an archive of the discontinued LLVM Phabricator instance.

refactor of visitFADD for AllowNewConst cases

Authored by mcberg2017 on Jun 18 2018, 10:34 AM.



Refactoring for all constant cases which require AllowNewConst and some staging for future fmf usage.

Diff Detail


Event Timeline

This change does not modify testing...

wristow added inline comments.Jun 18 2018, 12:28 PM
10355 ↗(On Diff #151746)

Both this if (Options.UnsafeFPMath && AllowNewConst) test and the test a dozen lines above are the same. Why break it into two sections?

wristow added inline comments.Jun 18 2018, 12:31 PM
10355 ↗(On Diff #151746)

Ahhhh... I see, because one is in prep for NaNs, and one for reassoc/nsz.

spatel accepted this revision.Jun 18 2018, 1:13 PM

I'm not sure how to test that potential late constant creation problem (see rL334977), but this change looks safe and does what the comment says, so LGTM.

This revision is now accepted and ready to land.Jun 18 2018, 1:13 PM
This revision was automatically updated to reflect the committed changes.