2017-08-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/71752
PR tree-optimization/81633
* tree-vect-slp.c (vect_get_slp_defs): Handle null operands
in the original suggested way.
* gcc.dg/vect/pr81633.c: New testcase.
From-SVN: r250779
2017-08-01 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/80769
* tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
for malloc and calloc. Document the new invariant that all related
strinfos have delayed lengths or none do.
(get_next_strinfo): New function.
(verify_related_strinfos): Move earlier in file.
(set_endptr_and_length): New function, split out from...
(get_string_length): ...here. Also set the lengths of related
strinfos.
gcc/testsuite/
PR tree-optimization/80769
* gcc.dg/strlenopt-31.c: New test.
* gcc.dg/strlenopt-31g.c: Likewise.
From-SVN: r250772
PR tree-optimization/81588
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
ranges[i].in_p, invert comparison code ccode. For >/>=,
swap rhs1 and rhs2 and comparison code unconditionally,
for </<= don't do that. Don't swap rhs1/rhs2 again if
ranges[i].in_p, instead invert comparison code ccode if
opcode or oe->rank is BIT_IOR_EXPR.
* gcc.dg/tree-ssa/pr81588.c: New test.
* gcc.dg/pr81588.c: New test.
* gcc.c-torture/execute/pr81588.c: New test.
From-SVN: r250761
With IBM z14 officially announced we can add support for z14 as
preferred CPU name. We still pass arch12 to Binutils in order to keep
older Binutils versions supported.
gcc/ChangeLog:
2017-07-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-07-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config.gcc: Add z14.
* config/s390/driver-native.c (s390_host_detect_local_cpu): Add
CPU model numbers for z13s and z14.
* config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
arch12 with z14.
* config/s390/s390-opts.h (enum processor_type): Rename
PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
* config/s390/s390.c (processor_table): Add field for CPU name to
be passed to Binutils.
(s390_asm_output_machine_for_arch): Use the new field in
processor_table for Binutils.
(s390_expand_builtin): Replace arch12 with z14.
(s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
(s390_get_sched_attrmask): Likewise.
(s390_get_unit_mask): Likewise.
* config/s390/s390.opt: Add z14 to processor_type enum.
From-SVN: r250740
PR sanitizer/81604
* ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
change type to the element type, instead add eltype variable and
use it where we are interested in the element type.
* c-c++-common/ubsan/pr81604.c: New test.
From-SVN: r250729
Backport from mainline
2017-07-25 David Edelsohn <dje.gcc@gmail.com>
* dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
character for AIX.
* dwarf2out.c (output_macinfo): Copy debug_line_section_label
to dl_section_ref. On AIX, append an expression to subtract
the size of the section length to dl_section_ref.
From-SVN: r250663
Backport from mainline r250496
2017-07-25 Bin Cheng <bin.cheng@arm.com>
PR target/81414
* config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
instructions if no du chain is found.
* gcc.target/aarch64/pr81414.C: New.
From-SVN: r250657
The HI/QI atomic_fetch_<atomic><mode>" expander accepted symbolic
references and emitted CAS patterns whose insn predicates rejected them.
Fixed by allowing symbolic references there as well. Reload will get
rid of them due to the constraint letter.
Regression tested on s390x.
gcc/ChangeLog:
2017-07-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-07-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/81534
* config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
Change s_operand to memory_operand.
gcc/testsuite/ChangeLog:
2017-07-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-07-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/81534
* gcc.target/s390/pr81534.c: New test.
From-SVN: r250618
/cp
2017-07-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71570
* lambda.c (add_capture): Early return if we cannot capture by
reference.
/testsuite
2017-07-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71570
* g++.dg/cpp0x/lambda/lambda-ice17.C: New.
From-SVN: r250614
PR tree-optimization/81555
PR tree-optimization/81556
* tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
if true, force CHANGED for the recursive invocation.
(reassociate_bb): Remember original length of ops array, pass
len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
* gcc.c-torture/execute/pr81555.c: New test.
* gcc.c-torture/execute/pr81556.c: New test.
From-SVN: r250610
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-07-17 Martin Liska <mliska@suse.cz>
PR sanitizer/81302
* opts.c (finish_options): Do not allow -fgnu-tm
w/ -fsanitize={kernel-,}address. Say sorry.
From-SVN: r250608
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-07-26 Martin Liska <mliska@suse.cz>
PR sanitize/81186
* function.c (expand_function_start): Make expansion of
nonlocal_goto_save_area after parm_birth_insn.
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-07-26 Martin Liska <mliska@suse.cz>
PR sanitize/81186
* gcc.dg/asan/pr81186.c: New test.
From-SVN: r250605
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-30 Martin Liska <mliska@suse.cz>
PR sanitizer/81021
* tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
before BUILT_IN_UNWIND_RESUME when ASAN is used.
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-30 Martin Liska <mliska@suse.cz>
PR sanitizer/81021
* g++.dg/asan/pr81021.C: New test.
From-SVN: r250604
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR sanitizer/81224
* asan.c (instrument_derefs): Bail out inner references
that are hard register variables.
2017-07-27 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR sanitizer/81224
* gcc.dg/asan/pr81224.c: New test.
From-SVN: r250603
Add the -mfsmuld option to control the generation of the FsMULd
instruction. In general, this instruction is available in architecture
version V8 and V9 CPUs with FPU. Some CPUs of this category do not
support this instruction properly, e.g. AT697E, AT697F and UT699. Some
CPUs of this category do not implement it in hardware, e.g. LEON3/4 with
GRFPU-lite.
gcc/
* config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
(sparc_option_override): Honour MASK_FSMULD.
* config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
* config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
* config/sparc/sparc.opt (mfsmuld): New option.
* doc/invoke.texi (mfsmuld): Document option.
From-SVN: r250571
2017-07-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-06-02 Richard Biener <rguenther@suse.de>
Markus Eisenmann <meisenmann.lba@fh-salzburg.ac.at>
PR libstdc++/80721
* libsupc++/eh_alloc.cc (pool::free): Keep list properly
sorted and add missing freelist item merging cases.
2017-06-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/81410
* tree-vect-stmts.c (vectorizable_load): Properly adjust for
the gap in the ! slp_perm SLP case after each group.
* gcc.dg/vect/pr81410.c: New testcase.
2017-07-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/81455
* tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
not walk in cycles when looking for guards.
* gcc.dg/pr81455.c: New testcase.
2017-07-25 Richard Biener <rguenther@suse.de>
PR middle-end/81505
* fold-const.c (fold_negate_const): TREE_OVERFLOW should be
sticky.
* gcc.dg/ubsan/pr81505.c: New testcase.
2017-07-04 Jakub Jelinek <jakub@redhat.com>
PR target/81175
* gcc.target/i386/pr69255-2.c (foo): Use the return value of the
gather.
2017-06-28 Jakub Jelinek <jakub@redhat.com>
PR target/81175
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
rather than def_builtin_pure for __builtin_ia32_gatherpf*.
2017-06-26 Richard Biener <rguenther@suse.de>
PR target/81175
* config/i386/i386.c (ix86_init_mmx_sse_builtins):
Use def_builtin_pure for all gather builtins.
* gfortran.dg/pr81175.f: New testcase.
2017-06-21 Marc Glisse <marc.glisse@inria.fr>
* config/i386/i386.c (struct builtin_isa): New field pure_p.
Reorder for compactness.
(def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
(def_builtin_pure, def_builtin_pure2): New functions.
(ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
* gcc.dg/tree-ssa/addadd.c: Un-XFAIL.
* gcc.dg/tree-ssa/addadd-2.c: New file.
From-SVN: r250560
All TARGET_DEFAULT defines set MASK_FPU. There is no need to set it in
some CPU target flags enable.
gcc/
* config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
from all CPU target flags enable members.
From-SVN: r250559
[gcc]
2016-07-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2016-07-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81162
* gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
replace a negate with an add.
[gcc/testsuite]
2016-07-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2016-07-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81162
* gcc.dg/ubsan/pr81162.c: New file.
From-SVN: r250542
Backport from mainline
2017-07-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/uses_allocator.h (__use_alloc(const _Alloc&&)): Add
deleted overload to prevent dangling references to rvalues.
* include/experimental/memory_resource
(polymorphic_allocator::construct): Do not call __use_alloc with
rvalue arguments.
From-SVN: r250537
Backport from mainline
2017-07-14 Jason Merrill <jason@redhat.com>
Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (variant::variant(_Tp&&)): Constrain to remove
the constructor for empty variants from the candidate functions
during class template argument deduction.
* testsuite/20_util/variant/deduction.cc: New.
From-SVN: r250534
Fix PR79041
As described in PR79041, -mcmodel=large -mpc-relative-literal-loads
may be used to avoid generating ADRP/ADD or ADRP/LDR. However both
trunk and GCC7 may still emit ADRP for some constant pool literals.
Fix this by adding a aarch64_pcrelative_literal_loads check.
gcc/
PR target/79041
* config/aarch64/aarch64.c (aarch64_classify_symbol):
Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
gcc/testsuite/
* gcc.target/aarch64/pr79041-2.c: New test.
From-SVN: r250514