* tree-vect-data-refs.c (vect_no_alias_p): New function.
(vect_prune_runtime_alias_test_list): Call vect_no_alias_p to
resolve alias checks which are known at compilation time.
Truncate vector LOOP_VINFO_MAY_ALIAS_DDRS(loop_vinfo) if all
alias checks are resolved. Move dump info for too many runtime
alias checks to here...
* tree-vect-loop.c (vect_analyze_loop_2): ...From here.
gcc/testsuite
* gcc.dg/vect/vect-35-big-array.c: Refine comment and test.
* gcc.dg/vect/vect-35.c: Ditto.
* gcc.dg/vect/vect-alias-check-2.c: New test.
From-SVN: r238301
2016-07-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/24574
* tree-ssa-phiopt.c (absorbing_element_p): Pass in argument
position and add shift, rotate, divison and modulo support
for left zero.
(value_replacement): Pass in argument position to absorbing_element_p.
* gcc.dg/pr24574.c: New testcase.
From-SVN: r238299
2016-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
* config/arm/arm.h (TARGET_HAVE_CBZ): Define.
(TARGET_IDIV): Set for all Thumb targets provided they have hardware
divide feature.
* config/arm/arm.md (divsi3): New unpredicable alternative for ARMv8-M
Baseline. Make initial alternative TARGET_32BIT only.
(udivsi3): Likewise.
* config/arm/thumb1.md (thumb1_cbz): New define_insn.
* doc/sourcebuild.texi (arm_thumb1_cbz_ok): Document new effective
target.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_arm_thumb1_cbz_ok):
Add new arm_thumb1_cbz_ok effective target.
* gcc.target/arm/cbz.c: New test.
From-SVN: r238289
2016-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
* config/arm/arm.h (TARGET_HAVE_MOVT): Include ARMv8-M as having MOVT.
* config/arm/arm.c (arm_arch_name): (const_ok_for_op): Check MOVT/MOVW
availability with TARGET_HAVE_MOVT.
(thumb_legitimate_constant_p): Strip the high part of a label_ref.
(thumb1_rtx_costs): Also return 0 if setting a half word constant and
MOVW is available and replace (unsigned HOST_WIDE_INT) INTVAL by
UINTVAL.
(thumb1_size_rtx_costs): Make set of half word constant also cost 1
extra instruction if MOVW is available. Use a cost variable
incremented by COSTS_N_INSNS (1) when the condition match rather than
returning an arithmetic expression based on COSTS_N_INSNS. Make
constant with bottom half word zero cost 2 instruction if MOVW is
available.
* config/arm/arm.md (define_attr "arch"): Add v8mb.
(define_attr "arch_enabled"): Set to yes if arch value is v8mb and
target is ARMv8-M Baseline.
(arm_movt): New unpredicable alternative for ARMv8-M Baseline.
(arm_movtas_ze): Likewise.
* config/arm/thumb1.md (thumb1_movdi_insn): Add ARMv8-M Baseline only
alternative for constants satisfying j constraint.
(thumb1_movsi_insn): Likewise.
(movsi splitter for K alternative): Tighten condition to not trigger
if movt is available and j constraint is satisfied.
(Pe immediate splitter): Likewise.
(thumb1_movhi_insn): Add ARMv8-M Baseline only alternative for
constant fitting in an halfword to use MOVW.
* doc/sourcebuild.texi (arm_thumb1_movt_ok): Document new ARM
effective target.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_arm_thumb1_movt_ok):
Define effective target.
* gcc.target/arm/pr42574.c: Require arm_thumb1_ok and
!arm_thumb1_movt_ok to exclude ARMv8-M Baseline.
* gcc.target/arm/movhi_movw.c: New test.
* gcc.target/arm/movsi_movw.c: Likewise.
* gcc.target/arm/movdi_movw.c: Likewise.
From-SVN: r238288
2016-07-13 Richard Biener <rguenther@suse.de>
PR middle-end/71104
* gimplify.c (gimplify_modify_expr): Gimplify the RHS before
gimplifying the LHS. Make sure to gimplify a returning twice
call LHS without using SSA names.
* gcc.dg/pr71104-1.c: New testcase.
* gcc.dg/pr71104-2.c: Likewise.
From-SVN: r238287
There's no point in calling release () on an auto_vec just before it goes
out of scope.
gcc/ChangeLog:
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* tree-data-ref.c (find_data_references_in_stmt): Remove
unnecessary call to vec::release.
(graphite_find_data_references_in_stmt): Likewise.
* tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Likewise.
* tree-vect-stmts.c (vectorizable_condition): Likewise.
From-SVN: r238286
gcc/ChangeLog:
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* ree.c (struct ext_state): Make type of members auto_vec.
(find_and_remove_re): Adjust.
From-SVN: r238283
gcc/ChangeLog:
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* tree.c (struct free_lang_data_d): Add constructor and change
types of members to ones that automatically manage resources.
(fld_worklist_push): Adjust.
(find_decls_types): Likewise.
(find_decls_types_in_eh_region): Likewise.
(free_lang_data_in_cgraph): Stop manually creating and
destroying members of free_lang_data_d.
From-SVN: r238278
[gcc]
2016-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71805
* config/rs6000/altivec.md (altivec_vperm_<mode>_internal):
The xxperm and xxpermr instructions require that the 2nd input
operand overlap with the output operand, and not the 1st.
(altivec_vperm_v8hiv16qi): Likewise.
(altivec_vperm_<mode>_uns_internal): Likewise.
(altivec_vpermr_<mode>_internal): Likewise.
(vperm_v8hiv4si): Likewise.
(vperm_v16qiv8hi): Likewise.
[gcc/testsuite]
2016-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71805
* gcc.target/powerpc/pr71805.c: New test.
From-SVN: r238256
gcc/
* config/arm/arm.c (arm_option_override): Set MASK_SINGLE_PIC_BASE
when -mno-pic-data-is-text-relative is in effect, by default.
* doc/invoke.texi (mpic-data-is-text-relative): Document new
behavior and clarify.
gcc/testsuite/
* gcc.target/arm/data-rel-1.c: New.
* gcc.target/arm/data-rel-2.c: New.
* gcc.target/arm/data-rel-3.c: New.
From-SVN: r238254
* Makefile.in: Append rule for params-options.h.
* params-options.h: New file.
* gcc.dg/params/blocksort-part.c: New test.
* gcc.dg/params/params.exp: New file.
From-SVN: r238249
PR middle-end/71700
* expr.c (store_constructor): Mask sign-extended bits when widening
sub-word constructor element at the start of a word.
* gcc.c-torture/execute/pr71700.c: New test.
From-SVN: r238248
PR middle-end/71716
* gimple-fold.c (optimize_atomic_compare_exchange_p): Return false
for SCALAR_FLOAT_TYPE_P type of expected var, or if TYPE_PRECISION
is different from mode's bitsize. Small cleanup.
From-SVN: r238239
2016-07-12 Richard Biener <rguenther@suse.de>
PR rtl-optimization/68961
* fwprop.c (propagate_rtx): Allow SUBREGs of VEC_CONCAT and CONCAT
to simplify to a non-constant.
* gcc.target/i386/pr68961.c: New testcase.
From-SVN: r238238
PR tree-optimization/71823
* tree-vect-stmts.c (vectorizable_operation): Use vect_get_vec_defs
to get vec_oprnds2 from op2.
* gcc.dg/vect/pr71823.c: New test.
From-SVN: r238229
2016-07-11 Hale Wang <hale.wang@arm.com>
Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/lib1funcs.S: Add new wrapper.
Co-Authored-By: Andre Vieira <andre.simoesdiasvieira@arm.com>
From-SVN: r238215