[PATCH] D11866: transform fmin/fmax calls when possible (PR24314)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 14:04:50 PDT 2015
spatel added a comment.
In http://reviews.llvm.org/D11866#219873, @jmolloy wrote:
> Generally this looks fine, but you should be adding the nnan and nsz attributes to the fcmp instruction via the IRBuilder for value tracking to pick up the relaxedness.
Thanks, James! I wasn't paying close enough attention - didn't realize fcmp now had FMF. Certainly, I'll get this fixed up.
Is it the C definition of fmax / fmin that lets us add the nsz flag? Ie, no external relaxation flags are needed because:
"Ideally, fmax would be sensitive to the sign of zero, for example fmax(−0. 0, +0. 0) would return +0; however, implementation in software might be impractical."
http://reviews.llvm.org/D11866
More information about the llvm-commits
mailing list