From: @eastb233
Reviewed-by: @jdkboy
Signed-off-by: @jdkboy
This commit is contained in:
openeuler-ci-bot 2020-09-23 00:21:15 +08:00 committed by Gitee
commit 6a3ee495ea
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,23 @@
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 36639b697f1..88f14e73d65 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -938,6 +938,18 @@ vect_compute_data_ref_alignment (dr_vec_info *dr_info)
= exact_div (vect_calculate_target_alignment (dr_info), BITS_PER_UNIT);
DR_TARGET_ALIGNMENT (dr_info) = vector_alignment;
+ /* If the main loop has peeled for alignment we have no way of knowing
+ whether the data accesses in the epilogues are aligned. We can't at
+ compile time answer the question whether we have entered the main loop or
+ not. Fixes PR 92351. */
+ if (loop_vinfo)
+ {
+ loop_vec_info orig_loop_vinfo = LOOP_VINFO_ORIG_LOOP_INFO (loop_vinfo);
+ if (orig_loop_vinfo
+ && LOOP_VINFO_PEELING_FOR_ALIGNMENT (orig_loop_vinfo) != 0)
+ return;
+ }
+
unsigned HOST_WIDE_INT vect_align_c;
if (!vector_alignment.is_constant (&vect_align_c))
return;

View File

@ -59,7 +59,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{DATE}.11
Release: %{DATE}.12
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Source0: gcc-9.3.0.tar.xz
%global isl_version 0.16.1
@ -184,6 +184,7 @@ Patch69: fix-ICE-during-GIMPLE-pass-dse.patch
Patch70: ipa-const-prop-buffer-overflow-bugfix.patch
Patch71: fix-ICE-in-eliminate_stmt.patch
Patch72: fix-make-ifcvt-clean-up-dead-comparisons.patch
Patch73: fix-when-peeling-for-alignment.patch
%global gcc_target_platform %{_arch}-linux-gnu
@ -699,6 +700,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%build
@ -2627,6 +2629,9 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Tue Sep 22 2020 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20200922.12
- fix-when-peeling-for-alignment.patch: New file
* Tue Sep 22 2020 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20200922.11
- gcc.spec: Delete pkgversion