Re: [PATCH] testsuite: pr59833.c and pr61441.c should use -fsignaling-nans
On Mon, Feb 20, 2017 at 07:24:50PM +0100, Jakub Jelinek wrote: > On Thu, Feb 16, 2017 at 05:46:30PM +, Segher Boessenkool wrote: > > The testcases pr59833.c and pr61441.c check whether signaling NaNs as > > input to some operation result in quiet NaNs. Without -fsignaling-nans > > this is not guaranteed to happen. So, this patch add this option to > > these testcases. > > > > Tested on powerpc64-linux {-m32,-m64}, on aarch64-linux, and on > > x86_64-linux (where there is no issignaling, huh -- I tested on gcc20). > > pr61441.c now fails since your change on i?86-linux (and x86_64-linux -m32). > Before combine we have: > (insn 6 5 7 2 (set (reg:DF 89 [ x ]) > (float_extend:DF (mem/u/c:SF (symbol_ref/u:SI ("*.LC0") [flags 0x2]) > [1 S4 A32]))) "pr61441.c":12 152 {*extendsfdf2} > (expr_list:REG_EQUAL (const_double:DF +SNaN [+SNaN]) > (nil))) > (insn 7 6 8 2 (set (mem:DF (pre_dec:SI (reg/f:SI 7 sp)) [2 S8 A64]) > (reg:DF 89 [ x ])) "pr61441.c":13 119 {*pushdf} > (expr_list:REG_DEAD (reg:DF 89 [ x ]) > (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) > (nil > (not sure if that REG_EQUAL is not already invalid for -fsignaling-nans), > and combine turns that into: > (insn 7 6 8 2 (set (mem:DF (pre_dec:SI (reg/f:SI 7 sp)) [2 S8 A64]) > (const_double:DF +SNaN [+SNaN])) "pr61441.c":13 119 {*pushdf} > (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) > (nil))) > which doesn't drop the signal bit. I have a patch, I'll bootstrap/regtest it and post afterwards. Jakub
Re: [PATCH] testsuite: pr59833.c and pr61441.c should use -fsignaling-nans
On Thu, Feb 16, 2017 at 05:46:30PM +, Segher Boessenkool wrote: > The testcases pr59833.c and pr61441.c check whether signaling NaNs as > input to some operation result in quiet NaNs. Without -fsignaling-nans > this is not guaranteed to happen. So, this patch add this option to > these testcases. > > Tested on powerpc64-linux {-m32,-m64}, on aarch64-linux, and on > x86_64-linux (where there is no issignaling, huh -- I tested on gcc20). pr61441.c now fails since your change on i?86-linux (and x86_64-linux -m32). Before combine we have: (insn 6 5 7 2 (set (reg:DF 89 [ x ]) (float_extend:DF (mem/u/c:SF (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [1 S4 A32]))) "pr61441.c":12 152 {*extendsfdf2} (expr_list:REG_EQUAL (const_double:DF +SNaN [+SNaN]) (nil))) (insn 7 6 8 2 (set (mem:DF (pre_dec:SI (reg/f:SI 7 sp)) [2 S8 A64]) (reg:DF 89 [ x ])) "pr61441.c":13 119 {*pushdf} (expr_list:REG_DEAD (reg:DF 89 [ x ]) (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) (nil (not sure if that REG_EQUAL is not already invalid for -fsignaling-nans), and combine turns that into: (insn 7 6 8 2 (set (mem:DF (pre_dec:SI (reg/f:SI 7 sp)) [2 S8 A64]) (const_double:DF +SNaN [+SNaN])) "pr61441.c":13 119 {*pushdf} (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) (nil))) which doesn't drop the signal bit. Jakub
Re: [PATCH] testsuite: pr59833.c and pr61441.c should use -fsignaling-nans
On 02/16/2017 10:46 AM, Segher Boessenkool wrote: The testcases pr59833.c and pr61441.c check whether signaling NaNs as input to some operation result in quiet NaNs. Without -fsignaling-nans this is not guaranteed to happen. So, this patch add this option to these testcases. Tested on powerpc64-linux {-m32,-m64}, on aarch64-linux, and on x86_64-linux (where there is no issignaling, huh -- I tested on gcc20). Is this okay for trunk? Segher 2017-02-16 Segher Boessenkoolgcc/testsuite/ * gcc.dg/pr59833.c: Add -fsignaling-nans to options. * gcc.dg/pr61441.c: Ditto. OK. jeff
[PATCH] testsuite: pr59833.c and pr61441.c should use -fsignaling-nans
The testcases pr59833.c and pr61441.c check whether signaling NaNs as input to some operation result in quiet NaNs. Without -fsignaling-nans this is not guaranteed to happen. So, this patch add this option to these testcases. Tested on powerpc64-linux {-m32,-m64}, on aarch64-linux, and on x86_64-linux (where there is no issignaling, huh -- I tested on gcc20). Is this okay for trunk? Segher 2017-02-16 Segher Boessenkoolgcc/testsuite/ * gcc.dg/pr59833.c: Add -fsignaling-nans to options. * gcc.dg/pr61441.c: Ditto. --- gcc/testsuite/gcc.dg/pr59833.c | 2 +- gcc/testsuite/gcc.dg/pr61441.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr59833.c b/gcc/testsuite/gcc.dg/pr59833.c index 45fcf7f..c75efde 100644 --- a/gcc/testsuite/gcc.dg/pr59833.c +++ b/gcc/testsuite/gcc.dg/pr59833.c @@ -1,5 +1,5 @@ /* { dg-do run { target { *-*-linux* *-*-gnu* } } } */ -/* { dg-options "-O0 -lm" } */ +/* { dg-options "-O0 -lm -fsignaling-nans" } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target issignaling } */ diff --git a/gcc/testsuite/gcc.dg/pr61441.c b/gcc/testsuite/gcc.dg/pr61441.c index 1b0f181..9408e85 100644 --- a/gcc/testsuite/gcc.dg/pr61441.c +++ b/gcc/testsuite/gcc.dg/pr61441.c @@ -1,5 +1,5 @@ /* { dg-do run { target { *-*-linux* *-*-gnu* } } } */ -/* { dg-options "-O1 -lm -fexcess-precision=standard" } */ +/* { dg-options "-O1 -lm -fexcess-precision=standard -fsignaling-nans" } */ /* { dg-require-effective-target issignaling } */ #define _GNU_SOURCE -- 1.9.3