mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
365e6b65dd
commit
15ed19ff32
|
@ -1,3 +1,8 @@
|
|||
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)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
/* { 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"
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* { 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" } } */
|
Loading…
Reference in New Issue