This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Disable some fneg combines unless nsz
ClosedPublic

Authored by arsenm on Jan 18 2017, 6:21 PM.

Details

Summary

For -(x + y) -> (-x) + (-y), if x == -y, this would
change the result from -0.0 to 0.0. Since the fma/fmad
combine is an extension of this problem it also
applies there.

fmul should be fine, and I don't think any of the unary
operators or conversions should be a problem either.

Diff Detail

Event Timeline

arsenm created this revision.Jan 18 2017, 6:21 PM
kzhuravl accepted this revision.Jan 18 2017, 9:33 PM

LGTM, thanks.

This revision is now accepted and ready to land.Jan 18 2017, 9:33 PM
arsenm closed this revision.Jan 18 2017, 10:46 PM

r292473 with nsz swapped for unsafe-fp-math until the other patch is in