PR target/77728
* config/arm/arm.c: Include gimple.h.
(aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
returns negative, increment ncrn only if it returned positive.
(arm_needs_doubleword_align): Return int instead of bool,
ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
members, but if there is any such non-FIELD_DECL
> PARM_BOUNDARY aligned decl, return -1 instead of false.
(arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
returns negative, increment nregs only if it returned positive.
(arm_setup_incoming_varargs): Likewise.
(arm_function_arg_boundary): Emit -Wpsabi note if
arm_needs_doubleword_align returns negative, return
DOUBLEWORD_ALIGNMENT only if it returned positive.
testsuite/
* g++.dg/abi/pr77728-1.C: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r247259
PR target/80482
Backport from mainline
This patch changes the parameter testing for powerpc vector builtins to relax
the existing requirement that the parameters be identical to instead that they
be compatible. This allows for mixing parameters with differing qualified
(const, volatile, etc.) types.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80482 for more information.
Bootstrapped and tested on powerpc64le-unknown-linux-gnu and
powerpc64be-unknown-linux-gnu with no regressions. Is this ok for trunk?
[gcc]
2017-04-25 Bill Seurer <seurer@linux.vnet.ibm.com>
Backport from mainline
PR target/80482
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
type checks to test for compatibility instead of equality.
[gcc/testsuite]
2017-04-25 Bill Seurer <seurer@linux.vnet.ibm.com>
Backport from mainline
PR target/80482
* gcc.target/powerpc/vec-constvolatile.c: New test.
From-SVN: r247256
PR target/77728
* config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
type.
(aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
struct. Ignore DECL_ALIGN of decls other than FIELD_DECL for
the alignment computation, but return their maximum in warn_alignment.
(aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
is smaller.
(aarch64_function_arg_boundary): Likewise. Simplify using MIN/MAX.
(aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
caller.
testsuite/
* g++.dg/abi/pr77728-2.C: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r247241
We do this already for TImode values but it was missing for vector
modes.
gcc/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/80464
* config/s390/vector.md: Split MEM->GPR vector moves for
non-s_operand addresses.
gcc/testsuite/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/80464
* gfortran.fortran-torture/compile/pr80464.f90: New test.
From-SVN: r247191
The P constraint letter is supposed to match every constant which is
acceptable during reload. However, constraints do not appear to be
able to handle const_wide_int yet. It works with predicates so the
alternative is modelled with a new predicate now.
gcc/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/79895
* config/s390/predicates.md (reload_const_wide_int_operand): New
predicate.
* config/s390/s390.md ("movti"): Remove d/P alternative.
("movti_bigconst"): New pattern definition.
gcc/testsuite/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/79895
* gcc.target/s390/pr79895.c: New test.
From-SVN: r247190
The attached patch optimizes the atomic_exchange and atomic_compare
patterns on s390 and s390x (mostly limited to SImode and DImode).
Among general optimizaation, the changes fix most of the problems
reported in PR 80080:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80080
gcc/ChangeLog:
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/80080
* s390-protos.h (s390_expand_cs_hqi): Removed.
(s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
* config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
modes as well as CCZ1mode and CCZmode.
(s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
signature of s390_emit_compare_and_swap.
(s390_expand_cs_hqi): Likewise, make static.
(s390_expand_cs_tdsi): Generate an explicit compare before trying
compare-and-swap, in some cases.
(s390_expand_cs): Wrapper function.
(s390_expand_atomic_exchange_tdsi): New backend specific expander for
atomic_exchange.
(s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
patterns for small and large integers. Forbid symref memory operands.
Move expander to s390.c. Require cc register.
("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
symref memory operands. Remove CC mode and call s390_match_ccmode
instead.
("atomic_exchange<mode>"): Allow and implement all integer modes.
gcc/testsuite/ChangeLog:
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/80080
* gcc.target/s390/md/atomic_compare_exchange-1.c: New test.
* gcc.target/s390/md/atomic_compare_exchange-1.inc: New test.
* gcc.target/s390/md/atomic_exchange-1.inc: New test.
From-SVN: r247189
gcc/ChangeLog:
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.md (define_peephole2): New peephole to help
combining the load-and-test pattern with volatile memory.
From-SVN: r247188
gcc/ChangeLog:
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.md (define_peephole2): New peephole to help
combining the load-and-test pattern with volatile memory.
From-SVN: r247187
PR rtl-optimization/80501
* combine.c (make_compound_operation_int): Set subreg_code to SET
even for AND with mask of the sign bit of mode.
* gcc.c-torture/execute/pr80501.c: New test.
From-SVN: r247129
Backport from mainline r247033
gcc/cp:
PR c++/80473
* init.c (build_new_1): Suppress notes about over-aligned new when
the warning is suppressed.
gcc/testsuite:
PR c++/80473
* g++.dg/diagnostic/pr80473.C: New test.
From-SVN: r247035
Backport from mainline r247029
gcc/
* omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
lastprivate clauses in SIMT case.
libgomp/
* testsuite/libgomp.c/target-36.c: New testcase.
From-SVN: r247032
PR middle-end/80423
* tree.h (build_array_type): Add typeless_storage default argument.
* tree.c (type_cache_hasher::equal): Also compare
TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
(build_array_type): Add typeless_storage argument, set
TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
recursive call.
(build_nonshared_array_type): Adjust build_array_type_1 caller.
(build_array_type): Likewise. Add typeless_storage argument.
c-family/
* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
cp/
* tree.c (build_cplus_array_type): Call build_array_type
with the intended TYPE_TYPELESS_STORAGE flag value, instead
of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
on the shared type.
testsuite/
* g++.dg/other/pr80423.C: New test.
From-SVN: r247014
The testcase uses 32 bit or bigger pointer offsets, and
that triggers an ptrofftype_p assert in tree.c.
gcc/testsuite
2017-04-19 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/pr80170.c: Require ptr32plus.
From-SVN: r247011
PR tree-optimization/80426
* tree-vrp.c (extract_range_from_binary_expr_1): For an additive
operation on symbolic operands, also compute the overflow for the
invariant part when the operation degenerates into a negation.
PR tree-optimization/80426
* gcc.c-torture/execute/20170419-1.c: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r247007
* doc/xml/manual/abi.xml: Rephrase one of the references to the
Itanium C++ ABI.
* doc/xml/manual/test.xml: Document DejaGnu 1.5.3 requirement.
* doc/html/*: Regenerate.
From-SVN: r247003
PR debug/80461
* dwarf2out.c (modified_type_die, gen_type_die_with_usage):
Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
* g++.dg/debug/pr80461.C: New test.
From-SVN: r247002
PR c++/80459
* c-c++-common/opaque-vector.c (SIZEOF_MAXINT): Define.
(f): Don't test long double vectors if __SIZEOF_LONG_DOUBLE__
is not power of 2, or is more than 16 or more than SIZEOF_MAXINT.
From-SVN: r247001
PR target/80462
* config/avr/avr.c (tree.h): Include it.
(cgraph.h): Include it.
(avr_encode_section_info): Don't warn for uninitialized progmem
variable if it's just an alias.
From-SVN: r246997
This patch skips pr80341.c for targets with int size less than 32 bits.
The assertion in the testcase holds only if sizeof(int) > sizeof(short),
which isn't true for smaller int size targets like the avr.
gcc/testsuite
2017-04-19 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/torture/pr80341.c: Require int32plus.
From-SVN: r246994
In split_live_ranges_for_shrink_wrap IRA also splits regs that are
only used in debug insns, leading to -fcompare-debug failures.
PR rtl-optimization/80429
* ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
are only used in debug insns.
From-SVN: r246991
2017-04-19 Martin Liska <mliska@suse.cz>
PR gcov-profile/80435
* Makefile.in: Install gcov.h.
* gcov.h: New file.
* libgcov.h: Use the header and make __gcov_flush publicly
visible.
From-SVN: r246990
* config/sparc/predicates.md (input_operand): Add comment. Return
true for any memory operand when LRA is in progress.
* config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
Co-Authored-By: Jeff Law <law@redhat.com>
Co-Authored-By: Vladimir Makarov <vmakarov@redhat.com>
From-SVN: r246989
PR tree-optimization/80443
* tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
instead of adding 1, subtract -1 and similarly instead of subtracting
1 add -1.
* gcc.c-torture/compile/pr80443.c: New test.
From-SVN: r246981