[PATCH] Handle sqrt() shrinking in SimplifyLibCalls like any other call

Joerg Sonnenberger joerg at britannica.bec.de
Thu Oct 23 13:16:44 PDT 2014


On Thu, Oct 23, 2014 at 02:51:34PM -0500, Hal Finkel wrote:
> ----- Original Message -----
> > From: "Stephen Canon" <scanon at apple.com>
> > To: "Hal Finkel" <hfinkel at anl.gov>
> > Cc: llvm-commits at cs.uiuc.edu, spatel at rotateright.com, beanz at apple.com,
> > reviews+D5919+public+763adead774985f1 at reviews.llvm.org
> > Sent: Thursday, October 23, 2014 2:46:17 PM
> > Subject: Re: [PATCH] Handle sqrt() shrinking in SimplifyLibCalls like any other call
> > 
> > (float)sqrt((double)x) —> sqrtf(x) is a valid transformation [See Sam
> > Figueroa’s thesis for details].
> 
> Does this assume that the sqrtf is correct to <= 0.5ulps?

sqrtf is broken if it doesn't do perfect rounding.

Joerg



More information about the llvm-commits mailing list