1. 02 Jan, 2018 19 commits
    • Split can_vec_perm_p into can_vec_perm_{var,const}_p · 7ac7e286
      This patch splits can_vec_perm_p into two functions: can_vec_perm_var_p
      for testing permute operations with variable selection vectors, and
      can_vec_perm_const_p for testing permute operations with specific
      constant selection vectors.  This means that we can pass the constant
      selection vector by reference.
      
      Constant permutes can still use a variable permute as a fallback.
      A later patch adds a check to makre sure that we don't truncate the
      vector indices when doing this.
      
      However, have_whole_vector_shift checked:
      
        if (direct_optab_handler (vec_perm_const_optab, mode) == CODE_FOR_nothing)
          return false;
      
      which had the effect of disallowing the fallback to variable permutes.
      I'm not sure whether that was the intention or whether it was just
      supposed to short-cut the loop on targets that don't support permutes.
      (But then why bother?  The first check in the loop would fail and
      we'd bail out straightaway.)
      
      The patch adds a parameter for disallowing the fallback.  I think it
      makes sense to do this for the following code in the VEC_PERM_EXPR
      folder:
      
      	  /* Some targets are deficient and fail to expand a single
      	     argument permutation while still allowing an equivalent
      	     2-argument version.  */
      	  if (need_mask_canon && arg2 == op2
      	      && !can_vec_perm_p (TYPE_MODE (type), false, &sel)
      	      && can_vec_perm_p (TYPE_MODE (type), false, &sel2))
      
      since it's really testing whether the expand_vec_perm_const code expects
      a particular form.
      
      2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* optabs-query.h (can_vec_perm_p): Delete.
      	(can_vec_perm_var_p, can_vec_perm_const_p): Declare.
      	* optabs-query.c (can_vec_perm_p): Split into...
      	(can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
      	(can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
      	particular selector is valid.
      	* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
      	* tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
      	(vect_grouped_load_supported): Likewise.
      	(vect_shift_permute_load_chain): Likewise.
      	* tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
      	(vect_transform_slp_perm_load): Likewise.
      	* tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
      	(vectorizable_bswap): Likewise.
      	(vect_gen_perm_mask_checked): Likewise.
      	* fold-const.c (fold_ternary_loc): Likewise.  Don't take
      	implementations of variable permutation vectors into account
      	when deciding which selector to use.
      	* tree-vect-loop.c (have_whole_vector_shift): Don't check whether
      	vec_perm_const_optab is supported; instead use can_vec_perm_const_p
      	with a false third argument.
      	* tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
      	to test whether the constant selector is valid and can_vec_perm_var_p
      	to test whether a variable selector is valid.
      
      From-SVN: r256091
      Richard Sandiford committed
    • Pass vec_perm_indices by reference · 4aae3cb3
      This patch makes functions take vec_perm_indices by reference rather
      than value, since a later patch will turn vec_perm_indices into a class
      that would be more expensive to copy.
      
      2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
      	* optabs-query.c (can_vec_perm_p): Likewise.
      	* fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
      	instead of vec_perm_indices.
      	* tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
      	(vect_gen_perm_mask_checked): Likewise,
      	* tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
      	(vect_gen_perm_mask_checked): Likewise,
      
      From-SVN: r256090
      Richard Sandiford committed
    • The vec_perm code falls back to doing byte-level permutes if element-level… · 3ea109a3
      The vec_perm code falls back to doing byte-level permutes if element-level permutes aren't supported.
      
      qimode_for_vec_perm
      
      The vec_perm code falls back to doing byte-level permutes if
      element-level permutes aren't supported.  There were two copies
      of the code to calculate the mode, and later patches add another,
      so this patch splits it out into a helper function.
      
      2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* optabs-query.h (qimode_for_vec_perm): Declare.
      	* optabs-query.c (can_vec_perm_p): Split out qimode search to...
      	(qimode_for_vec_perm): ...this new function.
      	* optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
      
      From-SVN: r256089
      Richard Sandiford committed
    • re PR fortran/45689 ([F03] Missing transformational intrinsic in the trans_func_f2003 list) · a1d6c052
      2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/45689
      	* intrinsic.c (add_function): Add gfc_simplify_maxloc and
      	gfc_simplify_minloc to maxloc and minloc, respectively.
      	* intrinsic.h: Add prototypes for gfc_simplify_minloc
      	and gfc_simplify_maxloc.
      	* simplify.c (min_max_chose): Adjust prototype.  Modify function
      	to have a return value which indicates if the extremum was found.
      	(is_constant_array_expr): Fix typo in comment.
      	(simplify_minmaxloc_to_scalar): New function.
      	(simplify_minmaxloc_nodim): New function.
      	(new_array): New function.
      	(simplify_minmaxloc_to_array): New function.
      	(gfc_simplify_minmaxloc): New function.
      	(simplify_minloc): New function.
      	(simplify_maxloc): New function.
      
      2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/45689
      	* gfortran.dg/minloc_4.f90: New test case.
      	* gfortran.dg/maxloc_4.f90: New test case.
      
      From-SVN: r256088
      Thomas Koenig committed
    • re PR c++/83556 (ICE in gimplify_expr, at gimplify.c:12004) · 0a552ae2
      	PR c++/83556
      	* tree.c (replace_placeholders_r): Pass NULL as last argument to
      	cp_walk_tree instead of d->pset.  If non-TREE_CONSTANT and
      	non-PLACEHOLDER_EXPR tree has been seen already, set *walk_subtrees
      	to false and return.
      	(replace_placeholders): Pass NULL instead of &pset as last argument
      	to cp_walk_tree.
      
      	* g++.dg/cpp0x/pr83556.C: New test.
      
      From-SVN: r256086
      Jakub Jelinek committed
    • re PR fortran/45689 ([F03] Missing transformational intrinsic in the trans_func_f2003 list) · a9ec0cfc
      2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/45689
      	PR fortran/83650
      	* simplify.c (gfc_simplify_cshift): Re-implement to allow full
      	range of arguments.
      
      2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/45689
      	PR fortran/83650
      	* gfortran.dg/simplify_cshift_1.f90: Correct erroneous case.
      	* gfortran.dg/simplify_cshift_4.f90: New test.
      
      From-SVN: r256084
      Thomas Koenig committed
    • Add missing changelog entry: · 7616c40b
      2017-12-12  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
      
              PR target/82190
              * config/rs6000/rs6000-string.c (expand_block_compare,
              expand_strn_compare): Fix set_mem_size() calls.
      
      From-SVN: r256083
      Aaron Sawdey committed
    • re PR c++/83644 (ICE using type alias from recursive decltype in noexcept or return type) · dd2ce397
      	PR c++/83644
      	* g++.dg/cpp1z/pr83644.C: New test.
      
      From-SVN: r256082
      Marek Polacek committed
    • rtlanal.c (canonicalize_condition): Return 0 if final rtx does not have a conditional at the top. · e698996f
      2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
      
              * rtlanal.c (canonicalize_condition): Return 0 if final rtx
              does not have a conditional at the top.
      
      Forgot this changelog entry.
      
      From-SVN: r256081
      Aaron Sawdey committed
    • rtlanal.c (canonicalize_condition): Return 0 if final rtx does not have a conditional at the top. · 6aff9af1
              * rtlanal.c (canonicalize_condition): Return 0 if final rtx
              does not have a conditional at the top.
      
      From-SVN: r256079
      Aaron Sawdey committed
    • re PR c++/81860 (Call to undefined inline function involving inheriting constructors) · 6ff9491a
      	PR c++/81860
      	* g++.dg/cpp0x/inh-ctor30.C: New test.
      
      From-SVN: r256076
      Marek Polacek committed
    • [C++ PATCH] tiny code cleanup · 0e038601
      https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00041.html
      	* constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local
      	lval var.
      
      From-SVN: r256075
      Nathan Sidwell committed
    • PR libgfortran/83649 Chunk large reads and writes · 2412750e
      It turns out that Linux never reads or writes more than 2147479552
      bytes in a single syscall. For writes this is not a problem as
      libgfortran already contains a loop around write() to handle short
      writes. But for reads we cannot do this, since then read will hang if
      we have a short read when reading from the terminal.  Also, there are
      reports that macOS fails I/O's larger than 2 GB.  Thus, to work around
      these issues do large reads/writes in chunks.
      
      The testcase from the PR
      
      program largewr
        integer(kind=1) :: a(2_8**31+1)
        a = 0
        a(size(a, kind=8)) = 1
        open(10, file="largewr.dat", access="stream", form="unformatted")
        write (10) a
        close(10)
        a(size(a, kind=8)) = 2
        open(10, file="largewr.dat", access="stream", form="unformatted")
        read (10) a
        if (a(size(a, kind=8)) == 1) then
          print *, "All is well"
        else
          print *, "Oh no"
        end if
      end program largewr
      
      fails on trunk but works with the patch.
      
      Regtested on x86_64-pc-linux-gnu, committed to trunk.
      
      libgfortran/ChangeLog:
      
      2018-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR libgfortran/83649
      	* io/unix.c (MAX_CHUNK): New define.
      	(raw_read): For reads larger than MAX_CHUNK, loop.
      	(raw_write): Write no more than MAX_CHUNK bytes per iteration.
      
      From-SVN: r256074
      Janne Blomqvist committed
    • re PR target/81616 (Update -mtune=generic for the current Intel and AMD processors) · d555138e
      	PR target/81616
      	* config/i386/x86-tune-costs.h: Increase cost of integer load costs
      	for generic 4->6.
      
      From-SVN: r256073
      Jan Hubicka committed
    • ipa-inline.c (big_speedup_p): Fix expression. · f76649a6
      2018-01-02  Richard Biener  <rguenther@suse.de>
      
      	* ipa-inline.c (big_speedup_p): Fix expression.
      
      From-SVN: r256072
      Richard Biener committed
    • add comment about why valid · 5344af27
      From-SVN: r256071
      Nathan Sidwell committed
    • re PR target/81616 (Update -mtune=generic for the current Intel and AMD processors) · e8e3054e
      
      	PR target/81616
      	* x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
      	cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
      	and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
      	cond_taken_branch_cost 3->4.
      
      From-SVN: r256070
      Jan Hubicka committed
    • re PR lto/83452 (FAIL: gfortran.dg/save_6.f90 -O0 (test for excess errors)) · c1177db4
      2017-01-02  Richard Biener  <rguenther@suse.de>
      
      	PR lto/83452
      	* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
      	Do not use UNDEF locals for removed symbols but instead just
      	define them in the first prevailing section and with no name.
      	Use the same gnu_lto_v1 name for all removed globals we promote to
      	WEAK UNDEFs so hpux can use a stub to provide this symbol.  Clear
      	sh_info and sh_link in removed sections.
      
      From-SVN: r256069
      Richard Biener committed
    • Daily bump. · d42e3a01
      From-SVN: r256068
      GCC Administrator committed
  2. 01 Jan, 2018 3 commits
    • re PR fortran/83076 (ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598) · f549bfb3
      2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/83076
      	* resolve.c (resolve_fl_derived0): Add caf_token fields for
      	allocatable and pointer scalars, when -fcoarray selected.
      	* trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
      	field as well as the backend_decl.
      	(gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
      	derived types that are not vtypes. Components with caf_token
      	attribute are pvoid types. For a component requiring it, find
      	the caf_token field and have the component token field point to
      	its backend_decl.
      
      	PR fortran/83319
      	*trans-types.c (gfc_get_array_descriptor_base): Add the token
      	field to the descriptor even when codimen not set.
      
      
      2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/83076
      	* gfortran.dg/coarray_45.f90 : New test.
      
      	PR fortran/83319
      	* gfortran.dg/coarray_46.f90 : New test.
      
      From-SVN: r256065
      Paul Thomas committed
    • * es.po: Update. · 3a60f9fd
      From-SVN: r256059
      Joseph Myers committed
    • Daily bump. · 712818a3
      From-SVN: r256058
      GCC Administrator committed
  3. 31 Dec, 2017 8 commits
  4. 30 Dec, 2017 5 commits
    • Prune removed funcs from offload table · 60bf575c
      2017-12-30  Tom de Vries  <tom@codesourcery.com>
      
      	PR libgomp/83046
      	* omp-expand.c (expand_omp_target): If in_lto_p, mark offload_funcs with
      	DECL_PRESERVE_P.
      	* lto-streamer-out.c (prune_offload_funcs): New function.  Remove
      	offload_funcs entries that no longer have a corresponding cgraph_node.
      	Mark the remaining ones as DECL_PRESERVE_P.
      	(output_lto): Call prune_offload_funcs.
      
      	* testsuite/libgomp.oacc-c-c++-common/pr83046.c: New test.
      	* testsuite/libgomp.c-c++-common/pr83046.c: New test.
      
      From-SVN: r256045
      Tom de Vries committed
    • sse.md (vgf2p8affineinvqb_<mode><mask_name>, [...]): Formatting fixes. · 1e4423db
      	* config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
      	vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>,
      	vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
      	vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
      	vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
      	vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1, vpdpbusd_<mode>,
      	vpdpbusd_<mode>_mask, vpdpbusd_<mode>_maskz, vpdpbusd_<mode>_maskz_1,
      	vpdpbusds_<mode>, vpdpbusds_<mode>_mask, vpdpbusds_<mode>_maskz,
      	vpdpbusds_<mode>_maskz_1, vpdpwssd_<mode>, vpdpwssd_<mode>_mask,
      	vpdpwssd_<mode>_maskz, vpdpwssd_<mode>_maskz_1, vpdpwssds_<mode>,
      	vpdpwssds_<mode>_mask, vpdpwssds_<mode>_maskz,
      	vpdpwssds_<mode>_maskz_1, vaesdec_<mode>, vaesdeclast_<mode>,
      	vaesenc_<mode>, vpclmulqdq_<mode>,
      	avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): Formatting fixes.
      
      From-SVN: r256044
      Jakub Jelinek committed
    • Fix filename in ChangeLog entry for r256042 · 88e4ed64
      From-SVN: r256043
      Tom de Vries committed
    • Fix 'memory cannot be printed' in c-c++-common/ubsan/object-size-9.c · dcf1730d
      2017-12-30  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/83612
      	* c-c++-common/ubsan/object-size-9.c (t): Add alignment attribute.
      
      From-SVN: r256042
      Tom de Vries committed
    • Daily bump. · bad96311
      From-SVN: r256039
      GCC Administrator committed
  5. 29 Dec, 2017 5 commits