Bill Schmidt [Wed, 22 Feb 2017 22:54:56 +0000 (22:54 +0000)]
backport: re PR target/79261 (vec_xxpermdi appears to have endian issues)
[gcc]
2017-02-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/79261
* config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
* config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
generator for vsx_xxpermdi_<mode>_be.
* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
force big-endian semantics.
(vsx_xxpermdi_<mode>_be): New define_expand with same
implementation as previous version of vsx_xxpermdi_<mode>.
[gcc/testsuite]
2017-02-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/79261
* gcc.target/powerpc/vec-xxpermdi.c: New file.
Carl Love [Thu, 16 Feb 2017 20:59:20 +0000 (20:59 +0000)]
backport: re PR target/79545 (gcc[5/6]: RS6000, xvcvuxdsp and xvcvsxdsp RTL defines have wrong type)
gcc/ChangeLog:
2017-02-16 Carl Love <cel@us.ibm.com>
Backport from mainline commit r245460 on 2017-02-14
PR 79545
* config/rs6000/rs6000.c: Add case statement entry to make the xvcvuxdsp
built-in argument unsigned.
* config/rs6000/vsx.md: Fix the source and return operand types so they
match the instruction definitions from the ISA document. Fix typo
in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
statement.
gcc/testsuite/ChangeLog:
2017-01-16 Carl Love <cel@us.ibm.com>
Backport from mainline commit r245460 on 2017-02-14
PR 79545
* gcc.target/powerpc/vsx-builtin-3.c: Add missing test case for the
xvcvsxdsp and xvcvuxdsp instructions.
Jonathan Wakely [Tue, 14 Feb 2017 21:17:34 +0000 (21:17 +0000)]
PR69321 fix any_cast<T>(any*) for non-copyable T
Backport from mainline
2017-01-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/69321
* include/experimental/any (__any_caster): Avoid instantiating
manager function for types that can't be stored in any.
* testsuite/experimental/any/misc/any_cast.cc: Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
Jonathan Wakely [Tue, 14 Feb 2017 21:17:23 +0000 (21:17 +0000)]
PR78702 fix accessibility of locale::facet::__shim
Backport from mainline
2017-01-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78702
* include/bits/locale_classes.h (locale::facet::__shim): Change from
private to protected.
* src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
make locale::facet::__shim accessible.
Jonathan Wakely [Tue, 14 Feb 2017 21:17:11 +0000 (21:17 +0000)]
PR78273 fix count to work with partitioning function
Backport from mainline
2017-01-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78273
* include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
the heterogeneous comparison can only find one match.
* include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
* testsuite/23_containers/map/operations/2.cc: Test count works with
comparison function that just partitions rather than sorting.
* testsuite/23_containers/set/operations/2.cc: Likewise.
Carl Love [Mon, 6 Feb 2017 17:40:29 +0000 (17:40 +0000)]
backport: dated 2017-01-26 and 2017-01-25 respectively
gcc/ChangeLog:
2017-02-06 Carl Love <cel@us.ibm.com>
Backport of two commits from mainline, r244943 and r244904,
dated 2017-01-26 and 2017-01-25 respectively
* config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
of entries for ALTIVEC_BUILTIN_VEC_PACKS. Remove bogus entries
for P8V_BUILTIN_VEC_VGBBD.
gcc/testsuite/ChangeLog:
2017-02-06 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3-p8.c: Add new testfile for missing
vec_packs built-in tests.
Jonathan Wakely [Wed, 1 Feb 2017 12:57:58 +0000 (12:57 +0000)]
PR78346 make <bits/predefined_ops.h> handle stashing iterators
PR libstdc++/78346
* include/bits/predefined_ops.h (_Iter_equals_iter): Store iterator
not its referent.
(_Iter_comp_to_iter): Likewise.
* testsuite/25_algorithms/search/78346.cc: New test.
Jonathan Wakely [Wed, 1 Feb 2017 12:18:43 +0000 (12:18 +0000)]
PR libstdc++/79254 fix exception-safety of std::string copy assignment
PR libstdc++/79254
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::operator=(const basic_string&)): If source object is
small just deallocate, otherwise perform new allocation before
making any changes.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
Test exception-safety of copy assignment when allocator propagates.
* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
Likewise.
* testsuite/util/testsuite_allocator.h (uneq_allocator::swap): Make
std::swap visible.
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.