From 86d615d88066978dceade40f3bc4264aef6dd4dd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Mar 2018 22:52:23 +0100 Subject: [PATCH] 8.0.1-0.18 --- .gitignore | 1 + gcc.spec | 21 ++++++++---- gcc8-pr84786.patch | 76 ++++++++++++++++++++++++++++++++++++++++++ gcc8-pr84808.patch | 82 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 2 +- 5 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 gcc8-pr84786.patch create mode 100644 gcc8-pr84808.patch diff --git a/.gitignore b/.gitignore index 7cbbc04..afd3a9c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /gcc-8.0.1-20180220.tar.xz /gcc-8.0.1-20180222.tar.xz /gcc-8.0.1-20180310.tar.xz +/gcc-8.0.1-20180312.tar.xz diff --git a/gcc.spec b/gcc.spec index 9d78e24..f3c3709 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,17 +1,17 @@ -%global DATE 20180310 -%global SVNREV 258420 +%global DATE 20180312 +%global SVNREV 258461 %global gcc_version 8.0.1 %global gcc_major 8 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.17 +%global gcc_release 0.18 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 # Hardening slows the compiler way too much. %undefine _hardened_build -%if 0%{?fedora} > 27 +%if 0%{?fedora} > 27 || 0%{?rhel} >= 8 # Until annobin is fixed (#1519165). %undefine _annotated_build %endif @@ -131,7 +131,7 @@ URL: http://gcc.gnu.org # Need binutils which support --no-add-needed >= 2.20.51.0.2-12 # Need binutils which support -plugin # Need binutils which support .loc view >= 2.30 -%if %{?fedora} >= 29 +%if %{?fedora} >= 29 || 0%{?rhel} >= 8 BuildRequires: binutils >= 2.30 %else BuildRequires: binutils >= 2.24 @@ -200,7 +200,7 @@ Requires: cpp = %{version}-%{release} # Need binutils that support --no-add-needed # Need binutils that support -plugin # Need binutils that support .loc view >= 2.30 -%if %{?fedora} >= 29 +%if %{?fedora} >= 29 || 0%{?rhel} >= 8 Requires: binutils >= 2.30 %else Requires: binutils >= 2.24 @@ -1886,7 +1886,7 @@ cd obj-%{gcc_target_platform} # run the tests. make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \ -%if 0%{?fedora} >= 20 +%if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || : %else RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || : @@ -3064,7 +3064,14 @@ fi %endif %changelog +* Mon Mar 12 2018 Jakub Jelinek 8.0.1-0.18 +- update from the trunk + - PRs c++/84355, c++/84802, c++/84813, debug/58150, fortran/83939, + fortran/84546, rtl-optimization/84780, tree-optimization/83456, + tree-optimization/84777, tree-optimization/84803 - add pconfigintrin.h and wbnoinvdintrin.h headers (#1554279) +- fix -march=knl from emitting AVX512VL instructions (PR target/84786) +- fix C++ constexpr RANGE_EXPR splitting (PR c++/84808) * Sat Mar 10 2018 Jakub Jelinek 8.0.1-0.17 - update from the trunk diff --git a/gcc8-pr84786.patch b/gcc8-pr84786.patch new file mode 100644 index 0000000..739f8c3 --- /dev/null +++ b/gcc8-pr84786.patch @@ -0,0 +1,76 @@ +2018-03-12 Jakub Jelinek + + PR target/84786 + * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v + on the last operand. + + * gcc.target/i386/avx512f-pr84786-1.c: New test. + * gcc.target/i386/avx512f-pr84786-2.c: New test. + +--- gcc/config/i386/sse.md.jj 2018-03-05 17:00:24.568655800 +0100 ++++ gcc/config/i386/sse.md 2018-03-12 11:05:48.917401886 +0100 +@@ -9022,14 +9022,14 @@ (define_expand "sse2_loadhpd_exp" + ;; see comment above inline_secondary_memory_needed function in i386.c + (define_insn "sse2_loadhpd" + [(set (match_operand:V2DF 0 "nonimmediate_operand" +- "=x,v,x,v,o,o ,o") ++ "=x,v,x,v ,o,o ,o") + (vec_concat:V2DF + (vec_select:DF + (match_operand:V2DF 1 "nonimmediate_operand" +- " 0,v,0,v,0,0 ,0") ++ " 0,v,0,v ,0,0 ,0") + (parallel [(const_int 0)])) + (match_operand:DF 2 "nonimmediate_operand" +- " m,m,x,v,x,*f,r")))] ++ " m,m,x,Yv,x,*f,r")))] + "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" + "@ + movhpd\t{%2, %0|%0, %2} +--- gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c.jj 2018-03-12 11:32:33.563665173 +0100 ++++ gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c 2018-03-12 11:35:33.964695384 +0100 +@@ -0,0 +1,25 @@ ++/* PR target/84786 */ ++/* { dg-do run { target { ! ia32 } } } */ ++/* { dg-options "-mavx512f -mno-avx512vl -O2" } */ ++/* { dg-require-effective-target avx512f } */ ++ ++#include "avx512f-check.h" ++ ++typedef double V __attribute__((vector_size (16))); ++ ++__attribute__((noipa)) V ++foo (V x, double y) ++{ ++ register double z __asm ("xmm18"); ++ asm volatile ("" : "=v" (z) : "0" (y)); ++ x[1] = z; ++ return x; ++} ++ ++static void ++avx512f_test (void) ++{ ++ V a = foo ((V) { 1.0, 2.0 }, 3.0); ++ if (a[0] != 1.0 || a[1] != 3.0) ++ abort (); ++} +--- gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c.jj 2018-03-12 11:32:43.445666826 +0100 ++++ gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c 2018-03-12 11:35:45.260697279 +0100 +@@ -0,0 +1,16 @@ ++/* PR target/84786 */ ++/* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-options "-mavx512f -mno-avx512vl -O2" } */ ++ ++typedef double V __attribute__((vector_size (16))); ++ ++__attribute__((noipa)) V ++foo (V x, double y) ++{ ++ register double z __asm ("xmm18"); ++ asm volatile ("" : "=v" (z) : "0" (y)); ++ x[1] = z; ++ return x; ++} ++ ++/* { dg-final { scan-assembler-not "vunpcklpd\[\^\n\r]*xmm(1\[6-9]|\[23]\[0-9])" } } */ diff --git a/gcc8-pr84808.patch b/gcc8-pr84808.patch new file mode 100644 index 0000000..8689258 --- /dev/null +++ b/gcc8-pr84808.patch @@ -0,0 +1,82 @@ +2018-03-12 Jakub Jelinek + + PR c++/84808 + * constexpr.c (find_array_ctor_elt): Don't use elt reference after + first potential CONSTRUCTOR_ELTS reallocation. Convert dindex to + sizetype. Formatting fixes. + + * g++.dg/cpp1y/constexpr-84808.C: New test. + +--- gcc/cp/constexpr.c.jj 2018-03-07 22:52:02.000000000 +0100 ++++ gcc/cp/constexpr.c 2018-03-12 12:39:46.890321137 +0100 +@@ -2194,9 +2194,9 @@ find_array_ctor_elt (tree ary, tree dind + that the same is true of the other elements and index directly. */ + if (end > 0) + { +- tree cindex = (*elts)[end-1].index; ++ tree cindex = (*elts)[end - 1].index; + if (TREE_CODE (cindex) == INTEGER_CST +- && compare_tree_int (cindex, end-1) == 0) ++ && compare_tree_int (cindex, end - 1) == 0) + { + if (i < end) + return i; +@@ -2225,6 +2225,8 @@ find_array_ctor_elt (tree ary, tree dind + constructor_elt e; + tree lo = TREE_OPERAND (idx, 0); + tree hi = TREE_OPERAND (idx, 1); ++ tree value = elt.value; ++ dindex = fold_convert (sizetype, dindex); + if (tree_int_cst_lt (lo, dindex)) + { + /* There are still some lower elts; shorten the range. */ +@@ -2238,7 +2240,7 @@ find_array_ctor_elt (tree ary, tree dind + /* Append the element we want to insert. */ + ++middle; + e.index = dindex; +- e.value = unshare_constructor (elt.value); ++ e.value = unshare_constructor (value); + vec_safe_insert (CONSTRUCTOR_ELTS (ary), middle, e); + } + else +@@ -2254,8 +2256,8 @@ find_array_ctor_elt (tree ary, tree dind + e.index = hi; + else + e.index = build2 (RANGE_EXPR, sizetype, new_lo, hi); +- e.value = unshare_constructor (elt.value); +- vec_safe_insert (CONSTRUCTOR_ELTS (ary), middle+1, e); ++ e.value = unshare_constructor (value); ++ vec_safe_insert (CONSTRUCTOR_ELTS (ary), middle + 1, e); + } + } + return middle; +--- gcc/testsuite/g++.dg/cpp1y/constexpr-84808.C.jj 2018-03-12 12:45:29.472374837 +0100 ++++ gcc/testsuite/g++.dg/cpp1y/constexpr-84808.C 2018-03-12 12:46:11.742381465 +0100 +@@ -0,0 +1,27 @@ ++// PR c++/84808 ++// { dg-do compile { target c++14 } } ++ ++struct A { int i; constexpr A () : i() {} }; ++struct B { A a[24]; }; ++ ++constexpr int ++foo (int n) ++{ ++ B b; ++ ++b.a[n + 20].i; ++ ++b.a[n + 18].i; ++ ++b.a[n + 16].i; ++ ++b.a[n + 14].i; ++ ++b.a[n + 12].i; ++ ++b.a[n + 10].i; ++ ++b.a[n + 8].i; ++ ++b.a[n + 6].i; ++ ++b.a[n + 4].i; ++ ++b.a[n + 2].i; ++ ++b.a[n].i; ++ return b.a[2].i + b.a[4].i + b.a[6].i + b.a[8].i + b.a[10].i ++ + b.a[12].i + b.a[14].i + b.a[16].i + b.a[18].i + b.a[20].i + b.a[22].i; ++} ++ ++constexpr int i = foo (2); ++static_assert (i == 11, ""); diff --git a/sources b/sources index f89331e..1b4019f 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-8.0.1-20180310.tar.xz) = 9dff425cd8463676b0e9ed6a7d9e7cd967c2e26d17cb195261cd900bff4d307f38e8f4ded1696deffd69ffa687108e1db0bcfaaa3cb3f4fd9917cc17608dcb47 +SHA512 (gcc-8.0.1-20180312.tar.xz) = 4d88974201d1894fa66c39aabd27f0657ce4d451c35df8ace7500c2ad1109da3147e770cb23e4121035ea6ec742a96bc4d6374836ddccac34cc1330fbc7b9345 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1