This is an archive of the discontinued LLVM Phabricator instance.

Allow speculating llvm.sqrt, fma and fmuladd
ClosedPublic

Authored by arsenm on Dec 17 2013, 11:11 AM.

Details

Reviewers
arsenm
Summary

This should be OK since the sqrt intrinsic isn't supposed to be able to set errno, and the standard fma function doesn't anyway. The comment mentions others could be, but the documentation for these is very unclear. sqrt specifically says it doesn't set errno, but the others don't, though it probably shouldn't be different.

Diff Detail

Event Timeline

arsenm updated this revision to Unknown Object (????).Jan 22 2014, 10:04 PM

Explicitly state in the documentation that llvm.fma and llvm.fmuladd do not set errno.

LGTM.

As you point out, we should fix up the definitions of the other intrinsics w.r.t. errno, but that's a separate issue. (I had a patch to do this: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131111/194571.html -- but it seems that unfortunately I forgot about it -- perhaps you can comment on this at some point).

arsenm accepted this revision.Jan 30 2014, 4:15 PM

r200501

arsenm closed this revision.Jan 30 2014, 4:15 PM

r200501