1. 05 Jan, 2018 5 commits
  2. 04 Jan, 2018 25 commits
  3. 03 Jan, 2018 10 commits
    • PR tree-optimization/83655 - ICE on an invalid call to memcpy declared with no prototype · cf3fc0e8
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/83655
      	* gcc.dg/Wrestrict-5.c: New test.
      	* c-c++-common/builtins.c: New test.
      
      gcc/ChangeLog:
      
      	PR tree-optimization/83655
      	* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
      	checking calls with invalid arguments.
      
      From-SVN: r256218
      Martin Sebor committed
    • PR tree-optimization/83603 - ICE in builtin_memref at gcc/gimple-ssa-warn-restrict.c:238 · 2438cb6a
      gcc/ChangeLog:
      
      	PR tree-optimization/83603
      	* calls.c (maybe_warn_nonstring_arg): Avoid accessing function
      	arguments past the endof the argument list in functions declared
      	without a prototype.
      	* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
      	Avoid checking when arguments are null.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/83603
      	* gcc.dg/Wrestrict-4.c: New test.
      
      From-SVN: r256217
      Martin Sebor committed
    • Make vectorizable_load/store handle IFN_MASK_LOAD/STORE · c3a8f964
      After the previous patches, it's easier to see that the remaining
      inlined transform code in vectorizable_mask_load_store is just a
      cut-down version of the VMAT_CONTIGUOUS handling in vectorizable_load
      and vectorizable_store.  This patch therefore makes those functions
      handle masked loads and stores instead.
      
      This makes it easier to handle more forms of masked load and store
      without duplicating logic from the unmasked forms.  It also helps with
      support for fully-masked loops.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-stmts.c (vect_get_store_rhs): New function.
      	(vectorizable_mask_load_store): Delete.
      	(vectorizable_call): Return false for masked loads and stores.
      	(vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
      	instead of gimple_assign_rhs1.
      	(vectorizable_load): Handle IFN_MASK_LOAD.
      	(vect_transform_stmt): Don't set is_store for call_vec_info_type.
      
      From-SVN: r256216
      Richard Sandiford committed
    • Split gather load handling out of vectorizable_{mask_load_store,load} · c48d2d35
      vectorizable_mask_load_store and vectorizable_load used the same
      code to build a gather load call, except that the former also
      vectorised a mask argument and used it for both the merge and mask
      inputs.  The latter instead used a merge input of zero and a mask
      input of all-ones.  This patch splits it out into a subroutine.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-stmts.c (vect_build_gather_load_calls): New function,
      	split out from..,
      	(vectorizable_mask_load_store): ...here.
      	(vectorizable_load): ...and here.
      
      From-SVN: r256215
      Richard Sandiford committed
    • Split out gather load mask building · bc9587eb
      This patch splits out the code to build an all-bits-one or all-bits-zero
      input to a gather load.  The catch is that both masks can have
      floating-point type, in which case they are implicitly treated in
      the same way as an integer bitmask.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-stmts.c (vect_build_all_ones_mask)
      	(vect_build_zero_merge_argument): New functions, split out from...
      	(vectorizable_load): ...here.
      
      From-SVN: r256214
      Richard Sandiford committed
    • Split rhs checking out of vectorizable_{,mask_load_}store · 3133c3b6
      This patch splits out the rhs checking code that's common to both
      vectorizable_mask_load_store and vectorizable_store.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-stmts.c (vect_check_store_rhs): New function,
      	split out from...
      	(vectorizable_mask_load_store): ...here.
      	(vectorizable_store): ...and here.
      
      From-SVN: r256213
      Richard Sandiford committed
    • Split mask checking out of vectorizable_mask_load_store · aaeefd88
      This patch splits the mask argument checking out of
      vectorizable_mask_load_store, so that a later patch can use it in both
      vectorizable_load and vectorizable_store.  It also adds dump messages
      for false returns.  This is mostly useful for the TYPE_VECTOR_SUBPARTS
      check, which can fail if pattern recognition didn't convert the mask
      properly.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-stmts.c (vect_check_load_store_mask): New function,
      	split out from...
      	(vectorizable_mask_load_store): ...here.
      
      From-SVN: r256212
      Richard Sandiford committed
    • Make vect_model_store_cost take a vec_load_store_type · 9ce4345a
      This patch makes vect_model_store_cost take a vec_load_store_type
      instead of a vect_def_type.  It's a wash on its own, but it helps
      with later patches.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
      	(vect_model_store_cost): Take a vec_load_store_type instead of a
      	vect_def_type.
      	* tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
      	(vect_model_store_cost): Take a vec_load_store_type instead of a
      	vect_def_type.
      	(vectorizable_mask_load_store): Update accordingly.
      	(vectorizable_store): Likewise.
      	* tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
      
      From-SVN: r256211
      Richard Sandiford committed
    • Move code that stubs out IFN_MASK_LOADs · e251d3ec
      vectorizable_mask_load_store replaces scalar IFN_MASK_LOAD calls with
      dummy assignments, so that they never survive vectorisation.  This patch
      moves the code to vect_transform_loop instead, so that we only change
      the scalar statements once all of them have been vectorised.
      
      This makes it easier to handle other types of functions that need
      stubbing out, and also makes it easier to handle groups and patterns.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* tree-vect-loop.c (vect_transform_loop): Stub out scalar
      	IFN_MASK_LOAD calls here rather than...
      	* tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
      
      From-SVN: r256210
      Richard Sandiford committed