On 9/2/19 10:56 AM, Martin Liška wrote:
> Hi.
> 
> There are 2 more patches that I've just tested.
> 
> Martin

Hi.

There are 2 more patches that I've just tested.

Martin
>From e1299829fce26b60105e09e2c6e60d8b998a566b Mon Sep 17 00:00:00 2001
From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 27 Sep 2019 10:28:48 +0000
Subject: [PATCH 2/2] Backport r276178

gcc/ChangeLog:

	* tree-vectorizer.c (try_vectorize_loop_1): Add
	TODO_update_ssa_only_virtuals similarly to what slp pass does.

gcc/testsuite/ChangeLog:

2019-09-27  Jakub Jelinek  <ja...@redhat.com>

	PR tree-optimization/91885
	* gcc.dg/pr91885.c (__int64_t): Change from long to long long.
	(__uint64_t): Change from unsigned long to unsigned long long.
---
 gcc/testsuite/gcc.dg/pr91885.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr91885.c b/gcc/testsuite/gcc.dg/pr91885.c
index 934e8d3e6c3..35be32be559 100644
--- a/gcc/testsuite/gcc.dg/pr91885.c
+++ b/gcc/testsuite/gcc.dg/pr91885.c
@@ -2,8 +2,8 @@
 /* { dg-options "-O3 -fprofile-generate" } */
 /* { dg-require-profiling "-fprofile-generate" } */
 
-typedef signed long int __int64_t;
-typedef unsigned long int __uint64_t;
+typedef signed long long int __int64_t;
+typedef unsigned long long int __uint64_t;
 typedef __int64_t int64_t;
 typedef __uint64_t uint64_t;
 inline void
-- 
2.23.0

>From 2f9a827e2f8b675ae18a9e192a80855ac41f4aaa Mon Sep 17 00:00:00 2001
From: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 26 Sep 2019 07:40:09 +0000
Subject: [PATCH 1/2] Backport r276141

gcc/ChangeLog:

2019-09-26  Martin Liska  <mli...@suse.cz>

	PR tree-optimization/91885
	* tree-vectorizer.c (try_vectorize_loop_1):
	Add TODO_update_ssa_only_virtuals similarly to what slp
	pass does.

gcc/testsuite/ChangeLog:

2019-09-26  Martin Liska  <mli...@suse.cz>

	PR tree-optimization/91885
	* gcc.dg/pr91885.c: New test.
---
 gcc/testsuite/gcc.dg/pr91885.c | 47 ++++++++++++++++++++++++++++++++++
 gcc/tree-vectorizer.c          |  2 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/gcc.dg/pr91885.c

diff --git a/gcc/testsuite/gcc.dg/pr91885.c b/gcc/testsuite/gcc.dg/pr91885.c
new file mode 100644
index 00000000000..934e8d3e6c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr91885.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fprofile-generate" } */
+/* { dg-require-profiling "-fprofile-generate" } */
+
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+typedef __int64_t int64_t;
+typedef __uint64_t uint64_t;
+inline void
+BLI_endian_switch_int64 (int64_t *val)
+{
+  uint64_t tval = *val;
+  *val = ((tval >> 56)) | ((tval << 40) & 0x00ff000000000000ll)
+	 | ((tval << 24) & 0x0000ff0000000000ll)
+	 | ((tval << 8) & 0x000000ff00000000ll)
+	 | ((tval >> 8) & 0x00000000ff000000ll)
+	 | ((tval >> 24) & 0x0000000000ff0000ll)
+	 | ((tval >> 40) & 0x000000000000ff00ll) | ((tval << 56));
+}
+typedef struct anim_index_entry
+{
+  unsigned long long seek_pos_dts;
+  unsigned long long pts;
+} anim_index_entry;
+extern struct anim_index_entry *
+MEM_callocN (int);
+struct anim_index
+{
+  int num_entries;
+  struct anim_index_entry *entries;
+};
+struct anim_index *
+IMB_indexer_open (const char *name)
+{
+  char header[13];
+  struct anim_index *idx;
+  int i;
+  idx->entries = MEM_callocN (8);
+  if (((1 == 0) != (header[8] == 'V')))
+    {
+      for (i = 0; i < idx->num_entries; i++)
+	{
+	  BLI_endian_switch_int64 ((int64_t *) &idx->entries[i].seek_pos_dts);
+	  BLI_endian_switch_int64 ((int64_t *) &idx->entries[i].pts);
+	}
+    }
+}
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index d27104933a9..d89ec3b7c76 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -941,7 +941,7 @@ try_vectorize_loop_1 (hash_table<simduid_to_vf> *&simduid_to_vf_htab,
 	      fold_loop_internal_call (loop_vectorized_call,
 				       boolean_true_node);
 	      loop_vectorized_call = NULL;
-	      ret |= TODO_cleanup_cfg;
+	      ret |= TODO_cleanup_cfg | TODO_update_ssa_only_virtuals;
 	    }
 	}
       /* If outer loop vectorization fails for LOOP_VECTORIZED guarded
-- 
2.23.0

Reply via email to