re PR tree-optimization/72824 (Signed floating point zero semantics broken at optimization level -O3 (tree-loop-distribute-patterns))

PR tree-optimization/72824
	* tree-loop-distribution.c (const_with_all_bytes_same)
	<case VECTOR_CST>: Fix a typo.

	* gcc.c-torture/execute/ieee/pr72824-2.c: New test.

From-SVN: r239461
This commit is contained in:
Jakub Jelinek 2016-08-15 10:31:05 +02:00
parent 3021134408
commit 660880654a
4 changed files with 34 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2016-08-15 Martin Liska <mliska@suse.cz>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/72824
* tree-loop-distribution.c (const_with_all_bytes_same)
<case VECTOR_CST>: Fix a typo.
2016-08-14 Uros Bizjak <ubizjak@gmail.com>
PR target/76342
@ -66,7 +73,6 @@
make sure we have a leader for it.
2016-08-12 Martin Liska <mliska@suse.cz>
Adam Fineman <afineman@afineman.com>
* gcov.c (process_file): Create .gcov file when .gcda
@ -877,7 +883,6 @@
(aapcs_vfp_sub_candidate): Likewise.
2016-08-05 Martin Liska <mliska@suse.cz>
Joshua Cranmer <Pidgeot18@gmail.com>
* gcov.c (line_t::has_block): New function.

View file

@ -1,3 +1,8 @@
2016-08-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/72824
* gcc.c-torture/execute/ieee/pr72824-2.c: New test.
2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
PR fortran/70598

View file

@ -0,0 +1,21 @@
/* PR tree-optimization/72824 */
typedef float V __attribute__((vector_size (4 * sizeof (float))));
static inline void
foo (V *x, V value)
{
int i;
for (i = 0; i < 32; ++i)
x[i] = value;
}
int
main ()
{
V x[32];
foo (x, (V) { 0.f, -0.f, 0.f, -0.f });
if (__builtin_copysignf (1.0, x[3][1]) != -1.0f)
__builtin_abort ();
return 0;
}

View file

@ -774,7 +774,7 @@ const_with_all_bytes_same (tree val)
case VECTOR_CST:
unsigned int j;
for (j = 0; j < VECTOR_CST_NELTS (val); ++j)
if (const_with_all_bytes_same (VECTOR_CST_ELT (val, i)))
if (const_with_all_bytes_same (VECTOR_CST_ELT (val, j)))
break;
if (j == VECTOR_CST_NELTS (val))
return 0;