代码拉取完成,页面将自动刷新
同步操作将从 eastb233/src-openeuler_gcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This backport contains 1 patch from gcc main stream tree.
The commit id of these patchs list as following in the order of time.
0001-re-PR-bootstrap-92301-Wrong-vectorizer-code-since-r2.patch
b76f4e6c06bd494d2383c4c16d1e1a034da74641
diff -Nurp a/gcc/testsuite/gcc.dg/pr92301.c b/gcc/testsuite/gcc.dg/pr92301.c
--- a/gcc/testsuite/gcc.dg/pr92301.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/pr92301.c 2020-08-24 21:36:23.556000000 +0800
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+unsigned int m;
+
+#define N 128
+unsigned int a[N];
+
+unsigned int
+__attribute__((noipa))
+df_count_refs (_Bool include_defs)
+{
+ int size = 0;
+
+ for (unsigned int regno = 0; regno < m; regno++)
+ if (include_defs)
+ size += a[regno];
+ return size;
+}
+
+int main(int argc, char **argv)
+{
+ for (unsigned i = 0; i < N; i++)
+ a[i] = i;
+
+ if (argc == 1)
+ m = 17;
+
+ unsigned int r = df_count_refs(1);
+ __builtin_printf ("r: %d\n", r);
+ if (r != 136)
+ __builtin_abort ();
+
+ return 0;
+}
diff -Nurp a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
--- a/gcc/tree-vect-stmts.c 2020-08-24 21:35:23.664000000 +0800
+++ b/gcc/tree-vect-stmts.c 2020-08-24 21:36:23.556000000 +0800
@@ -474,6 +474,22 @@ process_use (stmt_vec_info stmt_vinfo, t
basic_block def_bb = gimple_bb (dstmt_vinfo->stmt);
basic_block bb = gimple_bb (stmt_vinfo->stmt);
+ /* case 2: A reduction phi (STMT) defined by a reduction stmt (DSTMT_VINFO).
+ We have to force the stmt live since the epilogue loop needs it to
+ continue computing the reduction. */
+ if (gimple_code (stmt_vinfo->stmt) == GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def
+ && gimple_code (dstmt_vinfo->stmt) != GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (dstmt_vinfo) == vect_reduction_def
+ && bb->loop_father == def_bb->loop_father)
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "reduc-stmt defining reduc-phi in the same nest.\n");
+ vect_mark_relevant (worklist, dstmt_vinfo, relevant, true);
+ return opt_result::success ();
+ }
+
/* case 3a: outer-loop stmt defining an inner-loop stmt:
outer-loop-header-bb:
d = dstmt_vinfo
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。