Richard Biener [Thu, 26 Jan 2017 13:08:43 +0000 (13:08 +0000)]
backport: [multiple changes]
2017-01-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2016-01-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/79034
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Propagate out degenerate PHIs in the joiner.
* g++.dg/torture/pr79034.C: New testcase.
2016-11-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/78224
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Split the fallthru edge in case its successor may have PHIs.
Do not free dominance info.
Richard Biener [Thu, 26 Jan 2017 08:16:37 +0000 (08:16 +0000)]
backport: [multiple changes]
2017-01-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2016-09-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/77745
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
When removing redundant stores make sure to check compatibility
of the TBAA state for downstream accesses.
* tree-ssa-sccvn.c (visit_reference_op_store): Likewise for when
value-numbering virtual operands for store matches.
* g++.dg/torture/pr77745.C: New testcase.
2016-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/77768
* tree-ssa-sccvn.c (visit_reference_op_store): Properly deal
with stores to a place we know has a constant value.
* tree-vrp.c (set_defs_to_varying): New helper avoiding
writing to vr_const_varying.
(vrp_initialize): Call it.
(vrp_visit_stmt): Likewise.
(evrp_dom_walker::before_dom_children): Likewise.
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Handle stores to readonly memory when removing redundant stores.
Wilco Dijkstra [Tue, 24 Jan 2017 14:14:12 +0000 (14:14 +0000)]
With -fpu=neon DI mode shifts are expanded after reload.
With -fpu=neon DI mode shifts are expanded after reload. DI mode registers can
either fully or partially overlap on both ARM and Thumb-2. However the shift
expansion code can only deal with the full overlap case, and generates incorrect
code for partial overlaps. The fix is to add new variants that support either
full overlap or no overlap.
Backport from mainline
gcc/
PR target/78041
* config/arm/neon.md (ashldi3_neon): Add "r 0 i" and "&r r i" variants.
Remove partial overlap check for shift by 1.
(ashldi3_neon): Likewise.
testsuite/
* gcc.target/arm/pr78041.c: New test.
PR tree-optimization/77648
* tree-ssa-structalias.c (process_constraint): Handle all DEREF
with complex RHS.
(make_transitive_closure_constraints): Adjust comment.
(make_any_offset_constraints): New function.
(handle_rhs_call): Make sure to first expand a pointer to all
subfields before transitively closing it.
(handle_const_call): Likewise. Properly expand returned
pointers as well.
(handle_pure_call): Likewise.
* gcc.dg/torture/pr77648-1.c: New testcase.
* gcc.dg/torture/pr77648-2.c: Likewise.
Backport from mainline
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77855
* tree-ssa-pre.c (prune_clobbered_mems): Queue exprs to remove
instead of removing the current item while iterating over the set
which is not safe.
* gcc.dg/torture/pr77855.c: New testcase.
2016-09-01 Richard Biener <rguenther@suse.de>
PR middle-end/77436
* tree-chrec.c (tree_fold_binomial): Use widest_int, properly
check whether the result fits the desired result type.
* c-c++-common/vector-subscript-7.c: Adjust.
* gcc.dg/pr77450.c: New testcase.
2016-09-19 Richard Biener <rguenther@suse.de>
PR middle-end/77605
* tree-data-ref.c (analyze_subscript_affine_affine): Use the
proper niter to bound the loops.
* gcc.dg/torture/pr77605.c: New testcase.
2016-11-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/78047
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize
fake field at offset zero conservatively regarding to may_have_pointers.
2016-11-02 Richard Biener <rguenther@suse.de>
PR middle-end/78185
* loop-invariant.c (find_invariant_insn): Never hoist trapping or
faulting instructions.
* tree-ssa-loop-im.c: Include tree-ssa-loop-niter.h.
(fill_always_executed_in_1): Honor infinite child loops.
* gcc.dg/pr78185.c: New testcase.
2016-11-16 Richard Biener <rguenther@suse.de>
PR middle-end/78333
* gimplify.c (gimplify_function_tree): Do not instrument
GNU extern inline functions.
Martin Liska [Mon, 23 Jan 2017 12:24:54 +0000 (13:24 +0100)]
Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).
2017-01-23 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-01-20 Martin Liska <mliska@suse.cz>
PR lto/69188
* tree-profile.c (init_ic_make_global_vars): Do not call
finalize_decl.
(gimple_init_gcov_profiler): Likewise.
2017-01-23 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-01-20 Martin Liska <mliska@suse.cz>
PR lto/69188
* gcc.dg/lto/pr69188_0.c: New test.
* gcc.dg/lto/pr69188_1.c: New test.
Gerald Pfeifer [Sat, 21 Jan 2017 22:04:31 +0000 (22:04 +0000)]
backport: extend.texi (Cilk Plus Builtins): cilkplus.org now uses https by default.
Backport from mainline
2016-12-29 Gerald Pfeifer <gerald@pfeifer.com>
* doc/extend.texi (Cilk Plus Builtins): cilkplus.org now uses
https by default.
* doc/passes.texi (Cilk Plus Transformation): Ditto.
* doc/generic.texi (Statements for C++): Ditto, and use @uref.
Martin Liska [Fri, 20 Jan 2017 12:09:22 +0000 (13:09 +0100)]
Reload global options when strict aliasing is dropped (PR ipa/79043).
2017-01-20 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-01-13 Martin Liska <mliska@suse.cz>
PR ipa/79043
* function.c (set_cfun): Add new argument force.
* function.h (set_cfun): Likewise.
* ipa-inline-transform.c (inline_call): Use the function when
strict alising from is dropped for function we inline to.
2017-01-20 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-01-13 Martin Liska <mliska@suse.cz>
PR ipa/79043
* gcc.c-torture/execute/pr79043.c: New test.
backport: re PR rtl-optimization/78617 (LRA clobbers live register during rematerialization)
2017-01-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2016-12-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR rtl-optimization/78617
* lra-remat.c (do_remat): Initialize live_hard_regs from live in
registers, also setting hard registers mapped to pseudo registers.
gcc/testsuite/
PR rtl-optimization/78617
* gcc.c-torture/execute/pr78617.c: New test.
Martin Liska [Tue, 3 Jan 2017 10:54:40 +0000 (11:54 +0100)]
Fill bitregion_{start,end} in store_constructor (PR tree-optimization/78428).
Backport from mainline
2016-12-13 Martin Liska <mliska@suse.cz>
PR tree-optimization/78428
* expr.c (store_constructor_field): Add new arguments to the
function.
(store_constructor): Set up bitregion_end and add
gcc_unreachable to fields that have either non-constant size
or (and) offset.
Backport from mainline
2016-12-13 Martin Liska <mliska@suse.cz>
PR tree-optimization/78428
* gcc.dg/tree-ssa/pr78428.c: New test.
backport: Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg.
Backport from mainline
2016-12-19 Ville Voutilainen <ville.voutilainen@gmail.com>
Make the perfect-forwarding constructor of a two-element tuple
sfinae away when the first argument is an allocator_arg.
* include/std/tuple (tuple(_U1&&, _U2&&)): Constrain.
* testsuite/20_util/tuple/cons/allocator_with_any.cc: New.
Richard Biener [Wed, 14 Dec 2016 10:31:37 +0000 (10:31 +0000)]
re PR tree-optimization/78731 (Possible bug with switch when optimization is turned on.)
2016-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/78731
* tree-ssa-threadedge.c (simplify_control_stmt_condition):
If we've seen a backedge to not walk the SSA value chain.
(thread_around_empty_blocks): Pass down whether we've seen
a backedge to simplify_control_stmt_condition.
(thread_through_normal_block): Likewise.
2016-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2016-11-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR tree-optimization/77673
* tree-ssa-math-opts.c (struct symbolic_number): Add new src field.
(init_symbolic_number): Initialize src field from src parameter.
(perform_symbolic_merge): Select most dominated statement as the
source statement. Set src field of resulting n structure from the
input src with the lowest address.
(find_bswap_or_nop): Rename source_stmt into ins_stmt.
(bswap_replace): Rename src_stmt into ins_stmt. Initially get source
of load from src field rather than insertion statement. Cancel
optimization if statement analyzed is not dominated by the insertion
statement.
(pass_optimize_bswap::execute): Rename src_stmt to ins_stmt. Compute
dominance information.
gcc/testsuite/
PR tree-optimization/77673
* gcc.dg/pr77673.c: New test.
Fix PR77933: stack corruption on ARM when using high registers and LR
2016-12-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2016-11-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/77933
* config/arm/arm.c (thumb1_expand_prologue): Distinguish between lr
being live in the function and lr needing to be saved. Distinguish
between already saved pushable registers and registers to push.
Check for LR being an available pushable register.
gcc/testsuite/
PR target/77933
* gcc.target/arm/pr77933-1.c: New test.
* gcc.target/arm/pr77933-2.c: Likewise.