In this testcase the user forces an odd register as the starting reg for a DFmode value.
The output_move_double function tries to store that using an STRD instruction.
But for TARGET_ARM the starting register of an STRD must be an even one.
This is always the case with compiler-allocated registers for DFmode values, but the
inline assembly forced our hand here.
This patch restricts the STRD-emitting logic in output_move_double to not avoid
odd-numbered source registers in STRD.
I'm not a fan of the whole function, we should be exposing a lot of the logic in there
to RTL rather than at the final output stage, but that would need to be fixed separately.
* config/arm/arm.c (output_move_double): Don't allow STRD instructions
if starting source register is not even.
* gcc.target/arm/arm-soft-strd-even.c: New test.
From-SVN: r262250
2018-06-29 Tom de Vries <tdevries@suse.de>
* gcc.dg/guality/pr45882.c (foo): Add line number var for breakpoint
line, and use it.
* lib/gcc-dg.exp (get-absolute-line): Factor out of ...
(process-message): ... here.
* lib/gcc-gdb-test.exp (gdb-test): Use get-absolute-line.
From-SVN: r262248
This patch adds a concept of nested "scopes" to dumpfile.c's dump_*_loc
calls, and wires it up to the DUMP_VECT_SCOPE macro in tree-vectorizer.h,
so that the nested structure is shown in -fopt-info by indentation.
For example, this converts -fopt-info-all e.g. from:
test.c:8:3: note: === analyzing loop ===
test.c:8:3: note: === analyze_loop_nest ===
test.c:8:3: note: === vect_analyze_loop_form ===
test.c:8:3: note: === get_loop_niters ===
test.c:8:3: note: symbolic number of iterations is (unsigned int) n_9(D)
test.c:8:3: note: not vectorized: loop contains function calls or data references that cannot be analyzed
test.c:8:3: note: vectorized 0 loops in function
to:
test.c:8:3: note: === analyzing loop ===
test.c:8:3: note: === analyze_loop_nest ===
test.c:8:3: note: === vect_analyze_loop_form ===
test.c:8:3: note: === get_loop_niters ===
test.c:8:3: note: symbolic number of iterations is (unsigned int) n_9(D)
test.c:8:3: note: not vectorized: loop contains function calls or data references that cannot be analyzed
test.c:8:3: note: vectorized 0 loops in function
showing that the "symbolic number of iterations" message is within
the "=== analyze_loop_nest ===" (and not within the
"=== vect_analyze_loop_form ===").
This is also enabling work for followups involving optimization records
(allowing the records to directly capture the nested structure of the
dump messages).
gcc/ChangeLog:
* dumpfile.c (dump_loc): Add indentation based on scope depth.
(dump_scope_depth): New variable.
(get_dump_scope_depth): New function.
(dump_begin_scope): New function.
(dump_end_scope): New function.
* dumpfile.h (get_dump_scope_depth): New declaration.
(dump_begin_scope): New declaration.
(dump_end_scope): New declaration.
(class auto_dump_scope): New class.
(AUTO_DUMP_SCOPE): New macro.
* tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
AUTO_DUMP_SCOPE.
From-SVN: r262246
gcc/cp/ChangeLog:
* parser.c (cp_parser_error_1): After issuing a conflict marker
error, consume tokens until the end of the source line.
gcc/testsuite/ChangeLog:
* g++.dg/conflict-markers-2.C: New test.
From-SVN: r262232
gcc/testsuite/ChangeLog:
2018-06-28 Carl Love <cel@us.ibm.com>
* gcc.target/p9-extract-1.c: Add test case.
* gcc.target/builtins-3-p9-runnable.c: Add test case to match
name in ABI.
From-SVN: r262230
PR target/86348
* config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
alternative 0 in preferred_for_speed attribute.
testsuite/ChangeLog:
PR target/86348
* gcc.target/i386/pr86348.c: New test.
From-SVN: r262228
Fix and simplify the testcase so it generates dup even on latest trunk.
testsuite/
* gcc.target/aarch64/f16_mov_immediate_3.c: Fix testcase.
From-SVN: r262222
This patch removes alt_dump_file from dumpfile.h, making it static
within dumpfile.c. This allows for changing how -fopt-info is
implemented, and potentially adding other kinds of dump target, such
as remarks or optimization records.
Doing so requires changing the implementation of dump_enabled_p, so
the patch changes this to a simple lookup of a boolean global, which
is updated any time dump_file or alt_dump_file change.
gcc/ChangeLog:
* cgraph.c (cgraph_node::get_body): Replace assignments to
"dump_file" with calls to set_dump_file.
* dumpfile.c (alt_dump_file): Make static, and group with...
(alt_flags): ...this definition.
(dumps_are_enabled): New variable.
(refresh_dumps_are_enabled): New function.
(set_dump_file): New function.
(set_alt_dump_file): New function.
(gcc::dump_manager::dump_start): Replace assignments to
"dump_file" and "alt_dump_file" with calls to set_dump_file and
set_alt_dump_file.
(gcc::dump_manager::dump_finish): Likewise.
* dumpfile.h (alt_dump_file): Delete decl.
(dumps_are_enabled): New variable decl.
(set_dump_file): New function decl.
(dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
global.
* tree-nested.c (lower_nested_functions): Replace assignments to
"dump_file" with calls to set_dump_file.
From-SVN: r262220
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (decl_scope_table): Remove.
(push_decl_scope): Likewise.
(pop_decl_scope): Likewise.
(gen_type_die_for_member): Do not call push/pop_decl_scope.
(gen_struct_or_union_type_die): Likewise.
(gen_tagged_type_die): Likewise.
(dwarf2out_init): Do not initialize decl_scope_table.
(dwarf2out_c_finalize): Do not free it.
From-SVN: r262218
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (gen_subprogram_die): Use is_unit_die when
deciding whether to not re-use a DIE.
From-SVN: r262217
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
DW_AT_abstract_origin attribute.
From-SVN: r262213
2018-06-28 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Add new checking assert to catch invalid state.
(jump_table_cluster::can_be_handled): Handle single case
clusters.
(jump_table_cluster::is_beneficial): Bail out for such case.
(bit_test_cluster::find_bit_tests):
Add new checking assert to catch invalid state.
(bit_test_cluster::can_be_handled): Handle single case
clusters.
(bit_test_cluster::is_beneficial): Bail out for such case.
(switch_decision_tree::analyze_switch_statement):
Fix comment.
2018-06-28 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-ssa/switch-1.c: New test.
From-SVN: r262211
2018-06-28 Martin Liska <mliska@suse.cz>
* vec.h (class auto_string_vec): New (moved from auto_argvec).
(auto_string_vec::~auto_string_vec): Likewise.
2018-06-28 Martin Liska <mliska@suse.cz>
* jit-playback.c (class auto_argvec): Moved to vec.h.
(auto_argvec::~auto_argvec): Likewise.
(compile): Use the renamed name.
(invoke_driver): Likewise.
From-SVN: r262208
* tree-inline.c (remap_gimple_stmt): Force input_location on the new
statement if id->reset_location is true.
(copy_edges_for_bb): Do not set goto_locus on the new edges if
id->reset_location is true.
(copy_phis_for_bb): Force input_location on the arguments if
id->reset_location is true.
(expand_call_inline): Set id->reset_location if DECL_IGNORED_P
is set on the function to be inlined.
* tree-inline.h (struct copy_body_data): Move remapping_type_depth and
prevent_decl_creation_for_types fields up and add reset_location field.
From-SVN: r262207
2018-06-23 Dimitar Dimitrov <dimitar@dinux.eu>
* lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
registers for Pmode.
* lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
hard registers for the clobbered pseudo.
From-SVN: r262205
PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:
#include <string>
int compare()
{
return __n1 - __n2;
}
suggested.cc: In function 'int compare()':
suggested.cc:5:10: error: '__n1' was not declared in this scope
return __n1 - __n2;
^~~~
suggested.cc:5:10: note: suggested alternative: '._61'
return __n1 - __n2;
^~~~
._61
suggested.cc:5:17: error: '__n2' was not declared in this scope
return __n1 - __n2;
^~~~
suggested.cc:5:17: note: suggested alternative: '._72'
return __n1 - __n2;
^~~~
._72
The dot-prefixed names are an implementation detail of how we implement
anonymous enums found in the header files, generated via
anon_aggrname_format in make_anon_name.
This patch uses anon_aggrname_p to filter them out when considering
which names to suggest.
gcc/cp/ChangeLog:
PR c++/86329
* name-lookup.c (consider_binding_level): Filter out names that
match anon_aggrname_p.
gcc/testsuite/ChangeLog:
PR c++/86329
* g++.dg/lookup/pr86329.C: New test.
From-SVN: r262199
gcc/testsuite/ChangeLog:
2018-06-27 Carl Love <cel@us.ibm.com>
Add test case that was supposed to be added in commit 255556 on 2017-12-11.
* gcc.target/vsx-vector-abss.c: New file to test vec_abss.
From-SVN: r262196
* config/v850/v850-protos.h (notice_update_cc): Remove.
* config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
(v850_print_operand): Handle 'D' and "d".
(v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
Add handling of arithmetic/logical operations compared against zero.
(v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
Do not look at v850_compare_op, instead get mode from last argument.
(v850_gen_compare): Remove
(increment_stack): Use addsi3_clobber_flags to avoid splitting failure
after reload for prologue insns.
(expand_prologue): Account for CLOBBER of CC_REGNUM in various
patterns.
(construct_save_jarl): Likewise.
(TARGET_FLAGS_REGNUM): Define.
* config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
(NOTICE_UPDATE_CC): Remove.
* config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
than cc0. Conditionalize on reload_completed.
(cmpsi_insn, setfcc_insn): Likewise.
(tst1 splitter): Turn into define_and_split which sets the flags
after reload.
(cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
(cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
(cstoresf4, cstoredf4): Clobber the flags.
(cmpsi, cmpsf, cmpdf): Remove expanders.
(setf_insn): Remove pattern.
(addsi3): Turn into define_and_split which clobbers the flags after
reload and a suitable pattern (addsi3_clobber_flags) for use after
reload.
(subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
(ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
(ashrsi3, ashrsi3_v850e2): Likewise.
(bins): Clobber the flags.
(movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
(movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
(fix_loop_counter, call_internal_short, call_internal_long): Likewise.
(call_value_internal_short, call_value_internal_long): Likewise.
(callt_save_interrupt, callt_return_interrupt): Likewise.
(save_interrupt, return_interrupt): Likewise.
(callt_save_all_interrupt, save_all_interrupt): Likewise.
(_save_all_interrupt, callt_restore_all_interrupt): Likewise.
(restore_all_interrupt, _restore_all_interrupt): Likewise.
(All FP comparisons): Only allow after reload has completed.
(trfsr): Likewise.
(divh, divhu): Tweak output template.
(branch_z_normal, branch_z_invert): Remove
(branch_nz_normal, branch_nz_invert): Likewise.
(extendhisi_insn, extendqisi_insn): Do not clobber flags.
Co-Authored-By: Austin Law <austinklaw@gmail.com>
From-SVN: r262190
The Cortex-A76 is an Armv8.2-A processor with dotproduct and FP16 support.
It can be paired with the Cortex-A55 and hence the option
-mcpu/-mtune=cortex-a76.cortex-a55 is also introduced.
Bootstrapped and tested on aarch64-none-linux-gnu.
* config/aarch64/aarch64-cores.def (cortex-a76): New entry.
(cortex-a76.cortex-a55): Likewise.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document cortex-a76 and
cortex-a76.cortex-a55.
From-SVN: r262186
* gimple.h (gimple_return_retbnd): Delete.
(gimple_return_set_retbnd): Likewise.
* cgraphunit.c (cgraph_node::expand_thunk): Remove call to
gimple_return_set_retbnd.
* gimple-pretty-print.c (dump_gimple_return): Remove call to
gimple_return_retbnd and adjust.
* tree-inline.h (struct copy_body_data): Remove retbnd field.
* tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
Explicitly return NULL in a couple more cases. Move assertion
on debug statements and remove unreachable code.
(reset_debug_binding): Do not test id->retbnd.
(expand_call_inline): Do not set it.
From-SVN: r262181