dumpfile.c: add indentation via DUMP_VECT_SCOPE
[official-gcc.git] / gcc / ChangeLog
blob5c7c502212322b5c1af618ac52fd1f039220c266
1 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
3         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4         (dump_scope_depth): New variable.
5         (get_dump_scope_depth): New function.
6         (dump_begin_scope): New function.
7         (dump_end_scope): New function.
8         * dumpfile.h (get_dump_scope_depth): New declaration.
9         (dump_begin_scope): New declaration.
10         (dump_end_scope): New declaration.
11         (class auto_dump_scope): New class.
12         (AUTO_DUMP_SCOPE): New macro.
13         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14         AUTO_DUMP_SCOPE.
16 2018-06-29  Richard Biener  <rguenther@suse.de>
18         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
19         compute_all_dependences succeeds.
20         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
21         exceed --param loop-max-datarefs-for-datadeps.
23 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
25         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
27 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
29         PR target/86348
30         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
31         alternative 0 in preferred_for_speed attribute.
33 2018-06-28  Paul Koning  <ni1d@arrl.net>
35         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
36         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
37         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
38         * config/pdp11/pdp11.md: Correct "length" attribute calculation
39         for shift insn patterns.
41 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
43         * cgraph.c (cgraph_node::get_body): Replace assignments to
44         "dump_file" with calls to set_dump_file.
45         * dumpfile.c (alt_dump_file): Make static, and group with...
46         (alt_flags): ...this definition.
47         (dumps_are_enabled): New variable.
48         (refresh_dumps_are_enabled): New function.
49         (set_dump_file): New function.
50         (set_alt_dump_file): New function.
51         (gcc::dump_manager::dump_start): Replace assignments to
52         "dump_file" and "alt_dump_file" with calls to set_dump_file and
53         set_alt_dump_file.
54         (gcc::dump_manager::dump_finish): Likewise.
55         * dumpfile.h (alt_dump_file): Delete decl.
56         (dumps_are_enabled): New variable decl.
57         (set_dump_file): New function decl.
58         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
59         global.
60         * tree-nested.c (lower_nested_functions): Replace assignments to
61         "dump_file" with calls to set_dump_file.
63 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
65         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
66         goto_locus of each outgoing edge of each basic block.
68 2018-06-28  Richard Biener  <rguenther@suse.de>
70         * dwarf2out.c (decl_scope_table): Remove.
71         (push_decl_scope): Likewise.
72         (pop_decl_scope): Likewise.
73         (gen_type_die_for_member): Do not call push/pop_decl_scope.
74         (gen_struct_or_union_type_die): Likewise.
75         (gen_tagged_type_die): Likewise.
76         (dwarf2out_init): Do not initialize decl_scope_table.
77         (dwarf2out_c_finalize): Do not free it.
79 2018-06-28  Richard Biener  <rguenther@suse.de>
81         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
82         deciding whether to not re-use a DIE.
84 2018-06-28  Richard Biener  <rguenther@suse.de>
86         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
87         DW_AT_abstract_origin attribute.
89 2018-06-28  Martin Liska  <mliska@suse.cz>
91         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
92         Use newly introduced constants.
93         * tree-switch-conversion.h (struct jump_table_cluster):
94         Define max_ratio_for_size and max_ratio_for_speed.
96 2018-06-28  Martin Liska  <mliska@suse.cz>
98         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
99         Add new checking assert to catch invalid state.
100         (jump_table_cluster::can_be_handled): Handle single case
101         clusters.
102         (jump_table_cluster::is_beneficial): Bail out for such case.
103         (bit_test_cluster::find_bit_tests):
104         Add new checking assert to catch invalid state.
105         (bit_test_cluster::can_be_handled): Handle single case
106         clusters.
107         (bit_test_cluster::is_beneficial): Bail out for such case.
108         (switch_decision_tree::analyze_switch_statement):
109         Fix comment.
111 2018-06-28  Martin Liska  <mliska@suse.cz>
113         * common.opt: Introduce -completion option.
114         * gcc.c (driver_handle_option): Handle it.
115         (driver::main): Print completions if completion
116         is set.
117         * opt-suggestions.c (option_proposer::get_completions):
118         New function.
119         (option_proposer::suggest_completion): Likewise.
120         (option_proposer::find_param_completions): Likewise.
121         (verify_autocompletions): Likewise.
122         (test_completion_valid_options): Likewise.
123         (test_completion_valid_params): Likewise.
124         (in_completion_p): Likewise.
125         (empty_completion_p): Likewise.
126         (test_completion_partial_match): Likewise.
127         (test_completion_garbage): Likewise.
128         (opt_proposer_c_tests): Likewise.
129         * opt-suggestions.h: Declare new functions.
130         * opts.c (common_handle_option): Handle OPT__completion_.
131         * selftest-run-tests.c (selftest::run_tests): Add
132         opt_proposer_c_tests.
133         * selftest.c (assert_str_startswith): New.
134         * selftest.h (assert_str_startswith): Likewise.
135         (opt_proposer_c_tests): New.
136         (ASSERT_STR_STARTSWITH): Likewise.
138 2018-06-28  Martin Liska  <mliska@suse.cz>
140         * Makefile.in: Add opt-suggestions.o.
141         * gcc-main.c: Include opt-suggestions.h.
142         * gcc.c (driver::driver): Likewise.
143         (driver::~driver): Remove m_option_suggestions.
144         (driver::build_option_suggestions): Moved to option_proposer.
145         (driver::suggest_option): Likewise.
146         (driver::handle_unrecognized_options): Use option_proposer.
147         * gcc.h (class driver): Add new memver m_option_proposer.
148         * opt-suggestions.c: New file.
149         * opt-suggestions.h: New file.
151 2018-06-28  Martin Liska  <mliska@suse.cz>
153         * vec.h (class auto_string_vec): New (moved from auto_argvec).
154         (auto_string_vec::~auto_string_vec): Likewise.
156 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
158         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
159         statement if id->reset_location is true.
160         (copy_edges_for_bb): Do not set goto_locus on the new edges if
161         id->reset_location is true.
162         (copy_phis_for_bb): Force input_location on the arguments if
163         id->reset_location is true.
164         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
165         is set on the function to be inlined.
166         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
167         prevent_decl_creation_for_types fields up and add reset_location field.
169 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
171         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
173 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
175         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
176         registers for Pmode.
177         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
178         hard registers for the clobbered pseudo.
180 2018-06-27  Paul Koning  <ni1d@arrl.net>
182         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
183         mutually exclusive options.
184         * config/pdp11/constraints.md (h): New constraint.
185         (O): Update definition to match shift code generation.
186         (D): New constraint.
187         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
188         (CCFP): Remove.
189         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
190         function.
191         (output_jump): Change arguments.
192         (pdp11_fixed_cc_regs): New function.
193         (pdp11_cc_mode): Ditto.
194         (pdp11_expand_shift): Ditto.
195         (pdp11_assemble_shift): Ditto.
196         (pdp11_small_shift): Ditto.
197         (pdp11_branch_cost): Remove.
198         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
199         from output.
200         (pdp11_register_move_cost): Update for CC registers.
201         (pdp11_rtx_costs): Add case for LSHIFTRT.
202         (pdp11_output_jump): Add CCNZ mode conditional branches.
203         (notice_update_cc_on_set): Remove.
204         (pdp11_cc_mode): New function.
205         (simple_memory_operand): Correct pre/post decrement case.
206         (no_side_effect_operand): New function.
207         (pdp11_regno_reg_class): Add CC_REGS class.
208         (pdp11_fixed_cc_regs): New function.
209         (pdp11_small_shift): New function.
210         (pdp11_expand_shift): New function to expand shift insns.
211         (pdp11_assemble_shift): New function to output shifts.
212         (pdp11_branch_cost): Remove.
213         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
214         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
215         (WCHAR_TYPE): Ditto.
216         (PTRDIFF_TYPE): Ditto.
217         (ADJUST_INSN_LENGTH): New macro.
218         (FIXED_REGISTERS): Add CC registers.
219         (CALL_USED_REGISTERS): Ditto.
220         (reg_class): Ditto.
221         (REG_CLASS_NAMES): Ditto.
222         (REG_CLASS_CONTENTS): Ditto.
223         (SELECT_CC_MODE): Use new function.
224         (TARGET_FLAGS_REGNUM): New macro.
225         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
226         (cc0_reg_rtx): Remove.
227         (CC_STATUS_MDEP): Remove.
228         (CC_STATUS_MDEFP_INIT): Remove.
229         (CC_IN_FPU): Remove.
230         (NOTICE_UPDATE_CC): Remove.
231         (REGISTER_NAMES): Add CC registers.
232         (BRANCH_COST): Change to constant 1.
233         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
234         handling.
235         * config/pdp11/pdp11.opt (mbcopy): Remove.
236         (mbcopy-builtin): Remove.
237         (mbranch-cheap): Remove.
238         (mbranch-expensive): Remove.
239         * config/pdp11/predicates.md (expand_shift_operand): Update to
240         match shift code generation.
241         (ccnz_operator): New predicate.
242         * doc/invoke.texi (PDP-11 Options): Remove deleted options
243         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
244         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
245         exclusive options.
246         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
247         description of O constraint.
249 2018-06-27  Jeff Law  <law@redhat.com>
250             Austin Law  <austinklaw@gmail.com>
252         * config/v850/v850.md (addsi3_set_flags): New pattern.
253         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
254         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
255         (zero_extendhisi2_v850_set_flags): Likewise.
256         (zero_extendqisi2_v850_set_flags): Likewise.
257         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
258         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
259         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
261         * config/v850/v850-protos.h (notice_update_cc): Remove.
262         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
263         (v850_print_operand): Handle 'D' and "d".
264         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
265         Add handling of arithmetic/logical operations compared against zero.
266         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
267         Do not look at v850_compare_op, instead get mode from last argument.
268         (v850_gen_compare): Remove
269         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
270         after reload for prologue insns.
271         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
272         patterns.
273         (construct_save_jarl): Likewise.
274         (TARGET_FLAGS_REGNUM): Define.
275         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
276         (NOTICE_UPDATE_CC): Remove.
277         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
278         than cc0.  Conditionalize on reload_completed.
279         (cmpsi_insn, setfcc_insn): Likewise.
280         (tst1 splitter): Turn into define_and_split which sets the flags
281         after reload.
282         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
283         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
284         (cstoresf4, cstoredf4): Clobber the flags.
285         (cmpsi, cmpsf, cmpdf): Remove expanders.
286         (setf_insn): Remove pattern.
287         (addsi3): Turn into define_and_split which clobbers the flags after
288         reload and a suitable pattern (addsi3_clobber_flags) for use after
289         reload.
290         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
291         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
292         (ashrsi3, ashrsi3_v850e2): Likewise.
293         (bins): Clobber the flags.
294         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
295         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
296         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
297         (call_value_internal_short, call_value_internal_long): Likewise.
298         (callt_save_interrupt, callt_return_interrupt): Likewise.
299         (save_interrupt, return_interrupt): Likewise.
300         (callt_save_all_interrupt, save_all_interrupt): Likewise.
301         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
302         (restore_all_interrupt, _restore_all_interrupt): Likewise.
303         (All FP comparisons): Only allow after reload has completed.
304         (trfsr): Likewise.
305         (divh, divhu): Tweak output template.
306         (branch_z_normal, branch_z_invert): Remove
307         (branch_nz_normal, branch_nz_invert): Likewise.
308         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
310         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
311         * config/v850/v850.c (notice_update_cc): Remove.
312         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
313         (CC_NO_CARRY): Likewise.
314         (NOTICE_UPDATE_CC): Define to nothing.
315         * config/v850/v850.md: Remove block comment on cc0 handling
316         Remove "cc" attribute from all patterns.  Remove cc_status handling
317         from all patterns.  Minor formatting fixes.
319 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
321         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
322         (cortex-a76.cortex-a55): Likewise.
323         * config/aarch64/aarch64-tune.md: Regenerate.
324         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
325         cortex-a76.cortex-a55.
327 2018-06-27  Jeff Law  <law@redhat.com>
329         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
330         (MULTILIB_DIRNAMES): Similarly.
332 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
334         * gimple.h (gimple_return_retbnd): Delete.
335         (gimple_return_set_retbnd): Likewise.
336         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
337         gimple_return_set_retbnd.
338         * gimple-pretty-print.c (dump_gimple_return): Remove call to
339         gimple_return_retbnd and adjust.
340         * tree-inline.h (struct copy_body_data): Remove retbnd field.
341         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
342         Explicitly return NULL in a couple more cases.  Move assertion
343         on debug statements and remove unreachable code.
344         (reset_debug_binding): Do not test id->retbnd.
345         (expand_call_inline): Do not set it.
347 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
349         * configure.ac: Add --disable-gcov option.
350         * configure: Regenerate.
351         * Makefile.in: Honour @enable_gcov@.
352         * doc/install.texi: Document --disable-gcov.
354 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
356         * config/arm/arm-cpus.in (cortex-a76): New entry.
357         (cortex-a76.cortex-a55): Likewise.
358         * config/arm/arm-tables.opt: Regenerate.
359         * config/arm/arm-tune.md: Likewise.
360         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
361         * doc/invoke.texi (ARM Options): Document cortex-a76 and
362         cortex-a76.cortex-a55.
364 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
366         PR target/85769
367         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
369 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
371         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
372         comment.
373         (EPILOGUE_USES): Likewise.
375 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
377         * tree-inline.c (remap_location): New function extracted from...
378         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
379         (copy_phis_for_bb): ...here.  Call remap_location.
380         (copy_cfg_body): Adjust call to copy_edges_for_bb.
382 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
384         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
385         unaligned vsx for 16B memset.
387 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
389         PR target/86285
390         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
391         ieee128_float_type_node to long_double_type_node unless
392         TARGET_LONG_DOUBLE_128 is set.
394 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
396         * cfgloop.c (get_loop_location): Convert return type from
397         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
398         by implicit construction from rtx_insn *, and using
399         dump_user_location_t::from_function_decl for the fallback case.
400         * cfgloop.h (get_loop_location): Convert return type from
401         location_t to dump_user_location_t.
402         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
403         dump_printf_loc to pass in a dump_location_t rather than a
404         location_t, via the gimple stmt.
405         * coverage.c (get_coverage_counts): Update calls to
406         dump_printf_loc to pass in dump_location_t rather than a
407         location_t.
408         * doc/optinfo.texi (Dump types): Convert example of
409         dump_printf_loc from taking "locus" to taking "insn".  Update
410         description of the "_loc" calls to cover dump_location_t.
411         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
412         "selftest.h".
413         (dump_user_location_t::dump_user_location_t): New constructors,
414         from gimple *stmt and rtx_insn *.
415         (dump_user_location_t::from_function_decl): New function.
416         (dump_loc): Make static.
417         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
418         const dump_location_t &.
419         (dump_generic_expr_loc): Delete.
420         (dump_printf_loc): Convert param "loc" from location_t to
421         const dump_location_t &.
422         (selftest::test_impl_location): New function.
423         (selftest::dumpfile_c_tests): New function.
424         * dumpfile.h: Include "profile-count.h".
425         (class dump_user_location_t): New class.
426         (struct dump_impl_location_t): New struct.
427         (class dump_location_t): New class.
428         (dump_printf_loc): Convert 2nd param from source_location to
429         const dump_location_t &.
430         (dump_generic_expr_loc): Delete.
431         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
432         const dump_location_t &.
433         * gimple-fold.c (fold_gimple_assign): Update call to
434         dump_printf_loc to pass in a dump_location_t rather than a
435         location_t, via the gimple stmt.
436         (gimple_fold_call): Likewise.
437         * gimple-loop-interchange.cc
438         (loop_cand::analyze_iloop_reduction_var): Update for change to
439         check_reduction_path.
440         (tree_loop_interchange::interchange): Update for change to
441         find_loop_location.
442         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
443         change in return-type of find_loop_location.
444         (graphite_regenerate_ast_isl): Likewise.
445         * graphite-optimize-isl.c (optimize_isl): Likewise.
446         * graphite.c (graphite_transform_loops): Likewise.
447         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
448         pass in a dump_location_t rather than a location_t, via the
449         gimple stmt.
450         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
451         * ipa.c (walk_polymorphic_call_targets): Likewise.
452         * loop-unroll.c (report_unroll): Convert "locus" param from
453         location_t to dump_location_t.
454         (decide_unrolling): Update for change to get_loop_location's
455         return type.
456         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
457         location_t to dump_user_location_t.
458         (grid_find_single_omp_among_assignments_1): Updates calls to
459         dump_printf_loc to pass in a dump_location_t rather than a
460         location_t, via the gimple stmt.
461         (grid_parallel_clauses_gridifiable): Convert "tloc" from
462         location_t to dump_location_t.  Updates calls to dump_printf_loc
463         to pass in a dump_location_t rather than a location_t, via the
464         gimple stmt.
465         (grid_inner_loop_gridifiable_p): Likewise.
466         (grid_dist_follows_simple_pattern): Likewise.
467         (grid_gfor_follows_tiling_pattern): Likewise.
468         (grid_target_follows_gridifiable_pattern): Likewise.
469         (grid_attempt_target_gridification): Convert initialization
470         of local "grid" from memset to zero-initialization; FIXME: does
471         this require C++11?  Update call to dump_printf_loc to pass in a
472         optinfo_location rather than a location_t, via the gimple stmt.
473         * profile.c (read_profile_edge_counts): Updates call to
474         dump_printf_loc to pass in a dump_location_t rather than a
475         location_t
476         (compute_branch_probabilities): Likewise.
477         * selftest-run-tests.c (selftest::run_tests): Call
478         dumpfile_c_tests.
479         * selftest.h (dumpfile_c_tests): New decl.
480         * tree-loop-distribution.c (pass_loop_distribution::execute):
481         Update for change in return type of find_loop_location.
482         * tree-parloops.c (parallelize_loops): Likewise.
483         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
484         "locus" from location_t to dump_user_location_t.
485         (canonicalize_loop_induction_variables): Likewise.
486         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
487         for change in return type of find_loop_location.
488         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
489         to dump_printf_loc to pass in a dump_location_t rather than a
490         location_t, via the stmt.
491         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
492         Likewise.
493         * tree-vect-loop-manip.c (find_loop_location): Convert return
494         type from source_location to dump_user_location_t.
495         (vect_do_peeling): Update for above change.
496         (vect_loop_versioning): Update for change in type of
497         vect_location.
498         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
499         from location_t to dump_user_location_t.
500         (vect_estimate_min_profitable_iters): Update for change in type
501         of vect_location.
502         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
503         location_t to dump_location_t.
504         (vect_slp_bb): Update for change in type of vect_location.
505         * tree-vectorizer.c (vect_location): Convert from source_location
506         to dump_user_location_t.
507         (try_vectorize_loop_1): Update for change in vect_location's type.
508         (vectorize_loops): Likewise.
509         (increase_alignment): Likewise.
510         * tree-vectorizer.h (vect_location): Convert from source_location
511         to dump_user_location_t.
512         (find_loop_location): Convert return type from source_location to
513         dump_user_location_t.
514         (check_reduction_path): Convert 1st param from location_t to
515         dump_user_location_t.
516         * value-prof.c (check_counter): Update call to dump_printf_loc to
517         pass in a dump_user_location_t rather than a location_t; update
518         call to error_at for change in type of "locus".
519         (check_ic_target): Update call to dump_printf_loc to
520         pass in a dump_user_location_t rather than a location_t, via the
521         call_stmt.
523 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
525         * config/s390/s390.h (enum processor_flags): Do not use
526         default tune parameter when -march was specified.
528 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
530         PR target/86314
531         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
532         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
533         operands.
535 2018-06-26  Richard Biener  <rguenther@suse.de>
537         PR tree-optimization/86287
538         PR bootstrap/86316
539         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
540         (vect_analyze_loop): Initialize n_stmts.
542 2018-06-26  Richard Biener  <rguenther@suse.de>
544         PR middle-end/86271
545         * fold-const.c (fold_convertible_p): Pointer extension
546         isn't valid.
548 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
550         PR debug/86064
551         * dwarf2out.c (loc_list_has_views): Adjust comments.
552         (dw_loc_list): Split single cross-partition range with
553         nonzero locview.
555 2018-06-25  Jeff Law  <law@redhat.com>
557         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
558         on -mbig-switch by default.
560         * config/v850/predicates.md (const_float_1_operand): Fix match_code
561         test.
562         (const_float_0_operand): Remove unused predicate.
563         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
564         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
565         (recipsf2): New expander.  Original pattern now called
566         (recipsf2_insn).
567         (recipdf2, recipdf2_insn): Similarly.
568         (rsqrtsf2, rsqrtsf2_insn): Similarly
569         (rsqrtdf2, rsqrtdf2_insn): Similarly
571 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
573         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
574         Simplify logic for FreeBSD (twice).
576 2018-06-25  Martin Sebor  <msebor@redhat.com>
578         PR tree-optimization/86204
579         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
580         a strnlen result if it's less than the length of the string.
582 2018-06-25  Martin Sebor  <msebor@redhat.com>
584         PR tree-optimization/85700
585         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
586         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
587         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
589 2018-06-25  Martin Sebor  <msebor@redhat.com>
591         * doc/extend.texi (Zero-length arrays): Update and clarify.
593 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
595         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
596         added IEEE/IBM long double multilib support on PowerPC little
597         endian Linux systems.
598         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
599         (MULTILIB_DEFAULTS): Likewise.
600         * config/rs6000/rs6000.c (rs6000_option_override_internal):
601         Likewise.
602         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
603         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
604         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
606 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
608         PR middle-end/86311
609         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
610         (REORDER_45): Likewise.
612 2018-06-25  Jeff Law  <law@redhat.com>
614         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
615         dividend to 32 bits.  Adjust length.
616         (udivmodhi4): Cleanup output template.  Fix length.
618 2018-06-25  Carl Love  <cel@us.ibm.com>
620         * config/rs6000/vsx.md: Change word selector to prefered location.
622 2018-06-25  Richard Biener  <rguenther@suse.de>
624         PR tree-optimization/86304
625         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
626         epilogue-if-converted loops as well.
628 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
630         * lto-section-out.c (lto_begin_section): Do not print section
631         name for noaddr and unnumbered dumps.
633 2018-06-25  Richard Biener  <rguenther@suse.de>
635         * tree-vectorizer.h (struct vec_info_shared): New structure
636         with parts split out from struct vec_info and loop_nest from
637         struct _loop_vec_info.
638         (struct vec_info): Adjust accordingly.
639         (struct _loop_vec_info): Likewise.
640         (LOOP_VINFO_LOOP_NEST): Adjust.
641         (LOOP_VINFO_DATAREFS): Likewise.
642         (LOOP_VINFO_DDRS): Likewise.
643         (struct _bb_vec_info): Likewise.
644         (BB_VINFO_DATAREFS): Likewise.
645         (BB_VINFO_DDRS): Likewise.
646         (struct _stmt_vec_info): Add dr_aux member.
647         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
648         (DR_MISALIGNMENT_UNINITIALIZED): New.
649         (set_dr_misalignment): Adjust.
650         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
651         (vect_analyze_loop): Adjust prototype.
652         (vect_analyze_loop_form): Likewise.
653         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
654         Compute dependences lazily.
655         (vect_record_base_alignments): Use shared datarefs/ddrs.
656         (vect_verify_datarefs_alignment): Likewise.
657         (vect_analyze_data_refs_alignment): Likewise.
658         (vect_analyze_data_ref_accesses): Likewise.
659         (vect_analyze_data_refs): Likewise.
660         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
661         constructor parameter for shared part.
662         (vect_analyze_loop_form): Pass in shared part and adjust.
663         (vect_analyze_loop_2): Pass in storage for the number of
664         stmts.  Move loop nest finding to the caller.  Compute
665         datarefs lazily.
666         (vect_analyze_loop): Pass in shared part.
667         (vect_transform_loop): Verify shared datarefs are unchanged.
668         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
669         constructor parameter for shared part.
670         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
671         (vect_slp_bb): Verify shared datarefs are unchanged before
672         transform.
673         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
674         change.
675         (new_stmt_vec_info): Initialize DR_AUX misalignment to
676         DR_MISALIGNMENT_UNINITIALIZED.
677         * tree-vectorizer.c (vec_info::vec_info): Add constructor
678         parameter for shared part.
679         (vec_info::~vec_info): Adjust.
680         (vec_info_shared::vec_info_shared): New.
681         (vec_info_shared::~vec_info_shared): Likewise.
682         (vec_info_shared::save_datarefs): Likewise.
683         (vec_info_shared::check_datarefs): Likewise.
684         (try_vectorize_loop_1): Construct shared part live for analyses
685         of a single loop for multiple vector sizes.
686         * tree-parloops.c (gather_scalar_reductions): Adjust.
688 2018-06-25  Richard Biener  <rguenther@suse.de>
690         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
691         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
692         (vect_analyze_data_refs): Remove similar code from here and
693         simplify accordingly.
695 2018-06-25  Richard Biener  <rguenther@suse.de>
697         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
698         for reverse storage order accesses rather than asserting
699         they cannot happen here.
701 2018-06-25  Tom de Vries  <tdevries@suse.de>
703         PR debug/86257
704         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
705         Use data16 instead of .byte for insn prefix.
707 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
709         PR C++/86082
710         * parser.c (make_char_string_pack): Pass this literal chars
711         through cpp_interpret_string.
712         (cp_parser_userdef_numeric_literal): Check the result of
713         make_char_string_pack.
715 2018-06-24  Maya Rashish  <coypu@sdf.org>
717         * ginclude/stddef.h: Simplify conditions around avoiding
718         re-definition of __size_t.
720 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
722         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
723         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
725 2018-06-22  Maya Rashish  <coypu@sdf.org>
727         * doc/invoke.texi (mno-fancy-math-387): Update for changes
728         made to OpenBSD and NetBSD through the years.
730 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
732         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
733         behavior of vec_pack (vector double, vector double) to match
734         behavior of vec_float2 (vector double, vector double).
736 2018-06-22  Olivier Hainque  <hainque@adacore.com>
738         * gimplify.c (gimplify_function_tree): Prevent creation
739         of a trampoline for the address of the current function
740         passed to entry/exit instrumentation hooks.
742 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
744         PR target/86222
745         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
746         correctly.
748 2018-06-22  Martin Liska  <mliska@suse.cz>
750         PR tree-optimization/86263
751         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
752         Bail out if is_enabled is false.
753         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
754         New declaration.
755         (jump_table_cluster::is_enabled): New function.
757 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
759         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
760         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
761         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
762         (lto_input_ts_binfo_tree_pointers): Likewise.
763         * tree-streamer-out.c (streamer_write_tree_bitfields,
764         write_ts_binfo_tree_pointers): Likewise.
765         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
767 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
769         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
771 2018-06-22  Martin Liska  <mliska@suse.cz>
773         * symbol-summary.h (get): Make it pure and inline move
774         functionality from ::get function.
775         (get): Remove and inline into ::get and ::get_create.
776         (get_create): Move code from ::get function.
778 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
780         PR target/85994
781         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
782         -x assembler-with-cpp.
784 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
786         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
787         _FILE_OFFSET_BITS=64 for C++.
789 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
791         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
792         conversion insn that shows up when pr85657-3.c is compiled using
793         IEEE 128-bit long double.
794         (neg<mode>2_internal): Use the correct mode to check whether the
795         mode is IBM extended.
796         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
797         multiply and divide external functions from being created more
798         than once.
800 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
802         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
803         functions.
804         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
805         the edge can be forwarded.
806         (cfg_layout_merge_blocks): Likewise.
808 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
810         * except.c (finish_eh_generation): Commit edge insertions only after
811         the EH edges have been redirected from post-landing to landing pads.
813 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
815         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
816         create_tmp_var_for to create the FRAME decl.
817         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
819 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
821         * tree-inline.c (copy_edges_for_bb): Minor tweak.
822         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
823         debug statement when resetting its value.
824         (expand_call_inline): Copy the locus of the call onto the assignment
825         of the return value, if any.  Use local variable in more cases.
827 2018-06-21  Martin Liska  <mliska@suse.cz>
829         * ipa-pure-const.c (propagate_nothrow): Use
830         funct_state_summaries->get.
831         (dump_malloc_lattice): Likewise.
832         (propagate_malloc): Likewise.
834 2018-06-21  Richard Biener  <rguenther@suse.de>
836         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
837         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
838         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
839         comment.
840         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
841         BLOCK_ABSTRACT_ORIGIN unconditionally.
843 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
845         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
846         deleting it.
847         * ipa-reference.c (ipa_reference_c_finalize): Delete
848         ipa_ref_opt_sum_summaries and set it to NULL.
850 2018-06-21  Tom de Vries  <tdevries@suse.de>
852         PR tree-optimization/85859
853         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
854         test with comment from bb_no_side_effects_p.
856 2018-06-21  Richard Biener  <rguenther@suse.de>
858         PR tree-optimization/86232
859         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
860         max for constant niter.
862 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
864         * config/aarch64/aarch64-simd.md
865         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
867 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
869         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
870         Make opernads of the unspec commutative.
872 2018-06-21  Richard Biener  <rguenther@suse.de>
874         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
875         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
876         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
877         (vect_analyze_data_ref_dependence): Re-order checks to deal with
878         NULL DR_STEP.
879         (vect_record_base_alignments): Do not record base alignment
880         for gathers or scatters.
881         (vect_compute_data_ref_alignment): Drop return value that is always
882         true.  Bail out early for gathers or scatters.
883         (vect_enhance_data_refs_alignment): Bail out early for gathers
884         or scatters.
885         (vect_find_same_alignment_drs): Likewise.
886         (vect_analyze_data_refs_alignment): Remove dead code.
887         (vect_slp_analyze_and_verify_node_alignment): Likewise.
888         (vect_analyze_data_refs): For possible gathers or scatters do
889         not create an alternate DR, just check their possible validity
890         and mark them.  Adjust DECL_NONALIASED handling to not rely
891         on DR_BASE_ADDRESS.
892         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
893         update inits of gathers or scatters.
894         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
895         Also copy gather/scatter flag to pattern vinfo.
897 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
899         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
900         behavior of vec_packsu (vector unsigned long long, vector unsigned
901         long long) to match behavior of vec_packs with same signature.
903 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
904             Thomas Schwinge <thomas@codesourcery.com>
905             Cesar Philippidis  <cesar@codesourcery.com>
907         * gimplify.c (gimplify_scan_omp_clauses): Add support for
908         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
909         (gimplify_adjust_omp_clauses): Likewise.
910         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
911         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
912         (gimplify_omp_target_update): Update handling of acc update and
913         enter/exit data.
914         * omp-low.c (install_var_field): Remove unused parameter
915         base_pointers_restrict.
916         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
917         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
918         FINALIZE}
919         (omp_target_base_pointers_restrict_p): Delete.
920         (scan_omp_target): Update call to scan_sharing_clauses.
921         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
922         FINALIZE}.
923         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
924         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
925         (convert_local_omp_clauses): Likewise.
926         * tree-pretty-print.c (dump_omp_clause): Likewise.
927         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
928         FINALIZE}.
929         (omp_clause_code_name): Likewise.
931 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
933         PR debug/86194
934         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
935         be narrowed.
937         PR tree-optimization/86231
938         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
939         anti-range don't overwrite *vr0min before using it to compute *vr0max.
941 2018-06-20  Tom de Vries  <tdevries@suse.de>
943         PR tree-optimization/86097
944         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
945         iv type if signedness of iv type is not the same as that of *nit.
947 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
949         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
950         EDGE_EH edges, verify they are all EDGE_EH.
952 2018-06-20  Maya Rashish  <coypu@sdf.org>
954         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
956 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
958         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
959         * config/aarch64/aarch64.c (xgene1_tunings): Add
960         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
961         (aarch64_mode_valid_for_sched_fusion_p):
962         Allow 16-byte modes.
963         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
964         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
965         128-bit modes.
966         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
967         New pattern.
968         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
969         * config/aarch64/iterators.md (VQ2): New mode iterator.
971 2018-06-20  Martin Liska  <mliska@suse.cz>
973         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
974         Change default ratio from 10 to 8.
976 2018-06-20  Martin Liska  <mliska@suse.cz>
978         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
979         New.
980         (bit_test_cluster::find_bit_tests): Likewise.
981         (switch_decision_tree::analyze_switch_statement): Find clusters.
982         * tree-switch-conversion.h (struct jump_table_cluster): Document
983         hierarchy.
985 2018-06-20  Martin Liska  <mliska@suse.cz>
987         * tree-switch-conversion.c (switch_conversion::collect):
988         Record m_uniq property.
989         (switch_conversion::expand): Bail out for special conditions.
990         (group_cluster::~group_cluster): New.
991         (group_cluster::group_cluster): Likewise.
992         (group_cluster::dump): Likewise.
993         (jump_table_cluster::emit): New.
994         (switch_decision_tree::fix_phi_operands_for_edges): New.
995         (struct case_node): Remove struct.
996         (jump_table_cluster::can_be_handled): New.
997         (case_values_threshold): Moved to header.
998         (reset_out_edges_aux): Likewise.
999         (jump_table_cluster::is_beneficial): New.
1000         (bit_test_cluster::can_be_handled): Likewise.
1001         (add_case_node): Remove.
1002         (bit_test_cluster::is_beneficial): New.
1003         (case_bit_test::cmp): New.
1004         (bit_test_cluster::emit): New.
1005         (expand_switch_as_decision_tree_p): Remove.
1006         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1007         (fix_phi_operands_for_edge): Likewise.
1008         (switch_decision_tree::analyze_switch_statement): New.
1009         (compute_cases_per_edge): Move ...
1010         (switch_decision_tree::compute_cases_per_edge): ... here.
1011         (try_switch_expansion): Likewise.
1012         (switch_decision_tree::try_switch_expansion): Likewise.
1013         (record_phi_operand_mapping): Likewise.
1014         (switch_decision_tree::record_phi_operand_mapping): Likewise.
1015         (emit_case_decision_tree): Likewise.
1016         (switch_decision_tree::emit): Likewise.
1017         (balance_case_nodes): Likewise.
1018         (switch_decision_tree::balance_case_nodes): Likewise.
1019         (dump_case_nodes): Likewise.
1020         (switch_decision_tree::dump_case_nodes): Likewise.
1021         (emit_jump): Likewise.
1022         (switch_decision_tree::emit_jump): Likewise.
1023         (emit_cmp_and_jump_insns): Likewise.
1024         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1025         (emit_case_nodes): Likewise.
1026         (switch_decision_tree::emit_case_nodes): Likewise.
1027         (conditional_probability): Remove.
1028         * tree-switch-conversion.h (enum cluster_type): New.
1029         (PRINT_CASE): New.
1030         (struct cluster): Likewise.
1031         (cluster::cluster): Likewise.
1032         (struct simple_cluster): Likewise.
1033         (simple_cluster::simple_cluster): Likewise.
1034         (struct group_cluster): Likewise.
1035         (struct jump_table_cluster): Likewise.
1036         (struct bit_test_cluster): Likewise.
1037         (struct min_cluster_item): Likewise.
1038         (struct case_tree_node): Likewise.
1039         (case_tree_node::case_tree_node): Likewise.
1040         (jump_table_cluster::case_values_threshold): Likewise.
1041         (struct case_bit_test): Likewise.
1042         (struct switch_decision_tree): Likewise.
1043         (struct switch_conversion): Likewise.
1044         (switch_decision_tree::reset_out_edges_aux): Likewise.
1046 2018-06-20  Martin Liska  <mliska@suse.cz>
1048         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
1049         (hoist_edge_and_branch_if_true): Likewise.
1050         (expand_switch_using_bit_tests_p): Likewise.
1051         (struct case_bit_test): Likewise.
1052         (case_bit_test_cmp): Likewise.
1053         (emit_case_bit_tests): Likewise.
1054         (switch_conversion::switch_conversion): New class.
1055         (struct switch_conv_info): Remove old struct.
1056         (collect_switch_conv_info): More to ...
1057         (switch_conversion::collect): ... this.
1058         (check_range): Likewise.
1059         (switch_conversion::check_range): Likewise.
1060         (check_all_empty_except_final): Likewise.
1061         (switch_conversion::check_all_empty_except_final): Likewise.
1062         (check_final_bb): Likewise.
1063         (switch_conversion::check_final_bb): Likewise.
1064         (create_temp_arrays): Likewise.
1065         (switch_conversion::create_temp_arrays): Likewise.
1066         (free_temp_arrays): Likewise.
1067         (gather_default_values): Likewise.
1068         (switch_conversion::gather_default_values): Likewise.
1069         (build_constructors): Likewise.
1070         (switch_conversion::build_constructors): Likewise.
1071         (constructor_contains_same_values_p): Likewise.
1072         (switch_conversion::contains_same_values_p): Likewise.
1073         (array_value_type): Likewise.
1074         (switch_conversion::array_value_type): Likewise.
1075         (build_one_array): Likewise.
1076         (switch_conversion::build_one_array): Likewise.
1077         (build_arrays): Likewise.
1078         (switch_conversion::build_arrays): Likewise.
1079         (gen_def_assigns): Likewise.
1080         (switch_conversion::gen_def_assigns): Likewise.
1081         (prune_bbs): Likewise.
1082         (switch_conversion::prune_bbs): Likewise.
1083         (fix_phi_nodes): Likewise.
1084         (switch_conversion::fix_phi_nodes): Likewise.
1085         (gen_inbound_check): Likewise.
1086         (switch_conversion::gen_inbound_check): Likewise.
1087         (process_switch): Use the newly created class.
1088         (switch_conversion::expand): New.
1089         (switch_conversion::~switch_conversion): New.
1090         * tree-switch-conversion.h: New file.
1092 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1094         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1095         tree-vect-patterns.c.
1096         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1097         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
1098         (vect_recog_sad_pattern): Likewise.
1099         (vect_recog_widen_sum_pattern): Likewise.
1100         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
1101         (vect_recog_widen_shift_pattern): Remove the type_in argument.
1102         (vect_recog_rotate_pattern): Likewise.
1103         (vect_recog_mult_pattern): Likewise.
1104         (vect_recog_vector_vector_shift_pattern): Likewise.
1105         (vect_recog_divmod_pattern): Likewise.
1106         (vect_recog_mixed_size_cond_pattern): Likewise.
1107         (vect_recog_bool_pattern): Likewise.
1108         (vect_recog_mask_conversion_pattern): Likewise.
1109         (vect_try_gather_scatter_pattern): Likewise.
1110         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
1111         (vect_recog_over_widening_pattern): Likewise.
1112         (vect_recog_gather_scatter_pattern): Likewise.
1113         (vect_recog_func_ptr): Move from tree-vectorizer.h
1114         (vect_vect_recog_func_ptrs): Move further down the file.
1115         (vect_recog_func): Likewise.  Remove the third argument.
1116         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1117         (vect_pattern_recog_1): Expect the pattern function to do any
1118         necessary target tests.  Also expect it to provide a vector type.
1119         Remove the type_in handling.
1121 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1123         * tree-vect-patterns.c (vect_pattern_detected): New function.
1124         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1125         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1126         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1127         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1128         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1129         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1130         (vect_recog_mask_conversion_pattern)
1131         (vect_try_gather_scatter_pattern): Likewise.
1133 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1135         * tree-vect-patterns.c (vect_get_internal_def): New function.
1136         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1137         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1138         (search_type_for_mask_1): Use it.
1140 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1142         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1143         redundant WIDEN_SUM_EXPR handling.
1144         (vect_recog_sad_pattern): Likewise.
1146 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1148         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1149         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1150         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1151         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1152         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1154 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1156         * tree-vect-stmts.c (vectorizable_call): Make sure that we
1157         use the stmt_vec_info of the original bb statement for the
1158         new zero assignment, even if the call is part of a pattern.
1160 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1162         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1163         that the sequence is attached to the original statement rather
1164         than the pattern statement.
1165         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1166         PATTERN_DEF_SEQ from the original statement rather than
1167         the main pattern statement.
1168         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1169         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1170         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1172 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1174         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1175         definition statements before the early exit for statements that aren't
1176         live or relevant.
1177         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1178         split out from...
1179         (vect_transform_loop): ...here.  Process pattern definition
1180         statements without first checking whether the main pattern
1181         statement is live or relevant.
1183 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1185         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1186         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1187         
1188 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
1190         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1191         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1192         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1193         (expand_block_compare): Change select_block_compare_mode call.
1194         (expand_strncmp_align_check): Use new functions, fix comment.
1195         (emit_final_str_compare_gpr): New function.
1196         (expand_strn_compare): Refactor and clean up code.
1197         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1199 2018-06-19  Tony Reix  <tony.reix@atos.com>
1200             Damien Bergamini  <damien.bergamini@atos.com>
1201             David Edelsohn  <dje.gcc@gmail.com>
1203         * collect2.c (static_obj): New variable.
1204         (static_libs): New variable.
1205         (is_in_list): Uncomment declaration.
1206         (main): Track AIX libraries linked statically.
1207         (is_in_list): Uncomment definition.
1208         (scan_prog_file): Don't add AIX shared libraries initializer
1209         to constructor list if linking statically.
1211 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
1213         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1214         constant.
1215         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1217 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
1219         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1220         blocks.
1222 2018-06-19  Martin Liska  <mliska@suse.cz>
1224         * config/i386/i386.c (ix86_can_inline_p): Do not use
1225         ipa_fn_summaries::get_create.
1226         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1227         get.
1228         (devirtualization_time_bonus): Likewise.
1229         (ipcp_propagate_stage): Likewise.
1230         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1231         (edge_set_predicate): Likewise.
1232         (evaluate_conditions_for_known_args): Likewise.
1233         (evaluate_properties_for_edge): Likewise.
1234         (ipa_call_summary::reset): Tranform to ...
1235         (ipa_call_summary::~ipa_call_summary): ... this.
1236         (ipa_fn_summary::reset): Transform to ...
1237         (ipa_fn_summary::~ipa_fn_summary): ... this.
1238         (ipa_fn_summary_t::remove): Rename to ...
1239         (ipa_fn_summary_t::remove_callees): ... this.
1240         (ipa_fn_summary_t::duplicate): Use placement new
1241         instead of memory copy.
1242         (ipa_call_summary_t::duplicate): Likewise.
1243         (ipa_call_summary_t::remove): Remove.
1244         (dump_ipa_call_summary): Change get_create to get.
1245         (ipa_dump_fn_summary): Dump only when summary exists.
1246         (analyze_function_body): Use symbol_summary::get instead
1247         of get_create.
1248         (compute_fn_summary): Likewise.
1249         (estimate_edge_devirt_benefit): Likewise.
1250         (estimate_edge_size_and_time): Likewise.
1251         (inline_update_callee_summaries): Likewise.
1252         (remap_edge_change_prob): Likewise.
1253         (remap_edge_summaries): Likewise.
1254         (ipa_merge_fn_summary_after_inlining): Likewise.
1255         (write_ipa_call_summary): Likewise.
1256         (ipa_fn_summary_write): Likewise.
1257         (ipa_free_fn_summary): Likewise.
1258         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1259         (struct ipa_call_summary): Likewise.
1260         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1261         of get_create.
1262         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1263         (estimate_size_after_inlining): Likewise.
1264         (estimate_growth): Likewise.
1265         (growth_likely_positive): Likewise.
1266         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1267         (inline_call): Likewise.
1268         * ipa-inline.c (caller_growth_limits): Likewise.
1269         (can_inline_edge_p): Likewise.
1270         (can_inline_edge_by_limits_p): Likewise.
1271         (compute_uninlined_call_time): Likewise.
1272         (compute_inlined_call_time): Likewise.
1273         (want_inline_small_function_p): Likewise.
1274         (edge_badness): Likewise.
1275         (update_caller_keys): Likewise.
1276         (update_callee_keys): Likewise.
1277         (inline_small_functions): Likewise.
1278         (inline_to_all_callers_1): Likewise.
1279         (dump_overall_stats): Likewise.
1280         (early_inline_small_functions): Likewise.
1281         (early_inliner): Likewise.
1282         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1283         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1284         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1285         * ipa-split.c (execute_split_functions): Likewise.
1286         * symbol-summary.h: Likewise.
1287         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1289 2018-06-19  Richard Biener  <rguenther@suse.de>
1291         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1292         (vectorize_loops): ... here.  Fix dbgcnt handling.
1293         (try_vectorize_loop): Wrap try_vectorize_loop_1.
1295 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
1297         PR target/86197
1298         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1299         ieee128 argument takes up only one (vector) register, not two (floating
1300         point) registers.
1302 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1304         * gimplify.c (gimplify_init_constructor): Really never clear for an
1305         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1307 2018-06-19  Richard Biener  <rguenther@suse.de>
1309         PR tree-optimization/86179
1310         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1311         after failed recognition.
1313 2018-06-18  Martin Sebor  <msebor@redhat.com>
1315         PR middle-end/85602
1316         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1317         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1318         Handle integer subtraction.
1319         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1320         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1322 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1324         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1325         param from rtx to rtx_insn *.
1326         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1327         param.
1328         (frv_ifcvt_modify_insn): Likwise.
1329         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1330         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
1331         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1332         as_a <rtx_insn *> cast to local "unprotected_region" once
1333         it's been established that it's not NULL or pc_rtx.
1334         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1335         param "sethi" from rtx to rtx_insn *.
1336         (nds32_group_float_insns): Likewise for param "insn".
1337         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1338         param.
1339         (vax_output_int_subtract): Likewise.
1340         * config/vax/vax.c (vax_output_int_add): Likewise for param
1341         "insn".
1342         (vax_output_int_subtract): Likewise.
1343         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1344         (emit_pattern_after): Likewise for param "after".
1345         (emit_insn_after): Likewise.
1346         (emit_jump_insn_after): Likewise.
1347         (emit_call_insn_after): Likewise.
1348         (emit_debug_insn_after): Likewise.
1349         (emit_pattern_before): Likewise for param "before".
1350         (emit_insn_before): Likewise.
1351         (emit_jump_insn_before): Likewise.
1352         * final.c (get_insn_template): Likewise for param "insn", removing
1353         a cast.
1354         * output.h (get_insn_template): Likewise for 2nd param.
1355         * rtl.h (emit_insn_before): Likewise.
1356         (emit_jump_insn_before): Likewise.
1357         (emit_debug_insn_before_noloc): Likewise.
1358         (emit_insn_after): Likewise.
1359         (emit_jump_insn_after): Likewise.
1360         (emit_call_insn_after): Likewise.
1361         (emit_debug_insn_after): Likewise.
1362         (set_insn_deleted): Likewise for param.
1364 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
1366         PR target/85358
1367         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1368         floating point modes, so that IFmode is numerically greater than
1369         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1370         to declare the ordering.  This prevents IFmode from being
1371         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1372         machine.  Include rs6000-modes.h to share the fractional values
1373         between genmodes* and the rest of the compiler.
1374         (IFmode): Likewise.
1375         (KFmode): Likewise.
1376         (TFmode): Likewise.
1377         * config/rs6000/rs6000-modes.h: New file.
1378         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1379         meaning of rs6000_long_double_size so that 126..128 selects an
1380         appropriate 128-bit floating point type.
1381         (rs6000_option_override_internal): Likewise.
1382         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1383         (TARGET_LONG_DOUBLE_128): Change the meaning of
1384         rs6000_long_double_size so that 126..128 selects an appropriate
1385         128-bit floating point type.
1386         (LONG_DOUBLE_TYPE_SIZE): Update comment.
1387         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1388         source and destination to match the standard usage.
1389         (truncifkf2): Likewise.
1390         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1391         ISA 2.07 to use an explicit clobber, instead of passing in a
1392         temporary.
1393         (copysign<mode>3_soft): Likewise.
1395 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1397         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1398         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1399         (vect_slp_analyze_instance_dependence): Likewise.
1400         (vect_enhance_data_refs_alignment): Likewise.
1401         (vect_analyze_data_refs_alignment): Likewise.
1402         (vect_slp_analyze_and_verify_instance_alignment
1403         (vect_analyze_data_ref_accesses): Likewise.
1404         (vect_prune_runtime_alias_test_list): Likewise.
1405         (vect_analyze_data_refs): Likewise.
1406         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1407         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1408         (vect_analyze_scalar_cycles_1): Likewise.
1409         (vect_get_loop_niters): Likewise.
1410         (vect_analyze_loop_form_1): Likewise.
1411         (vect_update_vf_for_slp): Likewise.
1412         (vect_analyze_loop_operations): Likewise.
1413         (vect_analyze_loop): Likewise.
1414         (vectorizable_induction): Likewise.
1415         (vect_transform_loop): Likewise.
1416         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1417         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1418         (vect_make_slp_decision): Likewise.
1419         (vect_detect_hybrid_slp): Likewise.
1420         (vect_slp_analyze_operations): Likewise.
1421         (vect_slp_bb): Likewise.
1422         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1423         (vectorizable_bswap): Likewise.
1424         (vectorizable_call): Likewise.
1425         (vectorizable_simd_clone_call): Likewise.
1426         (vectorizable_conversion): Likewise.
1427         (vectorizable_assignment): Likewise.
1428         (vectorizable_shift): Likewise.
1429         (vectorizable_operation): Likewise.
1430         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1432 2018-06-18  Martin Sebor  <msebor@redhat.com>
1434         PR tree-optimization/81384
1435         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1436         * builtins.c (expand_builtin_strnlen): New function.
1437         (expand_builtin): Call it.
1438         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1439         * builtins.def (BUILT_IN_STRNLEN): New.
1440         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1441         Warn for bounds in excess of maximum object size.
1442         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1443         single-value ranges.  Handle strnlen.
1444         (handle_builtin_strlen): Handle strnlen.
1445         (strlen_check_and_optimize_stmt): Same.
1446         * doc/extend.texi (Other Builtins): Document strnlen.
1448 2018-06-18  Maya Rashish  <coypu@sdf.org>
1450         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1451         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1452         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1454         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1455         here to ...
1456         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1458 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1460         * tree.c (escaped_string::escape): Replace cast to char * by
1461         const_cast<char *> (unescaped).
1463 2018-06-18  Nick Clifton  <nickc@redhat.com>
1465         PR 84195
1466         * tree.c (escaped_string): New class.  Converts an unescaped
1467         string into its escaped equivalent.
1468         (warn_deprecated_use): Use the new class to convert the
1469         deprecation message, if present.
1470         (test_escaped_strings): New self test.
1471         (test_c_tests): Add test_escaped_strings.
1472         * doc/extend.texi (deprecated): Add a note that the
1473         deprecation message is affected by the -fmessage-length
1474         option, and that control characters will be escaped.
1475         (#pragma GCC error): Document this pragma.
1476         (#pragma GCC warning): Likewise.
1477         * doc/invoke.texi (-fmessage-length): Document this option's
1478         effect on the #warning and #error preprocessor directives and
1479         the deprecated attribute.
1481 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
1483         * tree.c (decl_value_expr_lookup): Revert latest change.
1484         (decl_value_expr_insert): Likewise.
1486 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
1488         * gimplify.c (nonlocal_vlas): Delete.
1489         (nonlocal_vla_vars): Likewise.
1490         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1491         referenced VLAs.
1492         (gimplify_body): Do not create and destroy nonlocal_vlas.
1493         * tree-nested.c: Include diagnostic.h.
1494         (use_pointer_in_frame): Tweak.
1495         (lookup_field_for_decl): Add assertion and declare the transformation.
1496         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1497         internal error when the reference is in a wrong context.  Do not
1498         create a debug decl by default.
1499         (note_nonlocal_block_vlas): Delete.
1500         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1501         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
1502         create a debug decl by default.
1503         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1504         call is in a wrong context.
1505         (fixup_vla_decls): New function.
1506         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
1507         debug variables were created.
1508         * tree.c (decl_value_expr_lookup): Add checking assertion.
1509         (decl_value_expr_insert): Likewise.
1511 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1513         PR middle-end/82479
1514         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1515         * tree-scalar-evolution.c (interpret_expr): Likewise.
1516         (expression_expensive_p): Likewise.
1517         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1518         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1519         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1520         (ssa_defined_by_minus_one_stmt_p): New.
1522 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1524         PR middle-end/64946
1525         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1526         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1527         * dojump.c (do_jump): Likewise.
1528         * expr.c (expand_expr_real_2): Check operand type's sign.
1529         * fold-const.c (const_unop): Handle ABSU_EXPR.
1530         (fold_abs_const): Likewise.
1531         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1532         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1533         (strip_sign_op_1): Likesise.
1534         * match.pd: Add new pattern to generate ABSU_EXPR.
1535         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1536         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1537         * tree-eh.c (operation_could_trap_helper_p): Likewise.
1538         * tree-inline.c (estimate_operator_cost): Likewise.
1539         * tree-pretty-print.c (dump_generic_node): Likewise.
1540         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1541         * tree.def (ABSU_EXPR): New.
1543 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
1545         PR middle-end/86095
1546         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1547         documented as preserved for backward compatibility only.
1548         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1550         PR rtl-optimization/86108
1551         * bb-reorder.c (create_forwarder_block): Renamed to ...
1552         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
1553         jump from new landing pad to the second part.
1554         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1555         Adjust callers.
1557 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
1559         PR middle-end/85878
1560         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1561         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1562         Only call store_expr for halves if the mode is the same.
1564         PR middle-end/86123
1565         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1566         Fix up comment formatting.
1568 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1570         * typed-splay-tree.h (typed_splay_tree::remove): New function.
1571         (typed_splay_tree::closure,
1572         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1573         (typed_splay_tree::typed_splay_tree,
1574         typed_splay_tree::operator =): Declared private.
1575         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1576         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1577         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1578         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1579         typed_splay_tree::splay_tree_splay,
1580         typed_splay_tree::splay_tree_foreach_helper,
1581         typed_splay_tree::splay_tree_insert,
1582         typed_splay_tree::splay_tree_remove,
1583         typed_splay_tree::splay_tree_lookup,
1584         typed_splay_tree::splay_tree_predecessor,
1585         typed_splay_tree::splay_tree_successor,
1586         typed_splay_tree::splay_tree_min,
1587         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1588         (typed_splay_tree::root, typed_splay_tree::comp,
1589         typed_splay_tree::delete_key,
1590         typed_splay_tree::delete_value): New data members.
1591         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1592         typed_splay_tree::remove.
1594 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
1596         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1597         -mginv and -mno-ginv to the assembler.
1598         * config/mips/mips.opt (-mcrc): New option.
1599         (-mginv): Likewise.
1600         * doc/invoke.text (-mcrc): Document.
1601         (-mginv): Likewise.
1603 2018-06-15  Nick Clifton  <nickc@redhat.com>
1605         PR 84195
1606         * tree.c (escaped_string): New class.  Converts an unescaped
1607         string into its escaped equivalent.
1608         (warn_deprecated_use): Use the new class to convert the
1609         deprecation message, if present.
1610         (test_escaped_strings): New self test.
1611         (test_c_tests): Add test_escaped_strings.
1612         * doc/extend.texi (deprecated): Add a note that the
1613         deprecation message is affected by the -fmessage-length
1614         option, and that control characters will be escaped.
1615         (#pragma GCC error): Document this pragma.
1616         (#pragma GCC warning): Likewise.
1617         * doc/invoke.texi (-fmessage-length): Document this option's
1618         effect on the #warning and #error preprocessor directives and
1619         the deprecated attribute.
1621 2018-06-15  Richard Biener  <rguenther@suse.de>
1623         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1624         here, also noting vector size used.
1625         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1626         size used in MSG_OPTIMIZED_LOCATIONS dump.
1627         (pass_slp_vectorize::execute): Adjust.
1629 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1631         PR target/85968
1632         * config/arc/arc.c (arc_return_address_register): Fix
1633         if-condition.
1635 2018-06-15  Richard Biener  <rguenther@suse.de>
1637         PR middle-end/86159
1638         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1639         leave useless conversion stripping to force_gimple_operand_gsi.
1640         (gimplify_build2): Likewise.
1641         (gimplify_build1): Likewise.
1643 2018-06-15  Richard Biener  <rguenther@suse.de>
1645         PR middle-end/86076
1646         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1647         before adjusting their block.
1649 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1651         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1652         multilibs for *-*-rtems*.
1653         * config/riscv/t-rtems: New file.
1655 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1657         PR middle-end/86122
1658         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1659         unsigned_type_for returns NULL.
1661         PR target/85945
1662         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1663         subregs of multi-word pseudos unless the float mode has word size.
1665 2018-06-14  Richard Biener  <rguenther@suse.de>
1667         PR middle-end/86139
1668         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1669         duplicate and harmful type_hash_canon.
1670         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1672 2018-06-14  Richard Biener  <rguenther@suse.de>
1674         PR ipa/86124
1675         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1676         NULL cgraph_node.
1678 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1680         * config/rtems.h (STDINT_LONG32): Define.
1682 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1683             Prachi Godbole  <prachi.godbole@imgtec.com>
1685         * config/mips/mips-cpus.def: Define P6600.
1686         * config/mips/mips-tables.opt: Regenerate.
1687         * config/mips/mips.c (mips_ucbranch_type): New enum.
1688         (mips_rtx_cost_data): Add support for P6600.
1689         (mips_issue_rate): Likewise.
1690         (mips_multipass_dfa_lookahead): Likewise.
1691         (mips_avoid_hazard): Likewise.
1692         (mips_reorg_process_insns): Likewise.
1693         (mips_classify_branch_p6600): New function.
1694         * config/mips/mips.h (TUNE_P6600): New define.
1695         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1696         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1697         * config/mips/mips.md: Include p6600.md.
1698         (processor): Add p6600.
1699         * config/mips/p6600.md: New file.
1700         * doc/invoke.texi: Add p6600 to supported architectures.
1702 2018-06-13  Martin Sebor  <msebor@redhat.com>
1704         PR tree-optimization/86114
1705         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1706         of integer types.
1707         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1709 2018-06-13  Richard Biener  <rguenther@suse.de>
1711         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1712         Properly set vector type of the intermediate stmt.
1713         * tree-vect-stmts.c (vectorizable_operation): The destination
1714         var always has vectype_out type.
1716 2018-06-13  Jeff Law  <law@redhat.com>
1718         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1719         integer 0 for argument to print_rtl_with_bb.
1720         (rl78_reorg): Likewise.
1722 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1724         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1725         from rtx to rtx_insn *.
1726         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1727         "label".
1728         (add_sched_insns_for_speculation): Likewise for local "target",
1729         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1730         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1731         from rtx_insn ** to rtx_code_label **.
1732         (reorg_emit_nops): Likewise.
1733         (c6x_reorg): Likewise for local "call_labels".
1734         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1735         rtx to rtx_insn *.
1736         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1737         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1738         the loops over LABEL_REFS.
1739         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1740         braf_label.
1741         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1742         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1743         (split_branches): Strengthen local "olabel" from rtx to
1744         rtx_insn *, adding a safe_as_a cast.
1745         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1746         to "rtx_insn *".
1747         (add_insn_after): Likewise for first two params.
1748         (add_insn_before): Likewise.
1749         (remove_insn): Likewise for param.
1750         (emit_pattern_before_noloc): Likewise for second and third params.
1751         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1752         (emit_call_insn_before_noloc): Likewise.
1753         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1754         to "rtx_insn *".
1755         (emit_barrier_before): Likewise.
1756         (emit_label_before): Strengthen "label" param from "rtx" to
1757         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1758         "rtx_insn *".
1759         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1760         "rtx_insn *".
1761         (emit_pattern_after_noloc): Likewise.
1762         (emit_insn_after_noloc): Likewise.
1763         (emit_jump_insn_after_noloc): Likewise.
1764         (emit_call_insn_after_noloc): Likewise.
1765         (emit_debug_insn_after_noloc): Likewise.
1766         (emit_barrier_after): Likewise.
1767         (emit_label_after): Likewise for both params.
1768         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1769         "loc" param from "int" to "location_t".
1770         (emit_insn_after_setloc): Likewise.
1771         (emit_jump_insn_after_setloc): Likewise.
1772         (emit_call_insn_after_setloc): Likewise.
1773         (emit_debug_insn_after_setloc): Likewise.
1774         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1775         "loc" param from "int" to "location_t".
1776         (emit_pattern_before): Convert NULL_RTX to NULL.
1777         (emit_insn_before_setloc): Convert "loc" param from "int" to
1778         "location_t".
1779         (emit_jump_insn_before_setloc): Likewise.
1780         (emit_call_insn_before_setloc): Likewise.
1781         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1782         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1783         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1784         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1785         Convert 3rd param from "int" to "location_t".
1786         (emit_barrier_before, emit_barrier_after, next_real_insn):
1787         Strengthen param from rtx to rtx_insn *.
1788         (emit_label_before): Strengthen 1st param from "rtx" to
1789         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1790         "rtx_insn *".
1791         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1792         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1793         Strengthen 2nd param from "rtx" to "rtx_insn *".
1794         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1795         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1796         Likewise. Convert 3rd param from "int" to "location_t".
1797         (emit_label_after): Strengthen 1st param from "rtx" to
1798         "rtx_code_label *".
1799         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1800         "rtx_insn *".
1801         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1802         from "rtx" to "rtx_insn *".
1804 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1806         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1807         bodies streamed in with -Q.
1808         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1809         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1810         * gimple-streamer-out.c: Include gimple-pretty-print.h
1811         (output_bb): Dump stmts streamed.
1812         * lto-section-out.c: Include print-tree.h
1813         (lto_begin_section): Dump sections created.
1814         (lto_output_decl_index): Dump decl encoded.
1815         * lto-streamer-out.c: Include print-tree.h
1816         (create_output_block): Dump output block created.
1817         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1818         (output_function): Dump function output.
1819         (output_constructor): Dump constructor streamed.
1820         (write_global_stream): Output indexes encoded.
1821         (produce_asm_for_decls): Dump streams encoded.
1822         * lto-streamer.c (streamer_dump_file): New global var.
1823         * lto-streamer.h (streamer_dump_file): Declare.
1824         * passes.c (ipa_write_summaries): Initialize streamer dump.
1825         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1826         in.
1828 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1830         PR target/86048
1831         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1832         offsets for register save directives.  Emit a second batch of save
1833         directives, if need be, when the function accesses prior frames.
1835 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1837         * config/arc/fpu.md (fmasf4): Force operand to register.
1838         (fnmasf4): Likewise.
1840 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1842         * config/arc/arc-protos.h (arc_pad_return): Remove.
1843         * config/arc/arc.c (machine_function): Remove force_short_suffix
1844         and size_reason.
1845         (arc_print_operand): Adjust printing of '&'.
1846         (arc_verify_short): Remove conditional printing of short suffix.
1847         (arc_final_prescan_insn): Remove reference to size_reason.
1848         (pad_return): New function.
1849         (arc_reorg): Call pad_return.
1850         (arc_pad_return): Remove.
1851         (arc_init_machine_status): Remove reference to force_short_suffix.
1852         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1853         (attr length): When attribute iscompact is true force to 2
1854         regardless; in the case of maybe check if we want to force the
1855         instruction to have 4 bytes length.
1856         (nopv): Change it to generate 4 byte long nop as well.
1857         (blockage): New pattern.
1858         (simple_return): Remove call to arc_pad_return.
1859         (p_return_i): Likewise.
1861 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1863         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1865 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1867         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1868         ARC cores.
1870 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1872         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1873         for ARC700 and ARCv2.
1875 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1877         PR target/86076
1878         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1879         operands[2] instead of operands[1].
1882 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1884         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1885         case, check whether the outer register overlaps an unallocatable
1886         register, not just whether it fits the required class.
1888 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1890         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1891         are poly_ints.
1892         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1893         (memrefs_conflict_p): Likewise.
1894         (init_alias_analysis): Likewise.
1895         * cfgexpand.c (expand_debug_expr): Likewise.
1896         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1897         * cse.c (fold_rtx): Likewise.
1898         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1899         * expr.c (emit_block_move_hints): Likewise.
1900         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1901         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1902         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1903         (emit_group_store): Likewise.
1904         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1905         to read the PRE/POST_MODIFY increment.
1906         * calls.c (store_one_arg): Use strip_offset.
1907         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1908         poly_int_rtx_p.
1909         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1910         by a VEC_SELECT.
1911         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1912         (simplify_binary_operation_1): Extend CONST_INT handling to
1913         poly_int_rtx_p.
1914         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1915         than a HOST_WIDE_INT.
1916         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1917         poly_int64.
1918         (adjust_mems, add_stores): Update accodingly.
1919         (vt_canonicalize_addr): Track polynomial offsets.
1920         (emit_note_insn_var_location): Likewise.
1921         (vt_add_function_parameter): Likewise.
1922         (vt_initialize): Likewise.
1924 2018-06-12  Jeff Law  <law@redhat.com>
1926         * config.gcc (alpha*-*-freebsd*): Remove.
1927         * config/alpha/freebsd.h: Remove.
1929 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1931         PR other/69968
1932         * spellcheck-tree.c (levenshtein_distance): Rename to...
1933         (get_edit_distance): ...this, and update for underlying renaming.
1934         * spellcheck-tree.h (levenshtein_distance): Rename to...
1935         (get_edit_distance): ...this.
1936         * spellcheck.c (levenshtein_distance): Rename to...
1937         (get_edit_distance): ...this.  Convert from Levenshtein distance
1938         to Damerau-Levenshtein distance by supporting transpositions of
1939         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1940         "v_one_ago".
1941         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1942         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1943         update for underlying renaming.
1944         (selftest::levenshtein_distance_unit_test): Rename to...
1945         (selftest::test_get_edit_distance_unit): ...this, and update for
1946         underlying renaming.
1947         (selftest::test_find_closest_string): Add example from PR 69968
1948         where transposition helps
1949         (selftest::test_metric_conditions): Update for renaming.
1950         (selftest::test_metric_conditions): Likewise.
1951         (selftest::spellcheck_c_tests): Likewise.
1952         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1953         (get_edit_distance): ...this.
1954         (best_match::consider): Update for renaming.
1956 2018-06-12  Martin Sebor  <msebor@redhat.com>
1958         PR tree-optimization/85259
1959         * builtins.c (compute_objsize): Handle constant offsets.
1960         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1961         true iff a warning has been issued.
1962         * gimple.h (gimple_nonartificial_location): New function.
1963         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1964         gimple_nonartificial_location and handle -Wno-system-headers.
1965         (handle_builtin_stxncpy): Same.
1967 2018-06-12  Martin Sebor  <msebor@redhat.com>
1969         PR c/85931
1970         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1972 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1974         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1975         BUILTIN_VEC_XST entries for pointer to double and long long.
1977 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1979         PR target/85990
1980         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1981         Update comments.
1982         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1983         Likewise.
1985 2018-06-12  Martin Liska  <mliska@suse.cz>
1987         * doc/options.texi: Document IntegerRange.
1989 2018-06-12  Martin Liska  <mliska@suse.cz>
1991         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1992         * opt-functions.awk: Handle Deprecated flag.
1993         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1994         and report error.
1995         (read_cmdline_option): Report warning for a deprecated option.
1996         * opts.h (struct cl_option): Add new field cl_deprecated.
1997         (CL_ERR_DEPRECATED): New.
1999 2018-06-12  Martin Liska  <mliska@suse.cz>
2001         * doc/options.texi: Document Deprecated option flag.
2003 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2005         * config/arc/arc-arch.h (arc_extras): New enum.
2006         (arc_cpu_t):Add field extra.
2007         (arc_cpu_types): Consider the extras.
2008         * config/arc/arc-cpus.def: Add extras info.
2009         * config/arc/arc-opts.h (processor_type): Consider extra field.
2010         * config/arc/arc.c (arc_override_options): Handle extra field.
2012 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2014         * config/arc/arc-arch.h: Update ARC_OPTX macro.
2015         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
2016         field.
2017         * config/arc/arc.c (arc_init): Update pic warning.
2018         (irq_range): Update irq range parsing warnings.
2019         (arc_override_options): Update various warning messages.
2020         (arc_handle_aux_attribute): Likewise.
2022 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
2024         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2026 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2028         * doc/sourcebuild.texi: Document usage of line number 0 in verify
2029         compiler messages directives.
2031 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
2033         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
2034         * config/mips/mips-tables.opt: Regenerate.
2035         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
2036         mips64r6.
2037         * doc/invoke.texi: Document -march=i6500.
2039 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
2041         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
2042         (i6400_gpmul): Add cpu_unit.
2043         (i6400_gpdiv): Likewise.
2044         (i6400_msa_add_d): Update reservations.
2045         (i6400_msa_int_add) Likewise.
2046         (i6400_msa_short_logic3) Likewise.
2047         (i6400_msa_short_logic2) Likewise.
2048         (i6400_msa_short_logic) Likewise.
2049         (i6400_msa_move) Likewise.
2050         (i6400_msa_cmp) Likewise.
2051         (i6400_msa_short_float2) Likewise.
2052         (i6400_msa_div_d) Likewise.
2053         (i6400_msa_long_logic1) Likewise.
2054         (i6400_msa_long_logic2) Likewise.
2055         (i6400_msa_mult) Likewise.
2056         (i6400_msa_long_float2) Likewise.
2057         (i6400_msa_long_float4) Likewise.
2058         (i6400_msa_long_float5) Likewise.
2059         (i6400_msa_long_float8) Likewise.
2060         (i6400_fpu_fadd): Include frint type.
2061         (i6400_fpu_store): New define_insn_reservation.
2062         (i6400_fpu_load): Likewise.
2063         (i6400_fpu_move): Likewise.
2064         (i6400_fpu_fcmp): Likewise.
2065         (i6400_fpu_fmadd): Likewise.
2066         (i6400_int_mult): Include imul3nc type and update reservation.
2067         (i6400_int_div): Include idiv3 type and update reservation.
2068         (i6400_int_load): Update to check type not move_type.
2069         (i6400_int_store): Likewise.
2070         (i6400_int_prefetch): Set zero latency.
2072 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
2074         * gcc.c: Document new %@{...} sequence.
2075         (LINK_COMMAND_SPEC): Use it for the -L switches.
2076         (cpp_unique_options): Use it for the -I switches.
2077         (at_file_argbuf): New global variable.
2078         (in_at_file): Likewise.
2079         (alloc_args): Create at_file_argbuf.
2080         (clear_args): Truncate at_file_argbuf.
2081         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
2082         (open_at_file): New function.
2083         (close_at_file): Likewise.
2084         (create_at_file): Delete.
2085         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
2086         <'o'>: Likewise.
2087         <'@'>: New case.
2088         (validate_switches_from_spec): Deal with %@{...} sequence.
2089         (validate_switches): Likewise.
2090         (driver::finalize): Call clear_args.
2092 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
2094         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2096 2018-06-11  Martin Sebor  <msebor@redhat.com>
2098         * doc/invoke.texi (-Wall): List -Wc++17-compat.
2099         (Wno-class-memaccess): Add @opindex.
2100         (Wno-templates, Wno-multiple-inheritance): Same.
2101         (Wno-virtual-inheritance, Wno-namespaces): Same.
2102         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2103         (Wno-format-overflow, Wno-format-truncation): Same.
2104         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2105         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2106         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2107         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2108         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2109         (Wno-misspelled-isr): Same.
2111 2018-06-11  Martin Sebor  <msebor@redhat.com>
2113         * PR tree-optimization/86083
2114         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2116 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2118         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2120 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
2122         PR target/85755
2123         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2124         on the correct operand.
2125         (*movdi_internal64): Ditto.
2127 2018-06-11  Martin Liska  <mliska@suse.cz>
2129         PR tree-optimization/86089
2130         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2132 2018-06-11  Julia Koval  <julia.koval@intel.com>
2134         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2135         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2136         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2138 2018-06-11  Olivier Hainque  <hainque@adacore.com>
2140         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2141         for Ada with strict dwarf2.
2143 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
2145         PR target/85755
2146         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2147         addresses.
2149 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
2151         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2153 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
2155         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2156         TARGET_ELF.
2158 2018-06-08  Martin Liska  <mliska@suse.cz>
2160         * tree-cfg.h (debug_function): Fix argument type to match
2161         implementation.
2163 2018-06-08  Martin Liska  <mliska@suse.cz>
2165         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2166         Remove usage of MPX-related (and removed) fields.
2167         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2169 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
2171         * cfg.c (debug): Use TDF_NONE rather than 0.
2172         * cfghooks.c (debug): Likewise.
2173         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2174         (struct dump_option_value_info): Convert to...
2175         (struct kv_pair): ...this template type.
2176         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2177         rather than 0.
2178         (optinfo_verbosity_options): Likewise.
2179         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2180         OPTGROUP_NONE.
2181         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2182         than int for "optgroup_flags" param.
2183         (dump_generic_expr_loc): Use dump_flags_t rather than int for
2184         "dump_kind" param.
2185         (dump_dec): Likewise.
2186         (dump_finish): Use TDF_NONE rather than 0.
2187         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2188         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
2189         than 0.  Update for change to option_ptr.
2190         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2191         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
2192         0.  Update for changes to optinfo_verbosity_options and
2193         optgroup_options.
2194         (opt_info_switch_p): Convert optgroup_flags from int to
2195         optgroup_flags_t.
2196         (dump_basic_block): Use dump_flags_t rather than int
2197         for "dump_kind" param.
2198         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2199         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2200         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2201         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2202         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2203         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2204         TDF_NONE): Convert from macros to...
2205         (enum dump_flag): ...this new enum.
2206         (dump_flags_t): Update to use enum.
2207         (operator|, operator&, operator~, operator|=, operator&=):
2208         Implement for dump_flags_t.
2209         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2210         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2211         Convert from macros to...
2212         (enum optgroup_flag): ...this new enum.
2213         (optgroup_flags_t): New typedef.
2214         (operator|, operator|=): Implement for optgroup_flags_t.
2215         (struct dump_file_info): Convert field "alt_flags" to
2216         dump_flags_t.  Convert field "optgroup_flags" to
2217         optgroup_flags_t.
2218         (dump_basic_block): Use dump_flags_t rather than int for param.
2219         (dump_generic_expr_loc): Likewise.
2220         (dump_dec): Likewise.
2221         (dump_register): Convert param "optgroup_flags" to
2222         optgroup_flags_t.
2223         (opt_info_enable_passes): Likewise.
2224         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2225         than 0.
2226         * gimple-pretty-print.c (debug): Likewise.
2227         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2228         (merged_store_group::apply_stores): Likewise.
2229         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2230         * gimple.c (verify_gimple_pp): Likewise.
2231         * graphite-poly.c (print_pbb_body): Likewise.
2232         * passes.c (pass_manager::register_one_dump_file): Convert
2233         local "optgroup_flags" to optgroup_flags_t.
2234         * print-tree.c (print_node): Use TDF_NONE rather than 0.
2235         (debug): Likewise.
2236         (debug_body): Likewise.
2237         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2238         to optgroup_flags_t.
2239         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2240         than 0.
2241         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2242         (convert_mult_to_fma): Likewise.
2243         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2244         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2245         * tree-vect-data-refs.c (dump_lower_bound): Convert param
2246         "dump_kind" to dump_flags_t.
2248 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2250         * config/rs6000/rs6000.c (min, max): Delete.
2252 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2254         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2255         -mabi=spe and -mabi=no-spe.
2257 2018-06-08  Martin Liska  <mliska@suse.cz>
2259         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2260         where we expect an existing summary.
2262 2018-06-08  Martin Liska  <mliska@suse.cz>
2264         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2265         * ipa-inline.h (estimate_edge_growth): Likewise.
2267 2018-06-08  Martin Liska  <mliska@suse.cz>
2269         * cgraph.c (function_version_hasher::hash): Use
2270         cgraph_node::get_uid ().
2271         (function_version_hasher::equal):
2272         * cgraph.h (cgraph_node::get_uid): New method.
2273         * ipa-inline.c (update_caller_keys): Use
2274         cgraph_node::get_uid ().
2275         (update_callee_keys): Likewise.
2276         * ipa-utils.c (searchc): Likewise.
2277         (ipa_reduced_postorder): Likewise.
2278         * lto-cgraph.c (input_node): Likewise.
2279         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2280         * symbol-summary.h (symtab_insertion): Likewise.
2281         (symtab_removal): Likewise.
2282         (symtab_duplication): Likewise.
2283         * tree-pretty-print.c (dump_function_header): Likewise.
2284         * tree-sra.c (convert_callers_for_node): Likewise.
2286 2018-06-08  Martin Liska  <mliska@suse.cz>
2288         * cgraph.c (symbol_table::create_edge): Always assign a new
2289         unique number.
2290         (symbol_table::free_edge): Do not recycle numbers.
2291         * cgraph.h (cgraph_edge::get): New method.
2292         * symbol-summary.h (symtab_removal): Use it.
2293         (symtab_duplication): Likewise.
2294         (call_summary::hashable_uid): Remove.
2296 2018-06-08  Martin Liska  <mliska@suse.cz>
2298         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2299         (initialize_growth_caches): Remove.
2300         (free_growth_caches): Likewise.
2301         (do_estimate_edge_time): Use edge_growth_cache.
2302         (do_estimate_edge_size): Likewise.
2303         (do_estimate_edge_hints): Likewise.
2304         * ipa-inline.c (reset_edge_caches): Likewise.
2305         (recursive_inlining): Likewise.
2306         (inline_small_functions): Likewise.
2307         * ipa-inline.h (initialize_growth_caches): Remove.
2308         (estimate_edge_size): Likewise.
2309         (estimate_edge_time): Likewise.
2310         (estimate_edge_hints): Likewise.
2311         (reset_edge_growth_cache): Likewise.
2312         * symbol-summary.h (call_summary::remove): New method.
2314 2018-06-08  Martin Liska  <mliska@suse.cz>
2316         * ipa-cp.c (class edge_clone_summary): New summary.
2317         (grow_edge_clone_vectors): Remove.
2318         (ipcp_edge_duplication_hook): Remove.
2319         (class edge_clone_summary_t): New call_summary class.
2320         (ipcp_edge_removal_hook): Remove.
2321         (edge_clone_summary_t::duplicate): New function.
2322         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2323         (create_specialized_node): Likewise.
2324         (ipcp_driver): Initialize edge_clone_summaries and do not
2325         register hooks.
2327 2018-06-08  Martin Liska  <mliska@suse.cz>
2329         * symbol-summary.h (get): New function.
2330         (call_summary::m_initialize_when_cloning): New class member.
2332 2018-06-08  Martin Liska  <mliska@suse.cz>
2334         * cgraph.c (cgraph_node::remove): Do not recycle uid.
2335         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2336         (symbol_table::allocate_cgraph_symbol): Do not set uid.
2337         * passes.c (uid_hash_t): Record removed_nodes by their uids.
2338         (remove_cgraph_node_from_order): Use the removed_nodes set.
2339         (do_per_function_toporder): Likwise.
2340         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2341         instead of summary_uid.
2342         (symtab_removal): Likewise.
2343         (symtab_duplication): Likewise.
2345 2018-06-08  Martin Liska  <mliska@suse.cz>
2347         * ipa-cp.c (ipcp_store_bits_results): Use
2348         ipcp_transformation_sum.
2349         (ipcp_store_vr_results): Likewise.
2350         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2351         to ...
2352         (ipcp_transformation_initialize): ... this.
2353         (ipa_set_node_agg_value_chain):
2354         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2355         (write_ipcp_transformation_info): Likewise.
2356         (read_ipcp_transformation_info): Likewise.
2357         (ipcp_update_bits): Likewise.
2358         (ipcp_update_vr): Likewise.
2359         (ipcp_transform_function): Likewise.
2360         * ipa-prop.h: Rename ipcp_transformation_summary to
2361         ipcp_transformation.
2362         (class ipcp_transformation_t): New function summary.
2363         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2364         (ipa_get_agg_replacements_for_node): Likewise.
2366 2018-06-08  Martin Liska  <mliska@suse.cz>
2368         * ipa-pure-const.c (struct funct_state_d): Do it class instead
2369         of struct.
2370         (class funct_state_summary_t): New function_summary class.
2371         (has_function_state): Remove.
2372         (get_function_state): Likewise.
2373         (set_function_state): Likewise.
2374         (add_new_function): Likewise.
2375         (funct_state_summary_t::insert): New function.
2376         (duplicate_node_data): Remove.
2377         (remove_node_data): Remove.
2378         (funct_state_summary_t::duplicate): New function.
2379         (register_hooks): Create new funct_state_summaries.
2380         (pure_const_generate_summary): Use it.
2381         (pure_const_write_summary): Likewise.
2382         (pure_const_read_summary): Likewise.
2383         (propagate_pure_const): Likewise.
2384         (propagate_nothrow): Likewise.
2385         (dump_malloc_lattice): Likewise.
2386         (propagate_malloc): Likewise.
2387         (execute): Do not register hooks, just remove summary
2388         instead.
2389         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2390         constructor.
2392 2018-06-08  Martin Liska  <mliska@suse.cz>
2394         * ipa-reference.c (remove_node_data): Remove.
2395         (duplicate_node_data): Likewise.
2396         (class ipa_ref_var_info_summary_t): New class.
2397         (class ipa_ref_opt_summary_t): Likewise.
2398         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2399         (get_reference_optimization_summary): Use
2400         ipa_ref_opt_sum_summaries.
2401         (set_reference_vars_info): Remove.
2402         (set_reference_optimization_summary): Likewise.
2403         (ipa_init): Create summaries.
2404         (init_function_info): Use function summary.
2405         (ipa_ref_opt_summary_t::duplicate): New function.
2406         (ipa_ref_opt_summary_t::remove): New function.
2407         (get_read_write_all_from_node): Fix GNU coding style.
2408         (propagate): Use function summary.
2409         (write_node_summary_p): Fix GNU coding style.
2410         (stream_out_bitmap): Likewise.
2411         (ipa_reference_read_optimization_summary): Use function summary.
2412         (ipa_reference_c_finalize): Do not release hooks.
2414 2018-06-08  Martin Liska  <mliska@suse.cz>
2416         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2417         (analyze_function_body): Extract multiple calls of get_create.
2418         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2419         * ipa-inline.c (recursive_inlining): Use ::get method.
2420         * ipa-inline.h (estimate_edge_growth): Likewise.
2422 2018-06-08  Martin Liska  <mliska@suse.cz>
2424         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2425         HSA_INVALID.
2426         (hsa_function_summary::hsa_function_summary): Use the new enum
2427         value.
2428         (hsa_gpu_implementation_p): Use hsa_summaries::get.
2429         * hsa-gen.c (hsa_get_host_function): Likewise.
2430         (get_brig_function_name): Likewise.
2431         * ipa-hsa.c (process_hsa_functions): Likewise.
2432         (ipa_hsa_write_summary): Likewise.
2433         * symbol-summary.h (symtab_duplication): Use ::get function/
2434         (get): New function.
2436 2018-06-08  Martin Liska  <mliska@suse.cz>
2438         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2439         of get.
2440         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2441         (hsa_register_kernel): Likewise.
2442         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2443         * hsa-gen.c (hsa_get_host_function): Likewise.
2444         (get_brig_function_name): Likewise.
2445         (generate_hsa): Likewise.
2446         (pass_gen_hsail::execute): Likewise.
2447         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2448         (devirtualization_time_bonus): Likewise.
2449         (ipcp_propagate_stage): Likewise.
2450         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2451         (edge_set_predicate): Likewise.
2452         (evaluate_conditions_for_known_args): Likewise.
2453         (evaluate_properties_for_edge): Likewise.
2454         (ipa_fn_summary::reset): Likewise.
2455         (ipa_fn_summary_t::duplicate): Likewise.
2456         (dump_ipa_call_summary): Likewise.
2457         (ipa_dump_fn_summary): Likewise.
2458         (analyze_function_body): Likewise.
2459         (compute_fn_summary): Likewise.
2460         (estimate_edge_devirt_benefit): Likewise.
2461         (estimate_edge_size_and_time): Likewise.
2462         (estimate_calls_size_and_time): Likewise.
2463         (estimate_node_size_and_time): Likewise.
2464         (inline_update_callee_summaries): Likewise.
2465         (remap_edge_change_prob): Likewise.
2466         (remap_edge_summaries): Likewise.
2467         (ipa_merge_fn_summary_after_inlining): Likewise.
2468         (ipa_update_overall_fn_summary): Likewise.
2469         (read_ipa_call_summary): Likewise.
2470         (inline_read_section): Likewise.
2471         (write_ipa_call_summary): Likewise.
2472         (ipa_fn_summary_write): Likewise.
2473         (ipa_free_fn_summary): Likewise.
2474         * ipa-hsa.c (process_hsa_functions): Likewise.
2475         (ipa_hsa_write_summary): Likewise.
2476         (ipa_hsa_read_section): Likewise.
2477         * ipa-icf.c (sem_function::merge): Likewise.
2478         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2479         (do_estimate_edge_time): Likewise.
2480         (estimate_size_after_inlining): Likewise.
2481         (estimate_growth): Likewise.
2482         (growth_likely_positive): Likewise.
2483         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2484         (inline_call): Likewise.
2485         * ipa-inline.c (caller_growth_limits): Likewise.
2486         (can_inline_edge_p): Likewise.
2487         (can_inline_edge_by_limits_p): Likewise.
2488         (compute_uninlined_call_time): Likewise.
2489         (compute_inlined_call_time): Likewise.
2490         (want_inline_small_function_p): Likewise.
2491         (edge_badness): Likewise.
2492         (update_caller_keys): Likewise.
2493         (update_callee_keys): Likewise.
2494         (recursive_inlining): Likewise.
2495         (inline_small_functions): Likewise.
2496         (inline_to_all_callers_1): Likewise.
2497         (dump_overall_stats): Likewise.
2498         (early_inline_small_functions): Likewise.
2499         (early_inliner): Likewise.
2500         * ipa-inline.h (estimate_edge_growth): Likewise.
2501         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2502         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2503         * ipa-prop.h (IPA_NODE_REF): Likewise.
2504         (IPA_EDGE_REF): Likewise.
2505         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2506         (propagate_malloc): Likewise.
2507         * ipa-split.c (execute_split_functions): Likewise.
2508         * symbol-summary.h: Rename get to get_create.
2509         (get): Likewise.
2510         (get_create): Likewise.
2511         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2513 2018-06-08  Martin Liska  <mliska@suse.cz>
2515         * symbol-summary.h (release): Move definition out of class
2516         declaration.
2517         (symtab_removal): Likewise.
2518         (symtab_duplication): Likewise.
2520 2018-06-08  Martin Liska  <mliska@suse.cz>
2522         * symbol-summary.h (function_summary): Move constructor
2523         implementation out of class declaration.
2524         (release): Likewise.
2525         (symtab_insertion): Likewise.
2526         (symtab_removal): Likewise.
2527         (symtab_duplication): Likewise.
2528         (get): Likewise.
2530 2018-06-08  Martin Liska  <mliska@suse.cz>
2532         * Makefile.in: Remove support for MPX (macros, related functions,
2533         fields in cgraph_node, ...).
2534         * builtin-types.def (BT_BND): Likewise.
2535         (BT_FN_BND_CONST_PTR): Likewise.
2536         (BT_FN_CONST_PTR_BND): Likewise.
2537         (BT_FN_VOID_PTR_BND): Likewise.
2538         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2539         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2540         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2541         (expand_builtin_mempcpy_with_bounds): Likewise.
2542         (expand_builtin_memset_with_bounds): Likewise.
2543         (expand_builtin_memset_args): Likewise.
2544         (std_expand_builtin_va_start): Likewise.
2545         (expand_builtin): Likewise.
2546         (expand_builtin_with_bounds): Likewise.
2547         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2548         (DEF_LIB_BUILTIN_CHKP): Likewise.
2549         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2550         (DEF_CHKP_BUILTIN): Likewise.
2551         (BUILT_IN_MEMCPY): Likewise.
2552         (BUILT_IN_MEMMOVE): Likewise.
2553         (BUILT_IN_MEMPCPY): Likewise.
2554         (BUILT_IN_MEMSET): Likewise.
2555         (BUILT_IN_STPCPY): Likewise.
2556         (BUILT_IN_STRCAT): Likewise.
2557         (BUILT_IN_STRCHR): Likewise.
2558         (BUILT_IN_STRCPY): Likewise.
2559         (BUILT_IN_STRLEN): Likewise.
2560         (BUILT_IN_MEMCPY_CHK): Likewise.
2561         (BUILT_IN_MEMMOVE_CHK): Likewise.
2562         (BUILT_IN_MEMPCPY_CHK): Likewise.
2563         (BUILT_IN_MEMSET_CHK): Likewise.
2564         (BUILT_IN_STPCPY_CHK): Likewise.
2565         (BUILT_IN_STRCAT_CHK): Likewise.
2566         (BUILT_IN_STRCPY_CHK): Likewise.
2567         * calls.c (store_bounds): Likewise.
2568         (emit_call_1): Likewise.
2569         (special_function_p): Likewise.
2570         (maybe_warn_nonstring_arg): Likewise.
2571         (initialize_argument_information): Likewise.
2572         (finalize_must_preallocate): Likewise.
2573         (compute_argument_addresses): Likewise.
2574         (expand_call): Likewise.
2575         * cfgexpand.c (expand_call_stmt): Likewise.
2576         (expand_return): Likewise.
2577         (expand_gimple_stmt_1): Likewise.
2578         (pass_expand::execute): Likewise.
2579         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2580         (cgraph_node::remove): Likewise.
2581         (cgraph_node::dump): Likewise.
2582         (cgraph_node::verify_node): Likewise.
2583         * cgraph.h (chkp_function_instrumented_p): Likewise.
2584         (symtab_node::get_alias_target): Likewise.
2585         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2586         (cgraph_local_p): Likewise.
2587         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2588         (cgraph_edge::rebuild_references): Likewise.
2589         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2590         (walk_polymorphic_call_targets): Likewise.
2591         (cgraph_node::expand_thunk): Likewise.
2592         (symbol_table::output_weakrefs): Likewise.
2593         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2594         (ix86_handle_option): Likewise.
2595         * config/i386/constraints.md: Likewise.
2596         * config/i386/i386-builtin-types.def (BND): Likewise.
2597         (VOID): Likewise.
2598         (PVOID): Likewise.
2599         (ULONG): Likewise.
2600         * config/i386/i386-builtin.def (BDESC_END): Likewise.
2601         (BDESC_FIRST): Likewise.
2602         (BDESC): Likewise.
2603         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2604         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2605         * config/i386/i386.c (enum reg_class): Likewise.
2606         (ix86_target_string): Likewise.
2607         (ix86_option_override_internal): Likewise.
2608         (ix86_conditional_register_usage): Likewise.
2609         (ix86_valid_target_attribute_inner_p): Likewise.
2610         (ix86_set_indirect_branch_type): Likewise.
2611         (ix86_set_current_function): Likewise.
2612         (ix86_function_arg_regno_p): Likewise.
2613         (init_cumulative_args): Likewise.
2614         (ix86_function_arg_advance): Likewise.
2615         (ix86_function_arg): Likewise.
2616         (ix86_pass_by_reference): Likewise.
2617         (ix86_function_value_regno_p): Likewise.
2618         (ix86_function_value_1): Likewise.
2619         (ix86_function_value_bounds): Likewise.
2620         (ix86_return_in_memory): Likewise.
2621         (ix86_setup_incoming_vararg_bounds): Likewise.
2622         (ix86_va_start): Likewise.
2623         (indirect_thunk_need_prefix): Likewise.
2624         (print_reg): Likewise.
2625         (ix86_print_operand): Likewise.
2626         (ix86_expand_call): Likewise.
2627         (ix86_output_function_return): Likewise.
2628         (reg_encoded_number): Likewise.
2629         (BDESC_VERIFYS): Likewise.
2630         (ix86_init_mpx_builtins): Likewise.
2631         (ix86_init_builtins): Likewise.
2632         (ix86_emit_cmove): Likewise.
2633         (ix86_emit_move_max): Likewise.
2634         (ix86_expand_builtin): Likewise.
2635         (ix86_builtin_mpx_function): Likewise.
2636         (ix86_get_arg_address_for_bt): Likewise.
2637         (ix86_load_bounds): Likewise.
2638         (ix86_store_bounds): Likewise.
2639         (ix86_load_returned_bounds): Likewise.
2640         (ix86_store_returned_bounds): Likewise.
2641         (ix86_class_likely_spilled_p): Likewise.
2642         (ix86_hard_regno_mode_ok): Likewise.
2643         (x86_order_regs_for_local_alloc): Likewise.
2644         (ix86_mitigate_rop): Likewise.
2645         (ix86_bnd_prefixed_insn_p): Likewise.
2646         (ix86_mpx_bound_mode): Likewise.
2647         (ix86_make_bounds_constant): Likewise.
2648         (ix86_initialize_bounds): Likewise.
2649         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2650         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2651         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2652         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2653         (TARGET_CHKP_BOUND_MODE): Likewise.
2654         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2655         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2656         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2657         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2658         * config/i386/i386.h (TARGET_MPX): Likewise.
2659         (TARGET_MPX_P): Likewise.
2660         (VALID_BND_REG_MODE): Likewise.
2661         (FIRST_BND_REG): Likewise.
2662         (LAST_BND_REG): Likewise.
2663         (enum reg_class): Likewise.
2664         (BND_REG_P): Likewise.
2665         (BND_REGNO_P): Likewise.
2666         (BNDmode): Likewise.
2667         (ADJUST_INSN_LENGTH): Likewise.
2668         * config/i386/i386.md: Likewise.
2669         * config/i386/i386.opt: Likewise.
2670         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2671         (defined): Likewise.
2672         (LINK_MPX): Likewise.
2673         (MPX_SPEC): Likewise.
2674         (LIBMPX_SPEC): Likewise.
2675         (LIBMPXWRAPPERS_SPEC): Likewise.
2676         (CHKP_SPEC): Likewise.
2677         * config/i386/predicates.md: Likewise.
2678         * dbxout.c (dbxout_type): Likewise.
2679         * doc/extend.texi: Likewise.
2680         * doc/invoke.texi: Likewise.
2681         * doc/md.texi: Likewise.
2682         * doc/tm.texi: Likewise.
2683         * doc/tm.texi.in: Likewise.
2684         * dwarf2out.c (is_base_type): Likewise.
2685         (gen_formal_types_die): Likewise.
2686         (gen_subprogram_die): Likewise.
2687         (gen_type_die_with_usage): Likewise.
2688         (gen_decl_die): Likewise.
2689         (dwarf2out_late_global_decl): Likewise.
2690         * expr.c (expand_assignment): Likewise.
2691         (emit_storent_insn): Likewise.
2692         (store_expr_with_bounds): Likewise.
2693         (store_expr): Likewise.
2694         (expand_expr_real_1): Likewise.
2695         * expr.h (store_expr_with_bounds): Likewise.
2696         * function.c (use_register_for_decl): Likewise.
2697         (struct bounds_parm_data): Likewise.
2698         (assign_parms_augmented_arg_list): Likewise.
2699         (assign_parm_find_entry_rtl): Likewise.
2700         (assign_parm_is_stack_parm): Likewise.
2701         (assign_parm_load_bounds): Likewise.
2702         (assign_bounds): Likewise.
2703         (assign_parms): Likewise.
2704         (expand_function_start): Likewise.
2705         * gcc.c (CHKP_SPEC): Likewise.
2706         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2707         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2708         (wrestrict_dom_walker::check_call): Likewise.
2709         * gimple.c (gimple_build_call_from_tree): Likewise.
2710         * gimple.h (enum gf_mask): Likewise.
2711         (gimple_call_with_bounds_p): Likewise.
2712         (gimple_call_set_with_bounds): Likewise.
2713         * gimplify.c (gimplify_init_constructor): Likewise.
2714         * ipa-cp.c (initialize_node_lattices): Likewise.
2715         (propagate_constants_across_call): Likewise.
2716         (find_more_scalar_values_for_callers_subset): Likewise.
2717         * ipa-hsa.c (process_hsa_functions): Likewise.
2718         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2719         * ipa-icf.c (sem_function::merge): Likewise.
2720         * ipa-inline.c (early_inliner): Likewise.
2721         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2722         (warn_function_cold): Likewise.
2723         (propagate_pure_const): Likewise.
2724         * ipa-ref.h (enum GTY): Likewise.
2725         * ipa-split.c (find_retbnd): Likewise.
2726         (consider_split): Likewise.
2727         (split_function): Likewise.
2728         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2729         * ipa.c (walk_polymorphic_call_targets): Likewise.
2730         (symbol_table::remove_unreachable_nodes): Likewise.
2731         (process_references): Likewise.
2732         (cgraph_build_static_cdtor_1): Likewise.
2733         * lto-cgraph.c (lto_output_node): Likewise.
2734         (output_refs): Likewise.
2735         (compute_ltrans_boundary): Likewise.
2736         (input_overwrite_node): Likewise.
2737         (input_node): Likewise.
2738         (input_cgraph_1): Likewise.
2739         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2740         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2741         (class pass_chkp_instrumentation_passes): Likewise.
2742         (make_pass_chkp_instrumentation_passes): Likewise.
2743         * passes.def: Likewise.
2744         * rtl.h (struct GTY): Likewise.
2745         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2746         * stor-layout.c (layout_type): Likewise.
2747         * symtab.c: Likewise.
2748         * target.def: Likewise.
2749         * targhooks.c (default_chkp_bound_type): Likewise.
2750         (default_chkp_bound_mode): Likewise.
2751         (default_builtin_chkp_function): Likewise.
2752         (default_chkp_function_value_bounds): Likewise.
2753         (default_chkp_make_bounds_constant): Likewise.
2754         (default_chkp_initialize_bounds): Likewise.
2755         * targhooks.h (default_chkp_bound_type): Likewise.
2756         (default_chkp_bound_mode): Likewise.
2757         (default_builtin_chkp_function): Likewise.
2758         (default_chkp_function_value_bounds): Likewise.
2759         (default_chkp_make_bounds_constant): Likewise.
2760         (default_chkp_initialize_bounds): Likewise.
2761         * toplev.c (compile_file): Likewise.
2762         (process_options): Likewise.
2763         * tree-core.h (DEF_BUILTIN): Likewise.
2764         (DEF_BUILTIN_CHKP): Likewise.
2765         * tree-inline.c (declare_return_variable): Likewise.
2766         (remap_gimple_stmt): Likewise.
2767         (copy_bb): Likewise.
2768         (initialize_inlined_parameters): Likewise.
2769         (expand_call_inline): Likewise.
2770         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2771         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2772         (make_pass_ipa_chkp_produce_thunks): Likewise.
2773         (make_pass_chkp): Likewise.
2774         (make_pass_chkp_opt): Likewise.
2775         (make_pass_chkp_instrumentation_passes): Likewise.
2776         * tree-pretty-print.c (dump_generic_node): Likewise.
2777         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2778         * tree-ssa-dce.c (propagate_necessity): Likewise.
2779         (eliminate_unnecessary_stmts): Likewise.
2780         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2781         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2782         * tree-ssa-sccvn.h: Likewise.
2783         * tree-ssa-strlen.c (get_string_length): Likewise.
2784         (valid_builtin_call): Likewise.
2785         (adjust_last_stmt): Likewise.
2786         (handle_builtin_strchr): Likewise.
2787         (handle_builtin_strcpy): Likewise.
2788         (handle_builtin_stxncpy): Likewise.
2789         (handle_builtin_memcpy): Likewise.
2790         (handle_builtin_strcat): Likewise.
2791         (strlen_check_and_optimize_stmt): Likewise.
2792         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2793         * tree-streamer-in.c: Likewise.
2794         * tree-streamer.c (record_common_node): Likewise.
2795         * tree.c (tree_code_size): Likewise.
2796         (wide_int_to_tree_1): Likewise.
2797         (type_contains_placeholder_1): Likewise.
2798         (build_common_tree_nodes): Likewise.
2799         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2800         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2801         (POINTER_BOUNDS_P): Likewise.
2802         (BOUNDED_TYPE_P): Likewise.
2803         (BOUNDED_P): Likewise.
2804         (CALL_WITH_BOUNDS_P): Likewise.
2805         (pointer_bounds_type_node): Likewise.
2806         * value-prof.c (gimple_ic): Likewise.
2807         * var-tracking.c (vt_add_function_parameters): Likewise.
2808         * varasm.c (make_decl_rtl): Likewise.
2809         (assemble_start_function): Likewise.
2810         (output_constant): Likewise.
2811         (maybe_assemble_visibility): Likewise.
2812         * varpool.c (ctor_for_folding): Likewise.
2813         * chkp-builtins.def: Remove.
2814         * ipa-chkp.c: Remove.
2815         * ipa-chkp.h: Remove.
2816         * rtl-chkp.c: Remove.
2817         * rtl-chkp.h: Remove.
2818         * tree-chkp-opt.c: Remove.
2819         * tree-chkp.c: Remove.
2820         * tree-chkp.h: Remove.
2822 2018-06-07  Carl Love  <cel@us.ibm.com>
2824         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2825         vextract_fp_from_shortl): Add BE support.
2827 2018-06-07  Paul Koning  <ni1d@arrl.net>
2829         * compare-elim.c (try_merge_compare): Don't merge compare if
2830         address contains a side effect.
2831         (try_eliminate_compare): Likewise.
2833 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2835         * config.gcc: Support "tremont".
2836         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2837         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2838         PROCESSOR_TREMONT.
2839         * config/i386/i386.c (m_TREMONT): Define.
2840         (processor_target_table): Add "tremont".
2841         (PTA_TREMONT): Define.
2842         (ix86_lea_outperforms): Add TARGET_TREMONT.
2843         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2844         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2845         and M_INTEL_GOLDMONT_PLUS.
2846         (fold_builtin_cpu): Add "tremont".
2847         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2848         (ix86_option_override_internal): Add "tremont".
2849         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2850         (processor_type): Add PROCESSOR_TREMONT.
2851         * config/i386/x86-tune.def: Add m_TREMONT.
2852         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2854 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2856         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2857         symbol defined for msp430i* devices to be lower case.
2859         gcc/testsuite/gcc.target/msp430/
2860         * msp430i-device-symbol.c: New test.
2861         * msp430f-device-symbol.c: New test.
2862         * msp430.h: New test header file.
2864 2018-06-07  Richard Biener  <rguenther@suse.de>
2866         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2867         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2868         Properly wrap signed arithmetic if overflow wraps.
2870 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2872         PR tree-optimization/69615
2873         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2874         of a cast from a same precision integral SSA_NAME in a bb dominated
2875         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2876         cast to utype if rhs2 has already a compatible type.
2878 2018-06-07  Richard Biener  <rguenther@suse.de>
2880         PR tree-optimization/85935
2881         * graphite-scop-detection.c (find_params_in_bb): Analyze
2882         condition operands with respect to the correct loop.  Assert
2883         the analysis doesn't fail.
2885 2018-06-04  Carl Love  <cel@us.ibm.com>
2887         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2888         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2889         as it is slightly cheaper.
2890         (first_match_or_eos_index_<mode>):
2891         Calculate index using natural element order.
2892         (first_match_index_<mode>):
2893         Calculate index using natural element order.
2894         (first_match_or_eos_index_<mode>):
2895         Calculate index using natural order.
2896         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2897         for BE and LE modes.
2898         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2899         P9V_BUILTIN_VCLZLSBB_V16QI.
2900         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2901         specific.
2903 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2905         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2906         indentation and line wrap for many prototypes.  Add missing
2907         @smallexample directives around block of prototypes for vec_xl and
2908         vec_xst.
2910 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2912         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2913         track if we pass or return IEEE 128-bit floating point.
2914         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2915         C++ mangling that is compatible with GCC 8.1.
2916         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2917         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2918         floating point types.
2919         (rs6000_function_arg_advance_1): Likewise.
2920         (rs6000_mangle_type): Optionally generate mangled names that match
2921         what GCC 8.1 generated for IEEE 128-bit floating point types.
2922         (rs6000_globalize_decl_name): If we have an external function that
2923         passes or returns IEEE 128-bit types, generate a weak reference
2924         from the mangled name used in GCC 8.1 to the current mangled
2925         name.
2926         (rs6000_init_builtins): Make __ibm128 use the long double type if
2927         long double is IBM extended double.  Make __float128 use the long
2928         double type if long double is IEEE 128-bit.
2930         PR target/85657
2931         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2932         macro for __ibm128 built-in functions.
2933         (PACK_IF): Add __ibm128 pack/unpack functions.
2934         (UNPACK_IF): Likewise.
2935         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2936         enable long double built-in functions if long double is IEEE
2937         128-bit floating point.
2938         (rs6000_invalid_builtin): Update long double built-in function
2939         error message.
2940         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2941         functions, adjust the built-in function to use the long double
2942         built-in function if __ibm128 and long double are the same type.
2943         * doc/extend.texi (PowerPC builtins): Update documention for
2944         __builtin_{,un}pack_longdouble.  Add documentation for
2945         __builtin_{,un}pack_ibm128.
2947 2018-06-06  Jim Wilson  <jimw@sifive.com>
2949         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2950         (struct machine_function): New field interrupt_mode.
2951         (riscv_handle_type_attribute): New function.  Add forward declaration.
2952         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2953         (riscv_expand_epilogue): Check interrupt_mode field.
2954         (riscv_set_current_function): Check interrupt attribute args and
2955         set interrupt_mode field.
2956         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2957         (riscv_sret, riscv_uret): New.
2958         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2959         new arguments to interrupt attribute.
2961 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2963         PR target/63177
2964         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2965         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2967 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2969         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2970         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2971         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2972         several redundant entries.
2974 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2976         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2977         type from "rtx" to "rtx_insn *".
2978         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2979         for local "call_insn", removing cast.
2980         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2982 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2984         PR tree-optimization/86066
2985         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2986         for BIT_INSERT_EXPR stores.
2988 2018-06-06  Richard Biener  <rguenther@suse.de>
2990         PR tree-optimization/86062
2991         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2992         component refs ontop
2993         of to be offsetted base.
2995 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2997         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2998         to be static and remove check on interrupt attribute name.
3000         gcc/testsuite/gcc.target/msp430/
3001         * function-attributes-4.c: New test.
3002         * static-interrupts.c: New test.
3004 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3006         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3007         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3009 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
3011         PR target/79924
3012         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
3013         second argument.
3014         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
3015         Remove second argument, change how error is called.
3016         (aarch64_layout_arg): Remove second argument from
3017         aarch64_err_no_fpadvsimd call.
3018         (aarch64_init_cumulative_args): Ditto.
3019         (aarch64_gimplify_va_arg_expr): Ditto.
3020         * config/aarch64/aarch64.md (mov<mode>): Ditto.
3022 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
3024         * config/i386/i386.md (simple_return_indirect_internal): New expander.
3025         (*simple_return_indirect_internal<mode>): Rename from
3026         simple_return_indirect_internal.  Use W mode iterator.
3027         (rstorssp): New expander.
3028         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
3029         (clrssbsy): New expander.
3030         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
3032 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3034         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
3035         __typeof__.
3036         (cmse_check_pointed_object): Likewise.
3038 2018-06-05  Martin Liska  <mliska@suse.cz>
3040         PR gcov-profile/47618
3041         * doc/invoke.texi: Document how -fprofile-dir format
3042         is extended.
3044 2018-06-05  Richard Biener  <rguenther@suse.de>
3046         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
3047         removal pretend DOM info isn't available so we do not update
3048         it and only remove edges, not dominated blocks.  Actually free
3049         DOM info in case we removed something.  Remove unreachable blocks.
3050         (mfb_keep_latches): Work with either DOM info or marked backedges.
3051         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
3052         first.  Mark backedges if DOM info isn't available.
3053         (Re-)compute DOM info after cleanup_control_flow_pre.
3055 2018-06-05  Richard Biener  <rguenther@suse.de>
3057         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
3058         (locus_discrim_hasher::hash): Adjust.
3059         (locus_discrim_hasher::equal): Likewise.
3060         (next_discriminator_for_locus): Work on line directly.
3061         (same_line_p): Pass in expanded locus1 as well.
3062         (assign_discriminators): Avoid redundant location expansions.
3064 2018-06-05  Richard Biener  <rguenther@suse.de>
3066         PR tree-optimization/86046
3067         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
3068         if required after clearing TREE_ADDRESSABLE.
3070 2018-06-05  Richard Biener  <rguenther@suse.de>
3072         PR tree-optimization/86047
3073         * tree-ssa-loop.c (for_each_index): Glob handling of all
3074         decls and constants and really handle all of them.
3076 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3078         PR target/81497
3079         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3080         qualifier_void_pointer and qualifier_const_void_pointer.
3081         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3082         (arm_init_builtins): Handle the above.
3083         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3084         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3085         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3086         void intrinsics.
3088 2018-06-05  Martin Liska  <mliska@suse.cz>
3090         * auto-profile.c (read_autofdo_file): Do not use
3091         gcov_ctr_summary struct.
3092         (afdo_callsite_hot_enough_for_early_inline): Likewise.
3093         * coverage.c (struct counts_entry): Likewise.
3094         (read_counts_file): Read just single summary entry.
3095         (get_coverage_counts): Use gcov_summary struct.
3096         * coverage.h (get_coverage_counts): Likewise.
3097         * gcov-dump.c (dump_working_sets): Likewise.
3098         (tag_summary): Dump just single summary.
3099         * gcov-io.c (gcov_write_summary): Write just histogram
3100         summary.
3101         (gcov_read_summary): Read just single summary.
3102         (compute_working_sets): Use gcov_summary struct.
3103         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3104         of GCOV_COUNTERS_SUMMABLE.
3105         (GCOV_COUNTERS_SUMMABLE): Remove.
3106         (GCOV_FIRST_VALUE_COUNTER): Replace with
3107         GCOV_COUNTER_V_INTERVAL.
3108         (struct gcov_ctr_summary): Remove.
3109         (struct gcov_summary): Directly use fields of former
3110         gcov_ctr_summary.
3111         (compute_working_sets): Use gcov_summary struct.
3112         * gcov.c (read_count_file): Do not use ctrs fields.
3113         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3114         struct.
3115         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3116         struct.
3117         * profile.c: Likewise.
3118         * profile.h: Likewise.
3120 2018-06-05  Martin Liska  <mliska@suse.cz>
3122         PR gcov-profile/84846
3123         * gcov.c (output_lines): Print working directory only
3124         in intermediate format.
3126 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
3128         * config/s390/s390-builtin-types.def: Add void function type.
3129         * config/s390/s390-builtins.def: Use the function type for the
3130         tbeginc builtin.
3132 2018-06-04  Jim Wilson  <jimw@sifive.com>
3134         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3135         to int.
3136         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3137         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
3138         handle EH_RETURN_DATA_REGNO registers properly.
3139         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3140         (riscv_expand_epilogue): Update comment.  Change argument name and
3141         type.  Update code to use new name and type.  Pass new args to
3142         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
3143         EXCEPTION_RETURN.
3144         * config/riscv/riscv.md (NORMAL_RETURN): New.
3145         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3146         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3147         (eh_return): Call gen_eh_return_internal and emit barrier.
3148         (eh_return_internal): Call riscv_expand_epilogue.
3150 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
3152         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3153         bit_insertion field and declare can_be_merged_into method.
3154         (merged_store_group::can_be_merged_into): New method.
3155         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3156         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
3157         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3159 2018-06-04  Richard Biener  <rguenther@suse.de>
3161         PR tree-optimization/85955
3162         * builtins.c (fold_builtin_sincos): Convert pointers to
3163         destination to appropriate type before dereferencing.
3165 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
3167         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3169 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
3171         * expr.c (expand_expr_real_1): Force the operand into memory if
3172         its TYPE_MODE is BLKmode and if there is no integer mode for
3173         the number of bits being extracted.
3175 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3177         PR target/85832
3178         PR target/86036
3179         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3180         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3182 2018-06-04  Richard Biener  <rguenther@suse.de>
3184         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3185         (cleanup_tree_cfg_noloop): ... single caller.  Do
3186         start_recording_case_labels later.
3188 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
3190         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3191         to _IMMINTRIN_H_INCLUDED.
3192         * config/i386/pconfigintrin.h: Ditto.
3193         * config/i386/waitpkgintrin.h: Ditto.
3194         * config/i386/immintrin.h: Add includes for sgxintrin.h,
3195         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3196         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3197         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3198         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3199         waitpkgintrin.h and cldemoteintrin.h.
3201 2018-06-04  Richard Biener  <rguenther@suse.de>
3203         PR tree-optimization/86038
3204         * tracer.c (find_best_successor): Check probability for
3205         being initialized, bail out if not.
3207 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
3209         PR target/86003
3210         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3211         of bits to ignore when comparing architectures.
3213 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3215         PR tree-optimization/69615
3216         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3217         maximum or minimum of the type, try to merge it also as if
3218         range1 is + [-, x - 1] or + [x + 1, -].
3220         PR c++/86025
3221         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3223 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
3225         PR tree-optimization/86034
3226         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3227         the unsigned bitfield type in a bit insertion sequence if it does not
3228         have a larger precision than the bitfield size.
3229         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3231 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
3233         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3235 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3237         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3238         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3239         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3240         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3242 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3244         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3245         Disable -fdelete-null-pointer-checks for ELF toolchain.
3247 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3248             Kito Cheng  <kito.cheng@gmail.com>
3250         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3251         (nds32le-*-*, nds32be-*-*): Integrate checking process.
3252         (nds32*-*-*): Add glibc and uclibc conditions.
3253         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3254         (TARGET_EXCEPT_UNWIND_INFO): Define.
3255         * config/nds32/elf.h: New file.
3256         * config/nds32/linux.h: New file.
3257         * config/nds32/nds32-elf.opt: New file.
3258         * config/nds32/nds32-linux.opt: New file.
3259         * config/nds32/nds32-fp-as-gp.c
3260         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3261         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3262         TARGET_LINUX_ABI.
3263         (nds32_asm_file_end): Ditto.
3264         (nds32_print_operand): Ditto.
3265         (nds32_insert_attributes): Ditto.
3266         (nds32_init_libfuncs): New function.
3267         (TARGET_HAVE_TLS): Define.
3268         (TARGET_INIT_LIBFUNCS): Define.
3269         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3270         spec content.
3271         (TARGET_ELF): Apply different mcmodel setting.
3272         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3273         been migrated into elf.h and linux.h files.
3274         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3275         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3276         (mcmodel): The content has been migrated into nds32-elf.opt and
3277         nds32-linux.opt files.
3278         * config/nds32/t-elf: New file.
3279         * config/nds32/t-linux: New file.
3281 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3282             Shiva Chen  <shiva0217@gmail.com>
3284         * config/nds32/constants.md (unspec_volatile_element): Add
3285         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3286         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3287         optimization.
3288         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3289         (make_pass_nds32_fp_as_gp): Declare.
3290         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3291         optmization pass.
3292         (nds32_asm_function_end_prologue): Remove unused asm output.
3293         (nds32_asm_function_begin_epilogue): Remove unused asm output.
3294         (nds32_asm_file_start): Output necessary fp_as_gp information.
3295         (nds32_option_override): Adjust register usage.
3296         (nds32_expand_prologue): Consider fp_as_gp situation.
3297         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3298         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3299         (epilogue): Ditto.
3300         (return): Ditto.
3301         (simple_return): Ditto.
3302         (omit_fp_begin): Output special directive for fp_as_gp.
3303         (omit_fp_end): Output special directive for fp_as_gp.
3304         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3305         mforbid-fp-as-gp): New options.
3307 2018-06-01  Mark Wielaard  <mark@klomp.org>
3309         * dwarf2out.c (dwarf2out_finish): Remove generation of
3310         DW_AT_loclists_base.
3312 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3314         * gimple-ssa-store-merging.c: Include gimple-fold.h.
3315         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3316         (struct merged_store_group): Add bit_insertion field.
3317         (dump_char_array): Use standard hexadecimal format.
3318         (merged_store_group::merged_store_group): Set bit_insertion to false.
3319         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
3320         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
3321         also print the mask in the dump file.
3322         (pass_store_merging::gate): Minor tweak.
3323         (imm_store_chain_info::coalesce_immediate): Fix wrong association
3324         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
3325         stores with INTEGER_CST stores.
3326         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3327         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3328         and use it throughout.  Generate bit insertion sequences if need be.
3329         (pass_store_merging::process_store): Remove redundant condition.
3330         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3332 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
3334         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3335         the 128-bit floating point types.  Fix function comment.
3337 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3339         * config/aarch64/aarch64-simd.md
3340         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3341         mnemonics.
3342         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3343         mnemonics.
3345 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3347         PR tree-optimization/85989
3348         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3349         variable.
3350         (backprop::intersect_uses): Check it when deciding whether this
3351         is a backedge reference.
3352         (backprop::process_block): Add each phi to m_visited_phis
3353         after visiting it, then clear it at the end.
3355 2018-06-01  Richard Biener  <rguenther@suse.de>
3357         * tree-vectorizer.h (vect_dr_stmt): New function.
3358         (vect_get_load_cost): Adjust.
3359         (vect_get_store_cost): Likewise.
3360         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3361         Use vect_dr_stmt instead of DR_SMTT.
3362         (vect_record_base_alignments): Likewise.
3363         (vect_calculate_target_alignment): Likewise.
3364         (vect_compute_data_ref_alignment): Likewise and make static.
3365         (vect_update_misalignment_for_peel): Likewise.
3366         (vect_verify_datarefs_alignment): Likewise.
3367         (vector_alignment_reachable_p): Likewise.
3368         (vect_get_data_access_cost): Likewise.  Pass down
3369         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3370         (vect_get_peeling_costs_all_drs): Likewise.
3371         (vect_peeling_hash_get_lowest_cost): Likewise.
3372         (vect_enhance_data_refs_alignment): Likewise.
3373         (vect_find_same_alignment_drs): Likewise.
3374         (vect_analyze_data_refs_alignment): Likewise.
3375         (vect_analyze_group_access_1): Likewise.
3376         (vect_analyze_group_access): Likewise.
3377         (vect_analyze_data_ref_access): Likewise.
3378         (vect_analyze_data_ref_accesses): Likewise.
3379         (vect_vfa_segment_size): Likewise.
3380         (vect_small_gap_p): Likewise.
3381         (vectorizable_with_step_bound_p): Likewise.
3382         (vect_prune_runtime_alias_test_list): Likewise.
3383         (vect_analyze_data_refs): Likewise.
3384         (vect_supportable_dr_alignment): Likewise.
3385         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3386         (vect_gen_prolog_loop_niters): Likewise.
3387         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3388         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3389         modify DR_STMT.
3390         (vect_recog_mask_conversion_pattern): Likewise.
3391         (vect_try_gather_scatter_pattern): Likewise.
3392         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3393         to vect_get_store_cost.
3394         (vect_get_store_cost): Get stmt_info instead of DR.
3395         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3396         (vect_get_load_cost): Get stmt_info instead of DR.
3398 2018-06-01  Richard Biener  <rguenther@suse.de>
3400         PR middle-end/86017
3401         * gimple-fold.c (var_decl_component_p): Also allow offsetted
3402         vars wrapped in MEM_REFs.
3404 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3406         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3407         Fix subreg tests so that we only return a choice between
3408         GENERAL_REGS and FP_REGS if the original classes included both.
3410 2018-06-01  Richard Biener  <rguenther@suse.de>
3412         PR ipa/85960
3413         * tree-ssa-structalias.c (get_function_part_constraint):
3414         Handle NULL fi->decl.
3415         (find_func_aliases_for_call): Properly handle indirect
3416         fi from direct call.
3417         (find_func_clobbers): Likewise.
3418         (ipa_pta_execute): Likewise.
3419         (create_variable_info_for): For functions that are ifunc_resolver
3420         resolve to a varinfo that contains the result of the resolver call.
3421         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3422         aliases.
3424 2018-05-31  Michael Collison  <michael.collison@arm.com>
3426         * config/aarch64/aarch64.md:
3427         (*fix_to_zero_extenddfdi2): New pattern.
3428         * gcc.target/aarch64/fix_extend1.c: New testcase.
3430 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
3432         PR middle-end/78809
3433         PR middle-end/83026
3434         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3435         and BUILT_IN_STRNCMP_EQ.
3436         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3437         BUILT_IN_STRNCMP_EQ.
3438         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3439         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3440         (gimple_fold_builtin): Likewise.
3441         * tree-ssa-strlen.c (compute_string_length): New function.
3442         (determine_min_obsize): New function.
3443         (handle_builtin_string_cmp): New function to handle calls to
3444         string compare functions.
3445         (strlen_optimize_stmt): Add handling to builtin string compare
3446         calls.
3447         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3448         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3449         * tree.c (build_common_builtin_nodes): Add new defines of
3450         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3452 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
3454         PR target/85984
3455         * bb-reorder.c (pass_partition_blocks::gate): Return false for
3456         functions with naked attribute.
3458 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3460         * config/i386/sse.md (avx_vec_concat<mode>):
3461         Substitute concat_tg_mode mode attribute with xtg_mode.
3462         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3463         (concat_tg_mode): Remove mode attribute.
3465 2018-05-31  Martin Sebor  <msebor@redhat.com>
3467         PR c/82063
3468         * calls.c (alloc_max_size): Correct a logic error/typo.
3469         Treat excessive arguments as infinite.  Warn for invalid arguments.
3470         * doc/invoke.texi (-Walloc-size-larger-than): Update.
3472 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
3474         PR target/85829
3475         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3476         and movx for Haswell.
3478 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
3479             Cesar Philippidis  <cesar@codesourcery.com>
3481         PR middle-end/85879
3482         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3483         when emitting error on private/firstprivate reductions.
3484         * omp-low.c (lower_omp_target): Avoid reference-type processing
3485         on pointers for firstprivate clause.
3487 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3489         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3490         (st1x2): Likewise.
3491         (st1x3): Likewise.
3492         * config/aarch64/aarch64-simd.md
3493         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3494         (aarch64_ld1_x3_<mode>): Likewise
3495         (aarch64_st1x2<VALLDIF:mode>): Likewise
3496         (aarch64_st1_x2_<mode>): Likewise
3497         (aarch64_st1x3<VALLDIF:mode>): Likewise
3498         (aarch64_st1_x3_<mode>): Likewise
3499         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3500         (vld1_s8_x3): Likewise.
3501         (vld1_u16_x3): Likewise.
3502         (vld1_s16_x3): Likewise.
3503         (vld1_u32_x3): Likewise.
3504         (vld1_s32_x3): Likewise.
3505         (vld1_u64_x3): Likewise.
3506         (vld1_s64_x3): Likewise.
3507         (vld1_f16_x3): Likewise.
3508         (vld1_f32_x3): Likewise.
3509         (vld1_f64_x3): Likewise.
3510         (vld1_p8_x3): Likewise.
3511         (vld1_p16_x3): Likewise.
3512         (vld1_p64_x3): Likewise.
3513         (vld1q_u8_x3): Likewise.
3514         (vld1q_s8_x3): Likewise.
3515         (vld1q_u16_x3): Likewise.
3516         (vld1q_s16_x3): Likewise.
3517         (vld1q_u32_x3): Likewise.
3518         (vld1q_s32_x3): Likewise.
3519         (vld1q_u64_x3): Likewise.
3520         (vld1q_s64_x3): Likewise.
3521         (vld1q_f16_x3): Likewise.
3522         (vld1q_f32_x3): Likewise.
3523         (vld1q_f64_x3): Likewise.
3524         (vld1q_p8_x3): Likewise.
3525         (vld1q_p16_x3): Likewise.
3526         (vld1q_p64_x3): Likewise.
3527         (vst1_s64_x2): Likewise.
3528         (vst1_u64_x2): Likewise.
3529         (vst1_f64_x2): Likewise.
3530         (vst1_s8_x2): Likewise.
3531         (vst1_p8_x2): Likewise.
3532         (vst1_s16_x2): Likewise.
3533         (vst1_p16_x2): Likewise.
3534         (vst1_s32_x2): Likewise.
3535         (vst1_u8_x2): Likewise.
3536         (vst1_u16_x2): Likewise.
3537         (vst1_u32_x2): Likewise.
3538         (vst1_f16_x2): Likewise.
3539         (vst1_f32_x2): Likewise.
3540         (vst1_p64_x2): Likewise.
3541         (vst1q_s8_x2): Likewise.
3542         (vst1q_p8_x2): Likewise.
3543         (vst1q_s16_x2): Likewise.
3544         (vst1q_p16_x2): Likewise.
3545         (vst1q_s32_x2): Likewise.
3546         (vst1q_s64_x2): Likewise.
3547         (vst1q_u8_x2): Likewise.
3548         (vst1q_u16_x2): Likewise.
3549         (vst1q_u32_x2): Likewise.
3550         (vst1q_u64_x2): Likewise.
3551         (vst1q_f16_x2): Likewise.
3552         (vst1q_f32_x2): Likewise.
3553         (vst1q_f64_x2): Likewise.
3554         (vst1q_p64_x2): Likewise.
3555         (vst1_s64_x3): Likewise.
3556         (vst1_u64_x3): Likewise.
3557         (vst1_f64_x3): Likewise.
3558         (vst1_s8_x3): Likewise.
3559         (vst1_p8_x3): Likewise.
3560         (vst1_s16_x3): Likewise.
3561         (vst1_p16_x3): Likewise.
3562         (vst1_s32_x3): Likewise.
3563         (vst1_u8_x3): Likewise.
3564         (vst1_u16_x3): Likewise.
3565         (vst1_u32_x3): Likewise.
3566         (vst1_f16_x3): Likewise.
3567         (vst1_f32_x3): Likewise.
3568         (vst1_p64_x3): Likewise.
3569         (vst1q_s8_x3): Likewise.
3570         (vst1q_p8_x3): Likewise.
3571         (vst1q_s16_x3): Likewise.
3572         (vst1q_p16_x3): Likewise.
3573         (vst1q_s32_x3): Likewise.
3574         (vst1q_s64_x3): Likewise.
3575         (vst1q_u8_x3): Likewise.
3576         (vst1q_u16_x3): Likewise.
3577         (vst1q_u32_x3): Likewise.
3578         (vst1q_u64_x3): Likewise.
3579         (vst1q_f16_x3): Likewise.
3580         (vst1q_f32_x3): Likewise.
3581         (vst1q_f64_x3): Likewise.
3582         (vst1q_p64_x3): Likewise.
3584 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3586         * config/msp430/msp430.c (msp430_output_labelref): Prepend
3587         user_label_prefix to name.
3589         * tree-core.h: Update comment about the format of NAME string
3590         passed to handler in attribute_spec.
3592         * config/msp430/msp430.md: Remove erroneous subreg expression from
3593         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3594         zero_extend{q,h}isi2.
3596 2018-05-30  Borislav Petkov  <bp@suse.de>
3598         * doc/extend.texi: Document some architecture specific
3599         constraints and sort entries.
3601 2018-05-30  Martin Sebor  <msebor@redhat.com>
3603         PR middle-end/85369
3604         * builtins.c (expand_builtin_stpcpy_1): New function.
3605         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3606         only if the former succeeds.
3608 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3610         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3611         in saphira.
3613 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3615         * doc/invoke.texi (-flinker-output): Document
3617 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3619         * passes.c (ipa_write_summaries): Only modify statements if body
3620         is in memory.
3621         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3622         incrementally linking.
3623         (ipa_passes): Likewise.
3624         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3625         pass down resolution info.
3626         * common.opt (flag_incremental_link): Update info.
3627         * gcc.c (plugin specs): Turn flinker-output=* to
3628         -plugin-opt=-linker-output-known
3629         * toplev.c (compile_file): Also cut compilation when doing incremental
3630         link.
3631         * flag-types. (enum lto_partition_model): Add
3632         LTO_LINKER_OUTPUT_NOLTOREL.
3633         (invoke.texi): Add -flinker-output docs.
3634         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3635         link same way as WPA; do not stream in dead initializers.
3637         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3638         darf2out_register_external_decl): Support incremental link.
3640 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3642         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3644 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3646         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3647         it down to simple_object_copy_lto_debug_sections.
3648         (run_gcc): Determine incremental LTO link time and configure
3649         lto1 into non-wpa mode, disable renaming of debug sections.
3651 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3653         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3654         descriptions of various incorrectly documented functions.
3656 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3658         Revert:
3659         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3660         address check not strict.
3662 2018-05-30  Richard Biener  <rguenther@suse.de>
3664         PR tree-optimization/85964
3665         * tracer.c (better_p): Drop initialized count check, we only
3666         call the function with initialized counts now.
3667         (find_best_successor): Do find a best edge if one
3668         has uninitialized count.
3669         (find_best_predecessor): Likewise.  Do BB frequency check only
3670         if count is initialized.
3672 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3674         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3675         (aarch64_ldrstr_offset_compare): New.
3676         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3677         load/store orderings.
3678         (aarch64_gen_adjusted_ldpstp): Likewise.
3680 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3682         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3683         Check for subset of GENERAL_REGS and FP_REGS.
3684         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3685         r=w alternative.
3687 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3689         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3690         and wi::to_poly_offset.  Add the current offset and then check
3691         whether the sum fits, rather than using an unchecked addition of
3692         a checked term.  Check for a shwi rather than a uhwi.
3693         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3694         (store_constructor): Use poly_int_tree_p.
3695         (expand_expr_real_1): Likewise.
3696         * function.c (assign_temp): Likewise.
3697         * fold-const.c (const_binop): Use poly_int_tree_p and
3698         wi::to_poly_offset.
3699         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3700         division.
3701         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3702         to_poly_offset for MEM offsets.
3703         * ipa-icf.c (sem_variable::equals): Likewise.
3704         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3705         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3706         wi::to_poly_offset for BIT_FIELD_REF offsets.
3707         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3708         wi::to_poly_offset.
3709         * var-tracking.c (emit_note_insn_var_location): Use
3710         tree_to_poly_uint64.
3712 2018-05-29  Jim Wilson  <jimw@sifive.com>
3714         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3716 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3718         PR target/85950
3719         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3720         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3721         sequence.
3722         (sse4_1_round<mode>2): Use nonimmediate_operand
3723         for operand 1 predicate.
3725 2018-05-29  Martin Sebor  <msebor@redhat.com>
3726             Richard Biener  <rguenther@suse.de>
3728         PR testsuite/85888
3729         * calls.c (get_size_range): Call determine_value_range instead
3730         of get_value_range..
3731         * tree-vrp.h (determine_value_range): Declared new function.
3732         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3734 2018-05-29  Richard Biener  <rguenther@suse.de>
3736         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3737         sure to use non-pattern stmts for get_earlier_stmt arguments.
3738         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3739         called on pattern stmts.
3740         (get_later_stmt): Likewise.
3742 2018-05-29  Martin Liska  <mliska@suse.cz>
3744         PR gcov-profile/85759
3745         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3746         env variables.
3748 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3750         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3751         VEC_UNPACK_*_EXPR.
3752         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3753         VEC_PACK_*_EXPR.
3755         PR target/85918
3756         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3757         VEC_PACK_FLOAT_EXPR): New tree codes.
3758         * tree-pretty-print.c (op_code_prio): Handle
3759         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3760         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3761         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3762         * tree-inline.c (estimate_operator_cost): Likewise.
3763         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3764         * fold-const.c (const_binop): Likewise.
3765         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3766         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3767         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3768         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3769         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3770         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3771         * expr.c (expand_expr_real_2): Likewise.
3772         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3773         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3774         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3775         optabs.
3776         * optabs.c (expand_widen_pattern_expr): For
3777         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3778         sign from result type rather than operand's type.
3779         (expand_binop_directly): For vec_packu_float_optab and
3780         vec_packs_float_optab allow result type to be different from operand's
3781         type.
3782         * optabs-tree.c (optab_for_tree_code): Handle
3783         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3784         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3785         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3786         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3787         VEC_PACK_FLOAT_EXPR.
3788         * tree-vect-stmts.c (supportable_widening_operation): Handle
3789         FIX_TRUNC_EXPR.
3790         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3791         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3792         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3793         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3794         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3795         mode attributes.
3796         (vec_pack<floatprefix>_float_<mode>): New expander.
3797         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3798         attributes.
3799         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3800         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3801         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3802         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3803         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3804         Document.
3805         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3806         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3807         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3808         VEC_PACK_FLOAT_EXPR): Document.
3810 2018-05-29  Richard Biener  <rguenther@suse.de>
3812         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3813         member.
3814         (stmt_vec_info_vec): Make pointer.
3815         (init_stmt_vec_info_vec): Remove.
3816         (free_stmt_vec_info_vec): Likewise.
3817         (set_stmt_vec_info_vec): New function.
3818         (free_stmt_vec_infos): Likewise.
3819         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3820         (set_vinfo_for_stmt): Likewise.
3821         (get_earlier_stmt): Likewise.
3822         (get_later_stmt): Likewise.
3823         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3824         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3825         (vec_info::~vec_info): Free stmt_vec_infos.
3826         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3827         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3828         (pass_slp_vectorize::execute): Likewise.
3829         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3830         (free_stmt_vec_info_vec): Likewise.
3831         (set_stmt_vec_info_vec): New function.
3832         (free_stmt_vec_infos): Likewise.
3833         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3834         the global stmt_vec_info_vec.
3835         * tree-parloops.c (gather_scalar_reductions): Use
3836         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3837         vector.
3839 2018-05-29  Richard Biener  <rguenther@suse.de>
3841         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3843 2018-05-29  Martin Liska  <mliska@suse.cz>
3844             David Malcolm  <dmalcolm@redhat.com>
3846         * vec.c (test_reverse): New.
3847         (vec_c_tests): Add new test.
3848         * vec.h (vl_ptr>::reverse): New function.
3850 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3852         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3854         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3855         and later.
3857 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3859         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3861 2018-05-28  Richard Biener  <rguenther@suse.de>
3863         PR tree-optimization/85933
3864         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3865         look at stmts marked as vectorizable.
3867 2018-05-28  Richard Biener  <rguenther@suse.de>
3869         PR tree-optimization/85934
3870         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3871         vector boolean check before scalar optimization.
3873 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3875         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3876         for armv5te.
3878 2018-05-28  Mark Wielaard  <mark@klomp.org>
3880         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3881         if it is an expression containing a minus sign.
3883 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3885         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3887 2018-05-27  Paul Koning  <ni1d@arrl.net>
3889         * config/pdp11/pdp11.md (truncsihi2): Remove.
3891 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3892             Chung-Ju Wu  <jasonwucj@gmail.com>
3894         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3895         implementation.
3896         (unaligned_store_dw): Ditto.
3897         * config/nds32/nds32-memory-manipulation.c
3898         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3899         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3900         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3901         (emit_setmem_word_loop): Rename to ...
3902         (emit_setmem_doubleword_loop): ... this.
3903         (nds32_gen_dup_4_byte_to_word_value): New function.
3904         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3905         (nds32_expand_setmem_loop): Refine implementation.
3906         (nds32_expand_setmem_loop_v3m): Ditto.
3907         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3908         pattern.
3910 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3912         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3914 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3916         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3917         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3918         machine->attr_no_prologue_p.
3919         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3920         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3921         (nds32_expand_epilogue): Consider attr_naked_p.
3922         (nds32_expand_epilogue_v3pop): Likewise.
3923         (nds32_can_use_return_insn): Likewise.
3924         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3925         attr_no_prologue_p fields.
3926         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3928 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3930         PR target/85918
3931         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3932         attributes.
3933         * config/i386/sse.md
3934         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3935         Rename to ...
3936         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3937         ... this.
3938         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3939         Rename to ...
3940         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3941         ... this.
3942         (*<floatsuffix>floatv2div2sf2): Rename to ...
3943         (*float<floatunssuffix>v2div2sf2): ... this.
3944         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3945         (float<floatunssuffix>v2div2sf2_mask): ... this.
3946         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3947         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3948         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3949         to ...
3950         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3951         ... this.
3952         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3953         Rename to ...
3954         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3955         ... this.
3956         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3957         Rename to ...
3958         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3959         ... this.
3960         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3961         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3962         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3963         gen_ufix_truncv8dfv8si2.
3964         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3965         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3966         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3967         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3968         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3969         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3970         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3971         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3973 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3975         PR target/85900
3976         PR target/85345
3977         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3979 2018-05-25  Jim Wilson  <jimw@sifive.com>
3981         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3982         * config/riscv/riscv.c (struct machine_function): Add
3983         interrupt_handler_p and attribute_checked_p fields.
3984         (riscv_attribute_table): Add interrupt.
3985         (riscv_interrupt_type_p): New.
3986         (riscv_save_reg_p): Save extra regs for interrupt handler.
3987         (riscv_use_save_libcall): Return false  for interrupt handler.
3988         (riscv_first_stack_step): Add forward declaration.
3989         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3990         for interrupt handler with large frame.  Use it for saved reg list.
3991         (riscv_expand_prologue): Move flag_stack_usage_info support to
3992         eliminate duplication.
3993         (riscv_expand_epilogue): Generate mret for interrupt handler.
3994         (riscv_epilogue_uses): New.
3995         (riscv_can_use_return_insn): Return false for interrupt handler.
3996         (riscv_function_ok_for_sibcall): Likewise.
3997         (riscv_set_current_function): Add interrupt handler support.
3998         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3999         * config/riscv/riscv.md (UNSPECV_MRET): New.
4000         (GP_REGNUM): New.
4001         (riscv_frflags, riscv_fsflags): Use tab after opcode.
4002         (riscv_mret): New.
4003         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4005 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4007         PR tree-optimization/85712
4008         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4009         this candidate has already been replaced in-situ by a copy.
4011 2018-05-25  Jason Merrill  <jason@redhat.com>
4013         PR c++/80485 - inline function non-zero address.
4014         * symtab.c (nonzero_address): Check DECL_COMDAT.
4016 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
4018         PR target/83628
4019         * config/alpha/alpha.md (ashlsi3): New insn pattern.
4020         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
4021         extension of SImode operation.  Use const123_operand predicate.
4022         (*saddsi_1): Remove.
4023         (*saddl_se_1): Ditto.
4024         (*ssubsi_1): Ditto.
4025         (*ssubl_se_1): Ditto.
4026         * config/alpha/predicates.md (const123_operand): New predicate.
4027         * config/alpha/constraints.md (P): Use IN_RANGE.
4029 2018-05-25  Richard Biener  <rguenther@suse.de>
4031         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
4032         defaulted to true.
4033         (ref_maybe_used_by_stmt_p): Likewise.
4034         (stmt_may_clobber_ref_p): Likewise.
4035         (stmt_may_clobber_ref_p_1): Likewise.
4036         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
4037         and pass it along.
4038         (ref_maybe_used_by_stmt_p): Likewise.
4039         (stmt_may_clobber_ref_p): Likewise.
4040         (stmt_may_clobber_ref_p_1): Likewise.
4041         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
4042         the alias oracle to disambiguate DRs with stmts DR analysis
4043         couldn't handle.
4044         (vect_analyze_data_refs): Do not give up on not analyzable
4045         DRs for BB vectorization.  Remove code truncating the dataref
4046         vector.
4048 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
4050         PR target/85832
4051         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4052         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
4053         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
4055 2018-05-25  Richard Biener  <rguenther@suse.de>
4057         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
4058         function, combining stmt data ref gathering and fatal analysis
4059         parts.
4060         (vect_analyze_data_refs): Remove now redudnant code and simplify.
4061         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
4062         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
4063         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
4064         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
4066 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4068         PR tree-optimization/85720
4069         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
4070         SCC if all partitions are builtins.
4071         (version_loop_by_alias_check): New parameter.  Generate cancelable
4072         runtime alias check if all partitions are builtins.
4073         (distribute_loop): Update call to above function.
4075 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4077         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
4078         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
4079         (parm_default_def_partition_arg): Ditto.
4080         (set_parm_default_def_partition): Ditto.
4081         (get_parm_default_def_partitions): Ditto and make it static.
4082         (get_undefined_value_partitions): Ditto and make it static.
4083         (remove_ssa_form): Refactor call to init_var_map here.
4084         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
4085         computation for loop region.
4086         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
4087         (register_default_def): Delete.
4088         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
4089         (parm_default_def_partition_arg): Ditto.
4090         (set_parm_default_def_partition): Ditto.
4091         (get_parm_default_def_partitions): Ditto and make it static.
4092         (get_undefined_value_partitions): Ditto and make it static.
4093         (coalesce_with_default, coalesce_with_default): Update comment.
4094         (create_coalesce_list_for_region): New func factored out from
4095         create_outofssa_var_map.
4096         (populate_coalesce_list_for_outofssa): New func factored out from
4097         create_outofssa_var_map and coalesce_ssa_name.
4098         (create_outofssa_var_map): Delete.
4099         (coalesce_ssa_name): Refactor to support live range computation.
4100         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4101         (get_parm_default_def_partitions): Delete.
4102         (get_undefined_value_partitions): Ditto.
4103         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4104         computation for loop region.
4105         (new_tree_live_info, loe_visit_block): Ditto.
4106         (live_worklist, set_var_live_on_entry): Ditto.
4107         (calculate_live_on_exit, verify_live_on_entry): Ditto.
4108         * tree-ssa-live.h (struct _var_map): New fields.
4109         (init_var_map): Change decl.
4110         (region_contains_p): New.
4112 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4114         * tree-ssa-live.h (live_merge_and_clear): Delete.
4116 2018-05-25  Richard Biener  <rguenther@suse.de>
4118         PR c++/85912
4119         * tree-dump.c (dequeue_and_dump): Remove access to removed
4120         operand 2 of a SWITCH_EXPR.
4122 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4124         * doc/sourcebuild.texi (vect_double_cond_arith): Include
4125         multiplication and division.
4126         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4127         (cond_udiv@var{m}, cond_umod@var{m}): Document.
4128         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4129         (cond_udiv_optab, cond_umod_optab): New optabs.
4130         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4131         (IFN_COND_RDIV): New internal functions.
4132         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4133         TRUNC_MOD_EXPR and RDIV_EXPR.
4134         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4135         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4136         New unspecs.
4137         (SVE_INT_BINARY): Include mult.
4138         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4139         (optab, sve_int_op): Handle mult.
4140         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4141         UNSPEC_COND_DIV.
4142         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4143         for SVE_INT_BINARY_SD.
4145 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4147         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4148         (optab, sve_int_op): Handle div and udiv.
4149         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4150         for SVE_INT_BINARY_SD.
4151         (*<optab><mode>3): New insn for the same.
4153 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4155         * tree-vect-patterns.c: Include predict.h.
4156         (vect_recog_divmod_pattern): Restrict check for division support
4157         to when optimizing for size.
4159 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4161         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4162         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4163         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4164         (gimple_match_op::set_op): Likewise.
4165         (gimple_resimplify4): Declare.
4166         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4167         (expr::gen_transform): Likewise.
4168         (decision_tree::gen): Generate a simplification routine for 4 operands.
4169         * gimple-match-head.c (gimple_simplify): Add an overload for
4170         4 operands.  In the top-level function, handle up to 4 call
4171         arguments and call gimple_resimplify4.
4172         (gimple_resimplify4): New function.
4173         (build_call_internal): Pass a fourth operand.
4174         (maybe_push_to_seq): Likewise.
4175         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4176         Fold VEC_COND_EXPRs of an operation and a default value into
4177         an IFN_COND_* function if possible.
4178         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4179         New unspecs.
4180         (SVE_COND_FP_BINARY): Include them.
4181         (optab, sve_fp_op): Handle them.
4182         (SVE_INT_BINARY_REV): New code iterator.
4183         (SVE_COND_FP_BINARY_REV): New int iterator.
4184         (commutative): New int attribute.
4185         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4186         Declare.
4187         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4188         function.
4189         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4190         (*cond_<optab><mode>): New patterns for reversed operands.
4192 2018-05-25  Richard Biener  <rguenther@suse.de>
4194         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4195         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4196         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4197         (STMT_VINFO_GROUPED_ACCESS): Adjust.
4198         * tree-vect-data-refs.c (everywhere): Adjust users.
4199         * tree-vect-loop.c (everywhere): Likewise.
4200         * tree-vect-slp.c (everywhere): Likewise.
4201         * tree-vect-stmts.c (everywhere): Likewise.
4202         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4204 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4206         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4207         Rename to...
4208         (gcc_cv_as_section_exclude): ... this.
4209         Try Solaris as #exclude syntax.
4210         * configure: Regenerate.
4211         * config.in: Regenerate.
4212         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4213         SECTION_EXCLUDE.
4214         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4215         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4217         * varasm.c (default_elf_asm_named_section): Don't check if
4218         HAVE_GAS_SECTION_EXCLUDE is defined.
4220 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4222         * doc/md.texi: Update the documentation of the cond_* optabs
4223         to mention the new final operand.  Fix GET_MODE_NUNITS call.
4224         Describe the scalar case too.
4225         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4226         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4227         instead of 2.
4228         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4229         (get_conditional_internal_fn): Update comment.
4230         * tree-vect-loop.c (vectorizable_reduction): Pass the original
4231         accumulator value as a final argument to conditional functions.
4232         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4233         a define_expand and add an "else" operand.  Assert for now that
4234         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
4235         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4236         (*cond_<optab><mode>): New patterns.
4237         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4238         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4239         (UNSPEC_COND_EOR): Delete.
4240         (optab): Remove associated mappings.
4241         (SVE_INT_BINARY): New code iterator.
4242         (sve_int_op): Remove int attribute and add "minus" to the code
4243         attribute.
4244         (SVE_COND_INT_OP): Delete.
4245         (SVE_COND_FP_OP): Rename to...
4246         (SVE_COND_FP_BINARY): ...this.
4248 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4250         * optabs.c (can_reuse_operands_p): New function.
4251         (maybe_legitimize_operands): Try to reuse the results for
4252         earlier operands.
4254 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4256         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4257         Add {q} suffix to insn mnemonic.
4259 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4261         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4262         (msp430_warn_func_return): New.
4264 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
4266         * fold-const.c (tree_nonzero_bits): New function.
4267         * fold-const.h (tree_nonzero_bits): Likewise.
4268         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4269         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4271 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4273         PR target/85900
4274         PR target/85345
4275         * varasm.c (assemble_alias): Check ifunc_resolver only on
4276         FUNCTION_DECL.
4278 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4280         PR target/85903
4281         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4282         when memory input operand is handled.
4284 2018-05-24  Luis Machado  <luis.machado@linaro.org>
4286         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4287         global.
4288         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4290 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4292         * match.pd: Delay FMA folds until after vectorization.
4294 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4296         PR target/83009
4297         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4298         address check not strict.
4300 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4302         * gimple-match.h (gimple_match_op): New class.
4303         (mprts_hook): Replace parameters with a gimple_match_op *.
4304         (maybe_build_generic_op): Likewise.
4305         (gimple_simplified_result_is_gimple_val): Replace parameters with
4306         a const gimple_match_op *.
4307         (gimple_simplify): Replace code_helper * and tree * parameters with
4308         a gimple_match_op * parameter.
4309         (gimple_resimplify1): Replace code_helper *, tree and tree *
4310         parameters with a gimple_match_op * parameter.
4311         (gimple_resimplify2): Likewise.
4312         (gimple_resimplify3): Likewise.
4313         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4314         parameters with a gimple_match_op * parameter.
4315         * gimple-match-head.c (gimple_simplify): Change prototypes of
4316         auto-generated functions to take a gimple_match_op * instead of
4317         separate code_helper * and tree * parameters.  Make the same
4318         change in the top-level overload and update calls to the
4319         gimple_resimplify routines.  Update calls to the auto-generated
4320         functions and to maybe_push_res_to_seq in the publicly-facing
4321         operation-specific gimple_simplify overloads.
4322         (gimple_match_op::MAX_NUM_OPS): Define.
4323         (gimple_resimplify1): Replace rcode and ops with a single res_op
4324         parameter.  Update call to gimple_simplify.
4325         (gimple_resimplify2): Likewise.
4326         (gimple_resimplify3): Likewise.
4327         (mprts_hook): Replace parameters with a gimple_match_op *.
4328         (maybe_build_generic_op): Likewise.
4329         (build_call_internal): Replace type, nargs and ops with
4330         a gimple_match_op *.
4331         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4332         with a single gimple_match_op *.  Update calls to mprts_hook,
4333         build_call_internal and gimple_simplified_result_is_gimple_val.
4334         Factor out code that is common to the tree_code and combined_fn cases.
4335         * genmatch.c (expr::gen_transform): Replace tem_code and
4336         tem_ops with a gimple_match_op called tem_op.  Update calls
4337         to the gimple_resimplify functions and maybe_push_res_to_seq.
4338         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4339         res_ops.  Update call to the gimple_resimplify functions.
4340         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4341         (decision_tree::gen): Make the functions take a gimple_match_op *
4342         called res_op instead of separate res_code and res_ops parameters.
4343         Update call accordingly.
4344         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4345         and ops with a single res_op parameter.  Update calls to
4346         maybe_build_generic_op and maybe_push_res_to_seq.
4347         (fold_stmt_1): Update calls to gimple_simplify and
4348         replace_stmt_with_simplification.
4349         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4350         and gimple_simplified_result_is_gimple_val.
4351         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4352         gimple_simplify.
4353         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4354         with a gimple_match_op *.
4355         (vn_nary_build_or_lookup): Likewise.  Update call to
4356         vn_nary_build_or_lookup_1.
4357         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4358         gimple_match_op *.  Update calls to the gimple_resimplify routines
4359         and to gimple_simplified_result_is_gimple_val.
4360         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4361         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4362         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4363         (visit_nary_op): Likewise.
4364         (visit_reference_op_load): Likewise.
4366 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4368         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4369         modifier for printing the step amount.
4371 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
4373         PR target/78849
4374         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4375         types.
4377 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
4379         * doc/sourcebuild.texi (Endianness): New subsubsection.
4381 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4383         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4384         <prefetch_dynamic_strides>: New const bool field.
4385         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4386         prefetch_dynamic_strides.
4387         (exynosm1_prefetch_tune): Likewise.
4388         (thunderxt88_prefetch_tune): Likewise.
4389         (thunderx_prefetch_tune): Likewise.
4390         (thunderx2t99_prefetch_tune): Likewise.
4391         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4392         false.
4393         (aarch64_override_options_internal): Update to set
4394         PARAM_PREFETCH_DYNAMIC_STRIDES.
4395         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4396         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4397         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4398         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4399         prefetch-dynamic-strides setting.
4401 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4403         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4404         <minimum_stride>: New const int field.
4405         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4406         minimum_stride field defaulting to -1.
4407         (exynosm1_prefetch_tune): Likewise.
4408         (thunderxt88_prefetch_tune): Likewise.
4409         (thunderx_prefetch_tune): Likewise.
4410         (thunderx2t99_prefetch_tune): Likewise.
4411         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4412         <default_opt_level>: Set to 3.
4413         (aarch64_override_options_internal): Update to set
4414         PARAM_PREFETCH_MINIMUM_STRIDE.
4415         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4416         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4417         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4418         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4419         stride is constant and is below the minimum stride threshold.
4421 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4423         * config/arm/arm-cpus.in (mode26): Delete.
4424         (armv4): Delete mode26 reference.
4425         * config/arm/arm.c (arm_configure_build_target): Delete use of
4426         isa_bit_mode26.
4428 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4430         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4431         New insn pattern.
4432         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4433         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
4434         for non-SSE modes.
4435         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
4436         (floatunsdidf2): Ditto.
4438 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4440         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4441         (fixuns_trunc<mode>si2_avx512f): Ditto.
4442         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4443         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4444         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4446 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4448         PR rtl-optimization/79985
4449         * df-scan.c (df_insn_refs_collect): Remove special case for
4450         global registers and asm statements.
4452 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4454         * extend.texi (Global Register Variables): Rewrite the bullet list.
4455         Note that the register is available for allocation. Note that access
4456         via inline asm must use constraints. Add note about async-signal
4457         handlers. Remove paragraph about automagic register selection.
4459 2018-05-23  Richard Biener  <rguenther@suse.de>
4461         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4462         of fixed offset from memset VN.
4464 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
4466         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4467         first_interp field.
4468         (alloc_cand_and_find_basis): Initialize first_interp field.
4469         (slsr_process_mul): Modify first_interp field.
4470         (slsr_process_add): Likewise.
4471         (slsr_process_cast): Modify first_interp field for each new
4472         interpretation.
4473         (slsr_process_copy): Likewise.
4474         (dump_candidate): Dump first_interp field.
4475         (replace_mult_candidate): Process all interpretations, not just
4476         subsequent ones.
4477         (replace_rhs_if_not_dup): Likewise.
4478         (replace_one_candidate): Likewise.
4480 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
4482         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4483         Add new boolean.
4484         (aarch64_needs_frame_chain): New function.
4485         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4487 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
4489         PR target/84882
4490         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4491         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4492         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4493         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4494         as true for strict-align.
4495         (aarch64_can_inline_p): Perform checks even when callee has no
4496         attributes to check for strict alignment.
4497         * doc/extend.texi (AArch64 Function Attributes): Document
4498         no-strict-align.
4499         * doc/invoke.texi: (AArch64 Options): Likewise.
4501 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
4503         PR tree-optimization/85853
4504         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4505         the handling of the root of the node to...
4506         (vect_slp_analyze_node_operations_1): ...this new function,
4507         and run the whole thing with the child nodes' def types
4508         set according to their SLP node's def type.
4510 2018-05-23  Richard Biener  <rguenther@suse.de>
4512         PR middle-end/85874
4513         * tree-data-ref.c (create_runtime_alias_checks): Defer
4514         and ignore overflow warnings.
4516 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
4518         PR tree-optimization/85822
4519         * tree-vrp.c (is_masked_range_test): Fix handling of negative
4520         constants.
4522 2018-05-23  Richard Biener  <rguenther@suse.de>
4524         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4525         memset constants via native_interpret_expr.
4527 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
4529         PR target/85345
4530         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4531         attribute.
4532         (cgraph_node::create_alias): Likewise.
4533         (cgraph_node::get_availability): Check ifunc_resolver instead
4534         of looking up ifunc attribute.
4535         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4536         * varasm.c (do_assemble_alias): Likewise.
4537         (assemble_alias): Likewise.
4538         (default_binds_local_p_3): Likewise.
4539         * cgraph.h (cgraph_node): Add ifunc_resolver.
4540         (cgraph_node::only_called_directly_or_aliased_p): Return false
4541         for IFUNC resolver.
4542         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4543         attribute.
4544         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4545         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4546         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4547         instead of looking up ifunc attribute.
4549 2018-05-22  Luis Machado  <luis.machado@linaro.org>
4551         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4553 2018-05-22  Martin Sebor  <msebor@redhat.com>
4555         PR middle-end/85359
4556         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4557         only when expasion succeeds.
4558         (expand_builtin_strcmp): Same.
4559         (expand_builtin_strncmp): Same.
4561 2018-05-22  Martin Sebor  <msebor@redhat.com>
4563         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4565 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4566             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4568         * config/aarch64/aarch64-ldpstp.md: Replace uses of
4569         aarch64_mem_pair_operand with memory_operand and delete operand swapping
4570         code.
4571         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4572         Add check for legitimate_address.
4573         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4574         (aarch64_swap_ldrstr_operands): New.
4575         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4576         Define prototype.
4578 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4579             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4581         * config/aarch64/aarch64.md: New patterns to generate stp
4582         and ldp.
4583         (store_pair_sw, store_pair_dw): New patterns to generate stp for
4584         single words and double words.
4585         (load_pair_sw, load_pair_dw): Likewise.
4586         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4587         Delete.
4588         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4589         Delete.
4590         * config/aarch64/aarch64-ldpstp.md: Modify peephole
4591         for different mode ldpstp and add peephole for merged zero stores.
4592         Likewise for loads.
4593         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4594         Add size check.
4595         (aarch64_gen_store_pair): Rename calls to match new patterns.
4596         (aarch64_gen_load_pair): Rename calls to match new patterns.
4597         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4598         (load_pair<DREG:mode><DREG2:mode>): ... This.
4599         (store_pair<mode>): Rename to...
4600         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4601         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4602         New mode iterators.
4603         (V_INT_EQUIV): Handle SImode.
4604         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4605         New predicate.
4607 2018-05-22  Martin Sebor  <msebor@redhat.com>
4609         PR c/85623
4610         * calls.c (maybe_warn_nonstring_arg): Use string length to set
4611         or ajust the presumed bound on an operation to avoid unnecessary
4612         warnings.
4614 2018-05-22  Martin Sebor  <msebor@redhat.com>
4616         PR tree-optimization/85826
4617         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4618         assuming that a DECL necesarily has a constant size.
4620 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4622         PR middle-end/85862
4623         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4625 2018-05-22  Richard Biener  <rguenther@suse.de>
4627         PR tree-optimization/85834
4628         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4629         non-constant and non-zero memset arguments.
4631 2018-05-22  Martin Liska  <mliska@suse.cz>
4633         PR ipa/85607
4634         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4636 2018-05-22  Richard Biener  <rguenther@suse.de>
4638         PR tree-optimization/85863
4639         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4640         comparisons when vectype is specified.
4641         (vectorizable_condition): Do not specify vectype for
4642         vect_is_simple_cond when SLP vectorizing.
4644 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4646         PR target/85657
4647         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4648         define __ibm128 as long double.
4649         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4650         as a distinct type when IEEE 128-bit support is enabled.
4651         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4652         128-bit types to use the correct functions.
4653         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4654         convert between 128-bit floating point types that have different
4655         modes but the same representation, instead of using gen_lowpart to
4656         makean alias.
4657         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4658         KFmode.
4659         (IFKF_reg): New attributes to give the register constraints for
4660         IFmode and KFmode.
4661         (extend<mode>tf2_internal): New insns to mark an explicit
4662         conversion between 128-bit floating point types that have a
4663         different mode but share the same representation.
4665 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4667         PR tree-optimization/85814
4668         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4669         a null return from get_strinfo when unsharing the next
4670         strinfo in the chain.
4672 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4674         PR gcc/84923
4675         * varasm.c (weak_finish): Clean up weak_decls.
4677 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4679         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4680         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4681         UNSPEC_UADALP values.
4682         * config/aarch64/iterators.md (ABAL): New int iterator.
4683         (ABDL2): Likewise.
4684         (ADALP): Likewise.
4685         (sur): Add mappings for the above.
4686         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4687         New define_insn.
4688         (aarch64_<sur>abal<mode>_4): Likewise.
4689         (aarch64_<sur>adalp<mode>_3): Likewise.
4690         (<sur>sadv16qi): New define_expand.
4692 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4694         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4695         (*movdf_internal): Ditto.
4696         (*rcpsf2_sse): Ditto.
4697         (*rsqrtsf2_sse): Ditto.
4698         (*sqrt<mode>2_sse): Ditto.
4700 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4702         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4703         eor3q<mode>4.
4704         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4705         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4706         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4707         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4708         vbcaxq_s64): New.
4709         * config/aarch64/arm_neon.h: Likewise.
4710         * config/aarch64/iterators.md (VQ_I): New.
4712 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4714         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4715         arc*-*-linux*.
4716         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4717         MULTILIB_DIRNAMES
4719 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4721         * config/nds32/constraints.md (S): New constraint.
4722         * config/nds32/nds32.md (call_internal): Use constraint S.
4723         (call_value_internal): Likewise.
4724         (sibcall_internal): Likewise.
4725         (sibcall_value_internal): Likewise.
4727 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4728             Chung-Ju Wu  <jasonwucj@gmail.com>
4730         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4731         into consideration.
4733 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4734             Chung-Ju Wu  <jasonwucj@gmail.com>
4736         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4737         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4738         (nds32_rtx_costs_impl): Simplify.
4739         (nds32_address_cost_impl): Simplify.
4740         (nds32_init_rtx_costs): New function.
4741         (nds32_rtx_costs_speed_prefer): Likewise.
4742         (nds32_rtx_costs_size_prefer): Likewise.
4743         (nds32_address_cost_speed_prefer): Likewise.
4744         (nds32_address_cost_speed_fwprop): Likewise.
4745         (nds32_address_cost_size_prefer): Likewise.
4746         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4747         * config/nds32/nds32.c (nds32_option_override): Use
4748         nds32_init_rtx_costs function.
4750 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4752         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4753         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4754         (TARGET_PIPELINE_N8): Likewise.
4755         (TARGET_PIPELINE_N10): Likewise.
4756         (TARGET_PIPELINE_N13): Likewise.
4757         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4759 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4761         * config/nds32/nds32-fpu.md: Update copyright year.
4763 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4765         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4767 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4769         * config/nds32/nds32.c
4770         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4771         * config/nds32/nds32.opt (minline-asm-r15): New option.
4773 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4775         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4776         MASK_HW_ABS.
4777         * config/nds32/nds32.md (abssi2): New pattern.
4779 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4781         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4782         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4783         Merge insn pattern from sse_cvtsi2ss<round_name> and
4784         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4785         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4786         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4787         using SWI48 mode iterator.
4788         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4789         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4790         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4791         pattern from sse_cvttss2si<round_saeonly_name>
4792         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4793         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4794         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4795         using SWI48 mode iterator.
4796         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4797         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4798         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4799         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4800         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4801         using SWI48 mode iterator.
4802         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4803         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4804         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4805         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4806         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4807         SWI48 mode iterator.
4808         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4809         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4810         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4811         pattern from sse_cvttsd2si<round_saeonly_name>
4812         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4814 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4816         * config/nds32/nds32-md-auxiliary.c
4817         (nds32_valid_smw_lwm_base_p): Refine.
4818         (nds32_output_smw_single_word): Refine.
4819         (nds32_output_smw_double_word): New.
4820         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4822 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4824         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4825         (nds32_output_stack_pop): Refine.
4826         (nds32_expand_unaligned_load): Refine.
4827         (nds32_expand_unaligned_store): Refine.
4829 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4830             Chung-Ju Wu  <jasonwucj@gmail.com>
4832         * config/nds32/constants.md: Add TP_REGNUM constant.
4833         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4834         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4835         UNSPEC_ADD32.
4836         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4837         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4838         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4839         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4840         and PIC code generation.
4841         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4842         code generation.
4843         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4844         optimization.
4845         * config/nds32/nds32.md: Support TLS and PIC.
4846         * config/nds32/nds32.c: Support TLS and PIC.
4847         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4848         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4849         predicate.
4851 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4853         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4854         mode with E_ prefix.
4856 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4857             Chung-Ju Wu  <jasonwucj@gmail.com>
4859         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4860         * config/nds32/nds32-md-auxiliary.c
4861         (symbolic_reference_mentioned_p): New.
4862         (nds32_legitimize_ict_address): New.
4863         (nds32_expand_ict_move): New.
4864         (nds32_indirect_call_referenced_p): New.
4865         (nds32_symbol_binds_local_p): Delete.
4866         (nds32_long_call_p): Modify.
4867         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4868         * config/nds32/nds32-protos.h
4869         (symbolic_reference_mentioned_p): Declare.
4870         (nds32_legitimize_ict_address): Declare.
4871         (nds32_expand_ict_move): Declare.
4872         (nds32_indirect_call_referenced_p): Declare.
4873         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4874         (nds32_relax_group): Use nds32_ict_const_p as condition.
4875         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4876         (nds32_asm_file_start): Output ict_model directive in asm code.
4877         (nds32_legitimate_address_p): Consider indirect call.
4878         (nds32_print_operand): Consider indirect call.
4879         (nds32_print_operand_address): Consider indirect call.
4880         (nds32_insert_attributes): Handle "indirect_call" attribute.
4881         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4882         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4883         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4884         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4885         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4886         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4887         (TARGET_ICT_MODEL_SMALL): Define.
4888         (TARGET_ICT_MODEL_LARGE): Define.
4889         * config/nds32/nds32.md (movsi): Consider ict model.
4890         (call, call_value): Consider ict model.
4891         (sibcall, sibcall_value): Consider ict model.
4892         * config/nds32/nds32.opt (mict-model): New option.
4893         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4894         model.
4896 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4897             Monk Chiang  <sh.chiang04@gmail.com>
4898             Jim Wilson <jimw@sifive.com>
4900         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4901         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4902         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4903         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4904         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4905         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4906         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4907         compute save_libcall_adjustment properly.
4908         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4909         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4910         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4911         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4912         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4913         (ABI_SPEC): Handle mabi=ilp32e.
4914         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4915         (RVE): Add RVE mask.
4916         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4917         <-march>: Add rv32e as an example.
4919 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4921         PR c++/82899
4922         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4923         (intra_create_variable_infos): Handle C++ constructors.
4925 2018-05-18  Martin Liska  <mliska@suse.cz>
4927         * passes.def: Remove a redundant pass.
4929 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4931         PR bootstrap/85838
4932         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4934 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4936         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4937         (ARMv4): Update.
4938         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4939         (ARMv6m): Update.
4940         (armv2, armv2a, armv3, armv3m): Delete architectures.
4941         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4942         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4943         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4944         Delete cpus.
4945         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4946         (*mulsidi3adddi): Likewise.
4947         (mulsidi3): Likewise.
4948         (*mulsidi3_nov6): Likewise.
4949         (umulsidi3): Likewise.
4950         (umulsidi3_nov6): Likewise.
4951         (umaddsidi4): Likewise.
4952         (*umulsidi3adddi): Likewise.
4953         (smulsi3_highpart): Likewise.
4954         (*smulsi3_highpart_nov6): Likewise.
4955         (umulsi3_highpart): Likewise.
4956         (*umulsi3_highpart_nov6): Likewise.
4957         * config/arm/arm.h (arm_arch3m): Delete.
4958         * config/arm/arm.c (arm_arch3m): Delete.
4959         (arm_option_override_internal): Update armv3-related comment.
4960         (arm_configure_build_target): Delete use of isa_bit_mode32.
4961         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4962         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4963         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4964         (mulsa3): Likewise.
4965         (mulusa3): Likewise.
4966         * config/arm/arm-protos.h (arm_arch3m): Delete.
4967         * config/arm/arm-tables.opt: Regenerate.
4968         * config/arm/arm-tune.md: Likewise.
4969         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4970         deleted architectures.
4972 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4974         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4975         (armv5t, armv5te): New features.
4976         (ARMv5, ARMv5e): Delete fgroups.
4977         (ARMv5t, ARMv5te): Adjust for above changes.
4978         (ARMv6m): Likewise.
4979         (armv5, armv5e): Delete arches.
4980         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4981         arm_arch5.
4982         (*call_reg_arm): Likewise.
4983         (*call_value_reg_armv5): Likewise.
4984         (*call_value_reg_arm): Likewise.
4985         (*call_symbol): Likewise.
4986         (*call_value_symbol): Likewise.
4987         (*sibcall_insn): Likewise.
4988         (*sibcall_value_insn): Likewise.
4989         (clzsi2): Likewise.
4990         (prefetch): Likewise.
4991         (define_split and define_peephole2 dependent on arm_arch5):
4992         Likewise.
4993         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4994         arm_arch5e.
4995         (TARGET_ARM_QBIT): Likewise.
4996         (TARGET_DSP_MULTIPLY): Likewise.
4997         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4998         (arm_arch5, arm_arch5e): Delete.
4999         (arm_arch5t, arm_arch5te): Declare.
5000         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5001         (arm_arch5t): Declare.
5002         (arm_option_reconfigure_globals): Update for the above.
5003         (arm_options_perform_arch_sanity_checks): Update comment, replace
5004         use of arm_arch5 with arm_arch5t.
5005         (use_return_insn): Likewise.
5006         (arm_emit_call_insn): Likewise.
5007         (output_return_instruction): Likewise.
5008         (arm_final_prescan_insn): Likewise.
5009         (arm_coproc_builtin_available): Likewise.
5010         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5011         arm_arch5e with arm_arch5t and arm_arch5te.
5012         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
5013         (arm_arch5t, arm_arch5te): Declare.
5014         * config/arm/arm-tables.opt: Regenerate.
5015         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
5016         * config/arm/t-multilib: Likewise.
5017         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
5018         instead of arm_arch5.
5019         (*call_reg_thumb1): Likewise.
5020         (*call_value_reg_thumb1_v5): Likewise.
5021         (*call_value_reg_thumb1): Likewise.
5022         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
5023         unreachable path.
5024         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
5026 2018-05-18  Martin Liska  <mliska@suse.cz>
5028         PR gcov-profile/84846
5029         * doc/gcov.texi: Document -t option of gcov tool.
5031 2018-05-18  Martin Liska  <mliska@suse.cz>
5033         PR gcov-profile/84846
5034         * gcov.c (print_usage): Add new -t option.
5035         (process_args): Handle the option.
5036         (generate_results): Use stdout as output when requested by
5037         the option.
5039 2018-05-18  Martin Liska  <mliska@suse.cz>
5041         PR gcov-profile/84846
5042         * coverage.c (coverage_init): Write PWD to .gcno file.
5043         * doc/gcov.texi: Document how working directory is printed.
5044         * gcov-dump.c (dump_gcov_file): Print PWD.
5045         * gcov.c (output_intermediate_file): Likewise.
5046         (read_graph_file): Read PWD string.
5047         (output_lines): Print PWD.
5049 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5051         PR middle-end/85817
5052         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
5053         for retval and return false if all args to phi are zero.
5055 2018-05-18  Richard Biener  <rguenther@suse.de>
5057         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
5058         method.
5059         (evrp_dom_walker::before_dom_children): Call it.
5061 2018-05-18  Richard Biener  <rguenther@suse.de>
5063         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
5064         results when processing array refs with variable index.
5066 2018-05-18  Toon Moene  <toon@moene.org>
5068         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
5069         directly after that of -floop-interchange. Indicate that both
5070         options are enabled by default when specifying -O3.
5072 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5074         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
5075         iterator.  Delete separate integer-mode vec_set<mode> expander.
5076         (aarch64_simd_vec_setv2di): Delete.
5077         (vec_setv2di): Delete.
5078         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
5079         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
5080         the "w, r" alternative.
5082 2018-05-18  Martin Liska  <mliska@suse.cz>
5084         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
5085         * tree-pass.h (make_pass_lower_switch_O0): New function.
5086         * tree-switch-conversion.c (node_has_low_bound): Remove.
5087         (node_has_high_bound): Likewise.
5088         (node_is_bounded): Likewise.
5089         (class pass_lower_switch): Make it a template type and create
5090         two instances.
5091         (pass_lower_switch::execute): Add template argument.
5092         (make_pass_lower_switch): New function.
5093         (make_pass_lower_switch_O0): New function.
5094         (do_jump_if_equal): Remove.
5095         (emit_case_nodes): Simplify to just handle all 3 cases and leave
5096         all the hard work to tree optimization passes.
5098 2018-05-18  Martin Liska  <mliska@suse.cz>
5100         * dbgcnt.c (limit_low): Renamed from limit.
5101         (limit_high): New variable.
5102         (dbg_cnt_is_enabled): Check for upper limit.
5103         (dbg_cnt): Adjust dumping.
5104         (dbg_cnt_set_limit_by_index): Add new argument for high
5105         value.
5106         (dbg_cnt_set_limit_by_name): Likewise.
5107         (dbg_cnt_process_single_pair): Parse new format.
5108         (dbg_cnt_process_opt): Use strtok.
5109         (dbg_cnt_list_all_counters): Remove 'value' and add
5110         'limit_high'.
5111         * doc/invoke.texi: Document changes.
5113 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
5115         * doc/sourcebuild.texi (scalar_all_fma): Document.
5116         * tree.def (FMA_EXPR): Delete.
5117         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5118         * internal-fn.c (ternary_direct): New macro.
5119         (expand_ternary_optab_fn): Likewise.
5120         (direct_ternary_optab_supported_p): Likewise.
5121         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5122         * builtins.c (fold_builtin_fma): Delete.
5123         (fold_builtin_3): Don't call it.
5124         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5125         * expr.c (expand_expr_real_2): Likewise.
5126         * fold-const.c (operand_equal_p): Likewise.
5127         (fold_ternary_loc): Likewise.
5128         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5129         * gimple.c (DEFTREECODE): Likewise.
5130         * gimplify.c (gimplify_expr): Likewise.
5131         * optabs-tree.c (optab_for_tree_code): Likewise.
5132         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5133         * tree-eh.c (operation_could_trap_p): Likewise.
5134         (stmt_could_throw_1_p): Likewise.
5135         * tree-inline.c (estimate_operator_cost): Likewise.
5136         * tree-pretty-print.c (dump_generic_node): Likewise.
5137         (op_code_prio): Likewise.
5138         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5139         * tree-ssa-operands.c (get_expr_operands): Likewise.
5140         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5141         * fold-const-call.h (fold_fma): Delete.
5142         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5143         CFN_FNMA and CFN_FNMS.
5144         (fold_fma): Delete.
5145         * genmatch.c (combined_fn): New enum.
5146         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5147         (commutative_op): New function.
5148         (commutate): Use it.  Handle more than 2 operands.
5149         (dt_operand::gen_gimple_expr): Use commutative_op.
5150         (parser::parse_expr): Allow :c to be used with non-binary
5151         operators if the commutative operand is known.
5152         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5153         CFN_FMS, CFN_FNMA and CFN_FNMS.
5154         (backprop::process_assign_use): Remove FMA_EXPR handling.
5155         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5156         (gen_hsa_fma): New function.
5157         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5158         IFN_FNMA and IFN_FNMS.
5159         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5160         * gimple-fold.h (follow_all_ssa_edges): Declare.
5161         * gimple-fold.c (follow_all_ssa_edges): New function.
5162         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5163         gimple_build interface and use follow_all_ssa_edges to fold the result.
5164         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5165         instead of checking for optabs directly.
5166         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5167         rather than FMA_EXPRs.
5168         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5169         call to IFN_FMA instead of an FMA_EXPR.
5171 2018-05-17  Jim Wilson  <jimw@sifive.com>
5173         * expr.c (do_tablejump): When converting index to Pmode, if we have a
5174         sign extended promoted subreg, and the range does not have the sign bit
5175         set, then do a sign extend.
5177         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5178         test, check for sign extended subreg and/or constant operands, and
5179         do a sign extend in that case.
5181 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
5183         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5184         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5185         Add untyped.
5186         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5187         Change logics_shift_reg to logics_shift_imm.
5188         (thunderx2t99_fp_loadpair_basic): Delete.
5189         (thunderx2t99_fp_storepair_basic): Delete.
5190         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5191         (thunderx2t99_asimd_polynomial): Delete.
5192         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5193         and neon_fp_mul_d_scalar_q.
5194         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5195         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5196         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5197         (thunderx2t99_asimd_lut): Add missing tbl types.
5198         (thunderx2t99_asimd_ext): Delete.
5199         (thunderx2t99_asimd_load1_1_mult): Delete.
5200         (thunderx2t99_asimd_load1_2_mult): Delete.
5201         (thunderx2t99_asimd_load1_ldp): New.
5202         (thunderx2t99_asimd_load1): New.
5203         (thunderx2t99_asimd_load2): Add missing *load2* types.
5204         (thunderx2t99_asimd_load3): New.
5205         (thunderx2t99_asimd_load4): New.
5206         (thunderx2t99_asimd_store1_1_mult): Delete.
5207         (thunderx2t99_asimd_store1_2_mult): Delete.
5208         (thunderx2t99_asimd_store2_mult): Delete.
5209         (thunderx2t99_asimd_store2_onelane): Delete.
5210         (thunderx2t99_asimd_store_stp): New.
5211         (thunderx2t99_asimd_store1): New.
5212         (thunderx2t99_asimd_store2): New.
5213         (thunderx2t99_asimd_store3): New.
5214         (thunderx2t99_asimd_store4): New.
5216 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
5218         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5219         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
5221 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
5222             Segher Boessenkool  <segher@kernel.crashing.org>
5224         PR target/85698
5225         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5226         operand.
5228 2018-05-17  Richard Biener  <rguenther@suse.de>
5230         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5231         for pruning loop and prune defs feeding only already visited PHIs.
5233 2018-05-17  Richard Biener  <rguenther@suse.de>
5235         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5237 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
5238             Richard Biener  <rguenther@suse.de>
5240         PR tree-optimization/85793
5241         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5242         for VMAT_ELEMENTWISE.
5244 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5246         * internal-fn.h (lookup_internal_fn): Declare
5247         * internal-fn.c (lookup_internal_fn): New function.
5248         * gimple.c (gimple_build_call_from_tree): Handle calls to
5249         internal functions.
5250         * gimple-pretty-print.c (dump_gimple_call): Print "." before
5251         internal function names.
5252         * tree-pretty-print.c (dump_generic_node): Likewise.
5253         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5255 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5257         * gimple-fold.h (gimple_build): Make the function forms take
5258         combined_fn rather than built_in_function.
5259         (gimple_simplify): Likewise.
5260         * gimple-match-head.c (gimple_simplify): Likewise.
5261         * gimple-fold.c (gimple_build): Likewise.
5262         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5263         rather than gimple_build_call_internal.
5264         (get_initial_defs_for_reduction): Likewise.
5265         (vect_create_epilog_for_reduction): Likewise.
5266         (vectorizable_live_operation): Likewise.
5268 2018-05-17  Martin Liska  <mliska@suse.cz>
5270         * gimple-ssa-sprintf.c (format_directive): Do not use
5271         space in between 'G_' and '('.
5273 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
5275         PR target/85323
5276         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5277         even if the mask is not all ones.
5279         PR target/85323
5280         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5281         vector.
5282         (ix86_gimple_fold_builtin): Likewise.
5284         PR target/85323
5285         * config/i386/i386.c: Include tree-vector-builder.h.
5286         (ix86_vector_shift_count): New function.
5287         (ix86_fold_builtin): Fold shift builtins by scalar count.
5288         (ix86_gimple_fold_builtin): Likewise.
5290         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5291         _mm512_setzero): New intrinsics.
5293 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
5294             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5296         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5297         code generation for cases where splatting a value is not useful.
5298         * simplify-rtx.c (simplify_ternary_operation): Simplify
5299         vec_merge across a vec_duplicate and a paradoxical subreg forming
5300         a vector mode to a vec_concat.
5302 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
5304         * config.gcc: Support "goldmont-plus".
5305         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5306         "goldmont-plus".
5307         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5308         PROCESSOR_GOLDMONT_PLUS.
5309         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5310         (processor_target_table): Add "goldmont-plus".
5311         (PTA_GOLDMONT_PLUS): Define.
5312         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5313         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5314         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5315         (fold_builtin_cpu): Add "goldmont-plus".
5316         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5317         (ix86_option_override_internal): Add "goldmont-plus".
5318         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5319         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5320         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5321         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5323 2018-05-17  Richard Biener  <rguenther@suse.de>
5325         PR tree-optimization/85757
5326         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5327         remove defs that only feed that PHI from further processing.
5329 2018-05-16  Jim Wilson  <jimw@sifive.com>
5331         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5332         asterisk to name.
5333         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5335 2018-05-16  Mark Wielaard  <mark@klomp.org>
5337         * dwarf2out.c (count_index_strings): New function.
5338         (output_indirect_strings): Call count_index_strings and generate
5339         header for dwarf_version >= 5.
5341 2018-05-16  Mark Wielaard  <mark@klomp.org>
5343         * dwarf2out.c (dwarf_FORM): New function.
5344         (set_indirect_string): Use dwarf_FORM.
5345         (reset_indirect_string): Likewise.
5346         (size_of_die): Likewise.
5347         (value_format): Likewise.
5348         (output_die): Likewise.
5349         (add_skeleton_AT_string): Likewise.
5350         (output_macinfo_op): Likewise.
5351         (index_string): Likewise.
5352         (output_index_string_offset): Likewise.
5353         (output_index_string): Likewise.
5354         (count_index_strings): Likewise.
5356 2018-05-16  Carl Love  <cel@us.ibm.com>
5358         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5359         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5361 2018-05-16  Martin Jambor  <mjambor@suse.cz>
5363         * ipa-prop.c (ipa_free_all_edge_args): Remove.
5364         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5366 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
5368         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5369         (fnma<mode>4): Likewise.
5370         (fms<mode>4): Likewise.
5371         (fnms<mode>4): Likewise.
5372         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5373         (aarch64_fnma<mode>4): Likewise.
5374         (aarch64_fms<mode>4): Likewise.
5375         (aarch64_fnms<mode>4): Likewise.
5376         (aarch64_fnmadd<mode>4): Likewise.
5378 2018-05-16  Jason Merrill  <jason@redhat.com>
5380         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
5382 2018-05-16  Richard Biener  <rguenther@suse.de>
5384         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5385         (dump_stmt_cost): Declare.
5386         (add_stmt_cost): Dump cost we add.
5387         (add_stmt_costs): New function.
5388         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5389         No longer exported.
5390         (vect_analyze_stmt): Adjust prototype.
5391         (vectorizable_condition): Likewise.
5392         (vectorizable_live_operation): Likewise.
5393         (vectorizable_reduction): Likewise.
5394         (vectorizable_induction): Likewise.
5395         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5396         cost vector to pass to vectorizable_ and record afterwards.
5397         (vect_model_reduction_cost): Take cost vector argument and adjust.
5398         (vect_model_induction_cost): Likewise.
5399         (vectorizable_reduction): Likewise.
5400         (vectorizable_induction): Likewise.
5401         (vectorizable_live_operation): Likewise.
5402         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5403         SLP_TREE_NUMBER_OF_VEC_STMTS.
5404         (vect_analyze_slp_cost_1): Remove.
5405         (vect_analyze_slp_cost): Likewise.
5406         (vect_slp_analyze_node_operations): Take visited args and
5407         a target cost vector.  Avoid processing already visited stmt sets.
5408         (vect_slp_analyze_operations): Use a local cost vector to gather
5409         costs and register those of non-discarded instances.
5410         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5411         (vect_schedule_slp_instance): Remove copying of
5412         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
5413         zero.
5414         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5415         adding cost.  Record cost entry location.
5416         (vect_prologue_cost_for_slp_op): Function to compute cost of
5417         a constant or invariant generated for SLP vect in the prologue,
5418         split out from vect_analyze_slp_cost_1.
5419         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
5420         (vect_model_promotion_demotion_cost): Likewise.
5421         (vect_model_store_cost): Likewise, make static.
5422         (vect_model_load_cost): Likewise.
5423         (vectorizable_bswap): Add cost vector arg and adjust.
5424         (vectorizable_call): Likewise.
5425         (vectorizable_simd_clone_call): Likewise.
5426         (vectorizable_conversion): Likewise.
5427         (vectorizable_assignment): Likewise.
5428         (vectorizable_shift): Likewise.
5429         (vectorizable_operation): Likewise.
5430         (vectorizable_store): Likewise.
5431         (vectorizable_load): Likewise.
5432         (vectorizable_condition): Likewise.
5433         (vectorizable_comparison): Likewise.
5434         (can_vectorize_live_stmts): Likewise.
5435         (vect_analyze_stmt): Likewise.
5436         (vect_transform_stmt): Adjust calls to vectorizable_*.
5437         * tree-vectorizer.c: Include gimple-pretty-print.h.
5438         (dump_stmt_cost): New function.
5440 2018-05-16  Richard Biener  <rguenther@suse.de>
5442         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5443         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5444         * tree-ssa-dse.c: Include tree-ssa-loop.h.
5445         (check_name): New callback.
5446         (dse_classify_store): Track cycles via a visited bitmap of PHI
5447         defs and simplify handling of in-loop and across loop dead stores
5448         and properly fail for loop-variant refs.  Handle byte-tracking with
5449         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5450         limiting the walk.
5452 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
5454         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5455         (vect_get_mask_type_for_stmt): Likewise.
5456         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5457         split out from...
5458         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
5459         to determine the statement's vector type and the vector type that
5460         should be used for calculating nunits.  Deal with cases in which
5461         the type has to be deferred.
5462         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5463         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5464         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5465         (vect_determine_vf_for_stmt): New functions, split out from...
5466         (vect_determine_vectorization_factor): ...here.
5467         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5468         (vect_get_mask_type_for_stmt): New functions, split out from
5469         vect_determine_vectorization_factor.
5471 2018-05-16  Richard Biener  <rguenther@suse.de>
5473         * tree-cfg.c (verify_gimple_assign_ternary): Properly
5474         verify the [VEC_]COND_EXPR embedded comparison.
5476 2018-05-15  Martin Sebor  <msebor@redhat.com>
5478         PR tree-optimization/85753
5479         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5480         RECORD_TYPE in addition to ARRAY_TYPE.
5482 2018-05-15  Martin Sebor  <msebor@redhat.com>
5484         PR middle-end/85643
5485         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5487 2018-05-15  Richard Biener  <rguenther@suse.de>
5489         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5490         add by_clobber_p one.  Change algorithm to collect all defs
5491         representing uses we need to walk and try reducing them to
5492         a single one before failing.
5493         (dse_dom_walker::dse_optimize_stmt): Adjust.
5495 2018-05-13  Mark Wielaard  <mark@klomp.org>
5497         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5498         (size_of_loc_descr): Likewise.
5499         (output_loc_operands): Likewise.
5500         (output_loc_operands_raw): Likewise.
5501         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5502         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5503         (hash_loc_operands): Likewise.
5504         (compare_loc_operands): Likewise.
5506 2018-05-14  Mark Wielaard  <mark@klomp.org>
5508         * dwarf2out.c (count_index_addrs): New function.
5509         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5511 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5513         PR tree-optimization/83648
5514         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5515         return value as malloc candidate.
5517 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5519         PR ipa/85734
5520         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5521         param as true in call to suggest_attribute.
5523 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
5525         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5526         -mreadonly-in-sdata.
5528 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5530         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5531         New pattern.
5532         (aarch64_crypto_aesd_fused): Likewise.
5534 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
5536         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5537         (movsi_aarch64): Likewise.
5538         (load_pairsi): Likewise.
5539         (load_pairdi): Likewise.
5540         (store_pairsi): Likewise.
5541         (store_pairdi): Likewise.
5542         (load_pairsf): Likewise.
5543         (load_pairdf): Likewise.
5544         (store_pairsf): Likewise.
5545         (store_pairdf): Likewise.
5546         (zero_extend): Likewise.
5547         (trunc): Swap alternatives.
5548         (fcvt_target): Add '?' to prefer w over r.
5550 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
5552         PR target/85756
5553         * config/i386/i386.md: Disallow non-commutative arithmetics in
5554         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5555         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
5556         in the peephole2 before it.
5558 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
5560         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5561         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5562         (ix86_handle_option): Handle -mcldemote.
5563         * config.gcc: New header.
5564         * config/i386/cldemoteintrin.h: New file.
5565         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5566         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5567         -mcldemote.
5568         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5569         OPTION_MASK_ISA_CLDEMOTE.
5570         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5571         (ix86_valid_target_attribute_inner_p): Ditto.
5572         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5573         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5574         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5575         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5576         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5577         (cldemote): New.
5578         * config/i386/i386.opt: Add -mcldemote.
5579         * config/i386/x86intrin.h: New header.
5580         * doc/invoke.texi: Add -mcldemote.
5582 2018-05-14  Richard Biener  <rguenther@suse.de>
5584         * doc/match-and-simplify.texi: Adjust :s documentation.
5586 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
5588         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5589         intended memcpy size.
5590         (REORDER_45): Likewise.
5592 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
5594         * sort.cc: New file.
5595         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5596         * vec.c (qsort_chk): Use gcc_qsort.
5597         * Makefile.in (OBJS-libcommon): Add sort.o.
5598         (build/sort.o): New target.  Use it...
5599         (BUILD_RTL): ... here, and...
5600         (build/gencfn-macros): ... here, and...
5601         (build/genmatch): ... here.
5603 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5604             Chung-Ju Wu  <jasonwucj@gmail.com>
5606         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5607         * config/nds32/nds32-graywolf.md: New file.
5608         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5609         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5610         pipeline.
5611         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5612         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5613         * config/nds32/nds32.md (pipeline_model): Add graywolf.
5614         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5615         * config/nds32/pipelines.md: Include n15 settings.
5617 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5618             Chung-Ju Wu  <jasonwucj@gmail.com>
5620         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5621         * config/nds32/nds32-n13.md: New file.
5622         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5623         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5624         pipeline.
5625         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5626         * config/nds32/nds32.md (pipeline_model): Add n13.
5627         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5628         * config/nds32/pipelines.md: Include n13 settings.
5630 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5631             Chung-Ju Wu  <jasonwucj@gmail.com>
5633         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5634         * config/nds32/nds32-n10.md: New file.
5635         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5636         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5637         pipeline.
5638         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5639         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5640         * config/nds32/nds32.md (pipeline_model): Add n10.
5641         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5642         * config/nds32/pipelines.md: Include n10 settings.
5644 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5645             Kito Cheng  <kito.cheng@gmail.com>
5646             Chung-Ju Wu  <jasonwucj@gmail.com>
5648         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5649         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5650         Add enum values for DSP extension instructions.
5651         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5652         New constraints.
5653         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5654         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5655         New code iterators.
5656         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5657         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5658         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5659         * config/nds32/nds32-intrinsic.md: Likewise.
5660         * config/nds32/nds32_intrinsic.h: Likewise.
5661         * config/nds32/nds32-md-auxiliary.c: Likewise.
5662         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5663         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5664         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5665         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5666         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5667         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5668         TYPE_DMAC in switch statement.
5669         * config/nds32/nds32.c: New checking and implementation for DSP
5670         extension instructions.
5671         * config/nds32/nds32.h: Likewise.
5672         * config/nds32/nds32.md: Likewise.
5673         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5674         * config/nds32/predicates.md: Implement new predicates for DSP
5675         extension.
5677 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5679         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5680         Reformat alternatives and attributes so it is easier to identify
5681         which constraints/attributes go with which instruction.
5682         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5683         (mov<mode>_softfloat32, FMOVE64): Likewise.
5684         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5685         (mov<mode>_softfloat64, FMOVE64): Likewise.
5687 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5689         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5690         subsection.
5691         (Basic PowerPC Built-in Functions): The new name of the
5692         subsection previously known as "PowerPC Built-in Functions".
5693         (Basic PowerPC Built-in Functions Available on all Configurations):
5694         New subsubsection.
5695         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5696         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5697         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5698         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5700 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5702         PR ipa/85655
5703         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5704         single const.
5706 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5708         PR target/85733
5709         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5711 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5713         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5714         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5715         (ix86_handle_option): Handle -mwaitpkg.
5716         * config.gcc: New header.
5717         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5718         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5719         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5720         function type.
5721         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5722         OPTION_MASK_ISA_WAITPKG.
5723         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5724         (ix86_option_override_internal): Add PTA_WAITPKG.
5725         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5726         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5727         IX86_BUILTIN_TPAUSE.
5728         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5729         __builtin_ia32_umwait and __builtin_ia32_tpause.
5730         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5731         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5732         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5733         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5734         UNSPECV_TPAUSE): New.
5735         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5736         * config/i386/i386.opt: Add -mwaitpkg.
5737         * config/i386/waitpkgintrin.h: New file.
5738         * config/i386/x86intrin.h: New header.
5739         * doc/invoke.texi: Add -mwaitpkg.
5741 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5743         PR target/85606
5744         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5745         equivalent.
5746         (cortex-m0): Use armv6s-m isa.
5747         (cortex-m0plus): Likewise.
5748         (cortex-m1): Likewise.
5749         (cortex-m0.small-multiply): Likewise.
5750         (cortex-m0plus.small-multiply): Likewise.
5751         (cortex-m1.small-multiply): Likewise.
5753 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5754             Jakub Jelinek  <jakub@redhat.com>
5756         PR tree-optimization/85692
5757         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5758         source permute as well.
5760 2018-05-11  Martin Liska  <mliska@suse.cz>
5762         PR sanitizer/85556
5763         * doc/extend.texi: Document LLVM style format for no_sanitize
5764         attribute.
5766 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5768         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5769         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5770         (mode_supports_vsx_dform_quad): Likewise.
5771         (mode_supports_vmx_dform): Move these functions to be next to the
5772         other mode_supports functions.
5773         (mode_supports_dq_form): Likewise.
5774         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5775         mode_supports_dq_form.
5776         (reg_offset_addressing_ok_p): Likewise.
5777         (offsettable_ok_by_alignment): Likewise.
5778         (rs6000_legitimate_offset_address_p): Likewise.
5779         (legitimate_lo_sum_address_p): Likewise.
5780         (rs6000_legitimize_address): Likewise.
5781         (rs6000_legitimize_reload_address): Likewise.
5782         (rs6000_secondary_reload_inner): Likewise.
5783         (rs6000_preferred_reload_class): Likewise.
5784         (rs6000_output_move_128bit): Likewise.
5786 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5788         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5789         Generate SImode target register for null target.
5790         <case IX86_BUILTIN_XGETBV>: Ditto.
5791         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5792         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5794 2018-05-10  Carl Love  <cel@us.ibm.com>
5796         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5797         dcbtt and dcbtstt if operands[2] is 0.
5799 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5801         PR target/85693
5802         * config/i386/sse.md (usadv64qi): New expander.
5804 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5806         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5807         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5808         -maltivec=be support.
5809         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5810         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5811         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5812         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5813         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5814         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5815         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5816         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5817         altivec_vsumsws): Adjust.
5818         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5819         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5820         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5821         support.
5822         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5823         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5824         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5825         (altivec_lve<VI_char>x): Delete expand.
5826         (*altivec_lve<VI_char>x_internal): Rename to...
5827         (altivec_lve<VI_char>x): ... this.
5828         (altivec_lvxl_<mode>): Delete expand.
5829         (*altivec_lvxl_<mode>_internal): Rename to ...
5830         (altivec_lvxl_<mode>): ... this.
5831         (altivec_stvxl_<mode>): Delete expand.
5832         (*altivec_stvxl_<mode>_internal): Rename to ...
5833         (altivec_stvxl_<mode>): ... this.
5834         (altivec_stve<VI_char>x): Delete expand.
5835         (*altivec_stve<VI_char>x_internal): Rename to ...
5836         (altivec_stve<VI_char>x): ... this.
5837         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5838         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5839         reduc_plus_scal_<mode>): Adjust.
5840         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5841         comment.
5842         (rs6000_cpu_cpp_builtins): Adjust.
5843         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5844         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5845         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5846         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5847         -maltivec=be support.
5848         (rs6000_split_vec_extract_var): Adjust.
5849         (rs6000_split_v4si_init): Adjust.
5850         (swap_selector_for_mode): Delete.
5851         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5852         altivec_expand_stvex_be): Delete.
5853         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5854         -maltivec=be support.
5855         (rs6000_gimple_fold_builtin): Ditto.
5856         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5857         Adjust.
5858         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5859         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5860         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5861         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5862         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5863         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5864         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5865         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5866         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5867         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5868         anonymous split): Adjust.
5869         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5870         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5872 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5874         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5875         when --with-gxx-include-dir is also specified.
5876         * configure: Regenerate.
5878 2018-05-09  Jim Wilson  <jimw@sifive.com>
5880         PR target/84797
5881         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5882         * config/riscv/t-withmultilib: New.
5883         * config/riscv/withmultilib.h: New.
5884         * doc/install.texi: Document RISC-V --with-multilib-list support.
5886 2018-05-09  Richard Biener  <rguenther@suse.de>
5888         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5889         vector.
5890         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5891         actual scalar cost using the cost vector and the add_stmt_cost
5892         machinery.
5894 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5896         PR rtl-optimization/85645
5897         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5898         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5900 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5902         PR rtl-optimization/85645
5903         * shrink-wrap.c (spread_components): Return a boolean saying if
5904         anything was changed.
5905         (try_shrink_wrapping_separate): Iterate spread_components until
5906         nothing changes anymore.
5908 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5910         PR rtl-optimization/85645
5911         * regrename.c (build_def_use): Also kill the chains that include the
5912         destination of a REG_CFA_REGISTER note.
5914 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5916         PR rtl-optimization/85645
5917         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5918         insn that has a REG_CFA_REGISTER note.
5920 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5922         * cfgexpand.c (expand_clobber): New function.
5923         (expand_gimple_stmt_1): Use it.
5924         * tree-vect-stmts.c (vect_clobber_variable): New function,
5925         split out from...
5926         (vectorizable_simd_clone_call): ...here.
5927         (vectorizable_store): Emit a clobber either side of an
5928         IFN_STORE_LANES sequence.
5929         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5931 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5933         PR target/85626
5934         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5935         (define_insn "trap_if_false"): Add exit after trap.
5937 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5939         PR rtl-optimization/85638
5940         * bb-reorder.c: Include common/common-target.h.
5941         (create_forwarder_block): New function extracted from...
5942         (fix_up_crossing_landing_pad): ...here.  Rename into...
5943         (dw2_fix_up_crossing_landing_pad): ...this.
5944         (sjlj_fix_up_crossing_landing_pad): New function.
5945         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5946         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5947         from both partitions and exit the loop after one iteration.
5949 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5951         Revert:
5952         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5953         subsection.
5954         (Basic PowerPC Built-in Functions): The new name of the
5955         subsection previously known as "PowerPC Built-in Functions".
5956         (Basic PowerPC Built-in Functions Available on all Configurations):
5957         New subsubsection.
5958         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5959         subsubsection.
5960         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5961         subsubsection.
5962         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5963         subsubsection.
5964         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5965         subsubsection.
5967 2018-05-08  Jim Wilson  <jimw@sifive.com>
5969         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5970         (LD_EMUL_SUFFIX): New.
5971         (LINK_SPEC): Use it.
5973 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5975         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5976         subsection.
5977         (Basic PowerPC Built-in Functions): The new name of the
5978         subsection previously known as "PowerPC Built-in Functions".
5979         (Basic PowerPC Built-in Functions Available on all Configurations):
5980         New subsubsection.
5981         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5982         subsubsection.
5983         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5984         subsubsection.
5985         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5986         subsubsection.
5987         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5988         subsubsection.
5990 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5992         PR target/85683
5993         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5994         after cmpelim optimization.
5996 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5998         * config.gcc: Support "goldmont".
5999         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6000         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6001         PROCESSOR_GOLDMONT.
6002         * config/i386/i386.c (m_GOLDMONT): Define.
6003         (processor_target_table): Add "goldmont".
6004         (PTA_GOLDMONT): Define.
6005         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6006         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6007         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6008         (fold_builtin_cpu): Add "goldmont".
6009         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6010         (ix86_option_override_internal): Add "goldmont".
6011         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
6012         (processor_type): Add PROCESSOR_GOLDMONT.
6013         * config/i386/i386.md: Add CPU "glm".
6014         * config/i386/glm.md: New file.
6015         * config/i386/x86-tune.def: Add m_GOLDMONT.
6016         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
6018 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
6020         PR target/85572
6021         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
6022         E_V4DImode.
6023         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
6024         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
6025         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
6027         PR target/85317
6028         * config/i386/i386.c (ix86_fold_builtin): Handle
6029         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
6031         PR target/85480
6032         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
6033         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
6035 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
6037         PR target/85658
6038         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
6039         (check_arch): Likewise.
6040         (check_fpu): Return the result rather than printing it.
6041         (end arch): Fix operator precedence.
6042         (end cpu): Likewise.
6043         (END): Print the result from check_fpu.
6045 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
6046             Alan Hayward  <alan.hayward@arm.com>
6047             David Sherwood  <david.sherwood@arm.com>
6049         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
6050         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
6051         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
6052         (*fcmuo<mode>_and): New patterns.
6054 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
6056         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
6057         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
6058         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
6059         (cmp_op, sve_imm_con): New code attributes.
6060         (SVE_COND_INT_CMP, imm_con): Delete.
6061         (cmp_op): Remove above unspecs from int attribute.
6062         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
6063         to...
6064         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
6065         comparison-specific unspecs.
6066         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
6067         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
6068         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
6069         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
6070         (*vec_fcm<cmp_op><mode>): Rename to...
6071         (*fcm<cmp_op><mode>): ...this and adjust likewise.
6072         (*vec_fcmuo<mode>): Rename to...
6073         (*fcmuo<mode>): ...this and adjust likewise.
6074         (*pred_fcm<cmp_op><mode>): New pattern.
6075         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
6076         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
6077         functions.
6078         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
6079         and UNORDERED.
6080         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
6081         (aarch64_emit_sve_predicated_cond): New function.
6082         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
6083         (aarch64_emit_unspec_cond_or): Replace with...
6084         (aarch64_emit_sve_or_conds): ...this new function.  Use
6085         aarch64_emit_sve_ptrue_op for the individual comparisons and
6086         aarch64_emit_binop to OR them together.
6087         (aarch64_emit_inverted_unspec_cond): Replace with...
6088         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
6089         aarch64_emit_sve_ptrue_op for the comparison and
6090         aarch64_emit_unop to invert the result.
6091         (aarch64_expand_sve_vec_cmp_float): Update after the above
6092         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
6094 2018-05-07  Nathan Sidwell  <nathan@acm.org>
6096         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6097         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6098         (Backwards Compatibility): Likewise.
6100 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6102         PR bootstrap/85681
6103         Revert:
6104         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6106         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6107         <prefetch_dynamic_strides>: New const bool field.
6108         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6109         prefetch_dynamic_strides.
6110         (exynosm1_prefetch_tune): Likewise.
6111         (thunderxt88_prefetch_tune): Likewise.
6112         (thunderx_prefetch_tune): Likewise.
6113         (thunderx2t99_prefetch_tune): Likewise.
6114         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6115         to false.
6116         (aarch64_override_options_internal): Update to set
6117         PARAM_PREFETCH_DYNAMIC_STRIDES.
6118         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6119         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6120         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6121         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6122         prefetch-dynamic-strides setting.
6124         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6126         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6127         <minimum_stride>: New const int field.
6128         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6129         minimum_stride field.
6130         (exynosm1_prefetch_tune): Likewise.
6131         (thunderxt88_prefetch_tune): Likewise.
6132         (thunderx_prefetch_tune): Likewise.
6133         (thunderx2t99_prefetch_tune): Likewise.
6134         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6135         (aarch64_override_options_internal): Update to set
6136         PARAM_PREFETCH_MINIMUM_STRIDE.
6137         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6138         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6139         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6140         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6141         stride is constant and is below the minimum stride threshold.
6143 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6145         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6146         to 512.
6148 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6150         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6151         <prefetch_dynamic_strides>: New const bool field.
6152         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6153         prefetch_dynamic_strides.
6154         (exynosm1_prefetch_tune): Likewise.
6155         (thunderxt88_prefetch_tune): Likewise.
6156         (thunderx_prefetch_tune): Likewise.
6157         (thunderx2t99_prefetch_tune): Likewise.
6158         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6159         to false.
6160         (aarch64_override_options_internal): Update to set
6161         PARAM_PREFETCH_DYNAMIC_STRIDES.
6162         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6163         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6164         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6165         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6166         prefetch-dynamic-strides setting.
6168 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6170         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6171         <minimum_stride>: New const int field.
6172         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6173         minimum_stride field.
6174         (exynosm1_prefetch_tune): Likewise.
6175         (thunderxt88_prefetch_tune): Likewise.
6176         (thunderx_prefetch_tune): Likewise.
6177         (thunderx2t99_prefetch_tune): Likewise.
6178         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6179         (aarch64_override_options_internal): Update to set
6180         PARAM_PREFETCH_MINIMUM_STRIDE.
6181         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6182         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6183         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6184         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6185         stride is constant and is below the minimum stride threshold.
6187 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
6189         PR c++/85659
6190         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6191         the type is addressable.  Don't force op into register if it has
6192         BLKmode.
6194 2018-05-05  Roland McGrath  <mcgrathr@google.com>
6196         PR other/77609
6197         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6198         any section for which we don't know a specific type it should have,
6199         regardless of name.  Previously this was done only for the exact
6200         names ".init_array", ".fini_array", and ".preinit_array".
6201         (default_elf_asm_named_section): Add comment about
6202         relationship with default_section_type_flags and SECTION_NOTYPE.
6203         (get_section): Don't consider it a type conflict if one side has
6204         SECTION_NOTYPE and the other doesn't, as long as neither has the
6205         SECTION_BSS et al used in the default_section_type_flags logic.
6207 2018-05-05  Tom de Vries  <tom@codesourcery.com>
6209         PR target/85653
6210         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6211         (workaround_barsyncs): New function.
6212         (nvptx_reorg): Use workaround_barsyncs.
6213         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6214         (define_expand "nvptx_membar_cta"): New define_expand.
6215         (define_insn "*nvptx_membar_cta"): New insn.
6217 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
6219         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6220         To improve optimization opportunities.
6221         * builtin-types.def: The new needed builtin types for the above.
6223 2018-05-04  Richard Biener  <rguenther@suse.de>
6225         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6226         * gimple-ssa-store-merging.c
6227         (imm_store_chain_info::output_merged_store): Remove redundant create,
6228         release split_store vector contents on failure.
6229         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6230         scalar stmt vector on cache hit.
6232 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
6234         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6235         Xilinx FP support.
6236         * config.gcc (powerpc-xilinx-eabi*): Remove.
6237         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6238         support.
6239         (fusion_addis_mem_combo_load): Ditto.
6240         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6241         FP support.
6242         (rs6000_cpu_cpp_builtins): Ditto.
6243         * config/rs6000/rs6000-linux.c
6244         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6245         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6246         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6247         support.
6248         (rs6000_setup_reg_addr_masks): Ditto.
6249         (rs6000_init_hard_regno_mode_ok): Ditto.
6250         (rs6000_option_override_internal): Ditto.
6251         (legitimate_lo_sum_address_p): Ditto.
6252         (rs6000_legitimize_address): Ditto.
6253         (rs6000_legitimize_reload_address): Ditto.
6254         (rs6000_legitimate_address_p): Ditto.
6255         (abi_v4_pass_in_fpr): Ditto.
6256         (setup_incoming_varargs): Ditto.
6257         (rs6000_gimplify_va_arg): Ditto.
6258         (rs6000_split_multireg_move): Ditto.
6259         (rs6000_savres_strategy): Ditto.
6260         (rs6000_emit_prologue_components): Ditto.
6261         (rs6000_emit_epilogue_components): Ditto.
6262         (rs6000_emit_prologue): Ditto.
6263         (rs6000_emit_epilogue): Ditto.
6264         (rs6000_elf_file_end): Ditto.
6265         (rs6000_function_value): Ditto.
6266         (rs6000_libcall_value): Ditto.
6267         * config/rs6000/rs6000.h: Ditto.
6268         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6269         (TARGET_MINMAX): ... this.  New.
6270         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6271         * config/rs6000/rs6000.md: Remove Xilinx FP support.
6272         (*movsi_internal1_single): Delete.
6273         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6274         mfpu=, mxilinx-fpu): Delete.
6275         * config/rs6000/singlefp.h: Delete.
6276         * config/rs6000/sysv4.h: Remove Xilinx FP support.
6277         * config/rs6000/t-rs6000: Ditto.
6278         * config/rs6000/t-xilinx: Delete.
6279         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6280         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6281         (VStype_simple): Delete.
6282         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6283         * config/rs6000/xfpu.h: Delete.
6284         * config/rs6000/xfpu.md: Delete.
6285         * config/rs6000/xilinx.h: Delete.
6286         * config/rs6000/xilinx.opt: Delete.
6287         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6288         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6290 2018-05-04  Tom de Vries  <tom@codesourcery.com>
6292         PR libgomp/85639
6293         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6294         if ignore == 0.
6296 2018-05-04  Richard Biener  <rguenther@suse.de>
6298         PR middle-end/85627
6299         * tree-complex.c (update_complex_assignment): We are always in SSA form.
6300         (expand_complex_div_wide): Likewise.
6301         (expand_complex_operations_1): Likewise.
6302         (expand_complex_libcall): Preserve EH info of the original stmt.
6303         (tree_lower_complex): Handle removed blocks.
6304         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6305         on complex multiplication and division libcall builtins.
6307 2018-05-04  Richard Biener  <rguenther@suse.de>
6309         PR middle-end/85574
6310         * fold-const.c (negate_expr_p): Restrict negation of operand
6311         zero of a division to when we know that can happen without
6312         overflow.
6313         (fold_negate_expr_1): Likewise.
6315 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
6317         PR libstdc++/85466
6318         * real.h (real_nextafter): Declare.
6319         * real.c (real_nextafter): New function.
6320         * fold-const-call.c (fold_const_nextafter): New function.
6321         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6322         CASE_CFN_NEXTTOWARD.
6323         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6324         even when arg1_mode is different from arg0_mode.
6326 2018-05-03  Nathan Sidwell  <nathan@acm.org>
6328         * doc/extend.texi (Deprecated Features): Remove
6329         -ffriend-injection.
6330         (Backwards Compatibility): Likewise.
6331         * doc/invoke.texi (C++ Language Options): Likewise.
6332         (C++ Dialect Options): Likewise.
6334 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
6336         PR target/85530
6337         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6338         _mm512_mask_mullox_epi64): New intrinsics.
6340 2018-05-03  Tom de Vries  <tom@codesourcery.com>
6342         PR testsuite/85106
6343         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6344         dump files): Add offload-tree.
6346 2018-05-03  Richard Biener  <rguenther@suse.de>
6348         PR tree-optimization/85615
6349         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6350         to loops not nested in BBs loop father to avoid creating multi-entry
6351         loops.
6353 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6355         PR tree-optimization/70291
6356         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6357         arguments.  Change return type to tree.  Emit libcall as a new
6358         statement rather than replacing existing one when inplace_p is true.
6359         (expand_complex_multiplication_components): New function.
6360         (expand_complex_multiplication): Expand floating-point complex
6361         multiplication using the above.
6362         (expand_complex_division): Rename inner_type parameter to type.
6363         Update expand_complex_libcall call-site.
6364         (expand_complex_operations_1): Update expand_complex_multiplication
6365         and expand_complex_division call-sites.
6367 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6369         PR target/85582
6370         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6371         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6372         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6373         the highest significant bit of the shift count mask is clear.  In
6374         check whether and[sq]i3 is needed verify that all significant bits
6375         of the shift count other than the highest are set.
6377 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6379         PR libgomp/82428
6380         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6381         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6382         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6383         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6384         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6385         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6386         __builtin_goacc_parlevel_size.
6388 2018-05-02  Richard Biener  <rguenther@suse.de>
6390         PR tree-optimization/85597
6391         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6392         do not use split vect_get_vec_defs call but call vect_get_slp_defs
6393         directly.
6395 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6397         PR testsuite/85106
6398         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6399         dump files): Add ltrans-tree.
6401 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6403         PR testsuite/85106
6404         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6405         dump files): Add wpa-ipa.
6407 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
6409         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
6410         powerpc*-*-linux*paired* target.
6411         * config/rs6000/750cl.h: Delete.
6412         * config/rs6000/paired.h: Delete.
6413         * config/rs6000/paired.md: Delete.
6414         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6415         float support.
6416         * config/rs6000/rs6000-builtin.def: Remove paired float support.
6417         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6418         comment.  Remove paired float support.
6419         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6420         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6421         VECTOR_PAIRED.
6422         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6423         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6424         declarations.
6425         * config/rs6000/rs6000.c: Remove paired float support.
6426         (paired_expand_vector_init, paired_expand_vector_move,
6427         paired_emit_vector_compare, paired_emit_vector_cond_expr,
6428         (paired_expand_lv_builtin, paired_expand_stv_builtin,
6429         paired_expand_builtin, paired_expand_predicate_builtin,
6430         paired_init_builtins): Delete.
6431         * config/rs6000/rs6000.h: Remove paired float support.
6432         * config/rs6000/rs6000.md: Remove paired float support.
6433         (move_from_CR_ov_bit): Delete.
6434         * config/rs6000/rs6000.opt (mpaired): Delete.
6435         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6436         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6438 2018-05-02  Richard Biener  <rguenther@suse.de>
6440         PR middle-end/85567
6441         * gimplify.c (gimplify_save_expr): When in SSA form allow
6442         SAVE_EXPRs to compute to SSA vars.
6444 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6446         PR target/85582
6447         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6448         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6449         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6450         clobber operands[2], instead use a new pseudo.  Formatting fixes.
6452 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
6454         PR tree-optimization/85586
6455         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6456         exit early for statements in the same group if the accesses are
6457         not strided.
6459 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6461         PR lto/85451
6462         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6463         error message.
6465 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
6467         PR tree-optimization/85143
6468         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6470 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6472         PR lto/85451
6473         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6474         not found" error message.
6476 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6478         PR other/83786
6479         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6480         * vec.c (test_ordered_remove_if): New function.
6481         (vec_c_tests): Call test_ordered_remove_if.
6482         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6483         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6484         * tree-vect-patterns.c (vect_pattern_recog_1): Use
6485         VEC_ORDERED_REMOVE_IF.
6487 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6489         PR tree-optimization/82665
6490         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6491         pointer subtraction where arguments come from a memchr call.
6493 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
6495         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6496         --push-state --as-needed and --pop-state instead of --as-needed and
6497         --no-as-needed if ld supports it.
6498         * configure: Regenerated.
6500         PR web/85578
6501         * doc/install.texi2html: Replace _002d with - and _002a with * in
6502         generated html files using sed.
6504 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6506         PR c++/85523
6507         * gcc-rich-location.c (blank_line_before_p): New function.
6508         (use_new_line): New function.
6509         (gcc_rich_location::add_fixit_insert_formatted): New function.
6510         * gcc-rich-location.h
6511         (gcc_rich_location::add_fixit_insert_formatted): New function.
6513 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6515         * selftest.c (assert_streq): Rename "expected" and "actual" to
6516         "val1" and "val2".  Extend NULL-handling to cover both inputs
6517         symmetrically, while still requiring both to be non-NULL for a pass.
6518         * selftest.h (assert_streq): Rename "expected" and "actual" to
6519         "val1" and "val2".
6520         (ASSERT_EQ): Likewise.
6521         (ASSERT_EQ_AT): Likewise.
6522         (ASSERT_KNOWN_EQ): Likewise.
6523         (ASSERT_KNOWN_EQ_AT): Likewise.
6524         (ASSERT_NE): Likewise.
6525         (ASSERT_MAYBE_NE): Likewise.
6526         (ASSERT_MAYBE_NE_AT): Likewise.
6527         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
6528         the assertion to pass.
6529         (ASSERT_STREQ_AT): Likewise.
6531 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6533         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6534         interaction with -pie.
6536 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6538         * selftest.h: Fix alphabetization of per-source-file selftest
6539         declarations.
6541 2018-04-30  Jason Merrill  <jason@redhat.com>
6543         PR c++/61982 - dead stores to destroyed objects.
6544         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6545         of clobber.
6547 2018-04-30  Jason Merrill  <jason@redhat.com>
6549         * tree.c (build_clobber): New.
6550         * tree.h: Declare it.
6551         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6553 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6555         * diagnostic-show-locus.c (layout::layout): Update for
6556         location_get_source_line returning a char_span.
6557         (struct char_span): Move to input.h.
6558         (struct correction): Update for fields in char_span becoming
6559         private.
6560         (struct source_line): Update for location_get_source_line
6561         returning a char_span.
6562         (layout::print_line): Likewise.
6563         * edit-context.c (edited_file::print_content): Likewise.
6564         (edited_file::print_diff_hunk): Likewise.
6565         (edited_file::print_run_of_changed_lines): Likewise.
6566         (edited_file::get_num_lines): Likewise.
6567         (edited_line::edited_line): Likewise.
6568         * final.c (asm_show_source): Likewise.
6569         * input.c (location_get_source_line): Convert return type
6570         from const char * to char_span, losing the final "line_len"
6571         param.
6572         (dump_location_info): Update for the above.
6573         (get_substring_ranges_for_loc): Likewise.  Use a char_span
6574         when handling the literal within the line.
6575         (test_reading_source_line): Update for location_get_source_line
6576         returning a char_span.
6577         * input.h (class char_span): Move here from
6578         diagnostic-show-locus.c, converting from a struct to a class.
6579         Make data members private.
6580         (char_span::operator bool): New.
6581         (char_span::length): New.
6582         (char_span::get_buffer): New.
6583         (char_span::operator[]): New.
6584         (char_span::subspan): Make const.
6585         (char_span::xstrdup): New.
6586         (location_get_source_line): Convert return type from const char *
6587         to char_span, losing the final "line_size" param.
6589 2018-04-30  Jan Hubicka  <jh@suse.cz>
6591         * lto-wrapper.c (ltrans_priorities): New static var.
6592         (cmp_priority): New.
6593         (run_gcc): Read priorities and if doing parallel build order
6594         the Makefile by them.
6596 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6598         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6600 2018-04-30  Richard Biener  <rguenther@suse.de>
6602         * tree-cfg.c (verify_address): Remove base argument, add
6603         flag whether to check TREE_ADDRESSABLE and do that.
6604         (verify_expr): Remove.
6605         (verify_types_in_gimple_reference): Add pieces from verify_expr.
6606         (verify_gimple_assign_single): Likewise.
6607         (verify_gimple_switch): Likewise.
6608         (verify_expr_location_1): Dereference tp once.  Add (disabled)
6609         piece from verify_expr.
6610         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6612 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6614         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6616 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6618         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6619         (small_data_pattern): Likewise.
6620         (arc_rewrite_small_data): Likewise.
6621         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6622         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6623         (get_symbol_alignment): New function.
6624         (legitimate_small_data_address_p): Likewise.
6625         (legitimate_scaled_address): Update, call
6626         legitimate_small_data_address_p.
6627         (output_sdata): New static variable.
6628         (arc_print_operand): Update how we handle small data operands.
6629         (arc_print_operand_address): Likewise.
6630         (arc_legitimate_address_p): Update, use
6631         legitimate_small_data_address_p.
6632         (arc_rewrite_small_data_p): Remove.
6633         (arc_rewrite_small_data_1): Likewise.
6634         (arc_rewrite_small_data): Likewise.
6635         (small_data_pattern): Likewise.
6636         (compact_sda_memory_operand): Update to use
6637         legitimate_small_data_address_p and get_symbol_alignment.
6638         (prepare_move_operands): Don't rewite sdata pattern.
6639         (prepare_extend_operands): Remove.
6640         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6641         pattern.
6642         (zero_extendqisi2): Likewise.
6643         (zero_extendhisi2): Likewise.
6644         (extendqihi2): Likewise.
6645         (extendqisi2): Likewise.
6646         (extendhisi2): Likewise.
6647         (addsi3): Likewise.
6648         (subsi3): Likewise.
6649         (andsi3): Likewise.
6650         * config/arc/constraints.md (Usd): Change it to memory constraint.
6652 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6654         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6655         as source of std instructions.
6656         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6657         allow 6-bit constants as source for store instructions.
6658         (movdi_insn): Update instruction pattern to allow 6-bit constants
6659         as source for store instructions.
6661 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6663         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6665 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6666             Sandra Loosemore <sandra@codesourcery.com>
6668         * dumpfile.c (dump_open): Allow '-' for stdout.
6669         * doc/invoke.texi (Developer Options): Document dump filename
6670         determination early.  Document stdin/stdout selection.
6672 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6674         Microblaze Target: PIC data text relative
6676         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6677         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6678         Add declaration.
6679         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6680         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6681         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6682         New addressing mode for data-text relative position indepenedent code.
6683         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6684         'ADDRESS_SYMBOLIC_TXT_REL'.
6685         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6686         (microblaze_legitimate_pic_operand): Exclude function calls from
6687         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6688         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6689         addresses cases.
6690         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6691         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6692         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6693         for 'address + offset'.
6694         (microblaze_expand_prologue): Add new function prologue call for
6695         'r20' assignation.
6696         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6697         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6698         table in case of TARGET_PIC_DATA_TEXT_REL.
6699         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6700         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6701         Add new macros 'UNSPEC_TEXT',
6702         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6703         + exclude function calls from 'UNSPEC_PLT' in case of data text
6704         relative mode.
6705         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6706         new target hook for generating address diff vector tables in case of
6707         flag_pic.
6708         * doc/tm.texi : Regenerate.
6709         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6710         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6711         of addr diff vector generation.
6712         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6713         target hook definition.
6714         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6715         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6716         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6717         option for data text relative.
6719 2018-04-30  Richard Biener  <rguenther@suse.de>
6721         * tree-chrec.h (evolution_function_is_constant_p): Remove
6722         redundant check.
6723         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6725 2018-04-30  Richard Biener  <rguenther@suse.de>
6727         PR bootstrap/85571
6728         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6730 2018-04-30  Richard Biener  <rguenther@suse.de>
6732         PR tree-optimization/28364
6733         PR tree-optimization/85275
6734         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6735         copying first exit test.
6737 2018-04-28  Mark Wielaard  <mark@klomp.org>
6739         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6740         dwarf_version >= 5.
6741         (dwarf_AT): Handle DW_AT_addr_base.
6742         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6744 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6746         PR target/84431
6747         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6748         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6749         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6750         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6752 2018-04-28  Richard Biener  <rguenther@suse.de>
6754         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6755         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6756         to reflect use.  Only add interesting stmts.
6758 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6760         PR ipa/85549
6761         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6762         the jump function allows for passing through aggregate values.
6764 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6766         * input.h (in_system_header_at): Convert from macro to inline
6767         function.
6768         (from_macro_expansion_at): Likewise.
6769         (from_macro_definition_at): Likewise.
6771 2018-04-27  Jeff Law  <law@redhat.com>
6773         * config.gcc: Mark tile* targets as deprecated/obsolete.
6775 2018-04-27  Richard Biener  <rguenther@suse.de>
6777         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6778         fix for ILP32.
6780 2018-04-27  Richard Biener  <rguenther@suse.de>
6782         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6784 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6786         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6787         with Yd constraint. Set "preferred_for_speed" attribute from
6788         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6789         with Yd constraint.
6790         (*movdi_internal): Ditto.
6791         (movti_interunit splitters): Remove
6792         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6793         (movdi_interunit splitters): Ditto.
6794         * config/i386/constraints.md (Ye): Remove.
6795         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6797 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6799         PR target/85512
6800         * config/aarch64/constraints.md (Usg): Limit to 31.
6801         (Usj): Limit to 63.
6803 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6805         PR tree-optimization/85529
6806         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6807         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6808         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6809         zero extension or masking of the MSB bit.
6810         (optimize_range_tests): Add FIRST_BB argument, pass it through
6811         to optimize_range_tests_var_bound.
6812         (maybe_optimize_range_tests, reassociate_bb): Adjust
6813         optimize_range_tests callers.
6815 2018-04-26  Richard Biener  <rguenther@suse.de>
6816             Jakub Jelinek  <jakub@redhat.com>
6818         * cgraph.h (symbol_table): Just declare debug method here.
6819         * symtab.c (symbol_table::debug): Define.
6821 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6823         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6825 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6827         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6828         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6829         (*movdi_internal): Substitute Yi and Yj constraint with x
6830         and Ym and Yn constraint with y constraint.  Update "isa"
6831         attribute and set "preferred_for_speed" attribute from
6832         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6833         (*movsi_internal): Ditto.
6834         (*movdf_internal): Ditto.
6835         (*movsf_internal): Ditto.
6836         (*zero_extendsidi2): Ditto.
6837         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6838         (sse2_loadld): Ditto.
6839         (*vec_extract<ssevecmodelower>_0): Ditto.
6840         (*vec_extractv4si_0_zext_sse4): Ditto.
6841         (vec_concatv2di): Ditto.
6842         (*vec_dup<mode>): Ditto.
6843         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6844         * config/i386/constraints.md (Yi): Remove.
6845         (Yj): Remove.
6846         (Ym): Remove.
6847         (Yn): Remove.
6849 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6851         * dumpfile.c (dump_open): New.
6852         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6853         (dump_finish): Detect stdio/stderr by value not name.
6855 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6857         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6859 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6861         PR target/84952
6862         * config/nvptx/nvptx.c (verify_neutering_jumps)
6863         (verify_neutering_labels): New function
6864         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6866 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6868         PR target/84025
6869         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6870         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6871         need neutering.
6873 2018-04-26  Richard Biener <rguenther@suse.de>
6874             Tom de Vries  <tom@codesourcery.com>
6876         PR lto/85422
6877         * lto-streamer-out.c (output_function): Fixup loops if required to match
6878         discovery done in the reader.
6880 2018-04-26  Richard Biener  <rguenther@suse.de>
6882         PR tree-optimization/85116
6883         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6884         have a loop exit from the single latch predecessor.  Remove
6885         case of header with just condition.
6886         (ch_base::copy_headers): Exclude infinite loops from any
6887         processing.
6888         (pass_ch::execute): Record exits.
6890 2018-04-26  Richard Biener  <rguenther@suse.de>
6892         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6893         prologue cost vector and pass it to vect_get_load_cost.
6894         (vect_get_peeling_costs_all_drs): Likewise.
6895         (vect_peeling_hash_get_lowest_cost): Likewise.
6896         (vect_enhance_data_refs_alignment): Likewise.
6898 2018-04-26  Richard Biener  <rguenther@suse.de>
6900         PR middle-end/85450
6901         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6902         checking of integer<->pointer conversions.
6903         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6904         sign-/zero-extending pointer types.
6905         (expand_omp_for_static_chunk): Likewise.
6907 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6908             Jean Lee  <xiaoyur347@gmail.com>
6910         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6911         (TARGET_ASAN_SHADOW_OFFSET): Define.
6912         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6913         true for -fsanitize=address.
6915 2018-04-25  Mark Wielaard  <mark@klomp.org>
6917         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6918         shorter ones.
6920 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6922         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6923         than "alu", remove explicit "memory" and "imm_disp" attributes.
6924         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6926         PR middle-end/85414
6927         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6928         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6929         gen_lowpart_no_emit.
6931 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6933         PR target/85473
6934         * config/i386/i386.c (ix86_expand_builtin): Change memory
6935         operand to XI, extend p0 to Pmode.
6936         * config/i386/i386.md: Change unspec volatile and operand
6937         1 mode to XI, change operand 0 mode to P.
6939 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6941         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6942         GET_MODE_MASK before any checking.
6943         (nds32_can_use_bset_p): Likewise.
6944         (nds32_can_use_btgl_p): Likewise.
6946 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6948         * config/nds32/nds32-doubleword.md: New define_split pattern for
6949         illegal register number.
6951 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6953         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6955 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6957         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6959 2018-04-25  Richard Biener  <rguenther@suse.de>
6961         * lto-streamer.h (LTO_major_version): Bump to 8.
6963 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6965         * BASE-VER: Set to 9.0.0.
6967 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6969         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6970         in __abskf2 and __powikf2.
6972 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6974         PR target/85512
6975         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6976         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6977         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6978         Use the above on operand 2.  Reindent.
6979         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6981 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6983         PR target/85485
6984         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6985         handle OPT_mcet.
6986         * config/i386/i386.opt (mcet): Removed.
6987         * doc/install.texi: Remove -mcet documentation.
6988         * doc/invoke.texi: Likewise.
6990 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6992         PR target/85485
6993         * doc/install.texi: Remove -mcet from bootstrap-cet.
6995 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6997         PR target/85511
6998         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6999         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7000         if TARGET_64BIT.
7002         PR target/85503
7003         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7004         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7005         containing a CONST_VECTOR.
7007 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
7009         * doc/install.texi: Update newlib dependency for nvptx.
7011 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7013         PR target/85508
7014         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
7015         instead of INTVAL when shifting x left.
7017 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
7019         PR tree-optimization/85478
7020         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
7021         vect_grouped_store_supported for single element vectors.
7023 2018-04-24  Richard Biener  <rguenther@suse.de>
7025         PR target/85491
7026         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
7027         load cost increase to the case of non-constant step.
7029 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7031         PR target/84828
7032         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
7033         destination if any_malformed_asm.
7035 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
7037         PR middle-end/85496
7038         * expr.c (store_field): In the bitfield case, if the value comes from
7039         a function call and is returned in registers by means of a PARALLEL,
7040         do not change the mode of the temporary unless BLKmode and VOIDmode.
7042 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
7044         PR rtl-optimization/85423
7045         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
7046         dependencies to debug insns when the previous insn is non-debug.
7048 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
7050         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
7051         enums into a single definition.
7052         (fls): Fix predicates and printing.
7053         (seti): Likewise.
7055 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
7057         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
7058         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
7059         and short u6 immediate.
7060         (check_if_valid_sleep_operand): Remove.
7061         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
7063 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7065         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
7066         flag_always_save_lp condition.
7067         * config/nds32/nds32.opt (malways-save-lp): New option.
7069 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7071         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
7072         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
7073         * config/nds32/nds32.h
7074         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
7075         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
7077 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7079         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
7080         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
7082 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7083             Chung-Ju Wu  <jasonwucj@gmail.com>
7085         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
7086         Declare.
7087         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
7088         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
7090 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7092         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
7094 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7096         * config/nds32/nds32-protos.h (nds32_data_alignment,
7097         nds32_local_alignment): Declare.
7098         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7099         nds32_local_alignment): New functions.
7100         (TARGET_CONSTANT_ALIGNMENT): Define.
7101         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7103 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7105         * config/nds32/nds32.c
7106         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7107         (TARGET_MODES_TIEABLE_P): Likewise.
7109 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7111         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7112         level Ofast and Og.
7114 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
7115             Chung-Ju Wu  <jasonwucj@gmail.com>
7117         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7118         for unaligned access.
7119         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7120         unaligned access.
7121         * config/nds32/nds32-intrinsic.md: Likewise.
7122         * config/nds32/nds32_intrinsic.h: Likewise.
7123         * config/nds32/nds32.h (nds32_builtins): Likewise.
7124         * config/nds32/nds32.opt (munaligned-access): New option.
7125         * config/nds32/nds32.c (nds32_asm_file_start): Display
7126         flag_unaligned_access status.
7128 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7130         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7131         -mno-relax is present.
7132         * config/riscv/linux.h (LINK_SPEC): Ditto.
7134 2018-04-20  Martin Sebor  <msebor@redhat.com>
7136         PR c/85365
7137         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7138         for null pointers.
7139         (gimple_fold_builtin_stxcpy_chk): Same.
7140         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7142 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
7144         PR target/85456
7145         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7146         __powikf2 when long double is IEEE 128-bit.
7148 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7150         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7151         step to make sure stack always aligned.
7153 2018-04-20  Carl Love  <cel@us.ibm.com>
7155         PR target/83402
7156         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7157         size check for arg0.
7159 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7160             Tom de Vries  <tom@codesourcery.com>
7162         PR target/85445
7163         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7164         Emit insns for calls too.
7165         (nvptx_find_par): Always look for worker-level predecessor insn.
7166         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
7167         calls.
7168         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7169         (nvptx_process_pars): Propagate frames for calls.
7171 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
7173         PR target/85469
7174         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7175         Removed.
7176         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7177         (ix86_handle_option): Don't handle OPT_mibt.
7178         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7179         __SHSTK__.
7180         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7181         has_ibt and ibt.
7182         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7183         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7184         (ix86_target_macros): Define __CET__ with flag_cf_protection
7185         for -fcf-protection.
7186         * config/i386/i386.c (isa2_opts): Remove -mibt.
7187         * config/i386/i386.h (TARGET_IBT): Removed.
7188         (TARGET_IBT_P): Likewise.
7189         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7190         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7191         * config/i386/i386.opt (mcet): Update help message.
7192         (mshstk): Likewise.
7193         (mibt): Removed.
7194         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
7195         -mcet as an alias for -mshstk.
7197 2018-04-20  Richard Biener <rguenther@suse.de>
7199         PR middle-end/85475
7200         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7201         complexity by forcing a single use of the multiply operand.
7203 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7205         ipa/85449
7206         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7207         recursion dependency to only apply to non-clones.
7209 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7211         ipa/85447
7212         * ipa-cp.c (create_specialized_node): Check that clones of
7213         self-recursive edges exist during IPA-CP.
7215 2018-04-19  Toon Moene  <toon@moene.org>
7217         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7218         by -O3.
7220 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7222         PR tree-optimization/85467
7223         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7224         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
7225         VECTOR_CST element to type.
7227 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7229         PR target/85397
7230         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7231         * config/i386/i386.md (builtin_setjmp_setup): Removed.
7232         (builtin_longjmp): Likewise.
7233         (save_stack_nonlocal): New pattern.
7234         (restore_stack_nonlocal): Likewise.
7236 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7238         PR target/85404
7239         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7240         Replace ASM_OUTPUT_LABEL with fprintf.
7242 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7244         PR target/85417
7245         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7246         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7247         * config/i386/i386-c.c (ix86_target_macros_internal): Also
7248         define __IBT__ and __SHSTK__ for -fcf-protection.
7249         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7250         TARGET_IBT.
7251         (ix86_trampoline_init): Likewise.
7252         (x86_output_mi_thunk): Likewise.
7253         (ix86_notrack_prefixed_insn_p): Likewise.
7254         (ix86_option_override_internal): Don't disallow -fcf-protection.
7255         * config/i386/i386.md (rdssp<mode>): Also enable for
7256         -fcf-protection.
7257         (incssp<mode>): Likewise.
7258         (nop_endbr): Likewise.
7259         * config/i386/i386.opt (mcet): Change help message to built-in
7260         functions only.
7261         (mibt): Likewise.
7262         (mshstk): Likewise.
7263         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7264         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
7265         enable CET built-in functions.
7267 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
7269         * common/config/i386/i386-common.c
7270         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7271         OPTION_MASK_ISA_MOVDIRI_UNSET,
7272         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7273         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7274         * config.gcc (movdirintrin.h): New header.
7275         * config/i386/cpuid.h (bit_MOVDIRI,
7276         bit_MOVDIR64B): New bits.
7277         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7278         and -mmvodir64b.
7279         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7280         (VOID, PVOID, PCVOID)): New function types.
7281         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7282         __builtin_ia32_directstoreu_u64,
7283         __builtin_ia32_movdir64b): New builtins.
7284         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7285         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7286         and -mmovdiri.
7287         (ix86_valid_target_attribute_inner_p): Ditto.
7288         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7289         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7290         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7291         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7292         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7293         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7294         (movdiri<mode>, movdir64b_<mode>): New.
7295         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7296         * config/i386/immintrin.h: Include movdirintrin.h.
7297         * config/i386/movdirintrin.h: New file.
7298         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7300 2018-04-19  Richard Biener  <rguenther@suse.de>
7302         PR middle-end/85455
7303         * cfg.c (clear_bb_flags): When loop state says we have
7304         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7306 2018-04-19  Richard Biener  <rguenther@suse.de>
7308         PR tree-optimization/84737
7309         * tree-vect-data-refs.c (vect_copy_ref_info): New function
7310         copying restrict info.
7311         (vect_setup_realignment): Use it.
7312         * tree-vectorizer.h (vect_copy_ref_info): Declare.
7313         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7314         the first DR to all generated stores.
7315         (vectorizable_load): Likewise for loads.
7317 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7319         PR tree-optimization/85446
7320         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7321         the integral and pointer types to have the same precision.
7323         * doc/install.texi: Document --disable-cet being the default and
7324         --enable-cet=auto.
7326 2018-04-18  Martin Liska  <mliska@suse.cz>
7328         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7329         style.
7331 2018-04-18  Martin Liska  <mliska@suse.cz>
7333         Revert
7334         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
7336         PR ipa/83983
7337         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7338         arguments if they are comparable.
7340 2018-04-18  Martin Liska  <mliska@suse.cz>
7342         Revert
7343         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7345         PR lto/84805
7346         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7347         incomplete types.
7349 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
7351         PR target/85388
7352         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7353         ENDBR after calling __morestack.
7355 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
7357         PR jit/85384
7358         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7359         by using gcc_base_ver to generate a gcc_driver_version, and use
7360         it when generating GCC_DRIVER_NAME.
7361         * configure: Regenerate.
7363 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
7365         PR target/81084
7366         * config.gcc: Obsolete powerpc*-*-*spe*.
7368 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7370         PR debug/84637
7371         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7372         (stabstr_D): Change type of unum from unsigned int to
7373         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
7374         type.
7376 2018-04-17  Jim Wilson  <jimw@sifive.com>
7378         PR 84856
7379         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7380         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7381         Set arg_pointer_offset after using pretend_args_size.
7383 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7385         PR rtl-optimization/85431
7386         * dse.c (record_store): Ignore zero width stores.
7388         PR sanitizer/85230
7389         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
7390         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7391         __builtin_stack_restore rather than after it.
7392         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7393         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7394         argument instead of virtual_dynamic_stack_rtx.
7396 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7398         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7399         New prototype.
7400         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7401         Add note to error message to explain internal mapping of overloaded
7402         built-in function name to non-overloaded built-in function name.
7403         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7404         function.
7406 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
7408         PR target/85424
7409         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7410         where the inputs overlap with the output.
7412 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7414         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7415         (=v, v) alternative and explicit "memory" attribute.
7416         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
7417         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7418         attributes.
7419         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7420         "sselog1" type instead of "sselog".
7421         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7422         "sselog".  Remove explicit "memory" attribute.
7423         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7424         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7425         attributes.
7426         (vec_extract_hi_v32hi): Merge all alternatives into one, use
7427         "sselog1" type instead of "sselog".  Remove explicit "memory"
7428         attribute.
7429         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7430         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7431         attribute.
7432         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7433         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7434         attributes.
7435         (vec_extract_hi_v64qi): Merge all alternatives into one, use
7436         "sselog1" type instead of "sselog".  Remove explicit "memory"
7437         attribute.
7438         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7439         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7440         attribute.
7442         PR target/85430
7443         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7445         PR middle-end/85414
7446         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7447         on a SUBREG.
7449 2018-04-17  Martin Jambor  <mjambor@suse.cz>
7451         PR ipa/85421
7452         * ipa-cp.c (create_specialized_node): Call
7453         expand_all_artificial_thunks if necessary.
7455 2018-04-17  Martin Liska  <mliska@suse.cz>
7457         PR lto/85405
7458         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7459         in message, remote space in between '_G' and '('.
7461 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7463         PR target/85281
7464         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7465         avx512f_vmcmp<mode>3<round_saeonly_name>,
7466         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7467         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7468         avx512f_rndscale<mode><round_saeonly_name>,
7469         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7470         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7471         Use %<iptr>2 instead of %2 for -masm=intel.
7472         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7473         avx512f_vcvttss2usi<round_saeonly_name>,
7474         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7475         -masm=intel.
7476         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7477         avx512f_vcvttsd2usi<round_saeonly_name>,
7478         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7479         Use %q1 instead of %1 for -masm=intel.
7480         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7481         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7482         of %3 for -masm=intel.
7483         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7484         -masm=intel.
7485         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7486         -masm=intel.
7487         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7488         -masm=intel.
7489         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7490         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7491         %g1.
7492         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7493         -masm=intel.
7494         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7495         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7496         %g1 and one with %0 and %1.
7497         (avx512er_vmrcp28<mode><round_saeonly_name>,
7498         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7499         %1 for -masm=intel.
7500         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7501         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7502         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7503         of %0 and %{%4%} for -masm=intel.
7504         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7505         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7506         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7507         order of %0 and %{%5%}%{z%} for -masm=intel.
7509 2018-04-17  Jan Hubicka  <jh@suse.cz>
7511         PR lto/85405
7512         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7514 2018-04-17  Martin Liska  <mliska@suse.cz>
7516         PR ipa/85329
7517         * multiple_target.c (create_dispatcher_calls): Set apostrophes
7518         for target_clone error message.  Make default implementation
7519         clone to be a local declaration.
7520         (separate_attrs): Add new argument and check for an empty
7521         string.
7522         (expand_target_clones): Handle it.
7523         (ipa_target_clone): Make redirection just for target_clones
7524         functions.
7526 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
7527             Tom de Vries  <tom@codesourcery.com>
7529         PR middle-end/84955
7530         * omp-expand.c (expand_oacc_for): Add dummy false branch for
7531         tiled basic blocks without omp continue statements.
7533 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
7535         PR target/83660
7536         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7537         vec_extract expression as having side effects to make sure it gets
7538         a cleanup point.
7540 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
7542         PR target/85403
7543         * config/i386/i386.c (get_builtin_code_for_version): Check
7544         error_mark_node.
7546 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
7548         PR target/84331
7549         * gcc/config.gcc: Support "skylake".
7550         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7551         PROCESSOR_SKYLAKE.
7552         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7553         (processor_target_table): Add "skylake".
7554         (ix86_option_override_internal): Add "skylake".
7555         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7556         PROCESSOR_CANNONLAKE.
7557         (get_builtin_code_for_version): Fix priority for
7558         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7559         PROCESSOR_SKYLAKE-AVX512.
7560         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7561         (processor_type): Add PROCESSOR_SKYLAKE.
7563 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
7564             Jason Merrill  <jason@redhat.com>
7566         PR c++/85112
7567         * convert.c (convert_to_integer_1): Use direct recursion for
7568         enumeral types and types with a precision less than the number
7569         of bits in their mode.
7571 2018-04-16  Julia Koval  <julia.koval@intel.com>
7573         PR target/84413
7574         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7575         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7577 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
7579         PR target/85293
7580         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7581         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7582         and -mno-direct-move.
7584 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
7586         PR target/83402
7587         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7588         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7589         Ensure negative shifts result in {0}.
7591 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
7593         PR rtl-optimization/79916
7594         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7595         regs (if any) to define how to gnerate SD moves when LRA is in
7596         progress.
7598 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
7600         PR rtl-optimization/85393
7601         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7602         * except.c (expand_dw2_landing_pad_for_region): Make static.
7603         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7604         a label and unconditional jump to old_bb, rather than
7605         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7606         basic block.
7608         PR rtl-optimization/85376
7609         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7610         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7611         instead of a specific value.
7613 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7614             Bin Cheng  <bin.cheng@arm.com>
7616         PR tree-optimization/82965
7617         PR tree-optimization/83991
7618         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7619         by_profile_only parameter.
7620         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7621         information if the loop was predicted to iterate too many times.
7622         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7624 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7626         PR lto/71991
7627         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7628         always inline.
7630 2018-04-13  Martin Liska  <mliska@suse.cz>
7631             Jakub Jelinek  <jakub@redhat.com>
7633         PR middle-end/81657
7634         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7635         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7636         * builtins.c (expand_builtin_memory_copy_args): Use
7637         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7638         handle dest_addr == pc_rtx.
7640 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7642         PR target/85291
7643         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7644         asked to not generate direct moves.
7645         (fix_trunc<mode>si2_stfiwx): Similar.
7646         (fix_trunc<mode>si2_internal): Similar.
7648 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7650         PR debug/83157
7651         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7652         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7653         lookup if dest in some wider mode is known to be const0_rtx and
7654         if so, record permanent equivalence for it to be ZERO_EXTEND of
7655         the narrower mode destination.
7657 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7659         * lto-streamer-out.c (output_function): Revert 259346.
7660         * omp-expand.c (expand_oacc_for): Likewise.
7662 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7664         PR rtl-optimization/85354
7665         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7666         * sel-sched.c (sel_global_init): ... here.
7668 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7670         PR target/85238
7671         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7672         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7673         mode for PE-COFF targets.
7674         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7675         (i386_pe_asm_lto_end): Likewise.
7676         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7677         (TARGET_ASM_LTO_END): Likewise.
7678         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7679         (i386_pe_asm_lto_start): New function.
7680         (i386_pe_asm_lto_end): Likewise.
7682 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7683             Richard Biener  <rguenther@suse.de>
7685         PR middle-end/84955
7686         * lto-streamer-out.c (output_function): Fix CFG loop state before
7687         streaming out.
7688         * omp-expand.c (expand_oacc_for): Handle calls to internal
7689         functions like regular functions.
7691 2018-04-12  Richard Biener  <rguenther@suse.de>
7693         PR lto/85371
7694         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7695         for the early LTO debug to properly generate references to it
7696         during DIE emission.  Do not re-use that for the skeleton for
7697         split-dwarf.
7698         (dwarf2out_early_finish): Likewise.
7700 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7702         PR target/85328
7703         * config/i386/sse.md
7704         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7705         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7706         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7707         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7708         and output is a reg, avoid creating invalid lowpart subreg, but
7709         instead split into a 512-bit move.  Don't split if not AVX512VL,
7710         input is xmm16+ reg and output is a mem.
7711         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7712         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7713         xmm16+ reg and output is a mem.
7715 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7717         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7718         also for flag_dwarf2_cfi_asm.
7720 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7722         PR rtl-optimization/85342
7723         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7724         a bool scalar var inside of the loop instead.  Don't try to update
7725         recog_data.operand after failed apply_change_group.
7727 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7729         PR target/85296
7730         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7731         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7732         array with flexible array member as array without given dimension.
7733         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7734         argument for undefined param to true.
7736 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7738         PR target/85321
7739         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7740         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7741         from PowerPC section.
7742         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7743         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7744         help text that is too long.
7745         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7746         help text that is too long.
7747         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7748         help text that is too long.
7750 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7752         * config/alpha/alpha.md (stack_probe_internal): Rename
7753         from "probe_stack".  Update all callers.
7755 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7757         PR rtl-optimization/84566
7758         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7759         sched_macro_fuse_insns.
7761 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7763         PR target/84301
7764         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7765         (compute_block_dependences): ... from here.
7767 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7769         PR tree-optimization/85331
7770         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7771         from int to HOST_WIDE_INT.
7773 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7775         PR ipa/84149
7776         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7777         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7778         not the same as the source val.
7779         (cgraph_edge_brings_value_p): New parameter.
7780         (gather_edges_for_value): Pass destination value to
7781         cgraph_edge_brings_value_p.
7782         (perhaps_add_new_callers): Likewise.
7783         (get_info_about_necessary_edges): Likewise and exclude values brought
7784         only by self-recursive edges.
7785         (create_specialized_node): Redirect only clones of self-calling edges.
7786         (+self_recursive_pass_through_p): New function.
7787         (find_more_scalar_values_for_callers_subset): Use it.
7788         (find_aggregate_values_for_callers_subset): Likewise.
7789         (known_aggs_to_agg_replacement_list): Removed.
7790         (decide_whether_version_node): Re-calculate known constants for all
7791         remaining context clones.
7793 2018-04-11  Richard Biener  <rguenther@suse.de>
7795         PR lto/85339
7796         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7797         from early DWARF output.
7798         (dwarf2out_early_finish): Output line info unconditionally into
7799         early DWARF and add reference to it.
7801 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7803         PR target/85281
7804         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7805         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7806         other than V2DFmode using iptr mode attribute.
7807         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7809 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7811         PR rtl-optimization/84659
7812         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7814 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7816         PR debug/85302
7817         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7818         SIZEP is NULL.
7819         (output_loc_list): Pass address of a dummy size variable even in the
7820         locview handling loop.
7821         (index_location_lists): Add comment on why skip_loc_list_entry can't
7822         call size_of_locs.
7824 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7826         PR target/85261
7827         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7828         into register.
7830 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7832         PR target/85321
7833         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7834         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7835         and -mstring-compare-inline-limit.
7837 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7839         PR target/85287
7840         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7841         for stack clash protection in a register whenever we need it to be in
7842         a register.
7844 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7846         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7847         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7849 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7851         PR target/85321
7852         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7853         the help text.
7854         (mlong-double-): Ditto.
7855         * config/rs6000/sysv4.opt (msdata=): Ditto.
7856         (mtls-size=): Ditto.
7858 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7860         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7861         erroneous entries for
7862         "vector int vec_ldl (int, long int *)", and
7863         "vector unsigned int vec_ldl (int, unsigned long int *)".
7864         Add comments and entries for
7865         "vector bool char vec_ldl (int, bool char *)",
7866         "vector bool short vec_ldl (int, bool short *)",
7867         "vector bool int vec_ldl (int, bool int *)",
7868         "vector bool long long vec_ldl (int, bool long long *)",
7869         "vector pixel vec_ldl (int, pixel *)",
7870         "vector long long vec_ldl (int, long long *)",
7871         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7872         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7873         type tree bool_long_long_type_node and correct definition of
7874         bool_V2DI_type_node to make reference to this new type tree.
7875         (rs6000_mangle_type): Replace erroneous reference to
7876         bool_long_type_node with bool_long_long_type_node.
7877         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7878         comments to emphasize sign distinctions for char and int types and
7879         replace RS6000_BTI_bool_long constant with
7880         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7881         use of RS6000_BTI_pixel.
7882         (bool_long_type_node): Remove this macro definition.
7883         (bool_long_long_type_node): New macro definition
7885 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7887         PR rtl-optimization/85300
7888         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7889         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7890         simplify_unary_operation fails.
7892 2018-04-10  Martin Liska  <mliska@suse.cz>
7894         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7895         cgraph_edge and ipa_ref.
7897 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7899         PR target/85177
7900         PR target/85255
7901         * config/i386/sse.md
7902         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7903         computation of the VEC_MERGE selector from mask.
7904         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7905         Fix decoding of the VEC_MERGE selector into mask.
7907 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7909         PR tree-optimization/85286
7910         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7912 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7914         * final.c (final_1): Set insn_last_address as well as
7915         insn_current_address.
7917 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7919         PR target/85173
7920         * explow.c (emit_stack_probe): Call validize_mem on memory location
7921         before passing it to gen_probe_stack.  Create address operand and
7922         legitimize it for the probe_stack_address case.
7924 2018-04-09  Jan Hubicka  <jh@suse.cz>
7926         PR lto/85078
7927         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7928         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7929         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7930         walk basetypes.
7931         (free_lang_data): Rebuild type inheritance graph.
7933 2018-04-09  Martin Sebor  <msebor@redhat.com>
7935         * invoke.texi (-finline-small-functions): Mention other optimization
7936         options.
7937         (-findirect-inlining, -fpartial-inlining): Same.
7938         (-finline-functions-called-once): Same.
7939         (-freorder-blocks-and-partition): Same.
7941 2018-04-09  Jan Hubicka  <jh@suse.cz>
7943         PR rtl/84058
7944         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7945         jumps; choose last target that matches the criteria (i.e.
7946         no partition changes for non-crossing jumps).
7947         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7948         support for redirecting crossing jumps to non-crossing.
7950 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7952         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7953         also for naked functions.
7955 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7957         * config/arc/arc.md (add_shift): New pattern.
7958         (add_shift2): Likewise.
7959         (sub_shift): Likewise.
7960         (sub_shift_cmp0_noout): Likewise.
7961         (compare_si_ashiftsi): Likewise.
7962         (xbfu_cmp0_noout): New combine pattern.
7963         (xbfu_cmp0"): Likewise.
7964         (movsi_set_cc_insn): Place the predicable variant first.
7965         (commutative_binary_cmp0_noout): Remove clobber.
7966         (commutative_binary_cmp0): New pattern.
7967         (noncommutative_binary_cmp0): Likewise.
7968         (noncommutative_binary_cmp0_noout): Likewise.
7969         (noncommutative_binary_comparison_result_used): Removed.
7970         (rsub_cmp0): New pattern.
7971         (rsub_cmp0_noout): Likewise.
7972         (extzvsi): Changed, keep only meaningful variants.
7973         (SQH, SEZ): New iterators.
7974         (SQH_postfix): New mode attribute.
7975         (SEZ_prefix): New code attribute.
7976         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7977         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7978         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7979         of numerical value.
7980         (noncommutative_operator): Check the availability of barrel
7981         shifter option.
7983 2018-04-09  Richard Biener  <rguenther@suse.de>
7985         PR tree-optimization/85284
7986         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7987         Only use the niter constraining form of simple_iv when the exit
7988         is always executed.
7990 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7992         PR target/84041
7993         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7994         (define_expand "*memory_barrier"): New define_expand.
7995         (define_insn "memory_barrier"): New insn.
7997 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7999         PR rtl-optimization/80463
8000         PR rtl-optimization/83972
8001         PR rtl-optimization/83480
8003         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8004         correct producer for the insn.
8005         (tidy_control_flow): Fixup seqnos in case of debug insns.
8007 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8009         PR rtl-optimization/83913
8011         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
8012         different sched-times when merging exprs.
8014 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8016         PR rtl-optimization/83962
8018         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
8019         tidy_fallthru_edge and tidy_control_flow.
8021 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8023         PR rtl-optimization/83530
8025         * sel-sched.c (force_next_insn): New global variable.
8026         (remove_insn_for_debug): When force_next_insn is true, also leave only
8027         next insn in the ready list.
8028         (sel_sched_region): When the region wasn't scheduled, make another pass
8029         over it with force_next_insn set to 1.
8031 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8033         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
8034         into tm_file.
8035         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8036         for interrupt control.
8037         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8038         functions for interrupt control.
8039         * config/nds32/nds32-intrinsic.md: Likewise.
8040         * config/nds32/nds32_intrinsic.h: Likewise.
8041         * config/nds32/nds32.h (nds32_builtins): Likewise.
8043 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8045         * config/nds32/nds32.c (nds32_init_machine_status,
8046         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
8047         strict_aligned_p field.
8048         (nds32_expand_to_rtl_hook): New function.
8049         (TARGET_EXPAND_TO_RTL_HOOK): Define.
8050         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
8052 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8053             Chung-Ju Wu  <jasonwucj@gmail.com>
8055         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
8056         * config/nds32/nds32-n7.md: New file.
8057         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
8058         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
8059         pipeline.
8060         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
8061         * config/nds32/nds32.md (pipeline_model): Add n7.
8062         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
8063         * config/nds32/pipelines.md: Include n7 settings.
8065 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8066             Chung-Ju Wu  <jasonwucj@gmail.com>
8068         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
8069         * config/nds32/nds32-e8.md: New file.
8070         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
8071         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
8072         pipeline.
8073         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
8074         * config/nds32/nds32.md (pipeline_model): Add e8.
8075         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
8076         * config/nds32/pipelines.md: Include e8 settings.
8078 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8079             Chung-Ju Wu  <jasonwucj@gmail.com>
8081         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
8082         * config/nds32/nds32-n8.md: New file.
8083         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
8084         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
8085         pipeline.
8086         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
8087         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
8088         * config/nds32/nds32.md (pipeline_model): Add n8.
8089         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
8090         * config/nds32/pipelines.md: Include n8 settings.
8092 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8093             Chung-Ju Wu  <jasonwucj@gmail.com>
8095         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8096         * config/nds32/nds32-n9-2r1w.md: New file.
8097         * config/nds32/nds32-n9-3r2w.md: New file.
8098         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8099         nds32_register_ports): New or modify for cpu n9.
8100         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8101         pipeline.
8102         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8103         * config/nds32/nds32-utils.c: New file.
8104         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8105         TARGET_MUL_SLOW): Define.
8106         * config/nds32/nds32.md (pipeline_model): New attribute.
8107         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8108         New options that support cpu n9.
8109         * config/nds32/pipelines.md: Include n9 settings.
8110         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8112 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8114         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8115         information if necessary.
8116         (output_cond_branch_compare_zero): Likewise.
8117         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8118         (nds32_target_alignment): Refine for alignment.
8119         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8120         (FUNCTION_BOUNDARY): Modify.
8121         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8122         align case.
8123         * config/nds32/nds32.opt (malways-align, malign-functions): New.
8125 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8127         * config/nds32/constants.md (unspec_volatile_element): Add values for
8128         TLB operation and data prefetch.
8129         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8130         functions for TLB operation and data prefetch.
8131         * config/nds32/nds32-intrinsic.md: Likewise.
8132         * config/nds32/nds32_intrinsic.h: Likewise.
8133         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8134         (nds32_print_operand): Likewise.
8135         * config/nds32/nds32.h (nds32_builtins): Likewise.
8137 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
8138         Andrew Pinski <pinsika@gcc.gnu.org>
8140         PR middle-end/82976
8141         * match.pd: Use constant_boolean_node of correct type instead of
8142         boolean_true_node or boolean_false_node for simplifying
8143         pointer comparisons to zero.
8145 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8147         PR tree-optimization/80021
8148         * tree.c (verify_type_variant): Make error call in verify_variant_match
8149         translatable and remove final full stop.
8151 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8153         * config/nds32/constants.md (unspec_volatile_element): Add
8154         UNSPEC_VOLATILE_EH_RETURN.
8155         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8156         nds32_output_stack_pop): Support dwarf exception handling process.
8157         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8158         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8159         exception handling process.
8160         (nds32_compute_stack_frame): Likewise.
8161         (nds32_return_addr_rtx): Likewise.
8162         (nds32_initial_elimination_offset): Likewise.
8163         (nds32_expand_prologue): Likewise.
8164         (nds32_expand_epilogue): Likewise.
8165         (nds32_dynamic_chain_address): New function.
8166         * config/nds32/nds32.h (machine_function): Add fields for dwarf
8167         exception handling.
8168         (DYNAMIC_CHAIN_ADDRESS): Define.
8169         (EH_RETURN_DATA_REGNO): Define.
8170         (EH_RETURN_STACKADJ_RTX): Define.
8171         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8172         patterns for dwarf exception handling.
8174 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8176         * config/nds32/nds32.h: Clean up obsolete macros.
8178 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8180         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8181         Add enum values for particular instructions.
8182         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8183         particular intrinsic functions.
8184         * config/nds32/nds32-intrinsic.md: Likewise.
8185         * config/nds32/nds32_intrinsic.h: Likewise.
8186         * config/nds32/nds32.h (nds32_builtins): Likewise.
8187         * config/nds32/nds32.md (type): Add pbsad and pbsada.
8188         (btst, ave): New patterns for particular instructions.
8190 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8192         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8193         Add enum values for atomic load/store and memory sync.
8194         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8195         and memory sync.
8196         * config/nds32/nds32-intrinsic.md: Likewise.
8197         * config/nds32/nds32_intrinsic.h: Likewise.
8198         * config/nds32/nds32.h (nds32_builtins): Likewise.
8200 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8202         PR tree-optimization/85257
8203         * fold-const.c (native_encode_vector): If not all elts could fit
8204         and off is -1, return 0 rather than offset.
8205         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8206         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8207         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
8208         adjust buffer in native_interpret_expr call.
8210 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8212         * config/nds32/constants.md (unspec_volatile_element): Add cache
8213         control enum values.
8214         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8215         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8216         * config/nds32/nds32.c (nds32_cctl_names): New.
8217         (nds32_print_operand): Handle cache control register names.
8218         * config/nds32/nds32.h (nds32_builtins): New enum values.
8219         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8220         macros.
8221         * config/nds32/nds32.md (type): Add mmu.
8222         * config/nds32/pipelines.md (simple_insn): Add mmu.
8224 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8226         * config/nds32/nds32.md (type): Remove call.
8227         * config/nds32/pipelines.md (simple_insn): Likewise.
8229 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8231         * config/nds32/constants.md (unspec_volatile_element): Add
8232         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8233         UNSPEC_VOLATILE_FMFCFG.
8234         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8235         description for fmfcfg and fmfcsr.
8236         (bdesc_1arg): Add fmtcsr.
8237         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8238         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8239         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8240         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8241         unspec_fmfcfg): New patterns.
8242         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8243         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8244         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8245         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8246         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8247         __nds32__fmfcfg): Define.
8249 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8251         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8252         intrinsic register names.
8253         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8254         intrinsic register enum values and macros.
8256 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8258         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8259         for load/store addressing form.
8260         (nds32_print_operand_address): Likewise.
8262 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
8264         PR target/85196
8265         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8266         based on LABEL_REF.  Remove useless assertion.
8267         (pic_address_needs_scratch): Fix formatting.
8268         (sparc_legitimize_pic_address): Minor tweaks.
8269         (sparc_delegitimize_address): Adjust assertion accordingly.
8270         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8271         into symbolic_operand.
8272         (movsi_high_pic_label_ref): Likewise.
8273         (movsi_lo_sum_pic_label_ref): Likewise.
8274         (movdi_pic_label_ref): Likewise.
8275         (movdi_high_pic_label_ref): Likewise.
8276         (movdi_lo_sum_pic_label_ref): Likewise.
8278 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
8280         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8281         custom LIB_SPEC setup.
8283 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
8284             Kito Cheng  <kito.cheng@gmail.com>
8286         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8287         * config/riscv/freebsd.h: New.
8289 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8291         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8292         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8293         file.
8295 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8296             Kito Cheng  <kito.cheng@gmail.com>
8298         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8299         nds32_output_call, nds32_symbol_binds_local_p): New functions.
8300         * config/nds32/nds32-protos.h (nds32_output_call,
8301         nds32_output_return): Declare.
8302         * config/nds32/nds32.md: Refine all the call and return patterns.
8304 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8306         PR debug/85252
8307         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8308         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8310         PR rtl-optimization/84872
8311         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8312         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8313         EDGE_CROSSING edge.
8315 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
8317         * expr.c (copy_blkmode_to_reg): Revert 254862.
8318         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8320 2018-04-06  Richard Biener  <rguenther@suse.de>
8322         PR middle-end/85244
8323         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8324         after seeing a component reference with an adjacent field.  Treat
8325         refs to arrays at struct end of external decls similar to
8326         refs to unconstrained commons.
8328 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8330         PR sanitizer/85213
8331         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8332         look through SAVE_EXPRs with non-side-effects argument.  Adjust
8333         recursive calls.
8334         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8335         save_p here.
8337 2018-04-06  Richard Biener  <rguenther@suse.de>
8339         PR middle-end/85180
8340         * alias.c (find_base_term): New wrapper around find_base_term
8341         unwinding CSELIB_VAL_PTR changes.
8342         (find_base_term): Do not restore CSELIB_VAL_PTR during the
8343         recursion.
8345 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8347         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8348         instructions.
8349         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8350         constant definitions.
8351         ("nop"): lr 0,0 -> nopr r0
8352         ("nop_lr0", "nop_lr1"): New insn definitions.
8354 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8356         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8357         NDS32_V3PUSH_AVAILABLE_P macro.
8359 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
8360             Chung-Ju Wu  <jasonwucj@gmail.com>
8362         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8363         (nds32*-*-*): Add float and fpu_config into supported_defaults.
8364         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8365         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8366         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8367         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8368         * config/nds32/constraints.md: New constraints and checking for hard
8369         float configuration.
8370         * config/nds32/iterators.md: New mode iterator and attribute for hard
8371         float configuration.
8372         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8373         patterns.
8374         * config/nds32/nds32-fpu.md: New file.
8375         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8376         deal with hard float code generation.
8377         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8378         ARCH_V3S.
8379         (abi_type, float_reg_number): New enum type.
8380         * config/nds32/nds32-predicates.c: New predicates for hard float.
8381         * config/nds32/nds32-protos.h: Declare functions for hard float.
8382         * config/nds32/nds32.c: Implementation for hard float configuration.
8383         * config/nds32/nds32.h: Definitions for hard float configuration.
8384         * config/nds32/nds32.md: Include hard float machine description and
8385         modify patterns for hard float configuration.
8386         * config/nds32/nds32.opt: New options for hard float configuration.
8387         * config/nds32/predicates.md: New predicates for hard float
8388         configuration.
8390 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8392         * common/config/nds32/nds32-common.c
8393         (nds32_option_optimization_table): Enable -mreleax-hint by default.
8395 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
8397         PR middle-end/85195
8398         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8399         CONSTRUCTOR_ELT (ctor, ...)->value.
8401 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
8403         PR target/85193
8404         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8406 2018-04-05  Tom de Vries  <tom@codesourcery.com>
8408         PR target/85204
8409         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8410         cond jump.
8412 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8413             Kito Cheng  <kito.cheng@gmail.com>
8415         * config/nds32/constraints.md (U33): Fine-tune checking condition.
8416         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8417         * config/nds32/nds32.h (nds32_16bit_address_type): Add
8418         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8420 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8421             Kito Cheng  <kito.cheng@gmail.com>
8423         * config/nds32/constraints.md (Ufe): New memory constraint.
8424         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8425         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8426         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8427         operands.
8428         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8429         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8431 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8433         * config/nds32/nds32.md: Use optimize_size in the condition for
8434         alu-shift instructions.
8436 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8438         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8440 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8442         * config/nds32/nds32.md (negsi2): Refine pattern.
8444 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8445             Chung-Ju Wu  <jasonwucj@gmail.com>
8447         * config/nds32/iterators.md (shift_rotate): New code iterator.
8448         (shift): New code attribute.
8449         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8450         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8451         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8452         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8453         bit-wise operations.
8454         (andsi3, *andsi3): Ditto.
8455         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8456         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8457         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8458         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8459         nds32_ior_operand, nds32_xor_operand): New predicates.
8461 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8463         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8464         (addsi3, subsi3): ... this.
8466 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8468         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8470 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8472         * config/nds32/nds32.md: Adjust indention.
8474 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8476         * config/nds32/nds32.md (feature): New attribute.
8478 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8480         * config/nds32/nds32.md (subtype): New attribute.
8482 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8484         PR target/85203
8485         * config/arm/arm-builtins.c (arm_expand_builtin): Change
8486         expansion to perform a bitwise AND of the argument followed by a
8487         boolean negation of the result.
8489 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
8491         PR rtl-optimization/84878
8492         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8493         the basic block.  Assert the use reference is not artificial and that
8494         it has an associated insn.
8496 2018-04-04  Michael Matz  <matz@suse.de>
8498         * builtins.c (compute_objsize): Pass correct operand
8499         to array_at_struct_end_p.
8501 2018-04-04  Richard Biener  <rguenther@suse.de>
8503         PR lto/85176
8504         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8505         from contexts for DINFO_LEVEL_TERSE and below.
8507 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8509         * config/nds32/nds32-doubleword.md (move_<mode>): Require
8510         resiter_operand condition.
8511         * config/nds32/nds32.md (*move<mode>): Ditto.
8513 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8514             Monk Chiang  <sh.chiang04@gmail.com>
8516         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8518 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8520         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8522 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8523             Kito Cheng  <kito.cheng@gmail.com>
8525         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8526         nds32_cond_code_str, output_cond_branch,
8527         output_cond_branch_compare_zero, nds32_expand_cbranch,
8528         nds32_expand_cstore, nds32_expand_movcc,
8529         nds32_output_cbranchsi4_equality_zero,
8530         nds32_output_cbranchsi4_equality_reg,
8531         nds32_output_cbranchsi4_equality_reg_or_const_int,
8532         nds32_output_cbranchsi4_greater_less_zero: New functions.
8533         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8534         nds32_expand_cstore, nds32_expand_movcc,
8535         nds32_output_cbranchsi4_equality_zero,
8536         nds32_output_cbranchsi4_equality_reg,
8537         nds32_output_cbranchsi4_equality_reg_or_const_int,
8538         nds32_output_cbranchsi4_greater_less_zero): Declare.
8539         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8540         nds32_rimm11s_operand): New predicates.
8541         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8542         * config/nds32/nds32.md: Rewrite all the branch and conditional move
8543         patterns.
8545 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8547         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8548         * config/nds32/nds32.md: Ditto.
8549         * config/nds32/pipelines.md: Ditto.
8551 2018-04-04  Richard Biener  <rguenther@suse.de>
8553         PR tree-optimization/85168
8554         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8555         propagating abnormals.
8557 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8559         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8561 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8562             Kito Cheng  <kito.cheng@gmail.com>
8564         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8565         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8566         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8567         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8568         * config/nds32/nds32.md (sibcall_internal): New.
8569         (sibcall_register): Remove.
8570         (sibcall_immediate): Remove.
8571         (sibcall_value_internal): New.
8572         (sibcall_value_register): Remove.
8573         (sibcall_value_immediate): Remove.
8574         * config/nds32/predicates.md (nds32_general_register_operand): New.
8575         (nds32_call_address_operand): New.
8577 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8579         PR rtl-optimization/85167
8580         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8581         bb_defs if *split_p, instead preinitialize it to NULL.
8583         PR tree-optimization/85156
8584         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8585         evaluating the argument multiple times.
8587 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
8589         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8590         than vector.
8591         (_mm_cvtpd_ps): Likewise.
8592         (_mm_cvttpd_epi32): Likewise.
8593         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8594         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8595         vector, pixel, and bool following altivec.h include.
8597 2018-04-03  Martin Sebor  <msebor@redhat.com>
8599         * doc/extend.texi (Common Function Attributes): Clarify.
8600         (const attribute): Likewise.
8601         (pure attribute): Likewise.
8603 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8605         PR target/85169
8606         * config/i386/i386.c (ix86_expand_vector_set): Use
8607         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
8609 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
8611         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8612         instructions when changing rounding bits to preserve precision bits
8613         in the x87 control word.
8615 2018-04-03  Martin Liska  <mliska@suse.cz>
8617         PR tree-optimization/82491
8618         * rtl.h (strip_offset_and_add): Replace += suboffset with
8619         poly_uint64 () + suboffset.
8621 2018-03-29  Martin Liska  <mliska@suse.cz>
8622             Martin Jambor  <mjambor@suse.cz>
8624         PR ipa/84947
8625         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8626         param_type is not an integral or pointer type.
8628 2018-04-03  Richard Biener  <rguenther@suse.de>
8630         * sese.h (recompute_all_dominators): Remove.
8632 2018-04-02  Martin Sebor  <msebor@redhat.com>
8634         * doc/invoke.texi (-Wrestrict): Fix typos.
8636 2018-04-02  Jim Wilson  <jimw@sifive.com>
8638         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8639         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8640         (<optab>di3, <optab>si3_extend): Likewise.
8641         (<optab>si3_mask, <optab>si3_mask_1): New.
8642         (<optab>di3_mask, <optab>di3_mask_1): New.
8643         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8644         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8645         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8647 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8649         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8650         example.
8652 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8654         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8655         (nds32_canonicalize_comparison): New function.
8657 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8658             Kito Cheng  <kito.cheng@gmail.com>
8659             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8661         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8662         * config/nds32/constants.md (unspec_volatile_element): Add
8663         UNSPEC_VOLATILE_RELAX_GROUP.
8664         * config/nds32/nds32-relax-opt.c: New file.
8665         * config/nds32/nds32-predicates.c
8666         (nds32_symbol_load_store_p): New function.
8667         * config/nds32/nds32-protos.h
8668         (nds32_symbol_load_store_p): Declare function.
8669         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8670         * config/nds32/nds32.c
8671         (nds32_register_pass): New function to register pass.
8672         (nds32_register_passes): New function to register passes.
8673         * config/nds32/nds32.md (relax_group): New pattern.
8674         * config/nds32/nds32.opt (mrelax-hint): New option.
8675         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8677 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8679         * config/nds32/t-nds32: Modify files dependency.
8681 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8683         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8684         (PROFILE_HOOK): Define its implementation.
8686 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8688         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8689         type and 32-bit size.
8691 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8693         PR middle-end/85090
8694         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8695         (V_128_256): New mode iterator.
8696         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8697         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8698         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8699         of V.
8700         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8701         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8703 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8705         PR target/83315
8706         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8707         NaN inputs correctly.
8709 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8711         PR target/80546
8712         * config/rs6000/vsx.md (??r): New mode attribute.
8713         (*vsx_mov<mode>_64bit): Use it.
8714         (*vsx_mov<mode>_32bit): Likewise.
8716 2018-03-30  Martin Sebor  <msebor@redhat.com>
8718         PR tree-optimization/84818
8719         * builtins.c (check_access): Use warning_n.
8721 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8723         PR target/83822
8724         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8725         condition.
8726         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8727         condition.
8729 2018-03-30  Julia Koval  <julia.koval@intel.com>
8731         PR target/84413
8732         * x86-tune.def (movx, partial_reg_dependency): Enable for
8733         m_SKYLAKE_AVX512.
8735 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8737         PR inline-asm/84985
8738         * lra-constraints.c (process_alt_operands): Move setting
8739         this_alternative_matches below.
8741 2018-03-29  Martin Liska  <mliska@suse.cz>
8743         PR lto/84995.
8744         * doc/invoke.texi: Document how LTO works with debug info.
8745         Describe auto-load support of binutils.  Mention 'x86-64'
8746         as valid option value of -march option.
8748 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8750         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8752         PR c/85094
8753         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8754         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8755         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8756         checking.
8758 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8760         PR target/84912
8761         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8762         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8763         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8764         for RS6000_BTM_POWERPC64.
8765         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8766         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8767         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8768         definition.
8769         (DIVDE): Use it.
8770         (DIVDEU): Likewise.
8772 2018-03-28 Carl Love  <cel@us.ibm.com>
8774         Revert
8775         2017-09-27  Carl Love  <cel@us.ibm.com>
8777         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8778         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8779         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8780         fctiw instruction.
8782 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8784         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8785         instead of __vector bool.
8786         (_mm_max_pu8): Likewise.
8787         (_mm_min_pi16): Likewise.
8789 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8791         PR target/84912
8792         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8793         (DIVWEUO): Likewise.
8794         (DIVDEO): Likewise.
8795         (DIVDEUO): Likewise.
8796         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8797         DIVWEUO and DIVDEUO.
8798         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8799         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8800         (div_extend): Likewise.
8801         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8802         builtin function.
8803         (__builtin_divweuo): Likewise.
8804         (__builtin_divdeo): Likewise.
8805         (__builtin_divdeuo): Likewise.
8807 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8809         PR target/85095
8810         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8811         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8813         PR tree-optimization/82004
8814         * gimple-match-head.c (optimize_pow_to_exp): New function.
8815         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8816         Don't fold to exp if optimize_pow_to_exp is false.
8818 2018-03-28  Martin Liska  <mliska@suse.cz>
8820         PR other/84819
8821         * calls.c (initialize_argument_information): Fix trailing space.
8822         * common.opt: Fix typo and provide better explanation for
8823         -fsanitize-coverage option.
8824         * config/i386/i386.opt: Fix typo.
8826 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8827             Martin Liska  <mliska@suse.cz>
8829         PR sanitizer/85081
8830         * gimplify.c (asan_poison_variable): Don't do the check for
8831         gimplify_omp_ctxp here.
8832         (gimplify_decl_expr): Do it here.
8833         (gimplify_target_expr): Likewise.
8835 2018-03-28  Martin Liska  <mliska@suse.cz>
8837         PR target/84988
8838         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8839         chkp_type_bounds_count if MPX is not enabled.
8841 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8843         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8845 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8847         PR target/84914
8848         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8849         function to create the function decl for complex long double
8850         multiply and divide for -mabi=ieeelongdouble.
8851         (init_float128_ieee): Call it.
8853 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8855         PR target/85044
8856         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8857         -fcf-protection=branch -mibt.
8858         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8860 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8862         PR target/81863
8863         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8864         arm_word_relocations.
8866 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8868         PR target/85056
8869         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8870         extern array declarations.
8872 2018-03-27  Richard Biener  <rguenther@suse.de>
8874         PR middle-end/84067
8875         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8876         explicit single_use checks.
8878 2018-03-27  Richard Biener  <rguenther@suse.de>
8880         PR tree-optimization/85082
8881         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8882         Valueize the VUSE.
8884 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8886         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8887         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8888         Turn on fasynchronous-unwind-tables and funwind-tables.
8890 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8892         PR target/85073
8893         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8894         (*bmi_blsr_<mode>_ccz): Ditto.
8896 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8898         PR tree-optimization/85063
8899         * omp-general.c (offloading_function_p): New function.  Factor out
8900         of ...
8901         * omp-offload.c (pass_omp_target_link::gate): ... here.
8902         * omp-general.h (offloading_function_p): Declare.
8903         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8904         with attribute omp declare target for offloading functions.
8906 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8908         PR tree-optimization/84005
8909         * tree-data-ref.h (get_base_for_alignment): Declare.
8910         * tree-data-ref.c (get_base_for_alignment_1): New function.
8911         (get_base_for_alignment): Likewise.
8912         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8913         get_base_for_alignment to find a suitable base object, instead
8914         of always using drb->base_address.
8916 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8918         PR inline-asm/85022
8919         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8920         known size by default.
8922 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8924         PR inline-asm/85030
8925         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8926         and non BLKmode operands.
8928 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8930         PR target/85026
8931         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8932         Clean up attributes.
8934 2018-03-23  Richard Biener  <rguenther@suse.de>
8936         PR debug/85020
8937         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8938         we are going to emit early debug for LTO.
8940 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8942         PR inline-asm/85034
8943         * function.c (match_asm_constraints_1): Don't optimize if input
8944         doesn't satisfy general_operand predicate for output's mode.
8946         PR inline-asm/85022
8947         * alias.c (write_dependence_p): Don't require for x_canonicalized
8948         non-VOIDmode if x has VOIDmode.
8950         PR sanitizer/85029
8951         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8952         just don't try to optimize it rather than assert it never happens.
8954 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8956         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8957         macro expansions for definition of ST_INTERNAL_<mode> and
8958         LD_INTERNAL_<mode> builtins.
8959         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8960         Remove prototype.
8961         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8962         function.
8963         (altivec_expand_st_builtin): Likewise.
8964         (altivec_expand_builtin): Remove calls to deleted functions.
8965         (rs6000_address_for_altivec): Delete this function.
8966         * config/rs6000/vector.md: Remove expands for
8967         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8969 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8971         PR target/84826
8972         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8973         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8974         re-computing once computed.
8975         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8976         (arm_init_machine_status): Initialize
8977         machine->static_chain_stack_bytes.
8979 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8981         PR target/84760
8982         * doc/extend.texi: Add four new prototypes for vec_ld.
8983         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8984         definitions for more logical presentation.
8985         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8986         entries for V1TI variants of __builtin_altivec_ld builtin.
8987         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8988         handling of V1TI variant of LVX icode pattern.
8989         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8990         (rs6000_gimple_fold_builtin): Likewise.
8991         (altivec_init_builtins): Add code to define
8992         __builtin_altivec_lvx_v1ti function.
8994 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8996         PR inline-asm/84941
8997         * function.c (match_asm_constraints_1): Don't do the optimization
8998         if input isn't a REG, SUBREG, MEM or constant.
9000 2018-03-22  Tom de Vries  <tom@codesourcery.com>
9002         PR tree-optimization/84956
9003         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9004         bb_has_abnormal_pred.
9006 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
9008         PR sanitizer/85018
9009         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9010         DECL_INITIAL (decl) to decl at the end.
9011         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
9012         adjust the comment.
9014 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
9016         * doc/extend.texi (__builtin_tgmath): Document when complex
9017         integer types are treated as _Complex _Float64.
9019 2018-03-21  Tom de Vries  <tom@codesourcery.com>
9021         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
9023 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9025         PR tree-optimization/84960
9026         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
9027         if it is ENTRY block, move them into single succ of ENTRY in that case.
9029 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
9031         PR tree-optimization/84811
9032         * poly-int.h (poly_span_traits): Remove the T3 parameter and
9033         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
9034         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
9035         (known_subrange_p): Update accordingly.  Cast each value involved
9036         in the size comparison, rather than casting the result of the
9037         subtraction.
9039 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9041         PR tree-optimization/84982
9042         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
9043         by flipping the least significant bit rather than all bits from
9044         bitpos to bitpos + bitsize - 1.
9046 2018-03-21  Nathan Sidwell  <nathan@acm.org>
9048         * doc/extend.texi (Deprecated Features): Remove mention of
9049         long-deleted deprecations.
9051 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9053         PR jit/84288
9054         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
9055         * configure: Regenerate.
9057 2018-03-21  Tom de Vries  <tom@codesourcery.com>
9059         PR tree-optimization/83126
9060         * tree-parloops.c (num_phis): New function.
9061         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
9063 2018-03-21  Nathan Sidwell  <nathan@acm.org>
9065         * doc/extend.texi (Deprecated Features): Update deprecated flags,
9066         mention anon-struct/union members and trailing attributes.
9068 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
9070         PR tree-optimization/84969
9071         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
9072         builtin memset partitions if they set different rhs values.
9074 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9076         PR rtl-optimization/84989
9077         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
9078         VEC_DUPLICATE with scalar result mode.
9080 2018-03-21  Martin Liska  <mliska@suse.cz>
9082         PR ipa/84963
9083         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
9084         not intended return statement.
9086 2018-03-21  Martin Liska  <mliska@suse.cz>
9088         PR target/84988
9089         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
9090         (chkp_find_bound_slots_1): Limit number of iterations.
9092 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
9094         PR target/84838
9095         * Minor grammar fixes for x86 options.
9097 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9099         PR debug/84875
9100         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9101         holding REG_CFA_RESTORE notes, instead turn them into a USE.
9103 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
9105         PR target/83789
9106         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9107         (altivec_lvx_<mode>_1op): Likewise.
9108         (altivec_stvx_<mode>_2op): Likewise.
9109         (altivec_stvx_<mode>_1op): Likewise.
9110         (altivec_lvx_<VM2:mode>): New define_expand.
9111         (altivec_stvx_<VM2:mode>): Likewise.
9112         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9113         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9114         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9115         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9116         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9117         (rs6000_gen_lvx): Likewise.
9118         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9119         (altivec_expand_stv_builtin): Likewise.
9120         (altivec_expand_builtin): Likewise.
9121         * config/rs6000/vector.md: Likewise.
9123 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9125         PR target/82518
9126         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9127         BYTES_BIG_ENDIAN.
9129 2018-03-20  Richard Biener  <rguenther@suse.de>
9131         PR target/84986
9132         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9133         sign-conversions as zero, fall back to standard scalar_stmt
9134         cost for the rest.
9136 2018-03-20  Martin Liska  <mliska@suse.cz>
9138         PR ipa/84825
9139         * predict.c (rebuild_frequencies): Handle case when we have
9140         PROFILE_ABSENT, but flag_guess_branch_prob is false.
9142 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9144         PR target/84990
9145         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9146         flag_section_anchors.
9147         * varasm.c (use_blocks_for_decl_p): Remove hack for
9148         dw2_force_const_mem.
9150         PR target/84845
9151         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9152         to ...
9153         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
9154         be created, use lowpart_subreg of operands[0] rather than operands[0]
9155         itself.
9156         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9157         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9158         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9159         and n constraint instead of aarch64_shift_imm_di and Usd.
9160         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9161         (*aarch64_<optab>_reg_minus<mode>3): ... this.
9163 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
9165         PR target/82989
9166         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9167         to favor GPR over NEON registers.
9168         (<shift>di3_neon): Likewise.
9170 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9172         PR target/84952
9173         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9174         (nvptx_process_pars): Emit bar.sync asap and alap.
9176 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9178         PR target/84954
9179         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9180         seen_label if seen_label is already set.
9182 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9184         PR target/84945
9185         * config/i386/i386.c (fold_builtin_cpu): For features above 31
9186         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9187         Use 1U instead of 1.  Formatting fixes.
9189         PR c/84953
9190         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9191         instead of TREE_TYPE (s1) for the return value.
9193 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
9195         PR tree-optimization/84946
9196         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9197         bitsize + bitsize in poly_uint64 rather than poly_int64.
9199         PR sanitizer/78651
9200         * dwarf2asm.c: Include fold-const.c.
9201         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9202         of decl rather than decl itself.
9204         PR rtl-optimization/84643
9205         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9207 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
9209         PR sanitizer/78651
9210         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9211         calling assemble_variable.
9213 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
9215         PR target/81647
9216         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9217         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9219 2018-03-19  Jim Wilson  <jimw@sifive.com>
9221         PR bootstrap/84856
9222         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9223         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9224         (riscv_first_stack_step): Likewise.
9225         (riscv_option_override): Use STACK_BOUNDARY instead of
9226         MIN_STACK_BOUNDARY.
9227         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9228         MIN_STACK_BOUNDARY.
9229         (BIGGEST_ALIGNMENT): Set to 128.
9230         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9231         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9232         STACK_BOUNDARY.
9234 2018-03-19  Richard Biener  <rguenther@suse.de>
9236         PR tree-optimization/84933
9237         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9238         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9240 2018-03-19  Richard Biener  <rguenther@suse.de>
9242         PR tree-optimization/84859
9243         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9244         (cond_if_else_store_replacement): Perform sinking operation on
9245         single-store BBs regardless of MAX_STORES_TO_SINK setting.
9246         Generalize what a BB with a single eligible store is.
9248 2018-03-19  Richard Biener  <rguenther@suse.de>
9250         PR tree-optimization/84929
9251         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9252         chrec_is_positive against non-chrec arg.
9254 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
9256         PR target/84711
9257         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9259 2018-03-18  Martin Liska  <mliska@suse.cz>
9261         PR rtl-optimization/84635
9262         * regrename.c (build_def_use): Use matches_mode only when
9263         matches >= 0.
9265 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
9267         PR tree-optimization/84913
9268         * tree-vect-loop.c (vectorizable_reduction): Don't try to
9269         vectorize chains of COND_EXPRs.
9271 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9273         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9275 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9277         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9279 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9281         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9283 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9284             Kito Cheng  <kito.cheng@gmail.com>
9286         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9287         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9288         (nds32_adjust_reg_alloc_order): New function.
9289         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9291 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
9293         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9294         nds32_print_operand, nds32_print_operand_address): Use
9295         HOST_WIDE_INT_PRINT_DEC instead.
9297 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9299         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9301 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
9303         PR target/84902
9304         * config/i386/i386.c (initial_ix86_tune_features,
9305         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9306         unsigned long long.
9307         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9308         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9309         rather than 1u << ix86_tune.  Formatting fix.
9310         (ix86_option_override_internal): Change ix86_arch_mask from
9311         unsigned int to unsigned HOST_WIDE_INT, initialize to
9312         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9313         (ix86_function_specific_restore): Likewise.
9315 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9317         PR target/84899
9318         * postreload.c (reload_combine_recognize_pattern): Perform
9319         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9320         truncate_int_for_mode the result for the destination's mode.
9322         PR c/84909
9323         * hsa-gen.c (mem_type_for_type): Fix comment typo.
9324         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9325         Likewise.
9326         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9327         Likewise.
9329 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
9331         PR target/84876
9332         * lra-assigns.c (lra_split_hard_reg_for): Don't use
9333         regno_allocno_class_array and sorted_pseudos.
9334         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9335         insns where regno is used.
9337 2018-03-16  Martin Liska  <mliska@suse.cz>
9339         PR ipa/84833
9340         * multiple_target.c (create_dispatcher_calls): Redirect
9341         reference in the symbol table.
9343 2018-03-16  Martin Liska  <mliska@suse.cz>
9345         PR ipa/84722
9346         * multiple_target.c (create_dispatcher_calls): Redirect also
9347         an alias.
9349 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9351         PR c++/79937
9352         PR c++/82410
9353         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9354         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9355         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9357 2018-03-16  Julia Koval  <julia.koval@intel.com>
9359         * doc/invoke.texi (Skylake Server): Add CLWB.
9360         Cannonlake): Remove CLWB.
9362 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9364         PR tree-optimization/84841
9365         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9366         1 << 3.
9367         (FLOAT_ONE_CONST_TYPE): Define.
9368         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9369         (sort_by_operand_rank): Put entries with higher constant_type last
9370         rather than first to match comments.
9372 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
9374         * config/nios2/nios2.md (movsi_internal): Fix thinko in
9375         split predicate.
9377 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9379         PR c++/79085
9380         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9381         check and use address of target always.
9383 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
9385         PR target/84574
9386         * config/i386/i386.c (indirect_thunk_needed): Update comments.
9387         (indirect_thunk_bnd_needed): Likewise.
9388         (indirect_thunks_used): Likewise.
9389         (indirect_thunks_bnd_used): Likewise.
9390         (indirect_return_needed): New.
9391         (indirect_return_bnd_needed): Likewise.
9392         (output_indirect_thunk_function): Add a bool argument for
9393         function return.
9394         (output_indirect_thunk_function): Don't generate alias for
9395         function return thunk.
9396         (ix86_code_end): Call output_indirect_thunk_function to generate
9397         function return thunks.
9398         (ix86_output_function_return): Set indirect_return_bnd_needed
9399         and indirect_return_needed instead of indirect_thunk_bnd_needed
9400         and indirect_thunk_needed.
9402 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
9404         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9405         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9406         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9408 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
9409             Paul Hua <paul.hua.gm@gmail.com>
9411         PR c/84852
9412         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9414 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
9416         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9417         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9418         resp. SFmode cases.
9420 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
9422         PR target/84711
9423         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9424         instead of GET_MODE_SIZE when comparing Units.
9426 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9428         PR target/68256
9429         * varasm.c (hash_section): Return an unchangeble hash value
9430         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9431         Return !aarch64_can_use_per_function_literal_pools_p ().
9433 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9435         PR target/84860
9436         * optabs.c (emit_conditional_move): Pass address of cmode's copy
9437         rather than address of cmode as last argument to prepare_cmp_insn.
9439 2018-03-15  Julia Koval  <julia.koval@intel.com>
9441         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9442         F_AVX512VNNI, F_AVX512BITALG): New.
9444 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
9446         PR target/83451
9447         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
9448         insn for floating-point loads and stores.
9450 2018-03-14  Carl Love  <cel@us.ibm.com>
9452         * config/rs6000/rs6000-c.c: Add macro definitions for
9453         ALTIVEC_BUILTIN_VEC_PERMXOR.
9454         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9455         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9456         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9457         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9458         UNSPEC_VPERMXOR.
9459         * config/doc/extend.texi: Add prototypes for vec_permxor.
9461 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
9463         PR c/84852
9464         * diagnostic-show-locus.c (class layout_point): Convert m_line
9465         from int to linenum_type.
9466         (line_span::comparator): Use linenum "compare" function when
9467         comparing line numbers.
9468         (test_line_span): New function.
9469         (layout_range::contains_point): Convert param "row" from int to
9470         linenum_type.
9471         (layout_range::intersects_line_p): Likewise.
9472         (layout::will_show_line_p): Likewise.
9473         (layout::print_source_line): Likewise.
9474         (layout::should_print_annotation_line_p): Likewise.
9475         (layout::print_annotation_line): Likewise.
9476         (layout::print_leading_fixits): Likewise.
9477         (layout::annotation_line_showed_range_p): Likewise.
9478         (struct line_corrections): Likewise for field m_row.
9479         (line_corrections::line_corrections): Likewise for param "row".
9480         (layout::print_trailing_fixits): Likewise.
9481         (layout::get_state_at_point): Likewise.
9482         (layout::get_x_bound_for_row): Likewise.
9483         (layout::print_line): Likewise.
9484         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9485         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9486         * input.c (selftest::test_linenum_comparisons): New function.
9487         (selftest::input_c_tests): Call it.
9488         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9489         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9490         * selftest.h (ASSERT_GT): New macro.
9491         (ASSERT_GT_AT): New macro.
9492         (ASSERT_LT): New macro.
9493         (ASSERT_LT_AT): New macro.
9495 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
9497         PR rtl-optimization/84780
9498         * combine.c (distribute_links): Don't make a link based on pc_rtx.
9500 2018-03-14  Martin Liska  <mliska@suse.cz>
9502         * tree.c (record_node_allocation_statistics): Use
9503         get_stats_node_kind.
9504         (get_stats_node_kind): New function extracted from
9505         record_node_allocation_statistics.
9506         (free_node): Use get_stats_node_kind.
9508 2018-03-14  Richard Biener  <rguenther@suse.de>
9510         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9511         that the value-set of ANTIC_IN doesn't grow.
9513         Revert
9514         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9515         member.
9516         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9517         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9519 2018-03-14  Julia Koval  <julia.koval@intel.com>
9521         * config.gcc (icelake-client, icelake-server): New.
9522         (icelake): Remove.
9523         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9524         (initial_ix86_arch_features): Ditto.
9525         (PTA_SKYLAKE): Add SGX.
9526         (PTA_ICELAKE): Remove.
9527         (PTA_ICELAKE_CLIENT): New.
9528         (PTA_ICELAKE_SERVER): New.
9529         (ix86_option_override_internal): Split up icelake on icelake client and
9530         icelake server.
9531         (get_builtin_code_for_version): Ditto.
9532         (fold_builtin_cpu): Ditto.
9533         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9534         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9535         * config/i386/i386.h (processor_type): Ditto.
9536         * doc/invoke.texi: Ditto.
9538 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
9540         PR sanitizer/83392
9541         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9542         INTEGER_CST offset, add it together with bitpos / 8 and
9543         sign extend based on POINTER_SIZE.
9545         PR target/84844
9546         Revert
9547         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
9549         PR target/78090
9550         * config/i386/constraints.md (Yc): New register constraint.
9551         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9552         Use Yc constraint for alternative 2 of operand 0.  Remove
9553         preferred_for_speed attribute.
9555 2018-03-14  Richard Biener  <rguenther@suse.de>
9557         PR tree-optimization/84830
9558         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9559         with the old one to avoid oscillations.
9561 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
9563         PR target/83712
9564         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9565         pseudos.
9566         (assign_by_spills): Return a flag of reload assignment failure.
9567         Do not process the reload assignment failures.  Do not spill other
9568         reload pseudos if they has the same reg class.  Update n if
9569         necessary.
9570         (lra_assign): Add a return arg.  Set up from the result of
9571         assign_by_spills call.
9572         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9573         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9574         usage_insns if it is not NULL.
9575         (spill_hard_reg_in_range): New function.
9576         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9577         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9578         function prototypes.
9579         (lra_assign): Change prototype.
9580         * lra.c (lra): Add code to deal with fails by splitting hard reg
9581         live ranges.
9583 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
9585         * config/riscv/riscv.opt (mrelax): New option.
9586         * config/riscv/riscv.c (riscv_file_start): Emit ".option
9587         "norelax" when riscv_mrelax is disabled.
9588         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9590 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9592         PR target/84743
9593         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9594         reassociation for int modes.
9596 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9598         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9599         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9600         for big-endian.
9601         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9602         * config/aarch64/aarch64-sve.md
9603         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9604         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9605         (*extend<mode><Vwide>2): Rename to...
9606         (aarch64_sve_extend<mode><Vwide>2): ...this.
9607         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9608         renaming the old pattern to...
9609         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
9610         unsigned packs.
9611         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9612         define_expand, renaming the old pattern to...
9613         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9614         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9615         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9616         account when deciding which SVE instruction the optab should use.
9617         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9619 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9621         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9622         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9623         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9624         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9625         (tlsdesc_small_<mode>): Turn a define_expand and use
9626         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9627         (tlsdesc_small_advsimd_<mode>): ...this.
9628         (tlsdesc_small_sve_<mode>): New pattern.
9630 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9632         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9633         (UNSPEC_UMUL_HIGHPART): New constants.
9634         (MUL_HIGHPART): New int iteraor.
9635         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9636         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9637         define_expand.
9638         (*<su>mul<mode>3_highpart): New define_insn.
9640 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9642         PR lto/84805
9643         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9644         incomplete types.
9646 2018-03-13  Martin Liska  <mliska@suse.cz>
9648         PR ipa/84658.
9649         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9650         vector.
9651         (sem_item_optimizer::~sem_item_optimizer): Release it.
9652         (sem_item_optimizer::merge_classes): Register variable aliases.
9653         (sem_item_optimizer::fixup_pt_set): New function.
9654         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9655         * ipa-icf.h: Declare new variables and functions.
9657 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9659         PR middle-end/84834
9660         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9661         integer_pow2p@2 and test integer_pow2p in condition.
9662         (A < 0 ? C : 0): Similarly for @1.
9664         PR middle-end/84831
9665         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9666         characters starting at p contain '\0' character, don't look beyond
9667         that.
9669         PR target/84827
9670         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9671         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9673         PR target/84828
9674         * reg-stack.c (change_stack): Change update_end var from int to
9675         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9676         also call set_block_for_insn on the newly added insns and rescan.
9678         PR target/84786
9679         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9680         on the last operand.
9682         PR c++/84704
9683         * tree.c (stabilize_reference_1): Return save_expr (e) for
9684         STATEMENT_LIST even if it doesn't have side-effects.
9686 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9688         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9690 2018-03-12  Renlin Li  <renlin.li@arm.com>
9692         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9693         aarch64_output_scalar_simd_mov_immediate.
9695 2018-03-12  Martin Sebor  <msebor@redhat.com>
9697         PR tree-optimization/83456
9698         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9699         for perfectly overlapping calls to memcpy.
9700         (gimple_fold_builtin_memory_chk): Same.
9701         (gimple_fold_builtin_strcpy): Handle no-warning.
9702         (gimple_fold_builtin_stxcpy_chk): Same.
9703         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9705 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9707         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9708         parameter.  Use it for SFmode.
9709         (rs6000_function_arg_advance_1): Adjust.
9710         (rs6000_function_arg): Adjust.
9711         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9713 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9715         PR rtl-optimization/84169
9716         PR rtl-optimization/84780
9717         * combine.c (can_combine_p): Check for a 2-insn combination whether
9718         the destination register is used between the two insns, too.
9720 2018-03-12  Richard Biener  <rguenther@suse.de>
9722         PR tree-optimization/84803
9723         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9724         for refs DR analysis didn't process.
9726 2018-03-12  Richard Biener  <rguenther@suse.de>
9728         PR tree-optimization/84777
9729         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9730         force-vectorize loops ignore whether we are optimizing for size.
9732 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9734         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9735         (TARGET_MD_ASM_ADJUST): Define.
9737 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9738             Kito Cheng  <kito.cheng@gmail.com>
9739             Chung-Ju Wu  <jasonwucj@gmail.com>
9741         * config/nds32/nds32.c (nds32_compute_stack_frame,
9742         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9743         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9744         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9745         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9746         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9747         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9748         * config/nds32/nds32.md (prologue, epilogue): Use macro
9749         NDS32_V3PUSH_AVAILABLE_P to do checking.
9751 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9753         PR debug/58150
9754         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9755         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9756         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9757         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9758         addition of most attributes on !orig_type_die or the attribute not
9759         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9761 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9762             Chung-Ju Wu  <jasonwucj@gmail.com>
9764         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9765         __NDS32_VH__ macro.
9766         * config/nds32/nds32.opt (mvh): New option.
9768 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9769             Chung-Ju Wu  <jasonwucj@gmail.com>
9771         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9772         function.
9773         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9774         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9775         definition.
9777 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9778             Chung-Ju Wu  <jasonwucj@gmail.com>
9780         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9781         function.
9782         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9783         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9785 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9786             Kito Cheng  <kito.cheng@gmail.com>
9787             Chung-Ju Wu  <jasonwucj@gmail.com>
9789         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9790         UNSPEC_FFMISM and UNSPEC_FLMISM.
9791         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9792         for ffb, ffmism and flmism.
9793         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9794         (unspec_ffmism): Ditto.
9795         (unspec_flmism): Ditto.
9796         (nds32_expand_builtin_impl): Check if string extension is available.
9797         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9798         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9800 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9802         Reverting patch:
9803         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9805         PR target/83712
9806         * lra-assigns.c (assign_by_spills): Return a flag of reload
9807         assignment failure.  Do not process the reload assignment
9808         failures.  Do not spill other reload pseudos if they has the same
9809         reg class.
9810         (lra_assign): Add a return arg.  Set up from the result of
9811         assign_by_spills call.
9812         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9813         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9814         usage_insns if it is not NULL.
9815         (spill_hard_reg_in_range): New function.
9816         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9817         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9818         function prototypes.
9819         (lra_assign): Change prototype.
9820         * lra.c (lra): Add code to deal with fails by splitting hard reg
9821         live ranges.
9823 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9825         PR target/84807
9826         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9828 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9830         PR debug/84620
9831         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9832         (dw_val_node): Add val_symbolic_view.
9833         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9834         (symview_upper_bound): New.
9835         (new_line_info_table): Initialize symviews_since_reset.
9836         (dwarf2out_source_line): Count symviews_since_reset and set
9837         symview_upper_bound.
9838         (dw_val_equal_p): Handle symview.
9839         (add_AT_symview): New.
9840         (print_dw_val): Handle symview.
9841         (attr_checksum, attr_checksum_ordered): Likewise.
9842         (same_dw_val_p, size_of_die): Likewise.
9843         (value_format, output_die): Likewise.
9844         (add_high_low_attributes): Use add_AT_symview for entry_view.
9845         (dwarf2out_finish): Reset symview_upper_bound, clear
9846         zero_view_p.
9848 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9850         PR target/83969
9851         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9852         Add strict argument and use it.
9853         (rs6000_split_multireg_move): Update for new strict argument.
9854         (mem_operand_gpr): Disallow all non-offsettable addresses.
9855         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9857 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9859         PR target/84772
9860         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9861         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9862         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9864         PR c++/84767
9865         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9866         decl, use remap_type if we want to use the type.
9868 2018-03-09  Martin Sebor  <msebor@redhat.com>
9870         PR tree-optimization/84526
9871         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9872         Remove dead code.
9873         (builtin_access::generic_overlap): Be prepared to handle non-array
9874         base objects.
9876 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9878         PR rtl-optimization/84682
9879         * lra-constraints.c (process_address_1): Check is_address flag
9880         for address constraints.
9881         (process_alt_operands): Likewise.
9882         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9883         preprocess_constraints.
9884         * recog.h (preprocess_constraints): Add oploc parameter.
9885         Adjust callers.
9886         * recog.c (preprocess_constraints): Test address_operand for
9887         CT_ADDRESS constraints.
9889 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9891         PR target/83712
9892         * lra-assigns.c (assign_by_spills): Return a flag of reload
9893         assignment failure.  Do not process the reload assignment
9894         failures.  Do not spill other reload pseudos if they has the same
9895         reg class.
9896         (lra_assign): Add a return arg.  Set up from the result of
9897         assign_by_spills call.
9898         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9899         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9900         usage_insns if it is not NULL.
9901         (spill_hard_reg_in_range): New function.
9902         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9903         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9904         function prototypes.
9905         (lra_assign): Change prototype.
9906         * lra.c (lra): Add code to deal with fails by splitting hard reg
9907         live ranges.
9909 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9911         PR target/83193
9912         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9913         Accept complain bool parameter.  Only emit errors if it is true.
9914         (arm_parse_cpu_option_name): Likewise.
9915         (arm_target_thumb_only): Adjust callers of the above.
9916         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9917         prototype to take a default true bool parameter.
9918         (arm_parse_arch_option_name): Likewise.
9920 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9921             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9923         PR jit/64089
9924         PR jit/84288
9925         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9926         * configure: Regenerate.
9927         * configure.ac ("linker --version-script option"): New.
9928         ("linker soname option"): New.
9930 2018-03-09  Richard Biener  <rguenther@suse.de>
9932         PR tree-optimization/84775
9933         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9934         immediate uses of predicate stmts and mark them modified.
9936         Revert
9937         PR tree-optimization/84178
9938         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9939         to caller.
9940         (version_loop_for_if_conversion): Delay update_ssa call.
9941         (tree_if_conversion): Delay update_ssa until after predicate
9942         insertion.
9944 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9946         PR target/84763
9947         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9948         when the function accesses prior frames.
9950 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9952         PR debug/84456
9953         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9954         gen_llsym, otherwise call maybe_gen_llsym.
9956         PR inline-asm/84742
9957         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9958         has ',' character inside of it.
9960 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9962         PR target/84748
9963         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9964         as clobbering CC_REGNUM.
9966 2018-03-08  Richard Biener  <rguenther@suse.de>
9968         PR middle-end/84552
9969         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9970         (follow_copies_to_constant): Do not follow SSA names registered
9971         for update.
9973 2018-03-08  Richard Biener  <rguenther@suse.de>
9975         PR tree-optimization/84178
9976         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9977         to caller.
9978         (version_loop_for_if_conversion): Delay update_ssa call.
9979         (tree_if_conversion): Delay update_ssa until after predicate
9980         insertion.
9982 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9984         PR tree-optimization/84178
9985         * tree-if-conv.c (release_bb_predicate): Remove the
9986         the assertion that the stmts have NULL use_ops.
9987         Discard the statements, asserting that they haven't
9988         yet been added to a BB.
9990 2018-03-08  Richard Biener  <rguenther@suse.de>
9992         PR tree-optimization/84746
9993         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9994         (phi_translate): Pass in destination ANTIC_OUT set.
9995         (phi_translate_1): Likewise.  For a simplified result lookup
9996         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9997         (phi_translate_set): Adjust.
9998         (do_pre_regular_insertion): Likewise.
9999         (do_pre_partial_partial_insertion): Likewise.
10001 2018-03-08  Martin Liska  <mliska@suse.cz>
10003         PR gcov-profile/84735
10004         * doc/gcov.texi: Document usage of profile files.
10005         * gcov-io.h: Document changes in the format.
10007 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
10009         PR debug/84404
10010         PR debug/84408
10011         * dwarf2out.c (struct dw_line_info_table): Update comments for
10012         view == -1.
10013         (FORCE_RESET_NEXT_VIEW): New.
10014         (FORCE_RESETTING_VIEW_P): New.
10015         (RESETTING_VIEW_P): Check for -1 too.
10016         (ZERO_VIEW_P): Likewise.
10017         (new_line_info_table): Force-reset next view.
10018         (dwarf2out_begin_function): Likewise.
10019         (dwarf2out_source_line): Simplify zero_view_p initialization.
10020         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
10021         view directly.  Omit view when omitting .loc at line 0.
10023 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
10025         PR tree-optimization/84740
10026         * tree-switch-conversion.c (process_switch): Call build_constructors
10027         only if info.phi_count is non-zero.
10029         PR tree-optimization/84739
10030         * tree-tailcall.c (find_tail_calls): Check call arguments against
10031         DECL_ARGUMENTS (current_function_decl) rather than
10032         DECL_ARGUMENTS (func) when checking for tail recursion.
10034 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
10036         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
10037         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
10038         Volker Reichelt's entry and add entries for people that perform
10039         GCC fuzzy testing and report numerous bugs.
10041 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
10043         PR target/82411
10044         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
10045         readonly data in sdata, if that is disabled.
10046         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
10047         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
10048         -mreadonly-in-sdata option.
10050 2018-03-07  Martin Sebor  <msebor@redhat.com>
10052         PR tree-optimization/84468
10053         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
10054         basic block when looking for nul assignment.
10056 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
10058         PR target/84277
10059         * except.h (output_function_exception_table): Adjust prototype.
10060         * except.c (output_function_exception_table): Remove FNNAME parameter
10061         and add SECTION parameter.  Ouput one part of the table at a time.
10062         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
10063         the first part of the exception table and emit unwind directives.
10064         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
10065         (i386_pe_seh_cold_init): Likewise.
10066         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
10067         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
10068         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
10069         (ix86_output_call_insn): Emit a nop in one more case for SEH.
10070         * config/i386/winnt.c: Include except.h.
10071         (struct seh_frame_state): Add reg_offset, after_prologue and
10072         in_cold_section fields.
10073         (i386_pe_seh_end_prologue): Set seh->after_prologue.
10074         (i386_pe_seh_cold_init): New function.
10075         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
10076         to seh->in_cold_section.
10077         (seh_emit_push): Record the offset of the push.
10078         (seh_emit_save): Record the offet of the save.
10079         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
10080         Test seh->after_prologue to disregard the epilogue.
10081         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
10082         (i386_pe_end_cold_function): New function.
10084 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
10086         PR fortran/84565
10087         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
10088         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
10090         PR c++/84704
10091         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
10092         on tmp_var.
10093         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
10094         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10096         PR middle-end/84723
10097         * multiple_target.c: Include tree-inline.h and intl.h.
10098         (expand_target_clones): Diagnose and fail if node->definition and
10099         !tree_versionable_function_p (node->decl).
10101 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
10103         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10104         sprint_ul.
10105         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10106         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10107         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10109 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10111         PR target/84710
10112         * combine.c (try_combine): Use reg_or_subregno instead of handling
10113         just paradoxical SUBREGs and REGs.
10115 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
10117         * config/arc/arc.c (arc_finalize_pic): Remove function.
10118         (arc_must_save_register): We use single base PIC register, remove
10119         checks to save/restore the PIC register.
10120         (arc_expand_prologue): Likewise.
10121         * config/arc/arc-protos.h (arc_set_default_type_attributes):
10122         Remove.
10123         (arc_verify_short): Likewise.
10124         (arc_attr_type): Likewise.
10125         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10126         (walk_stores): Likewise.
10127         (arc_address_cost): Make it static.
10128         (arc_verify_short): Likewise.
10129         (branch_dest): Likewise.
10130         (arc_attr_type): Likewise.
10131         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10132         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10133         (arc_final_prescan_insn): Remove inserting the nops due to
10134         hardware hazards.  It is done in reorg step.
10135         (insn_length_variant_t): Remove.
10136         (insn_length_parameters_t): Likewise.
10137         (arc_insn_length_parameters): Likewise.
10138         (arc_get_insn_variants): Likewise.
10139         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10141 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10143         PR inline-asm/84683
10144         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10145         assertion failure.
10147         PR tree-optimization/84687
10148         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10149         on new_node->decl.
10150         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10152 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10154         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10155         Rename to ppc_speculation_barrier.
10156         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10157         __builtin_ppc_speculation_barrier.
10159 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10161         PR target/84700
10162         * combine.c (combine_simplify_rtx): Don't try to simplify if
10163         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10164         are equal to x.
10166 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
10168         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10169         to 32 bytes when compiling for POWER9.
10171 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10173         PR target/84564
10174         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10175         regparm >= 3 with no arg reg available also for calls with
10176         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
10178         PR target/84524
10179         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10180         orig,vex.
10181         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
10183 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
10185         PR target/84264
10186         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10188 2018-03-05  Richard Biener  <rguenther@suse.de>
10190         PR tree-optimization/84486
10191         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10192         When inserting a __builtin_assume_aligned call set the LHS
10193         SSA name alignment info accordingly.
10195 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
10197         PR tree-optimization/84114
10198         * config/aarch64/aarch64.c (aarch64_reassociation_width)
10199         Avoid reassociation of FLOAT_MODE addition.
10201 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
10203         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10204         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10205         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10206         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10207         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10208         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10209         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10210         and -mwbnoinvd.
10211         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10212         __builtin_ia32_wbinvd): New builtins.
10213         (SPECIAL_ARGS2): New.
10214         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10215         (SPECIAL_ARGS2): New.
10216         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10217         (ix86_valid_target_attribute_inner_p): Ditto.
10218         (ix86_init_mmx_sse_builtins): Add special_args2.
10219         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10220         TARGET_WBNOINVD_P): New.
10221         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10222         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10223         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10224         * config/i386/immintrin.h (_wbinvd): New intrinsic.
10225         * config/i386/pconfigintrin.h: New file.
10226         * config/i386/wbnoinvdintrin.h: Ditto.
10227         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10228         wbnoinvdintrin.h.
10229         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10231 2018-03-05  Richard Biener  <rguenther@suse.de>
10233         PR tree-optimization/84670
10234         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10235         member.
10236         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10237         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10238         (compute_antic_aux): Only assert the number of values in ANTIC_IN
10239         doesn't grow if all successors (recursively) were visited at least
10240         once.
10242 2018-03-05  Richard Biener  <rguenther@suse.de>
10244         PR tree-optimization/84650
10245         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10246         if executed in the loop pipeline.
10248 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
10250         * doc/configfiles.texi (Configuration Files): Move info about
10251         conditionalizing $target-protos.h to...
10252         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
10253         differs from $target-protos.h.
10255 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
10256             Chung-Ju Wu  <jasonwucj@gmail.com>
10258         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10259         * config/nds32/nds32-multiple.md (setmemsi): Define.
10260         * config/nds32/nds32-memory-manipulation.c
10261         (nds32_gen_dup_4_byte_to_word_value): New.
10262         (emit_setmem_word_loop): New.
10263         (emit_setmem_byte_loop): New.
10264         (nds32_expand_setmem_loop): New.
10265         (nds32_expand_setmem_loop_v3m): New.
10266         (nds32_expand_setmem_unroll): New.
10267         (nds32_expand_setmem): New.
10269 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10270             Chung-Ju Wu  <jasonwucj@gmail.com>
10272         * config/nds32/nds32-memory-manipulation.c
10273         (nds32_emit_load_store): New.
10274         (nds32_emit_post_inc_load_store): New.
10275         (nds32_emit_mem_move): New.
10276         (nds32_emit_mem_move_block): New.
10277         (nds32_expand_movmemsi_loop_unknown_size): New.
10278         (nds32_expand_movmemsi_loop_known_size): New.
10279         (nds32_expand_movmemsi_loop): New.
10280         (nds32_expand_movmemsi_unroll): New.
10281         (nds32_expand_movmemqi): Rename ...
10282         (nds32_expand_movmemsi): ... to this.
10283         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10284         (movmemsi): ... to this.
10285         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10286         (nds32_expand_movmemsi): ... to this.
10288 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10289             Monk Chiang  <sh.chiang04@gmail.com>
10290             Chung-Ju Wu  <jasonwucj@gmail.com>
10292         * config/nds32/nds32-protos.h
10293         (nds32_expand_load_multiple): New arguments.
10294         (nds32_expand_store_multiple): Ditto.
10295         (nds32_valid_multiple_load_store): Rename ...
10296         (nds32_valid_multiple_load_store_p): ... to this.
10297         * config/nds32/nds32-memory-manipulation.c
10298         (nds32_expand_load_multiple): Refine implementation.
10299         (nds32_expand_store_multiple): Ditto.
10300         * config/nds32/nds32-multiple.md
10301         (load_multiple): Update nds32_expand_load_multiple interface.
10302         (store_multiple): Update nds32_expand_store_multiple interface.
10303         * config/nds32/nds32-predicates.c
10304         (nds32_valid_multiple_load_store): Rename ...
10305         (nds32_valid_multiple_load_store_p): ... to this and refine
10306         implementation.
10307         * config/nds32/predicates.md
10308         (nds32_load_multiple_and_update_address_operation): New predicate.
10309         (nds32_store_multiple_and_update_address_operation): New predicate.
10311 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10312             Chung-Ju Wu  <jasonwucj@gmail.com>
10314         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10315         (combo): New attribute.
10316         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10318 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10320         * config/nds32/nds32.opt: Change -mcmodel= default value.
10322 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
10323             Monk Chiang  <sh.chiang04@gmail.com>
10324             Chung-Ju Wu  <jasonwucj@gmail.com>
10326         * config/nds32/constants.md (unspec_element): New enum.
10327         * config/nds32/constraints.md (Umw): New constraint.
10328         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10329         * config/nds32/nds32-intrinsic.md: Likewise.
10330         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10331         (nds32_valid_smw_lwm_base_p): New.
10332         (nds32_output_smw_single_word): New.
10333         (nds32_output_lmw_single_word): New.
10334         (nds32_expand_unaligned_load): New.
10335         (nds32_expand_unaligned_store): New.
10336         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10337         (nds32_output_smw_single_word): Declare.
10338         (nds32_output_lmw_single_word): Declare.
10339         (nds32_expand_unaligned_load): Declare.
10340         (nds32_expand_unaligned_store): Declare.
10341         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10342         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10343         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10344         NDS32_BUILTIN_UASTORE_DW.
10345         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10346         predicate.
10348 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
10349             Kito Cheng  <kito.cheng@gmail.com>
10350             Chung-Ju Wu  <jasonwucj@gmail.com>
10352         * config/nds32/nds32-intrinsic.c
10353         (nds32_expand_builtin_null_ftype_reg): Delete.
10354         (nds32_expand_builtin_reg_ftype_imm): Ditto.
10355         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10356         (nds32_read_argument): New.
10357         (nds32_legitimize_target): Ditto.
10358         (nds32_legitimize_argument): Ditto.
10359         (nds32_check_constant_argument): Ditto.
10360         (nds32_expand_unop_builtin): Ditto.
10361         (nds32_expand_unopimm_builtin): Ditto.
10362         (nds32_expand_binop_builtin): Ditto.
10363         (nds32_builtin_decl_impl): Ditto.
10364         (builtin_description): Ditto.
10365         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10366         (nds32_init_builtins_impl): Ditto.
10367         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10368         (nds32_builtin_decl): New.
10369         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10370         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10372 2018-03-02  Jeff Law  <law@redhat.com>
10374         * reorg.c (stop_search_p): Handle DEBUG_INSN.
10375         (redundant_insn, fill_simple_delay_slots): Likewise.
10376         (fill_slots_from_thread): Likewise.
10377         * resource.c (mark_referenced_resources): Likewise.
10378         (mark_set_resources, find_dead_or_set_registers): Likewise.
10380 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10382         * substring-locations.h (format_warning_va): Formatting fix for
10383         ATTRIBUTE_GCC_DIAG.
10384         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10385         argument.
10386         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10387         * substring-locations.c: Include intl.h.
10388         (format_warning_va): Turned into small wrapper around
10389         format_warning_n_va, renamed to ...
10390         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10391         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10392         use ngettext.
10393         (format_warning_at_substring_n): New function.
10394         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10395         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
10396         format_warning_at_substring with just a shorter name instead of
10397         const function pointer.
10398         (fmtwarn_n): New function.
10399         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10400         appropriate, get rid of all the fmtstr temporaries, move conditionals
10401         with G_() wrapped string literals directly into fmtwarn arguments,
10402         cast dir.len to (int), formatting fixes.
10404 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
10406         * doc/invoke.texi: Remove "Cilk Plus" references.
10408 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10409             Richard Biener  <rguenther@suse.de>
10411         PR ipa/84628
10412         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10413         for error or warning attributes if CALL_FROM_THUNK_P is set.
10414         Formatting fixes.
10416 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10418         PR target/56540
10419         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10420         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10422         PR target/56540
10423         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10424         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10426         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10427         instead of -1U in last predictors element's probability member.
10429 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10431         PR ipa/83983
10432         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10433         arguments if they are comparable.
10435 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10437         PR tree-optimization/84634
10438         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10439         masks and masked_loop_p with a single loop_masks, making sure it's
10440         null for bb vectorization.
10442 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10444         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10445         (vect_analyze_data_ref_access): Use loop->safe_len rather than
10446         loop->force_vectorize to check whether there is no alias.
10448 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10450         PR target/84614
10451         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10452         prototypes.
10453         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10454         comments.
10455         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10456         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10457         instead of a loop around prev_real_insn.
10458         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10459         prev_real_insn.
10461         PR inline-asm/84625
10462         * config/i386/i386.c (ix86_print_operand): Use conditional
10463         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10464         zero vector.
10466 2018-03-02  Richard Biener  <rguenther@suse.de>
10468         PR tree-optimization/84427
10469         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10470         (bitmap_set_subtract_values): Rewrite to handle multiple
10471         exprs per value.
10472         (clean): Likewise.
10473         (prune_clobbered_mems): Likewise.
10474         (phi_translate): Take edge instead of pred/phiblock.
10475         (phi_translate_1): Likewise.
10476         (phi_translate_set): Likewise.  Insert all translated
10477         exprs for a value into the set, keeping possibly multiple
10478         expressions per value.
10479         (compute_antic_aux): Adjust for phi_translate changes.
10480         When intersecting union the expressions and prune those
10481         not in the final value set, keeping possibly multiple
10482         expressions per value.  Do not use value-insertion
10483         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10484         all expressions.  Add verification that the value-sets
10485         only shrink during iteration.
10486         (compute_partial_antic_aux): Adjust for the phi_translate changes.
10487         (do_pre_regular_insertion): Likewise.
10488         (do_pre_partial_partial_insertion): Likewise.
10490 2018-03-02  Richard Biener  <rguenther@suse.de>
10492         PR target/82005
10493         * config/darwin.c (saved_debug_info_level): New static global.
10494         (darwin_asm_lto_start): Disable debug info generation for LTO out.
10495         (darwin_asm_lto_end): Restore debug info generation settings.
10497 2018-03-01  Martin Liska  <mliska@suse.cz>
10499         PR sanitizer/82484
10500         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10501         volatile arguments.
10503 2018-03-01  Richard Biener  <rguenther@suse.de>
10505         PR debug/84645
10506         * dwarf2out.c (gen_variable_die): Properly handle late VLA
10507         type annotation with LTO when debug was disabled at compile-time.
10509 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
10511         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10512         XINT with INTVAL.
10513         (mips_final_postscan_insn): Likewise.
10515 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
10517         PR rtl-optimization/84528
10518         * alias.c (init_alias_target): Add commentary.
10519         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10520         a unique base value if the frame pointer is not eliminated
10521         to the stack pointer.
10523 2018-03-01  Tom de Vries  <tom@codesourcery.com>
10525         PR rtl-optimization/83327
10526         * lra-int.h (hard_regs_spilled_into): Declare.
10527         * lra.c (hard_regs_spilled_into): Define.
10528         (init_reg_info): Init hard_regs_spilled_into.
10529         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10530         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10531         (process_bb_lives): Handle hard_regs_spilled_into.
10532         (lra_create_live_ranges_1): Before doing liveness propagation, clear
10533         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10535 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
10537         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10538         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10539         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10540         * config/rs6000/aix72.h: New file.
10542 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
10544         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10545         instead of warning_at with conditional singular and plural messages
10546         where possible.
10548         PR target/52991
10549         * stor-layout.c (update_alignment_for_field): For
10550         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10551         && !DECL_PACKED (field), do the alignment update, just use
10552         only desired_align instead of MAX (type_align, desired_align)
10553         as the alignment.
10554         (place_field): Don't do known_align < desired_align handling
10555         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10556         is non-NULL, instead do it after rli->prev_field handling and
10557         only if not within a bitfield word.  For DECL_PACKED (field)
10558         use type_align of BITS_PER_UNIT.
10560 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
10562         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10563         superfluous parentheses and trailing spaces.
10565 2018-02-28  Richard Biener  <rguenther@suse.de>
10567         PR tree-optimization/84584
10568         * graphite-scop-detection.c (scop_detection::add_scop): Discard
10569         SCoPs with fake exit edge.
10571 2018-02-28  Martin Liska  <mliska@suse.cz>
10573         PR testsuite/84597
10574         * timevar.c (timer::print): Fix format to properly print 100%
10575         values.
10577 2018-02-28  Richard Biener  <rguenther@suse.de>
10579         PR middle-end/84607
10580         * genmatch.c (capture_info::walk_match): Do not mark
10581         captured expressions without operands as expr_p given
10582         they act more like predicates and should be subject to
10583         "lost tail" side-effect preserving.
10585 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
10587         PR rtl-optimization/81611
10588         * auto-inc-dec.c (attempt_change): Move dead note from
10589         mem_insn if it's the next use of regno
10590         (find_address): Take address use of reg holding
10591         non-incremented value.  Add parm to limit search to the named
10592         reg only.
10593         (merge_in_block): Attempt to use a mem insn that is the next
10594         use of the original regno.
10596 2018-02-27  Martin Sebor  <msebor@redhat.com>
10598         PR c++/83871
10599         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10600         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10602 2018-02-27  Martin Sebor  <msebor@redhat.com>
10604         PR translation/84207
10605         * diagnostic-core.h (warning_n, error_n, inform_n): Change
10606         n argument to unsigned HOST_WIDE_INT.
10607         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10608         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
10609         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10610         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10612 2018-02-27  Richard Biener  <rguenther@suse.de>
10614         PR tree-optimization/84512
10615         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10616         Do not use the estimate returned from record_stmt_cost for
10617         the scalar iteration cost but sum properly using add_stmt_cost.
10619 2018-02-27  Richard Biener  <rguenther@suse.de>
10621         PR tree-optimization/84466
10622         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10623         Adjust last change to less strictly validate use operands.
10625 2018-02-27  Martin Liska  <mliska@suse.cz>
10627         PR gcov-profile/84548
10628         * gcov.c (process_file): Allow partial overlap and consider it
10629         also as group functions.
10630         (output_lines): Properly calculate range of lines for a group.
10632 2018-02-27  Martin Liska  <mliska@suse.cz>
10634         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10635         'ggc' suffixes.  Change first column width.
10636         (timer::print): Fix formatting of the column.
10638 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10640         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10641         preserve inline entry blocks for the sake of debug inline
10642         entry point markers alone.
10643         (remove_unused_locals): Suggest in comments a better place to
10644         force the preservation of inline entry blocks that are
10645         otherwise unused, but do not preserve them.
10647 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10649         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10651 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10653         PR target/84039
10654         * config/i386/constraints.md (Bs): Replace
10655         ix86_indirect_branch_register with
10656         TARGET_INDIRECT_BRANCH_REGISTER.
10657         (Bw): Likewise.
10658         * config/i386/i386.md (indirect_jump): Likewise.
10659         (tablejump): Likewise.
10660         (*sibcall_memory): Likewise.
10661         (*sibcall_value_memory): Likewise.
10662         Peepholes of indirect call and jump via memory: Likewise.
10663         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10664         (*sibcall_value_GOT_32): Likewise.
10665         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10666         (GOT_memory_operand): Likewise.
10667         (call_insn_operand): Likewise.
10668         (sibcall_insn_operand): Likewise.
10669         (GOT32_symbol_operand): Likewise.
10670         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10672 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10674         PR rtl-optimization/83496
10675         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10676         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10677         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10678         redundant insn, if any.
10679         (relax_delay_slots): Likewise.
10680         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10682 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10684         PR tree-optimization/83965
10685         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10686         that grouped statements are part of a reduction chain.  Return
10687         true if the statement is not marked as a reduction itself but
10688         is part of a group.
10689         (vect_recog_dot_prod_pattern): Don't check whether the statement
10690         is part of a group here.
10691         (vect_recog_sad_pattern): Likewise.
10692         (vect_recog_widen_sum_pattern): Likewise.
10694 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10696         PR debug/84545
10697         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10699 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10701         PR target/84530
10702         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10703         the bool argument.
10704         (ix86_output_indirect_function_return): New prototype.
10705         (ix86_split_simple_return_pop_internal): Likewise.
10706         * config/i386/i386.c (indirect_return_via_cx): New.
10707         (indirect_return_via_cx_bnd): Likewise.
10708         (indirect_thunk_name): Handle return va CX_REG.
10709         (output_indirect_thunk_function): Create alias for
10710         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10711         (ix86_output_indirect_jmp): Remove the bool argument.
10712         (ix86_output_indirect_function_return): New function.
10713         (ix86_split_simple_return_pop_internal): Likewise.
10714         * config/i386/i386.md (*indirect_jump): Don't pass false
10715         to ix86_output_indirect_jmp.
10716         (*tablejump_1): Likewise.
10717         (simple_return_pop_internal): Change it to define_insn_and_split.
10718         Call ix86_split_simple_return_pop_internal to split it for
10719         -mfunction-return=.
10720         (simple_return_indirect_internal): Call
10721         ix86_output_indirect_function_return instead of
10722         ix86_output_indirect_jmp.
10724 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10726         PR bootstrap/84405
10727         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10728         memset and value initialization afterwards.
10730 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10732         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10734 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10736         PR target/84521
10737         * common/config/aarch64/aarch64-common.c
10738         (aarch_option_optimization_table[]): Switch
10739         off fomit-frame-pointer
10741 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10742             Chung-Ju Wu  <jasonwucj@gmail.com>
10744         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10745         volatile memory.
10746         (store_multiple): Ditto.
10748 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10750         * config.gcc: Add --with-cpu support for nds32 target.
10751         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10752         * config/nds32/nds32.opt: Add -mcpu= option.
10754 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10756         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10757         isel=yes): Warn for these deprecated options.
10759 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10761         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10762         ISA_2_5_MASKS_EMBEDDED.
10764 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10766         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10767         p->max as pointers rather than using iterative_hash_expr.
10769 2018-02-23  Carl Love  <cel@us.ibm.com>
10771         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10772         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10773         BU_P8V_OVERLOAD_2.
10774         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10775         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10776         P8V_BUILTIN_VEC_VUNSIGNED2.
10778 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10780         PR target/81572
10781         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10782         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10783         LRA_UNKNOWN_ALT.
10784         * lra-constraints.c (curr_insn_transform): Set up
10785         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10786         LRA_UNKNOWN_ALT.
10787         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10788         * lra-eliminations.c (spill_pseudos): Ditto.
10789         (process_insn_for_elimination): Ditto.
10790         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10791         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10792         LRA_NON_CLOBBERED_ALT.
10794 2018-02-22  Martin Sebor  <msebor@redhat.com>
10796         PR tree-optimization/84480
10797         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10798         to maybe_diag_stxncpy_trunc.  Call it.
10799         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10800         from gimple_fold_builtin_strcpy.  Print inlining stack.
10801         (handle_builtin_stxncpy): Print inlining stack.
10802         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10804 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10806         PR target/84176
10807         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10808         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10809         and -fcheck-pointer-bounds are used together.
10810         (indirect_thunk_prefix): New enum.
10811         (indirect_thunk_need_prefix): New function.
10812         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10813         "_nt" instead of "_bnd" for NOTRACK prefix.
10814         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10815         (output_indirect_thunk_function): Likewise.
10816         (): Likewise.
10817         (ix86_code_end): Update output_indirect_thunk_function calls.
10818         (ix86_output_indirect_branch_via_reg): Replace
10819         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10820         (ix86_output_indirect_branch_via_push): Likewise.
10821         (ix86_output_function_return): Likewise.
10822         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10823         incompatible with -fcf-protection=branch and
10824         -fcheck-pointer-bounds.
10826 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10828         PR target/83335
10829         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10830         Change gcc_assert call to output_operand_lossage.
10832 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10834         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10836 2018-02-22  DJ Delorie  <dj@redhat.com>
10837             Sebastian Perta  <sebastian.perta@renesas.com>
10838             Oleg Endo  <olegendo@gcc.gnu.org>
10840         * config/rx/rx.c (rx_rtx_costs): New function.
10841         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10843 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10845         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10847 2018-02-22  Martin Liska  <mliska@suse.cz>
10849         PR driver/83193
10850         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10851         Add "native" as a possible value.
10853 2018-02-22  Martin Liska  <mliska@suse.cz>
10855         PR driver/83193
10856         * config/i386/i386.c (ix86_option_override_internal):
10857         Add "native" as a possible value for -march and -mtune.
10859 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10861         PR target/84502
10862         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10863         to all type variants.
10865         PR tree-optimization/84503
10866         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10867         width as info->bitpos + info->bitsize - start.
10868         (merged_store_group::merge_overlapping): Simplify width computation.
10869         (check_no_overlap): New function.
10870         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10871         start + width and last_order of the group, fail if check_no_overlap
10872         fails.
10873         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10874         to group if check_no_overlap fails.
10876 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10878         * config/rs6000/altivec.md: Delete contraint arguments to
10879         define_expand, define_split, and define_peephole2, and in
10880         define_insn_and_split if always unused.
10881         * config/rs6000/darwin.md: Ditto.
10882         * config/rs6000/dfp.md: Ditto.
10883         * config/rs6000/rs6000.md: Ditto.
10884         * config/rs6000/sync.md: Ditto.
10885         * config/rs6000/vector.md: Ditto.
10886         * config/rs6000/vsx.md: Ditto.
10888 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10890         * config/rs6000/altivec.md: Write output control strings as braced
10891         blocks instead of double-quoted strings.
10892         * config/rs6000/darwin.md: Ditto.
10893         * config/rs6000/rs6000.md: Ditto.
10894         * config/rs6000/vector.md: Ditto.
10895         * config/rs6000/vsx.md: Ditto.
10897 2018-02-21  Jason Merrill  <jason@redhat.com>
10899         PR c++/84314 - ICE with templates and fastcall attribute.
10900         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10902 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10904         * ipa-cp.c (determine_versionability): Fix comment typos.
10906 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10908         PR c/84229
10909         * ipa-cp.c (determine_versionability): Do not version functions caling
10910         va_arg_pack.
10912 2018-02-21  Martin Liska  <mliska@suse.cz>
10914         PR driver/83193
10915         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10916         Add "native" as a possible value.
10917         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10918         the macro when native cpu detection is available.
10920 2018-02-21  Martin Liska  <mliska@suse.cz>
10922         PR driver/83193
10923         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10924         Add "native" as a possible value.
10925         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10926         when native cpu detection is available.
10928 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10929             Martin Sebor  <msebor@redhat.com>
10931         PR tree-optimization/84478
10932         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10933         false.
10934         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10935         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10936         support which is conservatively correct, for 2 only stay conservative
10937         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10938         argument to the 2 argument get_range_strlen, adjust 6 arg
10939         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10940         false.
10941         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10942         (gimple_fold_builtin_strlen): Pass true as last argument to
10943         get_range_strlen.
10945 2018-02-20  Martin Sebor  <msebor@redhat.com>
10947         PR middle-end/84095
10948         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10949         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10950         (builtin_memref::builtin_memref): Factor out parts into
10951         set_base_and_offset and call it.
10953 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10955         PR middle-end/84406
10956         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10957         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10958         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10959         search at the associated MODE_INT.
10961 2018-02-20  Jeff Law  <law@redhat.com>
10963         PR middle-end/82123
10964         PR tree-optimization/81592
10965         PR middle-end/79257
10966         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10967         for range data rather than using global data.
10968         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10969         range data rather than using global data.
10970         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10971         pass it to children as needed.
10972         (struct directive::fmtresult): Similarly.
10973         (struct directive::set_width): Similarly.
10974         (struct directive::set_precision): Similarly.
10975         (format_integer, format_directive, parse_directive): Similarly.
10976         (format_none): Accept unnamed vr_values parameter.
10977         (format_percent, format_floating, format_character): Similarly.
10978         (format_string, format_plain): Similarly.
10979         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10980         the EVRP range analyzer for range data rather than using global data.
10981         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10982         gimple-ssa-evrp-analyze.h
10983         (class sprintf_dom_walker): Add after_dom_children member function.
10984         Add evrp_range_analyzer member.
10985         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10986         range analyzer as needed.
10987         (sprintf_dom_walker::after_dom_children): New member function.
10988         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10989         if not optimizing.
10990         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10991         (evrp_range_analyzer::pop_to_marker): Likewise.
10993 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10995         PR tree-optimization/84419
10996         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10997         with the required type if its current type is compatible but
10998         different.
11000 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
11002         PR middle-end/82004
11003         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11004         after vectorization.
11006 2018-02-20  Martin Liska  <mliska@suse.cz>
11008         PR driver/83193
11009         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11010         possible values if we don't have a hint.
11012 2018-02-20  Martin Liska  <mliska@suse.cz>
11014         PR c/84310
11015         PR target/79747
11016         * final.c (shorten_branches): Build align_tab array with one
11017         more element.
11018         * opts.c (finish_options): Add alignment option limit check.
11019         (MAX_CODE_ALIGN): Likewise.
11020         (MAX_CODE_ALIGN_VALUE): Likewise.
11021         * doc/invoke.texi: Document maximum allowed option value for
11022         all -falign-* options.
11024 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
11026         PR target/84146
11027         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
11028         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
11029         * var-tracking.c (emit_note_insn_var_location): Remove all references
11030         to NOTE_INSN_CALL_ARG_LOCATION.
11031         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
11032         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
11033         Use copy_rtx_if_shared.
11034         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
11035         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
11036         (dwarf2out_var_location): Remove handling of
11037         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
11038         on call_insn.
11039         * final.c (final_scan_insn): Remove all references to
11040         NOTE_INSN_CALL_ARG_LOCATION.
11041         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
11042         before dumping final insns.
11043         * except.c (emit_note_eh_region_end): Remove all references to
11044         NOTE_INSN_CALL_ARG_LOCATION.
11045         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
11046         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
11047         * config/arc/arc.c (hwloop_optimize): Likewise.
11048         * config/arm/arm.c (create_fix_barrier): Likewise.
11049         * config/s390/s390.c (s390_chunkify_start): Likewise.
11050         * config/sh/sh.c (find_barrier): Likewise.
11051         * config/i386/i386.c (rest_of_insert_endbranch,
11052         ix86_seh_fixup_eh_fallthru): Likewise.
11053         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
11054         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
11055         * config/frv/frv.c (frv_function_prologue): Likewise.
11056         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
11057         reg note.
11058         (note_outside_basic_block_p): Remove all references to
11059         NOTE_INSN_CALL_ARG_LOCATION.
11060         * gengtype.c (adjust_field_rtx_def): Likewise.
11061         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
11062         Likewise.
11063         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
11064         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
11066         PR c++/84444
11067         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
11068         is ADDR_EXPR.
11070         PR tree-optimization/84452
11071         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
11072         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
11073         is NULL.
11075 2018-02-19  Martin Liska  <mliska@suse.cz>
11077         PR sanitizer/82183
11078         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
11080 2018-02-19  Martin Liska  <mliska@suse.cz>
11081             Richard Sandiford  <richard.sandiford@linaro.org>
11083         PR tree-optimization/82491
11084         * gimple-fold.c (get_base_constructor): Make earlier bail out
11085         to prevent ubsan.
11087 2018-02-19  Carl Love  <cel@us.ibm.com>
11089         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
11090         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
11091         BU_P8V_OVERLOAD_1.
11092         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
11093         P8V_BUILTIN_VEC_NEG.
11095 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
11097         * config/rl78/rl78.md (movdf): New define expand.
11099 2018-02-19  Martin Liska  <mliska@suse.cz>
11101         PR other/80589
11102         * doc/invoke.texi: Fix typo.
11103         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11105 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
11107         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11108         handle rs6000_single_float and rs6000_double_float specially for
11109         e500 family CPUs.
11111 2018-02-16  Jeff Law  <law@redhat.com>
11113         * config/rx/rx.c (add_pop_cfi_notes): New function.;
11114         (pop_regs): Use it.
11116 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11118         PR ipa/84425
11119         * ipa-inline.c (inline_small_functions): Fix a typo.
11121 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11123         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11125 2018-02-16  Carl Love  <cel@us.ibm.com>
11127         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11128         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11129         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11130         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11131         expansion to P8V_BUILTIN_VEC_FLOAT2.
11133 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
11135         PR rtl-optimization/70023
11136         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11137         src_regno into account.
11139 2018-02-16  Carl Love  <cel@us.ibm.com>
11141         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11142         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11143         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11144         * config/rs6000/rs6000.c: Remove case statements for
11145         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11146         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11147         and P9V_BUILTIN_VEC_VINSERT4B.
11148         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11149         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11150         * config/rs6000/vsx.md:
11151         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11152         vec_insert4b.
11154 2018-02-16  Carl Love  <cel@us.ibm.com>
11156         * config/rs6000/altivec.h: Add builtin names vec_extract4b
11157         vec_insert4b.
11158         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11159         definitions.
11160         * config/rs6000/rs6000-c.c: Add the definitions for
11161         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11162         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11163         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11164         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
11165         definition for insert4b and define insn *insert3b_internal.
11166         * doc/extend.texi: Add documentation for vec_extract4b.
11168 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11170         * doc/extend.texi (Backwards Compatibility): Mention friend
11171         injection.  Note for-scope is deprecated.
11172         * doc/invoke.texi (-ffriend-injection): Deprecate.
11174 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
11176         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11177         that moved to I2, also allow destinations that are a paradoxical
11178         subreg (instead of a normal reg).
11180 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
11182         PR target/83831
11183         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11184         to QImode.
11186 2018-02-16  Richard Biener  <rguenther@suse.de>
11188         PR tree-optimization/84037
11189         PR tree-optimization/84016
11190         PR target/82862
11191         * config/i386/i386.c (ix86_builtin_vectorization_cost):
11192         Adjust vec_construct for the fact we need additional higher latency
11193         128bit inserts for AVX256 and AVX512 vector builds.
11194         (ix86_add_stmt_cost): Scale vector construction cost for
11195         elementwise loads.
11197 2018-02-16  Richard Biener  <rguenther@suse.de>
11199         PR tree-optimization/84417
11200         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11201         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11202         (non_rewritable_lvalue_p): Likewise, use poly-ints.
11204 2018-02-16  Martin Liska  <mliska@suse.cz>
11206         PR sanitizer/84307
11207         * internal-fn.def (ASAN_CHECK): Set proper flags.
11208         (ASAN_MARK): Likewise.
11210 2018-02-16  Julia Koval  <julia.koval@intel.com>
11212         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11213         from PTA_CANNONLAKE.
11215 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11217         PR target/84272
11218         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11219         Use ++iter rather than iter++ for std::list iterators.
11220         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
11221         defer deleting them until all nodes in the forest are processed.  Do
11222         free even leaf nodes.  Change to_process into auto_vec.
11224         PR bootstrap/84405
11225         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11226         * vec.h (vec_default_construct): Use memset instead of placement new
11227         if BROKEN_VALUE_INITIALIZATION is defined.
11228         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11229         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11230         is defined.
11232         PR rtl-optimization/83723
11233         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11234         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
11235         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
11236         recursive calls.
11237         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11238         callers.
11239         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11241 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
11243         PR rtl-optimization/81443
11244         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11245         from inner REGs to paradoxical SUBREGs.
11247 2018-02-16  Richard Biener  <rguenther@suse.de>
11249         PR tree-optimization/84399
11250         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11251         For operands we can analyze at their definition make sure we can
11252         analyze them at each use as well.
11254 2018-02-16  Richard Biener  <rguenther@suse.de>
11256         PR tree-optimization/84190
11257         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11258         volatile accesses if the decl isn't volatile.
11260 2018-02-15  Jason Merrill  <jason@redhat.com>
11262         PR c++/84314 - ICE with templates and fastcall attribute.
11263         * attribs.c (build_type_attribute_qual_variant): Don't clobber
11264         TYPE_CANONICAL on an existing type.
11266 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
11268         PR tree-optimization/84383
11269         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11270         dstoff nor call operand_equal_p if dstbase is NULL.
11272         PR tree-optimization/84334
11273         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11274         also a CONSTANT_CLASS_P, punt.
11276 2018-02-14  Jim Wilson  <jimw@sifive.com>
11278         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11279         first SMALL_OPERAND check.  New local min_second_step.  Move assert
11280         to where locals are set.  Add TARGET_RVC support.
11281         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11283 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
11285         * doc/invoke.texi: Correct -Wformat-overflow code sample.
11287 2018-02-14  Martin Sebor  <msebor@redhat.com>
11289         PR tree-optimization/83698
11290         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11291         arrays constrain the offset range to their bounds.
11292         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11293         (builtin_access::overlap): Avoid setting the size of overlap if it's
11294         already been set.
11295         (maybe_diag_overlap): Also consider arrays when deciding what values
11296         of offsets to include in diagnostics.
11298 2018-02-14  Martin Sebor  <msebor@redhat.com>
11300         PR c/84108
11301         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11302         that correspond to the kind of a declaration.
11304 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
11306         PR target/83984
11307         * config/pa/pa.md: Load address of PIC label using the linkage table
11308         if the label is nonlocal.
11310 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11312         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11313         warning message if user requests -maltivec=be.
11314         * doc/invoke.texi: Document deprecation of -maltivec=be.
11316 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
11318         PR target/84220
11319         * config/rs6000/rs6000-c.c: Update definitions for
11320         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11321         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11323 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11325         PR target/84239
11326         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11327         add _get_ssp intrinsics. Remove argument from
11328         __builtin_ia32_rdssp[d|q].
11329         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11330         * config/i386/i386-builtin.def: Remove argument from
11331         __builtin_ia32_rdssp[d|q].
11332         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11333         ix86_expand_special_args_builtin for _rdssp[d|q].
11334         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11335         Clear register before usage.
11336         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11337         Add documentation for new _get_ssp and _inc_ssp intrinsics.
11339 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
11341         PR tree-optimization/84357
11342         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11343         operand 1 of an ARRAY_REF too.
11345 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
11347         PR target/83831
11348         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11349         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11350         declarations.
11351         (set_of_reg): New struct.
11352         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11353         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11354         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11355         functions.
11356         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11357         Split into bitclr, bitset, bitinvert patterns if appropriate.
11358         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11359         use rx_fuse_in_memory_bitop.
11360         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11361         to named insn, correct maximum insn length.
11363 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
11365         PR target/79242
11366         * machmode.def: Define a complex mode for PARTIAL_INT.
11367         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11368         MODE_PARTIAL_INT.
11369         * doc/rtl.texi: Document CSPImode.
11370         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11371         handling.
11372         (msp430_hard_regno_nregs_with_padding): Likewise.
11374 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
11376         PR target/84279
11377         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11379 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
11381         PR rtl-optimization/84169
11382         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
11383         we generated a parallel as new i3 and we split that to new i2 and i3
11384         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
11385         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
11386         those to i2, not i1.  Partially rewrite this scan code.
11388 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11390         PR c/82210
11391         * stor-layout.c (place_field): For variable length fields, adjust
11392         offset_align afterwards not just based on the field's alignment,
11393         but also on the size.
11395         PR middle-end/84309
11396         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11397         of exps and logs in the use_exp2 case.
11399 2018-02-13  Jeff Law  <law@redhat.com>
11401         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11402         entry for "vector".
11404         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11405         ARGS as unused.
11407 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
11409         PR debug/84342
11410         PR debug/84319
11411         * common.opt (gas-loc-support, gas-locview-support): New.
11412         (ginline-points, ginternal-reset-location-views): New.
11413         * doc/invoke.texi: Document them.  Use @itemx where intended.
11414         (gvariable-location-views): Adjust.
11415         * target.def (reset_location_view): New.
11416         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11417         (TARGET_RESET_LOCATION_VIEW): New.
11418         * doc/tm.texi: Rebuilt.
11419         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11420         (dwarf2out_default_as_locview_support): New.
11421         (output_asm_line_debug_info): Use option variables.
11422         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11423         (output_loc_list): Likewise.
11424         (add_high_low_attributes): Check option variables.
11425         Don't output entry view attribute in strict mode.
11426         (gen_inlined_subroutine_die): Check option variables.
11427         (dwarf2out_inline_entry): Likewise.
11428         (init_sections_and_labels): Likewise.
11429         (dwarf2out_early_finish): Likewise.
11430         (maybe_reset_location_view): New, from...
11431         (dwarf2out_var_location): ... here.  Call it.
11432         * debug.h (dwarf2out_default_as_loc_support): Declare.
11433         (dwarf2out_default_as_locview_support): Declare.
11434         * hooks.c (hook_int_rtx_insn_0): New.
11435         * hooks.h (hook_int_rtx_insn_0): Declare.
11436         * toplev.c (process_options): Take -gas-loc-support and
11437         -gas-locview-support from dwarf2out.  Enable
11438         -gvariable-location-views by default only with locview
11439         assembler support.  Enable -ginternal-reset-location-views by
11440         default only if the target defines the corresponding hook.
11441         Enable -ginline-points by default if location views are
11442         enabled; force it disabled if statement frontiers are
11443         disabled.
11444         * tree-inline.c (expand_call_inline): Check option variables.
11445         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11447 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
11449         PR tree-optimization/84321
11450         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11451         handling.  Also check whether the anti-range contains any values
11452         that satisfy the mask; switch to a VR_RANGE if not.
11454 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
11456         PR sanitizer/84340
11457         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11459 2018-02-13  Martin Jambor  <mjambor@suse.cz>
11461         PR c++/83990
11462         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11463         of call statements, also set location of a load to a temporary.
11465 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
11467         * config/rl78/rl78.c (add_vector_labels): New function.
11468         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11469         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11470         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11471         which checks that no arguments are passed.
11472         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11473         * doc/extend.texi: Documentation for the new attribute.
11475 2018-02-13  Andreas Schwab  <schwab@suse.de>
11477         * config/riscv/linux.h (CPP_SPEC): Define.
11479 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11481         PR target/84335
11482         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11483         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11484         OPTION_MASK_ISA_AES as first argument to def_builtin_const
11485         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11486         instead of OPTION_MASK_ISA_PCLMUL as first argument to
11487         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11488         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11489         temporarily for AES and PCLMUL builtins.
11491         PR tree-optimization/84339
11492         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11493         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11494         Formatting fixes.
11496         PR middle-end/84309
11497         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11498         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11499         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11500         inline function.
11501         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11502         inline function.
11503         * omp-simd-clone.h: New file.
11504         * omp-simd-clone.c: Include omp-simd-clone.h.
11505         (expand_simd_clones): No longer static.
11506         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11507         cgraph.h and omp-simd-clone.h.
11508         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11509         (vect_recog_widen_shift_pattern): Formatting fix.
11510         (vect_pattern_recog_1): Don't check optab for calls.
11512         PR target/84336
11513         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11514         operands[2] into a REG before using gen_lowpart on it.
11516 2018-02-12  Jeff Law  <law@redhat.com>
11518         PR target/83760
11519         * config/sh/sh.c (find_barrier): Consider a sibling call
11520         a barrier as well.
11522         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11523         successfully back substituting a reg.
11525 2018-02-12  Richard Biener  <rguenther@suse.de>
11527         PR tree-optimization/84037
11528         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11529         parameter, move visited init to caller.
11530         (vect_slp_analyze_operations): Separate cost from validity
11531         check, initialize visited once for all instances.
11532         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11533         for all instances.
11534         * tree-vect-stmts.c (vect_model_simple_cost): Make early
11535         out an assert.
11536         (vect_model_promotion_demotion_cost): Likewise.
11537         (vectorizable_bswap): Guard cost modeling with !slp_node
11538         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11539         SLP stmts.
11540         (vectorizable_call): Likewise.
11541         (vectorizable_conversion): Likewise.
11542         (vectorizable_assignment): Likewise.
11543         (vectorizable_shift): Likewise.
11544         (vectorizable_operation): Likewise.
11545         (vectorizable_store): Likewise.
11546         (vectorizable_load): Likewise.
11547         (vectorizable_condition): Likewise.
11548         (vectorizable_comparison): Likewise.
11550 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
11552         PR sanitizer/84307
11553         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11554         (ASAN_MARK): Fix fnspec to account for return value, change pointer
11555         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11557 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11559         PR middle-end/83665
11560         * params.def (inline-min-speedup): Increase from 8 to 15.
11561         (max-inline-insns-auto): Decrease from 40 to 30.
11562         * ipa-split.c (consider_split): Add some buffer for function to
11563         be considered inlining candidate.
11564         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11565         default values.
11567 2018-02-12  Richard Biener  <rguenther@suse.de>
11569         PR tree-optimization/84037
11570         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11571         matched stmts if we cannot swap the non-matched ones.
11573 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11575         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11576         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11577         _mm_maskz_scalef_round_ss): New intrinsics.
11578         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11579         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11580         __builtin_ia32_scalefss_round): Remove.
11581         (__builtin_ia32_scalefsd_mask_round,
11582         __builtin_ia32_scalefss_mask_round): New intrinsics.
11583         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11584         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11585         ((match_operand:VF_128 2 "<round_nimm_predicate>"
11586         "<round_constraint>")): Changed to ...
11587         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11588         "<round_scalar_constraint>")): ... this.
11589         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11590         %0, %1, %2<round_op3>}"): Changed to ...
11591         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11592         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11593         %2<round_scalar_mask_op3>}"): ... this.
11594         * config/i386/subst.md (round_scalar_nimm_predicate): New.
11596 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11598         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11599         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11600         (_mm_maskz_sqrt_round_ss): New intrinsics.
11601         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11602         (__builtin_ia32_sqrtsd_mask_round)
11603         (__builtin_ia32_sqrtss_mask_round): New builtins.
11604         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11605         (__builtin_ia32_sqrtss_round): Remove.
11606         (__builtin_ia32_sqrtsd_mask_round)
11607         (__builtin_ia32_sqrtss_mask_round): New builtins.
11608         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11609         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11610         ((match_operand:VF_128 1 "vector_operand"
11611         "xBm,<round_constraint>")): Changed to ...
11612         ((match_operand:VF_128 1 "vector_operand"
11613         "xBm,<round_scalar_constraint>")): ... this.
11614         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11615         %0, %2, %<iptr>1<round_op3>}): Changed to ...
11616         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11617         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11618         %<iptr>1<round_scalar_mask_op3>}): ... this.
11619         ((set_attr "prefix" "<round_prefix>")): Changed to ...
11620         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11622 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11624         PR target/84266
11625         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11626         Cast vec_cmpeq result to correct type.
11627         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11628         Cast vec_cmpgt result to correct type.
11630 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11632         * final.c (final_scan_insn_1): Renamed from...
11633         (final_scan_insn): ... this.  New wrapper, to recover
11634         seen from the outermost call in recursive ones.
11635         * config/sparc/sparc.c (output_return): Drop seen from call.
11636         (output_sibcall): Likewise.
11637         * config/visium/visium.c (output_branch): Likewise.
11639 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11641         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11642         function label.
11644 2018-02-10  Alan Modra  <amodra@gmail.com>
11646         PR target/84300
11647         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11648         Specify LR as an input.
11650 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11652         PR sanitizer/83987
11653         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11654         remove_member_access_dummy_vars): New functions.
11655         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11656         lower_omp_1, execute_lower_omp): Use them.
11658         PR rtl-optimization/84308
11659         * shrink-wrap.c (spread_components): Release todo vector.
11661 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11663         PR rtl-optimization/57193
11664         * ira-color.c (struct allocno_color_data): Add member
11665         conflict_allocno_hard_prefs.
11666         (update_conflict_allocno_hard_prefs): New.
11667         (bucket_allocno_compare_func): Add a preference based on
11668         conflict_allocno_hard_prefs.
11669         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11670         (color_allocnos): Remove a dead code.  Initiate
11671         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11673 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11675         PR target/84226
11676         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11677         constraint from =wa to wa.  Avoid a subreg on the output operand,
11678         instead use a pseudo and subreg it in a move.
11679         (p9_xxbrd_<mode>): Changed to ...
11680         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11681         (p9_xxbrd_v2df): New expander.
11682         (p9_xxbrw_<mode>): Changed to ...
11683         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11684         (p9_xxbrw_v4sf): New expander.
11686 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11688         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11690 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11692         PR target/83926
11693         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11694         multiply in 32-bit mode.
11695         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11696         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11697         mode.
11699 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11701         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11702         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11703         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11704         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11706 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11708         PR lto/84213
11709         * dwarf2out.c (is_trivial_indirect_ref): New function.
11710         (dwarf2out_late_global_decl): Do not generate a location
11711         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11712         and that are not defined in the current unit.
11714 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11716         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11717         instead of a libcall for UNORDERED.
11719 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11721         PR target/82641
11722         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11723         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11725 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11727         PR target/PR84295
11728         * config/s390/s390.c (s390_set_current_function): Invoke
11729         s390_indirect_branch_settings also if fndecl didn't change.
11731 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11733         * config/rs6000/rs6000.md (blockage): Set length to zero.
11735 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11737         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11739 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11741         PR sanitizer/84285
11742         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11743         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11744         -static-lib*san.
11746         PR debug/84252
11747         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11748         PARALLEL incoming that failed vt_get_decl_and_offset check.
11750         PR middle-end/84237
11751         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11752         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11753         TREE_READONLY bit.
11754         (get_variable_section): For decls in named .bss* sections pass true as
11755         second argument to bss_initializer_p.
11757 2018-02-09  Marek Polacek  <polacek@redhat.com>
11758             Jakub Jelinek  <jakub@redhat.com>
11760         PR c++/83659
11761         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11762         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11763         Sync some changes from cxx_fold_indirect_ref.
11765 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11767         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11768         markers.
11769         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11770         (BLOCK_INLINE_ENTRY_LABEL): New.
11771         (dwarf2out_var_location): Disregard inline entry markers.
11772         (inline_entry_data): New struct.
11773         (inline_entry_data_hasher): New hashtable type.
11774         (inline_entry_data_hasher::hash): New.
11775         (inline_entry_data_hasher::equal): New.
11776         (inline_entry_data_table): New variable.
11777         (add_high_low_attributes): Add DW_AT_entry_pc and
11778         DW_AT_GNU_entry_view attributes if a pending entry is found
11779         in inline_entry_data_table.  Add old entry_pc attribute only
11780         if debug nonbinding markers are disabled.
11781         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11782         markers are enabled.
11783         (block_within_block_p, dwarf2out_inline_entry): New.
11784         (dwarf2out_finish): Check that no entries remained in
11785         inline_entry_data_table.
11786         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11787         (final_scan_insn, notice_source_line): Likewise.
11788         (rest_of_clean_state): Skip inline entry markers.
11789         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11790         markers.
11791         * gimple.c (gimple_build_debug_inline_entry): New.
11792         * gimple.h (enum gimple_debug_subcode): Add
11793         GIMPLE_DEBUG_INLINE_ENTRY.
11794         (gimple_build_debug_inline_entry): Declare.
11795         (gimple_debug_inline_entry_p): New.
11796         (gimple_debug_nonbind_marker_p): Adjust.
11797         * insn-notes.def (INLINE_ENTRY): New.
11798         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11799         inline entry marker notes.
11800         (print_insn): Likewise.
11801         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11802         (INSN_DEBUG_MARKER_KIND): Likewise.
11803         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11804         * tree-inline.c (expand_call_inline): Build and insert
11805         debug_inline_entry stmt.
11806         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11807         inline entry blocks early, if nonbind markers are enabled.
11808         (dump_scope_block): Dump fragment info.
11809         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11810         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11811         (gimple_build_debug_inline_entry): New.
11812         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11813         Enable/disable inline entry points too.
11814         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11815         (DEBUG_INSN): Describe inline entry markers.
11817         * common.opt (gvariable-location-views): New.
11818         (gvariable-location-views=incompat5): New.
11819         * config.in: Rebuilt.
11820         * configure: Rebuilt.
11821         * configure.ac: Test assembler for view support.
11822         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11823         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11824         * dwarf2out.c (var_loc_view): New typedef.
11825         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11826         (dwarf2out_locviews_in_attribute): New.
11827         (dwarf2out_locviews_in_loclist): New.
11828         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11829         (enum dw_line_info_opcode): Add LI_adv_address.
11830         (struct dw_line_info_table): Add view.
11831         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11832         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11833         (zero_view_p): New variable.
11834         (ZERO_VIEW_P): New macro.
11835         (output_asm_line_debug_info): New.
11836         (struct var_loc_node): Add view.
11837         (add_AT_view_list, AT_loc_list): New.
11838         (add_var_loc_to_decl): Add view param.  Test it against last.
11839         (new_loc_list): Add view params.  Record them.
11840         (AT_loc_list_ptr): Handle loc and view lists.
11841         (view_list_to_loc_list_val_node): New.
11842         (print_dw_val): Handle dw_val_class_view_list.
11843         (size_of_die): Likewise.
11844         (value_format): Likewise.
11845         (loc_list_has_views): New.
11846         (gen_llsym): Set vl_symbol too.
11847         (maybe_gen_llsym, skip_loc_list_entry): New.
11848         (dwarf2out_maybe_output_loclist_view_pair): New.
11849         (output_loc_list): Output view list or entries too.
11850         (output_view_list_offset): New.
11851         (output_die): Handle dw_val_class_view_list.
11852         (output_dwarf_version): New.
11853         (output_compilation_unit_header): Use it.
11854         (output_skeleton_debug_sections): Likewise.
11855         (output_rnglists, output_line_info): Likewise.
11856         (output_pubnames, output_aranges): Update version comments.
11857         (output_one_line_info_table): Output view numbers in asm comments.
11858         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11859         Call maybe_gen_llsym.
11860         (loc_list_from_tree_1): Adjust.
11861         (add_AT_location_description): Create view list attribute if
11862         needed, check it's absent otherwise.
11863         (convert_cfa_to_fb_loc_list): Adjust.
11864         (maybe_emit_file): Call output_asm_line_debug_info for test.
11865         (dwarf2out_var_location): Reset views as needed.  Precompute
11866         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11867         attribute.  Set view.
11868         (new_line_info_table): Reset next view.
11869         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11870         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11871         the assembler, or select appropriate line info opcodes.
11872         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11873         (optimize_string_length): Catch it.  Adjust.
11874         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11875         dw_val_class_view_list, and remove it if no longer needed.
11876         (hash_loc_list): Hash view numbers.
11877         (loc_list_hasher::equal): Compare them.
11878         (optimize_location_lists): Check whether a view list symbol is
11879         needed, and whether the locview attribute is present, and
11880         whether they match.  Remove the locview attribute if no longer
11881         needed.
11882         (index_location_lists): Call skip_loc_list_entry for test.
11883         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11884         Use output_dwarf_version.
11885         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11886         (struct dw_val_node): Add val_view_list.
11887         * final.c (SEEN_NEXT_VIEW): New.
11888         (set_next_view_needed): New.
11889         (clear_next_view_needed): New.
11890         (maybe_output_next_view): New.
11891         (final_start_function): Rename to...
11892         (final_start_function_1): ... this.  Take pointer to FIRST,
11893         add SEEN parameter.  Emit param bindings in the initial view.
11894         (final_start_function): Reintroduce SEEN-less interface.
11895         (final): Rename to...
11896         (final_1): ... this.  Take SEEN parameter.  Output final pending
11897         next view at the end.
11898         (final): Reintroduce seen-less interface.
11899         (final_scan_insn): Output pending next view before switching
11900         sections or ending a block.  Mark the next view as needed when
11901         outputting variable locations.  Notify debug backend of section
11902         changes, and of location view changes.
11903         (rest_of_handle_final): Adjust.
11904         * toplev.c (process_options): Autodetect value for debug variable
11905         location views option.  Warn on incompat5 without -gdwarf-5.
11906         * doc/invoke.texi (gvariable-location-views): New.
11907         (gvariable-location-views=incompat5): New.
11908         (gno-variable-location-views): New.
11910 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11912         PR tree-optimization/84136
11913         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11914         that the result of find_edge is non-NULL.
11916 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11918         PR target/83008
11919         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11920         storing integer register in SImode.  Fix cost of 256 and 512
11921         byte aligned SSE register store.
11923 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11925         * config/i386/i386.c (ix86_multiplication_cost): Fix
11926         multiplication cost for TARGET_AVX512DQ.
11928 2018-02-08  Marek Polacek  <polacek@redhat.com>
11930         PR tree-optimization/84238
11931         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11932         get_range_strlen.
11934 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11936         PR tree-optimization/84265
11937         * tree-vect-stmts.c (vectorizable_store): Don't treat
11938         VMAT_CONTIGUOUS accesses as grouped.
11939         (vectorizable_load): Likewise.
11941 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11943         PR tree-optimization/81635
11944         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11945         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11946         (test_round_for_mask): New functions.
11947         (wide_int_cc_tests): Call test_round_for_mask.
11948         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11949         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11950         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11951         range returned by get_range_info.
11953 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11955         PR ipa/81360
11956         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11957         * symtab.c: Include builtins.h
11958         (symtab_node::output_to_lto_symbol_table_p): Move here
11959         from lto-streamer-out.c:output_symbol_p.
11960         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11961         (output_symbol_p): Move all logic to symtab.c
11962         (produce_symtab): Update.
11964 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11966         * config/s390/s390-opts.h (enum indirect_branch): Define.
11967         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11968         (s390_indirect_branch_via_thunk)
11969         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11970         (enum s390_indirect_branch_type): Define.
11971         * config/s390/s390.c (struct s390_frame_layout, struct
11972         machine_function): Remove.
11973         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11974         (indirect_branch_table_label_no, indirect_branch_table_name):
11975         Define variables.
11976         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11977         (enum s390_indirect_branch_option): Define.
11978         (s390_return_addr_from_memory): New function.
11979         (s390_handle_string_attribute): New function.
11980         (s390_attribute_table): Add new attribute handler.
11981         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11982         (s390_indirect_branch_via_thunk): New function.
11983         (s390_indirect_branch_via_inline_thunk): New function.
11984         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11985         sibling call optimization for non z10 compiles.
11986         (s390_emit_call): Force indirect branch target to be a single
11987         register.  Add r1 clobber for non-z10 compiles.
11988         (s390_emit_epilogue): Emit return jump via return_use expander.
11989         (s390_reorg): Handle JUMP_INSNs as execute targets.
11990         (s390_option_override_internal): Perform validity checks for the
11991         new command line options.
11992         (s390_indirect_branch_attrvalue): New function.
11993         (s390_indirect_branch_settings): New function.
11994         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11995         (s390_output_indirect_thunk_function):  New function.
11996         (s390_code_end): Implement target hook.
11997         (s390_case_values_threshold): Implement target hook.
11998         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11999         macros.
12000         * config/s390/s390.h (struct s390_frame_layout)
12001         (struct machine_function): Move here from s390.c.
12002         (TARGET_INDIRECT_BRANCH_NOBP_RET)
12003         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12004         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12005         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12006         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12007         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12008         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12009         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12010         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12011         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
12012         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
12013         (mnemonic attribute): Add values which aren't recognized
12014         automatically.
12015         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
12016         pattern for branch conversion.  Fix mnemonic attribute.
12017         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
12018         indirect branch via thunk if requested.
12019         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
12020         ("*indirect_jump"): Disable for branch conversion using out of
12021         line thunks.
12022         ("indirect_jump_via_thunk<mode>_z10")
12023         ("indirect_jump_via_thunk<mode>")
12024         ("indirect_jump_via_inlinethunk<mode>_z10")
12025         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
12026         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
12027         ("casesi_jump_via_inlinethunk<mode>_z10")
12028         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
12029         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
12030         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
12031         ("*indirect2_jump"): Disable for branch conversion.
12032         ("casesi_jump"): Turn into expander and expand patterns for branch
12033         conversion.
12034         ("return_use"): New expander.
12035         ("*return"): Emit return via thunk and rename it to ...
12036         ("*return<mode>"): ... this one.
12037         * config/s390/s390.opt: Add new options and and enum for the
12038         option values.
12040 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12042         * lra-constraints.c (match_reload): Unconditionally use
12043         gen_lowpart_SUBREG, rather than selecting between that
12044         and equivalent gen_rtx_SUBREG code.
12046 2018-02-08  Richard Biener  <rguenther@suse.de>
12048         PR tree-optimization/84233
12049         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
12050         changed flag instead of boguously re-using phi_inserted.
12052 2018-02-08  Martin Jambor  <mjambor@suse.cz>
12054         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
12055         static local variables.
12057 2018-02-08  Richard Biener  <rguenther@suse.de>
12059         PR tree-optimization/84278
12060         * tree-vect-stmts.c (vectorizable_store): When looking for
12061         smaller vector types to perform grouped strided loads/stores
12062         make sure the mode is supported by the target.
12063         (vectorizable_load): Likewise.
12065 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12067         * config/aarch64/aarch64.c (aarch64_components_for_bb):
12068         Increase LDP/STP opportunities by adding adjacent callee-saves.
12070 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12072         PR rtl-optimization/84068
12073         PR rtl-optimization/83459
12074         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
12076 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
12078         PR tree-optimization/84224
12079         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
12080         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
12081         non-zero arguments.
12083 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
12085         PR target/84113
12086         * config/rs6000/altivec.md (*restore_world): Remove LR use.
12087         * config/rs6000/predicates.md (restore_world_operation): Adjust op
12088         count, remove one USE.
12090 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
12092         * doc/install.texi (Configuration): Document the
12093         --with-long-double-format={ibm,ieee} PowerPC configuration
12094         options.
12096         PR target/84154
12097         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12098         Convert from define_expand to be define_insn_and_split.  Rework
12099         float/double/_Float128 conversions to QI/HI/SImode to work with
12100         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
12101         conversions to QI/HImode types did a store and then a load to
12102         truncate the value.  For conversions to VSX registers, don't split
12103         the insn, instead emit the code directly.  Use the code iterator
12104         any_fix to combine signed and unsigned conversions.
12105         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12106         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12107         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12108         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12109         (fix_<mode>di2_hw): Likewise.
12110         (fixuns_<mode>di2_hw): Likewise.
12111         (fix_<mode>si2_hw): Likewise.
12112         (fixuns_<mode>si2_hw): Likewise.
12113         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12114         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12115         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12116         fix<uns>_trunc<SFDF:mode>si2_p8.
12117         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12118         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12119         (fix<uns>_<mode>_mem): Likewise.
12120         (fctiw<u>z_<mode>_mem): Likewise.
12121         (fix<uns>_<mode>_mem): Likewise.
12122         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12123         the register allocator from doing a direct move to the GPRs to do
12124         a store, and instead use the ISA 3.0 store byte/half-word from
12125         vector register instruction.  For IEEE 128-bit floating point,
12126         also optimize stores of 32-bit ints.
12127         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12129 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
12131         * genextract.c (push_pathstr_operand): New function to support
12132         [a-zA-Z].
12133         (walk_rtx): Call push_pathstr_operand.
12134         (print_path): Support [a-zA-Z].
12136 2018-02-07  Richard Biener  <rguenther@suse.de>
12138         PR tree-optimization/84037
12139         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12140         (cse_and_gimplify_to_preheader): Declare.
12141         (vect_get_place_in_interleaving_chain): Likewise.
12142         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12143         ivexpr_map.
12144         (_loop_vec_info::~_loop_vec_info): Delete it.
12145         (cse_and_gimplify_to_preheader): New function.
12146         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12147         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12148         (vectorizable_load): Likewise.  For grouped stores always base
12149         the IV on the first element.
12150         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12151         condition before gimplifying.
12153 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12155         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12156         *DIV_EXPR and *MOD_EXPR.
12158 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
12160         PR target/84248
12161         * config/i386/i386.c (ix86_option_override_internal): Mask out
12162         the CF_SET bit when checking -fcf-protection.
12164 2018-02-07  Tom de Vries  <tom@codesourcery.com>
12166         PR libgomp/84217
12167         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12168         enough.
12170 2018-02-07  Richard Biener  <rguenther@suse.de>
12172         PR tree-optimization/84204
12173         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12174         this place.
12176         PR tree-optimization/84205
12177         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12178         special-case isl_ast_op_zdiv_r.
12180         PR tree-optimization/84223
12181         * graphite-scop-detection.c (gather_bbs::before_dom_children):
12182         Only add conditions from within the region.
12183         (gather_bbs::after_dom_children): Adjust.
12185 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
12187         PR target/84209
12188         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12189         * config/avr/avr.md: Only post-reload split REG-REG moves if
12190         either register is GENERAL_REG_P.
12192 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12194         PR tree-optimization/84235
12195         * tree-ssa-scopedtables.c
12196         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12197         if the subtraction is performed in floating point type where NaNs are
12198         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12199         build 1.  Formatting fix.
12201 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
12203         PR target/84146
12204         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12205         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12206         and skip it regardless of bb boundaries.  Use CALL_P macro,
12207         don't test INSN_P (insn) together with CALL_P or JUMP_P check
12208         unnecessarily, formatting fix.
12210 2018-02-06  Michael Collison  <michael.collison@arm.com>
12212         * config/arm/thumb2.md:
12213         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12214         (*thumb_mov_notscc): Ditto.
12216 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
12218         PR target/84154
12219         * config/rs6000/rs6000.md (su code attribute): Use "u" for
12220         unsigned_fix, not "s".
12222 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12224         * configure.ac (gcc_fn_eh_frame_ro): New function.
12225         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12226         correct .eh_frame permissions.
12227         * configure: Regenerate.
12229 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
12231         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12232         irrelevant options.
12234 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12236         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12237         Display warning message for -mno-speculate-indirect-jumps.
12239 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
12241         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12242         Undocumented.
12243         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12245 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
12247         PR tree-optimization/84225
12248         * tree-eh.c (find_trapping_overflow): Only call
12249         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12251 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12253         PR target/84145
12254         * config/i386/i386.c: Reimplement the check of possible options
12255         -mibt/-mshstk conbination. Change error messages.
12256         * doc/invoke.texi: Fix a typo: remove extra '='.
12258 2018-02-06  Marek Polacek  <polacek@redhat.com>
12260         PR tree-optimization/84228
12261         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12263 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
12265         PR target/82641
12266         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12267         emitted arch directives.
12268         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12269         __ARM_FEATURE_COPROC before changing architectures.
12271 2018-02-06  Richard Biener  <rguenther@suse.de>
12273         * config/i386/i386.c (print_reg): Fix typo.
12274         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12276 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12278         * configure: Regenerate.
12280 2018-02-05  Martin Sebor  <msebor@redhat.com>
12282         PR tree-optimization/83369
12283         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12284         inlining context.
12286 2018-02-05  Martin Liska  <mliska@suse.cz>
12288         * doc/invoke.texi: Cherry-pick upstream r323995.
12290 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
12292         * ira.c (ira_init_register_move_cost): Adjust comment.
12294 2018-02-05  Martin Liska  <mliska@suse.cz>
12296         PR gcov-profile/84137
12297         * doc/gcov.texi: Fix typo in documentation.
12299 2018-02-05  Martin Liska  <mliska@suse.cz>
12301         PR gcov-profile/83879
12302         * doc/gcov.texi: Document necessity of --dynamic-list-data when
12303         using dlopen functionality.
12305 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
12307         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12308         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12309         _mm_maskz_range_ss, _mm_mask_range_round_ss,
12310         _mm_maskz_range_round_ss): New intrinsics.
12311         (__builtin_ia32_rangesd128_round)
12312         (__builtin_ia32_rangess128_round): Remove.
12313         (__builtin_ia32_rangesd128_mask_round,
12314         __builtin_ia32_rangess128_mask_round): New builtins.
12315         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12316         __builtin_ia32_rangess128_round): Remove.
12317         (__builtin_ia32_rangesd128_mask_round,
12318         __builtin_ia32_rangess128_mask_round): New builtins.
12319         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12320         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12321         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12322         "<round_saeonly_constraint>")): Changed to ...
12323         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12324         "<round_saeonly_scalar_constraint>")): ... this.
12325         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12326         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12327         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12328         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12329         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12331 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
12333         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12334         options.
12335         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12336         Remove all values except native, 8540 and 8548.
12338 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
12340         * config/i386/i386.c (ix86_output_function_return): Pass
12341         INVALID_REGNUM, instead of -1, as invalid register number to
12342         indirect_thunk_name and output_indirect_thunk.
12344 2018-02-02  Julia Koval  <julia.koval@intel.com>
12346         * config.gcc: Add -march=icelake.
12347         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12348         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12349         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12350         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12351         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12352         (processor_target_table): Add icelake.
12353         (ix86_option_override_internal): Handle new PTAs.
12354         (get_builtin_code_for_version): Handle icelake.
12355         (M_INTEL_COREI7_ICELAKE): New.
12356         (fold_builtin_cpu): Handle icelake.
12357         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12358         * doc/invoke.texi: Add -march=icelake.
12360 2018-02-02  Julia Koval  <julia.koval@intel.com>
12362         * config/i386/i386.c (ix86_option_override_internal): Change flags type
12363         to wide_int_bitmask.
12364         * wide-int-bitmask.h: New.
12366 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12368         PR target/84066
12369         * config/i386/i386.md: Replace Pmode with word_mode in
12370         builtin_setjmp_setup and builtin_longjmp to support x32.
12372 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
12374         PR target/56010
12375         PR target/83743
12376         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12377         #include "opts.h".
12378         (rs6000_supported_cpu_names): New static variable.
12379         (linux_cpu_translation_table): Likewise.
12380         (elf_platform) <cpu>: Define new static variable and use it.
12381         Translate kernel AT_PLATFORM name to canonical name if needed.
12382         Error if platform name is unknown.
12384 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
12386         PR target/84089
12387         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12389 2018-02-01  Jeff Law  <law@redhat.com>
12391         PR target/84128
12392         * config/i386/i386.c (release_scratch_register_on_entry): Add new
12393         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
12394         the scratch if RELEASE_VIA_POP is false.
12395         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12396         If we have to save a temporary register, decrement SIZE appropriately.
12397         Pass new arguments to release_scratch_register_on_entry.
12398         (ix86_adjust_stack_and_probe): Likewise.
12399         (ix86_emit_probe_stack_range): Pass new arguments to
12400         release_scratch_register_on_entry.
12402 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
12404         PR rtl-optimization/84157
12405         * combine.c (change_zero_ext): Use REG_P predicate in
12406         front of HARD_REGISTER_P predicate.
12408 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
12410         * config/avr/avr.c (avr_option_override): Move disabling of
12411         -fdelete-null-pointer-checks to...
12412         * common/config/avr/avr-common.c (avr_option_optimization_table):
12413         ...here.
12415 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12417         PR tree-optimization/81635
12418         * tree-data-ref.c (split_constant_offset_1): For types that
12419         wrap on overflow, try to use range info to prove that wrapping
12420         cannot occur.
12422 2018-02-01  Renlin Li  <renlin.li@arm.com>
12424         PR target/83370
12425         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12426         TAILCALL_ADDR_REGS.
12427         (aarch64_register_move_cost): Likewise.
12428         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12429         TAILCALL_ADDR_REGS.
12430         (REG_CLASS_NAMES): Likewise.
12431         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12432         TAILCALL_ADDR_REGS. Remove IP registers.
12433         * config/aarch64/aarch64.md (Ucs): Update register constraint.
12435 2018-02-01  Richard Biener  <rguenther@suse.de>
12437         * domwalk.h (dom_walker::dom_walker): Add additional constructor
12438         for specifying RPO order and allow NULL for that.
12439         * domwalk.c (dom_walker::dom_walker): Likewise.
12440         (dom_walker::walk): Handle NULL RPO order.
12441         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12442         in RPO order.
12443         (rewrite_update_dom_walker): Likewise.
12444         (mark_def_dom_walker): Likewise.
12446 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12448         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12449         (aarch64_maybe_expand_sve_subreg_move): Declare.
12450         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12451         * config/aarch64/predicates.md (aarch64_any_register_operand): New
12452         predicate.
12453         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12454         that are semantically a reverse operation.
12455         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12456         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12457         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12458         functions.
12459         (aarch64_can_change_mode_class): For big-endian, forbid changes
12460         between two SVE modes if they have different element sizes.
12462 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12464         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12465         the TImode handling for big-endian targets.
12467 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12469         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12470         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
12471         not just bytes.
12472         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12473         Remove BSWAP handing for big-endian targets and use the form of
12474         LD1RQ appropariate for the mode.
12476 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12478         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12479         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12480         duplicated element.
12482 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12484         PR tearget/83845
12485         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12486         check for operands that need to go through aarch64_sve_reload_be.
12488 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
12490         PR tree-optimization/81661
12491         PR tree-optimization/84117
12492         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12493         * tree-eh.c: Include gimplify.h.
12494         (find_trapping_overflow, replace_trapping_overflow,
12495         rewrite_to_non_trapping_overflow): New functions.
12496         * tree-vect-loop.c: Include tree-eh.h.
12497         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12498         * tree-data-ref.c: Include tree-eh.h.
12499         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12501 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
12503         PR rtl-optimization/84123
12504         * combine.c (change_zero_ext): Check if hard register satisfies
12505         can_change_dest_mode before calling gen_lowpart_SUBREG.
12507 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
12509         PR target/82444
12510         * ira.c (ira_init_register_move_cost): Remove assert.
12512 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12514         PR rtl-optimization/84071
12515         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12516         * doc/tm.texi: Regenerate.
12518 2018-01-31  Richard Biener  <rguenther@suse.de>
12520         PR tree-optimization/84132
12521         * tree-data-ref.c (analyze_miv_subscript): Properly
12522         check whether evolution_function_is_affine_multivariate_p
12523         before calling gcd_of_steps_may_divide_p.
12525 2018-01-31  Julia Koval  <julia.koval@intel.com>
12527         PR target/83618
12528         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12529         * config/i386/i386.md (rdpid_rex64) New.
12530         (rdpid): Make 32bit only.
12532 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
12534         PR lto/84105
12535         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12536         an IDENTIFIER_NODE for FUNCTION_TYPE's.
12538 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12540         Revert
12541         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
12543         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12545 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12547         PR rtl-optimization/84071
12548         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12549         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12551 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12553         * config/arc/arc.c (arc_handle_aux_attribute): New function.
12554         (arc_attribute_table): Add 'aux' attribute.
12555         (arc_in_small_data_p): Consider aux like variables.
12556         (arc_is_aux_reg_p): New function.
12557         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12558         (arc_get_aux_arg): New function.
12559         (prepare_move_operands): Handle aux-register access.
12560         (arc_handle_aux_attribute): New function.
12561         * doc/extend.texi (ARC Variable attributes): Add subsection.
12563 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12565         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12566         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12567         (arc_attribute_table): Add 'uncached' attribute.
12568         (arc_print_operand): Print '.di' flag for uncached memory
12569         accesses.
12570         (arc_in_small_data_p): Do not consider for small data the uncached
12571         types.
12572         (arc_is_uncached_mem_p): New function.
12573         * config/arc/predicates.md (compact_store_memory_operand): Check
12574         for uncached memory accesses.
12575         (nonvol_nonimm_operand): Likewise.
12576         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12578 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
12580         PR c/84100
12581         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12582         falign-loops=): Add Optimization flag.
12584 2018-01-30  Jeff Law  <law@redhat.com>
12586         PR target/84064
12587         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12588         INT_REGISTERS_SAVED.  Check it prior to calling
12589         get_scratch_register_on_entry.
12590         (ix86_adjust_stack_and_probe): Similarly.
12591         (ix86_emit_probe_stack_range): Similarly.
12592         (ix86_expand_prologue): Corresponding changes.
12594 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12596         PR target/40411
12597         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12598         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12600 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
12602         PR target/84112
12603         * lra-constraints.c (curr_insn_transform): Process AND in the
12604         address.
12606 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
12608         PR rtl-optimization/83986
12609         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12610         dependence against last_pending_memory_flush in addition to
12611         pending_jump_insns.
12613 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
12615         PR tree-optimization/81611
12616         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12617         copies.
12619 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12621         PR target/83758
12622         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12623         a reg rtx.
12625 2018-01-30  Richard Biener  <rguenther@suse.de>
12626             Jakub Jelinek  <jakub@redhat.com>
12628         PR tree-optimization/84111
12629         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12630         inner loops added during recursion, as they don't have up-to-date
12631         SSA form.
12633 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12635         PR ipa/81360
12636         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12637         (can_inline_edge_by_limits_p): ... here.
12638         (can_early_inline_edge_p, check_callers,
12639         update_caller_keys, update_callee_keys, recursive_inlining,
12640         add_new_edges_to_heap, speculation_useful_p,
12641         inline_small_functions,
12642         inline_small_functions, flatten_function,
12643         inline_to_all_callers_1): Update.
12645 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12647         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12648         zeros correctly.
12650 2018-01-30  Richard Biener  <rguenther@suse.de>
12652         PR tree-optimization/83008
12653         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12654         invariant and constant vector uses in stmts when they need
12655         more than one stmt.
12657 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12659         PR bootstrap/84017
12660         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12661         * configure: Regenerate.
12663 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12665         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12666         pattern.
12667         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12668         Use gen_rtx_REG rather than gen_lowpart.
12670 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12672         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12673         rather than 0 when creating partial subregs.
12675 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12677         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12678         of usage.
12680 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12682         PR target/81550
12683         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12684         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12685         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12686         flags.  This restores the settings used before the 2017-07-24.
12687         Turning off pre increment/decrement/modify allows IVOPTS to
12688         optimize DF/SF loops where the index is an int.
12690 2018-01-29  Richard Biener  <rguenther@suse.de>
12691             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12693         PR bootstrap/80867
12694         * tree-vect-stmts.c (vectorizable_call): Don't call
12695         targetm.vectorize_builtin_md_vectorized_function if callee is
12696         NULL.
12698 2018-01-22  Carl Love  <cel@us.ibm.com>
12700         * doc/extend.tex: Fix typo in second arg in
12701         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12703 2018-01-29  Richard Biener  <rguenther@suse.de>
12705         PR tree-optimization/84086
12706         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12707         (flush_ssaname_freelist): When SSA names were released reset
12708         the SCEV hash table.
12710 2018-01-29  Richard Biener  <rguenther@suse.de>
12712         PR tree-optimization/84057
12713         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12714         removed paths when removing edges.
12716 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12718         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12719         -mfunction-return=@var{choice}.
12721 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12723         PR diagnostic/84034
12724         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12725         Handle CR like TAB.
12726         (layout::print_source_line): Likewise.
12727         (test_get_line_width_without_trailing_whitespace): Add test cases.
12729 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12731         PR middle-end/84040
12732         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12733         debug insns.
12735 2018-01-26  Jim Wilson  <jimw@sifive.com>
12737         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12739         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12740         specified.
12742 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12744         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12745         and CMP + SUB-immediate -> SUBS.
12747 2018-01-26  Martin Sebor  <msebor@redhat.com>
12749         PR tree-optimization/83896
12750         * tree-ssa-strlen.c (get_string_len): Rename...
12751         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12752         Avoid assuming length is constant.
12753         (handle_char_store): Use HOST_WIDE_INT for string length.
12755 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12757         PR target/81763
12758         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12759         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12761 2018-01-26  Richard Biener  <rguenther@suse.de>
12763         PR rtl-optimization/84003
12764         * dse.c (record_store): Only record redundant stores when
12765         the earlier store aliases at least all accesses the later one does.
12767 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12769         PR rtl-optimization/83985
12770         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12771         REG_CFA_RESTORE insns.
12772         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12773         REG_CFA_RESTORE insns here.
12775         PR c/83989
12776         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12777         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12779 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12781         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12782         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12783         (arc_init): Likewise.
12784         (arc_override_options): Likewise.
12785         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12786         value.
12787         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12788         support.
12789         * config/arc/arc.h (TARGET_DBNZ): Define.
12790         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12791         properly set the tune attribute.
12792         (dbnz): Use TARGET_DBNZ guard.
12793         * config/arc/arc.opt (mtune): Add core3 option.
12795 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12797         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12798         recognize new pic like addresses.
12799         (arc_delegitimize_address): Clean up.
12801 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12803         * config/arc/arc-arches.def: Option mrf16 valid for all
12804         architectures.
12805         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12806         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12807         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12808         * config/arc/arc-tables.opt: Regenerate.
12809         * config/arc/arc.c (arc_conditional_register_usage): Handle
12810         reduced register file case.
12811         (arc_file_start): Set must have build attributes.
12812         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12813         mrf16 option value.
12814         * config/arc/arc.opt (mrf16): Add new option.
12815         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12816         * config/arc/genmultilib.awk: Handle new mrf16 option.
12817         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12818         * config/arc/t-multilib: Regenerate.
12819         * doc/invoke.texi (ARC Options): Document mrf16 option.
12821 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12823         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12824         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12825         (arc_attribute_table): Add 'secure_call' attribute.
12826         (arc_print_operand): Print secure call operand.
12827         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12828         secure.
12829         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12830         (call_i): Add support for sjli instruction.
12831         (call_value_i): Likewise.
12832         * config/arc/constraints.md (Csc): New constraint.
12834 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12835             John Eric Martin  <John.Martin@emmicro-us.com>
12837         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12838         * config/arc/arc.c (_arc_jli_section): New struct.
12839         (arc_jli_section): New type.
12840         (rc_jli_sections): New static variable.
12841         (arc_handle_jli_attribute): New function.
12842         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12843         (arc_file_end): New function.
12844         (TARGET_ASM_FILE_END): Define.
12845         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12846         (arc_add_jli_section): New function.
12847         (jli_call_scan): Likewise.
12848         (arc_reorg): Call jli_call_scan.
12849         (arc_output_addsi): Remove 'S' from printing asm operand.
12850         (arc_is_jli_call_p): New function.
12851         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12852         operand.
12853         (movhi_insn): Likewise.
12854         (movsi_insn): Likewise.
12855         (movsi_set_cc_insn): Likewise.
12856         (loadqi_update): Likewise.
12857         (load_zeroextendqisi_update): Likewise.
12858         (load_signextendqisi_update): Likewise.
12859         (loadhi_update): Likewise.
12860         (load_zeroextendhisi_update): Likewise.
12861         (load_signextendhisi_update): Likewise.
12862         (loadsi_update): Likewise.
12863         (loadsf_update): Likewise.
12864         (movsicc_insn): Likewise.
12865         (bset_insn): Likewise.
12866         (bxor_insn): Likewise.
12867         (bclr_insn): Likewise.
12868         (bmsk_insn): Likewise.
12869         (bicsi3_insn): Likewise.
12870         (cmpsi_cc_c_insn): Likewise.
12871         (movsi_ne): Likewise.
12872         (movsi_cond_exec): Likewise.
12873         (clrsbsi2): Likewise.
12874         (norm_f): Likewise.
12875         (normw): Likewise.
12876         (swap): Likewise.
12877         (divaw): Likewise.
12878         (flag): Likewise.
12879         (sr): Likewise.
12880         (kflag): Likewise.
12881         (ffs): Likewise.
12882         (ffs_f): Likewise.
12883         (fls): Likewise.
12884         (call_i): Remove 'S' asm letter, add jli instruction.
12885         (call_value_i): Likewise.
12886         * config/arc/arc.op (mjli-always): New option.
12887         * config/arc/constraints.md (Cji): New constraint.
12888         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12889         operand.
12890         (subsf3_fpx): Likewise.
12891         (mulsf3_fpx): Likewise.
12892         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12893         asm operand.
12894         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12895         function attrbutes.
12896         * doc/invoke.texi (ARC): Document mjli-always option.
12898 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12900         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12901         avoid addition with 0 and use incw and decw where possible.
12903 2018-01-26  Richard Biener  <rguenther@suse.de>
12905         PR tree-optimization/81082
12906         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12907         association if it requires casting to unsigned.
12908         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12909         from fold_plusminus_mult_expr to catch important cases late when
12910         range info is available.
12912 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12914         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12915         * configure.ac (hidden_linkonce): New test.
12916         * configure: Regenerate.
12917         * config.in: Regenerate.
12919 2018-01-26  Julia Koval  <julia.koval@intel.com>
12921         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12922         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12923         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12924         _mm_mask_bitshuffle_epi64_mask): Fix type.
12925         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12926         USI_FTYPE_V4DI_V4DI_USI): Remove.
12927         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12928         __builtin_ia32_vpshufbitqmb256_mask,
12929         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12930         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12931         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12933 2018-01-26  Alan Modra  <amodra@gmail.com>
12935         PR target/84033
12936         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12937         UNSPEC_VBPERMQ.  Sort other unspecs.
12939 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12941         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12943 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12945         PR middle-end/83055
12946         * predict.c (drop_profile): Do not push/pop cfun; update also
12947         node->count.
12948         (handle_missing_profiles): Fix logic looking for zero profiles.
12950 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12952         PR middle-end/83977
12953         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12954         on functions with #pragma omp declare simd or functions with simd
12955         attribute.
12956         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12957         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12958         Remove trailing \n from warning_at calls.
12960 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12962         PR target/84028
12963         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12964         for neutered workers.
12966 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12968         PR target/68467
12969         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12970         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12972 2018-01-24  Jeff Law  <law@redhat.com>
12974         PR target/83994
12975         * i386.c (get_probe_interval): Move to earlier point.
12976         (ix86_compute_frame_layout): If -fstack-clash-protection and
12977         the frame is larger than the probe interval, then use pushes
12978         to save registers rather than reg->mem moves.
12979         (ix86_expand_prologue): Remove conditional for int_registers_saved
12980         assertion.
12982 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12984         PR target/84014
12985         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12986         min/max for never referenced object.
12988 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12990         PR middle-end/83977
12991         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12992         here.
12993         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12994         attributes from DECL_ATTRIBUTES (decl) without affecting
12995         DECL_ATTRIBUTES (current_function_decl).
12996         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12997         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12999 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
13001         PR tree-optimization/83979
13002         * fold-const.c (fold_comparison): Use constant_boolean_node
13003         instead of boolean_{true,false}_node.
13005 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
13007         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13008         with zero counts.
13010 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13012         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13013         Simplify the clause that sets the length attribute.
13014         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13015         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
13016         clause that sets the length attribute.
13017         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13019 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13021         PR target/83589
13022         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
13023         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
13024         Add strict parameter.
13025         (prevent_branch_around_nothing): Insert dummy insn between branch to
13026         label and label with no ptx insn inbetween.
13027         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
13029 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13031         PR target/81352
13032         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13033         for neutered threads in warp.
13034         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
13036 2018-01-24  Richard Biener  <rguenther@suse.de>
13038         PR tree-optimization/83176
13039         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
13040         operands.
13042 2018-01-24  Richard Biener  <rguenther@suse.de>
13044         PR tree-optimization/82819
13045         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
13046         code generating pluses that are no-ops in the target precision.
13048 2018-01-24  Richard Biener  <rguenther@suse.de>
13050         PR middle-end/84000
13051         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
13053 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13055         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
13056         to merge probabilities.
13057         * predict.c (probably_never_executed): Also mark as cold functions
13058         with global 0 profile and guessed local profile.
13059         * profile-count.c (profile_probability::combine_with_count): New
13060         member function.
13061         * profile-count.h (profile_probability::operator*,
13062         profile_probability::operator*=, profile_probability::operator/,
13063         profile_probability::operator/=): Reduce precision to adjusted
13064         and set value to guessed on contradictory divisions.
13065         (profile_probability::combine_with_freq): Remove.
13066         (profile_probability::combine_wiht_count): Declare.
13067         (profile_count::force_nonzero):: Set to adjusted.
13068         (profile_count::probability_in):: Set quality to adjusted.
13069         * tree-ssa-tail-merge.c (replace_block_by): Use
13070         combine_with_count.
13072 2018-01-23  Andrew Waterman  <andrew@sifive.com>
13073             Jim Wilson  <jimw@sifive.com>
13075         * config/riscv/riscv.c (riscv_stack_boundary): New.
13076         (riscv_option_override): Set riscv_stack_boundary.  Handle
13077         riscv_preferred_stack_boundary_arg.
13078         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
13079         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
13080         (STACK_BOUNDARY): Set to riscv_stack_boundary.
13081         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
13082         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
13083         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
13085 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
13087         PR target/83905
13088         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
13089         of struct ix86_frame.
13090         (ix86_expand_epilogue): Likewise.  Add a local variable for
13091         the reg_save_offset field in struct ix86_frame.
13093 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
13095         PR tree-optimization/82604
13096         * tree-loop-distribution.c (enum partition_kind): New enum item
13097         PKIND_PARTIAL_MEMSET.
13098         (partition_builtin_p): Support above new enum item.
13099         (generate_code_for_partition): Ditto.
13100         (compute_access_range): Differentiate cases that equality can be
13101         proven at all loops, the innermost loops or no loops.
13102         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13103         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
13104         (finalize_partitions, distribute_loop): Don't fuse partition of
13105         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13106         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13107         parloop is enabled.
13109 2018-01-23  Martin Liska  <mliska@suse.cz>
13111         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13112         order to ignore the predictor.
13113         (PRED_POLYMORPHIC_CALL): Likewise.
13114         (PRED_RECURSIVE_CALL): Likewise.
13116 2018-01-23  Martin Liska  <mliska@suse.cz>
13118         * tree-profile.c (tree_profiling): Print function header to
13119         aware reader which function we are working on.
13120         * value-prof.c (gimple_find_values_to_profile): Do not print
13121         not interesting value histograms.
13123 2018-01-23  Martin Liska  <mliska@suse.cz>
13125         * profile-count.h (enum profile_quality): Add
13126         profile_uninitialized as the first value. Do not number values
13127         as they are zero based.
13128         (profile_count::verify): Update sanity check.
13129         (profile_probability::verify): Likewise.
13131 2018-01-23  Nathan Sidwell  <nathan@acm.org>
13133         * doc/invoke.texi (ffor-scope): Deprecate.
13135 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13137         PR tree-optimization/83510
13138         * domwalk.c (set_all_edges_as_executable): New function.
13139         (dom_walker::dom_walker): Convert bool param
13140         "skip_unreachable_blocks" to enum reachability.  Move setup of
13141         edge flags to set_all_edges_as_executable and only do it when
13142         reachability is REACHABLE_BLOCKS.
13143         * domwalk.h (enum dom_walker::reachability): New enum.
13144         (dom_walker::dom_walker): Convert bool param
13145         "skip_unreachable_blocks" to enum reachability.
13146         (set_all_edges_as_executable): New decl.
13147         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
13148         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13149         "reachability".
13150         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13151         but converting true to REACHABLE_BLOCKS.
13152         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13153         * tree-vrp.c
13154         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13155         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13156         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13157         REACHABLE_BLOCKS.
13158         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13159         if check_all_array_refs will be called.
13161 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13163         * tree.c (selftest::test_location_wrappers): Add more test
13164         coverage.
13166 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13168         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13169         (selftest::test_bit_in_range): Likewise.
13171 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13173         PR testsuite/83888
13174         * doc/sourcebuild.texi (vect_float): Say that the selector
13175         only describes the situation when -funsafe-math-optimizations is on.
13176         (vect_float_strict): Document.
13178 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13180         PR tree-optimization/83965
13181         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13182         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13183         instead of checking only for a reduction.
13184         (vect_recog_widen_sum_pattern): Likewise.
13186 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13188         * predict.c (probably_never_executed): Only use precise profile info.
13189         (compute_function_frequency): Skip after inlining hack since we now
13190         have quality checking.
13192 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13194         * profile-count.h (profile_probability::very_unlikely,
13195         profile_probability::unlikely, profile_probability::even): Set
13196         precision to guessed.
13198 2018-01-23  Richard Biener  <rguenther@suse.de>
13200         PR tree-optimization/83963
13201         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13202         Properly terminate dominator walk when crossing the exit edge not
13203         when visiting its source block.
13205 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
13207         PR c++/83918
13208         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13209         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13211 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
13213         PR tree-optimization/83957
13214         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
13215         semicolon after for body surrounded by braces.
13217         PR tree-optimization/83081
13218         * profile-count.h (profile_probability::split): New method.
13219         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13220         Use profile_probability::split.
13221         (do_compare_rtx_and_jump): Fix adjustment of probabilities
13222         when splitting a single conditional jump into 2.
13224 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
13226         PR tree-optimization/69452
13227         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13228         decl.
13230 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13232         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13233         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13234         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13236 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13238         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13239         declaration.
13240         * config/rl78/rl78.md (movdi): New define_expand.
13241         * config/rl78/rl78.c (rl78_split_movdi): New function.
13243 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
13245         PR target/83862
13246         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13247         no longer used.
13248         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13249         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13250         128-bit to produce an UNSPEC move to get the double word with the
13251         signbit and then a shift directly to do signbit.
13252         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13253         implementation with a new version that just does either a direct
13254         move or a regular move.  Move memory interface to separate insns.
13255         Move insns so they are next to the expander.
13256         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13257         with signbit move.  Split big and little endian case.
13258         (signbit<mode>2_dm_mem_le): Likewise.
13259         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13260         (signbit<mode>2_dm2): Likewise.
13262 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13264         * config/rl78/rl78.md (anddi3): New define_expand.
13266 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13268         * config/rl78/rl78.md (umindi3): New define_expand.
13270 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13272         * config/rl78/rl78.md (smindi3): New define_expand.
13274 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13276         * config/rl78/rl78.md (smaxdi3): New define_expand.
13278 2018-01-22  Carl Love  <cel@us.ibm.com>
13280         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13281         LVX_V1TI): Add macro expansion.
13282         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13283         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13284         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13285         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13286         Change check to determine if the instruction is a byte reversing
13287         entry.  Fix typo in comment.
13288         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13289         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13290         Add def_builtin calls for new builtins.
13291         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13292         Add define_insn expansion.
13294 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13296         * config/rl78/rl78.md (umaxdi3): New define_expand.
13298 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13300         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13301         for non-QImode registers.
13303 2018-01-22  Richard Biener  <rguenther@suse.de>
13305         PR tree-optimization/83963
13306         * graphite-scop-detection.c (scop_detection::get_sese): Delay
13307         including the loop exit block.
13308         (scop_detection::merge_sese): Likewise.
13309         (scop_detection::add_scop): Do it here instead.
13311 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13313         * doc/sourcebuild.texi (arm_softfloat): Document.
13315 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
13317         PR gcc/77734
13318         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13319         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13320         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13322 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13323             David Edelsohn  <dje.gcc@gmail.com>
13325         PR target/83946
13326         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13327         Change "crset eq" to "crset 2".
13328         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13329         (*call_indirect_aix<mode>_nospec): Likewise.
13330         (*call_value_indirect_aix<mode>_nospec): Likewise.
13331         (*call_indirect_elfv2<mode>_nospec): Likewise.
13332         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13333         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13334         change assembly output from . to $.
13335         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13336         (indirect_jump<mode>_nospec): Change assembly output from . to $.
13337         (*tablejump<mode>_internal1_nospec): Likewise.
13339 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
13341         PR target/80870
13342         * config/sh/sh_optimize_sett_clrt.cc:
13343         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13345 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
13347         PR tree-optimization/83940
13348         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13349         offset_dt to vect_constant_def rather than vect_unknown_def_type.
13350         (vect_check_load_store_mask): Add a mask_dt_out parameter and
13351         use it to pass back the definition type.
13352         (vect_check_store_rhs): Likewise rhs_dt_out.
13353         (vect_build_gather_load_calls): Add a mask_dt argument and use
13354         it instead of a call to vect_is_simple_use.
13355         (vectorizable_store): Update calls to vect_check_load_store_mask
13356         and vect_check_store_rhs.  Use the dt returned by the latter instead
13357         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
13358         instead of calls to vect_is_simple_use.  Pass the scalar rather
13359         than the vector operand to vect_is_simple_use when handling
13360         second and subsequent copies of an rhs value.
13361         (vectorizable_load): Update calls to vect_check_load_store_mask
13362         and vect_build_gather_load_calls.  Use the cached mask_dt and
13363         gs_info.offset_dt instead of calls to vect_is_simple_use.
13365 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
13367         PR middle-end/83945
13368         * tree-emutls.c: Include gimplify.h.
13369         (lower_emutls_2): New function.
13370         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13371         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13372         it before further processing.
13374         PR target/83930
13375         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13376         UINTVAL (trueop1) instead of INTVAL (op1).
13378 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
13380         PR debug/81570
13381         PR debug/83728
13382         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13383         INCOMING_FRAME_SP_OFFSET if not defined.
13384         (scan_trace): Add ENTRY argument.  If true and
13385         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13386         emit a note to adjust the CFA offset.
13387         (create_cfi_notes): Adjust scan_trace callers.
13388         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13389         INCOMING_FRAME_SP_OFFSET in the CIE.
13390         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13391         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13392         Likewise.
13393         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13394         * doc/tm.texi: Regenerated.
13396 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13398         PR rtl-optimization/83147
13399         * lra-constraints.c (remove_inheritance_pseudos): Use
13400         lra_substitute_pseudo_within_insn.
13402 2018-01-19  Tom de Vries  <tom@codesourcery.com>
13403             Cesar Philippidis  <cesar@codesourcery.com>
13405         PR target/83920
13406         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13408 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
13410         PR target/83790
13411         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13412         spaces for function labels.
13414 2018-01-19  Martin Liska  <mliska@suse.cz>
13416         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13417         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13418         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13419         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13420         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13421         (PRED_CONST_RETURN): Change from 69 to 65.
13422         (PRED_NULL_RETURN): Change from 91 to 71.
13423         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13424         (PRED_LOOP_GUARD): Change from 66 to 73.
13426 2018-01-19  Martin Liska  <mliska@suse.cz>
13428         * predict.c (predict_insn_def): Add new assert.
13429         (struct branch_predictor): Change type to signed integer.
13430         (test_prediction_value_range): Amend test to cover
13431         PROB_UNINITIALIZED.
13432         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13433         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13434         (PRED_LOOP_ITERATIONS_MAX): Likewise.
13435         (PRED_LOOP_IV_COMPARE): Likewise.
13436         * predict.h (PROB_UNINITIALIZED): Define new constant.
13438 2018-01-19  Martin Liska  <mliska@suse.cz>
13440         * predict.c (dump_prediction): Add new format for
13441         analyze_brprob.py script which is enabled with -details
13442         suboption.
13443         * profile-count.h (precise_p): New function.
13445 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13447         PR tree-optimization/83922
13448         * tree-vect-loop.c (vect_verify_full_masking): Return false if
13449         there are no statements that need masking.
13450         (vect_active_double_reduction_p): New function.
13451         (vect_analyze_loop_operations): Use it when handling phis that
13452         are not in the loop header.
13454 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13456         PR tree-optimization/83914
13457         * tree-vect-loop.c (vectorizable_induction): Don't convert
13458         init_expr or apply the peeling adjustment for inductions
13459         that are nested within the vectorized loop.
13461 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13463         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13464         instead of NEG.
13466 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13468         PR sanitizer/81715
13469         PR testsuite/83882
13470         * function.h (gimplify_parameters): Add gimple_seq * argument.
13471         * function.c: Include gimple.h and options.h.
13472         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13473         for the added local temporaries if needed.
13474         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13475         if there are any parameter cleanups, wrap whole body into a
13476         try/finally with the cleanups.
13478 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
13480         PR target/82964
13481         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13482         Use GET_MODE_CLASS for scalar floating point.
13484 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13486         PR ipa/82256
13487         patch by PaX Team
13488         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13489         Fix call of call_cgraph_insertion_hooks.
13491 2018-01-18  Martin Sebor  <msebor@redhat.com>
13493         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13495 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13497         PR ipa/83619
13498         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13499         frequencies.
13501 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
13503         PR other/70268
13504         * common.opt: (-ffile-prefix-map): New option.
13505         * opts.c (common_handle_option): Defer it.
13506         * opts-global.c (handle_common_deferred_options): Handle it.
13507         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13508         * file-prefix-map.h: New file.
13509         (remap_debug_filename, add_debug_prefix_map): ...here.
13510         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13511         * final.c (debug_prefix_map, add_debug_prefix_map
13512         remap_debug_filename): Move to...
13513         * file-prefix-map.c: New file.
13514         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13515         generalize, get rid of alloca(), use strrchr() instead of strchr().
13516         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13517         Implement in terms of add_prefix_map().
13518         (remap_macro_filename, remap_debug_filename): Implement in term of
13519         remap_filename().
13520         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13521         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13522         * dbxout.c: Include file-prefix-map.h.
13523         * varasm.c: Likewise.
13524         * vmsdbgout.c: Likewise.
13525         * xcoffout.c: Likewise.
13526         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13527         * doc/cppopts.texi (-fmacro-prefix-map): Document.
13528         * doc/invoke.texi (-ffile-prefix-map): Document.
13529         (-fdebug-prefix-map): Update description.
13531 2018-01-18  Martin Liska  <mliska@suse.cz>
13533         * config/i386/i386.c (indirect_thunk_name): Document that also
13534         lfence is emitted.
13535         (output_indirect_thunk): Document why both instructions
13536         (pause and lfence) are generated.
13538 2018-01-18  Richard Biener  <rguenther@suse.de>
13540         PR tree-optimization/83887
13541         * graphite-scop-detection.c
13542         (scop_detection::get_nearest_dom_with_single_entry): Remove.
13543         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13544         (scop_detection::merge_sese): Re-implement with a flood-fill
13545         algorithm that properly finds a SESE region if it exists.
13547 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13549         PR c/61240
13550         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13551         pointer_diff optimizations use view_convert instead of convert.
13553 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13555         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13556         Generate different code for -mno-speculate-indirect-jumps.
13557         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13558         (*call_indirect_aix<mode>): Disable for
13559         -mno-speculate-indirect-jumps.
13560         (*call_indirect_aix<mode>_nospec): New define_insn.
13561         (*call_value_indirect_aix<mode>): Disable for
13562         -mno-speculate-indirect-jumps.
13563         (*call_value_indirect_aix<mode>_nospec): New define_insn.
13564         (*sibcall_nonlocal_sysv<mode>): Generate different code for
13565         -mno-speculate-indirect-jumps.
13566         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13568 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13570         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13571         long double type, set the flags for noting the default long double
13572         type, even if we don't pass or return a long double type.
13574 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
13576         PR ipa/83051
13577         * ipa-inline.c (flatten_function): Do not overwrite final inlining
13578         failure.
13580 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
13582         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13583         support for merge[hl].
13584         (fold_mergehl_helper): New helper function.
13585         (tree-vector-builder.h): New #include for tree_vector_builder usage.
13586         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13587         (altivec_vmrglw_direct): Add xxmrglw insn.
13589 2018-01-17  Andrew Waterman  <andrew@sifive.com>
13591         * config/riscv/riscv.c (riscv_conditional_register_usage): If
13592         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13594 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
13596         PR lto/83121
13597         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13598         call the lto_location_cache before reading the
13599         DECL_SOURCE_LOCATION of the types.
13601 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
13602             Richard Sandiford  <richard.sandiford@linaro.org>
13604         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13605         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13606         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13607         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13608         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13609         Add declaration.
13610         * config/aarch64/constraints.md (aarch64_movti_operand):
13611         Limit immediates.
13612         * config/aarch64/predicates.md (Uti): Add new constraint.
13614 2018-01-17 Carl Love  <cel@us.ibm.com>
13616         * config/rs6000/vsx.md (define_expand xl_len_r,
13617         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13618         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13619         lxvll.
13620         (define_expand, define_insn): Move the shift left from  the
13621         define_insn to the define_expand for lxvl and stxvl instructions.
13622         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13623         and XL_LEN_R definitions to PURE.
13625 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13627         * config/i386/i386.c (indirect_thunk_name): Declare regno
13628         as unsigned int.  Compare regno with INVALID_REGNUM.
13629         (output_indirect_thunk): Ditto.
13630         (output_indirect_thunk_function): Ditto.
13631         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13632         in the call to output_indirect_thunk_function.
13634 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13636         PR middle-end/83884
13637         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13638         rather than the size of inner_type to determine the stack slot size
13639         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13641 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13643         PR target/83546
13644         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13645         to PTA_SILVERMONT.
13647 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13649         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13650         endian Linux systems to optionally enable multilibs for selecting
13651         the long double type if the user configured an explicit type.
13652         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13653         have no long double multilibs if not defined.
13654         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13655         warn if the user used -mabi={ieee,ibm}longdouble and we built
13656         multilibs for long double.
13657         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13658         appropriate multilib option.
13659         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13660         multilib options.
13661         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13662         for building long double multilibs.
13663         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13665 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13667         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13668         copies.
13670         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13671         64 bits.
13672         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13673         128 bits.
13675         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13676         variables.
13678         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13679         return value.
13681 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13683         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13684         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13686 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13688         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13689         different rtl trees depending on TARGET_64BIT.
13690         (rs6000_gen_lvx): Likewise.
13692 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13694         * config/visium/visium.md (nop): Tweak comment.
13695         (hazard_nop): Likewise.
13697 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13699         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13700         -mspeculate-indirect-jumps.
13701         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13702         for -mno-speculate-indirect-jumps.
13703         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13704         (*call_value_indirect_elfv2<mode>): Disable for
13705         -mno-speculate-indirect-jumps.
13706         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13707         (indirect_jump): Emit different RTL for
13708         -mno-speculate-indirect-jumps.
13709         (*indirect_jump<mode>): Disable for
13710         -mno-speculate-indirect-jumps.
13711         (*indirect_jump<mode>_nospec): New define_insn.
13712         (tablejump): Emit different RTL for
13713         -mno-speculate-indirect-jumps.
13714         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13715         (tablejumpsi_nospec): New define_expand.
13716         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13717         (tablejumpdi_nospec): New define_expand.
13718         (*tablejump<mode>_internal1): Disable for
13719         -mno-speculate-indirect-jumps.
13720         (*tablejump<mode>_internal1_nospec): New define_insn.
13721         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13722         option.
13724 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13726         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13727         callers updated.
13729 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13730             Richard Biener  <rguenth@suse.de>
13732         PR libgomp/83590
13733         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13734         return early, inline manually is_gimple_sizepos.  Make sure if we
13735         call gimplify_expr we don't end up with a gimple constant.
13736         * tree.c (variably_modified_type_p): Don't return true for
13737         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13738         * gimplify.h (is_gimple_sizepos): Remove.
13740 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13742         PR tree-optimization/83857
13743         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13744         vectorizable_live_operation for pure SLP statements.
13745         (vectorizable_live_operation): Handle PHIs.
13747 2018-01-16  Richard Biener  <rguenther@suse.de>
13749         PR tree-optimization/83867
13750         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13751         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13753 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13755         PR c/83844
13756         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13757         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13758         If off is not INTEGER_CST, issue a may not be aligned warning
13759         rather than isn't aligned.  Use isn%'t rather than isn't.
13760         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13761         into MULT_EXPR.
13762         <case MULT_EXPR>: Improve the case when bottom and one of the
13763         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13764         operand, in that case check if the other operand is multiple of
13765         bottom divided by the INTEGER_CST operand.
13767 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13769         PR target/83858
13770         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13771         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13772         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13773         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13774         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13775         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13776         (pa_function_arg_size): New function.
13778 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13780         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13781         in a separate statement.
13783 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13785         PR tree-optimization/83847
13786         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13787         group gathers and scatters.
13789 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13791         PR rtl-optimization/86620
13792         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13794         PR rtl-optimization/83213
13795         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13796         to last if both are JUMP_INSNs.
13798         PR tree-optimization/83843
13799         * gimple-ssa-store-merging.c
13800         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13801         store_immediate_info for bswap/nop orig_stores.
13803 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13805         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13806         !TARGET_MUL.
13807         <UDIV>: Increase cost if !TARGET_DIV.
13809 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13811         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13812         (define_attr "cr_logical_3op"): New.
13813         (cceq_ior_compare): Adjust.
13814         (cceq_ior_compare_complement): Adjust.
13815         (*cceq_rev_compare): Adjust.
13816         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13817         (is_cracked_insn): Adjust.
13818         (insn_must_be_first_in_group): Adjust.
13819         * config/rs6000/40x.md: Adjust.
13820         * config/rs6000/440.md: Adjust.
13821         * config/rs6000/476.md: Adjust.
13822         * config/rs6000/601.md: Adjust.
13823         * config/rs6000/603.md: Adjust.
13824         * config/rs6000/6xx.md: Adjust.
13825         * config/rs6000/7450.md: Adjust.
13826         * config/rs6000/7xx.md: Adjust.
13827         * config/rs6000/8540.md: Adjust.
13828         * config/rs6000/cell.md: Adjust.
13829         * config/rs6000/e300c2c3.md: Adjust.
13830         * config/rs6000/e500mc.md: Adjust.
13831         * config/rs6000/e500mc64.md: Adjust.
13832         * config/rs6000/e5500.md: Adjust.
13833         * config/rs6000/e6500.md: Adjust.
13834         * config/rs6000/mpc.md: Adjust.
13835         * config/rs6000/power4.md: Adjust.
13836         * config/rs6000/power5.md: Adjust.
13837         * config/rs6000/power6.md: Adjust.
13838         * config/rs6000/power7.md: Adjust.
13839         * config/rs6000/power8.md: Adjust.
13840         * config/rs6000/power9.md: Adjust.
13841         * config/rs6000/rs64.md: Adjust.
13842         * config/rs6000/titan.md: Adjust.
13844 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13846         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13847         ix86_indirect_branch_register logic.
13849 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13851         * config/i386/constraints.md (Bs): Update
13852         ix86_indirect_branch_register check.  Don't check
13853         ix86_indirect_branch_register with GOT_memory_operand.
13854         (Bw): Likewise.
13855         * config/i386/predicates.md (GOT_memory_operand): Don't check
13856         ix86_indirect_branch_register here.
13857         (GOT32_symbol_operand): Likewise.
13859 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13861         * config/i386/predicates.md (constant_call_address_operand):
13862         Rewrite ix86_indirect_branch_register logic.
13863         (sibcall_insn_operand): Likewise.
13865 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13867         * config/i386/constraints.md (Bs): Replace
13868         ix86_indirect_branch_thunk_register with
13869         ix86_indirect_branch_register.
13870         (Bw): Likewise.
13871         * config/i386/i386.md (indirect_jump): Likewise.
13872         (tablejump): Likewise.
13873         (*sibcall_memory): Likewise.
13874         (*sibcall_value_memory): Likewise.
13875         Peepholes of indirect call and jump via memory: Likewise.
13876         * config/i386/i386.opt: Likewise.
13877         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13878         (GOT_memory_operand): Likewise.
13879         (call_insn_operand): Likewise.
13880         (sibcall_insn_operand): Likewise.
13881         (GOT32_symbol_operand): Likewise.
13883 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13885         PR middle-end/83837
13886         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13887         type rather than type addr's type points to.
13888         (expand_omp_atomic_mutex): Likewise.
13889         (expand_omp_atomic): Likewise.
13891 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13893         PR target/83839
13894         * config/i386/i386.c (output_indirect_thunk_function): Use
13895         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13896         for  __x86_return_thunk.
13898 2018-01-15  Richard Biener  <rguenther@suse.de>
13900         PR middle-end/83850
13901         * expmed.c (extract_bit_field_1): Fix typo.
13903 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13905         PR target/83687
13906         * config/arm/iterators.md (VF): New mode iterator.
13907         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13908         Remove integer-related logic from pattern.
13909         (neon_vabd<mode>_3): Likewise.
13911 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13913         PR middle-end/82694
13914         * common.opt (fstrict-overflow): No longer an alias.
13915         (fwrapv-pointer): New option.
13916         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13917         also for pointer types based on flag_wrapv_pointer.
13918         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13919         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13920         opts->x_flag_wrapv got set.
13921         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13922         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13923         POINTER_TYPE_OVERFLOW_UNDEFINED.
13924         * match.pd: Likewise in address comparison pattern.
13925         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13927 2018-01-15  Richard Biener  <rguenther@suse.de>
13929         PR lto/83804
13930         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13931         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13932         Reset type names to their identifier if their TYPE_DECL doesn't
13933         have linkage (and thus is used for ODR and devirt).
13934         (save_debug_info_for_decl): Remove.
13935         (save_debug_info_for_type): Likewise.
13936         (add_tree_to_fld_list): Adjust.
13937         * tree-pretty-print.c (dump_generic_node): Make dumping of
13938         type names more robust.
13940 2018-01-15  Richard Biener  <rguenther@suse.de>
13942         * BASE-VER: Bump to 8.0.1.
13944 2018-01-14  Martin Sebor  <msebor@redhat.com>
13946         PR other/83508
13947         * builtins.c (check_access): Avoid warning when the no-warning bit
13948         is set.
13950 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13952         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13953         * ira-color (allocno_hard_regs_compare): Likewise.
13955 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13957         PR target/83013
13958         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13959         Use .pushsection/.popsection.
13961 2018-01-14  Martin Sebor  <msebor@redhat.com>
13963         PR c++/81327
13964         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13966 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13968         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13969         entry from extra_headers.
13970         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13971         extra_headers, make the list bitwise identical to the i?86-*-* one.
13973 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13975         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13976         -mcmodel=large with -mindirect-branch=thunk,
13977         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13978         -mfunction-return=thunk-extern.
13979         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13980         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13981         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13983 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13985         * config/i386/i386.c (print_reg): Print the name of the full
13986         integer register without '%'.
13987         (ix86_print_operand): Handle 'V'.
13988         * doc/extend.texi: Document 'V' modifier.
13990 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13992         * config/i386/constraints.md (Bs): Disallow memory operand for
13993         -mindirect-branch-register.
13994         (Bw): Likewise.
13995         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13996         (GOT_memory_operand): Likewise.
13997         (call_insn_operand): Likewise.
13998         (sibcall_insn_operand): Likewise.
13999         (GOT32_symbol_operand): Likewise.
14000         * config/i386/i386.md (indirect_jump): Call convert_memory_address
14001         for -mindirect-branch-register.
14002         (tablejump): Likewise.
14003         (*sibcall_memory): Likewise.
14004         (*sibcall_value_memory): Likewise.
14005         Disallow peepholes of indirect call and jump via memory for
14006         -mindirect-branch-register.
14007         (*call_pop): Replace m with Bw.
14008         (*call_value_pop): Likewise.
14009         (*sibcall_pop_memory): Replace m with Bs.
14010         * config/i386/i386.opt (mindirect-branch-register): New option.
14011         * doc/invoke.texi: Document -mindirect-branch-register option.
14013 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14015         * config/i386/i386-protos.h (ix86_output_function_return): New.
14016         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
14017         set function_return_type.
14018         (indirect_thunk_name): Add ret_p to indicate thunk for function
14019         return.
14020         (output_indirect_thunk_function): Pass false to
14021         indirect_thunk_name.
14022         (ix86_output_indirect_branch_via_reg): Likewise.
14023         (ix86_output_indirect_branch_via_push): Likewise.
14024         (output_indirect_thunk_function): Create alias for function
14025         return thunk if regno < 0.
14026         (ix86_output_function_return): New function.
14027         (ix86_handle_fndecl_attribute): Handle function_return.
14028         (ix86_attribute_table): Add function_return.
14029         * config/i386/i386.h (machine_function): Add
14030         function_return_type.
14031         * config/i386/i386.md (simple_return_internal): Use
14032         ix86_output_function_return.
14033         (simple_return_internal_long): Likewise.
14034         * config/i386/i386.opt (mfunction-return=): New option.
14035         (indirect_branch): Mention -mfunction-return=.
14036         * doc/extend.texi: Document function_return function attribute.
14037         * doc/invoke.texi: Document -mfunction-return= option.
14039 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14041         * config/i386/i386-opts.h (indirect_branch): New.
14042         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
14043         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
14044         with local indirect jump when converting indirect call and jump.
14045         (ix86_set_indirect_branch_type): New.
14046         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
14047         (indirectlabelno): New.
14048         (indirect_thunk_needed): Likewise.
14049         (indirect_thunk_bnd_needed): Likewise.
14050         (indirect_thunks_used): Likewise.
14051         (indirect_thunks_bnd_used): Likewise.
14052         (INDIRECT_LABEL): Likewise.
14053         (indirect_thunk_name): Likewise.
14054         (output_indirect_thunk): Likewise.
14055         (output_indirect_thunk_function): Likewise.
14056         (ix86_output_indirect_branch_via_reg): Likewise.
14057         (ix86_output_indirect_branch_via_push): Likewise.
14058         (ix86_output_indirect_branch): Likewise.
14059         (ix86_output_indirect_jmp): Likewise.
14060         (ix86_code_end): Call output_indirect_thunk_function if needed.
14061         (ix86_output_call_insn): Call ix86_output_indirect_branch if
14062         needed.
14063         (ix86_handle_fndecl_attribute): Handle indirect_branch.
14064         (ix86_attribute_table): Add indirect_branch.
14065         * config/i386/i386.h (machine_function): Add indirect_branch_type
14066         and has_local_indirect_jump.
14067         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
14068         to true.
14069         (tablejump): Likewise.
14070         (*indirect_jump): Use ix86_output_indirect_jmp.
14071         (*tablejump_1): Likewise.
14072         (simple_return_indirect_internal): Likewise.
14073         * config/i386/i386.opt (mindirect-branch=): New option.
14074         (indirect_branch): New.
14075         (keep): Likewise.
14076         (thunk): Likewise.
14077         (thunk-inline): Likewise.
14078         (thunk-extern): Likewise.
14079         * doc/extend.texi: Document indirect_branch function attribute.
14080         * doc/invoke.texi: Document -mindirect-branch= option.
14082 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
14084         PR ipa/83051
14085         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
14087 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
14089         * ipa-inline.c (want_inline_small_function_p): Return false if
14090         inlining has already failed with CIF_FINAL_ERROR.
14091         (update_caller_keys): Call want_inline_small_function_p before
14092         can_inline_edge_p.
14093         (update_callee_keys): Likewise.
14095 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14097         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14098         New function.
14099         (rs6000_quadword_masked_address_p): Likewise.
14100         (quad_aligned_load_p): Likewise.
14101         (quad_aligned_store_p): Likewise.
14102         (const_load_sequence_p): Add comment to describe the outer-most loop.
14103         (mimic_memory_attributes_and_flags): New function.
14104         (rs6000_gen_stvx): Likewise.
14105         (replace_swapped_aligned_store): Likewise.
14106         (rs6000_gen_lvx): Likewise.
14107         (replace_swapped_aligned_load): Likewise.
14108         (replace_swapped_load_constant): Capitalize argument name in
14109         comment describing this function.
14110         (rs6000_analyze_swaps): Add a third pass to search for vector loads
14111         and stores that access quad-word aligned addresses and replace
14112         with stvx or lvx instructions when appropriate.
14113         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14114         New function prototype.
14115         (rs6000_quadword_masked_address_p): Likewise.
14116         (rs6000_gen_lvx): Likewise.
14117         (rs6000_gen_stvx): Likewise.
14118         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14119         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14120         when memory address is aligned.
14121         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14122         this split to select lvx instruction when memory address is aligned.
14123         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14124         instruction when memory address is aligned.
14125         (*vsx_le_perm_load_v16qi): Likewise.
14126         (four unnamed splitters): Modify to select the stvx instruction
14127         when memory is aligned.
14129 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
14131         * predict.c (determine_unlikely_bbs): Handle correctly BBs
14132         which appears in the queue multiple times.
14134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14135             Alan Hayward  <alan.hayward@arm.com>
14136             David Sherwood  <david.sherwood@arm.com>
14138         * tree-vectorizer.h (vec_lower_bound): New structure.
14139         (_loop_vec_info): Add check_nonzero and lower_bounds.
14140         (LOOP_VINFO_CHECK_NONZERO): New macro.
14141         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14142         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14143         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14144         fields.  Make seg_len the distance travelled, not including the
14145         access size.
14146         (dr_direction_indicator): Declare.
14147         (dr_zero_step_indicator): Likewise.
14148         (dr_known_forward_stride_p): Likewise.
14149         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14150         tree-ssanames.h.
14151         (runtime_alias_check_p): Allow runtime alias checks with
14152         variable strides.
14153         (operator ==): Compare access_size and align.
14154         (prune_runtime_alias_test_list): Rework for new distinction between
14155         the access_size and seg_len.
14156         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
14157         segment lengths.
14158         (get_segment_min_max): New function.
14159         (create_intersect_range_checks): Use it.
14160         (dr_step_indicator): New function.
14161         (dr_direction_indicator): Likewise.
14162         (dr_zero_step_indicator): Likewise.
14163         (dr_known_forward_stride_p): Likewise.
14164         * tree-loop-distribution.c (data_ref_segment_size): Return
14165         DR_STEP * (niters - 1).
14166         (compute_alias_check_pairs): Update call to the dr_with_seg_len
14167         constructor.
14168         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14169         (vect_preserves_scalar_order_p): New function, split out from...
14170         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
14171         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14172         (vect_vfa_access_size): New function.
14173         (vect_vfa_align): Likewise.
14174         (vect_compile_time_alias): Take access_size_a and access_b arguments.
14175         (dump_lower_bound): New function.
14176         (vect_check_lower_bound): Likewise.
14177         (vect_small_gap_p): Likewise.
14178         (vectorizable_with_step_bound_p): Likewise.
14179         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14180         depencies if the vectorization factor is 1.  Convert the checks
14181         for nonzero steps into checks on the bounds of DR_STEP.  Try using
14182         a bunds check for variable steps if the minimum required step is
14183         relatively small. Update calls to the dr_with_seg_len
14184         constructor and to vect_compile_time_alias.
14185         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14186         function.
14187         (vect_loop_versioning): Call it.
14188         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14189         when retrying.
14190         (vect_estimate_min_profitable_iters): Account for any bounds checks.
14192 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14193             Alan Hayward  <alan.hayward@arm.com>
14194             David Sherwood  <david.sherwood@arm.com>
14196         * doc/sourcebuild.texi (vect_scatter_store): Document.
14197         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14198         optabs.
14199         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14200         Document.
14201         * genopinit.c (main): Add supports_vec_scatter_store and
14202         supports_vec_scatter_store_cached to target_optabs.
14203         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14204         IFN_MASK_SCATTER_STORE.
14205         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14206         functions.
14207         * internal-fn.h (internal_store_fn_p): Declare.
14208         (internal_fn_stored_value_index): Likewise.
14209         * internal-fn.c (scatter_store_direct): New macro.
14210         (expand_scatter_store_optab_fn): New function.
14211         (direct_scatter_store_optab_supported_p): New macro.
14212         (internal_store_fn_p): New function.
14213         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14214         IFN_MASK_SCATTER_STORE.
14215         (internal_fn_mask_index): Likewise.
14216         (internal_fn_stored_value_index): New function.
14217         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14218         for scatter stores.
14219         * optabs-query.h (supports_vec_scatter_store_p): Declare.
14220         * optabs-query.c (supports_vec_scatter_store_p): New function.
14221         * tree-vectorizer.h (vect_get_store_rhs): Declare.
14222         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14223         true for scatter stores.
14224         (vect_gather_scatter_fn_p): Handle scatter stores too.
14225         (vect_check_gather_scatter): Consider using scatter stores if
14226         supports_vec_scatter_store_p.
14227         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14228         scatter stores too.
14229         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14230         internal_fn_stored_value_index.
14231         (check_load_store_masking): Handle scatter stores too.
14232         (vect_get_store_rhs): Make public.
14233         (vectorizable_call): Use internal_store_fn_p.
14234         (vectorizable_store): Handle scatter store internal functions.
14235         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14236         when deciding whether the end of the group has been reached.
14237         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14238         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14239         (mask_scatter_store<mode>): New insns.
14241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14242             Alan Hayward  <alan.hayward@arm.com>
14243             David Sherwood  <david.sherwood@arm.com>
14245         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14246         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14247         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14248         function.
14249         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14250         Use vect_truncate_gather_scatter_offset if we can't treat the
14251         operation as a normal gather load or scatter store.
14252         (get_group_load_store_type): Take the gather_scatter_info
14253         as argument.  Try using a gather load or scatter store for
14254         single-element groups.
14255         (get_load_store_type): Update calls to get_group_load_store_type
14256         and vect_use_strided_gather_scatters_p.
14258 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14259             Alan Hayward  <alan.hayward@arm.com>
14260             David Sherwood  <david.sherwood@arm.com>
14262         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14263         optional tree argument.
14264         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14265         null target hooks.
14266         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14267         but continue to use the current value as a fallback.
14268         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14269         to compare the updates.
14270         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14271         (get_load_store_type): Use it when handling a strided access.
14272         (vect_get_strided_load_store_ops): New function.
14273         (vect_get_data_ptr_increment): Likewise.
14274         (vectorizable_load): Handle strided gather loads.  Always pass
14275         a step to vect_create_data_ref_ptr and bump_vector_ptr.
14277 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14278             Alan Hayward  <alan.hayward@arm.com>
14279             David Sherwood  <david.sherwood@arm.com>
14281         * doc/md.texi (gather_load@var{m}): Document.
14282         (mask_gather_load@var{m}): Likewise.
14283         * genopinit.c (main): Add supports_vec_gather_load and
14284         supports_vec_gather_load_cached to target_optabs.
14285         * optabs-tree.c (init_tree_optimization_optabs): Use
14286         ggc_cleared_alloc to allocate target_optabs.
14287         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14288         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14289         functions.
14290         * internal-fn.h (internal_load_fn_p): Declare.
14291         (internal_gather_scatter_fn_p): Likewise.
14292         (internal_fn_mask_index): Likewise.
14293         (internal_gather_scatter_fn_supported_p): Likewise.
14294         * internal-fn.c (gather_load_direct): New macro.
14295         (expand_gather_load_optab_fn): New function.
14296         (direct_gather_load_optab_supported_p): New macro.
14297         (direct_internal_fn_optab): New function.
14298         (internal_load_fn_p): Likewise.
14299         (internal_gather_scatter_fn_p): Likewise.
14300         (internal_fn_mask_index): Likewise.
14301         (internal_gather_scatter_fn_supported_p): Likewise.
14302         * optabs-query.c (supports_at_least_one_mode_p): New function.
14303         (supports_vec_gather_load_p): Likewise.
14304         * optabs-query.h (supports_vec_gather_load_p): Declare.
14305         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14306         and memory_type field.
14307         (NUM_PATTERNS): Bump to 15.
14308         * tree-vect-data-refs.c: Include internal-fn.h.
14309         (vect_gather_scatter_fn_p): New function.
14310         (vect_describe_gather_scatter_call): Likewise.
14311         (vect_check_gather_scatter): Try using internal functions for
14312         gather loads.  Recognize existing calls to a gather load function.
14313         (vect_analyze_data_refs): Consider using gather loads if
14314         supports_vec_gather_load_p.
14315         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14316         (vect_get_gather_scatter_offset_type): Likewise.
14317         (vect_convert_mask_for_vectype): Likewise.
14318         (vect_add_conversion_to_patterm): Likewise.
14319         (vect_try_gather_scatter_pattern): Likewise.
14320         (vect_recog_gather_scatter_pattern): New pattern recognizer.
14321         (vect_vect_recog_func_ptrs): Add it.
14322         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14323         internal_fn_mask_index and internal_gather_scatter_fn_p.
14324         (check_load_store_masking): Take the gather_scatter_info as an
14325         argument and handle gather loads.
14326         (vect_get_gather_scatter_ops): New function.
14327         (vectorizable_call): Check internal_load_fn_p.
14328         (vectorizable_load): Likewise.  Handle gather load internal
14329         functions.
14330         (vectorizable_store): Update call to check_load_store_masking.
14331         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14332         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14333         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14334         (aarch64_gather_scale_operand_d): New predicates.
14335         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14336         (mask_gather_load<mode>): New insns.
14338 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14339             Alan Hayward  <alan.hayward@arm.com>
14340             David Sherwood  <david.sherwood@arm.com>
14342         * optabs.def (fold_left_plus_optab): New optab.
14343         * doc/md.texi (fold_left_plus_@var{m}): Document.
14344         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14345         * internal-fn.c (fold_left_direct): Define.
14346         (expand_fold_left_optab_fn): Likewise.
14347         (direct_fold_left_optab_supported_p): Likewise.
14348         * fold-const-call.c (fold_const_fold_left): New function.
14349         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14350         * tree-parloops.c (valid_reduction_p): New function.
14351         (gather_scalar_reductions): Use it.
14352         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14353         (vect_finish_replace_stmt): Declare.
14354         * tree-vect-loop.c (fold_left_reduction_fn): New function.
14355         (needs_fold_left_reduction_p): New function, split out from...
14356         (vect_is_simple_reduction): ...here.  Accept reductions that
14357         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14358         (vect_force_simple_reduction): Also store the reduction type in
14359         the assignment's STMT_VINFO_REDUC_TYPE.
14360         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14361         (merge_with_identity): New function.
14362         (vect_expand_fold_left): Likewise.
14363         (vectorize_fold_left_reduction): Likewise.
14364         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
14365         scalar phi in place for it.  Check for target support and reject
14366         cases that would reassociate the operation.  Defer the transform
14367         phase to vectorize_fold_left_reduction.
14368         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14369         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14370         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14372 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14374         * tree-if-conv.c (predicate_mem_writes): Remove redundant
14375         call to ifc_temp_var.
14377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14378             Alan Hayward  <alan.hayward@arm.com>
14379             David Sherwood  <david.sherwood@arm.com>
14381         * target.def (legitimize_address_displacement): Take the original
14382         offset as a poly_int.
14383         * targhooks.h (default_legitimize_address_displacement): Update
14384         accordingly.
14385         * targhooks.c (default_legitimize_address_displacement): Likewise.
14386         * doc/tm.texi: Regenerate.
14387         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14388         as an argument, moving assert of ad->disp == ad->disp_term to...
14389         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
14390         Try calling targetm.legitimize_address_displacement before expanding
14391         the address rather than afterwards, and adjust for the new interface.
14392         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14393         Match the new hook interface.  Handle SVE addresses.
14394         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14395         new hook interface.
14397 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14399         * Makefile.in (OBJS): Add early-remat.o.
14400         * target.def (select_early_remat_modes): New hook.
14401         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14402         * doc/tm.texi: Regenerate.
14403         * targhooks.h (default_select_early_remat_modes): Declare.
14404         * targhooks.c (default_select_early_remat_modes): New function.
14405         * timevar.def (TV_EARLY_REMAT): New timevar.
14406         * passes.def (pass_early_remat): New pass.
14407         * tree-pass.h (make_pass_early_remat): Declare.
14408         * early-remat.c: New file.
14409         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14410         function.
14411         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14413 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14414             Alan Hayward  <alan.hayward@arm.com>
14415             David Sherwood  <david.sherwood@arm.com>
14417         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14418         vfm1 with a bound_epilog parameter.
14419         (vect_do_peeling): Update calls accordingly, and move the prologue
14420         call earlier in the function.  Treat the base bound_epilog as 0 for
14421         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
14422         this base when peeling for gaps.
14423         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14424         with fully-masked loops.
14425         (vect_estimate_min_profitable_iters): Handle the single peeled
14426         iteration in that case.
14428 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14429             Alan Hayward  <alan.hayward@arm.com>
14430             David Sherwood  <david.sherwood@arm.com>
14432         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14433         single-element interleaving even if the size is not a power of 2.
14434         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14435         accesses for single-element interleaving if the group size is
14436         not a power of 2.
14438 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14439             Alan Hayward  <alan.hayward@arm.com>
14440             David Sherwood  <david.sherwood@arm.com>
14442         * doc/md.texi (fold_extract_last_@var{m}): Document.
14443         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14444         * optabs.def (fold_extract_last_optab): New optab.
14445         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14446         * internal-fn.c (fold_extract_direct): New macro.
14447         (expand_fold_extract_optab_fn): Likewise.
14448         (direct_fold_extract_optab_supported_p): Likewise.
14449         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14450         * tree-vect-loop.c (vect_model_reduction_cost): Handle
14451         EXTRACT_LAST_REDUCTION.
14452         (get_initial_def_for_reduction): Do not create an initial vector
14453         for EXTRACT_LAST_REDUCTION reductions.
14454         (vectorizable_reduction): Leave the scalar phi in place for
14455         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
14456         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
14457         epilogue code for EXTRACT_LAST_REDUCTION and defer the
14458         transform phase to vectorizable_condition.
14459         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14460         split out from...
14461         (vect_finish_stmt_generation): ...here.
14462         (vect_finish_replace_stmt): New function.
14463         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14464         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14465         pattern.
14466         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14468 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14469             Alan Hayward  <alan.hayward@arm.com>
14470             David Sherwood  <david.sherwood@arm.com>
14472         * doc/md.texi (extract_last_@var{m}): Document.
14473         * optabs.def (extract_last_optab): New optab.
14474         * internal-fn.def (EXTRACT_LAST): New internal function.
14475         * internal-fn.c (cond_unary_direct): New macro.
14476         (expand_cond_unary_optab_fn): Likewise.
14477         (direct_cond_unary_optab_supported_p): Likewise.
14478         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14479         loops using EXTRACT_LAST.
14480         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14481         (extract_last_<mode>): ...this optab.
14482         (vec_extract<mode><Vel>): Update accordingly.
14484 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14485             Alan Hayward  <alan.hayward@arm.com>
14486             David Sherwood  <david.sherwood@arm.com>
14488         * target.def (empty_mask_is_expensive): New hook.
14489         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14490         * doc/tm.texi: Regenerate.
14491         * targhooks.h (default_empty_mask_is_expensive): Declare.
14492         * targhooks.c (default_empty_mask_is_expensive): New function.
14493         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14494         if the target says that empty masks are expensive.
14495         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14496         New function.
14497         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14499 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14500             Alan Hayward  <alan.hayward@arm.com>
14501             David Sherwood  <david.sherwood@arm.com>
14503         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14504         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14505         (vect_use_loop_mask_for_alignment_p): New function.
14506         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14507         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14508         niters_skip argument.  Make sure that the first niters_skip elements
14509         of the first iteration are inactive.
14510         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14511         Update call to vect_set_loop_masks_directly.
14512         (get_misalign_in_elems): New function, split out from...
14513         (vect_gen_prolog_loop_niters): ...here.
14514         (vect_update_init_of_dr): Take a code argument that specifies whether
14515         the adjustment should be added or subtracted.
14516         (vect_update_init_of_drs): Likewise.
14517         (vect_prepare_for_masked_peels): New function.
14518         (vect_do_peeling): Skip prologue peeling if we're using a mask
14519         instead.  Update call to vect_update_inits_of_drs.
14520         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14521         mask_skip_niters.
14522         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14523         alignment.  Do not include the number of peeled iterations in
14524         the minimum threshold in that case.
14525         (vectorizable_induction): Adjust the start value down by
14526         LOOP_VINFO_MASK_SKIP_NITERS iterations.
14527         (vect_transform_loop): Call vect_prepare_for_masked_peels.
14528         Take the number of skipped iterations into account when calculating
14529         the loop bounds.
14530         * tree-vect-stmts.c (vect_gen_while_not): New function.
14532 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14533             Alan Hayward  <alan.hayward@arm.com>
14534             David Sherwood  <david.sherwood@arm.com>
14536         * doc/sourcebuild.texi (vect_fully_masked): Document.
14537         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14538         default value to 0.
14539         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14540         split out from...
14541         (vect_analyze_loop_2): ...here. Don't check the vectorization
14542         factor against the number of loop iterations if the loop is
14543         fully-masked.
14545 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14546             Alan Hayward  <alan.hayward@arm.com>
14547             David Sherwood  <david.sherwood@arm.com>
14549         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14550         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14551         (dump_groups): Update accordingly.
14552         (iv_use::mem_type): New member variable.
14553         (address_p): New function.
14554         (record_use): Add a mem_type argument and initialize the new
14555         mem_type field.
14556         (record_group_use): Add a mem_type argument.  Use address_p.
14557         Remove obsolete null checks of base_object.  Update call to record_use.
14558         (find_interesting_uses_op): Update call to record_group_use.
14559         (find_interesting_uses_cond): Likewise.
14560         (find_interesting_uses_address): Likewise.
14561         (get_mem_type_for_internal_fn): New function.
14562         (find_address_like_use): Likewise.
14563         (find_interesting_uses_stmt): Try find_address_like_use before
14564         calling find_interesting_uses_op.
14565         (addr_offset_valid_p): Use the iv mem_type field as the type
14566         of the addressed memory.
14567         (add_autoinc_candidates): Likewise.
14568         (get_address_cost): Likewise.
14569         (split_small_address_groups_p): Use address_p.
14570         (split_address_groups): Likewise.
14571         (add_iv_candidate_for_use): Likewise.
14572         (autoinc_possible_for_pair): Likewise.
14573         (rewrite_groups): Likewise.
14574         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14575         (determine_group_iv_cost): Update after split of USE_ADDRESS.
14576         (get_alias_ptr_type_for_ptr_address): New function.
14577         (rewrite_use_address): Rewrite address uses in calls that were
14578         identified by find_address_like_use.
14580 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14581             Alan Hayward  <alan.hayward@arm.com>
14582             David Sherwood  <david.sherwood@arm.com>
14584         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14585         TARGET_MEM_REFs.
14586         * gimple-expr.h (is_gimple_addressable: Likewise.
14587         * gimple-expr.c (is_gimple_address): Likewise.
14588         * internal-fn.c (expand_call_mem_ref): New function.
14589         (expand_mask_load_optab_fn): Use it.
14590         (expand_mask_store_optab_fn): Likewise.
14592 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14593             Alan Hayward  <alan.hayward@arm.com>
14594             David Sherwood  <david.sherwood@arm.com>
14596         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14597         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14598         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14599         (cond_umax@var{mode}): Document.
14600         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14601         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14602         (cond_umin_optab, cond_umax_optab): New optabs.
14603         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14604         (COND_IOR, COND_XOR): New internal functions.
14605         * internal-fn.h (get_conditional_internal_fn): Declare.
14606         * internal-fn.c (cond_binary_direct): New macro.
14607         (expand_cond_binary_optab_fn): Likewise.
14608         (direct_cond_binary_optab_supported_p): Likewise.
14609         (get_conditional_internal_fn): New function.
14610         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14611         Cope with reduction statements that are vectorized as calls rather
14612         than assignments.
14613         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14614         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14615         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14616         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14617         (UNSPEC_COND_EOR): New unspecs.
14618         (optab): Add mappings for them.
14619         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14620         (sve_int_op, sve_fp_op): New int attributes.
14622 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14623             Alan Hayward  <alan.hayward@arm.com>
14624             David Sherwood  <david.sherwood@arm.com>
14626         * optabs.def (while_ult_optab): New optab.
14627         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14628         * internal-fn.def (WHILE_ULT): New internal function.
14629         * internal-fn.h (direct_internal_fn_supported_p): New override
14630         that takes two types as argument.
14631         * internal-fn.c (while_direct): New macro.
14632         (expand_while_optab_fn): New function.
14633         (convert_optab_supported_p): Likewise.
14634         (direct_while_optab_supported_p): New macro.
14635         * wide-int.h (wi::udiv_ceil): New function.
14636         * tree-vectorizer.h (rgroup_masks): New structure.
14637         (vec_loop_masks): New typedef.
14638         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14639         and fully_masked_p.
14640         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14641         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14642         (vect_max_vf): New function.
14643         (slpeel_make_loop_iterate_ntimes): Delete.
14644         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14645         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14646         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14647         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14648         internal-fn.h, stor-layout.h and optabs-query.h.
14649         (vect_set_loop_mask): New function.
14650         (add_preheader_seq): Likewise.
14651         (add_header_seq): Likewise.
14652         (interleave_supported_p): Likewise.
14653         (vect_maybe_permute_loop_masks): Likewise.
14654         (vect_set_loop_masks_directly): Likewise.
14655         (vect_set_loop_condition_masked): Likewise.
14656         (vect_set_loop_condition_unmasked): New function, split out from
14657         slpeel_make_loop_iterate_ntimes.
14658         (slpeel_make_loop_iterate_ntimes): Rename to..
14659         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14660         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14661         (vect_do_peeling): Update call accordingly.
14662         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14663         loops.
14664         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14665         mask_compare_type, can_fully_mask_p and fully_masked_p.
14666         (release_vec_loop_masks): New function.
14667         (_loop_vec_info): Use it to free the loop masks.
14668         (can_produce_all_loop_masks_p): New function.
14669         (vect_get_max_nscalars_per_iter): Likewise.
14670         (vect_verify_full_masking): Likewise.
14671         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14672         retries, and free the mask rgroups before retrying.  Check loop-wide
14673         reasons for disallowing fully-masked loops.  Make the final decision
14674         about whether use a fully-masked loop or not.
14675         (vect_estimate_min_profitable_iters): Do not assume that peeling
14676         for the number of iterations will be needed for fully-masked loops.
14677         (vectorizable_reduction): Disable fully-masked loops.
14678         (vectorizable_live_operation): Likewise.
14679         (vect_halve_mask_nunits): New function.
14680         (vect_double_mask_nunits): Likewise.
14681         (vect_record_loop_mask): Likewise.
14682         (vect_get_loop_mask): Likewise.
14683         (vect_transform_loop): Handle the case in which the final loop
14684         iteration might handle a partial vector.  Call vect_set_loop_condition
14685         instead of slpeel_make_loop_iterate_ntimes.
14686         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14687         (check_load_store_masking): New function.
14688         (prepare_load_store_mask): Likewise.
14689         (vectorizable_store): Handle fully-masked loops.
14690         (vectorizable_load): Likewise.
14691         (supportable_widening_operation): Use vect_halve_mask_nunits for
14692         booleans.
14693         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14694         (vect_gen_while): New function.
14695         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14696         (aarch64_uqdec<mode>): New insn.
14698 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14699             Alan Hayward  <alan.hayward@arm.com>
14700             David Sherwood  <david.sherwood@arm.com>
14702         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14703         (reduc_xor_scal_optab): New optabs.
14704         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14705         (reduc_xor_scal_@var{m}): Document.
14706         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14707         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14708         internal functions.
14709         * fold-const-call.c (fold_const_call): Handle them.
14710         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14711         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14712         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14713         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14714         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14715         (UNSPEC_XORV): New unspecs.
14716         (optab): Add entries for them.
14717         (BITWISEV): New int iterator.
14718         (bit_reduc_op): New int attributes.
14720 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14721             Alan Hayward  <alan.hayward@arm.com>
14722             David Sherwood  <david.sherwood@arm.com>
14724         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14725         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14726         * optabs.def (vec_shl_insert_optab): New optab.
14727         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14728         (duplicate_and_interleave): Likewise.
14729         * tree-vect-loop.c: Include internal-fn.h.
14730         (neutral_op_for_slp_reduction): New function, split out from
14731         get_initial_defs_for_reduction.
14732         (get_initial_def_for_reduction): Handle option 2 for variable-length
14733         vectors by loading the neutral value into a vector and then shifting
14734         the initial value into element 0.
14735         (get_initial_defs_for_reduction): Replace the code argument with
14736         the neutral value calculated by neutral_op_for_slp_reduction.
14737         Use gimple_build_vector for constant-length vectors.
14738         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14739         but the first group_size elements have a neutral value.
14740         Use duplicate_and_interleave otherwise.
14741         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14742         Update call to get_initial_defs_for_reduction.  Handle SLP
14743         reductions for variable-length vectors by creating one vector
14744         result for each scalar result, with the elements associated
14745         with other scalar results stubbed out with the neutral value.
14746         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14747         Require IFN_VEC_SHL_INSERT for double reductions on
14748         variable-length vectors, or SLP reductions that have
14749         a neutral value.  Require can_duplicate_and_interleave_p
14750         support for variable-length unchained SLP reductions if there
14751         is no neutral value, such as for MIN/MAX reductions.  Also require
14752         the number of vector elements to be a multiple of the number of
14753         SLP statements when doing variable-length unchained SLP reductions.
14754         Update call to vect_create_epilog_for_reduction.
14755         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14756         and remove initial values.
14757         (duplicate_and_interleave): Make public.
14758         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14759         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14762             Alan Hayward  <alan.hayward@arm.com>
14763             David Sherwood  <david.sherwood@arm.com>
14765         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14766         (can_duplicate_and_interleave_p): New function.
14767         (vect_get_and_check_slp_defs): Take the vector of statements
14768         rather than just the current one.  Remove excess parentheses.
14769         Restriction rejectinon of vect_constant_def and vect_external_def
14770         for variable-length vectors to boolean types, or types for which
14771         can_duplicate_and_interleave_p is false.
14772         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14773         (duplicate_and_interleave): New function.
14774         (vect_get_constant_vectors): Use gimple_build_vector for
14775         constant-length vectors and suitable variable-length constant
14776         vectors.  Use duplicate_and_interleave for other variable-length
14777         vectors.  Don't defer the update when inserting new statements.
14779 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14780             Alan Hayward  <alan.hayward@arm.com>
14781             David Sherwood  <david.sherwood@arm.com>
14783         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14784         min_profitable_iters doesn't go negative.
14786 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14787             Alan Hayward  <alan.hayward@arm.com>
14788             David Sherwood  <david.sherwood@arm.com>
14790         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14791         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14792         * optabs.def (vec_mask_load_lanes_optab): New optab.
14793         (vec_mask_store_lanes_optab): Likewise.
14794         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14795         (MASK_STORE_LANES): Likewise.
14796         * internal-fn.c (mask_load_lanes_direct): New macro.
14797         (mask_store_lanes_direct): Likewise.
14798         (expand_mask_load_optab_fn): Handle masked operations.
14799         (expand_mask_load_lanes_optab_fn): New macro.
14800         (expand_mask_store_optab_fn): Handle masked operations.
14801         (expand_mask_store_lanes_optab_fn): New macro.
14802         (direct_mask_load_lanes_optab_supported_p): Likewise.
14803         (direct_mask_store_lanes_optab_supported_p): Likewise.
14804         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14805         parameter.
14806         (vect_load_lanes_supported): Likewise.
14807         * tree-vect-data-refs.c (strip_conversion): New function.
14808         (can_group_stmts_p): Likewise.
14809         (vect_analyze_data_ref_accesses): Use it instead of checking
14810         for a pair of assignments.
14811         (vect_store_lanes_supported): Take a masked_p parameter.
14812         (vect_load_lanes_supported): Likewise.
14813         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14814         vect_store_lanes_supported and vect_load_lanes_supported.
14815         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14816         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14817         parameter.  Don't allow gaps for masked accesses.
14818         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14819         and vect_load_lanes_supported.
14820         (get_load_store_type): Take a masked_p parameter and update
14821         call to get_group_load_store_type.
14822         (vectorizable_store): Update call to get_load_store_type.
14823         Handle IFN_MASK_STORE_LANES.
14824         (vectorizable_load): Update call to get_load_store_type.
14825         Handle IFN_MASK_LOAD_LANES.
14827 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14828             Alan Hayward  <alan.hayward@arm.com>
14829             David Sherwood  <david.sherwood@arm.com>
14831         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14832         modes for SVE.
14833         * config/aarch64/aarch64-protos.h
14834         (aarch64_sve_struct_memory_operand_p): Declare.
14835         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14836         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14837         (VPRED, vpred): Handle SVE structure modes.
14838         * config/aarch64/constraints.md (Utx): New constraint.
14839         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14840         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14841         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14842         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14843         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14844         structure modes.  Split into pieces after RA.
14845         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14846         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14847         New patterns.
14848         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14849         SVE structure modes.
14850         (aarch64_classify_address): Likewise.
14851         (sizetochar): Move earlier in file.
14852         (aarch64_print_operand): Handle SVE register lists.
14853         (aarch64_array_mode): New function.
14854         (aarch64_sve_struct_memory_operand_p): Likewise.
14855         (TARGET_ARRAY_MODE): Redefine.
14857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14858             Alan Hayward  <alan.hayward@arm.com>
14859             David Sherwood  <david.sherwood@arm.com>
14861         * target.def (array_mode): New target hook.
14862         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14863         * doc/tm.texi: Regenerate.
14864         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14865         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14866         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14867         targetm.array_mode.
14868         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14869         type sizes.
14871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14872             Alan Hayward  <alan.hayward@arm.com>
14873             David Sherwood  <david.sherwood@arm.com>
14875         * fold-const.c (fold_binary_loc): Check the argument types
14876         rather than the result type when testing for a vector operation.
14878 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14880         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14881         * doc/tm.texi: Regenerate.
14883 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14884             Alan Hayward  <alan.hayward@arm.com>
14885             David Sherwood  <david.sherwood@arm.com>
14887         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14888         (sve): Document new AArch64 extension.
14889         * doc/md.texi (w): Extend the description of the AArch64
14890         constraint to include SVE vectors.
14891         (Upl, Upa): Document new AArch64 predicate constraints.
14892         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14893         enum.
14894         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14895         (msve-vector-bits=): New option.
14896         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14897         SVE when these are disabled.
14898         (sve): New extension.
14899         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14900         modes.  Adjust their number of units based on aarch64_sve_vg.
14901         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14902         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14903         aarch64_addr_query_type.
14904         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14905         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14906         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14907         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14908         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14909         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14910         (aarch64_simd_imm_zero_p): Delete.
14911         (aarch64_check_zero_based_sve_index_immediate): Declare.
14912         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14913         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14914         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14915         (aarch64_sve_float_mul_immediate_p): Likewise.
14916         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14917         rather than an rtx.
14918         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14919         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14920         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14921         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14922         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14923         (aarch64_regmode_natural_size): Likewise.
14924         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14925         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14926         left one place.
14927         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14928         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14929         for VG and the SVE predicate registers.
14930         (V_ALIASES): Add a "z"-prefixed alias.
14931         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14932         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14933         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14934         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14935         (REG_CLASS_NAMES): Add entries for them.
14936         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14937         and the predicate registers.
14938         (aarch64_sve_vg): Declare.
14939         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14940         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14941         (REGMODE_NATURAL_SIZE): Define.
14942         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14943         SVE macros.
14944         * config/aarch64/aarch64.c: Include cfgrtl.h.
14945         (simd_immediate_info): Add a constructor for series vectors,
14946         and an associated step field.
14947         (aarch64_sve_vg): New variable.
14948         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14949         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14950         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14951         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14952         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14953         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14954         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14955         (aarch64_get_mask_mode): New functions.
14956         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14957         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14958         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14959         predicate modes and predicate registers.  Explicitly restrict
14960         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14961         to store a vector mode if it is recognized by
14962         aarch64_classify_vector_mode.
14963         (aarch64_regmode_natural_size): New function.
14964         (aarch64_hard_regno_caller_save_mode): Return the original mode
14965         for predicates.
14966         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14967         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14968         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14969         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14970         functions.
14971         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14972         does not overlap dest if the function is frame-related.  Handle
14973         SVE constants.
14974         (aarch64_split_add_offset): New function.
14975         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14976         them aarch64_add_offset.
14977         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14978         and update call to aarch64_sub_sp.
14979         (aarch64_add_cfa_expression): New function.
14980         (aarch64_expand_prologue): Pass extra temporary registers to the
14981         functions above.  Handle the case in which we need to emit new
14982         DW_CFA_expressions for registers that were originally saved
14983         relative to the stack pointer, but now have to be expressed
14984         relative to the frame pointer.
14985         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14986         functions above.
14987         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14988         IP0 and IP1 values for SVE frames.
14989         (aarch64_expand_vec_series): New function.
14990         (aarch64_expand_sve_widened_duplicate): Likewise.
14991         (aarch64_expand_sve_const_vector): Likewise.
14992         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14993         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14994         into the register, rather than emitting a SET directly.
14995         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14996         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14997         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14998         (offset_9bit_signed_scaled_p): New functions.
14999         (aarch64_replicate_bitmask_imm): New function.
15000         (aarch64_bitmask_imm): Use it.
15001         (aarch64_cannot_force_const_mem): Reject expressions involving
15002         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
15003         (aarch64_classify_index): Handle SVE indices, by requiring
15004         a plain register index with a scale that matches the element size.
15005         (aarch64_classify_address): Handle SVE addresses.  Assert that
15006         the mode of the address is VOIDmode or an integer mode.
15007         Update call to aarch64_classify_symbol.
15008         (aarch64_classify_symbolic_expression): Update call to
15009         aarch64_classify_symbol.
15010         (aarch64_const_vec_all_in_range_p): New function.
15011         (aarch64_print_vector_float_operand): Likewise.
15012         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
15013         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
15014         and the FP immediates 1.0 and 0.5.
15015         (aarch64_print_address_internal): Handle SVE addresses.
15016         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
15017         (aarch64_regno_regclass): Handle predicate registers.
15018         (aarch64_secondary_reload): Handle big-endian reloads of SVE
15019         data modes.
15020         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
15021         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
15022         (aarch64_convert_sve_vector_bits): New function.
15023         (aarch64_override_options): Use it to handle -msve-vector-bits=.
15024         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15025         rather than an rtx.
15026         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
15027         Handle SVE vector and predicate modes.  Accept VL-based constants
15028         that need only one temporary register, and VL offsets that require
15029         no temporary registers.
15030         (aarch64_conditional_register_usage): Mark the predicate registers
15031         as fixed if SVE isn't available.
15032         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
15033         Return true for SVE vector and predicate modes.
15034         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
15035         rather than an unsigned int.  Handle SVE modes.
15036         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
15037         SVE modes.
15038         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
15039         if SVE is enabled.
15040         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15041         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15042         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15043         (aarch64_sve_float_mul_immediate_p): New functions.
15044         (aarch64_sve_valid_immediate): New function.
15045         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
15046         Explicitly reject structure modes.  Check for INDEX constants.
15047         Handle PTRUE and PFALSE constants.
15048         (aarch64_check_zero_based_sve_index_immediate): New function.
15049         (aarch64_simd_imm_zero_p): Delete.
15050         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
15051         vector modes.  Accept constants in the range of CNT[BHWD].
15052         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
15053         ask for an Advanced SIMD mode.
15054         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
15055         (aarch64_simd_vector_alignment): Handle SVE predicates.
15056         (aarch64_vectorize_preferred_vector_alignment): New function.
15057         (aarch64_simd_vector_alignment_reachable): Use it instead of
15058         the vector size.
15059         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
15060         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
15061         functions.
15062         (MAX_VECT_LEN): Delete.
15063         (expand_vec_perm_d): Add a vec_flags field.
15064         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
15065         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
15066         (aarch64_evpc_ext): Don't apply a big-endian lane correction
15067         for SVE modes.
15068         (aarch64_evpc_rev): Rename to...
15069         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
15070         (aarch64_evpc_rev_global): New function.
15071         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
15072         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
15073         MAX_VECT_LEN.
15074         (aarch64_evpc_sve_tbl): New function.
15075         (aarch64_expand_vec_perm_const_1): Update after rename of
15076         aarch64_evpc_rev.  Handle SVE permutes too, trying
15077         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
15078         than aarch64_evpc_tbl.
15079         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
15080         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
15081         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
15082         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
15083         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
15084         (aarch64_expand_sve_vcond): New functions.
15085         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
15086         of aarch64_vector_mode_p.
15087         (aarch64_dwarf_poly_indeterminate_value): New function.
15088         (aarch64_compute_pressure_classes): Likewise.
15089         (aarch64_can_change_mode_class): Likewise.
15090         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
15091         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
15092         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
15093         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
15094         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15095         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15096         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15097         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15098         constraints.
15099         (Dn, Dl, Dr): Accept const as well as const_vector.
15100         (Dz): Likewise.  Compare against CONST0_RTX.
15101         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15102         of "vector" where appropriate.
15103         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15104         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15105         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15106         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15107         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15108         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15109         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15110         (v_int_equiv): Extend to SVE modes.
15111         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15112         mode attributes.
15113         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15114         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15115         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15116         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15117         (SVE_COND_FP_CMP): New int iterators.
15118         (perm_hilo): Handle the new unpack unspecs.
15119         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15120         attributes.
15121         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15122         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15123         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15124         (aarch64_equality_operator, aarch64_constant_vector_operand)
15125         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15126         (aarch64_sve_nonimmediate_operand): Likewise.
15127         (aarch64_sve_general_operand): Likewise.
15128         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15129         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15130         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15131         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15132         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15133         (aarch64_sve_float_arith_immediate): Likewise.
15134         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15135         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15136         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15137         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15138         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15139         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15140         (aarch64_sve_float_arith_operand): Likewise.
15141         (aarch64_sve_float_arith_with_sub_operand): Likewise.
15142         (aarch64_sve_float_mul_operand): Likewise.
15143         (aarch64_sve_vec_perm_operand): Likewise.
15144         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15145         (aarch64_mov_operand): Accept const_poly_int and const_vector.
15146         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15147         as well as const_vector.
15148         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15149         in file.  Use CONST0_RTX and CONSTM1_RTX.
15150         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
15151         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15152         Use aarch64_simd_imm_zero.
15153         * config/aarch64/aarch64-sve.md: New file.
15154         * config/aarch64/aarch64.md: Include it.
15155         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15156         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15157         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15158         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15159         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15160         (sve): New attribute.
15161         (enabled): Disable instructions with the sve attribute unless
15162         TARGET_SVE.
15163         (movqi, movhi): Pass CONST_POLY_INT operaneds through
15164         aarch64_expand_mov_immediate.
15165         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15166         CNT[BHSD] immediates.
15167         (movti): Split CONST_POLY_INT moves into two halves.
15168         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15169         Split additions that need a temporary here if the destination
15170         is the stack pointer.
15171         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15172         (*add<mode>3_poly_1): New instruction.
15173         (set_clobber_cc): New expander.
15175 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15177         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15178         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
15179         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15180         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15181         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
15182         Change innermode from fixed_mode_size to machine_mode.
15183         (simplify_subreg): Update call accordingly.  Handle a constant-sized
15184         subreg of a variable-length CONST_VECTOR.
15186 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15187             Alan Hayward  <alan.hayward@arm.com>
15188             David Sherwood  <david.sherwood@arm.com>
15190         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15191         (add_offset_to_base): New function, split out from...
15192         (create_mem_ref): ...here.  When handling a scale other than 1,
15193         check first whether the address is valid without the offset.
15194         Add it into the base if so, leaving the index and scale as-is.
15196 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15198         PR c++/83778
15199         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15200         fold_for_warn before checking if arg2 is INTEGER_CST.
15202 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
15204         * config/rs6000/predicates.md (load_multiple_operation): Delete.
15205         (store_multiple_operation): Delete.
15206         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15207         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15208         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15209         guarded by TARGET_STRING.
15210         (rs6000_output_load_multiple): Delete.
15211         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15212         OPTION_MASK_STRING / TARGET_STRING handling.
15213         (print_operand) <'N', 'O'>: Add comment that these are unused now.
15214         (const rs6000_opt_masks) <"string">: Change mask to 0.
15215         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15216         (MASK_STRING): Delete.
15217         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15218         parts.  Simplify.
15219         (load_multiple): Delete.
15220         (*ldmsi8): Delete.
15221         (*ldmsi7): Delete.
15222         (*ldmsi6): Delete.
15223         (*ldmsi5): Delete.
15224         (*ldmsi4): Delete.
15225         (*ldmsi3): Delete.
15226         (store_multiple): Delete.
15227         (*stmsi8): Delete.
15228         (*stmsi7): Delete.
15229         (*stmsi6): Delete.
15230         (*stmsi5): Delete.
15231         (*stmsi4): Delete.
15232         (*stmsi3): Delete.
15233         (movmemsi_8reg): Delete.
15234         (corresponding unnamed define_insn): Delete.
15235         (movmemsi_6reg): Delete.
15236         (corresponding unnamed define_insn): Delete.
15237         (movmemsi_4reg): Delete.
15238         (corresponding unnamed define_insn): Delete.
15239         (movmemsi_2reg): Delete.
15240         (corresponding unnamed define_insn): Delete.
15241         (movmemsi_1reg): Delete.
15242         (corresponding unnamed define_insn): Delete.
15243         * config/rs6000/rs6000.opt (mno-string): New.
15244         (mstring): Replace by deprecation warning stub.
15245         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15247 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15249         * regrename.c (regrename_do_replace): If replacing the same
15250         reg multiple times, try to reuse last created gen_raw_REG.
15252         PR debug/81155
15253         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15254         main to workaround a bug in GDB.
15256 2018-01-12  Tom de Vries  <tom@codesourcery.com>
15258         PR target/83737
15259         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15261 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
15263         PR rtl-optimization/80481
15264         * ira-color.c (get_cap_member): New function.
15265         (allocnos_conflict_by_live_ranges_p): Use it.
15266         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15267         (setup_slot_coalesced_allocno_live_ranges): Ditto.
15269 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
15271         PR target/83628
15272         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15273         (*saddl_se_1): Ditto.
15274         (*ssubsi_1): Ditto.
15275         (*ssubl_se_1): Ditto.
15277 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15279         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15280         rather than wi::to_widest for DR_INITs.
15281         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15282         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15283         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15284         INTEGER_CSTs.
15285         (vect_analyze_group_access_1): Note that here.
15287 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15289         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15290         polynomial type sizes.
15292 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15294         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15295         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15296         (gimple_add_tmp_var): Likewise.
15298 2018-01-12  Martin Liska  <mliska@suse.cz>
15300         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15301         (gimple_alloc_sizes): Likewise.
15302         (dump_gimple_statistics): Use PRIu64 in printf format.
15303         * gimple.h: Change uint64_t to int.
15305 2018-01-12  Martin Liska  <mliska@suse.cz>
15307         * tree-core.h: Use uint64_t instead of int.
15308         * tree.c (tree_node_counts): Likewise.
15309         (tree_node_sizes): Likewise.
15310         (dump_tree_statistics): Use PRIu64 in printf format.
15312 2018-01-12  Martin Liska  <mliska@suse.cz>
15314         * Makefile.in: As qsort_chk is implemented in vec.c, add
15315         vec.o to linkage of gencfn-macros.
15316         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15317         passing the info to record_node_allocation_statistics.
15318         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15319         and pass the info.
15320         * ggc-common.c (struct ggc_usage): Add operator== and use
15321         it in operator< and compare function.
15322         * mem-stats.h (struct mem_usage): Likewise.
15323         * vec.c (struct vec_usage): Remove operator< and compare
15324         function. Can be simply inherited.
15326 2018-01-12  Martin Jambor  <mjambor@suse.cz>
15328         PR target/81616
15329         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15330         * tree-ssa-math-opts.c: Include domwalk.h.
15331         (convert_mult_to_fma_1): New function.
15332         (fma_transformation_info): New type.
15333         (fma_deferring_state): Likewise.
15334         (cancel_fma_deferring): New function.
15335         (result_of_phi): Likewise.
15336         (last_fma_candidate_feeds_initial_phi): Likewise.
15337         (convert_mult_to_fma): Added deferring logic, split actual
15338         transformation to convert_mult_to_fma_1.
15339         (math_opts_dom_walker): New type.
15340         (math_opts_dom_walker::after_dom_children): New method, body moved
15341         here from pass_optimize_widening_mul::execute, added deferring logic
15342         bits.
15343         (pass_optimize_widening_mul::execute): Moved most of code to
15344         math_opts_dom_walker::after_dom_children.
15345         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15346         * config/i386/i386.c (ix86_option_override_internal): Added
15347         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15349 2018-01-12  Richard Biener  <rguenther@suse.de>
15351         PR debug/83157
15352         * dwarf2out.c (gen_variable_die): Do not reset old_die for
15353         inline instance vars.
15355 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
15357         PR target/81819
15358         * config/rx/rx.c (rx_is_restricted_memory_address):
15359         Handle SUBREG case.
15361 2018-01-12  Richard Biener  <rguenther@suse.de>
15363         PR tree-optimization/80846
15364         * target.def (split_reduction): New target hook.
15365         * targhooks.c (default_split_reduction): New function.
15366         * targhooks.h (default_split_reduction): Declare.
15367         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15368         target requests first reduce vectors by combining low and high
15369         parts.
15370         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15371         (get_vectype_for_scalar_type_and_size): Export.
15372         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15373         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15374         * doc/tm.texi: Regenerate.
15375         * config/i386/i386.c (ix86_split_reduction): Implement
15376         TARGET_VECTORIZE_SPLIT_REDUCTION.
15378 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15380         PR target/83368
15381         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15382         in PIC mode except for TARGET_VXWORKS_RTP.
15383         * config/sparc/sparc.c: Include cfgrtl.h.
15384         (TARGET_INIT_PIC_REG): Define.
15385         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15386         (sparc_pic_register_p): New predicate.
15387         (sparc_legitimate_address_p): Use it.
15388         (sparc_legitimize_pic_address): Likewise.
15389         (sparc_delegitimize_address): Likewise.
15390         (sparc_mode_dependent_address_p): Likewise.
15391         (gen_load_pcrel_sym): Remove 4th parameter.
15392         (load_got_register): Adjust call to above.  Remove obsolete stuff.
15393         (sparc_expand_prologue): Do not call load_got_register here.
15394         (sparc_flat_expand_prologue): Likewise.
15395         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15396         (sparc_use_pseudo_pic_reg): New function.
15397         (sparc_init_pic_reg): Likewise.
15398         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15399         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15401 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
15403         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15404         Add item for branch_cost.
15406 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15408         PR rtl-optimization/83565
15409         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15410         not extend the result to a larger mode for rotate operations.
15411         (num_sign_bit_copies1): Likewise.
15413 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15415         PR target/40411
15416         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15417         -symbolic.
15418         Use values-Xc.o for -pedantic.
15419         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15421 2018-01-12  Martin Liska  <mliska@suse.cz>
15423         PR ipa/83054
15424         * ipa-devirt.c (final_warning_record::grow_type_warnings):
15425         New function.
15426         (possible_polymorphic_call_targets): Use it.
15427         (ipa_devirt): Likewise.
15429 2018-01-12  Martin Liska  <mliska@suse.cz>
15431         * profile-count.h (enum profile_quality): Use 0 as invalid
15432         enum value of profile_quality.
15434 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15436         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15437         -mext-string options.
15439 2018-01-12  Richard Biener  <rguenther@suse.de>
15441         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15442         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15443         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15444         Likewise.
15445         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15447 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15449         * configure.ac (--with-long-double-format): Add support for the
15450         configuration option to change the default long double format on
15451         PowerPC systems.
15452         * config.gcc (powerpc*-linux*-*): Likewise.
15453         * configure: Regenerate.
15454         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15455         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15456         used without modification.
15458 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15460         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15461         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15462         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15463         MISC_BUILTIN_SPEC_BARRIER.
15464         (rs6000_init_builtins): Likewise.
15465         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15466         enum value.
15467         (speculation_barrier): New define_insn.
15468         * doc/extend.texi: Document __builtin_speculation_barrier.
15470 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15472         PR target/83203
15473         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15474         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15475         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15476         iterators.
15477         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
15478         integral modes instead of "ss" and "sd".
15479         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15480         vectors with 32-bit and 64-bit elements.
15481         (vecdupssescalarmodesuffix): New mode attribute.
15482         (vec_dup<mode>): Use it.
15484 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
15486         PR target/83330
15487         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15488         frame if argument is passed on stack.
15490 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15492         PR target/82682
15493         * ree.c (combine_reaching_defs): Optimize also
15494         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15495         reg2=any_extend(exp); reg1=reg2;, formatting fix.
15497 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15499         PR middle-end/83189
15500         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15502 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15504         PR middle-end/83718
15505         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15506         after they are computed.
15508 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
15510         PR tree-optimization/83695
15511         * gimple-loop-linterchange.cc
15512         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15513         reset cached scev information after interchange.
15514         (pass_linterchange::execute): Remove call to scev_reset_htab.
15516 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15518         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15519         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15520         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15521         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15522         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15523         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15524         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15525         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15526         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15527         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15528         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15529         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15530         (V_lane_reg): Likewise.
15531         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15532         New define_expand.
15533         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15534         (vfmal_lane_low<mode>_intrinsic,
15535         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15536         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15537         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15538         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15539         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15540         vfmsl_lane_high<mode>_intrinsic): New define_insns.
15542 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15544         * config/arm/arm-cpus.in (fp16fml): New feature.
15545         (ALL_SIMD): Add fp16fml.
15546         (armv8.2-a): Add fp16fml as an option.
15547         (armv8.3-a): Likewise.
15548         (armv8.4-a): Add fp16fml as part of fp16.
15549         * config/arm/arm.h (TARGET_FP16FML): Define.
15550         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15551         when appropriate.
15552         * config/arm/arm-modes.def (V2HF): Define.
15553         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15554         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15555         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15556         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15557         vfmsl_low, vfmsl_high): New set of builtins.
15558         * config/arm/iterators.md (PLUSMINUS): New code iterator.
15559         (vfml_op): New code attribute.
15560         (VFMLHALVES): New int iterator.
15561         (VFML, VFMLSEL): New mode attributes.
15562         (V_reg): Define mapping for V2HF.
15563         (V_hi, V_lo): New mode attributes.
15564         (VF_constraint): Likewise.
15565         (vfml_half, vfml_half_selector): New int attributes.
15566         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15567         define_expand.
15568         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15569         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15570         New define_insn.
15571         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15572         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15573         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15574         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
15575         documentation.
15576         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15577         Document new effective target and option set.
15579 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15581         * config/arm/arm-cpus.in (armv8_4): New feature.
15582         (ARMv8_4a): New fgroup.
15583         (armv8.4-a): New arch.
15584         * config/arm/arm-tables.opt: Regenerate.
15585         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15586         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15587         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15588         Add matching rules for -march=armv8.4-a and extensions.
15589         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15591 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
15593         PR target/81821
15594         * config/rx/rx.md (BW): New mode attribute.
15595         (sync_lock_test_and_setsi): Add mode suffix to insn output.
15597 2018-01-11  Richard Biener  <rguenther@suse.de>
15599         PR tree-optimization/83435
15600         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15601         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15602         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15604 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15605             Alan Hayward  <alan.hayward@arm.com>
15606             David Sherwood  <david.sherwood@arm.com>
15608         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15609         field.
15610         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
15611         (aarch64_print_address_internal): Use it to check for a zero offset.
15613 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15614             Alan Hayward  <alan.hayward@arm.com>
15615             David Sherwood  <david.sherwood@arm.com>
15617         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15618         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15619         Return a poly_int64 rather than a HOST_WIDE_INT.
15620         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15621         rather than a HOST_WIDE_INT.
15622         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15623         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15624         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15625         final_offset from HOST_WIDE_INT to poly_int64.
15626         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15627         to_constant when getting the number of units in an Advanced SIMD
15628         mode.
15629         (aarch64_builtin_vectorized_function): Check for a constant number
15630         of units.
15631         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15632         GET_MODE_SIZE.
15633         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15634         attribute instead of GET_MODE_NUNITS.
15635         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15636         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15637         GET_MODE_SIZE for fixed-size registers.
15638         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15639         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15640         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15641         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15642         (aarch64_print_operand, aarch64_print_address_internal)
15643         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15644         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15645         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15646         Handle polynomial GET_MODE_SIZE.
15647         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15648         wider than SImode without modification.
15649         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15650         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15651         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15652         passing and returning SVE modes.
15653         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15654         rather than GEN_INT.
15655         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15656         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15657         (aarch64_allocate_and_probe_stack_space): Likewise.
15658         (aarch64_layout_frame): Cope with polynomial offsets.
15659         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15660         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15661         polynomial offsets.
15662         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15663         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15664         poly_int64 rather than a HOST_WIDE_INT.
15665         (aarch64_get_separate_components, aarch64_process_components)
15666         (aarch64_expand_prologue, aarch64_expand_epilogue)
15667         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15668         (aarch64_anchor_offset): New function, split out from...
15669         (aarch64_legitimize_address): ...here.
15670         (aarch64_builtin_vectorization_cost): Handle polynomial
15671         TYPE_VECTOR_SUBPARTS.
15672         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15673         GET_MODE_NUNITS.
15674         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15675         number of elements from the PARALLEL rather than the mode.
15676         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15677         rather than GET_MODE_BITSIZE.
15678         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15679         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15680         (aarch64_expand_vec_perm_const_1): Handle polynomial
15681         d->perm.length () and d->perm elements.
15682         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15683         Apply to_constant to d->perm elements.
15684         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15685         polynomial CONST_VECTOR_NUNITS.
15686         (aarch64_move_pointer): Take amount as a poly_int64 rather
15687         than an int.
15688         (aarch64_progress_pointer): Avoid temporary variable.
15689         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15690         the mode attribute instead of GET_MODE.
15692 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15693             Alan Hayward  <alan.hayward@arm.com>
15694             David Sherwood  <david.sherwood@arm.com>
15696         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15697         x exists before using it.
15698         (aarch64_add_constant_internal): Rename to...
15699         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15700         src and dest rtxes.  Handle the case in which they're different,
15701         including when the offset is zero.  Replace scratchreg with an rtx.
15702         Use 2 additions if there is no spare register into which we can
15703         move a 16-bit constant.
15704         (aarch64_add_constant): Delete.
15705         (aarch64_add_offset): Replace reg with separate src and dest
15706         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15707         Use aarch64_add_offset_1.
15708         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15709         an rtx rather than an int.  Take the delta as a poly_int64
15710         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15711         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15712         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15713         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15714         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15715         and aarch64_add_sp.
15716         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15717         aarch64_add_constant.
15719 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15721         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15722         Use scalar_float_mode.
15724 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15726         * config/aarch64/aarch64-simd.md
15727         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15728         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15729         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15730         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15731         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15732         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15733         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15734         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15735         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15736         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15738 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15740         PR target/83514
15741         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15742         targ_options->x_arm_arch_string is non NULL.
15744 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15746         * config/aarch64/aarch64.h
15747         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15749 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15751         PR target/82096
15752         * expmed.c (emit_store_flag_force): Swap if const op0
15753         and change VOIDmode to mode of op0.
15755 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15757         PR rtl-optimization/83761
15758         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15759         than bytes to mode_for_size.
15761 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15763         PR middle-end/83189
15764         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15765         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15766         profile.
15768 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15770         PR middle-end/83575
15771         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15772         when in layout mode.
15773         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15774         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15775         partition fixup.
15777 2018-01-10  Michael Collison  <michael.collison@arm.com>
15779         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15780         * config/aarch64/aarch64-option-extension.def: Add
15781         AARCH64_OPT_EXTENSION of 'fp16fml'.
15782         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15783         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15784         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15785         * config/aarch64/constraints.md (Ui7): New constraint.
15786         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15787         (VFMLA_SEL_W): Ditto.
15788         (f16quad): Ditto.
15789         (f16mac1): Ditto.
15790         (VFMLA16_LOW): New int iterator.
15791         (VFMLA16_HIGH): Ditto.
15792         (UNSPEC_FMLAL): New unspec.
15793         (UNSPEC_FMLSL): Ditto.
15794         (UNSPEC_FMLAL2): Ditto.
15795         (UNSPEC_FMLSL2): Ditto.
15796         (f16mac): New code attribute.
15797         * config/aarch64/aarch64-simd-builtins.def
15798         (aarch64_fmlal_lowv2sf): Ditto.
15799         (aarch64_fmlsl_lowv2sf): Ditto.
15800         (aarch64_fmlalq_lowv4sf): Ditto.
15801         (aarch64_fmlslq_lowv4sf): Ditto.
15802         (aarch64_fmlal_highv2sf): Ditto.
15803         (aarch64_fmlsl_highv2sf): Ditto.
15804         (aarch64_fmlalq_highv4sf): Ditto.
15805         (aarch64_fmlslq_highv4sf): Ditto.
15806         (aarch64_fmlal_lane_lowv2sf): Ditto.
15807         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15808         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15809         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15810         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15811         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15812         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15813         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15814         (aarch64_fmlal_lane_highv2sf): Ditto.
15815         (aarch64_fmlsl_lane_highv2sf): Ditto.
15816         (aarch64_fmlal_laneq_highv2sf): Ditto.
15817         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15818         (aarch64_fmlalq_lane_highv4sf): Ditto.
15819         (aarch64_fmlsl_lane_highv4sf): Ditto.
15820         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15821         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15822         * config/aarch64/aarch64-simd.md:
15823         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15824         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15825         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15826         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15827         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15828         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15829         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15830         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15831         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15832         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15833         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15834         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15835         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15836         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15837         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15838         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15839         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15840         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15841         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15842         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15843         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15844         (vfmlsl_low_u32): Ditto.
15845         (vfmlalq_low_u32): Ditto.
15846         (vfmlslq_low_u32): Ditto.
15847         (vfmlal_high_u32): Ditto.
15848         (vfmlsl_high_u32): Ditto.
15849         (vfmlalq_high_u32): Ditto.
15850         (vfmlslq_high_u32): Ditto.
15851         (vfmlal_lane_low_u32): Ditto.
15852         (vfmlsl_lane_low_u32): Ditto.
15853         (vfmlal_laneq_low_u32): Ditto.
15854         (vfmlsl_laneq_low_u32): Ditto.
15855         (vfmlalq_lane_low_u32): Ditto.
15856         (vfmlslq_lane_low_u32): Ditto.
15857         (vfmlalq_laneq_low_u32): Ditto.
15858         (vfmlslq_laneq_low_u32): Ditto.
15859         (vfmlal_lane_high_u32): Ditto.
15860         (vfmlsl_lane_high_u32): Ditto.
15861         (vfmlal_laneq_high_u32): Ditto.
15862         (vfmlsl_laneq_high_u32): Ditto.
15863         (vfmlalq_lane_high_u32): Ditto.
15864         (vfmlslq_lane_high_u32): Ditto.
15865         (vfmlalq_laneq_high_u32): Ditto.
15866         (vfmlslq_laneq_high_u32): Ditto.
15867         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15868         (AARCH64_FL_FOR_ARCH8_4): New.
15869         (AARCH64_ISA_F16FML): New ISA flag.
15870         (TARGET_F16FML): New feature flag for fp16fml.
15871         (doc/invoke.texi): Document new fp16fml option.
15873 2018-01-10  Michael Collison  <michael.collison@arm.com>
15875         * config/aarch64/aarch64-builtins.c:
15876         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15877         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15878         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15879         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15880         (AARCH64_ISA_SHA3): New ISA flag.
15881         (TARGET_SHA3): New feature flag for sha3.
15882         * config/aarch64/iterators.md (sha512_op): New int attribute.
15883         (CRYPTO_SHA512): New int iterator.
15884         (UNSPEC_SHA512H): New unspec.
15885         (UNSPEC_SHA512H2): Ditto.
15886         (UNSPEC_SHA512SU0): Ditto.
15887         (UNSPEC_SHA512SU1): Ditto.
15888         * config/aarch64/aarch64-simd-builtins.def
15889         (aarch64_crypto_sha512hqv2di): New builtin.
15890         (aarch64_crypto_sha512h2qv2di): Ditto.
15891         (aarch64_crypto_sha512su0qv2di): Ditto.
15892         (aarch64_crypto_sha512su1qv2di): Ditto.
15893         (aarch64_eor3qv8hi): Ditto.
15894         (aarch64_rax1qv2di): Ditto.
15895         (aarch64_xarqv2di): Ditto.
15896         (aarch64_bcaxqv8hi): Ditto.
15897         * config/aarch64/aarch64-simd.md:
15898         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15899         (aarch64_crypto_sha512su0qv2di): Ditto.
15900         (aarch64_crypto_sha512su1qv2di): Ditto.
15901         (aarch64_eor3qv8hi): Ditto.
15902         (aarch64_rax1qv2di): Ditto.
15903         (aarch64_xarqv2di): Ditto.
15904         (aarch64_bcaxqv8hi): Ditto.
15905         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15906         (vsha512h2q_u64): Ditto.
15907         (vsha512su0q_u64): Ditto.
15908         (vsha512su1q_u64): Ditto.
15909         (veor3q_u16): Ditto.
15910         (vrax1q_u64): Ditto.
15911         (vxarq_u64): Ditto.
15912         (vbcaxq_u16): Ditto.
15913         * config/arm/types.md (crypto_sha512): New type attribute.
15914         (crypto_sha3): Ditto.
15915         (doc/invoke.texi): Document new sha3 option.
15917 2018-01-10  Michael Collison  <michael.collison@arm.com>
15919         * config/aarch64/aarch64-builtins.c:
15920         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15921         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15922         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15923         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15924         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15925         (AARCH64_ISA_SM4): New ISA flag.
15926         (TARGET_SM4): New feature flag for sm4.
15927         * config/aarch64/aarch64-simd-builtins.def
15928         (aarch64_sm3ss1qv4si): Ditto.
15929         (aarch64_sm3tt1aq4si): Ditto.
15930         (aarch64_sm3tt1bq4si): Ditto.
15931         (aarch64_sm3tt2aq4si): Ditto.
15932         (aarch64_sm3tt2bq4si): Ditto.
15933         (aarch64_sm3partw1qv4si): Ditto.
15934         (aarch64_sm3partw2qv4si): Ditto.
15935         (aarch64_sm4eqv4si): Ditto.
15936         (aarch64_sm4ekeyqv4si): Ditto.
15937         * config/aarch64/aarch64-simd.md:
15938         (aarch64_sm3ss1qv4si): Ditto.
15939         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15940         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15941         (aarch64_sm4eqv4si): Ditto.
15942         (aarch64_sm4ekeyqv4si): Ditto.
15943         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15944         (sm3part_op): Ditto.
15945         (CRYPTO_SM3TT): Ditto.
15946         (CRYPTO_SM3PART): Ditto.
15947         (UNSPEC_SM3SS1): New unspec.
15948         (UNSPEC_SM3TT1A): Ditto.
15949         (UNSPEC_SM3TT1B): Ditto.
15950         (UNSPEC_SM3TT2A): Ditto.
15951         (UNSPEC_SM3TT2B): Ditto.
15952         (UNSPEC_SM3PARTW1): Ditto.
15953         (UNSPEC_SM3PARTW2): Ditto.
15954         (UNSPEC_SM4E): Ditto.
15955         (UNSPEC_SM4EKEY): Ditto.
15956         * config/aarch64/constraints.md (Ui2): New constraint.
15957         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15958         * config/arm/types.md (crypto_sm3): New type attribute.
15959         (crypto_sm4): Ditto.
15960         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15961         (vsm3tt1aq_u32): Ditto.
15962         (vsm3tt1bq_u32): Ditto.
15963         (vsm3tt2aq_u32): Ditto.
15964         (vsm3tt2bq_u32): Ditto.
15965         (vsm3partw1q_u32): Ditto.
15966         (vsm3partw2q_u32): Ditto.
15967         (vsm4eq_u32): Ditto.
15968         (vsm4ekeyq_u32): Ditto.
15969         (doc/invoke.texi): Document new sm4 option.
15971 2018-01-10  Michael Collison  <michael.collison@arm.com>
15973         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15974         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15975         (AARCH64_FL_FOR_ARCH8_4): New.
15976         (AARCH64_FL_V8_4): New flag.
15977         (doc/invoke.texi): Document new armv8.4-a option.
15979 2018-01-10  Michael Collison  <michael.collison@arm.com>
15981         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15982         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15983         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15984         * config/aarch64/aarch64-option-extension.def: Add
15985         AARCH64_OPT_EXTENSION of 'sha2'.
15986         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15987         (crypto): Disable sha2 and aes if crypto disabled.
15988         (crypto): Enable aes and sha2 if enabled.
15989         (simd): Disable sha2 and aes if simd disabled.
15990         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15991         New flags.
15992         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15993         (TARGET_SHA2): New feature flag for sha2.
15994         (TARGET_AES): New feature flag for aes.
15995         * config/aarch64/aarch64-simd.md:
15996         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15997         conditional on TARGET_AES.
15998         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15999         (aarch64_crypto_sha1hsi): Make pattern conditional
16000         on TARGET_SHA2.
16001         (aarch64_crypto_sha1hv4si): Ditto.
16002         (aarch64_be_crypto_sha1hv4si): Ditto.
16003         (aarch64_crypto_sha1su1v4si): Ditto.
16004         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16005         (aarch64_crypto_sha1su0v4si): Ditto.
16006         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16007         (aarch64_crypto_sha256su0v4si): Ditto.
16008         (aarch64_crypto_sha256su1v4si): Ditto.
16009         (doc/invoke.texi): Document new aes and sha2 options.
16011 2018-01-10  Martin Sebor  <msebor@redhat.com>
16013         PR tree-optimization/83781
16014         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
16015         as string arrays.
16017 2018-01-11  Martin Sebor  <msebor@gmail.com>
16018             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16020         PR tree-optimization/83501
16021         PR tree-optimization/81703
16023         * tree-ssa-strlen.c (get_string_cst): Rename...
16024         (get_string_len): ...to this.  Handle global constants.
16025         (handle_char_store): Adjust.
16027 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
16028             Jim Wilson  <jimw@sifive.com>
16030         * config/riscv/riscv-protos.h (riscv_output_return): New.
16031         * config/riscv/riscv.c (struct machine_function): New naked_p field.
16032         (riscv_attribute_table, riscv_output_return),
16033         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
16034         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
16035         (riscv_compute_frame_info): Only compute frame->mask if not a naked
16036         function.
16037         (riscv_expand_prologue): Add early return for naked function.
16038         (riscv_expand_epilogue): Likewise.
16039         (riscv_function_ok_for_sibcall): Return false for naked function.
16040         (riscv_set_current_function): New.
16041         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
16042         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
16043         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
16044         * doc/extend.texi (RISC-V Function Attributes): New.
16046 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16048         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
16049         check for 128-bit long double before checking TCmode.
16050         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
16051         128-bit long doubles before checking TFmode or TCmode.
16052         (FLOAT128_IBM_P): Likewise.
16054 2018-01-10  Martin Sebor  <msebor@redhat.com>
16056         PR tree-optimization/83671
16057         * builtins.c (c_strlen): Unconditionally return zero for the empty
16058         string.
16059         Use -Warray-bounds for warnings.
16060         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
16061         for non-constant array indices with COMPONENT_REF, arrays of
16062         arrays, and pointers to arrays.
16063         (gimple_fold_builtin_strlen): Determine and set length range for
16064         non-constant character arrays.
16066 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
16068         PR middle-end/81897
16069         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
16070         empty blocks.
16072 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
16074         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
16076 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16078         PR target/83399
16079         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
16080         VECTOR_MEM_ALTIVEC_OR_VSX_P.
16081         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
16082         indexed_or_indirect_operand predicate.
16083         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
16084         (*vsx_le_perm_load_v8hi): Likewise.
16085         (*vsx_le_perm_load_v16qi): Likewise.
16086         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
16087         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
16088         (*vsx_le_perm_store_v8hi): Likewise.
16089         (*vsx_le_perm_store_v16qi): Likewise.
16090         (eight unnamed splitters): Likewise.
16092 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16094         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16095         * config/rs6000/emmintrin.h: Likewise.
16096         * config/rs6000/mmintrin.h: Likewise.
16097         * config/rs6000/xmmintrin.h: Likewise.
16099 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
16101         PR c++/43486
16102         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16103         "public_flag".
16104         * tree.c (tree_nop_conversion): Return true for location wrapper
16105         nodes.
16106         (maybe_wrap_with_location): New function.
16107         (selftest::check_strip_nops): New function.
16108         (selftest::test_location_wrappers): New function.
16109         (selftest::tree_c_tests): Call it.
16110         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16111         (maybe_wrap_with_location): New decl.
16112         (EXPR_LOCATION_WRAPPER_P): New macro.
16113         (location_wrapper_p): New inline function.
16114         (tree_strip_any_location_wrapper): New inline function.
16116 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
16118         PR target/83735
16119         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16120         stack_realign_offset for the largest alignment of stack slot
16121         actually used.
16122         (ix86_find_max_used_stack_alignment): New function.
16123         (ix86_finalize_stack_frame_flags): Use it.  Set
16124         max_used_stack_alignment if we don't realign stack.
16125         * config/i386/i386.h (machine_function): Add
16126         max_used_stack_alignment.
16128 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
16130         * config/arm/arm.opt (-mbranch-cost): New option.
16131         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16132         account.
16134 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
16136         PR target/83629
16137         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16138         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16140 2018-01-10  Richard Biener  <rguenther@suse.de>
16142         PR debug/83765
16143         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16144         early out so it also covers the case where we have a non-NULL
16145         origin.
16147 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16149         PR tree-optimization/83753
16150         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16151         for non-strided grouped accesses if the number of elements is 1.
16153 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16155         PR target/81616
16156         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16157         * i386.h (TARGET_USE_GATHER): Define.
16158         * x86-tune.def (X86_TUNE_USE_GATHER): New.
16160 2018-01-10  Martin Liska  <mliska@suse.cz>
16162         PR bootstrap/82831
16163         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16164         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16165         partitioning.
16166         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16167         CLEANUP_NO_PARTITIONING is not set.
16169 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16171         * doc/rtl.texi: Remove documentation of (const ...) wrappers
16172         for vectors, as a partial revert of r254296.
16173         * rtl.h (const_vec_p): Delete.
16174         (const_vec_duplicate_p): Don't test for vector CONSTs.
16175         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16176         * expmed.c (make_tree): Likewise.
16178         Revert:
16179         * common.md (E, F): Use CONSTANT_P instead of checking for
16180         CONST_VECTOR.
16181         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16182         checking for CONST_VECTOR.
16184 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16186         PR middle-end/83575
16187         * predict.c (force_edge_cold): Handle in more sane way edges
16188         with no prediction.
16190 2018-01-09  Carl Love  <cel@us.ibm.com>
16192         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16193         V4SI, V4SF types.
16194         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16195         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16196         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16197         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
16198         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16199         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
16200         * config/rs6000/rs6000-protos.h: Add extern defition for
16201         rs6000_generate_float2_double_code.
16202         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16203         function.
16204         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16205         (float2_v2df): Add define_expand.
16207 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
16209         PR target/83628
16210         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16211         op_mode in the force_to_mode call.
16213 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16215         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16216         instead of checking each element individually.
16217         (aarch64_evpc_uzp): Likewise.
16218         (aarch64_evpc_zip): Likewise.
16219         (aarch64_evpc_ext): Likewise.
16220         (aarch64_evpc_rev): Likewise.
16221         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16222         instead of checking each element individually.  Return true without
16223         generating rtl if
16224         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16225         whether all selected elements come from the same input, instead of
16226         checking each element individually.  Remove calls to gen_rtx_REG,
16227         start_sequence and end_sequence and instead assert that no rtl is
16228         generated.
16230 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16232         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16233         order of HIGH and CONST checks.
16235 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16237         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16238         if the destination isn't an SSA_NAME.
16240 2018-01-09  Richard Biener  <rguenther@suse.de>
16242         PR tree-optimization/83668
16243         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16244         move prologue...
16245         (canonicalize_loop_form): ... here, renamed from ...
16246         (canonicalize_loop_closed_ssa_form): ... this and amended to
16247         swap successor edges for loop exit blocks to make us use
16248         the RPO order we need for initial schedule generation.
16250 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
16252         PR tree-optimization/64811
16253         * match.pd: When optimizing comparisons with Inf, avoid
16254         introducing or losing exceptions from comparisons with NaN.
16256 2018-01-09  Martin Liska  <mliska@suse.cz>
16258         PR sanitizer/82517
16259         * asan.c (shadow_mem_size): Add gcc_assert.
16261 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
16263         Don't save registers in main().
16265         PR target/83738
16266         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16267         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16268         * config/avr/avr.c (avr_set_current_function): Don't error if
16269         naked, OS_task or OS_main are specified at the same time.
16270         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16271         OS_main.
16272         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16273         attribute.
16274         * common/config/avr/avr-common.c (avr_option_optimization_table):
16275         Switch on -mmain-is-OS_task for optimizing compilations.
16277 2018-01-09  Richard Biener  <rguenther@suse.de>
16279         PR tree-optimization/83572
16280         * graphite.c: Include cfganal.h.
16281         (graphite_transform_loops): Connect infinite loops to exit
16282         and remove fake edges at the end.
16284 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16286         * ipa-inline.c (edge_badness): Revert accidental checkin.
16288 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16290         PR ipa/80763
16291         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16292         symbols; not inline clones.
16294 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
16296         PR target/83507
16297         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16298         hard registers.  Formatting fixes.
16300         PR preprocessor/83722
16301         * gcc.c (try_generate_repro): Pass
16302         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16303         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16304         do_report_bug.
16306 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
16307             Kito Cheng  <kito.cheng@gmail.com>
16309         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16310         (riscv_leaf_function_p): Delete.
16311         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16313 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16315         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16316         function.
16317         (do_ifelse): New function.
16318         (do_isel): New function.
16319         (do_sub3): New function.
16320         (do_add3): New function.
16321         (do_load_mask_compare): New function.
16322         (do_overlap_load_compare): New function.
16323         (expand_compare_loop): New function.
16324         (expand_block_compare): Call expand_compare_loop() when appropriate.
16325         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16326         option description.
16327         (-mblock-compare-inline-loop-limit): New option.
16329 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16331         PR target/83677
16332         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16333         Reverse order of second and third operands in first alternative.
16334         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16335         of first and second elements in UNSPEC_VPERMR vector.
16336         (altivec_expand_vec_perm_le): Likewise.
16338 2018-01-08  Jeff Law  <law@redhat.com>
16340         PR rtl-optimizatin/81308
16341         * tree-switch-conversion.c (cfg_altered): New file scoped static.
16342         (process_switch): If group_case_labels makes a change, then set
16343         cfg_altered.
16344         (pass_convert_switch::execute): If a switch is converted, then
16345         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
16347         PR rtl-optimization/81308
16348         * recog.c (split_all_insns): Conditionally cleanup the CFG after
16349         splitting insns.
16351 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
16353         PR target/83663 - Revert r255946
16354         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16355         generation for cases where splatting a value is not useful.
16356         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16357         across a vec_duplicate and a paradoxical subreg forming a vector
16358         mode to a vec_concat.
16360 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16362         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16363         -march=armv8.3-a variants.
16364         * config/arm/t-multilib: Likewise.
16365         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
16367 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16369         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16370         to generate rtl.
16371         (cceq_ior_compare_complement): Give it a name so I can use it, and
16372         change boolean_or_operator predicate to boolean_operator so it can
16373         be used to generate a crand.
16374         (eqne): New code iterator.
16375         (bd/bd_neg): New code_attrs.
16376         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16377         a single define_insn.
16378         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16379         decrement (bdnzt/bdnzf/bdzt/bdzf).
16380         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16381         with the new names of the branch decrement patterns, and added the
16382         names of the branch decrement conditional patterns.
16384 2018-01-08  Richard Biener  <rguenther@suse.de>
16386         PR tree-optimization/83563
16387         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16388         cache.
16390 2018-01-08  Richard Biener  <rguenther@suse.de>
16392         PR middle-end/83713
16393         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16395 2018-01-08  Richard Biener  <rguenther@suse.de>
16397         PR tree-optimization/83685
16398         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16399         references to abnormals.
16401 2018-01-08  Richard Biener  <rguenther@suse.de>
16403         PR lto/83719
16404         * dwarf2out.c (output_indirect_strings): Handle empty
16405         skeleton_debug_str_hash.
16406         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16408 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16410         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16411         (emit_store_direct): Likewise.
16412         (arc_trampoline_adjust_address): Likewise.
16413         (arc_asm_trampoline_template): New function.
16414         (arc_initialize_trampoline): Use asm_trampoline_template.
16415         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16416         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16417         * config/arc/arc.md (flush_icache): Delete pattern.
16419 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16421         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16422         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16423         munaligned-access.
16425 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16427         PR target/83681
16428         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16429         by not USED_FOR_TARGET.
16430         (make_pass_resolve_sw_modes): Likewise.
16432 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16434         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16435         USED_FOR_TARGET.
16437 2018-01-08  Richard Biener  <rguenther@suse.de>
16439         PR middle-end/83580
16440         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16442 2018-01-08  Richard Biener  <rguenther@suse.de>
16444         PR middle-end/83517
16445         * match.pd ((t * 2) / 2) -> t): Add missing :c.
16447 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
16449         PR middle-end/81897
16450         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16451         basic blocks with a small number of successors.
16452         (convert_control_dep_chain_into_preds): Improve handling of
16453         forwarder blocks.
16454         (dump_predicates): Split apart into...
16455         (dump_pred_chain): ...here...
16456         (dump_pred_info): ...and here.
16457         (can_one_predicate_be_invalidated_p): Add debugging printfs.
16458         (can_chain_union_be_invalidated_p): Improve check for invalidation
16459         of paths.
16460         (uninit_uses_cannot_happen): Avoid unnecessary if
16461         convert_control_dep_chain_into_preds yielded nothing.
16463 2018-01-06  Martin Sebor  <msebor@redhat.com>
16465         PR tree-optimization/83640
16466         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16467         subtracting negative offset from size.
16468         (builtin_access::overlap): Adjust offset bounds of the access to fall
16469         within the size of the object if possible.
16471 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
16473         PR rtl-optimization/83699
16474         * expmed.c (extract_bit_field_1): Restrict the vector usage of
16475         extract_bit_field_as_subreg to cases in which the extracted
16476         value is also a vector.
16478         * lra-constraints.c (process_alt_operands): Test for the equivalence
16479         substitutions when detecting a possible reload cycle.
16481 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
16483         PR debug/83480
16484         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16485         by default if flag_selective_schedling{,2}.  Formatting fixes.
16487         PR rtl-optimization/83682
16488         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16489         if it has non-VECTOR_MODE element mode.
16490         (vec_duplicate_p): Likewise.
16492         PR middle-end/83694
16493         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16494         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16496 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16498         PR target/83604
16499         * config/i386/i386-builtin.def
16500         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16501         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16502         Require also OPTION_MASK_ISA_AVX512F in addition to
16503         OPTION_MASK_ISA_GFNI.
16504         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16505         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16506         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16507         to OPTION_MASK_ISA_GFNI.
16508         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16509         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16510         OPTION_MASK_ISA_AVX512BW.
16511         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16512         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16513         addition to OPTION_MASK_ISA_GFNI.
16514         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16515         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16516         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16517         to OPTION_MASK_ISA_GFNI.
16518         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16519         a requirement for all ISAs rather than any of them with a few
16520         exceptions.
16521         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16522         processing.
16523         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16524         bitmasks to be enabled with 3 exceptions, instead of requiring any
16525         enabled ISA with lots of exceptions.
16526         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16527         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16528         Change avx512bw in isa attribute to avx512f.
16529         * config/i386/sgxintrin.h: Add license boilerplate.
16530         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
16531         to __AVX512F__ and __AVX512VL to __AVX512VL__.
16532         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16533         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16534         defined.
16535         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16536         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16537         temporarily sse2 rather than sse if not enabled already.
16539         PR target/83604
16540         * config/i386/sse.md (VI248_VLBW): Rename to ...
16541         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
16542         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16543         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16544         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16545         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16546         mode iterator instead of VI248_VLBW.
16548 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
16550         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16551         (record_modified): Skip clobbers; add debug output.
16552         (param_change_prob): Use sreal frequencies.
16554 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16556         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16557         punt for user-aligned variables.
16559 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16561         * tree-chrec.c (chrec_contains_symbols): Return true for
16562         POLY_INT_CST.
16564 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
16566         PR target/82439
16567         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16568         of (x|y) == x for BICS pattern.
16570 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16572         PR tree-optimization/83605
16573         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16574         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16575         can throw.
16577 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16579         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16580         * config/epiphany/rtems.h: New file.
16582 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16583             Uros Bizjak  <ubizjak@gmail.com>
16585         PR target/83554
16586         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16587         QIreg_operand instead of register_operand predicate.
16588         * config/i386/i386.c (ix86_rop_should_change_byte_p,
16589         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16590         comments instead of -fmitigate[-_]rop.
16592 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16594         PR bootstrap/81926
16595         * cgraphunit.c (symbol_table::compile): Switch to text_section
16596         before calling assembly_start debug hook.
16597         * run-rtl-passes.c (run_rtl_passes): Likewise.
16598         Include output.h.
16600 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16602         * tree-vrp.c (extract_range_from_binary_expr_1): Check
16603         range_int_cst_p rather than !symbolic_range_p before calling
16604         extract_range_from_multiplicative_op_1.
16606 2018-01-04  Jeff Law  <law@redhat.com>
16608         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16609         redundant test in assertion.
16611 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16613         * doc/rtl.texi: Document machine_mode wrapper classes.
16615 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16617         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16618         using tree_to_uhwi.
16620 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16622         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16623         the VEC_PERM_EXPR fold to fail.
16625 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16627         PR debug/83585
16628         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16629         to switched_sections.
16631 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16633         PR target/83680
16634         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16635         test for d.testing.
16637 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16639         PR target/83387
16640         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16641         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16643 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16645         PR debug/83666
16646         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16647         is BLKmode and bitpos not zero or mode change is needed.
16649 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16651         PR target/83675
16652         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16653         TARGET_VIS2.
16655 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16657         PR target/83628
16658         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16659         instead of MULT rtx.  Update all corresponding splitters.
16660         (*saddl_se): Ditto.
16661         (*ssub<modesuffix>): Ditto.
16662         (*ssubl_se): Ditto.
16663         (*cmp_sadd_di): Update split patterns.
16664         (*cmp_sadd_si): Ditto.
16665         (*cmp_sadd_sidi): Ditto.
16666         (*cmp_ssub_di): Ditto.
16667         (*cmp_ssub_si): Ditto.
16668         (*cmp_ssub_sidi): Ditto.
16669         * config/alpha/predicates.md (const23_operand): New predicate.
16670         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16671         Look for ASHIFT, not MULT inner operand.
16672         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16674 2018-01-04  Martin Liska  <mliska@suse.cz>
16676         PR gcov-profile/83669
16677         * gcov.c (output_intermediate_file): Add version to intermediate
16678         gcov file.
16679         * doc/gcov.texi: Document new field 'version' in intermediate
16680         file format. Fix location of '-k' option of gcov command.
16682 2018-01-04  Martin Liska  <mliska@suse.cz>
16684         PR ipa/82352
16685         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16687 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16689         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16691 2018-01-03  Martin Sebor  <msebor@redhat.com>
16693         PR tree-optimization/83655
16694         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16695         checking calls with invalid arguments.
16697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16699         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16700         (vectorizable_mask_load_store): Delete.
16701         (vectorizable_call): Return false for masked loads and stores.
16702         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16703         instead of gimple_assign_rhs1.
16704         (vectorizable_load): Handle IFN_MASK_LOAD.
16705         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16709         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16710         split out from..,
16711         (vectorizable_mask_load_store): ...here.
16712         (vectorizable_load): ...and here.
16714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16716         * tree-vect-stmts.c (vect_build_all_ones_mask)
16717         (vect_build_zero_merge_argument): New functions, split out from...
16718         (vectorizable_load): ...here.
16720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16722         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16723         split out from...
16724         (vectorizable_mask_load_store): ...here.
16725         (vectorizable_store): ...and here.
16727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16729         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16730         split out from...
16731         (vectorizable_mask_load_store): ...here.
16733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16735         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16736         (vect_model_store_cost): Take a vec_load_store_type instead of a
16737         vect_def_type.
16738         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16739         (vect_model_store_cost): Take a vec_load_store_type instead of a
16740         vect_def_type.
16741         (vectorizable_mask_load_store): Update accordingly.
16742         (vectorizable_store): Likewise.
16743         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16747         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16748         IFN_MASK_LOAD calls here rather than...
16749         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16752             Alan Hayward  <alan.hayward@arm.com>
16753             David Sherwood  <david.sherwood@arm.com>
16755         * expmed.c (extract_bit_field_1): For vector extracts,
16756         fall back to extract_bit_field_as_subreg if vec_extract
16757         isn't available.
16759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16760             Alan Hayward  <alan.hayward@arm.com>
16761             David Sherwood  <david.sherwood@arm.com>
16763         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16764         they are variable or constant sized.
16765         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16766         slots for constant-sized data.
16768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16769             Alan Hayward  <alan.hayward@arm.com>
16770             David Sherwood  <david.sherwood@arm.com>
16772         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16773         handling COND_EXPRs with boolean comparisons, try to find a better
16774         basis for the mask type than the boolean itself.
16776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16778         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16779         is calculated and how it can be overridden.
16780         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16781         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16782         if defined.
16783         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16784         if nonzero.
16786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16787             Alan Hayward  <alan.hayward@arm.com>
16788             David Sherwood  <david.sherwood@arm.com>
16790         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16791         Remove the mode argument.
16792         (aarch64_simd_valid_immediate): Remove the mode and inverse
16793         arguments.
16794         * config/aarch64/iterators.md (bitsize): New iterator.
16795         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16796         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16797         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16798         aarch64_simd_valid_immediate.
16799         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16800         (aarch64_reg_or_bic_imm): Likewise.
16801         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16802         with an insn_type enum and msl with a modifier_type enum.
16803         Replace element_width with a scalar_mode.  Change the shift
16804         to unsigned int.  Add constructors for scalar_float_mode and
16805         scalar_int_mode elements.
16806         (aarch64_vect_float_const_representable_p): Delete.
16807         (aarch64_can_const_movi_rtx_p)
16808         (aarch64_simd_scalar_immediate_valid_for_move)
16809         (aarch64_simd_make_constant): Update call to
16810         aarch64_simd_valid_immediate.
16811         (aarch64_advsimd_valid_immediate_hs): New function.
16812         (aarch64_advsimd_valid_immediate): Likewise.
16813         (aarch64_simd_valid_immediate): Remove mode and inverse
16814         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16815         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16816         and aarch64_float_const_representable_p on the result.
16817         (aarch64_output_simd_mov_immediate): Remove mode argument.
16818         Update call to aarch64_simd_valid_immediate and use of
16819         simd_immediate_info.
16820         (aarch64_output_scalar_simd_mov_immediate): Update call
16821         accordingly.
16823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16824             Alan Hayward  <alan.hayward@arm.com>
16825             David Sherwood  <david.sherwood@arm.com>
16827         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16828         (mode_nunits): Likewise CONST_MODE_NUNITS.
16829         * machmode.def (ADJUST_NUNITS): Document.
16830         * genmodes.c (mode_data::need_nunits_adj): New field.
16831         (blank_mode): Update accordingly.
16832         (adj_nunits): New variable.
16833         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16834         parameter.
16835         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16836         listed in adj_nunits.
16837         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16838         listed in adj_nunits.  Don't emit case statements for such modes.
16839         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16840         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16841         nothing if adj_nunits is nonnull.
16842         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16843         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16844         (emit_mode_fbit): Update use of print_maybe_const_decl.
16845         (emit_move_size): Likewise.  Treat the array as non-const
16846         if adj_nunits.
16847         (emit_mode_adjustments): Handle adj_nunits.
16849 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16851         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16852         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16853         (VECTOR_MODES): Use it.
16854         (make_vector_modes): Take the prefix as an argument.
16856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16857             Alan Hayward  <alan.hayward@arm.com>
16858             David Sherwood  <david.sherwood@arm.com>
16860         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16861         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16862         for MODE_VECTOR_BOOL.
16863         * machmode.def (VECTOR_BOOL_MODE): Document.
16864         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16865         (make_vector_bool_mode): New function.
16866         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16867         MODE_VECTOR_BOOL.
16868         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16869         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16870         Likewise.
16871         * stor-layout.c (int_mode_for_mode): Likewise.
16872         * tree.c (build_vector_type_for_mode): Likewise.
16873         * varasm.c (output_constant_pool_2): Likewise.
16874         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16875         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16876         for MODE_VECTOR_BOOL.
16877         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16878         of mode class checks.
16879         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16880         instead of a list of mode class checks.
16881         (expand_vector_scalar_condition): Likewise.
16882         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16885             Alan Hayward  <alan.hayward@arm.com>
16886             David Sherwood  <david.sherwood@arm.com>
16888         * machmode.h (mode_size): Change from unsigned short to
16889         poly_uint16_pod.
16890         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16891         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16892         or if measurement_type is not polynomial.
16893         (fixed_size_mode::includes_p): Check for constant-sized modes.
16894         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16895         return a poly_uint16 rather than an unsigned short.
16896         (emit_mode_size): Change the type of mode_size from unsigned short
16897         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16898         (emit_mode_adjustments): Cope with polynomial vector sizes.
16899         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16900         for GET_MODE_SIZE.
16901         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16902         for GET_MODE_SIZE.
16903         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16904         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16905         * caller-save.c (setup_save_areas): Likewise.
16906         (replace_reg_with_saved_mem): Likewise.
16907         * calls.c (emit_library_call_value_1): Likewise.
16908         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16909         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16910         (gen_lowpart_for_combine): Likewise.
16911         * convert.c (convert_to_integer_1): Likewise.
16912         * cse.c (equiv_constant, cse_insn): Likewise.
16913         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16914         (cselib_subst_to_values): Likewise.
16915         * dce.c (word_dce_process_block): Likewise.
16916         * df-problems.c (df_word_lr_mark_ref): Likewise.
16917         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16918         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16919         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16920         (rtl_for_decl_location): Likewise.
16921         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16922         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16923         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16924         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16925         (expand_expr_real_1): Likewise.
16926         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16927         (pad_below): Likewise.
16928         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16929         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16930         * ira.c (get_subreg_tracking_sizes): Likewise.
16931         * ira-build.c (ira_create_allocno_objects): Likewise.
16932         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16933         (ira_sort_regnos_for_alter_reg): Likewise.
16934         * ira-costs.c (record_operand_costs): Likewise.
16935         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16936         (resolve_simple_move): Likewise.
16937         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16938         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16939         (lra_constraints): Likewise.
16940         (CONST_POOL_OK_P): Reject variable-sized modes.
16941         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16942         (add_pseudo_to_slot, lra_spill): Likewise.
16943         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16944         * optabs-query.c (get_best_extraction_insn): Likewise.
16945         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16946         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16947         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16948         * recog.c (offsettable_address_addr_space_p): Likewise.
16949         * regcprop.c (maybe_mode_change): Likewise.
16950         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16951         * regrename.c (build_def_use): Likewise.
16952         * regstat.c (dump_reg_info): Likewise.
16953         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16954         (find_reloads, find_reloads_subreg_address): Likewise.
16955         * reload1.c (eliminate_regs_1): Likewise.
16956         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16957         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16958         (simplify_binary_operation_1, simplify_subreg): Likewise.
16959         * targhooks.c (default_function_arg_padding): Likewise.
16960         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16961         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16962         (verify_gimple_assign_ternary): Likewise.
16963         * tree-inline.c (estimate_move_cost): Likewise.
16964         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16965         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16966         (get_address_cost_ainc): Likewise.
16967         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16968         (vect_supportable_dr_alignment): Likewise.
16969         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16970         (vectorizable_reduction): Likewise.
16971         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16972         (vectorizable_operation, vectorizable_load): Likewise.
16973         * tree.c (build_same_sized_truth_vector_type): Likewise.
16974         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16975         * var-tracking.c (emit_note_insn_var_location): Likewise.
16976         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16977         (ADDR_VEC_ALIGN): Likewise.
16979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16980             Alan Hayward  <alan.hayward@arm.com>
16981             David Sherwood  <david.sherwood@arm.com>
16983         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16984         unsigned short.
16985         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16986         or if measurement_type is polynomial.
16987         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16988         * combine.c (make_extraction): Likewise.
16989         * dse.c (find_shift_sequence): Likewise.
16990         * dwarf2out.c (mem_loc_descriptor): Likewise.
16991         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16992         (extract_bit_field, extract_low_bits): Likewise.
16993         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16994         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16995         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16996         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16997         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16998         * reload.c (find_reloads): Likewise.
16999         * reload1.c (alter_reg): Likewise.
17000         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17001         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17002         * tree-if-conv.c (predicate_mem_writes): Likewise.
17003         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17004         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17005         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17006         * valtrack.c (dead_debug_insert_temp): Likewise.
17007         * varasm.c (mergeable_constant_section): Likewise.
17008         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17011             Alan Hayward  <alan.hayward@arm.com>
17012             David Sherwood  <david.sherwood@arm.com>
17014         * expr.c (expand_assignment): Cope with polynomial mode sizes
17015         when assigning to a CONCAT.
17017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17018             Alan Hayward  <alan.hayward@arm.com>
17019             David Sherwood  <david.sherwood@arm.com>
17021         * machmode.h (mode_precision): Change from unsigned short to
17022         poly_uint16_pod.
17023         (mode_to_precision): Return a poly_uint16 rather than an unsigned
17024         short.
17025         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
17026         or if measurement_type is not polynomial.
17027         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
17028         in which the mode is already known to be a scalar_int_mode.
17029         * genmodes.c (emit_mode_precision): Change the type of mode_precision
17030         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
17031         initializer.
17032         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17033         for GET_MODE_PRECISION.
17034         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17035         for GET_MODE_PRECISION.
17036         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
17037         as polynomial.
17038         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
17039         (expand_field_assignment, make_extraction): Likewise.
17040         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
17041         (get_last_value): Likewise.
17042         * convert.c (convert_to_integer_1): Likewise.
17043         * cse.c (cse_insn): Likewise.
17044         * expr.c (expand_expr_real_1): Likewise.
17045         * lra-constraints.c (simplify_operand_subreg): Likewise.
17046         * optabs-query.c (can_atomic_load_p): Likewise.
17047         * optabs.c (expand_atomic_load): Likewise.
17048         (expand_atomic_store): Likewise.
17049         * ree.c (combine_reaching_defs): Likewise.
17050         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
17051         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
17052         * tree.h (type_has_mode_precision_p): Likewise.
17053         * ubsan.c (instrument_si_overflow): Likewise.
17055 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17056             Alan Hayward  <alan.hayward@arm.com>
17057             David Sherwood  <david.sherwood@arm.com>
17059         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
17060         polynomial numbers of units.
17061         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
17062         (valid_vector_subparts_p): New function.
17063         (build_vector_type): Remove temporary shim and take the number
17064         of units as a poly_uint64 rather than an int.
17065         (build_opaque_vector_type): Take the number of units as a
17066         poly_uint64 rather than an int.
17067         * tree.c (build_vector_from_ctor): Handle polynomial
17068         TYPE_VECTOR_SUBPARTS.
17069         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
17070         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
17071         (build_vector_from_val): If the number of units is variable,
17072         use build_vec_duplicate_cst for constant operands and
17073         VEC_DUPLICATE_EXPR otherwise.
17074         (make_vector_type): Remove temporary is_constant ().
17075         (build_vector_type, build_opaque_vector_type): Take the number of
17076         units as a poly_uint64 rather than an int.
17077         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
17078         VECTOR_CST_NELTS.
17079         * cfgexpand.c (expand_debug_expr): Likewise.
17080         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
17081         (store_constructor, expand_expr_real_1): Likewise.
17082         (const_scalar_mask_from_tree): Likewise.
17083         * fold-const-call.c (fold_const_reduction): Likewise.
17084         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
17085         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
17086         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
17087         (fold_relational_const): Likewise.
17088         (native_interpret_vector): Likewise.  Change the size from an
17089         int to an unsigned int.
17090         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
17091         TYPE_VECTOR_SUBPARTS.
17092         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
17093         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
17094         duplicating a non-constant operand into a variable-length vector.
17095         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17096         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17097         * ipa-icf.c (sem_variable::equals): Likewise.
17098         * match.pd: Likewise.
17099         * omp-simd-clone.c (simd_clone_subparts): Likewise.
17100         * print-tree.c (print_node): Likewise.
17101         * stor-layout.c (layout_type): Likewise.
17102         * targhooks.c (default_builtin_vectorization_cost): Likewise.
17103         * tree-cfg.c (verify_gimple_comparison): Likewise.
17104         (verify_gimple_assign_binary): Likewise.
17105         (verify_gimple_assign_ternary): Likewise.
17106         (verify_gimple_assign_single): Likewise.
17107         * tree-pretty-print.c (dump_generic_node): Likewise.
17108         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17109         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17110         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17111         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17112         (vect_shift_permute_load_chain): Likewise.
17113         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17114         (expand_vector_condition, optimize_vector_constructor): Likewise.
17115         (lower_vec_perm, get_compute_type): Likewise.
17116         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17117         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17118         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17119         (vect_recog_mask_conversion_pattern): Likewise.
17120         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17121         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17122         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17123         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17124         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17125         (vectorizable_shift, vectorizable_operation, vectorizable_store)
17126         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17127         (supportable_widening_operation): Likewise.
17128         (supportable_narrowing_operation): Likewise.
17129         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17130         Likewise.
17131         * varasm.c (output_constant): Likewise.
17133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17134             Alan Hayward  <alan.hayward@arm.com>
17135             David Sherwood  <david.sherwood@arm.com>
17137         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17138         so that both the length == 3 and length != 3 cases set up their
17139         own permute vectors.  Add comments explaining why we know the
17140         number of elements is constant.
17141         (vect_permute_load_chain): Likewise.
17143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17144             Alan Hayward  <alan.hayward@arm.com>
17145             David Sherwood  <david.sherwood@arm.com>
17147         * machmode.h (mode_nunits): Change from unsigned char to
17148         poly_uint16_pod.
17149         (ONLY_FIXED_SIZE_MODES): New macro.
17150         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17151         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17152         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17153         New typedefs.
17154         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17155         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17156         or if measurement_type is not polynomial.
17157         * genmodes.c (ZERO_COEFFS): New macro.
17158         (emit_mode_nunits_inline): Make mode_nunits_inline return a
17159         poly_uint16.
17160         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17161         Use ZERO_COEFFS when emitting initializers.
17162         * data-streamer.h (bp_pack_poly_value): New function.
17163         (bp_unpack_poly_value): Likewise.
17164         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17165         for GET_MODE_NUNITS.
17166         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17167         for GET_MODE_NUNITS.
17168         * tree.c (make_vector_type): Remove temporary shim and make
17169         the real function take the number of units as a poly_uint64
17170         rather than an int.
17171         (build_vector_type_for_mode): Handle polynomial nunits.
17172         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17173         * emit-rtl.c (const_vec_series_p_1): Likewise.
17174         (gen_rtx_CONST_VECTOR): Likewise.
17175         * fold-const.c (test_vec_duplicate_folding): Likewise.
17176         * genrecog.c (validate_pattern): Likewise.
17177         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17178         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17179         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17180         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17181         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17182         * rtlanal.c (subreg_get_info): Likewise.
17183         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17184         (vect_grouped_load_supported): Likewise.
17185         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17186         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17187         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17188         (simplify_const_unary_operation, simplify_binary_operation_1)
17189         (simplify_const_binary_operation, simplify_ternary_operation)
17190         (test_vector_ops_duplicate, test_vector_ops): Likewise.
17191         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17192         instead of CONST_VECTOR_NUNITS.
17193         * varasm.c (output_constant_pool_2): Likewise.
17194         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17195         explicit-encoded elements in the XVEC for variable-length vectors.
17197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17199         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17201 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17202             Alan Hayward  <alan.hayward@arm.com>
17203             David Sherwood  <david.sherwood@arm.com>
17205         * coretypes.h (fixed_size_mode): Declare.
17206         (fixed_size_mode_pod): New typedef.
17207         * builtins.h (target_builtins::x_apply_args_mode)
17208         (target_builtins::x_apply_result_mode): Change type to
17209         fixed_size_mode_pod.
17210         * builtins.c (apply_args_size, apply_result_size, result_vector)
17211         (expand_builtin_apply_args_1, expand_builtin_apply)
17212         (expand_builtin_return): Update accordingly.
17214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17216         * cse.c (hash_rtx_cb): Hash only the encoded elements.
17217         * cselib.c (cselib_hash_rtx): Likewise.
17218         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17219         CONST_VECTOR encoding.
17221 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17222             Jeff Law  <law@redhat.com>
17224         PR target/83641
17225         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17226         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17227         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17228         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17230         PR target/83641
17231         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17232         explicitly probe *sp in a noreturn function if there were any callee
17233         register saves or frame pointer is needed.
17235 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17237         PR debug/83621
17238         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17239         BLKmode for ternary, binary or unary expressions.
17241         PR debug/83645
17242         * var-tracking.c (delete_vta_debug_insn): New inline function.
17243         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17244         insns from get_insns () to NULL instead of each bb separately.
17245         Use delete_vta_debug_insn.  No longer static.
17246         (vt_debug_insns_local, variable_tracking_main_1): Adjust
17247         delete_vta_debug_insns callers.
17248         * rtl.h (delete_vta_debug_insns): Declare.
17249         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17250         instead of variable_tracking_main.
17252 2018-01-03  Martin Sebor  <msebor@redhat.com>
17254         PR tree-optimization/83603
17255         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17256         arguments past the endof the argument list in functions declared
17257         without a prototype.
17258         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17259         Avoid checking when arguments are null.
17261 2018-01-03  Martin Sebor  <msebor@redhat.com>
17263         PR c/83559
17264         * doc/extend.texi (attribute const): Fix a typo.
17265         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17266         issuing -Wsuggest-attribute for void functions.
17268 2018-01-03  Martin Sebor  <msebor@redhat.com>
17270         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17271         offset_int::from instead of wide_int::to_shwi.
17272         (maybe_diag_overlap): Remove assertion.
17273         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17274         * gimple-ssa-sprintf.c (format_directive): Same.
17275         (parse_directive): Same.
17276         (sprintf_dom_walker::compute_format_length): Same.
17277         (try_substitute_return_value): Same.
17279 2018-01-03  Jeff Law  <law@redhat.com>
17281         PR middle-end/83654
17282         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17283         non-constant residual for zero at runtime and avoid probing in
17284         that case.  Reorganize code for trailing problem to mirror handling
17285         of the residual.
17287 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17289         PR tree-optimization/83501
17290         * tree-ssa-strlen.c (get_string_cst): New.
17291         (handle_char_store): Call get_string_cst.
17293 2018-01-03  Martin Liska  <mliska@suse.cz>
17295         PR tree-optimization/83593
17296         * tree-ssa-strlen.c: Include tree-cfg.h.
17297         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17298         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17299         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17300         to false.
17301         (strlen_dom_walker::before_dom_children): Call
17302         gimple_purge_dead_eh_edges. Dump tranformation with details
17303         dump flags.
17304         (strlen_dom_walker::before_dom_children): Update call by adding
17305         new argument cleanup_eh.
17306         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17308 2018-01-03  Martin Liska  <mliska@suse.cz>
17310         PR ipa/83549
17311         * cif-code.def (VARIADIC_THUNK): New enum value.
17312         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17313         thunks.
17315 2018-01-03  Jan Beulich  <jbeulich@suse.com>
17317         * sse.md (mov<mode>_internal): Tighten condition for when to use
17318         vmovdqu<ssescalarsize> for TI and OI modes.
17320 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17322         Update copyright years.
17324 2018-01-03  Martin Liska  <mliska@suse.cz>
17326         PR ipa/83594
17327         * ipa-visibility.c (function_and_variable_visibility): Skip
17328         functions with noipa attribure.
17330 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17332         * gcc.c (process_command): Update copyright notice dates.
17333         * gcov-dump.c (print_version): Ditto.
17334         * gcov.c (print_version): Ditto.
17335         * gcov-tool.c (print_version): Ditto.
17336         * gengtype.c (create_file): Ditto.
17337         * doc/cpp.texi: Bump @copying's copyright year.
17338         * doc/cppinternals.texi: Ditto.
17339         * doc/gcc.texi: Ditto.
17340         * doc/gccint.texi: Ditto.
17341         * doc/gcov.texi: Ditto.
17342         * doc/install.texi: Ditto.
17343         * doc/invoke.texi: Ditto.
17345 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17347         * vector-builder.h (vector_builder::m_full_nelts): Change from
17348         unsigned int to poly_uint64.
17349         (vector_builder::full_nelts): Update prototype accordingly.
17350         (vector_builder::new_vector): Likewise.
17351         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17352         (vector_builder::operator ==): Likewise.
17353         (vector_builder::finalize): Likewise.
17354         * int-vector-builder.h (int_vector_builder::int_vector_builder):
17355         Take the number of elements as a poly_uint64 rather than an
17356         unsigned int.
17357         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17358         from unsigned int to poly_uint64.
17359         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17360         (vec_perm_indices::new_vector): Likewise.
17361         (vec_perm_indices::length): Likewise.
17362         (vec_perm_indices::nelts_per_input): Likewise.
17363         (vec_perm_indices::input_nelts): Likewise.
17364         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17365         number of elements per input as a poly_uint64 rather than an
17366         unsigned int.  Use the original encoding for variable-length
17367         vectors, rather than clamping each individual element.
17368         For the second and subsequent elements in each pattern,
17369         clamp the step and base before clamping their sum.
17370         (vec_perm_indices::series_p): Handle polynomial element counts.
17371         (vec_perm_indices::all_in_range_p): Likewise.
17372         (vec_perm_indices_to_tree): Likewise.
17373         (vec_perm_indices_to_rtx): Likewise.
17374         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17375         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17376         (tree_vector_builder::new_binary_operation): Handle polynomial
17377         element counts.  Return false if we need to know the number
17378         of elements at compile time.
17379         * fold-const.c (fold_vec_perm): Punt if the number of elements
17380         isn't known at compile time.
17382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17384         * vec-perm-indices.h (vec_perm_builder): Change element type
17385         from HOST_WIDE_INT to poly_int64.
17386         (vec_perm_indices::element_type): Update accordingly.
17387         (vec_perm_indices::clamp): Handle polynomial element_types.
17388         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17389         (vec_perm_indices::all_in_range_p): Likewise.
17390         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17391         than shwi trees.
17392         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17393         polynomial vec_perm_indices element types.
17394         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17395         * fold-const.c (fold_vec_perm): Likewise.
17396         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17397         * tree-vect-generic.c (lower_vec_perm): Likewise.
17398         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17399         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17400         element type to HOST_WIDE_INT.
17402 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17403             Alan Hayward  <alan.hayward@arm.com>
17404             David Sherwood  <david.sherwood@arm.com>
17406         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17407         rather than an int.  Use plus_constant.
17408         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17409         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17412             Alan Hayward  <alan.hayward@arm.com>
17413             David Sherwood  <david.sherwood@arm.com>
17415         * calls.c (emit_call_1, expand_call): Change struct_value_size from
17416         a HOST_WIDE_INT to a poly_int64.
17418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17419             Alan Hayward  <alan.hayward@arm.com>
17420             David Sherwood  <david.sherwood@arm.com>
17422         * calls.c (load_register_parameters): Cope with polynomial
17423         mode sizes.  Require a constant size for BLKmode parameters
17424         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
17425         forces a parameter to be padded at the lsb end in order to
17426         fill a complete number of words, require the parameter size
17427         to be ordered wrt UNITS_PER_WORD.
17429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17430             Alan Hayward  <alan.hayward@arm.com>
17431             David Sherwood  <david.sherwood@arm.com>
17433         * reload1.c (spill_stack_slot_width): Change element type
17434         from unsigned int to poly_uint64_pod.
17435         (alter_reg): Treat mode sizes as polynomial.
17437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17438             Alan Hayward  <alan.hayward@arm.com>
17439             David Sherwood  <david.sherwood@arm.com>
17441         * reload.c (complex_word_subreg_p): New function.
17442         (reload_inner_reg_of_subreg, push_reload): Use it.
17444 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17445             Alan Hayward  <alan.hayward@arm.com>
17446             David Sherwood  <david.sherwood@arm.com>
17448         * lra-constraints.c (process_alt_operands): Reject matched
17449         operands whose sizes aren't ordered.
17450         (match_reload): Refer to this check here.
17452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17453             Alan Hayward  <alan.hayward@arm.com>
17454             David Sherwood  <david.sherwood@arm.com>
17456         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17457         that the mode size is in the set {1, 2, 4, 8, 16}.
17459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17460             Alan Hayward  <alan.hayward@arm.com>
17461             David Sherwood  <david.sherwood@arm.com>
17463         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17464         Use plus_constant instead of gen_rtx_PLUS.
17466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17467             Alan Hayward  <alan.hayward@arm.com>
17468             David Sherwood  <david.sherwood@arm.com>
17470         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17471         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17472         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17473         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17474         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17475         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17476         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17477         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17478         * config/i386/i386.c (ix86_push_rounding): ...this new function.
17479         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17480         a poly_int64.
17481         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17482         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17483         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17484         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17485         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17486         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17487         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17488         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17489         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17490         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17491         function.
17492         * expr.c (emit_move_resolve_push): Treat the input and result
17493         of PUSH_ROUNDING as a poly_int64.
17494         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17495         (emit_push_insn): Likewise.
17496         * lra-eliminations.c (mark_not_eliminable): Likewise.
17497         * recog.c (push_operand): Likewise.
17498         * reload1.c (elimination_effects): Likewise.
17499         * rtlanal.c (nonzero_bits1): Likewise.
17500         * calls.c (store_one_arg): Likewise.  Require the padding to be
17501         known at compile time.
17503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17504             Alan Hayward  <alan.hayward@arm.com>
17505             David Sherwood  <david.sherwood@arm.com>
17507         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17508         Use plus_constant instead of gen_rtx_PLUS.
17510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17511             Alan Hayward  <alan.hayward@arm.com>
17512             David Sherwood  <david.sherwood@arm.com>
17514         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17515         rather than an int.
17517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17518             Alan Hayward  <alan.hayward@arm.com>
17519             David Sherwood  <david.sherwood@arm.com>
17521         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17522         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17523         via stack temporaries.  Treat the mode size as polynomial too.
17525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17526             Alan Hayward  <alan.hayward@arm.com>
17527             David Sherwood  <david.sherwood@arm.com>
17529         * expr.c (expand_expr_real_2): When handling conversions involving
17530         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17531         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
17532         as a poly_uint64 too.
17534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17535             Alan Hayward  <alan.hayward@arm.com>
17536             David Sherwood  <david.sherwood@arm.com>
17538         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17541             Alan Hayward  <alan.hayward@arm.com>
17542             David Sherwood  <david.sherwood@arm.com>
17544         * combine.c (can_change_dest_mode): Handle polynomial
17545         REGMODE_NATURAL_SIZE.
17546         * expmed.c (store_bit_field_1): Likewise.
17547         * expr.c (store_constructor): Likewise.
17548         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17549         and polynomial REGMODE_NATURAL_SIZE.
17550         (gen_lowpart_common): Likewise.
17551         * reginfo.c (record_subregs_of_mode): Likewise.
17552         * rtlanal.c (read_modify_subreg_p): Likewise.
17554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17555             Alan Hayward  <alan.hayward@arm.com>
17556             David Sherwood  <david.sherwood@arm.com>
17558         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17559         numbers of elements.
17561 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17562             Alan Hayward  <alan.hayward@arm.com>
17563             David Sherwood  <david.sherwood@arm.com>
17565         * match.pd: Cope with polynomial numbers of vector elements.
17567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17568             Alan Hayward  <alan.hayward@arm.com>
17569             David Sherwood  <david.sherwood@arm.com>
17571         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17572         in a POINTER_PLUS_EXPR.
17574 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17575             Alan Hayward  <alan.hayward@arm.com>
17576             David Sherwood  <david.sherwood@arm.com>
17578         * omp-simd-clone.c (simd_clone_subparts): New function.
17579         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17580         (ipa_simd_modify_function_body): Likewise.
17582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17583             Alan Hayward  <alan.hayward@arm.com>
17584             David Sherwood  <david.sherwood@arm.com>
17586         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17587         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17588         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17589         (expand_vector_condition, vector_element): Likewise.
17590         (subparts_gt): New function.
17591         (get_compute_type): Use subparts_gt.
17592         (count_type_subparts): Delete.
17593         (expand_vector_operations_1): Use subparts_gt instead of
17594         count_type_subparts.
17596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17597             Alan Hayward  <alan.hayward@arm.com>
17598             David Sherwood  <david.sherwood@arm.com>
17600         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17601         (vect_compile_time_alias): ...this new function.  Do the calculation
17602         on poly_ints rather than trees.
17603         (vect_prune_runtime_alias_test_list): Update call accordingly.
17605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17606             Alan Hayward  <alan.hayward@arm.com>
17607             David Sherwood  <david.sherwood@arm.com>
17609         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17610         numbers of units.
17611         (vect_schedule_slp_instance): Likewise.
17613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17614             Alan Hayward  <alan.hayward@arm.com>
17615             David Sherwood  <david.sherwood@arm.com>
17617         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17618         constant and extern definitions for variable-length vectors.
17619         (vect_get_constant_vectors): Note that the number of units
17620         is known to be constant.
17622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17623             Alan Hayward  <alan.hayward@arm.com>
17624             David Sherwood  <david.sherwood@arm.com>
17626         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17627         of units as polynomial.  Choose between WIDE and NARROW based
17628         on multiple_p.
17630 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17631             Alan Hayward  <alan.hayward@arm.com>
17632             David Sherwood  <david.sherwood@arm.com>
17634         * tree-vect-stmts.c (simd_clone_subparts): New function.
17635         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17638             Alan Hayward  <alan.hayward@arm.com>
17639             David Sherwood  <david.sherwood@arm.com>
17641         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17642         vectors as polynomial.  Use build_index_vector for
17643         IFN_GOMP_SIMD_LANE.
17645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17646             Alan Hayward  <alan.hayward@arm.com>
17647             David Sherwood  <david.sherwood@arm.com>
17649         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17650         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17651         for variable-length vectors.
17652         (vectorizable_mask_load_store): Treat the number of units as
17653         polynomial, asserting that it is constant if the condition has
17654         already been enforced.
17655         (vectorizable_store, vectorizable_load): Likewise.
17657 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17658             Alan Hayward  <alan.hayward@arm.com>
17659             David Sherwood  <david.sherwood@arm.com>
17661         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17662         of units as polynomial.  Punt if we can't tell at compile time
17663         which vector contains the final result.
17665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17666             Alan Hayward  <alan.hayward@arm.com>
17667             David Sherwood  <david.sherwood@arm.com>
17669         * tree-vect-loop.c (vectorizable_induction): Treat the number
17670         of units as polynomial.  Punt on SLP inductions.  Use an integer
17671         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17672         cast of such a series for variable-length floating-point
17673         reductions.
17675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17676             Alan Hayward  <alan.hayward@arm.com>
17677             David Sherwood  <david.sherwood@arm.com>
17679         * tree.h (build_index_vector): Declare.
17680         * tree.c (build_index_vector): New function.
17681         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17682         of units as polynomial, forcibly converting it to a constant if
17683         vectorizable_reduction has already enforced the condition.
17684         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17685         to create a {1,2,3,...} vector.
17686         (vectorizable_reduction): Treat the number of units as polynomial.
17687         Choose vectype_in based on the largest scalar element size rather
17688         than the smallest number of units.  Enforce the restrictions
17689         relied on above.
17691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17692             Alan Hayward  <alan.hayward@arm.com>
17693             David Sherwood  <david.sherwood@arm.com>
17695         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17696         number of units as polynomial.
17698 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17699             Alan Hayward  <alan.hayward@arm.com>
17700             David Sherwood  <david.sherwood@arm.com>
17702         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17703         * target.def (autovectorize_vector_sizes): Return the vector sizes
17704         by pointer, using vector_sizes rather than a bitmask.
17705         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17706         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17707         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17708         Likewise.
17709         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17710         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17711         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17712         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17713         * omp-general.c (omp_max_vf): Likewise.
17714         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17715         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17716         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17717         * tree-vect-slp.c (vect_slp_bb): Likewise.
17718         * doc/tm.texi: Regenerate.
17719         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17720         to a poly_uint64.
17721         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17722         the vector size as a poly_uint64 rather than an unsigned int.
17723         (current_vector_size): Change from an unsigned int to a poly_uint64.
17724         (get_vectype_for_scalar_type): Update accordingly.
17725         * tree.h (build_truth_vector_type): Take the size and number of
17726         units as a poly_uint64 rather than an unsigned int.
17727         (build_vector_type): Add a temporary overload that takes
17728         the number of units as a poly_uint64 rather than an unsigned int.
17729         * tree.c (make_vector_type): Likewise.
17730         (build_truth_vector_type): Take the number of units as a poly_uint64
17731         rather than an unsigned int.
17733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17734             Alan Hayward  <alan.hayward@arm.com>
17735             David Sherwood  <david.sherwood@arm.com>
17737         * target.def (get_mask_mode): Take the number of units and length
17738         as poly_uint64s rather than unsigned ints.
17739         * targhooks.h (default_get_mask_mode): Update accordingly.
17740         * targhooks.c (default_get_mask_mode): Likewise.
17741         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17742         * doc/tm.texi: Regenerate.
17744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17745             Alan Hayward  <alan.hayward@arm.com>
17746             David Sherwood  <david.sherwood@arm.com>
17748         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17749         * omp-general.c (omp_max_vf): Likewise.
17750         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17751         (expand_omp_simd): Handle polynomial safelen.
17752         * omp-low.c (omplow_simd_context): Add a default constructor.
17753         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17754         (lower_rec_simd_input_clauses): Update accordingly.
17755         (lower_rec_input_clauses): Likewise.
17757 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17758             Alan Hayward  <alan.hayward@arm.com>
17759             David Sherwood  <david.sherwood@arm.com>
17761         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17762         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17763         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17764         (vect_analyze_slp_cost): Likewise.
17765         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17766         (vect_model_load_cost): Likewise.
17768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17769             Alan Hayward  <alan.hayward@arm.com>
17770             David Sherwood  <david.sherwood@arm.com>
17772         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17773         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17774         from an unsigned int * to a poly_uint64_pod *.
17775         (calculate_unrolling_factor): New function.
17776         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17778 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17779             Alan Hayward  <alan.hayward@arm.com>
17780             David Sherwood  <david.sherwood@arm.com>
17782         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17783         from an unsigned int to a poly_uint64.
17784         (_loop_vec_info::slp_unrolling_factor): Likewise.
17785         (_loop_vec_info::vectorization_factor): Change from an int
17786         to a poly_uint64.
17787         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17788         (vect_get_num_vectors): New function.
17789         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17790         (vect_get_num_copies): Use vect_get_num_vectors.
17791         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17792         to an unsigned int *.
17793         (vect_analyze_data_refs): Change min_vf from an int * to a
17794         poly_uint64 *.
17795         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17796         than an unsigned HOST_WIDE_INT.
17797         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17798         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17799         to an unsigned int *.
17800         (vect_analyze_data_ref_dependences): Likewise.
17801         (vect_compute_data_ref_alignment): Handle polynomial vf.
17802         (vect_enhance_data_refs_alignment): Likewise.
17803         (vect_prune_runtime_alias_test_list): Likewise.
17804         (vect_shift_permute_load_chain): Likewise.
17805         (vect_supportable_dr_alignment): Likewise.
17806         (dependence_distance_ge_vf): Take the vectorization factor as a
17807         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17808         (vect_analyze_data_refs): Change min_vf from an int * to a
17809         poly_uint64 *.
17810         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17811         vfm1 as a poly_uint64 rather than an int.  Make the same change
17812         for the returned bound_scalar.
17813         (vect_gen_vector_loop_niters): Handle polynomial vf.
17814         (vect_do_peeling): Likewise.  Update call to
17815         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17816         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17817         be constant.
17818         * tree-vect-loop.c (vect_determine_vectorization_factor)
17819         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17820         (vect_get_known_peeling_cost): Likewise.
17821         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17822         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17823         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17824         updating the upper bounds of the loop.
17825         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17826         rather than an int.
17827         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17828         polynomial unroll factors.
17829         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17830         (vect_make_slp_decision): Likewise.
17831         (vect_supported_load_permutation_p): Likewise, and polynomial
17832         vf too.
17833         (vect_analyze_slp_cost): Handle polynomial vf.
17834         (vect_slp_analyze_node_operations): Likewise.
17835         (vect_slp_analyze_bb_1): Likewise.
17836         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17837         than an unsigned HOST_WIDE_INT.
17838         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17839         (vectorizable_load): Handle polynomial vf.
17840         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17841         a poly_uint64.
17842         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17845             Alan Hayward  <alan.hayward@arm.com>
17846             David Sherwood  <david.sherwood@arm.com>
17848         * match.pd: Handle bit operations involving three constants
17849         and try to fold one pair.
17851 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17853         * tree-vect-loop-manip.c: Include gimple-fold.h.
17854         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17855         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17856         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17857         Add a path that uses a step of VF instead of 1, but disable it
17858         for now.
17859         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17860         and niters_no_overflow parameters.  Update calls to
17861         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17862         Create a new SSA name if the latter choses to use a ste other
17863         than zero, and return it via niters_vector_mult_vf_var.
17864         * tree-vect-loop.c (vect_transform_loop): Update calls to
17865         vect_do_peeling, vect_gen_vector_loop_niters and
17866         slpeel_make_loop_iterate_ntimes.
17867         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17868         (vect_gen_vector_loop_niters): Update declarations after above changes.
17870 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17872         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17873         128-bit round to integer instructions.
17874         (ceil<mode>2): Likewise.
17875         (btrunc<mode>2): Likewise.
17876         (round<mode>2): Likewise.
17878 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17880         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17881         unaligned VSX load/store on P8/P9.
17882         (expand_block_clear): Allow the use of unaligned VSX
17883         load/store on P8/P9.
17885 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17887         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17888         New function.
17889         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17890         swap associated with both a load and a store.
17892 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17894         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17895         * config/riscv/riscv.md (clear_cache): Use it.
17897 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17899         * web.c: Remove out-of-date comment.
17901 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17903         * expr.c (fixup_args_size_notes): Check that any existing
17904         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17905         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17906         (emit_single_push_insn): ...here.
17908 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17910         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17911         (const_vector_encoded_nelts): New function.
17912         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17913         (const_vector_int_elt, const_vector_elt): Declare.
17914         * emit-rtl.c (const_vector_int_elt_1): New function.
17915         (const_vector_elt): Likewise.
17916         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17917         of CONST_VECTOR_ELT.
17919 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17921         * expr.c: Include rtx-vector-builder.h.
17922         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17923         directly on the tree encoding.
17924         (const_vector_from_tree): Likewise.
17925         * optabs.c: Include rtx-vector-builder.h.
17926         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17927         sequence of "u" values.
17928         * vec-perm-indices.c: Include rtx-vector-builder.h.
17929         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17930         directly on the vec_perm_indices encoding.
17932 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17934         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17935         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17936         * rtx-vector-builder.h: New file.
17937         * rtx-vector-builder.c: Likewise.
17938         * rtl.h (rtx_def::u2): Add a const_vector field.
17939         (CONST_VECTOR_NPATTERNS): New macro.
17940         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17941         (CONST_VECTOR_DUPLICATE_P): Likewise.
17942         (CONST_VECTOR_STEPPED_P): Likewise.
17943         (CONST_VECTOR_ENCODED_ELT): Likewise.
17944         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17945         (unwrap_const_vec_duplicate): Likewise.
17946         (const_vec_series_p): Check for a non-duplicated vector encoding.
17947         Say that the function only returns true for integer vectors.
17948         * emit-rtl.c: Include rtx-vector-builder.h.
17949         (gen_const_vec_duplicate_1): Delete.
17950         (gen_const_vector): Call gen_const_vec_duplicate instead of
17951         gen_const_vec_duplicate_1.
17952         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17953         (gen_const_vec_duplicate): Use rtx_vector_builder.
17954         (gen_const_vec_series): Likewise.
17955         (gen_rtx_CONST_VECTOR): Likewise.
17956         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17957         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17958         Build a new vector rather than modifying a CONST_VECTOR in-place.
17959         (handle_special_swappables): Update call accordingly.
17960         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17961         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17962         Build a new vector rather than modifying a CONST_VECTOR in-place.
17963         (handle_special_swappables): Update call accordingly.
17965 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17967         * simplify-rtx.c (simplify_const_binary_operation): Use
17968         CONST_VECTOR_ELT instead of XVECEXP.
17970 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17972         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17973         the selector elements to be different from the data elements
17974         if the selector is a VECTOR_CST.
17975         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17976         ssizetype for the selector.
17978 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17980         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17981         before testing each element individually.
17982         * tree-vect-generic.c (lower_vec_perm): Likewise.
17984 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17986         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17987         * selftest-run-tests.c (selftest::run_tests): Call it.
17988         * vector-builder.h (vector_builder::operator ==): New function.
17989         (vector_builder::operator !=): Likewise.
17990         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17991         (vec_perm_indices::all_from_input_p): New function.
17992         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17993         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17994         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17995         instead of reading the VECTOR_CST directly.  Detect whether both
17996         vector inputs are the same before constructing the vec_perm_indices,
17997         and update the number of inputs argument accordingly.  Use the
17998         utility functions added above.  Only construct sel2 if we need to.
18000 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18002         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18003         the broadcast of the low byte.
18004         (expand_mult_highpart): Use an explicit encoding for the permutes.
18005         * optabs-query.c (can_mult_highpart_p): Likewise.
18006         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18007         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18008         (vectorizable_bswap): Likewise.
18009         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18010         explicit encoding for the power-of-2 permutes.
18011         (vect_permute_store_chain): Likewise.
18012         (vect_grouped_load_supported): Likewise.
18013         (vect_permute_load_chain): Likewise.
18015 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18017         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
18018         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
18019         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
18020         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18021         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
18022         (vect_gen_perm_mask_any): Likewise.
18024 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18026         * int-vector-builder.h: New file.
18027         * vec-perm-indices.h: Include int-vector-builder.h.
18028         (vec_perm_indices): Redefine as an int_vector_builder.
18029         (auto_vec_perm_indices): Delete.
18030         (vec_perm_builder): Redefine as a stand-alone class.
18031         (vec_perm_indices::vec_perm_indices): New function.
18032         (vec_perm_indices::clamp): Likewise.
18033         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
18034         (vec_perm_indices::new_vector): New function.
18035         (vec_perm_indices::new_expanded_vector): Update for new
18036         vec_perm_indices class.
18037         (vec_perm_indices::rotate_inputs): New function.
18038         (vec_perm_indices::all_in_range_p): Operate directly on the
18039         encoded form, without computing elided elements.
18040         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
18041         encoding.  Update for new vec_perm_indices class.
18042         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
18043         the given vec_perm_builder.
18044         (expand_vec_perm_var): Update vec_perm_builder constructor.
18045         (expand_mult_highpart): Use vec_perm_builder instead of
18046         auto_vec_perm_indices.
18047         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
18048         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
18049         or double series encoding as appropriate.
18050         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
18051         vec_perm_indices instead of auto_vec_perm_indices.
18052         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18053         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18054         (vect_permute_store_chain): Likewise.
18055         (vect_grouped_load_supported): Likewise.
18056         (vect_permute_load_chain): Likewise.
18057         (vect_shift_permute_load_chain): Likewise.
18058         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18059         (vect_transform_slp_perm_load): Likewise.
18060         (vect_schedule_slp_instance): Likewise.
18061         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18062         (vectorizable_mask_load_store): Likewise.
18063         (vectorizable_bswap): Likewise.
18064         (vectorizable_store): Likewise.
18065         (vectorizable_load): Likewise.
18066         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
18067         vec_perm_indices instead of auto_vec_perm_indices.  Use
18068         tree_to_vec_perm_builder to read the vector from a tree.
18069         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
18070         vec_perm_builder instead of a vec_perm_indices.
18071         (have_whole_vector_shift): Use vec_perm_builder and
18072         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
18073         truncation to calc_vec_perm_mask_for_shift.
18074         (vect_create_epilog_for_reduction): Likewise.
18075         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
18076         from auto_vec_perm_indices to vec_perm_indices.
18077         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18078         instead of changing individual elements.
18079         (aarch64_vectorize_vec_perm_const): Use new_vector to install
18080         the vector in d.perm.
18081         * config/arm/arm.c (expand_vec_perm_d::perm): Change
18082         from auto_vec_perm_indices to vec_perm_indices.
18083         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18084         instead of changing individual elements.
18085         (arm_vectorize_vec_perm_const): Use new_vector to install
18086         the vector in d.perm.
18087         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
18088         Update vec_perm_builder constructor.
18089         (rs6000_expand_interleave): Likewise.
18090         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
18091         (rs6000_expand_interleave): Likewise.
18093 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18095         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18096         to qimode could truncate the indices.
18097         * optabs.c (expand_vec_perm_var): Likewise.
18099 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18101         * Makefile.in (OBJS): Add vec-perm-indices.o.
18102         * vec-perm-indices.h: New file.
18103         * vec-perm-indices.c: Likewise.
18104         * target.h (vec_perm_indices): Replace with a forward class
18105         declaration.
18106         (auto_vec_perm_indices): Move to vec-perm-indices.h.
18107         * optabs.h: Include vec-perm-indices.h.
18108         (expand_vec_perm): Delete.
18109         (selector_fits_mode_p, expand_vec_perm_var): Declare.
18110         (expand_vec_perm_const): Declare.
18111         * target.def (vec_perm_const_ok): Replace with...
18112         (vec_perm_const): ...this new hook.
18113         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18114         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18115         * doc/tm.texi: Regenerate.
18116         * optabs.def (vec_perm_const): Delete.
18117         * doc/md.texi (vec_perm_const): Likewise.
18118         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18119         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18120         expand_vec_perm for constant permutation vectors.  Assert that
18121         the mode of variable permutation vectors is the integer equivalent
18122         of the mode that is being permuted.
18123         * optabs-query.h (selector_fits_mode_p): Declare.
18124         * optabs-query.c: Include vec-perm-indices.h.
18125         (selector_fits_mode_p): New function.
18126         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18127         is defined, instead of checking whether the vec_perm_const_optab
18128         exists.  Use targetm.vectorize.vec_perm_const instead of
18129         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
18130         fit in the vector mode before using a variable permute.
18131         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18132         vec_perm_indices instead of an rtx.
18133         (expand_vec_perm): Replace with...
18134         (expand_vec_perm_const): ...this new function.  Take the selector
18135         as a vec_perm_indices rather than an rtx.  Also take the mode of
18136         the selector.  Update call to shift_amt_for_vec_perm_mask.
18137         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18138         Use vec_perm_indices::new_expanded_vector to expand the original
18139         selector into bytes.  Check whether the indices fit in the vector
18140         mode before using a variable permute.
18141         (expand_vec_perm_var): Make global.
18142         (expand_mult_highpart): Use expand_vec_perm_const.
18143         * fold-const.c: Includes vec-perm-indices.h.
18144         * tree-ssa-forwprop.c: Likewise.
18145         * tree-vect-data-refs.c: Likewise.
18146         * tree-vect-generic.c: Likewise.
18147         * tree-vect-loop.c: Likewise.
18148         * tree-vect-slp.c: Likewise.
18149         * tree-vect-stmts.c: Likewise.
18150         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18151         Delete.
18152         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18153         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18154         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18155         (aarch64_vectorize_vec_perm_const): ...this new function.
18156         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18157         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18158         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18159         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18160         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18161         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18162         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18163         into...
18164         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
18165         check for NEON modes.
18166         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18167         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18168         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18169         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18170         into...
18171         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
18172         the old VEC_PERM_CONST conditions.
18173         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18174         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18175         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18176         (ia64_vectorize_vec_perm_const_ok): Merge into...
18177         (ia64_vectorize_vec_perm_const): ...this new function.
18178         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18179         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18180         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18181         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18182         * config/mips/mips.c (mips_expand_vec_perm_const)
18183         (mips_vectorize_vec_perm_const_ok): Merge into...
18184         (mips_vectorize_vec_perm_const): ...this new function.
18185         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18186         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18187         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18188         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18189         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18190         (rs6000_expand_vec_perm_const): Delete.
18191         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18192         Delete.
18193         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18194         (altivec_expand_vec_perm_const_le): Take each operand individually.
18195         Operate on constant selectors rather than rtxes.
18196         (altivec_expand_vec_perm_const): Likewise.  Update call to
18197         altivec_expand_vec_perm_const_le.
18198         (rs6000_expand_vec_perm_const): Delete.
18199         (rs6000_vectorize_vec_perm_const_ok): Delete.
18200         (rs6000_vectorize_vec_perm_const): New function.
18201         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18202         an element count and rtx array.
18203         (rs6000_expand_extract_even): Update call accordingly.
18204         (rs6000_expand_interleave): Likewise.
18205         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18206         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18207         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18208         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18209         (rs6000_expand_vec_perm_const): Delete.
18210         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18211         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18212         (altivec_expand_vec_perm_const_le): Take each operand individually.
18213         Operate on constant selectors rather than rtxes.
18214         (altivec_expand_vec_perm_const): Likewise.  Update call to
18215         altivec_expand_vec_perm_const_le.
18216         (rs6000_expand_vec_perm_const): Delete.
18217         (rs6000_vectorize_vec_perm_const_ok): Delete.
18218         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
18219         reference to the SPE evmerge intructions.
18220         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18221         an element count and rtx array.
18222         (rs6000_expand_extract_even): Update call accordingly.
18223         (rs6000_expand_interleave): Likewise.
18224         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18225         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18226         new function.
18227         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18229 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18231         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18232         vector mode and that that mode matches the mode of the data
18233         being permuted.
18234         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18235         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
18236         directly using expand_vec_perm_1 when forcing selectors into
18237         registers.
18238         (expand_vec_perm_var): New function, split out from expand_vec_perm.
18240 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18242         * optabs-query.h (can_vec_perm_p): Delete.
18243         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18244         * optabs-query.c (can_vec_perm_p): Split into...
18245         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18246         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18247         particular selector is valid.
18248         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18249         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18250         (vect_grouped_load_supported): Likewise.
18251         (vect_shift_permute_load_chain): Likewise.
18252         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18253         (vect_transform_slp_perm_load): Likewise.
18254         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18255         (vectorizable_bswap): Likewise.
18256         (vect_gen_perm_mask_checked): Likewise.
18257         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
18258         implementations of variable permutation vectors into account
18259         when deciding which selector to use.
18260         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18261         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18262         with a false third argument.
18263         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18264         to test whether the constant selector is valid and can_vec_perm_var_p
18265         to test whether a variable selector is valid.
18267 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18269         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18270         * optabs-query.c (can_vec_perm_p): Likewise.
18271         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18272         instead of vec_perm_indices.
18273         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18274         (vect_gen_perm_mask_checked): Likewise,
18275         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18276         (vect_gen_perm_mask_checked): Likewise,
18278 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18280         * optabs-query.h (qimode_for_vec_perm): Declare.
18281         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18282         (qimode_for_vec_perm): ...this new function.
18283         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18285 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18287         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18288         does not have a conditional at the top.
18290 2018-01-02  Richard Biener  <rguenther@suse.de>
18292         * ipa-inline.c (big_speedup_p): Fix expression.
18294 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18296         PR target/81616
18297         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18298         for generic 4->6.
18300 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18302         PR target/81616
18303         Generic tuning.
18304         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18305         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18306         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18307         cond_taken_branch_cost 3->4.
18309 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
18311         PR tree-optimization/83581
18312         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18313         TODO_cleanup_cfg if any changes have been made.
18315         PR middle-end/83608
18316         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18317         convert_modes if target mode has the right side, but different mode
18318         class.
18320         PR middle-end/83609
18321         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18322         last argument when extracting from CONCAT.  If either from_real or
18323         from_imag is NULL, use expansion through memory.  If result is not
18324         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18325         the parts directly to inner mode, if even that fails, use expansion
18326         through memory.
18328         PR middle-end/83623
18329         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18330         check for bswap in mode rather than HImode and use that in expand_unop
18331         too.
18333 Copyright (C) 2018 Free Software Foundation, Inc.
18335 Copying and distribution of this file, with or without modification,
18336 are permitted in any medium without royalty provided the copyright
18337 notice and this notice are preserved.