[PATCH, i386]: Fix PR76342, rename _mm512_undefined_si512 to _mm512_undefined_epi32
As shown in the PR, the correct name of the intrinsic is _mm_undefined_epi32 [1]. Leave _mm512_undefined_si512 redefinition for backward compatibility. 2016-08-14 Uros Bizjak PR target/76342 * config/i386/avx512fintrin.h (_mm512_undefined_epi32): Renamed from _mm512_undefined_si512. (_mm_undefined_si512): New definition. testsuite/ChangeLog: 2016-08-14 Uros Bizjak PR target/76342 * gcc.target/i386/pr76342.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline SVN. [1] https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_undefined_epi32 Uros. Index: config/i386/avx512bwintrin.h === --- config/i386/avx512bwintrin.h(revision 239452) +++ config/i386/avx512bwintrin.h(working copy) @@ -270,7 +270,7 @@ _mm512_broadcastb_epi8 (__m128i __A) { return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A, - (__v64qi)_mm512_undefined_si512(), + (__v64qi)_mm512_undefined_epi32(), (__mmask64) - 1); } @@ -318,7 +318,7 @@ _mm512_broadcastw_epi16 (__m128i __A) { return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A, - (__v32hi)_mm512_undefined_si512(), + (__v32hi)_mm512_undefined_epi32(), (__mmask32)-1); } Index: config/i386/avx512dqintrin.h === --- config/i386/avx512dqintrin.h(revision 239452) +++ config/i386/avx512dqintrin.h(working copy) @@ -72,7 +72,7 @@ { return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A, - _mm512_undefined_si512(), + _mm512_undefined_epi32(), (__mmask8) - 1); } @@ -133,7 +133,7 @@ { return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si) __A, - (__v16si)_mm512_undefined_si512(), + (__v16si)_mm512_undefined_epi32(), (__mmask16) -1); } @@ -194,7 +194,7 @@ { return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A, - (__v16si)_mm512_undefined_si512(), + (__v16si)_mm512_undefined_epi32(), (__mmask16) -1); } Index: config/i386/avx512fintrin.h === --- config/i386/avx512fintrin.h (revision 239452) +++ config/i386/avx512fintrin.h (working copy) @@ -130,12 +130,14 @@ extern __inline __m512i __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm512_undefined_si512 (void) +_mm512_undefined_epi32 (void) { __m512i __Y = __Y; return __Y; } +#define _mm512_undefined_si512 _mm512_undefined_epi32 + extern __inline __m512i __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _mm512_set1_epi8 (char __A) @@ -549,7 +551,7 @@ return (__m512i) __builtin_ia32_psllv16si_mask ((__v16si) __X, (__v16si) __Y, (__v16si) - _mm512_undefined_si512 (), + _mm512_undefined_epi32 (), (__mmask16) -1); } @@ -581,7 +583,7 @@ return (__m512i) __builtin_ia32_psrav16si_mask ((__v16si) __X, (__v16si) __Y, (__v16si) - _mm512_undefined_si512 (), + _mm512_undefined_epi32 (), (__mmask16) -1); } @@ -613,7 +615,7 @@ return (__m512i) __builtin_ia32_psrlv16si_mask ((__v16si) __X, (__v16si) __Y,
[patch, Fortran] Fix PR 71902
Hello world, this patch fixes the performance regression introduced with the fix for 71783. It also corrects an error in the logic in realloc_string_callback by now checking if the experssion is deferred, instead of checking for the symbol having the allocatable attribute (which led to false positives). It also checks for the presence of a substring on the RHS expression, because the problem cannot happen if there is no RHS substring. Regression-tested on trunk. OK for trunk? Also OK for a backport? Regards Thomas 2016-08-14 Thomas Koenig PR fortran/71902 * frontend-passes.c (realloc_string_callback): Check for deferred on the expression instead for allocatable on the symbol. Name temporary variable "realloc_string". 2016-08-14 Thomas Koenig PR fortran/71902 * gfortran.dg/dependency_47.f90: New test. Index: frontend-passes.c === --- frontend-passes.c (Revision 239218) +++ frontend-passes.c (Arbeitskopie) @@ -164,6 +164,7 @@ realloc_string_callback (gfc_code **c, int *walk_s gfc_expr *expr1, *expr2; gfc_code *co = *c; gfc_expr *n; + gfc_ref *ref; if (co->op != EXEC_ASSIGN) return 0; @@ -170,7 +171,7 @@ realloc_string_callback (gfc_code **c, int *walk_s expr1 = co->expr1; if (expr1->ts.type != BT_CHARACTER || expr1->rank != 0 - || !expr1->symtree->n.sym->attr.allocatable) + || !expr1->ts.deferred) return 0; expr2 = gfc_discard_nops (co->expr2); @@ -177,6 +178,13 @@ realloc_string_callback (gfc_code **c, int *walk_s if (expr2->expr_type != EXPR_VARIABLE) return 0; + /* Only substring expressions can be affected; substrings are always the + last reference. */ + + for (ref = expr2->ref; ref; ref = ref->next) +if (ref->type != REF_SUBSTRING) + return 0; + if (!gfc_check_dependency (expr1, expr2, true)) return 0; @@ -190,7 +198,7 @@ realloc_string_callback (gfc_code **c, int *walk_s current_code = c; inserted_block = NULL; changed_statement = NULL; - n = create_var (expr2, "trim"); + n = create_var (expr2, "realloc_string"); co->expr2 = n; return 0; } ! { dg-do compile } ! Make sure there is only one instance of a temporary variable here. ! { dg-options "-fdump-tree-original" } SUBROUTINE prtdata(ilen) INTEGER :: ilen character(len=ilen), allocatable :: cline(:) allocate(cline(2)) cline(1) = 'a' cline(1)(2:3) = cline(1)(1:2) cline(2) = cline(1) print *,c END SUBROUTINE prtdata ! { dg-final { scan-tree-dump-not "__var_" "original" } }
[wwwdocs] PATCH for Re: New CA mirror
Hi Tim, On Tue, 9 Aug 2016, Tim Semeijn wrote: > We have added a new mirror in Canada. > > IP address is being geolocated in the US but it is actually Canadian. If > it has to be listed as a US mirror please let me know. thanks for the heads up! Below is the patch that I just applied, mirroring what we have for your other mirrors (no pun intended). Gerald Index: mirrors.html === RCS file: /cvs/gcc/wwwdocs/htdocs/mirrors.html,v retrieving revision 1.235 diff -u -r1.235 mirrors.html --- mirrors.html8 May 2016 22:53:07 - 1.235 +++ mirrors.html14 Aug 2016 16:03:25 - @@ -17,6 +17,11 @@ Austria: ftp://gd.tuwien.ac.at/gnu/gcc/";>gd.tuwien.ac.at, thanks to Antonin.Sprinzl at tuwien.ac.at Canada: http://gcc.parentingamerica.com";>http://gcc.parentingamerica.com, thanks to James Miller (jmiller at parentingamerica.com). Canada: http://gcc.skazkaforyou.com";>http://gcc.skazkaforyou.com, thanks to Sergey Ivanov (mirrors at skazkaforyou.com) +Canada, Quebec: + http://ca.mirror.babylon.network/gcc/";>http://ca.mirror.babylon.network/gcc/ | + ftp://ca.mirror.babylon.network/gcc/";>ftp://ca.mirror.babylon.network/gcc/ | + rsync://ca.mirror.babylon.network/gcc/, + thanks to Tim Semeijn (noc@babylon.network) at Babylon Network. France (no snapshots): ftp://ftp.lip6.fr/pub/gcc/";>ftp.lip6.fr, thanks to ftpmaint at lip6.fr France, Brittany: ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/";>ftp.irisa.fr, thanks to ftpmaint at irisa.fr France, Gravelines:
Re: [PATCH, COMMITTED] Add branch_changer.py script to maintainer-scripts
Hi Martin, On Fri, 12 Aug 2016, Martin Liška wrote: >> I think it would be good to add a comment at the top that >> describes what the scripts does and how to invoke the script? > Sure, what about this? your patch definitely is a nice improvement. Instead of providing editorial comments, allow me provide an updated patch (below). The one thing that would be really good to add is documentation on the usage of the script and/or examples for relevant invocations. Thanks, Gerald Index: branch_changer.py === --- branch_changer.py (revision 239456) +++ branch_changer.py (working copy) @@ -1,10 +1,19 @@ #!/usr/bin/env python3 -# The script requires simplejson, requests, semantic_version packages, in case -# of openSUSE: -# zypper in python3-simplejson python3-requests -# pip3 install semantic_version +# This script is used by maintainers to modify Bugzilla entries in batch +# mode. +# Currently it can remove and add a release from/to PRs that are prefixed +# with '[x Regression]'. Apart from that, it can also change target +# milestones and optionally enhance the list of known-to-fail versions. +# +# The script utilizes the Bugzilla API, as documented here: +# http://bugzilla.readthedocs.io/en/latest/api/index.html +# It requires the simplejson, requests, semantic_version packages. +# In case of openSUSE: +# zypper in python3-simplejson python3-requests +# pip3 install semantic_version + import requests import json import argparse
Re: [v3 PATCH] Implement C++17 make_from_tuple.
On 11 August 2016 at 21:05, Ville Voutilainen wrote: >> The latest SD-6 has a feature test macro; >> >> #define __cpp_lib_make_from_tuple 201606 >> >> >> Also the test should get: >> >> #ifndef __cpp_lib_make_from_tuple >> # error "Feature-test macro for make_from_tuple missing" >> #elif __cpp_lib_make_from_tuple != 201606 >> # error "Feature-test macro for make_from_tuple has wrong value" >> #endif > > > Thanks, I tried to find a recent SD-6 when looking for a feature macro > for make_from_tuple, but couldn't find one. > I was not looking in the right place. :) Here. Tested on Linux-x64. I made the test for the macro value compare it relatively rather than exactly; I don't think our tests should necessarily break just because a macro value is updated. 2016-08-14 Ville Voutilainen Add a feature macro for C++17 make_from_tuple. * include/std/tuple (__cpp_lib_make_from_tuple): New. * testsuite/20_util/tuple/make_from_tuple/1.cc: Adjust. diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 3403048..5ad171f 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -1656,6 +1656,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Indices{}); } +#define __cpp_lib_make_from_tuple 201606 + template constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) diff --git a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc index 459dc74..17aca31 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc @@ -20,6 +20,12 @@ #include #include +#ifndef __cpp_lib_make_from_tuple +# error "Feature-test macro for make_from_tuple missing." +#elif __cpp_lib_make_from_tuple < 201606 +# error "Feature-test macro for make_from_tuple has the wrong value." +#endif + template struct ThreeParam {