Commit 15ed19ff by Bin Cheng Committed by Bin Cheng

re PR middle-end/51867 (GCC generates inconsistent code for same sources calling…

re PR middle-end/51867 (GCC generates inconsistent code for same sources calling builtin calls, like sqrtf)


	PR target/51867
	* builtins.c (expand_builtin): Don't check DECL_ASSEMBLER_NAME_SET_P.

	PR target/51867
	* testsuite/c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
	* testsuite/gcc.dg/pr51867.c: New test.

From-SVN: r184037
parent 365e6b65
2012-02-09 Bin Cheng <bin.cheng@arm.com>
PR middle-end/51867
* builtins.c (expand_builtin): Don't check DECL_ASSEMBLER_NAME_SET_P.
2012-02-08 Magnus Granberg <zorry@gentoo.org>
PR driver/48524
......
......@@ -5776,7 +5776,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
set of builtins. */
if (!optimize
&& !called_as_built_in (fndecl)
&& DECL_ASSEMBLER_NAME_SET_P (fndecl)
&& fcode != BUILT_IN_ALLOCA
&& fcode != BUILT_IN_ALLOCA_WITH_ALIGN
&& fcode != BUILT_IN_FREE)
......
2012-02-09 Bin Cheng <bin.cheng@arm.com>
PR middle-end/51867
* testsuite/c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
* testsuite/gcc.dg/pr51867.c: New test.
2012-02-09 Ian Lance Taylor <iant@google.com>
* go.test/go-test.exp (go-gc-tests): Don't run stack.go on systems
......
/* { dg-options "-O0" } */
/* { dg-options "-O1" } */
/* Check that the compiler uses builtins for signbit; if not the link
will fail because library functions are in libm. */
/* See PR51867.
Since GCC uses library call when optimizing for "-O0", this test
case requires at least "-O1" level optimization now. */
#include "dfp-dbg.h"
......
/* { dg-do compile } */
/* { dg-options "-O0 -fno-math-errno -fdump-rtl-expand" } */
#include <math.h>
float a(float x)
{
return sqrtf(x);
}
float b(float x)
{
return sqrtf(x);
}
/* Here the calls to sqrtf should be expanded into CALL_INSNs, rather than
fpu sqrtf rtl patterns. */
/* { dg-final { scan-rtl-dump-times "call_insn" 2 "expand" } } */
/* { dg-final { cleanup-rtl-dump "expand" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment