[llvm-commits] [llvm-gcc-4.2] r82640 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 23 14:39:23 PDT 2009


Hi Dale,

I think you may need to disable FrontendC/2005-07-20-SqrtNoErrno.c as
well? It is currently failing on llvm-gcc-i386-darwin9.

 - Daniel

On Wed, Sep 23, 2009 at 11:50 AM, Dale Johannesen <dalej at apple.com> wrote:
> Author: johannes
> Date: Wed Sep 23 13:50:32 2009
> New Revision: 82640
>
> URL: http://llvm.org/viewvc/llvm-project?rev=82640&view=rev
> Log:
> The result of sqrt(negative) is implementation-defined, but follows
> IEEE754 in most current implementations. llvm.sqrt, which has undefined
> behavior for such inputs, is an inappropriate substitute which can change
> the result.
>
>
> Modified:
>    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=82640&r1=82639&r2=82640&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Sep 23 13:50:32 2009
> @@ -5027,12 +5027,9 @@
>   case BUILT_IN_SQRT:
>   case BUILT_IN_SQRTF:
>   case BUILT_IN_SQRTL:
> -    // If errno math has been disabled, expand these to llvm.sqrt calls.
> -    if (!flag_errno_math) {
> -      Result = EmitBuiltinSQRT(exp);
> -      Result = CastToFPType(Result, ConvertType(TREE_TYPE(exp)));
> -      return true;
> -    }
> +    // The result of sqrt(negative) is implementation-defined, but follows
> +    // IEEE754 in most current implementations. llvm.sqrt, which has undefined
> +    // behavior for such inputs, is an inappropriate substitute.
>     break;
>   case BUILT_IN_POWI:
>   case BUILT_IN_POWIF:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list