From 9cba9b0c22710232cf7e8699c95313ae6cfe985a Mon Sep 17 00:00:00 2001 From: eastb233 Date: Tue, 22 Sep 2020 23:16:39 +0800 Subject: [PATCH 1/2] FIO bugfix --- fix-when-peeling-for-alignment.patch | 23 +++++++++++++++++++++++ gcc.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 fix-when-peeling-for-alignment.patch diff --git a/fix-when-peeling-for-alignment.patch b/fix-when-peeling-for-alignment.patch new file mode 100644 index 0000000..512fe37 --- /dev/null +++ b/fix-when-peeling-for-alignment.patch @@ -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; diff --git a/gcc.spec b/gcc.spec index e928fdf..e203c61 100644 --- a/gcc.spec +++ b/gcc.spec @@ -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 - 9.3.1-20200922.12 +- fix-when-peeling-for-alignment.patch: New file + * Tue Sep 22 2020 eastb233 - 9.3.1-20200922.11 - gcc.spec: Delete pkgversion -- Gitee From 43cd0cebd53ac54ab6fc1002fc5fda05671d605e Mon Sep 17 00:00:00 2001 From: eastb233 Date: Tue, 22 Sep 2020 23:19:51 +0800 Subject: [PATCH 2/2] FIO fix --- fix-when-peeling-for-alignment.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix-when-peeling-for-alignment.patch b/fix-when-peeling-for-alignment.patch index 512fe37..1d86732 100644 --- a/fix-when-peeling-for-alignment.patch +++ b/fix-when-peeling-for-alignment.patch @@ -3,7 +3,7 @@ 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); + = 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 -- Gitee