aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2016-08-15 10:31:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-08-15 10:31:05 +0200
commit660880654ab4076aeb85498be24440dfb5a6638d (patch)
tree8dab788dcaf37f22003b5950841f7d928b4c60f8
parent30211344085ab7adba71871b00ece6fb8b3a3db5 (diff)
downloadgcc-660880654ab4076aeb85498be24440dfb5a6638d.zip
gcc-660880654ab4076aeb85498be24440dfb5a6638d.tar.gz
gcc-660880654ab4076aeb85498be24440dfb5a6638d.tar.bz2
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
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c21
-rw-r--r--gcc/tree-loop-distribution.c2
4 files changed, 34 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ac4732e..f71df9c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ee1f86f..6fa7c1f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c
new file mode 100644
index 0000000..0622d01
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c
@@ -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;
+}
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 342b964..5580f28 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -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;