]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport r276141
authorMartin Liska <mliska@suse.cz>
Wed, 23 Oct 2019 12:12:57 +0000 (14:12 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 23 Oct 2019 12:12:57 +0000 (12:12 +0000)
2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@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.
2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91885
* gcc.dg/pr91885.c: New test.

From-SVN: r277317

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr91885.c [new file with mode: 0644]
gcc/tree-vectorizer.c

index d6d04b79d386b9a20131bc7bc48ea0869dcbdeab..274c1ae399aa6d9bc9e2e31a3cbcb9be808be4e9 100644 (file)
@@ -1,3 +1,13 @@
+2019-10-23  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2019-09-26  Martin Liska  <mliska@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.
+
 2019-10-23  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR tree-optimization/92131
index 71f2025075b500a3713c11459b79d47d0194ccb2..dfe4cf97b51193db6169f3debcb5185ce34780bf 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-23  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2019-09-26  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/91885
+       * gcc.dg/pr91885.c: New test.
+
 2019-10-23  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.c-torture/execute/20191023-1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/pr91885.c b/gcc/testsuite/gcc.dg/pr91885.c
new file mode 100644 (file)
index 0000000..934e8d3
--- /dev/null
@@ -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);
+       }
+    }
+}
index d27104933a95a330e560505ec519ec820b921572..d89ec3b7c7682d7c69366596053ffa78e6728083 100644 (file)
@@ -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