diff options
-rw-r--r-- | gcc/ChangeLog | 279 | ||||
-rw-r--r-- | gcc/DATESTAMP | 2 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/bpf/bpf.md | 7 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 2 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 33 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 140 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 9 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 103 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr96522.c | 36 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/bpf/nop-1.c | 14 | ||||
-rw-r--r-- | gcc/tree-ssa-address.c | 48 | ||||
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 3 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 5 | ||||
-rw-r--r-- | libiberty/ChangeLog | 10 |
17 files changed, 656 insertions, 75 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a29b7c4bec4..dd52d5c4235 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,282 @@ +2020-09-14 Sergei Trofimovich <siarheit@google.com> + + Backported from master: + 2020-09-14 Sergei Trofimovich <siarheit@google.com> + + * doc/invoke.texi: fix '-fprofile-reproducibility' option + spelling in manual. + +2020-09-14 Jose E. Marchesi <jose.marchesi@oracle.com> + + Backported from master: + 2020-09-14 Jose E. Marchesi <jose.marchesi@oracle.com> + + * config/bpf/bpf.md ("nop"): Re-define as `ja 0'. + +2020-09-14 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-27 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96522 + * tree-ssa-address.c (copy_ref_info): Reset flow-sensitive + info of the copied points-to. Transfer bigger alignment + via the access type. + * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): + Reset all flow-sensitive info. + +2020-09-14 Richard Biener <rguenther@suse.de> + + PR tree-optimization/97043 + * tree-vect-slp.c (vect_analyze_slp_instance): Do not + elide a load permutation if the current vectorization + factor is one. + +2020-09-14 Nathan Sidwell <nathan@acm.org> + + * config/i386/sse.md (mov<mode>): Fix operand indices. + +2020-09-13 Roger Sayle <roger@nextmovesoftware.com> + + * config/pa/pa.c (hppa_rtx_costs) [ASHIFT, ASHIFTRT, LSHIFTRT]: + Provide accurate costs for DImode shifts of integer constants. + +2020-09-12 Roger Sayle <roger@nextmovesoftware.com> + John David Anglin <danglin@gcc.gnu.org> + + * config/pa/pa.md (shrpsi4_1, shrpsi4_2): New define_insns split + out from previous shrpsi4 providing two commutitive variants using + plus_xor_ior_operator as a predicate. + (shrpdi4_1, shrpdi4_2, shrpdi_3, shrpdi_4): Likewise DImode versions + where _1 and _2 take register shifts, and _3 and _4 for integers. + (rotlsi3_internal): Name this anonymous instruction. + (rotrdi3): New DImode insn copied from rotrsi3. + (rotldi3): New DImode expander copied from rotlsi3. + (rotldi4_internal): New DImode insn copied from rotsi3_internal. + +2020-09-11 Andrew Stubbs <ams@codesourcery.com> + + Backported from master: + 2020-09-11 Andrew Stubbs <ams@codesourcery.com> + + * config/gcn/gcn.c (gcn_hard_regno_mode_ok): Align TImode registers. + * config/gcn/gcn.md: Assert that TImode registers do not early clobber. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-27 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96579 + * tree-ssa-reassoc.c (linearize_expr_tree): If we expand + rhs via special ops make sure to swap operands. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-30 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96370 + * tree-ssa-reassoc.c (rewrite_expr_tree): Add operation + code parameter and use it instead of picking it up from + the stmt that is being rewritten. + (reassociate_bb): Pass down the operation code. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96514 + * tree-if-conv.c (if_convertible_bb_p): If the last stmt + is a call that is control-altering, fail. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-31 Richard Biener <rguenther@suse.de> + + PR middle-end/96369 + * fold-const.c (fold_range_test): Special-case constant + LHS for short-circuiting operations. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-29 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96349 + * tree-ssa-loop-split.c (stmt_semi_invariant_p_1): When the + condition runs into a loop PHI with an abnormal entry value give up. + +2020-09-11 Matthias Klose <doko@ubuntu.com> + + Backported from master: + 2020-07-27 Matthias Klose <doko@ubuntu.com> + + PR bootstrap/96203 + * common.opt: Add -fcf-protection=check. + * flag-types.h (cf_protection_level): Add CF_CHECK. + * lto-wrapper.c (merge_and_complain): Issue an error for + mismatching -fcf-protection values with -fcf-protection=check. + Otherwise, merge -fcf-protection values. + * doc/invoke.texi: Document -fcf-protection=check. + +2020-09-11 Matthias Klose <doko@ubuntu.com> + + Backported from master: + 2020-07-14 Matthias Klose <doko@ubuntu.com> + + PR lto/95604 + * lto-wrapper.c (merge_and_complain): Add decoded options as parameter, + error on different values for -fcf-protection. + (append_compiler_options): Pass -fcf-protection option. + (find_and_merge_options): Add decoded options as parameter, + pass decoded_options to merge_and_complain. + (run_gcc): Pass decoded options to find_and_merge_options. + * lto-opts.c (lto_write_options): Pass -fcf-protection option. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-10 Jakub Jelinek <jakub@redhat.com> + + * lto-streamer-out.c (collect_block_tree_leafs): Recurse on + root rather than BLOCK_SUBBLOCKS (root). + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + * lto-streamer.h (LTO_minor_version): Bump. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-10 Jakub Jelinek <jakub@redhat.com> + + PR debug/93865 + * lto-streamer.h (struct output_block): Add emit_pwd member. + * lto-streamer-out.c: Include toplev.h. + (clear_line_info): Set emit_pwd. + (lto_output_location_1): Encode the ob->current_file != xloc.file + bit directly into the location number. If changing file, emit + additionally a bit whether pwd is emitted and emit it before the + first relative pathname since clear_line_info. + (output_function, output_constructor): Don't call clear_line_info + here. + * lto-streamer-in.c (struct string_pair_map): New type. + (struct string_pair_map_hasher): New type. + (string_pair_map_hasher::hash): New method. + (string_pair_map_hasher::equal): New method. + (path_name_pair_hash_table, string_pair_map_allocator): New variables. + (relative_path_prefix, canon_relative_path_prefix, + canon_relative_file_name): New functions. + (canon_file_name): Add relative_prefix argument, if non-NULL + and string is a relative path, return canon_relative_file_name. + (lto_location_cache::input_location_and_block): Decode file change + bit from the location number. If changing file, unpack bit whether + pwd is streamed and stream in pwd. Adjust canon_file_name caller. + (lto_free_file_name_hash): Delete path_name_pair_hash_table + and string_pair_map_allocator. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-07 Jakub Jelinek <jakub@redhat.com> + + PR debug/94235 + * lto-streamer-out.c (output_cfg): Also stream goto_locus for edges. + Use bp_pack_var_len_unsigned instead of streamer_write_uhwi to stream + e->dest->index and e->flags. + (output_function): Call output_cfg before output_ssa_name, rather than + after streaming all bbs. + * lto-streamer-in.c (input_cfg): Stream in goto_locus for edges. + Use bp_unpack_var_len_unsigned instead of streamer_read_uhwi to stream + in dest_index and edge_flags. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-04 Jakub Jelinek <jakub@redhat.com> + + * lto-streamer.h (stream_input_location_now): Remove declaration. + * lto-streamer-in.c (stream_input_location_now): Remove. + (input_eh_region, input_struct_function_base): Use + stream_input_location instead of stream_input_location_now. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-04 Jakub Jelinek <jakub@redhat.com> + + * lto-streamer.h (struct output_block): Add reset_locus member. + * lto-streamer-out.c (clear_line_info): Set reset_locus to true. + (lto_output_location_1): If reset_locus, clear it and ensure + current_{file,line,col} is different from xloc members. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/96901 + * tree.h (struct decl_tree_traits): New type. + (decl_tree_map): New typedef. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-03 Jakub Jelinek <jakub@redhat.com> + + PR lto/94311 + * gimple.h (gimple_location_ptr, gimple_phi_arg_location_ptr): New + functions. + * streamer-hooks.h (struct streamer_hooks): Add + output_location_and_block callback. Fix up formatting for + output_location. + (stream_output_location_and_block): Define. + * lto-streamer.h (class lto_location_cache): Fix comment typo. Add + current_block member. + (lto_location_cache::input_location_and_block): New method. + (lto_location_cache::lto_location_cache): Initialize current_block. + (lto_location_cache::cached_location): Add block member. + (struct output_block): Add current_block member. + (lto_output_location): Formatting fix. + (lto_output_location_and_block): Declare. + * lto-streamer.c (lto_streamer_hooks_init): Initialize + streamer_hooks.output_location_and_block. + * lto-streamer-in.c (lto_location_cache::cmp_loc): Also compare + block members. + (lto_location_cache::apply_location_cache): Handle blocks. + (lto_location_cache::accept_location_cache, + lto_location_cache::revert_location_cache): Fix up function comments. + (lto_location_cache::input_location_and_block): New method. + (lto_location_cache::input_location): Implement using + input_location_and_block. + (input_function): Invoke apply_location_cache after streaming in all + bbs. + * lto-streamer-out.c (clear_line_info): Set current_block. + (lto_output_location_1): New function, moved from lto_output_location, + added block handling. + (lto_output_location): Implement using lto_output_location_1. + (lto_output_location_and_block): New function. + * gimple-streamer-in.c (input_phi): Use input_location_and_block + to input and cache both location and block. + (input_gimple_stmt): Likewise. + * gimple-streamer-out.c (output_phi): Use + stream_output_location_and_block. + (output_gimple_stmt): Likewise. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-08-26 Jakub Jelinek <jakub@redhat.com> + + PR debug/96729 + * dwarf2out.c (dwarf2out_next_real_insn): Adjust function comment. + (dwarf2out_var_location): Look for next_note only if next_real is + non-NULL, in that case look for the first non-deleted + NOTE_INSN_VAR_LOCATION between loc_note and next_real, if any. + 2020-09-09 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com> PR target/96357 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 15fb79cba7d..792c97ce32d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20200911 +20200915 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a12a69d7597..f57eabd8f9d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2020-09-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/utils.c (type_has_variable_size): New function. + (create_field_decl): In the packed case, also force byte alignment + when the type of the field has variable size. + +2020-09-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Only + create extra subtypes for discriminants if the RM size of the base + type of the index type is lower than that of the index type. + 2020-09-10 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (set_rm_size): Do not take into account the diff --git a/gcc/config/bpf/bpf.md b/gcc/config/bpf/bpf.md index 41bb4fcd9a7..769d8ea0096 100644 --- a/gcc/config/bpf/bpf.md +++ b/gcc/config/bpf/bpf.md @@ -82,10 +82,15 @@ ;;;; NOPs +;; The Linux kernel verifier performs some optimizations that rely on +;; nop instructions to be encoded as `ja 0', i.e. a jump to offset 0, +;; which actually means to jump to the next instruction, since in BPF +;; offsets are expressed in 64-bit words _minus one_. + (define_insn "nop" [(const_int 0)] "" - "mov\t%%r0,%%r0" + "ja\t0" [(set_attr "type" "alu")]) ;;;; Arithmetic/Logical diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index b8c2ca7ec04..eb6a906c8b2 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -22985,7 +22985,7 @@ (match_operand:MASK_DWI 1 "nonimmediate_operand"))] "TARGET_AVX512VP2INTERSECT" { - if (MEM_P (operands[1]) && MEM_P (operands[2])) + if (MEM_P (operands[0]) && MEM_P (operands[1])) operands[1] = force_reg (<MODE>mode, operands[1]); }) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 55185aab650..2461f2ed716 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1630,13 +1630,16 @@ hppa_rtx_costs (rtx x, machine_mode mode, int outer_code, case ASHIFT: if (mode == DImode) { - if (TARGET_64BIT) - *total = COSTS_N_INSNS (3); - else if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) + if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) { - *total = COSTS_N_INSNS (2); + if (TARGET_64BIT) + *total = COSTS_N_INSNS (1); + else + *total = COSTS_N_INSNS (2); return true; } + else if (TARGET_64BIT) + *total = COSTS_N_INSNS (3); else if (speed) *total = COSTS_N_INSNS (13); else @@ -1653,13 +1656,16 @@ hppa_rtx_costs (rtx x, machine_mode mode, int outer_code, case ASHIFTRT: if (mode == DImode) { - if (TARGET_64BIT) - *total = COSTS_N_INSNS (3); - else if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) + if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) { - *total = COSTS_N_INSNS (2); + if (TARGET_64BIT) + *total = COSTS_N_INSNS (1); + else + *total = COSTS_N_INSNS (2); return true; } + else if (TARGET_64BIT) + *total = COSTS_N_INSNS (3); else if (speed) *total = COSTS_N_INSNS (14); else @@ -1676,13 +1682,16 @@ hppa_rtx_costs (rtx x, machine_mode mode, int outer_code, case LSHIFTRT: if (mode == DImode) { - if (TARGET_64BIT) - *total = COSTS_N_INSNS (2); - else if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) + if (REG_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))) { - *total = COSTS_N_INSNS (2); + if (TARGET_64BIT) + *total = COSTS_N_INSNS (1); + else + *total = COSTS_N_INSNS (2); return true; } + else if (TARGET_64BIT) + *total = COSTS_N_INSNS (2); else if (speed) *total = COSTS_N_INSNS (12); else diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 713ff175445..3a82fac85e3 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -6627,32 +6627,82 @@ (set_attr "length" "4")]) ; Shift right pair word 0 to 31 bits. -(define_insn "shrpsi4" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (ashift:SI (match_operand:SI 1 "register_operand" "r,r") - (minus:SI (const_int 32) - (match_operand:SI 3 "shift5_operand" "q,n"))) - (lshiftrt:SI (match_operand:SI 2 "register_operand" "r,r") - (match_dup 3))))] +(define_insn "*shrpsi4_1" + [(set (match_operand:SI 0 "register_operand" "=r") + (match_operator:SI 4 "plus_xor_ior_operator" + [(ashift:SI (match_operand:SI 1 "register_operand" "r") + (minus:SI (const_int 32) + (match_operand:SI 3 "register_operand" "q"))) + (lshiftrt:SI (match_operand:SI 2 "register_operand" "r") + (match_dup 3))]))] "" - "@ - {vshd %1,%2,%0|shrpw %1,%2,%%sar,%0} - {shd|shrpw} %1,%2,%3,%0" + "{vshd %1,%2,%0|shrpw %1,%2,%%sar,%0}" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + +(define_insn "*shrpsi4_2" + [(set (match_operand:SI 0 "register_operand" "=r") + (match_operator:SI 4 "plus_xor_ior_operator" + [(lshiftrt:SI (match_operand:SI 2 "register_operand" "r") + (match_operand:SI 3 "register_operand" "q")) + (ashift:SI (match_operand:SI 1 "register_operand" "r") + (minus:SI (const_int 32) + (match_dup 3)))]))] + "" + "{vshd %1,%2,%0|shrpw %1,%2,%%sar,%0}" [(set_attr "type" "shift") (set_attr "length" "4")]) ; Shift right pair doubleword 0 to 63 bits. -(define_insn "shrpdi4" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI (ashift:DI (match_operand:SI 1 "register_operand" "r,r") - (minus:DI (const_int 64) - (match_operand:DI 3 "shift6_operand" "q,n"))) - (lshiftrt:DI (match_operand:DI 2 "register_operand" "r,r") - (match_dup 3))))] +(define_insn "*shrpdi4_1" + [(set (match_operand:DI 0 "register_operand" "=r") + (match_operator:DI 4 "plus_xor_ior_operator" + [(ashift:DI (match_operand:DI 1 "register_operand" "r") + (minus:DI (const_int 64) + (match_operand:DI 3 "register_operand" "q"))) + (lshiftrt:DI (match_operand:DI 2 "register_operand" "r") + (match_dup 3))]))] "TARGET_64BIT" - "@ - shrpd %1,%2,%%sar,%0 - shrpd %1,%2,%3,%0" + "shrpd %1,%2,%%sar,%0" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + +(define_insn "*shrpdi4_2" + [(set (match_operand:DI 0 "register_operand" "=r") + (match_operator:DI 4 "plus_xor_ior_operator" + [(lshiftrt:DI (match_operand:DI 2 "register_operand" "r") + (match_operand:DI 3 "shift6_operand" "q")) + (ashift:DI (match_operand:SI 1 "register_operand" "r") + (minus:DI (const_int 64) + (match_dup 3)))]))] + "TARGET_64BIT" + "shrpd %1,%2,%%sar,%0" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + +(define_insn "*shrpdi4_3" + [(set (match_operand:DI 0 "register_operand" "=r") + (match_operator:DI 5 "plus_xor_ior_operator" + [(ashift:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 3 "const_int_operand" "n")) + (lshiftrt:DI (match_operand:DI 2 "register_operand" "r") + (match_operand:DI 4 "const_int_operand" "n"))]))] + "TARGET_64BIT + && INTVAL (operands[3]) + INTVAL (operands[4]) == 64" + "shrpd %1,%2,%4,%0" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + +(define_insn "*shrpdi4_4" + [(set (match_operand:DI 0 "register_operand" "=r") + (match_operator:DI 5 "plus_xor_ior_operator" + [(lshiftrt:DI (match_operand:DI 2 "register_operand" "r") + (match_operand:DI 4 "const_int_operand" "n")) + (ashift:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 3 "const_int_operand" "n"))]))] + "TARGET_64BIT + && INTVAL (operands[3]) + INTVAL (operands[4]) == 64" + "shrpd %1,%2,%4,%0" [(set_attr "type" "shift") (set_attr "length" "4")]) @@ -6691,7 +6741,7 @@ /* Else expand normally. */ }") -(define_insn "" +(define_insn "*rotlsi3_internal" [(set (match_operand:SI 0 "register_operand" "=r") (rotate:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const_int_operand" "n")))] @@ -6704,6 +6754,54 @@ [(set_attr "type" "shift") (set_attr "length" "4")]) +(define_insn "rotrdi3" + [(set (match_operand:DI 0 "register_operand" "=r,r") + (rotatert:DI (match_operand:DI 1 "register_operand" "r,r") + (match_operand:DI 2 "shift6_operand" "q,n")))] + "TARGET_64BIT" + "* +{ + if (GET_CODE (operands[2]) == CONST_INT) + { + operands[2] = GEN_INT (INTVAL (operands[2]) & 63); + return \"shrpd %1,%1,%2,%0\"; + } + else + return \"shrpd %1,%1,%%sar,%0\"; +}" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + +(define_expand "rotldi3" + [(set (match_operand:DI 0 "register_operand" "") + (rotate:DI (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "arith32_operand" "")))] + "TARGET_64BIT" + " +{ + if (GET_CODE (operands[2]) != CONST_INT) + { + rtx temp = gen_reg_rtx (DImode); + emit_insn (gen_subdi3 (temp, GEN_INT (64), operands[2])); + emit_insn (gen_rotrdi3 (operands[0], operands[1], temp)); + DONE; + } + /* Else expand normally. */ +}") + +(define_insn "*rotldi3_internal" + [(set (match_operand:DI 0 "register_operand" "=r") + (rotate:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "const_int_operand" "n")))] + "TARGET_64BIT" + "* +{ + operands[2] = GEN_INT ((64 - INTVAL (operands[2])) & 63); + return \"shrpd %1,%1,%2,%0\"; +}" + [(set_attr "type" "shift") + (set_attr "length" "4")]) + (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (match_operator:SI 5 "plus_xor_ior_operator" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cfab5e4adc5..671441abf54 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,21 @@ +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/96901 + * constexpr.c (fundef_copies_table): Change type from + hash_map<tree, tree> * to decl_tree_map *. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/96862 + * constexpr.c (cxx_eval_outermost_constant_expr): Temporarily disable + flag_rounding_math during manifestly constant evaluation. + 2020-09-09 Marek Polacek <polacek@redhat.com> Backported from master: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 05f0560899f..8960e7dfb8c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -553,7 +553,8 @@ Objective-C and Objective-C++ Dialects}. -fprofile-dir=@var{path} -fprofile-generate -fprofile-generate=@var{path} @gol -fprofile-note=@var{path} -fprofile-prefix-path=@var{path} @gol -fprofile-update=@var{method} -fprofile-filter-files=@var{regex} @gol --fprofile-exclude-files=@var{regex} -fprofile-reproducibility @gol +-fprofile-exclude-files=@var{regex} @gol +-fprofile-reproducible=@r{[}multithreaded@r{|}parallel-runs@r{|}serial@r{]} @gol -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol -fsanitize-undefined-trap-on-error -fbounds-check @gol @@ -13524,14 +13525,14 @@ all the regular expressions (separated by a semi-colon). For example, @option{-fprofile-exclude-files=/usr/*} will prevent instrumentation of all files that are located in @file{/usr/} folder. -@item -fprofile-reproducible +@item -fprofile-reproducible=@r{[}multithreaded@r{|}parallel-runs@r{|}serial@r{]} @opindex fprofile-reproducible Control level of reproducibility of profile gathered by @code{-fprofile-generate}. This makes it possible to rebuild program with same outcome which is useful, for example, for distribution packages. -With @option{-fprofile-reproducibility=serial} the profile gathered by +With @option{-fprofile-reproducible=serial} the profile gathered by @option{-fprofile-generate} is reproducible provided the trained program behaves the same at each invocation of the train run, it is not multi-threaded and profile data streaming is always done in the same @@ -13546,7 +13547,7 @@ Such non-reproducible part of programs may be annotated by @option{-l} can be used to dump gathered data and verify that they are indeed reproducible. -With @option{-fprofile-reproducibility=parallel-runs} collected profile +With @option{-fprofile-reproducible=parallel-runs} collected profile stays reproducible regardless the order of streaming of the data into gcda files. This setting makes it possible to run multiple instances of instrumented program in parallel (such as with @code{make -j}). This diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 297cde50853..5ee063bc0c9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-02 Jakub Jelinek <jakub@redhat.com> + + PR fortran/96859 + * check.c (gfc_boz2real, gfc_boz2int): When clearing first two bits, + change also '2' to '0' and '3' to '1' rather than just handling '4' + through '7'. + 2020-09-09 Tobias Burnus <tobias@codesourcery.com> Backported from master: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 999e9f60948..7c96e2b71bf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,106 @@ +2020-09-14 Jose E. Marchesi <jose.marchesi@oracle.com> + + Backported from master: + 2020-09-14 Jose E. Marchesi <jose.marchesi@oracle.com> + + * gcc.target/bpf/nop-1.c: New test. + +2020-09-14 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-27 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96522 + * gcc.dg/torture/pr96522.c: New testcase. + +2020-09-11 Andrew Stubbs <ams@codesourcery.com> + + Backported from master: + 2020-09-11 Andrew Stubbs <ams@codesourcery.com> + + * gcc.dg/gimplefe-44.c: Require exceptions. + +2020-09-11 Christophe Lyon <christophe.lyon@linaro.org> + + Backported from master: + 2020-08-28 Christophe Lyon <christophe.lyon@linaro.org> + + * gcc.dg/pr96579.c: Compile only with target dfp. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-27 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96579 + * gcc.dg/pr96579.c: New testcase. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-30 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96370 + * gcc.dg/pr96370.c: New testcase. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96514 + * gcc.dg/pr96514.c: New testcase. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-31 Richard Biener <rguenther@suse.de> + + PR middle-end/96369 + * c-c++-common/pr96369.c: New testcase. + +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-07-29 Richard Biener <rguenther@suse.de> + + PR tree-optimization/96349 + * gcc.dg/torture/pr96349.c: New testcase. + +2020-09-11 Matthias Klose <doko@ubuntu.com> + + Backported from master: + 2020-07-27 Matthias Klose <doko@ubuntu.com> + + PR bootstrap/96203 + * gcc.target/i386/pr96203-1.c: New test. + * gcc.target/i386/pr96203-2.c: Likewise. + +2020-09-11 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/pack27.adb: New test. + * gnat.dg/pack27_pkg.ads: New helper. + +2020-09-11 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/specs/discr7.ads: New test. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/96862 + * g++.dg/cpp1z/constexpr-96862.C: New test. + +2020-09-11 Jakub Jelinek <jakub@redhat.com> + + Backported from master: + 2020-09-02 Jakub Jelinek <jakub@redhat.com> + + PR fortran/96859 + * gfortran.dg/pr96859.f90: New test. + 2020-09-10 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/specs/size_clause5.ads: New test. diff --git a/gcc/testsuite/gcc.dg/torture/pr96522.c b/gcc/testsuite/gcc.dg/torture/pr96522.c new file mode 100644 index 00000000000..2f55d1aeb4d --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr96522.c @@ -0,0 +1,36 @@ +/* { dg-do run } */ +/* { dg-additional-options "-fno-tree-pta" } */ + +__attribute__((noipa)) void +bar (void) +{ + volatile int v = 1; + if (v) + __builtin_abort (); +} + +__attribute__((noipa)) void +baz (void) +{ +} + +__attribute__((noipa)) void +foo (int n, double *p, double *x) +{ + if (n < 10 && p != 0) + for (int i = 0; i < 10; i++) + if (x[0] < p[i]) + x[i] = 0; + if (p != 0) + bar (); + else + baz (); +} + +int +main () +{ + double arr[10]; + foo (1000, 0, arr); + return 0; +} diff --git a/gcc/testsuite/gcc.target/bpf/nop-1.c b/gcc/testsuite/gcc.target/bpf/nop-1.c new file mode 100644 index 00000000000..c4d274f6bad --- /dev/null +++ b/gcc/testsuite/gcc.target/bpf/nop-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99 --patchable-function-entry=2,1" } */ + +/* The purpose of this test is to make sure the right instruction is + generated for NOPs. See bpf.md for a description on why this is + important. */ + +int +foo () +{ + return 0; +} + +/* { dg-final { scan-assembler "foo:\n\t*ja\t0" } } */ diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 21ad4e57e40..66756921f13 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "dumpfile.h" #include "tree-affine.h" #include "gimplify.h" +#include "builtins.h" /* FIXME: We compute address costs using RTL. */ #include "tree-ssa-address.h" @@ -1015,45 +1016,24 @@ copy_ref_info (tree new_ref, tree old_ref) new_ptr_base = TREE_OPERAND (new_ref, 0); + tree base = get_base_address (old_ref); + if (!base) + return; + /* We can transfer points-to information from an old pointer or decl base to the new one. */ if (new_ptr_base && TREE_CODE (new_ptr_base) == SSA_NAME && !SSA_NAME_PTR_INFO (new_ptr_base)) { - tree base = get_base_address (old_ref); - if (!base) - ; - else if ((TREE_CODE (base) == MEM_REF - || TREE_CODE (base) == TARGET_MEM_REF) - && TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME - && SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0))) + if ((TREE_CODE (base) == MEM_REF + || TREE_CODE (base) == TARGET_MEM_REF) + && TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME + && SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0))) { - struct ptr_info_def *new_pi; - unsigned int align, misalign; - duplicate_ssa_name_ptr_info (new_ptr_base, SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0))); - new_pi = SSA_NAME_PTR_INFO (new_ptr_base); - /* We have to be careful about transferring alignment information. */ - if (get_ptr_info_alignment (new_pi, &align, &misalign) - && TREE_CODE (old_ref) == MEM_REF - && !(TREE_CODE (new_ref) == TARGET_MEM_REF - && (TMR_INDEX2 (new_ref) - /* TODO: Below conditions can be relaxed if TMR_INDEX - is an indcution variable and its initial value and - step are aligned. */ - || (TMR_INDEX (new_ref) && !TMR_STEP (new_ref)) - || (TMR_STEP (new_ref) - && (TREE_INT_CST_LOW (TMR_STEP (new_ref)) - < align))))) - { - poly_uint64 inc = (mem_ref_offset (old_ref) - - mem_ref_offset (new_ref)).force_uhwi (); - adjust_ptr_info_misalignment (new_pi, inc); - } - else - mark_ptr_info_alignment_unknown (new_pi); + reset_flow_sensitive_info (new_ptr_base); } else if (VAR_P (base) || TREE_CODE (base) == PARM_DECL @@ -1063,6 +1043,14 @@ copy_ref_info (tree new_ref, tree old_ref) pt_solution_set_var (&pi->pt, base); } } + + /* And alignment info. Note we cannot transfer misalignment info + since that sits on the SSA name but this is flow-sensitive info + which we cannot transfer in this generic routine. */ + unsigned old_align = get_object_alignment (old_ref); + unsigned new_align = get_object_alignment (new_ref); + if (new_align < old_align) + TREE_TYPE (new_ref) = build_aligned_type (TREE_TYPE (new_ref), old_align); } /* Move constants in target_mem_ref REF to offset. Returns the new target diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 97fe9a68739..b3caa1b89d4 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -5849,8 +5849,7 @@ eliminate_dom_walker::eliminate_stmt (basic_block b, gimple_stmt_iterator *gsi) duplicate_ssa_name_ptr_info (sprime, SSA_NAME_PTR_INFO (lhs)); if (b != sprime_b) - mark_ptr_info_alignment_unknown - (SSA_NAME_PTR_INFO (sprime)); + reset_flow_sensitive_info (sprime); } else if (INTEGRAL_TYPE_P (TREE_TYPE (lhs)) && SSA_NAME_RANGE_INFO (lhs) diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index f6331eeea86..3fdf56f9335 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2309,9 +2309,8 @@ vect_analyze_slp_instance (vec_info *vinfo, /* The load requires permutation when unrolling exposes a gap either because the group is larger than the SLP group-size or because there is a gap between the groups. */ - && (known_eq (unrolling_factor, 1U) - || (group_size == DR_GROUP_SIZE (first_stmt_info) - && DR_GROUP_GAP (first_stmt_info) == 0))) + && group_size == DR_GROUP_SIZE (first_stmt_info) + && DR_GROUP_GAP (first_stmt_info) == 0) { SLP_TREE_LOAD_PERMUTATION (load_node).release (); continue; diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index ea67cd74431..4368ec9129e 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,13 @@ +2020-09-11 Richard Biener <rguenther@suse.de> + + Backported from master: + 2020-08-03 Richard Biener <rguenther@suse.de> + + PR lto/96385 + * simple-object-elf.c + (simple_object_elf_copy_lto_debug_sections): Localize global + UNDEFs and reuse the prevailing name. + 2020-07-23 Release Manager * GCC 10.2.0 released. |