tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the goto_locus of each...
[official-gcc.git] / gcc / ChangeLog
blob9dcb8bd6567cfbb56da03515c789a2a7b57bff6e
1 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4         goto_locus of each outgoing edge of each basic block.
6 2018-06-28  Richard Biener  <rguenther@suse.de>
8         * dwarf2out.c (decl_scope_table): Remove.
9         (push_decl_scope): Likewise.
10         (pop_decl_scope): Likewise.
11         (gen_type_die_for_member): Do not call push/pop_decl_scope.
12         (gen_struct_or_union_type_die): Likewise.
13         (gen_tagged_type_die): Likewise.
14         (dwarf2out_init): Do not initialize decl_scope_table.
15         (dwarf2out_c_finalize): Do not free it.
17 2018-06-28  Richard Biener  <rguenther@suse.de>
19         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
20         deciding whether to not re-use a DIE.
22 2018-06-28  Richard Biener  <rguenther@suse.de>
24         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
25         DW_AT_abstract_origin attribute.
27 2018-06-28  Martin Liska  <mliska@suse.cz>
29         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
30         Use newly introduced constants.
31         * tree-switch-conversion.h (struct jump_table_cluster):
32         Define max_ratio_for_size and max_ratio_for_speed.
34 2018-06-28  Martin Liska  <mliska@suse.cz>
36         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
37         Add new checking assert to catch invalid state.
38         (jump_table_cluster::can_be_handled): Handle single case
39         clusters.
40         (jump_table_cluster::is_beneficial): Bail out for such case.
41         (bit_test_cluster::find_bit_tests):
42         Add new checking assert to catch invalid state.
43         (bit_test_cluster::can_be_handled): Handle single case
44         clusters.
45         (bit_test_cluster::is_beneficial): Bail out for such case.
46         (switch_decision_tree::analyze_switch_statement):
47         Fix comment.
49 2018-06-28  Martin Liska  <mliska@suse.cz>
51         * common.opt: Introduce -completion option.
52         * gcc.c (driver_handle_option): Handle it.
53         (driver::main): Print completions if completion
54         is set.
55         * opt-suggestions.c (option_proposer::get_completions):
56         New function.
57         (option_proposer::suggest_completion): Likewise.
58         (option_proposer::find_param_completions): Likewise.
59         (verify_autocompletions): Likewise.
60         (test_completion_valid_options): Likewise.
61         (test_completion_valid_params): Likewise.
62         (in_completion_p): Likewise.
63         (empty_completion_p): Likewise.
64         (test_completion_partial_match): Likewise.
65         (test_completion_garbage): Likewise.
66         (opt_proposer_c_tests): Likewise.
67         * opt-suggestions.h: Declare new functions.
68         * opts.c (common_handle_option): Handle OPT__completion_.
69         * selftest-run-tests.c (selftest::run_tests): Add
70         opt_proposer_c_tests.
71         * selftest.c (assert_str_startswith): New.
72         * selftest.h (assert_str_startswith): Likewise.
73         (opt_proposer_c_tests): New.
74         (ASSERT_STR_STARTSWITH): Likewise.
76 2018-06-28  Martin Liska  <mliska@suse.cz>
78         * Makefile.in: Add opt-suggestions.o.
79         * gcc-main.c: Include opt-suggestions.h.
80         * gcc.c (driver::driver): Likewise.
81         (driver::~driver): Remove m_option_suggestions.
82         (driver::build_option_suggestions): Moved to option_proposer.
83         (driver::suggest_option): Likewise.
84         (driver::handle_unrecognized_options): Use option_proposer.
85         * gcc.h (class driver): Add new memver m_option_proposer.
86         * opt-suggestions.c: New file.
87         * opt-suggestions.h: New file.
89 2018-06-28  Martin Liska  <mliska@suse.cz>
91         * vec.h (class auto_string_vec): New (moved from auto_argvec).
92         (auto_string_vec::~auto_string_vec): Likewise.
94 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
96         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
97         statement if id->reset_location is true.
98         (copy_edges_for_bb): Do not set goto_locus on the new edges if
99         id->reset_location is true.
100         (copy_phis_for_bb): Force input_location on the arguments if
101         id->reset_location is true.
102         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
103         is set on the function to be inlined.
104         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
105         prevent_decl_creation_for_types fields up and add reset_location field.
107 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
109         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
111 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
113         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
114         registers for Pmode.
115         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
116         hard registers for the clobbered pseudo.
118 2018-06-27  Paul Koning  <ni1d@arrl.net>
120         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
121         mutually exclusive options.
122         * config/pdp11/constraints.md (h): New constraint.
123         (O): Update definition to match shift code generation.
124         (D): New constraint.
125         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
126         (CCFP): Remove.
127         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
128         function.
129         (output_jump): Change arguments.
130         (pdp11_fixed_cc_regs): New function.
131         (pdp11_cc_mode): Ditto.
132         (pdp11_expand_shift): Ditto.
133         (pdp11_assemble_shift): Ditto.
134         (pdp11_small_shift): Ditto.
135         (pdp11_branch_cost): Remove.
136         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
137         from output.
138         (pdp11_register_move_cost): Update for CC registers.
139         (pdp11_rtx_costs): Add case for LSHIFTRT.
140         (pdp11_output_jump): Add CCNZ mode conditional branches.
141         (notice_update_cc_on_set): Remove.
142         (pdp11_cc_mode): New function.
143         (simple_memory_operand): Correct pre/post decrement case.
144         (no_side_effect_operand): New function.
145         (pdp11_regno_reg_class): Add CC_REGS class.
146         (pdp11_fixed_cc_regs): New function.
147         (pdp11_small_shift): New function.
148         (pdp11_expand_shift): New function to expand shift insns.
149         (pdp11_assemble_shift): New function to output shifts.
150         (pdp11_branch_cost): Remove.
151         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
152         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
153         (WCHAR_TYPE): Ditto.
154         (PTRDIFF_TYPE): Ditto.
155         (ADJUST_INSN_LENGTH): New macro.
156         (FIXED_REGISTERS): Add CC registers.
157         (CALL_USED_REGISTERS): Ditto.
158         (reg_class): Ditto.
159         (REG_CLASS_NAMES): Ditto.
160         (REG_CLASS_CONTENTS): Ditto.
161         (SELECT_CC_MODE): Use new function.
162         (TARGET_FLAGS_REGNUM): New macro.
163         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
164         (cc0_reg_rtx): Remove.
165         (CC_STATUS_MDEP): Remove.
166         (CC_STATUS_MDEFP_INIT): Remove.
167         (CC_IN_FPU): Remove.
168         (NOTICE_UPDATE_CC): Remove.
169         (REGISTER_NAMES): Add CC registers.
170         (BRANCH_COST): Change to constant 1.
171         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
172         handling.
173         * config/pdp11/pdp11.opt (mbcopy): Remove.
174         (mbcopy-builtin): Remove.
175         (mbranch-cheap): Remove.
176         (mbranch-expensive): Remove.
177         * config/pdp11/predicates.md (expand_shift_operand): Update to
178         match shift code generation.
179         (ccnz_operator): New predicate.
180         * doc/invoke.texi (PDP-11 Options): Remove deleted options
181         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
182         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
183         exclusive options.
184         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
185         description of O constraint.
187 2018-06-27  Jeff Law  <law@redhat.com>
188             Austin Law  <austinklaw@gmail.com>
190         * config/v850/v850.md (addsi3_set_flags): New pattern.
191         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
192         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
193         (zero_extendhisi2_v850_set_flags): Likewise.
194         (zero_extendqisi2_v850_set_flags): Likewise.
195         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
196         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
197         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
199         * config/v850/v850-protos.h (notice_update_cc): Remove.
200         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
201         (v850_print_operand): Handle 'D' and "d".
202         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
203         Add handling of arithmetic/logical operations compared against zero.
204         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
205         Do not look at v850_compare_op, instead get mode from last argument.
206         (v850_gen_compare): Remove
207         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
208         after reload for prologue insns.
209         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
210         patterns.
211         (construct_save_jarl): Likewise.
212         (TARGET_FLAGS_REGNUM): Define.
213         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
214         (NOTICE_UPDATE_CC): Remove.
215         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
216         than cc0.  Conditionalize on reload_completed.
217         (cmpsi_insn, setfcc_insn): Likewise.
218         (tst1 splitter): Turn into define_and_split which sets the flags
219         after reload.
220         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
221         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
222         (cstoresf4, cstoredf4): Clobber the flags.
223         (cmpsi, cmpsf, cmpdf): Remove expanders.
224         (setf_insn): Remove pattern.
225         (addsi3): Turn into define_and_split which clobbers the flags after
226         reload and a suitable pattern (addsi3_clobber_flags) for use after
227         reload.
228         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
229         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
230         (ashrsi3, ashrsi3_v850e2): Likewise.
231         (bins): Clobber the flags.
232         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
233         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
234         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
235         (call_value_internal_short, call_value_internal_long): Likewise.
236         (callt_save_interrupt, callt_return_interrupt): Likewise.
237         (save_interrupt, return_interrupt): Likewise.
238         (callt_save_all_interrupt, save_all_interrupt): Likewise.
239         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
240         (restore_all_interrupt, _restore_all_interrupt): Likewise.
241         (All FP comparisons): Only allow after reload has completed.
242         (trfsr): Likewise.
243         (divh, divhu): Tweak output template.
244         (branch_z_normal, branch_z_invert): Remove
245         (branch_nz_normal, branch_nz_invert): Likewise.
246         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
248         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
249         * config/v850/v850.c (notice_update_cc): Remove.
250         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
251         (CC_NO_CARRY): Likewise.
252         (NOTICE_UPDATE_CC): Define to nothing.
253         * config/v850/v850.md: Remove block comment on cc0 handling
254         Remove "cc" attribute from all patterns.  Remove cc_status handling
255         from all patterns.  Minor formatting fixes.
257 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
259         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
260         (cortex-a76.cortex-a55): Likewise.
261         * config/aarch64/aarch64-tune.md: Regenerate.
262         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
263         cortex-a76.cortex-a55.
265 2018-06-27  Jeff Law  <law@redhat.com>
267         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
268         (MULTILIB_DIRNAMES): Similarly.
270 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
272         * gimple.h (gimple_return_retbnd): Delete.
273         (gimple_return_set_retbnd): Likewise.
274         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
275         gimple_return_set_retbnd.
276         * gimple-pretty-print.c (dump_gimple_return): Remove call to
277         gimple_return_retbnd and adjust.
278         * tree-inline.h (struct copy_body_data): Remove retbnd field.
279         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
280         Explicitly return NULL in a couple more cases.  Move assertion
281         on debug statements and remove unreachable code.
282         (reset_debug_binding): Do not test id->retbnd.
283         (expand_call_inline): Do not set it.
285 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
287         * configure.ac: Add --disable-gcov option.
288         * configure: Regenerate.
289         * Makefile.in: Honour @enable_gcov@.
290         * doc/install.texi: Document --disable-gcov.
292 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
294         * config/arm/arm-cpus.in (cortex-a76): New entry.
295         (cortex-a76.cortex-a55): Likewise.
296         * config/arm/arm-tables.opt: Regenerate.
297         * config/arm/arm-tune.md: Likewise.
298         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
299         * doc/invoke.texi (ARM Options): Document cortex-a76 and
300         cortex-a76.cortex-a55.
302 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
304         PR target/85769
305         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
307 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
309         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
310         comment.
311         (EPILOGUE_USES): Likewise.
313 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
315         * tree-inline.c (remap_location): New function extracted from...
316         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
317         (copy_phis_for_bb): ...here.  Call remap_location.
318         (copy_cfg_body): Adjust call to copy_edges_for_bb.
320 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
322         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
323         unaligned vsx for 16B memset.
325 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
327         PR target/86285
328         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
329         ieee128_float_type_node to long_double_type_node unless
330         TARGET_LONG_DOUBLE_128 is set.
332 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
334         * cfgloop.c (get_loop_location): Convert return type from
335         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
336         by implicit construction from rtx_insn *, and using
337         dump_user_location_t::from_function_decl for the fallback case.
338         * cfgloop.h (get_loop_location): Convert return type from
339         location_t to dump_user_location_t.
340         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
341         dump_printf_loc to pass in a dump_location_t rather than a
342         location_t, via the gimple stmt.
343         * coverage.c (get_coverage_counts): Update calls to
344         dump_printf_loc to pass in dump_location_t rather than a
345         location_t.
346         * doc/optinfo.texi (Dump types): Convert example of
347         dump_printf_loc from taking "locus" to taking "insn".  Update
348         description of the "_loc" calls to cover dump_location_t.
349         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
350         "selftest.h".
351         (dump_user_location_t::dump_user_location_t): New constructors,
352         from gimple *stmt and rtx_insn *.
353         (dump_user_location_t::from_function_decl): New function.
354         (dump_loc): Make static.
355         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
356         const dump_location_t &.
357         (dump_generic_expr_loc): Delete.
358         (dump_printf_loc): Convert param "loc" from location_t to
359         const dump_location_t &.
360         (selftest::test_impl_location): New function.
361         (selftest::dumpfile_c_tests): New function.
362         * dumpfile.h: Include "profile-count.h".
363         (class dump_user_location_t): New class.
364         (struct dump_impl_location_t): New struct.
365         (class dump_location_t): New class.
366         (dump_printf_loc): Convert 2nd param from source_location to
367         const dump_location_t &.
368         (dump_generic_expr_loc): Delete.
369         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
370         const dump_location_t &.
371         * gimple-fold.c (fold_gimple_assign): Update call to
372         dump_printf_loc to pass in a dump_location_t rather than a
373         location_t, via the gimple stmt.
374         (gimple_fold_call): Likewise.
375         * gimple-loop-interchange.cc
376         (loop_cand::analyze_iloop_reduction_var): Update for change to
377         check_reduction_path.
378         (tree_loop_interchange::interchange): Update for change to
379         find_loop_location.
380         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
381         change in return-type of find_loop_location.
382         (graphite_regenerate_ast_isl): Likewise.
383         * graphite-optimize-isl.c (optimize_isl): Likewise.
384         * graphite.c (graphite_transform_loops): Likewise.
385         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
386         pass in a dump_location_t rather than a location_t, via the
387         gimple stmt.
388         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
389         * ipa.c (walk_polymorphic_call_targets): Likewise.
390         * loop-unroll.c (report_unroll): Convert "locus" param from
391         location_t to dump_location_t.
392         (decide_unrolling): Update for change to get_loop_location's
393         return type.
394         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
395         location_t to dump_user_location_t.
396         (grid_find_single_omp_among_assignments_1): Updates calls to
397         dump_printf_loc to pass in a dump_location_t rather than a
398         location_t, via the gimple stmt.
399         (grid_parallel_clauses_gridifiable): Convert "tloc" from
400         location_t to dump_location_t.  Updates calls to dump_printf_loc
401         to pass in a dump_location_t rather than a location_t, via the
402         gimple stmt.
403         (grid_inner_loop_gridifiable_p): Likewise.
404         (grid_dist_follows_simple_pattern): Likewise.
405         (grid_gfor_follows_tiling_pattern): Likewise.
406         (grid_target_follows_gridifiable_pattern): Likewise.
407         (grid_attempt_target_gridification): Convert initialization
408         of local "grid" from memset to zero-initialization; FIXME: does
409         this require C++11?  Update call to dump_printf_loc to pass in a
410         optinfo_location rather than a location_t, via the gimple stmt.
411         * profile.c (read_profile_edge_counts): Updates call to
412         dump_printf_loc to pass in a dump_location_t rather than a
413         location_t
414         (compute_branch_probabilities): Likewise.
415         * selftest-run-tests.c (selftest::run_tests): Call
416         dumpfile_c_tests.
417         * selftest.h (dumpfile_c_tests): New decl.
418         * tree-loop-distribution.c (pass_loop_distribution::execute):
419         Update for change in return type of find_loop_location.
420         * tree-parloops.c (parallelize_loops): Likewise.
421         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
422         "locus" from location_t to dump_user_location_t.
423         (canonicalize_loop_induction_variables): Likewise.
424         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
425         for change in return type of find_loop_location.
426         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
427         to dump_printf_loc to pass in a dump_location_t rather than a
428         location_t, via the stmt.
429         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
430         Likewise.
431         * tree-vect-loop-manip.c (find_loop_location): Convert return
432         type from source_location to dump_user_location_t.
433         (vect_do_peeling): Update for above change.
434         (vect_loop_versioning): Update for change in type of
435         vect_location.
436         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
437         from location_t to dump_user_location_t.
438         (vect_estimate_min_profitable_iters): Update for change in type
439         of vect_location.
440         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
441         location_t to dump_location_t.
442         (vect_slp_bb): Update for change in type of vect_location.
443         * tree-vectorizer.c (vect_location): Convert from source_location
444         to dump_user_location_t.
445         (try_vectorize_loop_1): Update for change in vect_location's type.
446         (vectorize_loops): Likewise.
447         (increase_alignment): Likewise.
448         * tree-vectorizer.h (vect_location): Convert from source_location
449         to dump_user_location_t.
450         (find_loop_location): Convert return type from source_location to
451         dump_user_location_t.
452         (check_reduction_path): Convert 1st param from location_t to
453         dump_user_location_t.
454         * value-prof.c (check_counter): Update call to dump_printf_loc to
455         pass in a dump_user_location_t rather than a location_t; update
456         call to error_at for change in type of "locus".
457         (check_ic_target): Update call to dump_printf_loc to
458         pass in a dump_user_location_t rather than a location_t, via the
459         call_stmt.
461 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
463         * config/s390/s390.h (enum processor_flags): Do not use
464         default tune parameter when -march was specified.
466 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
468         PR target/86314
469         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
470         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
471         operands.
473 2018-06-26  Richard Biener  <rguenther@suse.de>
475         PR tree-optimization/86287
476         PR bootstrap/86316
477         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
478         (vect_analyze_loop): Initialize n_stmts.
480 2018-06-26  Richard Biener  <rguenther@suse.de>
482         PR middle-end/86271
483         * fold-const.c (fold_convertible_p): Pointer extension
484         isn't valid.
486 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
488         PR debug/86064
489         * dwarf2out.c (loc_list_has_views): Adjust comments.
490         (dw_loc_list): Split single cross-partition range with
491         nonzero locview.
493 2018-06-25  Jeff Law  <law@redhat.com>
495         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
496         on -mbig-switch by default.
498         * config/v850/predicates.md (const_float_1_operand): Fix match_code
499         test.
500         (const_float_0_operand): Remove unused predicate.
501         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
502         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
503         (recipsf2): New expander.  Original pattern now called
504         (recipsf2_insn).
505         (recipdf2, recipdf2_insn): Similarly.
506         (rsqrtsf2, rsqrtsf2_insn): Similarly
507         (rsqrtdf2, rsqrtdf2_insn): Similarly
509 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
511         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
512         Simplify logic for FreeBSD (twice).
514 2018-06-25  Martin Sebor  <msebor@redhat.com>
516         PR tree-optimization/86204
517         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
518         a strnlen result if it's less than the length of the string.
520 2018-06-25  Martin Sebor  <msebor@redhat.com>
522         PR tree-optimization/85700
523         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
524         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
525         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
527 2018-06-25  Martin Sebor  <msebor@redhat.com>
529         * doc/extend.texi (Zero-length arrays): Update and clarify.
531 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
533         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
534         added IEEE/IBM long double multilib support on PowerPC little
535         endian Linux systems.
536         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
537         (MULTILIB_DEFAULTS): Likewise.
538         * config/rs6000/rs6000.c (rs6000_option_override_internal):
539         Likewise.
540         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
541         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
542         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
544 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
546         PR middle-end/86311
547         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
548         (REORDER_45): Likewise.
550 2018-06-25  Jeff Law  <law@redhat.com>
552         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
553         dividend to 32 bits.  Adjust length.
554         (udivmodhi4): Cleanup output template.  Fix length.
556 2018-06-25  Carl Love  <cel@us.ibm.com>
558         * config/rs6000/vsx.md: Change word selector to prefered location.
560 2018-06-25  Richard Biener  <rguenther@suse.de>
562         PR tree-optimization/86304
563         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
564         epilogue-if-converted loops as well.
566 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
568         * lto-section-out.c (lto_begin_section): Do not print section
569         name for noaddr and unnumbered dumps.
571 2018-06-25  Richard Biener  <rguenther@suse.de>
573         * tree-vectorizer.h (struct vec_info_shared): New structure
574         with parts split out from struct vec_info and loop_nest from
575         struct _loop_vec_info.
576         (struct vec_info): Adjust accordingly.
577         (struct _loop_vec_info): Likewise.
578         (LOOP_VINFO_LOOP_NEST): Adjust.
579         (LOOP_VINFO_DATAREFS): Likewise.
580         (LOOP_VINFO_DDRS): Likewise.
581         (struct _bb_vec_info): Likewise.
582         (BB_VINFO_DATAREFS): Likewise.
583         (BB_VINFO_DDRS): Likewise.
584         (struct _stmt_vec_info): Add dr_aux member.
585         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
586         (DR_MISALIGNMENT_UNINITIALIZED): New.
587         (set_dr_misalignment): Adjust.
588         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
589         (vect_analyze_loop): Adjust prototype.
590         (vect_analyze_loop_form): Likewise.
591         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
592         Compute dependences lazily.
593         (vect_record_base_alignments): Use shared datarefs/ddrs.
594         (vect_verify_datarefs_alignment): Likewise.
595         (vect_analyze_data_refs_alignment): Likewise.
596         (vect_analyze_data_ref_accesses): Likewise.
597         (vect_analyze_data_refs): Likewise.
598         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
599         constructor parameter for shared part.
600         (vect_analyze_loop_form): Pass in shared part and adjust.
601         (vect_analyze_loop_2): Pass in storage for the number of
602         stmts.  Move loop nest finding to the caller.  Compute
603         datarefs lazily.
604         (vect_analyze_loop): Pass in shared part.
605         (vect_transform_loop): Verify shared datarefs are unchanged.
606         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
607         constructor parameter for shared part.
608         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
609         (vect_slp_bb): Verify shared datarefs are unchanged before
610         transform.
611         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
612         change.
613         (new_stmt_vec_info): Initialize DR_AUX misalignment to
614         DR_MISALIGNMENT_UNINITIALIZED.
615         * tree-vectorizer.c (vec_info::vec_info): Add constructor
616         parameter for shared part.
617         (vec_info::~vec_info): Adjust.
618         (vec_info_shared::vec_info_shared): New.
619         (vec_info_shared::~vec_info_shared): Likewise.
620         (vec_info_shared::save_datarefs): Likewise.
621         (vec_info_shared::check_datarefs): Likewise.
622         (try_vectorize_loop_1): Construct shared part live for analyses
623         of a single loop for multiple vector sizes.
624         * tree-parloops.c (gather_scalar_reductions): Adjust.
626 2018-06-25  Richard Biener  <rguenther@suse.de>
628         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
629         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
630         (vect_analyze_data_refs): Remove similar code from here and
631         simplify accordingly.
633 2018-06-25  Richard Biener  <rguenther@suse.de>
635         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
636         for reverse storage order accesses rather than asserting
637         they cannot happen here.
639 2018-06-25  Tom de Vries  <tdevries@suse.de>
641         PR debug/86257
642         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
643         Use data16 instead of .byte for insn prefix.
645 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
647         PR C++/86082
648         * parser.c (make_char_string_pack): Pass this literal chars
649         through cpp_interpret_string.
650         (cp_parser_userdef_numeric_literal): Check the result of
651         make_char_string_pack.
653 2018-06-24  Maya Rashish  <coypu@sdf.org>
655         * ginclude/stddef.h: Simplify conditions around avoiding
656         re-definition of __size_t.
658 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
660         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
661         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
663 2018-06-22  Maya Rashish  <coypu@sdf.org>
665         * doc/invoke.texi (mno-fancy-math-387): Update for changes
666         made to OpenBSD and NetBSD through the years.
668 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
670         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
671         behavior of vec_pack (vector double, vector double) to match
672         behavior of vec_float2 (vector double, vector double).
674 2018-06-22  Olivier Hainque  <hainque@adacore.com>
676         * gimplify.c (gimplify_function_tree): Prevent creation
677         of a trampoline for the address of the current function
678         passed to entry/exit instrumentation hooks.
680 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
682         PR target/86222
683         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
684         correctly.
686 2018-06-22  Martin Liska  <mliska@suse.cz>
688         PR tree-optimization/86263
689         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
690         Bail out if is_enabled is false.
691         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
692         New declaration.
693         (jump_table_cluster::is_enabled): New function.
695 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
697         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
698         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
699         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
700         (lto_input_ts_binfo_tree_pointers): Likewise.
701         * tree-streamer-out.c (streamer_write_tree_bitfields,
702         write_ts_binfo_tree_pointers): Likewise.
703         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
705 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
707         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
709 2018-06-22  Martin Liska  <mliska@suse.cz>
711         * symbol-summary.h (get): Make it pure and inline move
712         functionality from ::get function.
713         (get): Remove and inline into ::get and ::get_create.
714         (get_create): Move code from ::get function.
716 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
718         PR target/85994
719         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
720         -x assembler-with-cpp.
722 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
724         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
725         _FILE_OFFSET_BITS=64 for C++.
727 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
729         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
730         conversion insn that shows up when pr85657-3.c is compiled using
731         IEEE 128-bit long double.
732         (neg<mode>2_internal): Use the correct mode to check whether the
733         mode is IBM extended.
734         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
735         multiply and divide external functions from being created more
736         than once.
738 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
740         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
741         functions.
742         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
743         the edge can be forwarded.
744         (cfg_layout_merge_blocks): Likewise.
746 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
748         * except.c (finish_eh_generation): Commit edge insertions only after
749         the EH edges have been redirected from post-landing to landing pads.
751 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
753         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
754         create_tmp_var_for to create the FRAME decl.
755         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
757 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
759         * tree-inline.c (copy_edges_for_bb): Minor tweak.
760         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
761         debug statement when resetting its value.
762         (expand_call_inline): Copy the locus of the call onto the assignment
763         of the return value, if any.  Use local variable in more cases.
765 2018-06-21  Martin Liska  <mliska@suse.cz>
767         * ipa-pure-const.c (propagate_nothrow): Use
768         funct_state_summaries->get.
769         (dump_malloc_lattice): Likewise.
770         (propagate_malloc): Likewise.
772 2018-06-21  Richard Biener  <rguenther@suse.de>
774         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
775         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
776         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
777         comment.
778         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
779         BLOCK_ABSTRACT_ORIGIN unconditionally.
781 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
783         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
784         deleting it.
785         * ipa-reference.c (ipa_reference_c_finalize): Delete
786         ipa_ref_opt_sum_summaries and set it to NULL.
788 2018-06-21  Tom de Vries  <tdevries@suse.de>
790         PR tree-optimization/85859
791         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
792         test with comment from bb_no_side_effects_p.
794 2018-06-21  Richard Biener  <rguenther@suse.de>
796         PR tree-optimization/86232
797         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
798         max for constant niter.
800 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
802         * config/aarch64/aarch64-simd.md
803         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
805 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
807         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
808         Make opernads of the unspec commutative.
810 2018-06-21  Richard Biener  <rguenther@suse.de>
812         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
813         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
814         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
815         (vect_analyze_data_ref_dependence): Re-order checks to deal with
816         NULL DR_STEP.
817         (vect_record_base_alignments): Do not record base alignment
818         for gathers or scatters.
819         (vect_compute_data_ref_alignment): Drop return value that is always
820         true.  Bail out early for gathers or scatters.
821         (vect_enhance_data_refs_alignment): Bail out early for gathers
822         or scatters.
823         (vect_find_same_alignment_drs): Likewise.
824         (vect_analyze_data_refs_alignment): Remove dead code.
825         (vect_slp_analyze_and_verify_node_alignment): Likewise.
826         (vect_analyze_data_refs): For possible gathers or scatters do
827         not create an alternate DR, just check their possible validity
828         and mark them.  Adjust DECL_NONALIASED handling to not rely
829         on DR_BASE_ADDRESS.
830         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
831         update inits of gathers or scatters.
832         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
833         Also copy gather/scatter flag to pattern vinfo.
835 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
837         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
838         behavior of vec_packsu (vector unsigned long long, vector unsigned
839         long long) to match behavior of vec_packs with same signature.
841 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
842             Thomas Schwinge <thomas@codesourcery.com>
843             Cesar Philippidis  <cesar@codesourcery.com>
845         * gimplify.c (gimplify_scan_omp_clauses): Add support for
846         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
847         (gimplify_adjust_omp_clauses): Likewise.
848         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
849         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
850         (gimplify_omp_target_update): Update handling of acc update and
851         enter/exit data.
852         * omp-low.c (install_var_field): Remove unused parameter
853         base_pointers_restrict.
854         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
855         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
856         FINALIZE}
857         (omp_target_base_pointers_restrict_p): Delete.
858         (scan_omp_target): Update call to scan_sharing_clauses.
859         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
860         FINALIZE}.
861         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
862         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
863         (convert_local_omp_clauses): Likewise.
864         * tree-pretty-print.c (dump_omp_clause): Likewise.
865         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
866         FINALIZE}.
867         (omp_clause_code_name): Likewise.
869 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
871         PR debug/86194
872         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
873         be narrowed.
875         PR tree-optimization/86231
876         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
877         anti-range don't overwrite *vr0min before using it to compute *vr0max.
879 2018-06-20  Tom de Vries  <tdevries@suse.de>
881         PR tree-optimization/86097
882         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
883         iv type if signedness of iv type is not the same as that of *nit.
885 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
887         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
888         EDGE_EH edges, verify they are all EDGE_EH.
890 2018-06-20  Maya Rashish  <coypu@sdf.org>
892         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
894 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
896         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
897         * config/aarch64/aarch64.c (xgene1_tunings): Add
898         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
899         (aarch64_mode_valid_for_sched_fusion_p):
900         Allow 16-byte modes.
901         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
902         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
903         128-bit modes.
904         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
905         New pattern.
906         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
907         * config/aarch64/iterators.md (VQ2): New mode iterator.
909 2018-06-20  Martin Liska  <mliska@suse.cz>
911         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
912         Change default ratio from 10 to 8.
914 2018-06-20  Martin Liska  <mliska@suse.cz>
916         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
917         New.
918         (bit_test_cluster::find_bit_tests): Likewise.
919         (switch_decision_tree::analyze_switch_statement): Find clusters.
920         * tree-switch-conversion.h (struct jump_table_cluster): Document
921         hierarchy.
923 2018-06-20  Martin Liska  <mliska@suse.cz>
925         * tree-switch-conversion.c (switch_conversion::collect):
926         Record m_uniq property.
927         (switch_conversion::expand): Bail out for special conditions.
928         (group_cluster::~group_cluster): New.
929         (group_cluster::group_cluster): Likewise.
930         (group_cluster::dump): Likewise.
931         (jump_table_cluster::emit): New.
932         (switch_decision_tree::fix_phi_operands_for_edges): New.
933         (struct case_node): Remove struct.
934         (jump_table_cluster::can_be_handled): New.
935         (case_values_threshold): Moved to header.
936         (reset_out_edges_aux): Likewise.
937         (jump_table_cluster::is_beneficial): New.
938         (bit_test_cluster::can_be_handled): Likewise.
939         (add_case_node): Remove.
940         (bit_test_cluster::is_beneficial): New.
941         (case_bit_test::cmp): New.
942         (bit_test_cluster::emit): New.
943         (expand_switch_as_decision_tree_p): Remove.
944         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
945         (fix_phi_operands_for_edge): Likewise.
946         (switch_decision_tree::analyze_switch_statement): New.
947         (compute_cases_per_edge): Move ...
948         (switch_decision_tree::compute_cases_per_edge): ... here.
949         (try_switch_expansion): Likewise.
950         (switch_decision_tree::try_switch_expansion): Likewise.
951         (record_phi_operand_mapping): Likewise.
952         (switch_decision_tree::record_phi_operand_mapping): Likewise.
953         (emit_case_decision_tree): Likewise.
954         (switch_decision_tree::emit): Likewise.
955         (balance_case_nodes): Likewise.
956         (switch_decision_tree::balance_case_nodes): Likewise.
957         (dump_case_nodes): Likewise.
958         (switch_decision_tree::dump_case_nodes): Likewise.
959         (emit_jump): Likewise.
960         (switch_decision_tree::emit_jump): Likewise.
961         (emit_cmp_and_jump_insns): Likewise.
962         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
963         (emit_case_nodes): Likewise.
964         (switch_decision_tree::emit_case_nodes): Likewise.
965         (conditional_probability): Remove.
966         * tree-switch-conversion.h (enum cluster_type): New.
967         (PRINT_CASE): New.
968         (struct cluster): Likewise.
969         (cluster::cluster): Likewise.
970         (struct simple_cluster): Likewise.
971         (simple_cluster::simple_cluster): Likewise.
972         (struct group_cluster): Likewise.
973         (struct jump_table_cluster): Likewise.
974         (struct bit_test_cluster): Likewise.
975         (struct min_cluster_item): Likewise.
976         (struct case_tree_node): Likewise.
977         (case_tree_node::case_tree_node): Likewise.
978         (jump_table_cluster::case_values_threshold): Likewise.
979         (struct case_bit_test): Likewise.
980         (struct switch_decision_tree): Likewise.
981         (struct switch_conversion): Likewise.
982         (switch_decision_tree::reset_out_edges_aux): Likewise.
984 2018-06-20  Martin Liska  <mliska@suse.cz>
986         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
987         (hoist_edge_and_branch_if_true): Likewise.
988         (expand_switch_using_bit_tests_p): Likewise.
989         (struct case_bit_test): Likewise.
990         (case_bit_test_cmp): Likewise.
991         (emit_case_bit_tests): Likewise.
992         (switch_conversion::switch_conversion): New class.
993         (struct switch_conv_info): Remove old struct.
994         (collect_switch_conv_info): More to ...
995         (switch_conversion::collect): ... this.
996         (check_range): Likewise.
997         (switch_conversion::check_range): Likewise.
998         (check_all_empty_except_final): Likewise.
999         (switch_conversion::check_all_empty_except_final): Likewise.
1000         (check_final_bb): Likewise.
1001         (switch_conversion::check_final_bb): Likewise.
1002         (create_temp_arrays): Likewise.
1003         (switch_conversion::create_temp_arrays): Likewise.
1004         (free_temp_arrays): Likewise.
1005         (gather_default_values): Likewise.
1006         (switch_conversion::gather_default_values): Likewise.
1007         (build_constructors): Likewise.
1008         (switch_conversion::build_constructors): Likewise.
1009         (constructor_contains_same_values_p): Likewise.
1010         (switch_conversion::contains_same_values_p): Likewise.
1011         (array_value_type): Likewise.
1012         (switch_conversion::array_value_type): Likewise.
1013         (build_one_array): Likewise.
1014         (switch_conversion::build_one_array): Likewise.
1015         (build_arrays): Likewise.
1016         (switch_conversion::build_arrays): Likewise.
1017         (gen_def_assigns): Likewise.
1018         (switch_conversion::gen_def_assigns): Likewise.
1019         (prune_bbs): Likewise.
1020         (switch_conversion::prune_bbs): Likewise.
1021         (fix_phi_nodes): Likewise.
1022         (switch_conversion::fix_phi_nodes): Likewise.
1023         (gen_inbound_check): Likewise.
1024         (switch_conversion::gen_inbound_check): Likewise.
1025         (process_switch): Use the newly created class.
1026         (switch_conversion::expand): New.
1027         (switch_conversion::~switch_conversion): New.
1028         * tree-switch-conversion.h: New file.
1030 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1032         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1033         tree-vect-patterns.c.
1034         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1035         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
1036         (vect_recog_sad_pattern): Likewise.
1037         (vect_recog_widen_sum_pattern): Likewise.
1038         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
1039         (vect_recog_widen_shift_pattern): Remove the type_in argument.
1040         (vect_recog_rotate_pattern): Likewise.
1041         (vect_recog_mult_pattern): Likewise.
1042         (vect_recog_vector_vector_shift_pattern): Likewise.
1043         (vect_recog_divmod_pattern): Likewise.
1044         (vect_recog_mixed_size_cond_pattern): Likewise.
1045         (vect_recog_bool_pattern): Likewise.
1046         (vect_recog_mask_conversion_pattern): Likewise.
1047         (vect_try_gather_scatter_pattern): Likewise.
1048         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
1049         (vect_recog_over_widening_pattern): Likewise.
1050         (vect_recog_gather_scatter_pattern): Likewise.
1051         (vect_recog_func_ptr): Move from tree-vectorizer.h
1052         (vect_vect_recog_func_ptrs): Move further down the file.
1053         (vect_recog_func): Likewise.  Remove the third argument.
1054         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1055         (vect_pattern_recog_1): Expect the pattern function to do any
1056         necessary target tests.  Also expect it to provide a vector type.
1057         Remove the type_in handling.
1059 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1061         * tree-vect-patterns.c (vect_pattern_detected): New function.
1062         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1063         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1064         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1065         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1066         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1067         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1068         (vect_recog_mask_conversion_pattern)
1069         (vect_try_gather_scatter_pattern): Likewise.
1071 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1073         * tree-vect-patterns.c (vect_get_internal_def): New function.
1074         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1075         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1076         (search_type_for_mask_1): Use it.
1078 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1080         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1081         redundant WIDEN_SUM_EXPR handling.
1082         (vect_recog_sad_pattern): Likewise.
1084 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1086         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1087         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1088         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1089         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1090         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1092 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1094         * tree-vect-stmts.c (vectorizable_call): Make sure that we
1095         use the stmt_vec_info of the original bb statement for the
1096         new zero assignment, even if the call is part of a pattern.
1098 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1100         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1101         that the sequence is attached to the original statement rather
1102         than the pattern statement.
1103         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1104         PATTERN_DEF_SEQ from the original statement rather than
1105         the main pattern statement.
1106         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1107         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1108         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1110 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1112         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1113         definition statements before the early exit for statements that aren't
1114         live or relevant.
1115         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1116         split out from...
1117         (vect_transform_loop): ...here.  Process pattern definition
1118         statements without first checking whether the main pattern
1119         statement is live or relevant.
1121 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1123         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1124         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1125         
1126 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
1128         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1129         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1130         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1131         (expand_block_compare): Change select_block_compare_mode call.
1132         (expand_strncmp_align_check): Use new functions, fix comment.
1133         (emit_final_str_compare_gpr): New function.
1134         (expand_strn_compare): Refactor and clean up code.
1135         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1137 2018-06-19  Tony Reix  <tony.reix@atos.com>
1138             Damien Bergamini  <damien.bergamini@atos.com>
1139             David Edelsohn  <dje.gcc@gmail.com>
1141         * collect2.c (static_obj): New variable.
1142         (static_libs): New variable.
1143         (is_in_list): Uncomment declaration.
1144         (main): Track AIX libraries linked statically.
1145         (is_in_list): Uncomment definition.
1146         (scan_prog_file): Don't add AIX shared libraries initializer
1147         to constructor list if linking statically.
1149 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
1151         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1152         constant.
1153         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1155 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
1157         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1158         blocks.
1160 2018-06-19  Martin Liska  <mliska@suse.cz>
1162         * config/i386/i386.c (ix86_can_inline_p): Do not use
1163         ipa_fn_summaries::get_create.
1164         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1165         get.
1166         (devirtualization_time_bonus): Likewise.
1167         (ipcp_propagate_stage): Likewise.
1168         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1169         (edge_set_predicate): Likewise.
1170         (evaluate_conditions_for_known_args): Likewise.
1171         (evaluate_properties_for_edge): Likewise.
1172         (ipa_call_summary::reset): Tranform to ...
1173         (ipa_call_summary::~ipa_call_summary): ... this.
1174         (ipa_fn_summary::reset): Transform to ...
1175         (ipa_fn_summary::~ipa_fn_summary): ... this.
1176         (ipa_fn_summary_t::remove): Rename to ...
1177         (ipa_fn_summary_t::remove_callees): ... this.
1178         (ipa_fn_summary_t::duplicate): Use placement new
1179         instead of memory copy.
1180         (ipa_call_summary_t::duplicate): Likewise.
1181         (ipa_call_summary_t::remove): Remove.
1182         (dump_ipa_call_summary): Change get_create to get.
1183         (ipa_dump_fn_summary): Dump only when summary exists.
1184         (analyze_function_body): Use symbol_summary::get instead
1185         of get_create.
1186         (compute_fn_summary): Likewise.
1187         (estimate_edge_devirt_benefit): Likewise.
1188         (estimate_edge_size_and_time): Likewise.
1189         (inline_update_callee_summaries): Likewise.
1190         (remap_edge_change_prob): Likewise.
1191         (remap_edge_summaries): Likewise.
1192         (ipa_merge_fn_summary_after_inlining): Likewise.
1193         (write_ipa_call_summary): Likewise.
1194         (ipa_fn_summary_write): Likewise.
1195         (ipa_free_fn_summary): Likewise.
1196         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1197         (struct ipa_call_summary): Likewise.
1198         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1199         of get_create.
1200         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1201         (estimate_size_after_inlining): Likewise.
1202         (estimate_growth): Likewise.
1203         (growth_likely_positive): Likewise.
1204         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1205         (inline_call): Likewise.
1206         * ipa-inline.c (caller_growth_limits): Likewise.
1207         (can_inline_edge_p): Likewise.
1208         (can_inline_edge_by_limits_p): Likewise.
1209         (compute_uninlined_call_time): Likewise.
1210         (compute_inlined_call_time): Likewise.
1211         (want_inline_small_function_p): Likewise.
1212         (edge_badness): Likewise.
1213         (update_caller_keys): Likewise.
1214         (update_callee_keys): Likewise.
1215         (inline_small_functions): Likewise.
1216         (inline_to_all_callers_1): Likewise.
1217         (dump_overall_stats): Likewise.
1218         (early_inline_small_functions): Likewise.
1219         (early_inliner): Likewise.
1220         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1221         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1222         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1223         * ipa-split.c (execute_split_functions): Likewise.
1224         * symbol-summary.h: Likewise.
1225         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1227 2018-06-19  Richard Biener  <rguenther@suse.de>
1229         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1230         (vectorize_loops): ... here.  Fix dbgcnt handling.
1231         (try_vectorize_loop): Wrap try_vectorize_loop_1.
1233 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
1235         PR target/86197
1236         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1237         ieee128 argument takes up only one (vector) register, not two (floating
1238         point) registers.
1240 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1242         * gimplify.c (gimplify_init_constructor): Really never clear for an
1243         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1245 2018-06-19  Richard Biener  <rguenther@suse.de>
1247         PR tree-optimization/86179
1248         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1249         after failed recognition.
1251 2018-06-18  Martin Sebor  <msebor@redhat.com>
1253         PR middle-end/85602
1254         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1255         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1256         Handle integer subtraction.
1257         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1258         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1260 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1262         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1263         param from rtx to rtx_insn *.
1264         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1265         param.
1266         (frv_ifcvt_modify_insn): Likwise.
1267         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1268         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
1269         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1270         as_a <rtx_insn *> cast to local "unprotected_region" once
1271         it's been established that it's not NULL or pc_rtx.
1272         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1273         param "sethi" from rtx to rtx_insn *.
1274         (nds32_group_float_insns): Likewise for param "insn".
1275         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1276         param.
1277         (vax_output_int_subtract): Likewise.
1278         * config/vax/vax.c (vax_output_int_add): Likewise for param
1279         "insn".
1280         (vax_output_int_subtract): Likewise.
1281         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1282         (emit_pattern_after): Likewise for param "after".
1283         (emit_insn_after): Likewise.
1284         (emit_jump_insn_after): Likewise.
1285         (emit_call_insn_after): Likewise.
1286         (emit_debug_insn_after): Likewise.
1287         (emit_pattern_before): Likewise for param "before".
1288         (emit_insn_before): Likewise.
1289         (emit_jump_insn_before): Likewise.
1290         * final.c (get_insn_template): Likewise for param "insn", removing
1291         a cast.
1292         * output.h (get_insn_template): Likewise for 2nd param.
1293         * rtl.h (emit_insn_before): Likewise.
1294         (emit_jump_insn_before): Likewise.
1295         (emit_debug_insn_before_noloc): Likewise.
1296         (emit_insn_after): Likewise.
1297         (emit_jump_insn_after): Likewise.
1298         (emit_call_insn_after): Likewise.
1299         (emit_debug_insn_after): Likewise.
1300         (set_insn_deleted): Likewise for param.
1302 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
1304         PR target/85358
1305         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1306         floating point modes, so that IFmode is numerically greater than
1307         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1308         to declare the ordering.  This prevents IFmode from being
1309         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1310         machine.  Include rs6000-modes.h to share the fractional values
1311         between genmodes* and the rest of the compiler.
1312         (IFmode): Likewise.
1313         (KFmode): Likewise.
1314         (TFmode): Likewise.
1315         * config/rs6000/rs6000-modes.h: New file.
1316         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1317         meaning of rs6000_long_double_size so that 126..128 selects an
1318         appropriate 128-bit floating point type.
1319         (rs6000_option_override_internal): Likewise.
1320         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1321         (TARGET_LONG_DOUBLE_128): Change the meaning of
1322         rs6000_long_double_size so that 126..128 selects an appropriate
1323         128-bit floating point type.
1324         (LONG_DOUBLE_TYPE_SIZE): Update comment.
1325         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1326         source and destination to match the standard usage.
1327         (truncifkf2): Likewise.
1328         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1329         ISA 2.07 to use an explicit clobber, instead of passing in a
1330         temporary.
1331         (copysign<mode>3_soft): Likewise.
1333 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1335         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1336         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1337         (vect_slp_analyze_instance_dependence): Likewise.
1338         (vect_enhance_data_refs_alignment): Likewise.
1339         (vect_analyze_data_refs_alignment): Likewise.
1340         (vect_slp_analyze_and_verify_instance_alignment
1341         (vect_analyze_data_ref_accesses): Likewise.
1342         (vect_prune_runtime_alias_test_list): Likewise.
1343         (vect_analyze_data_refs): Likewise.
1344         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1345         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1346         (vect_analyze_scalar_cycles_1): Likewise.
1347         (vect_get_loop_niters): Likewise.
1348         (vect_analyze_loop_form_1): Likewise.
1349         (vect_update_vf_for_slp): Likewise.
1350         (vect_analyze_loop_operations): Likewise.
1351         (vect_analyze_loop): Likewise.
1352         (vectorizable_induction): Likewise.
1353         (vect_transform_loop): Likewise.
1354         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1355         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1356         (vect_make_slp_decision): Likewise.
1357         (vect_detect_hybrid_slp): Likewise.
1358         (vect_slp_analyze_operations): Likewise.
1359         (vect_slp_bb): Likewise.
1360         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1361         (vectorizable_bswap): Likewise.
1362         (vectorizable_call): Likewise.
1363         (vectorizable_simd_clone_call): Likewise.
1364         (vectorizable_conversion): Likewise.
1365         (vectorizable_assignment): Likewise.
1366         (vectorizable_shift): Likewise.
1367         (vectorizable_operation): Likewise.
1368         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1370 2018-06-18  Martin Sebor  <msebor@redhat.com>
1372         PR tree-optimization/81384
1373         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1374         * builtins.c (expand_builtin_strnlen): New function.
1375         (expand_builtin): Call it.
1376         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1377         * builtins.def (BUILT_IN_STRNLEN): New.
1378         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1379         Warn for bounds in excess of maximum object size.
1380         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1381         single-value ranges.  Handle strnlen.
1382         (handle_builtin_strlen): Handle strnlen.
1383         (strlen_check_and_optimize_stmt): Same.
1384         * doc/extend.texi (Other Builtins): Document strnlen.
1386 2018-06-18  Maya Rashish  <coypu@sdf.org>
1388         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1389         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1390         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1392         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1393         here to ...
1394         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1396 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1398         * tree.c (escaped_string::escape): Replace cast to char * by
1399         const_cast<char *> (unescaped).
1401 2018-06-18  Nick Clifton  <nickc@redhat.com>
1403         PR 84195
1404         * tree.c (escaped_string): New class.  Converts an unescaped
1405         string into its escaped equivalent.
1406         (warn_deprecated_use): Use the new class to convert the
1407         deprecation message, if present.
1408         (test_escaped_strings): New self test.
1409         (test_c_tests): Add test_escaped_strings.
1410         * doc/extend.texi (deprecated): Add a note that the
1411         deprecation message is affected by the -fmessage-length
1412         option, and that control characters will be escaped.
1413         (#pragma GCC error): Document this pragma.
1414         (#pragma GCC warning): Likewise.
1415         * doc/invoke.texi (-fmessage-length): Document this option's
1416         effect on the #warning and #error preprocessor directives and
1417         the deprecated attribute.
1419 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
1421         * tree.c (decl_value_expr_lookup): Revert latest change.
1422         (decl_value_expr_insert): Likewise.
1424 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
1426         * gimplify.c (nonlocal_vlas): Delete.
1427         (nonlocal_vla_vars): Likewise.
1428         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1429         referenced VLAs.
1430         (gimplify_body): Do not create and destroy nonlocal_vlas.
1431         * tree-nested.c: Include diagnostic.h.
1432         (use_pointer_in_frame): Tweak.
1433         (lookup_field_for_decl): Add assertion and declare the transformation.
1434         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1435         internal error when the reference is in a wrong context.  Do not
1436         create a debug decl by default.
1437         (note_nonlocal_block_vlas): Delete.
1438         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1439         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
1440         create a debug decl by default.
1441         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1442         call is in a wrong context.
1443         (fixup_vla_decls): New function.
1444         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
1445         debug variables were created.
1446         * tree.c (decl_value_expr_lookup): Add checking assertion.
1447         (decl_value_expr_insert): Likewise.
1449 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1451         PR middle-end/82479
1452         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1453         * tree-scalar-evolution.c (interpret_expr): Likewise.
1454         (expression_expensive_p): Likewise.
1455         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1456         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1457         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1458         (ssa_defined_by_minus_one_stmt_p): New.
1460 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1462         PR middle-end/64946
1463         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1464         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1465         * dojump.c (do_jump): Likewise.
1466         * expr.c (expand_expr_real_2): Check operand type's sign.
1467         * fold-const.c (const_unop): Handle ABSU_EXPR.
1468         (fold_abs_const): Likewise.
1469         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1470         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1471         (strip_sign_op_1): Likesise.
1472         * match.pd: Add new pattern to generate ABSU_EXPR.
1473         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1474         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1475         * tree-eh.c (operation_could_trap_helper_p): Likewise.
1476         * tree-inline.c (estimate_operator_cost): Likewise.
1477         * tree-pretty-print.c (dump_generic_node): Likewise.
1478         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1479         * tree.def (ABSU_EXPR): New.
1481 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
1483         PR middle-end/86095
1484         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1485         documented as preserved for backward compatibility only.
1486         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1488         PR rtl-optimization/86108
1489         * bb-reorder.c (create_forwarder_block): Renamed to ...
1490         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
1491         jump from new landing pad to the second part.
1492         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1493         Adjust callers.
1495 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
1497         PR middle-end/85878
1498         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1499         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1500         Only call store_expr for halves if the mode is the same.
1502         PR middle-end/86123
1503         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1504         Fix up comment formatting.
1506 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1508         * typed-splay-tree.h (typed_splay_tree::remove): New function.
1509         (typed_splay_tree::closure,
1510         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1511         (typed_splay_tree::typed_splay_tree,
1512         typed_splay_tree::operator =): Declared private.
1513         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1514         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1515         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1516         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1517         typed_splay_tree::splay_tree_splay,
1518         typed_splay_tree::splay_tree_foreach_helper,
1519         typed_splay_tree::splay_tree_insert,
1520         typed_splay_tree::splay_tree_remove,
1521         typed_splay_tree::splay_tree_lookup,
1522         typed_splay_tree::splay_tree_predecessor,
1523         typed_splay_tree::splay_tree_successor,
1524         typed_splay_tree::splay_tree_min,
1525         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1526         (typed_splay_tree::root, typed_splay_tree::comp,
1527         typed_splay_tree::delete_key,
1528         typed_splay_tree::delete_value): New data members.
1529         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1530         typed_splay_tree::remove.
1532 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
1534         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1535         -mginv and -mno-ginv to the assembler.
1536         * config/mips/mips.opt (-mcrc): New option.
1537         (-mginv): Likewise.
1538         * doc/invoke.text (-mcrc): Document.
1539         (-mginv): Likewise.
1541 2018-06-15  Nick Clifton  <nickc@redhat.com>
1543         PR 84195
1544         * tree.c (escaped_string): New class.  Converts an unescaped
1545         string into its escaped equivalent.
1546         (warn_deprecated_use): Use the new class to convert the
1547         deprecation message, if present.
1548         (test_escaped_strings): New self test.
1549         (test_c_tests): Add test_escaped_strings.
1550         * doc/extend.texi (deprecated): Add a note that the
1551         deprecation message is affected by the -fmessage-length
1552         option, and that control characters will be escaped.
1553         (#pragma GCC error): Document this pragma.
1554         (#pragma GCC warning): Likewise.
1555         * doc/invoke.texi (-fmessage-length): Document this option's
1556         effect on the #warning and #error preprocessor directives and
1557         the deprecated attribute.
1559 2018-06-15  Richard Biener  <rguenther@suse.de>
1561         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1562         here, also noting vector size used.
1563         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1564         size used in MSG_OPTIMIZED_LOCATIONS dump.
1565         (pass_slp_vectorize::execute): Adjust.
1567 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1569         PR target/85968
1570         * config/arc/arc.c (arc_return_address_register): Fix
1571         if-condition.
1573 2018-06-15  Richard Biener  <rguenther@suse.de>
1575         PR middle-end/86159
1576         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1577         leave useless conversion stripping to force_gimple_operand_gsi.
1578         (gimplify_build2): Likewise.
1579         (gimplify_build1): Likewise.
1581 2018-06-15  Richard Biener  <rguenther@suse.de>
1583         PR middle-end/86076
1584         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1585         before adjusting their block.
1587 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1589         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1590         multilibs for *-*-rtems*.
1591         * config/riscv/t-rtems: New file.
1593 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1595         PR middle-end/86122
1596         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1597         unsigned_type_for returns NULL.
1599         PR target/85945
1600         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1601         subregs of multi-word pseudos unless the float mode has word size.
1603 2018-06-14  Richard Biener  <rguenther@suse.de>
1605         PR middle-end/86139
1606         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1607         duplicate and harmful type_hash_canon.
1608         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1610 2018-06-14  Richard Biener  <rguenther@suse.de>
1612         PR ipa/86124
1613         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1614         NULL cgraph_node.
1616 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1618         * config/rtems.h (STDINT_LONG32): Define.
1620 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1621             Prachi Godbole  <prachi.godbole@imgtec.com>
1623         * config/mips/mips-cpus.def: Define P6600.
1624         * config/mips/mips-tables.opt: Regenerate.
1625         * config/mips/mips.c (mips_ucbranch_type): New enum.
1626         (mips_rtx_cost_data): Add support for P6600.
1627         (mips_issue_rate): Likewise.
1628         (mips_multipass_dfa_lookahead): Likewise.
1629         (mips_avoid_hazard): Likewise.
1630         (mips_reorg_process_insns): Likewise.
1631         (mips_classify_branch_p6600): New function.
1632         * config/mips/mips.h (TUNE_P6600): New define.
1633         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1634         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1635         * config/mips/mips.md: Include p6600.md.
1636         (processor): Add p6600.
1637         * config/mips/p6600.md: New file.
1638         * doc/invoke.texi: Add p6600 to supported architectures.
1640 2018-06-13  Martin Sebor  <msebor@redhat.com>
1642         PR tree-optimization/86114
1643         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1644         of integer types.
1645         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1647 2018-06-13  Richard Biener  <rguenther@suse.de>
1649         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1650         Properly set vector type of the intermediate stmt.
1651         * tree-vect-stmts.c (vectorizable_operation): The destination
1652         var always has vectype_out type.
1654 2018-06-13  Jeff Law  <law@redhat.com>
1656         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1657         integer 0 for argument to print_rtl_with_bb.
1658         (rl78_reorg): Likewise.
1660 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1662         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1663         from rtx to rtx_insn *.
1664         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1665         "label".
1666         (add_sched_insns_for_speculation): Likewise for local "target",
1667         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1668         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1669         from rtx_insn ** to rtx_code_label **.
1670         (reorg_emit_nops): Likewise.
1671         (c6x_reorg): Likewise for local "call_labels".
1672         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1673         rtx to rtx_insn *.
1674         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1675         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1676         the loops over LABEL_REFS.
1677         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1678         braf_label.
1679         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1680         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1681         (split_branches): Strengthen local "olabel" from rtx to
1682         rtx_insn *, adding a safe_as_a cast.
1683         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1684         to "rtx_insn *".
1685         (add_insn_after): Likewise for first two params.
1686         (add_insn_before): Likewise.
1687         (remove_insn): Likewise for param.
1688         (emit_pattern_before_noloc): Likewise for second and third params.
1689         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1690         (emit_call_insn_before_noloc): Likewise.
1691         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1692         to "rtx_insn *".
1693         (emit_barrier_before): Likewise.
1694         (emit_label_before): Strengthen "label" param from "rtx" to
1695         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1696         "rtx_insn *".
1697         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1698         "rtx_insn *".
1699         (emit_pattern_after_noloc): Likewise.
1700         (emit_insn_after_noloc): Likewise.
1701         (emit_jump_insn_after_noloc): Likewise.
1702         (emit_call_insn_after_noloc): Likewise.
1703         (emit_debug_insn_after_noloc): Likewise.
1704         (emit_barrier_after): Likewise.
1705         (emit_label_after): Likewise for both params.
1706         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1707         "loc" param from "int" to "location_t".
1708         (emit_insn_after_setloc): Likewise.
1709         (emit_jump_insn_after_setloc): Likewise.
1710         (emit_call_insn_after_setloc): Likewise.
1711         (emit_debug_insn_after_setloc): Likewise.
1712         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1713         "loc" param from "int" to "location_t".
1714         (emit_pattern_before): Convert NULL_RTX to NULL.
1715         (emit_insn_before_setloc): Convert "loc" param from "int" to
1716         "location_t".
1717         (emit_jump_insn_before_setloc): Likewise.
1718         (emit_call_insn_before_setloc): Likewise.
1719         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1720         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1721         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1722         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1723         Convert 3rd param from "int" to "location_t".
1724         (emit_barrier_before, emit_barrier_after, next_real_insn):
1725         Strengthen param from rtx to rtx_insn *.
1726         (emit_label_before): Strengthen 1st param from "rtx" to
1727         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1728         "rtx_insn *".
1729         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1730         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1731         Strengthen 2nd param from "rtx" to "rtx_insn *".
1732         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1733         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1734         Likewise. Convert 3rd param from "int" to "location_t".
1735         (emit_label_after): Strengthen 1st param from "rtx" to
1736         "rtx_code_label *".
1737         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1738         "rtx_insn *".
1739         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1740         from "rtx" to "rtx_insn *".
1742 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1744         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1745         bodies streamed in with -Q.
1746         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1747         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1748         * gimple-streamer-out.c: Include gimple-pretty-print.h
1749         (output_bb): Dump stmts streamed.
1750         * lto-section-out.c: Include print-tree.h
1751         (lto_begin_section): Dump sections created.
1752         (lto_output_decl_index): Dump decl encoded.
1753         * lto-streamer-out.c: Include print-tree.h
1754         (create_output_block): Dump output block created.
1755         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1756         (output_function): Dump function output.
1757         (output_constructor): Dump constructor streamed.
1758         (write_global_stream): Output indexes encoded.
1759         (produce_asm_for_decls): Dump streams encoded.
1760         * lto-streamer.c (streamer_dump_file): New global var.
1761         * lto-streamer.h (streamer_dump_file): Declare.
1762         * passes.c (ipa_write_summaries): Initialize streamer dump.
1763         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1764         in.
1766 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1768         PR target/86048
1769         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1770         offsets for register save directives.  Emit a second batch of save
1771         directives, if need be, when the function accesses prior frames.
1773 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1775         * config/arc/fpu.md (fmasf4): Force operand to register.
1776         (fnmasf4): Likewise.
1778 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1780         * config/arc/arc-protos.h (arc_pad_return): Remove.
1781         * config/arc/arc.c (machine_function): Remove force_short_suffix
1782         and size_reason.
1783         (arc_print_operand): Adjust printing of '&'.
1784         (arc_verify_short): Remove conditional printing of short suffix.
1785         (arc_final_prescan_insn): Remove reference to size_reason.
1786         (pad_return): New function.
1787         (arc_reorg): Call pad_return.
1788         (arc_pad_return): Remove.
1789         (arc_init_machine_status): Remove reference to force_short_suffix.
1790         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1791         (attr length): When attribute iscompact is true force to 2
1792         regardless; in the case of maybe check if we want to force the
1793         instruction to have 4 bytes length.
1794         (nopv): Change it to generate 4 byte long nop as well.
1795         (blockage): New pattern.
1796         (simple_return): Remove call to arc_pad_return.
1797         (p_return_i): Likewise.
1799 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1801         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1803 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1805         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1806         ARC cores.
1808 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1810         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1811         for ARC700 and ARCv2.
1813 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1815         PR target/86076
1816         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1817         operands[2] instead of operands[1].
1820 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1822         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1823         case, check whether the outer register overlaps an unallocatable
1824         register, not just whether it fits the required class.
1826 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1828         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1829         are poly_ints.
1830         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1831         (memrefs_conflict_p): Likewise.
1832         (init_alias_analysis): Likewise.
1833         * cfgexpand.c (expand_debug_expr): Likewise.
1834         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1835         * cse.c (fold_rtx): Likewise.
1836         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1837         * expr.c (emit_block_move_hints): Likewise.
1838         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1839         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1840         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1841         (emit_group_store): Likewise.
1842         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1843         to read the PRE/POST_MODIFY increment.
1844         * calls.c (store_one_arg): Use strip_offset.
1845         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1846         poly_int_rtx_p.
1847         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1848         by a VEC_SELECT.
1849         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1850         (simplify_binary_operation_1): Extend CONST_INT handling to
1851         poly_int_rtx_p.
1852         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1853         than a HOST_WIDE_INT.
1854         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1855         poly_int64.
1856         (adjust_mems, add_stores): Update accodingly.
1857         (vt_canonicalize_addr): Track polynomial offsets.
1858         (emit_note_insn_var_location): Likewise.
1859         (vt_add_function_parameter): Likewise.
1860         (vt_initialize): Likewise.
1862 2018-06-12  Jeff Law  <law@redhat.com>
1864         * config.gcc (alpha*-*-freebsd*): Remove.
1865         * config/alpha/freebsd.h: Remove.
1867 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1869         PR other/69968
1870         * spellcheck-tree.c (levenshtein_distance): Rename to...
1871         (get_edit_distance): ...this, and update for underlying renaming.
1872         * spellcheck-tree.h (levenshtein_distance): Rename to...
1873         (get_edit_distance): ...this.
1874         * spellcheck.c (levenshtein_distance): Rename to...
1875         (get_edit_distance): ...this.  Convert from Levenshtein distance
1876         to Damerau-Levenshtein distance by supporting transpositions of
1877         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1878         "v_one_ago".
1879         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1880         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1881         update for underlying renaming.
1882         (selftest::levenshtein_distance_unit_test): Rename to...
1883         (selftest::test_get_edit_distance_unit): ...this, and update for
1884         underlying renaming.
1885         (selftest::test_find_closest_string): Add example from PR 69968
1886         where transposition helps
1887         (selftest::test_metric_conditions): Update for renaming.
1888         (selftest::test_metric_conditions): Likewise.
1889         (selftest::spellcheck_c_tests): Likewise.
1890         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1891         (get_edit_distance): ...this.
1892         (best_match::consider): Update for renaming.
1894 2018-06-12  Martin Sebor  <msebor@redhat.com>
1896         PR tree-optimization/85259
1897         * builtins.c (compute_objsize): Handle constant offsets.
1898         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1899         true iff a warning has been issued.
1900         * gimple.h (gimple_nonartificial_location): New function.
1901         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1902         gimple_nonartificial_location and handle -Wno-system-headers.
1903         (handle_builtin_stxncpy): Same.
1905 2018-06-12  Martin Sebor  <msebor@redhat.com>
1907         PR c/85931
1908         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1910 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1912         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1913         BUILTIN_VEC_XST entries for pointer to double and long long.
1915 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1917         PR target/85990
1918         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1919         Update comments.
1920         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1921         Likewise.
1923 2018-06-12  Martin Liska  <mliska@suse.cz>
1925         * doc/options.texi: Document IntegerRange.
1927 2018-06-12  Martin Liska  <mliska@suse.cz>
1929         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1930         * opt-functions.awk: Handle Deprecated flag.
1931         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1932         and report error.
1933         (read_cmdline_option): Report warning for a deprecated option.
1934         * opts.h (struct cl_option): Add new field cl_deprecated.
1935         (CL_ERR_DEPRECATED): New.
1937 2018-06-12  Martin Liska  <mliska@suse.cz>
1939         * doc/options.texi: Document Deprecated option flag.
1941 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1943         * config/arc/arc-arch.h (arc_extras): New enum.
1944         (arc_cpu_t):Add field extra.
1945         (arc_cpu_types): Consider the extras.
1946         * config/arc/arc-cpus.def: Add extras info.
1947         * config/arc/arc-opts.h (processor_type): Consider extra field.
1948         * config/arc/arc.c (arc_override_options): Handle extra field.
1950 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1952         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1953         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1954         field.
1955         * config/arc/arc.c (arc_init): Update pic warning.
1956         (irq_range): Update irq range parsing warnings.
1957         (arc_override_options): Update various warning messages.
1958         (arc_handle_aux_attribute): Likewise.
1960 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1962         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1964 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1966         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1967         compiler messages directives.
1969 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1971         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1972         * config/mips/mips-tables.opt: Regenerate.
1973         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1974         mips64r6.
1975         * doc/invoke.texi: Document -march=i6500.
1977 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1979         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1980         (i6400_gpmul): Add cpu_unit.
1981         (i6400_gpdiv): Likewise.
1982         (i6400_msa_add_d): Update reservations.
1983         (i6400_msa_int_add) Likewise.
1984         (i6400_msa_short_logic3) Likewise.
1985         (i6400_msa_short_logic2) Likewise.
1986         (i6400_msa_short_logic) Likewise.
1987         (i6400_msa_move) Likewise.
1988         (i6400_msa_cmp) Likewise.
1989         (i6400_msa_short_float2) Likewise.
1990         (i6400_msa_div_d) Likewise.
1991         (i6400_msa_long_logic1) Likewise.
1992         (i6400_msa_long_logic2) Likewise.
1993         (i6400_msa_mult) Likewise.
1994         (i6400_msa_long_float2) Likewise.
1995         (i6400_msa_long_float4) Likewise.
1996         (i6400_msa_long_float5) Likewise.
1997         (i6400_msa_long_float8) Likewise.
1998         (i6400_fpu_fadd): Include frint type.
1999         (i6400_fpu_store): New define_insn_reservation.
2000         (i6400_fpu_load): Likewise.
2001         (i6400_fpu_move): Likewise.
2002         (i6400_fpu_fcmp): Likewise.
2003         (i6400_fpu_fmadd): Likewise.
2004         (i6400_int_mult): Include imul3nc type and update reservation.
2005         (i6400_int_div): Include idiv3 type and update reservation.
2006         (i6400_int_load): Update to check type not move_type.
2007         (i6400_int_store): Likewise.
2008         (i6400_int_prefetch): Set zero latency.
2010 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
2012         * gcc.c: Document new %@{...} sequence.
2013         (LINK_COMMAND_SPEC): Use it for the -L switches.
2014         (cpp_unique_options): Use it for the -I switches.
2015         (at_file_argbuf): New global variable.
2016         (in_at_file): Likewise.
2017         (alloc_args): Create at_file_argbuf.
2018         (clear_args): Truncate at_file_argbuf.
2019         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
2020         (open_at_file): New function.
2021         (close_at_file): Likewise.
2022         (create_at_file): Delete.
2023         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
2024         <'o'>: Likewise.
2025         <'@'>: New case.
2026         (validate_switches_from_spec): Deal with %@{...} sequence.
2027         (validate_switches): Likewise.
2028         (driver::finalize): Call clear_args.
2030 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
2032         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2034 2018-06-11  Martin Sebor  <msebor@redhat.com>
2036         * doc/invoke.texi (-Wall): List -Wc++17-compat.
2037         (Wno-class-memaccess): Add @opindex.
2038         (Wno-templates, Wno-multiple-inheritance): Same.
2039         (Wno-virtual-inheritance, Wno-namespaces): Same.
2040         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2041         (Wno-format-overflow, Wno-format-truncation): Same.
2042         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2043         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2044         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2045         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2046         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2047         (Wno-misspelled-isr): Same.
2049 2018-06-11  Martin Sebor  <msebor@redhat.com>
2051         * PR tree-optimization/86083
2052         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2054 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2056         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2058 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
2060         PR target/85755
2061         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2062         on the correct operand.
2063         (*movdi_internal64): Ditto.
2065 2018-06-11  Martin Liska  <mliska@suse.cz>
2067         PR tree-optimization/86089
2068         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2070 2018-06-11  Julia Koval  <julia.koval@intel.com>
2072         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2073         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2074         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2076 2018-06-11  Olivier Hainque  <hainque@adacore.com>
2078         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2079         for Ada with strict dwarf2.
2081 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
2083         PR target/85755
2084         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2085         addresses.
2087 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
2089         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2091 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
2093         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2094         TARGET_ELF.
2096 2018-06-08  Martin Liska  <mliska@suse.cz>
2098         * tree-cfg.h (debug_function): Fix argument type to match
2099         implementation.
2101 2018-06-08  Martin Liska  <mliska@suse.cz>
2103         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2104         Remove usage of MPX-related (and removed) fields.
2105         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2107 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
2109         * cfg.c (debug): Use TDF_NONE rather than 0.
2110         * cfghooks.c (debug): Likewise.
2111         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2112         (struct dump_option_value_info): Convert to...
2113         (struct kv_pair): ...this template type.
2114         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2115         rather than 0.
2116         (optinfo_verbosity_options): Likewise.
2117         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2118         OPTGROUP_NONE.
2119         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2120         than int for "optgroup_flags" param.
2121         (dump_generic_expr_loc): Use dump_flags_t rather than int for
2122         "dump_kind" param.
2123         (dump_dec): Likewise.
2124         (dump_finish): Use TDF_NONE rather than 0.
2125         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2126         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
2127         than 0.  Update for change to option_ptr.
2128         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2129         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
2130         0.  Update for changes to optinfo_verbosity_options and
2131         optgroup_options.
2132         (opt_info_switch_p): Convert optgroup_flags from int to
2133         optgroup_flags_t.
2134         (dump_basic_block): Use dump_flags_t rather than int
2135         for "dump_kind" param.
2136         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2137         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2138         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2139         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2140         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2141         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2142         TDF_NONE): Convert from macros to...
2143         (enum dump_flag): ...this new enum.
2144         (dump_flags_t): Update to use enum.
2145         (operator|, operator&, operator~, operator|=, operator&=):
2146         Implement for dump_flags_t.
2147         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2148         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2149         Convert from macros to...
2150         (enum optgroup_flag): ...this new enum.
2151         (optgroup_flags_t): New typedef.
2152         (operator|, operator|=): Implement for optgroup_flags_t.
2153         (struct dump_file_info): Convert field "alt_flags" to
2154         dump_flags_t.  Convert field "optgroup_flags" to
2155         optgroup_flags_t.
2156         (dump_basic_block): Use dump_flags_t rather than int for param.
2157         (dump_generic_expr_loc): Likewise.
2158         (dump_dec): Likewise.
2159         (dump_register): Convert param "optgroup_flags" to
2160         optgroup_flags_t.
2161         (opt_info_enable_passes): Likewise.
2162         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2163         than 0.
2164         * gimple-pretty-print.c (debug): Likewise.
2165         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2166         (merged_store_group::apply_stores): Likewise.
2167         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2168         * gimple.c (verify_gimple_pp): Likewise.
2169         * graphite-poly.c (print_pbb_body): Likewise.
2170         * passes.c (pass_manager::register_one_dump_file): Convert
2171         local "optgroup_flags" to optgroup_flags_t.
2172         * print-tree.c (print_node): Use TDF_NONE rather than 0.
2173         (debug): Likewise.
2174         (debug_body): Likewise.
2175         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2176         to optgroup_flags_t.
2177         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2178         than 0.
2179         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2180         (convert_mult_to_fma): Likewise.
2181         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2182         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2183         * tree-vect-data-refs.c (dump_lower_bound): Convert param
2184         "dump_kind" to dump_flags_t.
2186 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2188         * config/rs6000/rs6000.c (min, max): Delete.
2190 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2192         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2193         -mabi=spe and -mabi=no-spe.
2195 2018-06-08  Martin Liska  <mliska@suse.cz>
2197         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2198         where we expect an existing summary.
2200 2018-06-08  Martin Liska  <mliska@suse.cz>
2202         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2203         * ipa-inline.h (estimate_edge_growth): Likewise.
2205 2018-06-08  Martin Liska  <mliska@suse.cz>
2207         * cgraph.c (function_version_hasher::hash): Use
2208         cgraph_node::get_uid ().
2209         (function_version_hasher::equal):
2210         * cgraph.h (cgraph_node::get_uid): New method.
2211         * ipa-inline.c (update_caller_keys): Use
2212         cgraph_node::get_uid ().
2213         (update_callee_keys): Likewise.
2214         * ipa-utils.c (searchc): Likewise.
2215         (ipa_reduced_postorder): Likewise.
2216         * lto-cgraph.c (input_node): Likewise.
2217         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2218         * symbol-summary.h (symtab_insertion): Likewise.
2219         (symtab_removal): Likewise.
2220         (symtab_duplication): Likewise.
2221         * tree-pretty-print.c (dump_function_header): Likewise.
2222         * tree-sra.c (convert_callers_for_node): Likewise.
2224 2018-06-08  Martin Liska  <mliska@suse.cz>
2226         * cgraph.c (symbol_table::create_edge): Always assign a new
2227         unique number.
2228         (symbol_table::free_edge): Do not recycle numbers.
2229         * cgraph.h (cgraph_edge::get): New method.
2230         * symbol-summary.h (symtab_removal): Use it.
2231         (symtab_duplication): Likewise.
2232         (call_summary::hashable_uid): Remove.
2234 2018-06-08  Martin Liska  <mliska@suse.cz>
2236         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2237         (initialize_growth_caches): Remove.
2238         (free_growth_caches): Likewise.
2239         (do_estimate_edge_time): Use edge_growth_cache.
2240         (do_estimate_edge_size): Likewise.
2241         (do_estimate_edge_hints): Likewise.
2242         * ipa-inline.c (reset_edge_caches): Likewise.
2243         (recursive_inlining): Likewise.
2244         (inline_small_functions): Likewise.
2245         * ipa-inline.h (initialize_growth_caches): Remove.
2246         (estimate_edge_size): Likewise.
2247         (estimate_edge_time): Likewise.
2248         (estimate_edge_hints): Likewise.
2249         (reset_edge_growth_cache): Likewise.
2250         * symbol-summary.h (call_summary::remove): New method.
2252 2018-06-08  Martin Liska  <mliska@suse.cz>
2254         * ipa-cp.c (class edge_clone_summary): New summary.
2255         (grow_edge_clone_vectors): Remove.
2256         (ipcp_edge_duplication_hook): Remove.
2257         (class edge_clone_summary_t): New call_summary class.
2258         (ipcp_edge_removal_hook): Remove.
2259         (edge_clone_summary_t::duplicate): New function.
2260         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2261         (create_specialized_node): Likewise.
2262         (ipcp_driver): Initialize edge_clone_summaries and do not
2263         register hooks.
2265 2018-06-08  Martin Liska  <mliska@suse.cz>
2267         * symbol-summary.h (get): New function.
2268         (call_summary::m_initialize_when_cloning): New class member.
2270 2018-06-08  Martin Liska  <mliska@suse.cz>
2272         * cgraph.c (cgraph_node::remove): Do not recycle uid.
2273         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2274         (symbol_table::allocate_cgraph_symbol): Do not set uid.
2275         * passes.c (uid_hash_t): Record removed_nodes by their uids.
2276         (remove_cgraph_node_from_order): Use the removed_nodes set.
2277         (do_per_function_toporder): Likwise.
2278         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2279         instead of summary_uid.
2280         (symtab_removal): Likewise.
2281         (symtab_duplication): Likewise.
2283 2018-06-08  Martin Liska  <mliska@suse.cz>
2285         * ipa-cp.c (ipcp_store_bits_results): Use
2286         ipcp_transformation_sum.
2287         (ipcp_store_vr_results): Likewise.
2288         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2289         to ...
2290         (ipcp_transformation_initialize): ... this.
2291         (ipa_set_node_agg_value_chain):
2292         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2293         (write_ipcp_transformation_info): Likewise.
2294         (read_ipcp_transformation_info): Likewise.
2295         (ipcp_update_bits): Likewise.
2296         (ipcp_update_vr): Likewise.
2297         (ipcp_transform_function): Likewise.
2298         * ipa-prop.h: Rename ipcp_transformation_summary to
2299         ipcp_transformation.
2300         (class ipcp_transformation_t): New function summary.
2301         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2302         (ipa_get_agg_replacements_for_node): Likewise.
2304 2018-06-08  Martin Liska  <mliska@suse.cz>
2306         * ipa-pure-const.c (struct funct_state_d): Do it class instead
2307         of struct.
2308         (class funct_state_summary_t): New function_summary class.
2309         (has_function_state): Remove.
2310         (get_function_state): Likewise.
2311         (set_function_state): Likewise.
2312         (add_new_function): Likewise.
2313         (funct_state_summary_t::insert): New function.
2314         (duplicate_node_data): Remove.
2315         (remove_node_data): Remove.
2316         (funct_state_summary_t::duplicate): New function.
2317         (register_hooks): Create new funct_state_summaries.
2318         (pure_const_generate_summary): Use it.
2319         (pure_const_write_summary): Likewise.
2320         (pure_const_read_summary): Likewise.
2321         (propagate_pure_const): Likewise.
2322         (propagate_nothrow): Likewise.
2323         (dump_malloc_lattice): Likewise.
2324         (propagate_malloc): Likewise.
2325         (execute): Do not register hooks, just remove summary
2326         instead.
2327         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2328         constructor.
2330 2018-06-08  Martin Liska  <mliska@suse.cz>
2332         * ipa-reference.c (remove_node_data): Remove.
2333         (duplicate_node_data): Likewise.
2334         (class ipa_ref_var_info_summary_t): New class.
2335         (class ipa_ref_opt_summary_t): Likewise.
2336         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2337         (get_reference_optimization_summary): Use
2338         ipa_ref_opt_sum_summaries.
2339         (set_reference_vars_info): Remove.
2340         (set_reference_optimization_summary): Likewise.
2341         (ipa_init): Create summaries.
2342         (init_function_info): Use function summary.
2343         (ipa_ref_opt_summary_t::duplicate): New function.
2344         (ipa_ref_opt_summary_t::remove): New function.
2345         (get_read_write_all_from_node): Fix GNU coding style.
2346         (propagate): Use function summary.
2347         (write_node_summary_p): Fix GNU coding style.
2348         (stream_out_bitmap): Likewise.
2349         (ipa_reference_read_optimization_summary): Use function summary.
2350         (ipa_reference_c_finalize): Do not release hooks.
2352 2018-06-08  Martin Liska  <mliska@suse.cz>
2354         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2355         (analyze_function_body): Extract multiple calls of get_create.
2356         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2357         * ipa-inline.c (recursive_inlining): Use ::get method.
2358         * ipa-inline.h (estimate_edge_growth): Likewise.
2360 2018-06-08  Martin Liska  <mliska@suse.cz>
2362         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2363         HSA_INVALID.
2364         (hsa_function_summary::hsa_function_summary): Use the new enum
2365         value.
2366         (hsa_gpu_implementation_p): Use hsa_summaries::get.
2367         * hsa-gen.c (hsa_get_host_function): Likewise.
2368         (get_brig_function_name): Likewise.
2369         * ipa-hsa.c (process_hsa_functions): Likewise.
2370         (ipa_hsa_write_summary): Likewise.
2371         * symbol-summary.h (symtab_duplication): Use ::get function/
2372         (get): New function.
2374 2018-06-08  Martin Liska  <mliska@suse.cz>
2376         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2377         of get.
2378         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2379         (hsa_register_kernel): Likewise.
2380         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2381         * hsa-gen.c (hsa_get_host_function): Likewise.
2382         (get_brig_function_name): Likewise.
2383         (generate_hsa): Likewise.
2384         (pass_gen_hsail::execute): Likewise.
2385         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2386         (devirtualization_time_bonus): Likewise.
2387         (ipcp_propagate_stage): Likewise.
2388         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2389         (edge_set_predicate): Likewise.
2390         (evaluate_conditions_for_known_args): Likewise.
2391         (evaluate_properties_for_edge): Likewise.
2392         (ipa_fn_summary::reset): Likewise.
2393         (ipa_fn_summary_t::duplicate): Likewise.
2394         (dump_ipa_call_summary): Likewise.
2395         (ipa_dump_fn_summary): Likewise.
2396         (analyze_function_body): Likewise.
2397         (compute_fn_summary): Likewise.
2398         (estimate_edge_devirt_benefit): Likewise.
2399         (estimate_edge_size_and_time): Likewise.
2400         (estimate_calls_size_and_time): Likewise.
2401         (estimate_node_size_and_time): Likewise.
2402         (inline_update_callee_summaries): Likewise.
2403         (remap_edge_change_prob): Likewise.
2404         (remap_edge_summaries): Likewise.
2405         (ipa_merge_fn_summary_after_inlining): Likewise.
2406         (ipa_update_overall_fn_summary): Likewise.
2407         (read_ipa_call_summary): Likewise.
2408         (inline_read_section): Likewise.
2409         (write_ipa_call_summary): Likewise.
2410         (ipa_fn_summary_write): Likewise.
2411         (ipa_free_fn_summary): Likewise.
2412         * ipa-hsa.c (process_hsa_functions): Likewise.
2413         (ipa_hsa_write_summary): Likewise.
2414         (ipa_hsa_read_section): Likewise.
2415         * ipa-icf.c (sem_function::merge): Likewise.
2416         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2417         (do_estimate_edge_time): Likewise.
2418         (estimate_size_after_inlining): Likewise.
2419         (estimate_growth): Likewise.
2420         (growth_likely_positive): Likewise.
2421         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2422         (inline_call): Likewise.
2423         * ipa-inline.c (caller_growth_limits): Likewise.
2424         (can_inline_edge_p): Likewise.
2425         (can_inline_edge_by_limits_p): Likewise.
2426         (compute_uninlined_call_time): Likewise.
2427         (compute_inlined_call_time): Likewise.
2428         (want_inline_small_function_p): Likewise.
2429         (edge_badness): Likewise.
2430         (update_caller_keys): Likewise.
2431         (update_callee_keys): Likewise.
2432         (recursive_inlining): Likewise.
2433         (inline_small_functions): Likewise.
2434         (inline_to_all_callers_1): Likewise.
2435         (dump_overall_stats): Likewise.
2436         (early_inline_small_functions): Likewise.
2437         (early_inliner): Likewise.
2438         * ipa-inline.h (estimate_edge_growth): Likewise.
2439         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2440         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2441         * ipa-prop.h (IPA_NODE_REF): Likewise.
2442         (IPA_EDGE_REF): Likewise.
2443         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2444         (propagate_malloc): Likewise.
2445         * ipa-split.c (execute_split_functions): Likewise.
2446         * symbol-summary.h: Rename get to get_create.
2447         (get): Likewise.
2448         (get_create): Likewise.
2449         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2451 2018-06-08  Martin Liska  <mliska@suse.cz>
2453         * symbol-summary.h (release): Move definition out of class
2454         declaration.
2455         (symtab_removal): Likewise.
2456         (symtab_duplication): Likewise.
2458 2018-06-08  Martin Liska  <mliska@suse.cz>
2460         * symbol-summary.h (function_summary): Move constructor
2461         implementation out of class declaration.
2462         (release): Likewise.
2463         (symtab_insertion): Likewise.
2464         (symtab_removal): Likewise.
2465         (symtab_duplication): Likewise.
2466         (get): Likewise.
2468 2018-06-08  Martin Liska  <mliska@suse.cz>
2470         * Makefile.in: Remove support for MPX (macros, related functions,
2471         fields in cgraph_node, ...).
2472         * builtin-types.def (BT_BND): Likewise.
2473         (BT_FN_BND_CONST_PTR): Likewise.
2474         (BT_FN_CONST_PTR_BND): Likewise.
2475         (BT_FN_VOID_PTR_BND): Likewise.
2476         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2477         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2478         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2479         (expand_builtin_mempcpy_with_bounds): Likewise.
2480         (expand_builtin_memset_with_bounds): Likewise.
2481         (expand_builtin_memset_args): Likewise.
2482         (std_expand_builtin_va_start): Likewise.
2483         (expand_builtin): Likewise.
2484         (expand_builtin_with_bounds): Likewise.
2485         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2486         (DEF_LIB_BUILTIN_CHKP): Likewise.
2487         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2488         (DEF_CHKP_BUILTIN): Likewise.
2489         (BUILT_IN_MEMCPY): Likewise.
2490         (BUILT_IN_MEMMOVE): Likewise.
2491         (BUILT_IN_MEMPCPY): Likewise.
2492         (BUILT_IN_MEMSET): Likewise.
2493         (BUILT_IN_STPCPY): Likewise.
2494         (BUILT_IN_STRCAT): Likewise.
2495         (BUILT_IN_STRCHR): Likewise.
2496         (BUILT_IN_STRCPY): Likewise.
2497         (BUILT_IN_STRLEN): Likewise.
2498         (BUILT_IN_MEMCPY_CHK): Likewise.
2499         (BUILT_IN_MEMMOVE_CHK): Likewise.
2500         (BUILT_IN_MEMPCPY_CHK): Likewise.
2501         (BUILT_IN_MEMSET_CHK): Likewise.
2502         (BUILT_IN_STPCPY_CHK): Likewise.
2503         (BUILT_IN_STRCAT_CHK): Likewise.
2504         (BUILT_IN_STRCPY_CHK): Likewise.
2505         * calls.c (store_bounds): Likewise.
2506         (emit_call_1): Likewise.
2507         (special_function_p): Likewise.
2508         (maybe_warn_nonstring_arg): Likewise.
2509         (initialize_argument_information): Likewise.
2510         (finalize_must_preallocate): Likewise.
2511         (compute_argument_addresses): Likewise.
2512         (expand_call): Likewise.
2513         * cfgexpand.c (expand_call_stmt): Likewise.
2514         (expand_return): Likewise.
2515         (expand_gimple_stmt_1): Likewise.
2516         (pass_expand::execute): Likewise.
2517         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2518         (cgraph_node::remove): Likewise.
2519         (cgraph_node::dump): Likewise.
2520         (cgraph_node::verify_node): Likewise.
2521         * cgraph.h (chkp_function_instrumented_p): Likewise.
2522         (symtab_node::get_alias_target): Likewise.
2523         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2524         (cgraph_local_p): Likewise.
2525         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2526         (cgraph_edge::rebuild_references): Likewise.
2527         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2528         (walk_polymorphic_call_targets): Likewise.
2529         (cgraph_node::expand_thunk): Likewise.
2530         (symbol_table::output_weakrefs): Likewise.
2531         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2532         (ix86_handle_option): Likewise.
2533         * config/i386/constraints.md: Likewise.
2534         * config/i386/i386-builtin-types.def (BND): Likewise.
2535         (VOID): Likewise.
2536         (PVOID): Likewise.
2537         (ULONG): Likewise.
2538         * config/i386/i386-builtin.def (BDESC_END): Likewise.
2539         (BDESC_FIRST): Likewise.
2540         (BDESC): Likewise.
2541         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2542         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2543         * config/i386/i386.c (enum reg_class): Likewise.
2544         (ix86_target_string): Likewise.
2545         (ix86_option_override_internal): Likewise.
2546         (ix86_conditional_register_usage): Likewise.
2547         (ix86_valid_target_attribute_inner_p): Likewise.
2548         (ix86_set_indirect_branch_type): Likewise.
2549         (ix86_set_current_function): Likewise.
2550         (ix86_function_arg_regno_p): Likewise.
2551         (init_cumulative_args): Likewise.
2552         (ix86_function_arg_advance): Likewise.
2553         (ix86_function_arg): Likewise.
2554         (ix86_pass_by_reference): Likewise.
2555         (ix86_function_value_regno_p): Likewise.
2556         (ix86_function_value_1): Likewise.
2557         (ix86_function_value_bounds): Likewise.
2558         (ix86_return_in_memory): Likewise.
2559         (ix86_setup_incoming_vararg_bounds): Likewise.
2560         (ix86_va_start): Likewise.
2561         (indirect_thunk_need_prefix): Likewise.
2562         (print_reg): Likewise.
2563         (ix86_print_operand): Likewise.
2564         (ix86_expand_call): Likewise.
2565         (ix86_output_function_return): Likewise.
2566         (reg_encoded_number): Likewise.
2567         (BDESC_VERIFYS): Likewise.
2568         (ix86_init_mpx_builtins): Likewise.
2569         (ix86_init_builtins): Likewise.
2570         (ix86_emit_cmove): Likewise.
2571         (ix86_emit_move_max): Likewise.
2572         (ix86_expand_builtin): Likewise.
2573         (ix86_builtin_mpx_function): Likewise.
2574         (ix86_get_arg_address_for_bt): Likewise.
2575         (ix86_load_bounds): Likewise.
2576         (ix86_store_bounds): Likewise.
2577         (ix86_load_returned_bounds): Likewise.
2578         (ix86_store_returned_bounds): Likewise.
2579         (ix86_class_likely_spilled_p): Likewise.
2580         (ix86_hard_regno_mode_ok): Likewise.
2581         (x86_order_regs_for_local_alloc): Likewise.
2582         (ix86_mitigate_rop): Likewise.
2583         (ix86_bnd_prefixed_insn_p): Likewise.
2584         (ix86_mpx_bound_mode): Likewise.
2585         (ix86_make_bounds_constant): Likewise.
2586         (ix86_initialize_bounds): Likewise.
2587         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2588         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2589         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2590         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2591         (TARGET_CHKP_BOUND_MODE): Likewise.
2592         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2593         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2594         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2595         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2596         * config/i386/i386.h (TARGET_MPX): Likewise.
2597         (TARGET_MPX_P): Likewise.
2598         (VALID_BND_REG_MODE): Likewise.
2599         (FIRST_BND_REG): Likewise.
2600         (LAST_BND_REG): Likewise.
2601         (enum reg_class): Likewise.
2602         (BND_REG_P): Likewise.
2603         (BND_REGNO_P): Likewise.
2604         (BNDmode): Likewise.
2605         (ADJUST_INSN_LENGTH): Likewise.
2606         * config/i386/i386.md: Likewise.
2607         * config/i386/i386.opt: Likewise.
2608         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2609         (defined): Likewise.
2610         (LINK_MPX): Likewise.
2611         (MPX_SPEC): Likewise.
2612         (LIBMPX_SPEC): Likewise.
2613         (LIBMPXWRAPPERS_SPEC): Likewise.
2614         (CHKP_SPEC): Likewise.
2615         * config/i386/predicates.md: Likewise.
2616         * dbxout.c (dbxout_type): Likewise.
2617         * doc/extend.texi: Likewise.
2618         * doc/invoke.texi: Likewise.
2619         * doc/md.texi: Likewise.
2620         * doc/tm.texi: Likewise.
2621         * doc/tm.texi.in: Likewise.
2622         * dwarf2out.c (is_base_type): Likewise.
2623         (gen_formal_types_die): Likewise.
2624         (gen_subprogram_die): Likewise.
2625         (gen_type_die_with_usage): Likewise.
2626         (gen_decl_die): Likewise.
2627         (dwarf2out_late_global_decl): Likewise.
2628         * expr.c (expand_assignment): Likewise.
2629         (emit_storent_insn): Likewise.
2630         (store_expr_with_bounds): Likewise.
2631         (store_expr): Likewise.
2632         (expand_expr_real_1): Likewise.
2633         * expr.h (store_expr_with_bounds): Likewise.
2634         * function.c (use_register_for_decl): Likewise.
2635         (struct bounds_parm_data): Likewise.
2636         (assign_parms_augmented_arg_list): Likewise.
2637         (assign_parm_find_entry_rtl): Likewise.
2638         (assign_parm_is_stack_parm): Likewise.
2639         (assign_parm_load_bounds): Likewise.
2640         (assign_bounds): Likewise.
2641         (assign_parms): Likewise.
2642         (expand_function_start): Likewise.
2643         * gcc.c (CHKP_SPEC): Likewise.
2644         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2645         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2646         (wrestrict_dom_walker::check_call): Likewise.
2647         * gimple.c (gimple_build_call_from_tree): Likewise.
2648         * gimple.h (enum gf_mask): Likewise.
2649         (gimple_call_with_bounds_p): Likewise.
2650         (gimple_call_set_with_bounds): Likewise.
2651         * gimplify.c (gimplify_init_constructor): Likewise.
2652         * ipa-cp.c (initialize_node_lattices): Likewise.
2653         (propagate_constants_across_call): Likewise.
2654         (find_more_scalar_values_for_callers_subset): Likewise.
2655         * ipa-hsa.c (process_hsa_functions): Likewise.
2656         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2657         * ipa-icf.c (sem_function::merge): Likewise.
2658         * ipa-inline.c (early_inliner): Likewise.
2659         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2660         (warn_function_cold): Likewise.
2661         (propagate_pure_const): Likewise.
2662         * ipa-ref.h (enum GTY): Likewise.
2663         * ipa-split.c (find_retbnd): Likewise.
2664         (consider_split): Likewise.
2665         (split_function): Likewise.
2666         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2667         * ipa.c (walk_polymorphic_call_targets): Likewise.
2668         (symbol_table::remove_unreachable_nodes): Likewise.
2669         (process_references): Likewise.
2670         (cgraph_build_static_cdtor_1): Likewise.
2671         * lto-cgraph.c (lto_output_node): Likewise.
2672         (output_refs): Likewise.
2673         (compute_ltrans_boundary): Likewise.
2674         (input_overwrite_node): Likewise.
2675         (input_node): Likewise.
2676         (input_cgraph_1): Likewise.
2677         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2678         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2679         (class pass_chkp_instrumentation_passes): Likewise.
2680         (make_pass_chkp_instrumentation_passes): Likewise.
2681         * passes.def: Likewise.
2682         * rtl.h (struct GTY): Likewise.
2683         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2684         * stor-layout.c (layout_type): Likewise.
2685         * symtab.c: Likewise.
2686         * target.def: Likewise.
2687         * targhooks.c (default_chkp_bound_type): Likewise.
2688         (default_chkp_bound_mode): Likewise.
2689         (default_builtin_chkp_function): Likewise.
2690         (default_chkp_function_value_bounds): Likewise.
2691         (default_chkp_make_bounds_constant): Likewise.
2692         (default_chkp_initialize_bounds): Likewise.
2693         * targhooks.h (default_chkp_bound_type): Likewise.
2694         (default_chkp_bound_mode): Likewise.
2695         (default_builtin_chkp_function): Likewise.
2696         (default_chkp_function_value_bounds): Likewise.
2697         (default_chkp_make_bounds_constant): Likewise.
2698         (default_chkp_initialize_bounds): Likewise.
2699         * toplev.c (compile_file): Likewise.
2700         (process_options): Likewise.
2701         * tree-core.h (DEF_BUILTIN): Likewise.
2702         (DEF_BUILTIN_CHKP): Likewise.
2703         * tree-inline.c (declare_return_variable): Likewise.
2704         (remap_gimple_stmt): Likewise.
2705         (copy_bb): Likewise.
2706         (initialize_inlined_parameters): Likewise.
2707         (expand_call_inline): Likewise.
2708         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2709         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2710         (make_pass_ipa_chkp_produce_thunks): Likewise.
2711         (make_pass_chkp): Likewise.
2712         (make_pass_chkp_opt): Likewise.
2713         (make_pass_chkp_instrumentation_passes): Likewise.
2714         * tree-pretty-print.c (dump_generic_node): Likewise.
2715         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2716         * tree-ssa-dce.c (propagate_necessity): Likewise.
2717         (eliminate_unnecessary_stmts): Likewise.
2718         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2719         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2720         * tree-ssa-sccvn.h: Likewise.
2721         * tree-ssa-strlen.c (get_string_length): Likewise.
2722         (valid_builtin_call): Likewise.
2723         (adjust_last_stmt): Likewise.
2724         (handle_builtin_strchr): Likewise.
2725         (handle_builtin_strcpy): Likewise.
2726         (handle_builtin_stxncpy): Likewise.
2727         (handle_builtin_memcpy): Likewise.
2728         (handle_builtin_strcat): Likewise.
2729         (strlen_check_and_optimize_stmt): Likewise.
2730         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2731         * tree-streamer-in.c: Likewise.
2732         * tree-streamer.c (record_common_node): Likewise.
2733         * tree.c (tree_code_size): Likewise.
2734         (wide_int_to_tree_1): Likewise.
2735         (type_contains_placeholder_1): Likewise.
2736         (build_common_tree_nodes): Likewise.
2737         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2738         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2739         (POINTER_BOUNDS_P): Likewise.
2740         (BOUNDED_TYPE_P): Likewise.
2741         (BOUNDED_P): Likewise.
2742         (CALL_WITH_BOUNDS_P): Likewise.
2743         (pointer_bounds_type_node): Likewise.
2744         * value-prof.c (gimple_ic): Likewise.
2745         * var-tracking.c (vt_add_function_parameters): Likewise.
2746         * varasm.c (make_decl_rtl): Likewise.
2747         (assemble_start_function): Likewise.
2748         (output_constant): Likewise.
2749         (maybe_assemble_visibility): Likewise.
2750         * varpool.c (ctor_for_folding): Likewise.
2751         * chkp-builtins.def: Remove.
2752         * ipa-chkp.c: Remove.
2753         * ipa-chkp.h: Remove.
2754         * rtl-chkp.c: Remove.
2755         * rtl-chkp.h: Remove.
2756         * tree-chkp-opt.c: Remove.
2757         * tree-chkp.c: Remove.
2758         * tree-chkp.h: Remove.
2760 2018-06-07  Carl Love  <cel@us.ibm.com>
2762         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2763         vextract_fp_from_shortl): Add BE support.
2765 2018-06-07  Paul Koning  <ni1d@arrl.net>
2767         * compare-elim.c (try_merge_compare): Don't merge compare if
2768         address contains a side effect.
2769         (try_eliminate_compare): Likewise.
2771 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2773         * config.gcc: Support "tremont".
2774         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2775         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2776         PROCESSOR_TREMONT.
2777         * config/i386/i386.c (m_TREMONT): Define.
2778         (processor_target_table): Add "tremont".
2779         (PTA_TREMONT): Define.
2780         (ix86_lea_outperforms): Add TARGET_TREMONT.
2781         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2782         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2783         and M_INTEL_GOLDMONT_PLUS.
2784         (fold_builtin_cpu): Add "tremont".
2785         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2786         (ix86_option_override_internal): Add "tremont".
2787         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2788         (processor_type): Add PROCESSOR_TREMONT.
2789         * config/i386/x86-tune.def: Add m_TREMONT.
2790         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2792 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2794         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2795         symbol defined for msp430i* devices to be lower case.
2797         gcc/testsuite/gcc.target/msp430/
2798         * msp430i-device-symbol.c: New test.
2799         * msp430f-device-symbol.c: New test.
2800         * msp430.h: New test header file.
2802 2018-06-07  Richard Biener  <rguenther@suse.de>
2804         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2805         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2806         Properly wrap signed arithmetic if overflow wraps.
2808 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2810         PR tree-optimization/69615
2811         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2812         of a cast from a same precision integral SSA_NAME in a bb dominated
2813         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2814         cast to utype if rhs2 has already a compatible type.
2816 2018-06-07  Richard Biener  <rguenther@suse.de>
2818         PR tree-optimization/85935
2819         * graphite-scop-detection.c (find_params_in_bb): Analyze
2820         condition operands with respect to the correct loop.  Assert
2821         the analysis doesn't fail.
2823 2018-06-04  Carl Love  <cel@us.ibm.com>
2825         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2826         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2827         as it is slightly cheaper.
2828         (first_match_or_eos_index_<mode>):
2829         Calculate index using natural element order.
2830         (first_match_index_<mode>):
2831         Calculate index using natural element order.
2832         (first_match_or_eos_index_<mode>):
2833         Calculate index using natural order.
2834         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2835         for BE and LE modes.
2836         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2837         P9V_BUILTIN_VCLZLSBB_V16QI.
2838         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2839         specific.
2841 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2843         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2844         indentation and line wrap for many prototypes.  Add missing
2845         @smallexample directives around block of prototypes for vec_xl and
2846         vec_xst.
2848 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2850         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2851         track if we pass or return IEEE 128-bit floating point.
2852         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2853         C++ mangling that is compatible with GCC 8.1.
2854         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2855         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2856         floating point types.
2857         (rs6000_function_arg_advance_1): Likewise.
2858         (rs6000_mangle_type): Optionally generate mangled names that match
2859         what GCC 8.1 generated for IEEE 128-bit floating point types.
2860         (rs6000_globalize_decl_name): If we have an external function that
2861         passes or returns IEEE 128-bit types, generate a weak reference
2862         from the mangled name used in GCC 8.1 to the current mangled
2863         name.
2864         (rs6000_init_builtins): Make __ibm128 use the long double type if
2865         long double is IBM extended double.  Make __float128 use the long
2866         double type if long double is IEEE 128-bit.
2868         PR target/85657
2869         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2870         macro for __ibm128 built-in functions.
2871         (PACK_IF): Add __ibm128 pack/unpack functions.
2872         (UNPACK_IF): Likewise.
2873         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2874         enable long double built-in functions if long double is IEEE
2875         128-bit floating point.
2876         (rs6000_invalid_builtin): Update long double built-in function
2877         error message.
2878         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2879         functions, adjust the built-in function to use the long double
2880         built-in function if __ibm128 and long double are the same type.
2881         * doc/extend.texi (PowerPC builtins): Update documention for
2882         __builtin_{,un}pack_longdouble.  Add documentation for
2883         __builtin_{,un}pack_ibm128.
2885 2018-06-06  Jim Wilson  <jimw@sifive.com>
2887         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2888         (struct machine_function): New field interrupt_mode.
2889         (riscv_handle_type_attribute): New function.  Add forward declaration.
2890         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2891         (riscv_expand_epilogue): Check interrupt_mode field.
2892         (riscv_set_current_function): Check interrupt attribute args and
2893         set interrupt_mode field.
2894         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2895         (riscv_sret, riscv_uret): New.
2896         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2897         new arguments to interrupt attribute.
2899 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2901         PR target/63177
2902         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2903         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2905 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2907         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2908         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2909         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2910         several redundant entries.
2912 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2914         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2915         type from "rtx" to "rtx_insn *".
2916         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2917         for local "call_insn", removing cast.
2918         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2920 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2922         PR tree-optimization/86066
2923         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2924         for BIT_INSERT_EXPR stores.
2926 2018-06-06  Richard Biener  <rguenther@suse.de>
2928         PR tree-optimization/86062
2929         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2930         component refs ontop
2931         of to be offsetted base.
2933 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2935         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2936         to be static and remove check on interrupt attribute name.
2938         gcc/testsuite/gcc.target/msp430/
2939         * function-attributes-4.c: New test.
2940         * static-interrupts.c: New test.
2942 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2944         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2945         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2947 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2949         PR target/79924
2950         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2951         second argument.
2952         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2953         Remove second argument, change how error is called.
2954         (aarch64_layout_arg): Remove second argument from
2955         aarch64_err_no_fpadvsimd call.
2956         (aarch64_init_cumulative_args): Ditto.
2957         (aarch64_gimplify_va_arg_expr): Ditto.
2958         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2960 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2962         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2963         (*simple_return_indirect_internal<mode>): Rename from
2964         simple_return_indirect_internal.  Use W mode iterator.
2965         (rstorssp): New expander.
2966         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2967         (clrssbsy): New expander.
2968         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2970 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2972         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2973         __typeof__.
2974         (cmse_check_pointed_object): Likewise.
2976 2018-06-05  Martin Liska  <mliska@suse.cz>
2978         PR gcov-profile/47618
2979         * doc/invoke.texi: Document how -fprofile-dir format
2980         is extended.
2982 2018-06-05  Richard Biener  <rguenther@suse.de>
2984         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2985         removal pretend DOM info isn't available so we do not update
2986         it and only remove edges, not dominated blocks.  Actually free
2987         DOM info in case we removed something.  Remove unreachable blocks.
2988         (mfb_keep_latches): Work with either DOM info or marked backedges.
2989         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2990         first.  Mark backedges if DOM info isn't available.
2991         (Re-)compute DOM info after cleanup_control_flow_pre.
2993 2018-06-05  Richard Biener  <rguenther@suse.de>
2995         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2996         (locus_discrim_hasher::hash): Adjust.
2997         (locus_discrim_hasher::equal): Likewise.
2998         (next_discriminator_for_locus): Work on line directly.
2999         (same_line_p): Pass in expanded locus1 as well.
3000         (assign_discriminators): Avoid redundant location expansions.
3002 2018-06-05  Richard Biener  <rguenther@suse.de>
3004         PR tree-optimization/86046
3005         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
3006         if required after clearing TREE_ADDRESSABLE.
3008 2018-06-05  Richard Biener  <rguenther@suse.de>
3010         PR tree-optimization/86047
3011         * tree-ssa-loop.c (for_each_index): Glob handling of all
3012         decls and constants and really handle all of them.
3014 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3016         PR target/81497
3017         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3018         qualifier_void_pointer and qualifier_const_void_pointer.
3019         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3020         (arm_init_builtins): Handle the above.
3021         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3022         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3023         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3024         void intrinsics.
3026 2018-06-05  Martin Liska  <mliska@suse.cz>
3028         * auto-profile.c (read_autofdo_file): Do not use
3029         gcov_ctr_summary struct.
3030         (afdo_callsite_hot_enough_for_early_inline): Likewise.
3031         * coverage.c (struct counts_entry): Likewise.
3032         (read_counts_file): Read just single summary entry.
3033         (get_coverage_counts): Use gcov_summary struct.
3034         * coverage.h (get_coverage_counts): Likewise.
3035         * gcov-dump.c (dump_working_sets): Likewise.
3036         (tag_summary): Dump just single summary.
3037         * gcov-io.c (gcov_write_summary): Write just histogram
3038         summary.
3039         (gcov_read_summary): Read just single summary.
3040         (compute_working_sets): Use gcov_summary struct.
3041         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3042         of GCOV_COUNTERS_SUMMABLE.
3043         (GCOV_COUNTERS_SUMMABLE): Remove.
3044         (GCOV_FIRST_VALUE_COUNTER): Replace with
3045         GCOV_COUNTER_V_INTERVAL.
3046         (struct gcov_ctr_summary): Remove.
3047         (struct gcov_summary): Directly use fields of former
3048         gcov_ctr_summary.
3049         (compute_working_sets): Use gcov_summary struct.
3050         * gcov.c (read_count_file): Do not use ctrs fields.
3051         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3052         struct.
3053         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3054         struct.
3055         * profile.c: Likewise.
3056         * profile.h: Likewise.
3058 2018-06-05  Martin Liska  <mliska@suse.cz>
3060         PR gcov-profile/84846
3061         * gcov.c (output_lines): Print working directory only
3062         in intermediate format.
3064 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
3066         * config/s390/s390-builtin-types.def: Add void function type.
3067         * config/s390/s390-builtins.def: Use the function type for the
3068         tbeginc builtin.
3070 2018-06-04  Jim Wilson  <jimw@sifive.com>
3072         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3073         to int.
3074         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3075         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
3076         handle EH_RETURN_DATA_REGNO registers properly.
3077         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3078         (riscv_expand_epilogue): Update comment.  Change argument name and
3079         type.  Update code to use new name and type.  Pass new args to
3080         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
3081         EXCEPTION_RETURN.
3082         * config/riscv/riscv.md (NORMAL_RETURN): New.
3083         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3084         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3085         (eh_return): Call gen_eh_return_internal and emit barrier.
3086         (eh_return_internal): Call riscv_expand_epilogue.
3088 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
3090         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3091         bit_insertion field and declare can_be_merged_into method.
3092         (merged_store_group::can_be_merged_into): New method.
3093         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3094         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
3095         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3097 2018-06-04  Richard Biener  <rguenther@suse.de>
3099         PR tree-optimization/85955
3100         * builtins.c (fold_builtin_sincos): Convert pointers to
3101         destination to appropriate type before dereferencing.
3103 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
3105         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3107 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
3109         * expr.c (expand_expr_real_1): Force the operand into memory if
3110         its TYPE_MODE is BLKmode and if there is no integer mode for
3111         the number of bits being extracted.
3113 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3115         PR target/85832
3116         PR target/86036
3117         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3118         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3120 2018-06-04  Richard Biener  <rguenther@suse.de>
3122         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3123         (cleanup_tree_cfg_noloop): ... single caller.  Do
3124         start_recording_case_labels later.
3126 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
3128         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3129         to _IMMINTRIN_H_INCLUDED.
3130         * config/i386/pconfigintrin.h: Ditto.
3131         * config/i386/waitpkgintrin.h: Ditto.
3132         * config/i386/immintrin.h: Add includes for sgxintrin.h,
3133         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3134         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3135         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3136         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3137         waitpkgintrin.h and cldemoteintrin.h.
3139 2018-06-04  Richard Biener  <rguenther@suse.de>
3141         PR tree-optimization/86038
3142         * tracer.c (find_best_successor): Check probability for
3143         being initialized, bail out if not.
3145 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
3147         PR target/86003
3148         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3149         of bits to ignore when comparing architectures.
3151 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3153         PR tree-optimization/69615
3154         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3155         maximum or minimum of the type, try to merge it also as if
3156         range1 is + [-, x - 1] or + [x + 1, -].
3158         PR c++/86025
3159         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3161 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
3163         PR tree-optimization/86034
3164         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3165         the unsigned bitfield type in a bit insertion sequence if it does not
3166         have a larger precision than the bitfield size.
3167         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3169 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
3171         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3173 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3175         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3176         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3177         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3178         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3180 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3182         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3183         Disable -fdelete-null-pointer-checks for ELF toolchain.
3185 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3186             Kito Cheng  <kito.cheng@gmail.com>
3188         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3189         (nds32le-*-*, nds32be-*-*): Integrate checking process.
3190         (nds32*-*-*): Add glibc and uclibc conditions.
3191         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3192         (TARGET_EXCEPT_UNWIND_INFO): Define.
3193         * config/nds32/elf.h: New file.
3194         * config/nds32/linux.h: New file.
3195         * config/nds32/nds32-elf.opt: New file.
3196         * config/nds32/nds32-linux.opt: New file.
3197         * config/nds32/nds32-fp-as-gp.c
3198         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3199         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3200         TARGET_LINUX_ABI.
3201         (nds32_asm_file_end): Ditto.
3202         (nds32_print_operand): Ditto.
3203         (nds32_insert_attributes): Ditto.
3204         (nds32_init_libfuncs): New function.
3205         (TARGET_HAVE_TLS): Define.
3206         (TARGET_INIT_LIBFUNCS): Define.
3207         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3208         spec content.
3209         (TARGET_ELF): Apply different mcmodel setting.
3210         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3211         been migrated into elf.h and linux.h files.
3212         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3213         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3214         (mcmodel): The content has been migrated into nds32-elf.opt and
3215         nds32-linux.opt files.
3216         * config/nds32/t-elf: New file.
3217         * config/nds32/t-linux: New file.
3219 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3220             Shiva Chen  <shiva0217@gmail.com>
3222         * config/nds32/constants.md (unspec_volatile_element): Add
3223         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3224         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3225         optimization.
3226         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3227         (make_pass_nds32_fp_as_gp): Declare.
3228         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3229         optmization pass.
3230         (nds32_asm_function_end_prologue): Remove unused asm output.
3231         (nds32_asm_function_begin_epilogue): Remove unused asm output.
3232         (nds32_asm_file_start): Output necessary fp_as_gp information.
3233         (nds32_option_override): Adjust register usage.
3234         (nds32_expand_prologue): Consider fp_as_gp situation.
3235         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3236         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3237         (epilogue): Ditto.
3238         (return): Ditto.
3239         (simple_return): Ditto.
3240         (omit_fp_begin): Output special directive for fp_as_gp.
3241         (omit_fp_end): Output special directive for fp_as_gp.
3242         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3243         mforbid-fp-as-gp): New options.
3245 2018-06-01  Mark Wielaard  <mark@klomp.org>
3247         * dwarf2out.c (dwarf2out_finish): Remove generation of
3248         DW_AT_loclists_base.
3250 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3252         * gimple-ssa-store-merging.c: Include gimple-fold.h.
3253         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3254         (struct merged_store_group): Add bit_insertion field.
3255         (dump_char_array): Use standard hexadecimal format.
3256         (merged_store_group::merged_store_group): Set bit_insertion to false.
3257         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
3258         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
3259         also print the mask in the dump file.
3260         (pass_store_merging::gate): Minor tweak.
3261         (imm_store_chain_info::coalesce_immediate): Fix wrong association
3262         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
3263         stores with INTEGER_CST stores.
3264         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3265         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3266         and use it throughout.  Generate bit insertion sequences if need be.
3267         (pass_store_merging::process_store): Remove redundant condition.
3268         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3270 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
3272         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3273         the 128-bit floating point types.  Fix function comment.
3275 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3277         * config/aarch64/aarch64-simd.md
3278         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3279         mnemonics.
3280         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3281         mnemonics.
3283 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3285         PR tree-optimization/85989
3286         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3287         variable.
3288         (backprop::intersect_uses): Check it when deciding whether this
3289         is a backedge reference.
3290         (backprop::process_block): Add each phi to m_visited_phis
3291         after visiting it, then clear it at the end.
3293 2018-06-01  Richard Biener  <rguenther@suse.de>
3295         * tree-vectorizer.h (vect_dr_stmt): New function.
3296         (vect_get_load_cost): Adjust.
3297         (vect_get_store_cost): Likewise.
3298         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3299         Use vect_dr_stmt instead of DR_SMTT.
3300         (vect_record_base_alignments): Likewise.
3301         (vect_calculate_target_alignment): Likewise.
3302         (vect_compute_data_ref_alignment): Likewise and make static.
3303         (vect_update_misalignment_for_peel): Likewise.
3304         (vect_verify_datarefs_alignment): Likewise.
3305         (vector_alignment_reachable_p): Likewise.
3306         (vect_get_data_access_cost): Likewise.  Pass down
3307         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3308         (vect_get_peeling_costs_all_drs): Likewise.
3309         (vect_peeling_hash_get_lowest_cost): Likewise.
3310         (vect_enhance_data_refs_alignment): Likewise.
3311         (vect_find_same_alignment_drs): Likewise.
3312         (vect_analyze_data_refs_alignment): Likewise.
3313         (vect_analyze_group_access_1): Likewise.
3314         (vect_analyze_group_access): Likewise.
3315         (vect_analyze_data_ref_access): Likewise.
3316         (vect_analyze_data_ref_accesses): Likewise.
3317         (vect_vfa_segment_size): Likewise.
3318         (vect_small_gap_p): Likewise.
3319         (vectorizable_with_step_bound_p): Likewise.
3320         (vect_prune_runtime_alias_test_list): Likewise.
3321         (vect_analyze_data_refs): Likewise.
3322         (vect_supportable_dr_alignment): Likewise.
3323         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3324         (vect_gen_prolog_loop_niters): Likewise.
3325         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3326         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3327         modify DR_STMT.
3328         (vect_recog_mask_conversion_pattern): Likewise.
3329         (vect_try_gather_scatter_pattern): Likewise.
3330         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3331         to vect_get_store_cost.
3332         (vect_get_store_cost): Get stmt_info instead of DR.
3333         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3334         (vect_get_load_cost): Get stmt_info instead of DR.
3336 2018-06-01  Richard Biener  <rguenther@suse.de>
3338         PR middle-end/86017
3339         * gimple-fold.c (var_decl_component_p): Also allow offsetted
3340         vars wrapped in MEM_REFs.
3342 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3344         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3345         Fix subreg tests so that we only return a choice between
3346         GENERAL_REGS and FP_REGS if the original classes included both.
3348 2018-06-01  Richard Biener  <rguenther@suse.de>
3350         PR ipa/85960
3351         * tree-ssa-structalias.c (get_function_part_constraint):
3352         Handle NULL fi->decl.
3353         (find_func_aliases_for_call): Properly handle indirect
3354         fi from direct call.
3355         (find_func_clobbers): Likewise.
3356         (ipa_pta_execute): Likewise.
3357         (create_variable_info_for): For functions that are ifunc_resolver
3358         resolve to a varinfo that contains the result of the resolver call.
3359         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3360         aliases.
3362 2018-05-31  Michael Collison  <michael.collison@arm.com>
3364         * config/aarch64/aarch64.md:
3365         (*fix_to_zero_extenddfdi2): New pattern.
3366         * gcc.target/aarch64/fix_extend1.c: New testcase.
3368 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
3370         PR middle-end/78809
3371         PR middle-end/83026
3372         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3373         and BUILT_IN_STRNCMP_EQ.
3374         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3375         BUILT_IN_STRNCMP_EQ.
3376         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3377         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3378         (gimple_fold_builtin): Likewise.
3379         * tree-ssa-strlen.c (compute_string_length): New function.
3380         (determine_min_obsize): New function.
3381         (handle_builtin_string_cmp): New function to handle calls to
3382         string compare functions.
3383         (strlen_optimize_stmt): Add handling to builtin string compare
3384         calls.
3385         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3386         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3387         * tree.c (build_common_builtin_nodes): Add new defines of
3388         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3390 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
3392         PR target/85984
3393         * bb-reorder.c (pass_partition_blocks::gate): Return false for
3394         functions with naked attribute.
3396 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3398         * config/i386/sse.md (avx_vec_concat<mode>):
3399         Substitute concat_tg_mode mode attribute with xtg_mode.
3400         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3401         (concat_tg_mode): Remove mode attribute.
3403 2018-05-31  Martin Sebor  <msebor@redhat.com>
3405         PR c/82063
3406         * calls.c (alloc_max_size): Correct a logic error/typo.
3407         Treat excessive arguments as infinite.  Warn for invalid arguments.
3408         * doc/invoke.texi (-Walloc-size-larger-than): Update.
3410 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
3412         PR target/85829
3413         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3414         and movx for Haswell.
3416 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
3417             Cesar Philippidis  <cesar@codesourcery.com>
3419         PR middle-end/85879
3420         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3421         when emitting error on private/firstprivate reductions.
3422         * omp-low.c (lower_omp_target): Avoid reference-type processing
3423         on pointers for firstprivate clause.
3425 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3427         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3428         (st1x2): Likewise.
3429         (st1x3): Likewise.
3430         * config/aarch64/aarch64-simd.md
3431         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3432         (aarch64_ld1_x3_<mode>): Likewise
3433         (aarch64_st1x2<VALLDIF:mode>): Likewise
3434         (aarch64_st1_x2_<mode>): Likewise
3435         (aarch64_st1x3<VALLDIF:mode>): Likewise
3436         (aarch64_st1_x3_<mode>): Likewise
3437         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3438         (vld1_s8_x3): Likewise.
3439         (vld1_u16_x3): Likewise.
3440         (vld1_s16_x3): Likewise.
3441         (vld1_u32_x3): Likewise.
3442         (vld1_s32_x3): Likewise.
3443         (vld1_u64_x3): Likewise.
3444         (vld1_s64_x3): Likewise.
3445         (vld1_f16_x3): Likewise.
3446         (vld1_f32_x3): Likewise.
3447         (vld1_f64_x3): Likewise.
3448         (vld1_p8_x3): Likewise.
3449         (vld1_p16_x3): Likewise.
3450         (vld1_p64_x3): Likewise.
3451         (vld1q_u8_x3): Likewise.
3452         (vld1q_s8_x3): Likewise.
3453         (vld1q_u16_x3): Likewise.
3454         (vld1q_s16_x3): Likewise.
3455         (vld1q_u32_x3): Likewise.
3456         (vld1q_s32_x3): Likewise.
3457         (vld1q_u64_x3): Likewise.
3458         (vld1q_s64_x3): Likewise.
3459         (vld1q_f16_x3): Likewise.
3460         (vld1q_f32_x3): Likewise.
3461         (vld1q_f64_x3): Likewise.
3462         (vld1q_p8_x3): Likewise.
3463         (vld1q_p16_x3): Likewise.
3464         (vld1q_p64_x3): Likewise.
3465         (vst1_s64_x2): Likewise.
3466         (vst1_u64_x2): Likewise.
3467         (vst1_f64_x2): Likewise.
3468         (vst1_s8_x2): Likewise.
3469         (vst1_p8_x2): Likewise.
3470         (vst1_s16_x2): Likewise.
3471         (vst1_p16_x2): Likewise.
3472         (vst1_s32_x2): Likewise.
3473         (vst1_u8_x2): Likewise.
3474         (vst1_u16_x2): Likewise.
3475         (vst1_u32_x2): Likewise.
3476         (vst1_f16_x2): Likewise.
3477         (vst1_f32_x2): Likewise.
3478         (vst1_p64_x2): Likewise.
3479         (vst1q_s8_x2): Likewise.
3480         (vst1q_p8_x2): Likewise.
3481         (vst1q_s16_x2): Likewise.
3482         (vst1q_p16_x2): Likewise.
3483         (vst1q_s32_x2): Likewise.
3484         (vst1q_s64_x2): Likewise.
3485         (vst1q_u8_x2): Likewise.
3486         (vst1q_u16_x2): Likewise.
3487         (vst1q_u32_x2): Likewise.
3488         (vst1q_u64_x2): Likewise.
3489         (vst1q_f16_x2): Likewise.
3490         (vst1q_f32_x2): Likewise.
3491         (vst1q_f64_x2): Likewise.
3492         (vst1q_p64_x2): Likewise.
3493         (vst1_s64_x3): Likewise.
3494         (vst1_u64_x3): Likewise.
3495         (vst1_f64_x3): Likewise.
3496         (vst1_s8_x3): Likewise.
3497         (vst1_p8_x3): Likewise.
3498         (vst1_s16_x3): Likewise.
3499         (vst1_p16_x3): Likewise.
3500         (vst1_s32_x3): Likewise.
3501         (vst1_u8_x3): Likewise.
3502         (vst1_u16_x3): Likewise.
3503         (vst1_u32_x3): Likewise.
3504         (vst1_f16_x3): Likewise.
3505         (vst1_f32_x3): Likewise.
3506         (vst1_p64_x3): Likewise.
3507         (vst1q_s8_x3): Likewise.
3508         (vst1q_p8_x3): Likewise.
3509         (vst1q_s16_x3): Likewise.
3510         (vst1q_p16_x3): Likewise.
3511         (vst1q_s32_x3): Likewise.
3512         (vst1q_s64_x3): Likewise.
3513         (vst1q_u8_x3): Likewise.
3514         (vst1q_u16_x3): Likewise.
3515         (vst1q_u32_x3): Likewise.
3516         (vst1q_u64_x3): Likewise.
3517         (vst1q_f16_x3): Likewise.
3518         (vst1q_f32_x3): Likewise.
3519         (vst1q_f64_x3): Likewise.
3520         (vst1q_p64_x3): Likewise.
3522 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3524         * config/msp430/msp430.c (msp430_output_labelref): Prepend
3525         user_label_prefix to name.
3527         * tree-core.h: Update comment about the format of NAME string
3528         passed to handler in attribute_spec.
3530         * config/msp430/msp430.md: Remove erroneous subreg expression from
3531         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3532         zero_extend{q,h}isi2.
3534 2018-05-30  Borislav Petkov  <bp@suse.de>
3536         * doc/extend.texi: Document some architecture specific
3537         constraints and sort entries.
3539 2018-05-30  Martin Sebor  <msebor@redhat.com>
3541         PR middle-end/85369
3542         * builtins.c (expand_builtin_stpcpy_1): New function.
3543         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3544         only if the former succeeds.
3546 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3548         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3549         in saphira.
3551 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3553         * doc/invoke.texi (-flinker-output): Document
3555 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3557         * passes.c (ipa_write_summaries): Only modify statements if body
3558         is in memory.
3559         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3560         incrementally linking.
3561         (ipa_passes): Likewise.
3562         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3563         pass down resolution info.
3564         * common.opt (flag_incremental_link): Update info.
3565         * gcc.c (plugin specs): Turn flinker-output=* to
3566         -plugin-opt=-linker-output-known
3567         * toplev.c (compile_file): Also cut compilation when doing incremental
3568         link.
3569         * flag-types. (enum lto_partition_model): Add
3570         LTO_LINKER_OUTPUT_NOLTOREL.
3571         (invoke.texi): Add -flinker-output docs.
3572         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3573         link same way as WPA; do not stream in dead initializers.
3575         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3576         darf2out_register_external_decl): Support incremental link.
3578 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3580         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3582 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3584         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3585         it down to simple_object_copy_lto_debug_sections.
3586         (run_gcc): Determine incremental LTO link time and configure
3587         lto1 into non-wpa mode, disable renaming of debug sections.
3589 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3591         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3592         descriptions of various incorrectly documented functions.
3594 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3596         Revert:
3597         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3598         address check not strict.
3600 2018-05-30  Richard Biener  <rguenther@suse.de>
3602         PR tree-optimization/85964
3603         * tracer.c (better_p): Drop initialized count check, we only
3604         call the function with initialized counts now.
3605         (find_best_successor): Do find a best edge if one
3606         has uninitialized count.
3607         (find_best_predecessor): Likewise.  Do BB frequency check only
3608         if count is initialized.
3610 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3612         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3613         (aarch64_ldrstr_offset_compare): New.
3614         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3615         load/store orderings.
3616         (aarch64_gen_adjusted_ldpstp): Likewise.
3618 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3620         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3621         Check for subset of GENERAL_REGS and FP_REGS.
3622         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3623         r=w alternative.
3625 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3627         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3628         and wi::to_poly_offset.  Add the current offset and then check
3629         whether the sum fits, rather than using an unchecked addition of
3630         a checked term.  Check for a shwi rather than a uhwi.
3631         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3632         (store_constructor): Use poly_int_tree_p.
3633         (expand_expr_real_1): Likewise.
3634         * function.c (assign_temp): Likewise.
3635         * fold-const.c (const_binop): Use poly_int_tree_p and
3636         wi::to_poly_offset.
3637         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3638         division.
3639         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3640         to_poly_offset for MEM offsets.
3641         * ipa-icf.c (sem_variable::equals): Likewise.
3642         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3643         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3644         wi::to_poly_offset for BIT_FIELD_REF offsets.
3645         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3646         wi::to_poly_offset.
3647         * var-tracking.c (emit_note_insn_var_location): Use
3648         tree_to_poly_uint64.
3650 2018-05-29  Jim Wilson  <jimw@sifive.com>
3652         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3654 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3656         PR target/85950
3657         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3658         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3659         sequence.
3660         (sse4_1_round<mode>2): Use nonimmediate_operand
3661         for operand 1 predicate.
3663 2018-05-29  Martin Sebor  <msebor@redhat.com>
3664             Richard Biener  <rguenther@suse.de>
3666         PR testsuite/85888
3667         * calls.c (get_size_range): Call determine_value_range instead
3668         of get_value_range..
3669         * tree-vrp.h (determine_value_range): Declared new function.
3670         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3672 2018-05-29  Richard Biener  <rguenther@suse.de>
3674         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3675         sure to use non-pattern stmts for get_earlier_stmt arguments.
3676         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3677         called on pattern stmts.
3678         (get_later_stmt): Likewise.
3680 2018-05-29  Martin Liska  <mliska@suse.cz>
3682         PR gcov-profile/85759
3683         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3684         env variables.
3686 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3688         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3689         VEC_UNPACK_*_EXPR.
3690         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3691         VEC_PACK_*_EXPR.
3693         PR target/85918
3694         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3695         VEC_PACK_FLOAT_EXPR): New tree codes.
3696         * tree-pretty-print.c (op_code_prio): Handle
3697         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3698         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3699         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3700         * tree-inline.c (estimate_operator_cost): Likewise.
3701         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3702         * fold-const.c (const_binop): Likewise.
3703         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3704         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3705         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3706         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3707         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3708         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3709         * expr.c (expand_expr_real_2): Likewise.
3710         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3711         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3712         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3713         optabs.
3714         * optabs.c (expand_widen_pattern_expr): For
3715         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3716         sign from result type rather than operand's type.
3717         (expand_binop_directly): For vec_packu_float_optab and
3718         vec_packs_float_optab allow result type to be different from operand's
3719         type.
3720         * optabs-tree.c (optab_for_tree_code): Handle
3721         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3722         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3723         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3724         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3725         VEC_PACK_FLOAT_EXPR.
3726         * tree-vect-stmts.c (supportable_widening_operation): Handle
3727         FIX_TRUNC_EXPR.
3728         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3729         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3730         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3731         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3732         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3733         mode attributes.
3734         (vec_pack<floatprefix>_float_<mode>): New expander.
3735         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3736         attributes.
3737         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3738         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3739         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3740         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3741         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3742         Document.
3743         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3744         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3745         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3746         VEC_PACK_FLOAT_EXPR): Document.
3748 2018-05-29  Richard Biener  <rguenther@suse.de>
3750         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3751         member.
3752         (stmt_vec_info_vec): Make pointer.
3753         (init_stmt_vec_info_vec): Remove.
3754         (free_stmt_vec_info_vec): Likewise.
3755         (set_stmt_vec_info_vec): New function.
3756         (free_stmt_vec_infos): Likewise.
3757         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3758         (set_vinfo_for_stmt): Likewise.
3759         (get_earlier_stmt): Likewise.
3760         (get_later_stmt): Likewise.
3761         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3762         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3763         (vec_info::~vec_info): Free stmt_vec_infos.
3764         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3765         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3766         (pass_slp_vectorize::execute): Likewise.
3767         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3768         (free_stmt_vec_info_vec): Likewise.
3769         (set_stmt_vec_info_vec): New function.
3770         (free_stmt_vec_infos): Likewise.
3771         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3772         the global stmt_vec_info_vec.
3773         * tree-parloops.c (gather_scalar_reductions): Use
3774         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3775         vector.
3777 2018-05-29  Richard Biener  <rguenther@suse.de>
3779         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3781 2018-05-29  Martin Liska  <mliska@suse.cz>
3782             David Malcolm  <dmalcolm@redhat.com>
3784         * vec.c (test_reverse): New.
3785         (vec_c_tests): Add new test.
3786         * vec.h (vl_ptr>::reverse): New function.
3788 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3790         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3792         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3793         and later.
3795 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3797         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3799 2018-05-28  Richard Biener  <rguenther@suse.de>
3801         PR tree-optimization/85933
3802         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3803         look at stmts marked as vectorizable.
3805 2018-05-28  Richard Biener  <rguenther@suse.de>
3807         PR tree-optimization/85934
3808         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3809         vector boolean check before scalar optimization.
3811 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3813         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3814         for armv5te.
3816 2018-05-28  Mark Wielaard  <mark@klomp.org>
3818         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3819         if it is an expression containing a minus sign.
3821 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3823         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3825 2018-05-27  Paul Koning  <ni1d@arrl.net>
3827         * config/pdp11/pdp11.md (truncsihi2): Remove.
3829 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3830             Chung-Ju Wu  <jasonwucj@gmail.com>
3832         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3833         implementation.
3834         (unaligned_store_dw): Ditto.
3835         * config/nds32/nds32-memory-manipulation.c
3836         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3837         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3838         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3839         (emit_setmem_word_loop): Rename to ...
3840         (emit_setmem_doubleword_loop): ... this.
3841         (nds32_gen_dup_4_byte_to_word_value): New function.
3842         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3843         (nds32_expand_setmem_loop): Refine implementation.
3844         (nds32_expand_setmem_loop_v3m): Ditto.
3845         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3846         pattern.
3848 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3850         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3852 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3854         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3855         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3856         machine->attr_no_prologue_p.
3857         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3858         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3859         (nds32_expand_epilogue): Consider attr_naked_p.
3860         (nds32_expand_epilogue_v3pop): Likewise.
3861         (nds32_can_use_return_insn): Likewise.
3862         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3863         attr_no_prologue_p fields.
3864         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3866 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3868         PR target/85918
3869         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3870         attributes.
3871         * config/i386/sse.md
3872         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3873         Rename to ...
3874         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3875         ... this.
3876         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3877         Rename to ...
3878         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3879         ... this.
3880         (*<floatsuffix>floatv2div2sf2): Rename to ...
3881         (*float<floatunssuffix>v2div2sf2): ... this.
3882         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3883         (float<floatunssuffix>v2div2sf2_mask): ... this.
3884         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3885         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3886         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3887         to ...
3888         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3889         ... this.
3890         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3891         Rename to ...
3892         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3893         ... this.
3894         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3895         Rename to ...
3896         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3897         ... this.
3898         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3899         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3900         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3901         gen_ufix_truncv8dfv8si2.
3902         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3903         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3904         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3905         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3906         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3907         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3908         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3909         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3911 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3913         PR target/85900
3914         PR target/85345
3915         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3917 2018-05-25  Jim Wilson  <jimw@sifive.com>
3919         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3920         * config/riscv/riscv.c (struct machine_function): Add
3921         interrupt_handler_p and attribute_checked_p fields.
3922         (riscv_attribute_table): Add interrupt.
3923         (riscv_interrupt_type_p): New.
3924         (riscv_save_reg_p): Save extra regs for interrupt handler.
3925         (riscv_use_save_libcall): Return false  for interrupt handler.
3926         (riscv_first_stack_step): Add forward declaration.
3927         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3928         for interrupt handler with large frame.  Use it for saved reg list.
3929         (riscv_expand_prologue): Move flag_stack_usage_info support to
3930         eliminate duplication.
3931         (riscv_expand_epilogue): Generate mret for interrupt handler.
3932         (riscv_epilogue_uses): New.
3933         (riscv_can_use_return_insn): Return false for interrupt handler.
3934         (riscv_function_ok_for_sibcall): Likewise.
3935         (riscv_set_current_function): Add interrupt handler support.
3936         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3937         * config/riscv/riscv.md (UNSPECV_MRET): New.
3938         (GP_REGNUM): New.
3939         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3940         (riscv_mret): New.
3941         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3943 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3945         PR tree-optimization/85712
3946         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3947         this candidate has already been replaced in-situ by a copy.
3949 2018-05-25  Jason Merrill  <jason@redhat.com>
3951         PR c++/80485 - inline function non-zero address.
3952         * symtab.c (nonzero_address): Check DECL_COMDAT.
3954 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3956         PR target/83628
3957         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3958         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3959         extension of SImode operation.  Use const123_operand predicate.
3960         (*saddsi_1): Remove.
3961         (*saddl_se_1): Ditto.
3962         (*ssubsi_1): Ditto.
3963         (*ssubl_se_1): Ditto.
3964         * config/alpha/predicates.md (const123_operand): New predicate.
3965         * config/alpha/constraints.md (P): Use IN_RANGE.
3967 2018-05-25  Richard Biener  <rguenther@suse.de>
3969         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3970         defaulted to true.
3971         (ref_maybe_used_by_stmt_p): Likewise.
3972         (stmt_may_clobber_ref_p): Likewise.
3973         (stmt_may_clobber_ref_p_1): Likewise.
3974         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3975         and pass it along.
3976         (ref_maybe_used_by_stmt_p): Likewise.
3977         (stmt_may_clobber_ref_p): Likewise.
3978         (stmt_may_clobber_ref_p_1): Likewise.
3979         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3980         the alias oracle to disambiguate DRs with stmts DR analysis
3981         couldn't handle.
3982         (vect_analyze_data_refs): Do not give up on not analyzable
3983         DRs for BB vectorization.  Remove code truncating the dataref
3984         vector.
3986 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3988         PR target/85832
3989         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3990         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3991         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3993 2018-05-25  Richard Biener  <rguenther@suse.de>
3995         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3996         function, combining stmt data ref gathering and fatal analysis
3997         parts.
3998         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3999         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
4000         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
4001         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
4002         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
4004 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4006         PR tree-optimization/85720
4007         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
4008         SCC if all partitions are builtins.
4009         (version_loop_by_alias_check): New parameter.  Generate cancelable
4010         runtime alias check if all partitions are builtins.
4011         (distribute_loop): Update call to above function.
4013 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4015         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
4016         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
4017         (parm_default_def_partition_arg): Ditto.
4018         (set_parm_default_def_partition): Ditto.
4019         (get_parm_default_def_partitions): Ditto and make it static.
4020         (get_undefined_value_partitions): Ditto and make it static.
4021         (remove_ssa_form): Refactor call to init_var_map here.
4022         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
4023         computation for loop region.
4024         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
4025         (register_default_def): Delete.
4026         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
4027         (parm_default_def_partition_arg): Ditto.
4028         (set_parm_default_def_partition): Ditto.
4029         (get_parm_default_def_partitions): Ditto and make it static.
4030         (get_undefined_value_partitions): Ditto and make it static.
4031         (coalesce_with_default, coalesce_with_default): Update comment.
4032         (create_coalesce_list_for_region): New func factored out from
4033         create_outofssa_var_map.
4034         (populate_coalesce_list_for_outofssa): New func factored out from
4035         create_outofssa_var_map and coalesce_ssa_name.
4036         (create_outofssa_var_map): Delete.
4037         (coalesce_ssa_name): Refactor to support live range computation.
4038         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4039         (get_parm_default_def_partitions): Delete.
4040         (get_undefined_value_partitions): Ditto.
4041         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4042         computation for loop region.
4043         (new_tree_live_info, loe_visit_block): Ditto.
4044         (live_worklist, set_var_live_on_entry): Ditto.
4045         (calculate_live_on_exit, verify_live_on_entry): Ditto.
4046         * tree-ssa-live.h (struct _var_map): New fields.
4047         (init_var_map): Change decl.
4048         (region_contains_p): New.
4050 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4052         * tree-ssa-live.h (live_merge_and_clear): Delete.
4054 2018-05-25  Richard Biener  <rguenther@suse.de>
4056         PR c++/85912
4057         * tree-dump.c (dequeue_and_dump): Remove access to removed
4058         operand 2 of a SWITCH_EXPR.
4060 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4062         * doc/sourcebuild.texi (vect_double_cond_arith): Include
4063         multiplication and division.
4064         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4065         (cond_udiv@var{m}, cond_umod@var{m}): Document.
4066         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4067         (cond_udiv_optab, cond_umod_optab): New optabs.
4068         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4069         (IFN_COND_RDIV): New internal functions.
4070         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4071         TRUNC_MOD_EXPR and RDIV_EXPR.
4072         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4073         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4074         New unspecs.
4075         (SVE_INT_BINARY): Include mult.
4076         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4077         (optab, sve_int_op): Handle mult.
4078         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4079         UNSPEC_COND_DIV.
4080         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4081         for SVE_INT_BINARY_SD.
4083 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4085         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4086         (optab, sve_int_op): Handle div and udiv.
4087         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4088         for SVE_INT_BINARY_SD.
4089         (*<optab><mode>3): New insn for the same.
4091 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4093         * tree-vect-patterns.c: Include predict.h.
4094         (vect_recog_divmod_pattern): Restrict check for division support
4095         to when optimizing for size.
4097 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4099         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4100         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4101         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4102         (gimple_match_op::set_op): Likewise.
4103         (gimple_resimplify4): Declare.
4104         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4105         (expr::gen_transform): Likewise.
4106         (decision_tree::gen): Generate a simplification routine for 4 operands.
4107         * gimple-match-head.c (gimple_simplify): Add an overload for
4108         4 operands.  In the top-level function, handle up to 4 call
4109         arguments and call gimple_resimplify4.
4110         (gimple_resimplify4): New function.
4111         (build_call_internal): Pass a fourth operand.
4112         (maybe_push_to_seq): Likewise.
4113         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4114         Fold VEC_COND_EXPRs of an operation and a default value into
4115         an IFN_COND_* function if possible.
4116         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4117         New unspecs.
4118         (SVE_COND_FP_BINARY): Include them.
4119         (optab, sve_fp_op): Handle them.
4120         (SVE_INT_BINARY_REV): New code iterator.
4121         (SVE_COND_FP_BINARY_REV): New int iterator.
4122         (commutative): New int attribute.
4123         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4124         Declare.
4125         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4126         function.
4127         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4128         (*cond_<optab><mode>): New patterns for reversed operands.
4130 2018-05-25  Richard Biener  <rguenther@suse.de>
4132         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4133         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4134         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4135         (STMT_VINFO_GROUPED_ACCESS): Adjust.
4136         * tree-vect-data-refs.c (everywhere): Adjust users.
4137         * tree-vect-loop.c (everywhere): Likewise.
4138         * tree-vect-slp.c (everywhere): Likewise.
4139         * tree-vect-stmts.c (everywhere): Likewise.
4140         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4142 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4144         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4145         Rename to...
4146         (gcc_cv_as_section_exclude): ... this.
4147         Try Solaris as #exclude syntax.
4148         * configure: Regenerate.
4149         * config.in: Regenerate.
4150         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4151         SECTION_EXCLUDE.
4152         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4153         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4155         * varasm.c (default_elf_asm_named_section): Don't check if
4156         HAVE_GAS_SECTION_EXCLUDE is defined.
4158 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4160         * doc/md.texi: Update the documentation of the cond_* optabs
4161         to mention the new final operand.  Fix GET_MODE_NUNITS call.
4162         Describe the scalar case too.
4163         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4164         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4165         instead of 2.
4166         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4167         (get_conditional_internal_fn): Update comment.
4168         * tree-vect-loop.c (vectorizable_reduction): Pass the original
4169         accumulator value as a final argument to conditional functions.
4170         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4171         a define_expand and add an "else" operand.  Assert for now that
4172         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
4173         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4174         (*cond_<optab><mode>): New patterns.
4175         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4176         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4177         (UNSPEC_COND_EOR): Delete.
4178         (optab): Remove associated mappings.
4179         (SVE_INT_BINARY): New code iterator.
4180         (sve_int_op): Remove int attribute and add "minus" to the code
4181         attribute.
4182         (SVE_COND_INT_OP): Delete.
4183         (SVE_COND_FP_OP): Rename to...
4184         (SVE_COND_FP_BINARY): ...this.
4186 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4188         * optabs.c (can_reuse_operands_p): New function.
4189         (maybe_legitimize_operands): Try to reuse the results for
4190         earlier operands.
4192 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4194         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4195         Add {q} suffix to insn mnemonic.
4197 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4199         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4200         (msp430_warn_func_return): New.
4202 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
4204         * fold-const.c (tree_nonzero_bits): New function.
4205         * fold-const.h (tree_nonzero_bits): Likewise.
4206         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4207         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4209 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4211         PR target/85900
4212         PR target/85345
4213         * varasm.c (assemble_alias): Check ifunc_resolver only on
4214         FUNCTION_DECL.
4216 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4218         PR target/85903
4219         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4220         when memory input operand is handled.
4222 2018-05-24  Luis Machado  <luis.machado@linaro.org>
4224         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4225         global.
4226         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4228 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4230         * match.pd: Delay FMA folds until after vectorization.
4232 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4234         PR target/83009
4235         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4236         address check not strict.
4238 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4240         * gimple-match.h (gimple_match_op): New class.
4241         (mprts_hook): Replace parameters with a gimple_match_op *.
4242         (maybe_build_generic_op): Likewise.
4243         (gimple_simplified_result_is_gimple_val): Replace parameters with
4244         a const gimple_match_op *.
4245         (gimple_simplify): Replace code_helper * and tree * parameters with
4246         a gimple_match_op * parameter.
4247         (gimple_resimplify1): Replace code_helper *, tree and tree *
4248         parameters with a gimple_match_op * parameter.
4249         (gimple_resimplify2): Likewise.
4250         (gimple_resimplify3): Likewise.
4251         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4252         parameters with a gimple_match_op * parameter.
4253         * gimple-match-head.c (gimple_simplify): Change prototypes of
4254         auto-generated functions to take a gimple_match_op * instead of
4255         separate code_helper * and tree * parameters.  Make the same
4256         change in the top-level overload and update calls to the
4257         gimple_resimplify routines.  Update calls to the auto-generated
4258         functions and to maybe_push_res_to_seq in the publicly-facing
4259         operation-specific gimple_simplify overloads.
4260         (gimple_match_op::MAX_NUM_OPS): Define.
4261         (gimple_resimplify1): Replace rcode and ops with a single res_op
4262         parameter.  Update call to gimple_simplify.
4263         (gimple_resimplify2): Likewise.
4264         (gimple_resimplify3): Likewise.
4265         (mprts_hook): Replace parameters with a gimple_match_op *.
4266         (maybe_build_generic_op): Likewise.
4267         (build_call_internal): Replace type, nargs and ops with
4268         a gimple_match_op *.
4269         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4270         with a single gimple_match_op *.  Update calls to mprts_hook,
4271         build_call_internal and gimple_simplified_result_is_gimple_val.
4272         Factor out code that is common to the tree_code and combined_fn cases.
4273         * genmatch.c (expr::gen_transform): Replace tem_code and
4274         tem_ops with a gimple_match_op called tem_op.  Update calls
4275         to the gimple_resimplify functions and maybe_push_res_to_seq.
4276         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4277         res_ops.  Update call to the gimple_resimplify functions.
4278         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4279         (decision_tree::gen): Make the functions take a gimple_match_op *
4280         called res_op instead of separate res_code and res_ops parameters.
4281         Update call accordingly.
4282         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4283         and ops with a single res_op parameter.  Update calls to
4284         maybe_build_generic_op and maybe_push_res_to_seq.
4285         (fold_stmt_1): Update calls to gimple_simplify and
4286         replace_stmt_with_simplification.
4287         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4288         and gimple_simplified_result_is_gimple_val.
4289         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4290         gimple_simplify.
4291         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4292         with a gimple_match_op *.
4293         (vn_nary_build_or_lookup): Likewise.  Update call to
4294         vn_nary_build_or_lookup_1.
4295         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4296         gimple_match_op *.  Update calls to the gimple_resimplify routines
4297         and to gimple_simplified_result_is_gimple_val.
4298         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4299         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4300         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4301         (visit_nary_op): Likewise.
4302         (visit_reference_op_load): Likewise.
4304 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4306         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4307         modifier for printing the step amount.
4309 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
4311         PR target/78849
4312         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4313         types.
4315 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
4317         * doc/sourcebuild.texi (Endianness): New subsubsection.
4319 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4321         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4322         <prefetch_dynamic_strides>: New const bool field.
4323         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4324         prefetch_dynamic_strides.
4325         (exynosm1_prefetch_tune): Likewise.
4326         (thunderxt88_prefetch_tune): Likewise.
4327         (thunderx_prefetch_tune): Likewise.
4328         (thunderx2t99_prefetch_tune): Likewise.
4329         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4330         false.
4331         (aarch64_override_options_internal): Update to set
4332         PARAM_PREFETCH_DYNAMIC_STRIDES.
4333         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4334         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4335         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4336         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4337         prefetch-dynamic-strides setting.
4339 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4341         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4342         <minimum_stride>: New const int field.
4343         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4344         minimum_stride field defaulting to -1.
4345         (exynosm1_prefetch_tune): Likewise.
4346         (thunderxt88_prefetch_tune): Likewise.
4347         (thunderx_prefetch_tune): Likewise.
4348         (thunderx2t99_prefetch_tune): Likewise.
4349         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4350         <default_opt_level>: Set to 3.
4351         (aarch64_override_options_internal): Update to set
4352         PARAM_PREFETCH_MINIMUM_STRIDE.
4353         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4354         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4355         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4356         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4357         stride is constant and is below the minimum stride threshold.
4359 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4361         * config/arm/arm-cpus.in (mode26): Delete.
4362         (armv4): Delete mode26 reference.
4363         * config/arm/arm.c (arm_configure_build_target): Delete use of
4364         isa_bit_mode26.
4366 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4368         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4369         New insn pattern.
4370         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4371         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
4372         for non-SSE modes.
4373         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
4374         (floatunsdidf2): Ditto.
4376 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4378         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4379         (fixuns_trunc<mode>si2_avx512f): Ditto.
4380         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4381         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4382         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4384 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4386         PR rtl-optimization/79985
4387         * df-scan.c (df_insn_refs_collect): Remove special case for
4388         global registers and asm statements.
4390 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4392         * extend.texi (Global Register Variables): Rewrite the bullet list.
4393         Note that the register is available for allocation. Note that access
4394         via inline asm must use constraints. Add note about async-signal
4395         handlers. Remove paragraph about automagic register selection.
4397 2018-05-23  Richard Biener  <rguenther@suse.de>
4399         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4400         of fixed offset from memset VN.
4402 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
4404         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4405         first_interp field.
4406         (alloc_cand_and_find_basis): Initialize first_interp field.
4407         (slsr_process_mul): Modify first_interp field.
4408         (slsr_process_add): Likewise.
4409         (slsr_process_cast): Modify first_interp field for each new
4410         interpretation.
4411         (slsr_process_copy): Likewise.
4412         (dump_candidate): Dump first_interp field.
4413         (replace_mult_candidate): Process all interpretations, not just
4414         subsequent ones.
4415         (replace_rhs_if_not_dup): Likewise.
4416         (replace_one_candidate): Likewise.
4418 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
4420         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4421         Add new boolean.
4422         (aarch64_needs_frame_chain): New function.
4423         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4425 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
4427         PR target/84882
4428         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4429         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4430         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4431         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4432         as true for strict-align.
4433         (aarch64_can_inline_p): Perform checks even when callee has no
4434         attributes to check for strict alignment.
4435         * doc/extend.texi (AArch64 Function Attributes): Document
4436         no-strict-align.
4437         * doc/invoke.texi: (AArch64 Options): Likewise.
4439 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
4441         PR tree-optimization/85853
4442         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4443         the handling of the root of the node to...
4444         (vect_slp_analyze_node_operations_1): ...this new function,
4445         and run the whole thing with the child nodes' def types
4446         set according to their SLP node's def type.
4448 2018-05-23  Richard Biener  <rguenther@suse.de>
4450         PR middle-end/85874
4451         * tree-data-ref.c (create_runtime_alias_checks): Defer
4452         and ignore overflow warnings.
4454 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
4456         PR tree-optimization/85822
4457         * tree-vrp.c (is_masked_range_test): Fix handling of negative
4458         constants.
4460 2018-05-23  Richard Biener  <rguenther@suse.de>
4462         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4463         memset constants via native_interpret_expr.
4465 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
4467         PR target/85345
4468         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4469         attribute.
4470         (cgraph_node::create_alias): Likewise.
4471         (cgraph_node::get_availability): Check ifunc_resolver instead
4472         of looking up ifunc attribute.
4473         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4474         * varasm.c (do_assemble_alias): Likewise.
4475         (assemble_alias): Likewise.
4476         (default_binds_local_p_3): Likewise.
4477         * cgraph.h (cgraph_node): Add ifunc_resolver.
4478         (cgraph_node::only_called_directly_or_aliased_p): Return false
4479         for IFUNC resolver.
4480         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4481         attribute.
4482         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4483         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4484         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4485         instead of looking up ifunc attribute.
4487 2018-05-22  Luis Machado  <luis.machado@linaro.org>
4489         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4491 2018-05-22  Martin Sebor  <msebor@redhat.com>
4493         PR middle-end/85359
4494         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4495         only when expasion succeeds.
4496         (expand_builtin_strcmp): Same.
4497         (expand_builtin_strncmp): Same.
4499 2018-05-22  Martin Sebor  <msebor@redhat.com>
4501         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4503 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4504             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4506         * config/aarch64/aarch64-ldpstp.md: Replace uses of
4507         aarch64_mem_pair_operand with memory_operand and delete operand swapping
4508         code.
4509         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4510         Add check for legitimate_address.
4511         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4512         (aarch64_swap_ldrstr_operands): New.
4513         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4514         Define prototype.
4516 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4517             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4519         * config/aarch64/aarch64.md: New patterns to generate stp
4520         and ldp.
4521         (store_pair_sw, store_pair_dw): New patterns to generate stp for
4522         single words and double words.
4523         (load_pair_sw, load_pair_dw): Likewise.
4524         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4525         Delete.
4526         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4527         Delete.
4528         * config/aarch64/aarch64-ldpstp.md: Modify peephole
4529         for different mode ldpstp and add peephole for merged zero stores.
4530         Likewise for loads.
4531         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4532         Add size check.
4533         (aarch64_gen_store_pair): Rename calls to match new patterns.
4534         (aarch64_gen_load_pair): Rename calls to match new patterns.
4535         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4536         (load_pair<DREG:mode><DREG2:mode>): ... This.
4537         (store_pair<mode>): Rename to...
4538         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4539         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4540         New mode iterators.
4541         (V_INT_EQUIV): Handle SImode.
4542         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4543         New predicate.
4545 2018-05-22  Martin Sebor  <msebor@redhat.com>
4547         PR c/85623
4548         * calls.c (maybe_warn_nonstring_arg): Use string length to set
4549         or ajust the presumed bound on an operation to avoid unnecessary
4550         warnings.
4552 2018-05-22  Martin Sebor  <msebor@redhat.com>
4554         PR tree-optimization/85826
4555         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4556         assuming that a DECL necesarily has a constant size.
4558 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4560         PR middle-end/85862
4561         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4563 2018-05-22  Richard Biener  <rguenther@suse.de>
4565         PR tree-optimization/85834
4566         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4567         non-constant and non-zero memset arguments.
4569 2018-05-22  Martin Liska  <mliska@suse.cz>
4571         PR ipa/85607
4572         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4574 2018-05-22  Richard Biener  <rguenther@suse.de>
4576         PR tree-optimization/85863
4577         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4578         comparisons when vectype is specified.
4579         (vectorizable_condition): Do not specify vectype for
4580         vect_is_simple_cond when SLP vectorizing.
4582 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4584         PR target/85657
4585         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4586         define __ibm128 as long double.
4587         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4588         as a distinct type when IEEE 128-bit support is enabled.
4589         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4590         128-bit types to use the correct functions.
4591         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4592         convert between 128-bit floating point types that have different
4593         modes but the same representation, instead of using gen_lowpart to
4594         makean alias.
4595         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4596         KFmode.
4597         (IFKF_reg): New attributes to give the register constraints for
4598         IFmode and KFmode.
4599         (extend<mode>tf2_internal): New insns to mark an explicit
4600         conversion between 128-bit floating point types that have a
4601         different mode but share the same representation.
4603 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4605         PR tree-optimization/85814
4606         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4607         a null return from get_strinfo when unsharing the next
4608         strinfo in the chain.
4610 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4612         PR gcc/84923
4613         * varasm.c (weak_finish): Clean up weak_decls.
4615 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4617         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4618         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4619         UNSPEC_UADALP values.
4620         * config/aarch64/iterators.md (ABAL): New int iterator.
4621         (ABDL2): Likewise.
4622         (ADALP): Likewise.
4623         (sur): Add mappings for the above.
4624         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4625         New define_insn.
4626         (aarch64_<sur>abal<mode>_4): Likewise.
4627         (aarch64_<sur>adalp<mode>_3): Likewise.
4628         (<sur>sadv16qi): New define_expand.
4630 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4632         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4633         (*movdf_internal): Ditto.
4634         (*rcpsf2_sse): Ditto.
4635         (*rsqrtsf2_sse): Ditto.
4636         (*sqrt<mode>2_sse): Ditto.
4638 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4640         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4641         eor3q<mode>4.
4642         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4643         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4644         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4645         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4646         vbcaxq_s64): New.
4647         * config/aarch64/arm_neon.h: Likewise.
4648         * config/aarch64/iterators.md (VQ_I): New.
4650 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4652         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4653         arc*-*-linux*.
4654         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4655         MULTILIB_DIRNAMES
4657 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4659         * config/nds32/constraints.md (S): New constraint.
4660         * config/nds32/nds32.md (call_internal): Use constraint S.
4661         (call_value_internal): Likewise.
4662         (sibcall_internal): Likewise.
4663         (sibcall_value_internal): Likewise.
4665 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4666             Chung-Ju Wu  <jasonwucj@gmail.com>
4668         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4669         into consideration.
4671 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4672             Chung-Ju Wu  <jasonwucj@gmail.com>
4674         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4675         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4676         (nds32_rtx_costs_impl): Simplify.
4677         (nds32_address_cost_impl): Simplify.
4678         (nds32_init_rtx_costs): New function.
4679         (nds32_rtx_costs_speed_prefer): Likewise.
4680         (nds32_rtx_costs_size_prefer): Likewise.
4681         (nds32_address_cost_speed_prefer): Likewise.
4682         (nds32_address_cost_speed_fwprop): Likewise.
4683         (nds32_address_cost_size_prefer): Likewise.
4684         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4685         * config/nds32/nds32.c (nds32_option_override): Use
4686         nds32_init_rtx_costs function.
4688 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4690         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4691         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4692         (TARGET_PIPELINE_N8): Likewise.
4693         (TARGET_PIPELINE_N10): Likewise.
4694         (TARGET_PIPELINE_N13): Likewise.
4695         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4697 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4699         * config/nds32/nds32-fpu.md: Update copyright year.
4701 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4703         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4705 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4707         * config/nds32/nds32.c
4708         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4709         * config/nds32/nds32.opt (minline-asm-r15): New option.
4711 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4713         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4714         MASK_HW_ABS.
4715         * config/nds32/nds32.md (abssi2): New pattern.
4717 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4719         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4720         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4721         Merge insn pattern from sse_cvtsi2ss<round_name> and
4722         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4723         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4724         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4725         using SWI48 mode iterator.
4726         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4727         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4728         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4729         pattern from sse_cvttss2si<round_saeonly_name>
4730         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4731         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4732         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4733         using SWI48 mode iterator.
4734         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4735         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4736         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4737         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4738         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4739         using SWI48 mode iterator.
4740         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4741         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4742         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4743         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4744         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4745         SWI48 mode iterator.
4746         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4747         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4748         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4749         pattern from sse_cvttsd2si<round_saeonly_name>
4750         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4752 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4754         * config/nds32/nds32-md-auxiliary.c
4755         (nds32_valid_smw_lwm_base_p): Refine.
4756         (nds32_output_smw_single_word): Refine.
4757         (nds32_output_smw_double_word): New.
4758         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4760 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4762         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4763         (nds32_output_stack_pop): Refine.
4764         (nds32_expand_unaligned_load): Refine.
4765         (nds32_expand_unaligned_store): Refine.
4767 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4768             Chung-Ju Wu  <jasonwucj@gmail.com>
4770         * config/nds32/constants.md: Add TP_REGNUM constant.
4771         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4772         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4773         UNSPEC_ADD32.
4774         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4775         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4776         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4777         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4778         and PIC code generation.
4779         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4780         code generation.
4781         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4782         optimization.
4783         * config/nds32/nds32.md: Support TLS and PIC.
4784         * config/nds32/nds32.c: Support TLS and PIC.
4785         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4786         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4787         predicate.
4789 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4791         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4792         mode with E_ prefix.
4794 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4795             Chung-Ju Wu  <jasonwucj@gmail.com>
4797         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4798         * config/nds32/nds32-md-auxiliary.c
4799         (symbolic_reference_mentioned_p): New.
4800         (nds32_legitimize_ict_address): New.
4801         (nds32_expand_ict_move): New.
4802         (nds32_indirect_call_referenced_p): New.
4803         (nds32_symbol_binds_local_p): Delete.
4804         (nds32_long_call_p): Modify.
4805         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4806         * config/nds32/nds32-protos.h
4807         (symbolic_reference_mentioned_p): Declare.
4808         (nds32_legitimize_ict_address): Declare.
4809         (nds32_expand_ict_move): Declare.
4810         (nds32_indirect_call_referenced_p): Declare.
4811         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4812         (nds32_relax_group): Use nds32_ict_const_p as condition.
4813         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4814         (nds32_asm_file_start): Output ict_model directive in asm code.
4815         (nds32_legitimate_address_p): Consider indirect call.
4816         (nds32_print_operand): Consider indirect call.
4817         (nds32_print_operand_address): Consider indirect call.
4818         (nds32_insert_attributes): Handle "indirect_call" attribute.
4819         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4820         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4821         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4822         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4823         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4824         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4825         (TARGET_ICT_MODEL_SMALL): Define.
4826         (TARGET_ICT_MODEL_LARGE): Define.
4827         * config/nds32/nds32.md (movsi): Consider ict model.
4828         (call, call_value): Consider ict model.
4829         (sibcall, sibcall_value): Consider ict model.
4830         * config/nds32/nds32.opt (mict-model): New option.
4831         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4832         model.
4834 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4835             Monk Chiang  <sh.chiang04@gmail.com>
4836             Jim Wilson <jimw@sifive.com>
4838         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4839         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4840         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4841         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4842         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4843         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4844         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4845         compute save_libcall_adjustment properly.
4846         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4847         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4848         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4849         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4850         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4851         (ABI_SPEC): Handle mabi=ilp32e.
4852         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4853         (RVE): Add RVE mask.
4854         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4855         <-march>: Add rv32e as an example.
4857 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4859         PR c++/82899
4860         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4861         (intra_create_variable_infos): Handle C++ constructors.
4863 2018-05-18  Martin Liska  <mliska@suse.cz>
4865         * passes.def: Remove a redundant pass.
4867 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4869         PR bootstrap/85838
4870         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4872 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4874         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4875         (ARMv4): Update.
4876         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4877         (ARMv6m): Update.
4878         (armv2, armv2a, armv3, armv3m): Delete architectures.
4879         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4880         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4881         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4882         Delete cpus.
4883         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4884         (*mulsidi3adddi): Likewise.
4885         (mulsidi3): Likewise.
4886         (*mulsidi3_nov6): Likewise.
4887         (umulsidi3): Likewise.
4888         (umulsidi3_nov6): Likewise.
4889         (umaddsidi4): Likewise.
4890         (*umulsidi3adddi): Likewise.
4891         (smulsi3_highpart): Likewise.
4892         (*smulsi3_highpart_nov6): Likewise.
4893         (umulsi3_highpart): Likewise.
4894         (*umulsi3_highpart_nov6): Likewise.
4895         * config/arm/arm.h (arm_arch3m): Delete.
4896         * config/arm/arm.c (arm_arch3m): Delete.
4897         (arm_option_override_internal): Update armv3-related comment.
4898         (arm_configure_build_target): Delete use of isa_bit_mode32.
4899         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4900         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4901         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4902         (mulsa3): Likewise.
4903         (mulusa3): Likewise.
4904         * config/arm/arm-protos.h (arm_arch3m): Delete.
4905         * config/arm/arm-tables.opt: Regenerate.
4906         * config/arm/arm-tune.md: Likewise.
4907         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4908         deleted architectures.
4910 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4912         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4913         (armv5t, armv5te): New features.
4914         (ARMv5, ARMv5e): Delete fgroups.
4915         (ARMv5t, ARMv5te): Adjust for above changes.
4916         (ARMv6m): Likewise.
4917         (armv5, armv5e): Delete arches.
4918         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4919         arm_arch5.
4920         (*call_reg_arm): Likewise.
4921         (*call_value_reg_armv5): Likewise.
4922         (*call_value_reg_arm): Likewise.
4923         (*call_symbol): Likewise.
4924         (*call_value_symbol): Likewise.
4925         (*sibcall_insn): Likewise.
4926         (*sibcall_value_insn): Likewise.
4927         (clzsi2): Likewise.
4928         (prefetch): Likewise.
4929         (define_split and define_peephole2 dependent on arm_arch5):
4930         Likewise.
4931         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4932         arm_arch5e.
4933         (TARGET_ARM_QBIT): Likewise.
4934         (TARGET_DSP_MULTIPLY): Likewise.
4935         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4936         (arm_arch5, arm_arch5e): Delete.
4937         (arm_arch5t, arm_arch5te): Declare.
4938         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4939         (arm_arch5t): Declare.
4940         (arm_option_reconfigure_globals): Update for the above.
4941         (arm_options_perform_arch_sanity_checks): Update comment, replace
4942         use of arm_arch5 with arm_arch5t.
4943         (use_return_insn): Likewise.
4944         (arm_emit_call_insn): Likewise.
4945         (output_return_instruction): Likewise.
4946         (arm_final_prescan_insn): Likewise.
4947         (arm_coproc_builtin_available): Likewise.
4948         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4949         arm_arch5e with arm_arch5t and arm_arch5te.
4950         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4951         (arm_arch5t, arm_arch5te): Declare.
4952         * config/arm/arm-tables.opt: Regenerate.
4953         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4954         * config/arm/t-multilib: Likewise.
4955         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4956         instead of arm_arch5.
4957         (*call_reg_thumb1): Likewise.
4958         (*call_value_reg_thumb1_v5): Likewise.
4959         (*call_value_reg_thumb1): Likewise.
4960         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4961         unreachable path.
4962         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4964 2018-05-18  Martin Liska  <mliska@suse.cz>
4966         PR gcov-profile/84846
4967         * doc/gcov.texi: Document -t option of gcov tool.
4969 2018-05-18  Martin Liska  <mliska@suse.cz>
4971         PR gcov-profile/84846
4972         * gcov.c (print_usage): Add new -t option.
4973         (process_args): Handle the option.
4974         (generate_results): Use stdout as output when requested by
4975         the option.
4977 2018-05-18  Martin Liska  <mliska@suse.cz>
4979         PR gcov-profile/84846
4980         * coverage.c (coverage_init): Write PWD to .gcno file.
4981         * doc/gcov.texi: Document how working directory is printed.
4982         * gcov-dump.c (dump_gcov_file): Print PWD.
4983         * gcov.c (output_intermediate_file): Likewise.
4984         (read_graph_file): Read PWD string.
4985         (output_lines): Print PWD.
4987 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4989         PR middle-end/85817
4990         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4991         for retval and return false if all args to phi are zero.
4993 2018-05-18  Richard Biener  <rguenther@suse.de>
4995         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4996         method.
4997         (evrp_dom_walker::before_dom_children): Call it.
4999 2018-05-18  Richard Biener  <rguenther@suse.de>
5001         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
5002         results when processing array refs with variable index.
5004 2018-05-18  Toon Moene  <toon@moene.org>
5006         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
5007         directly after that of -floop-interchange. Indicate that both
5008         options are enabled by default when specifying -O3.
5010 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5012         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
5013         iterator.  Delete separate integer-mode vec_set<mode> expander.
5014         (aarch64_simd_vec_setv2di): Delete.
5015         (vec_setv2di): Delete.
5016         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
5017         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
5018         the "w, r" alternative.
5020 2018-05-18  Martin Liska  <mliska@suse.cz>
5022         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
5023         * tree-pass.h (make_pass_lower_switch_O0): New function.
5024         * tree-switch-conversion.c (node_has_low_bound): Remove.
5025         (node_has_high_bound): Likewise.
5026         (node_is_bounded): Likewise.
5027         (class pass_lower_switch): Make it a template type and create
5028         two instances.
5029         (pass_lower_switch::execute): Add template argument.
5030         (make_pass_lower_switch): New function.
5031         (make_pass_lower_switch_O0): New function.
5032         (do_jump_if_equal): Remove.
5033         (emit_case_nodes): Simplify to just handle all 3 cases and leave
5034         all the hard work to tree optimization passes.
5036 2018-05-18  Martin Liska  <mliska@suse.cz>
5038         * dbgcnt.c (limit_low): Renamed from limit.
5039         (limit_high): New variable.
5040         (dbg_cnt_is_enabled): Check for upper limit.
5041         (dbg_cnt): Adjust dumping.
5042         (dbg_cnt_set_limit_by_index): Add new argument for high
5043         value.
5044         (dbg_cnt_set_limit_by_name): Likewise.
5045         (dbg_cnt_process_single_pair): Parse new format.
5046         (dbg_cnt_process_opt): Use strtok.
5047         (dbg_cnt_list_all_counters): Remove 'value' and add
5048         'limit_high'.
5049         * doc/invoke.texi: Document changes.
5051 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
5053         * doc/sourcebuild.texi (scalar_all_fma): Document.
5054         * tree.def (FMA_EXPR): Delete.
5055         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5056         * internal-fn.c (ternary_direct): New macro.
5057         (expand_ternary_optab_fn): Likewise.
5058         (direct_ternary_optab_supported_p): Likewise.
5059         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5060         * builtins.c (fold_builtin_fma): Delete.
5061         (fold_builtin_3): Don't call it.
5062         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5063         * expr.c (expand_expr_real_2): Likewise.
5064         * fold-const.c (operand_equal_p): Likewise.
5065         (fold_ternary_loc): Likewise.
5066         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5067         * gimple.c (DEFTREECODE): Likewise.
5068         * gimplify.c (gimplify_expr): Likewise.
5069         * optabs-tree.c (optab_for_tree_code): Likewise.
5070         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5071         * tree-eh.c (operation_could_trap_p): Likewise.
5072         (stmt_could_throw_1_p): Likewise.
5073         * tree-inline.c (estimate_operator_cost): Likewise.
5074         * tree-pretty-print.c (dump_generic_node): Likewise.
5075         (op_code_prio): Likewise.
5076         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5077         * tree-ssa-operands.c (get_expr_operands): Likewise.
5078         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5079         * fold-const-call.h (fold_fma): Delete.
5080         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5081         CFN_FNMA and CFN_FNMS.
5082         (fold_fma): Delete.
5083         * genmatch.c (combined_fn): New enum.
5084         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5085         (commutative_op): New function.
5086         (commutate): Use it.  Handle more than 2 operands.
5087         (dt_operand::gen_gimple_expr): Use commutative_op.
5088         (parser::parse_expr): Allow :c to be used with non-binary
5089         operators if the commutative operand is known.
5090         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5091         CFN_FMS, CFN_FNMA and CFN_FNMS.
5092         (backprop::process_assign_use): Remove FMA_EXPR handling.
5093         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5094         (gen_hsa_fma): New function.
5095         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5096         IFN_FNMA and IFN_FNMS.
5097         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5098         * gimple-fold.h (follow_all_ssa_edges): Declare.
5099         * gimple-fold.c (follow_all_ssa_edges): New function.
5100         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5101         gimple_build interface and use follow_all_ssa_edges to fold the result.
5102         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5103         instead of checking for optabs directly.
5104         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5105         rather than FMA_EXPRs.
5106         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5107         call to IFN_FMA instead of an FMA_EXPR.
5109 2018-05-17  Jim Wilson  <jimw@sifive.com>
5111         * expr.c (do_tablejump): When converting index to Pmode, if we have a
5112         sign extended promoted subreg, and the range does not have the sign bit
5113         set, then do a sign extend.
5115         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5116         test, check for sign extended subreg and/or constant operands, and
5117         do a sign extend in that case.
5119 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
5121         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5122         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5123         Add untyped.
5124         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5125         Change logics_shift_reg to logics_shift_imm.
5126         (thunderx2t99_fp_loadpair_basic): Delete.
5127         (thunderx2t99_fp_storepair_basic): Delete.
5128         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5129         (thunderx2t99_asimd_polynomial): Delete.
5130         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5131         and neon_fp_mul_d_scalar_q.
5132         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5133         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5134         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5135         (thunderx2t99_asimd_lut): Add missing tbl types.
5136         (thunderx2t99_asimd_ext): Delete.
5137         (thunderx2t99_asimd_load1_1_mult): Delete.
5138         (thunderx2t99_asimd_load1_2_mult): Delete.
5139         (thunderx2t99_asimd_load1_ldp): New.
5140         (thunderx2t99_asimd_load1): New.
5141         (thunderx2t99_asimd_load2): Add missing *load2* types.
5142         (thunderx2t99_asimd_load3): New.
5143         (thunderx2t99_asimd_load4): New.
5144         (thunderx2t99_asimd_store1_1_mult): Delete.
5145         (thunderx2t99_asimd_store1_2_mult): Delete.
5146         (thunderx2t99_asimd_store2_mult): Delete.
5147         (thunderx2t99_asimd_store2_onelane): Delete.
5148         (thunderx2t99_asimd_store_stp): New.
5149         (thunderx2t99_asimd_store1): New.
5150         (thunderx2t99_asimd_store2): New.
5151         (thunderx2t99_asimd_store3): New.
5152         (thunderx2t99_asimd_store4): New.
5154 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
5156         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5157         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
5159 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
5160             Segher Boessenkool  <segher@kernel.crashing.org>
5162         PR target/85698
5163         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5164         operand.
5166 2018-05-17  Richard Biener  <rguenther@suse.de>
5168         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5169         for pruning loop and prune defs feeding only already visited PHIs.
5171 2018-05-17  Richard Biener  <rguenther@suse.de>
5173         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5175 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
5176             Richard Biener  <rguenther@suse.de>
5178         PR tree-optimization/85793
5179         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5180         for VMAT_ELEMENTWISE.
5182 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5184         * internal-fn.h (lookup_internal_fn): Declare
5185         * internal-fn.c (lookup_internal_fn): New function.
5186         * gimple.c (gimple_build_call_from_tree): Handle calls to
5187         internal functions.
5188         * gimple-pretty-print.c (dump_gimple_call): Print "." before
5189         internal function names.
5190         * tree-pretty-print.c (dump_generic_node): Likewise.
5191         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5193 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5195         * gimple-fold.h (gimple_build): Make the function forms take
5196         combined_fn rather than built_in_function.
5197         (gimple_simplify): Likewise.
5198         * gimple-match-head.c (gimple_simplify): Likewise.
5199         * gimple-fold.c (gimple_build): Likewise.
5200         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5201         rather than gimple_build_call_internal.
5202         (get_initial_defs_for_reduction): Likewise.
5203         (vect_create_epilog_for_reduction): Likewise.
5204         (vectorizable_live_operation): Likewise.
5206 2018-05-17  Martin Liska  <mliska@suse.cz>
5208         * gimple-ssa-sprintf.c (format_directive): Do not use
5209         space in between 'G_' and '('.
5211 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
5213         PR target/85323
5214         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5215         even if the mask is not all ones.
5217         PR target/85323
5218         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5219         vector.
5220         (ix86_gimple_fold_builtin): Likewise.
5222         PR target/85323
5223         * config/i386/i386.c: Include tree-vector-builder.h.
5224         (ix86_vector_shift_count): New function.
5225         (ix86_fold_builtin): Fold shift builtins by scalar count.
5226         (ix86_gimple_fold_builtin): Likewise.
5228         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5229         _mm512_setzero): New intrinsics.
5231 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
5232             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5234         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5235         code generation for cases where splatting a value is not useful.
5236         * simplify-rtx.c (simplify_ternary_operation): Simplify
5237         vec_merge across a vec_duplicate and a paradoxical subreg forming
5238         a vector mode to a vec_concat.
5240 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
5242         * config.gcc: Support "goldmont-plus".
5243         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5244         "goldmont-plus".
5245         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5246         PROCESSOR_GOLDMONT_PLUS.
5247         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5248         (processor_target_table): Add "goldmont-plus".
5249         (PTA_GOLDMONT_PLUS): Define.
5250         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5251         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5252         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5253         (fold_builtin_cpu): Add "goldmont-plus".
5254         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5255         (ix86_option_override_internal): Add "goldmont-plus".
5256         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5257         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5258         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5259         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5261 2018-05-17  Richard Biener  <rguenther@suse.de>
5263         PR tree-optimization/85757
5264         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5265         remove defs that only feed that PHI from further processing.
5267 2018-05-16  Jim Wilson  <jimw@sifive.com>
5269         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5270         asterisk to name.
5271         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5273 2018-05-16  Mark Wielaard  <mark@klomp.org>
5275         * dwarf2out.c (count_index_strings): New function.
5276         (output_indirect_strings): Call count_index_strings and generate
5277         header for dwarf_version >= 5.
5279 2018-05-16  Mark Wielaard  <mark@klomp.org>
5281         * dwarf2out.c (dwarf_FORM): New function.
5282         (set_indirect_string): Use dwarf_FORM.
5283         (reset_indirect_string): Likewise.
5284         (size_of_die): Likewise.
5285         (value_format): Likewise.
5286         (output_die): Likewise.
5287         (add_skeleton_AT_string): Likewise.
5288         (output_macinfo_op): Likewise.
5289         (index_string): Likewise.
5290         (output_index_string_offset): Likewise.
5291         (output_index_string): Likewise.
5292         (count_index_strings): Likewise.
5294 2018-05-16  Carl Love  <cel@us.ibm.com>
5296         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5297         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5299 2018-05-16  Martin Jambor  <mjambor@suse.cz>
5301         * ipa-prop.c (ipa_free_all_edge_args): Remove.
5302         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5304 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
5306         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5307         (fnma<mode>4): Likewise.
5308         (fms<mode>4): Likewise.
5309         (fnms<mode>4): Likewise.
5310         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5311         (aarch64_fnma<mode>4): Likewise.
5312         (aarch64_fms<mode>4): Likewise.
5313         (aarch64_fnms<mode>4): Likewise.
5314         (aarch64_fnmadd<mode>4): Likewise.
5316 2018-05-16  Jason Merrill  <jason@redhat.com>
5318         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
5320 2018-05-16  Richard Biener  <rguenther@suse.de>
5322         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5323         (dump_stmt_cost): Declare.
5324         (add_stmt_cost): Dump cost we add.
5325         (add_stmt_costs): New function.
5326         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5327         No longer exported.
5328         (vect_analyze_stmt): Adjust prototype.
5329         (vectorizable_condition): Likewise.
5330         (vectorizable_live_operation): Likewise.
5331         (vectorizable_reduction): Likewise.
5332         (vectorizable_induction): Likewise.
5333         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5334         cost vector to pass to vectorizable_ and record afterwards.
5335         (vect_model_reduction_cost): Take cost vector argument and adjust.
5336         (vect_model_induction_cost): Likewise.
5337         (vectorizable_reduction): Likewise.
5338         (vectorizable_induction): Likewise.
5339         (vectorizable_live_operation): Likewise.
5340         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5341         SLP_TREE_NUMBER_OF_VEC_STMTS.
5342         (vect_analyze_slp_cost_1): Remove.
5343         (vect_analyze_slp_cost): Likewise.
5344         (vect_slp_analyze_node_operations): Take visited args and
5345         a target cost vector.  Avoid processing already visited stmt sets.
5346         (vect_slp_analyze_operations): Use a local cost vector to gather
5347         costs and register those of non-discarded instances.
5348         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5349         (vect_schedule_slp_instance): Remove copying of
5350         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
5351         zero.
5352         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5353         adding cost.  Record cost entry location.
5354         (vect_prologue_cost_for_slp_op): Function to compute cost of
5355         a constant or invariant generated for SLP vect in the prologue,
5356         split out from vect_analyze_slp_cost_1.
5357         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
5358         (vect_model_promotion_demotion_cost): Likewise.
5359         (vect_model_store_cost): Likewise, make static.
5360         (vect_model_load_cost): Likewise.
5361         (vectorizable_bswap): Add cost vector arg and adjust.
5362         (vectorizable_call): Likewise.
5363         (vectorizable_simd_clone_call): Likewise.
5364         (vectorizable_conversion): Likewise.
5365         (vectorizable_assignment): Likewise.
5366         (vectorizable_shift): Likewise.
5367         (vectorizable_operation): Likewise.
5368         (vectorizable_store): Likewise.
5369         (vectorizable_load): Likewise.
5370         (vectorizable_condition): Likewise.
5371         (vectorizable_comparison): Likewise.
5372         (can_vectorize_live_stmts): Likewise.
5373         (vect_analyze_stmt): Likewise.
5374         (vect_transform_stmt): Adjust calls to vectorizable_*.
5375         * tree-vectorizer.c: Include gimple-pretty-print.h.
5376         (dump_stmt_cost): New function.
5378 2018-05-16  Richard Biener  <rguenther@suse.de>
5380         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5381         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5382         * tree-ssa-dse.c: Include tree-ssa-loop.h.
5383         (check_name): New callback.
5384         (dse_classify_store): Track cycles via a visited bitmap of PHI
5385         defs and simplify handling of in-loop and across loop dead stores
5386         and properly fail for loop-variant refs.  Handle byte-tracking with
5387         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5388         limiting the walk.
5390 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
5392         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5393         (vect_get_mask_type_for_stmt): Likewise.
5394         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5395         split out from...
5396         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
5397         to determine the statement's vector type and the vector type that
5398         should be used for calculating nunits.  Deal with cases in which
5399         the type has to be deferred.
5400         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5401         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5402         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5403         (vect_determine_vf_for_stmt): New functions, split out from...
5404         (vect_determine_vectorization_factor): ...here.
5405         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5406         (vect_get_mask_type_for_stmt): New functions, split out from
5407         vect_determine_vectorization_factor.
5409 2018-05-16  Richard Biener  <rguenther@suse.de>
5411         * tree-cfg.c (verify_gimple_assign_ternary): Properly
5412         verify the [VEC_]COND_EXPR embedded comparison.
5414 2018-05-15  Martin Sebor  <msebor@redhat.com>
5416         PR tree-optimization/85753
5417         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5418         RECORD_TYPE in addition to ARRAY_TYPE.
5420 2018-05-15  Martin Sebor  <msebor@redhat.com>
5422         PR middle-end/85643
5423         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5425 2018-05-15  Richard Biener  <rguenther@suse.de>
5427         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5428         add by_clobber_p one.  Change algorithm to collect all defs
5429         representing uses we need to walk and try reducing them to
5430         a single one before failing.
5431         (dse_dom_walker::dse_optimize_stmt): Adjust.
5433 2018-05-13  Mark Wielaard  <mark@klomp.org>
5435         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5436         (size_of_loc_descr): Likewise.
5437         (output_loc_operands): Likewise.
5438         (output_loc_operands_raw): Likewise.
5439         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5440         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5441         (hash_loc_operands): Likewise.
5442         (compare_loc_operands): Likewise.
5444 2018-05-14  Mark Wielaard  <mark@klomp.org>
5446         * dwarf2out.c (count_index_addrs): New function.
5447         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5449 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5451         PR tree-optimization/83648
5452         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5453         return value as malloc candidate.
5455 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5457         PR ipa/85734
5458         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5459         param as true in call to suggest_attribute.
5461 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
5463         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5464         -mreadonly-in-sdata.
5466 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5468         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5469         New pattern.
5470         (aarch64_crypto_aesd_fused): Likewise.
5472 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
5474         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5475         (movsi_aarch64): Likewise.
5476         (load_pairsi): Likewise.
5477         (load_pairdi): Likewise.
5478         (store_pairsi): Likewise.
5479         (store_pairdi): Likewise.
5480         (load_pairsf): Likewise.
5481         (load_pairdf): Likewise.
5482         (store_pairsf): Likewise.
5483         (store_pairdf): Likewise.
5484         (zero_extend): Likewise.
5485         (trunc): Swap alternatives.
5486         (fcvt_target): Add '?' to prefer w over r.
5488 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
5490         PR target/85756
5491         * config/i386/i386.md: Disallow non-commutative arithmetics in
5492         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5493         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
5494         in the peephole2 before it.
5496 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
5498         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5499         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5500         (ix86_handle_option): Handle -mcldemote.
5501         * config.gcc: New header.
5502         * config/i386/cldemoteintrin.h: New file.
5503         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5504         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5505         -mcldemote.
5506         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5507         OPTION_MASK_ISA_CLDEMOTE.
5508         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5509         (ix86_valid_target_attribute_inner_p): Ditto.
5510         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5511         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5512         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5513         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5514         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5515         (cldemote): New.
5516         * config/i386/i386.opt: Add -mcldemote.
5517         * config/i386/x86intrin.h: New header.
5518         * doc/invoke.texi: Add -mcldemote.
5520 2018-05-14  Richard Biener  <rguenther@suse.de>
5522         * doc/match-and-simplify.texi: Adjust :s documentation.
5524 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
5526         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5527         intended memcpy size.
5528         (REORDER_45): Likewise.
5530 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
5532         * sort.cc: New file.
5533         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5534         * vec.c (qsort_chk): Use gcc_qsort.
5535         * Makefile.in (OBJS-libcommon): Add sort.o.
5536         (build/sort.o): New target.  Use it...
5537         (BUILD_RTL): ... here, and...
5538         (build/gencfn-macros): ... here, and...
5539         (build/genmatch): ... here.
5541 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5542             Chung-Ju Wu  <jasonwucj@gmail.com>
5544         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5545         * config/nds32/nds32-graywolf.md: New file.
5546         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5547         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5548         pipeline.
5549         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5550         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5551         * config/nds32/nds32.md (pipeline_model): Add graywolf.
5552         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5553         * config/nds32/pipelines.md: Include n15 settings.
5555 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5556             Chung-Ju Wu  <jasonwucj@gmail.com>
5558         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5559         * config/nds32/nds32-n13.md: New file.
5560         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5561         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5562         pipeline.
5563         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5564         * config/nds32/nds32.md (pipeline_model): Add n13.
5565         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5566         * config/nds32/pipelines.md: Include n13 settings.
5568 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5569             Chung-Ju Wu  <jasonwucj@gmail.com>
5571         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5572         * config/nds32/nds32-n10.md: New file.
5573         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5574         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5575         pipeline.
5576         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5577         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5578         * config/nds32/nds32.md (pipeline_model): Add n10.
5579         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5580         * config/nds32/pipelines.md: Include n10 settings.
5582 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5583             Kito Cheng  <kito.cheng@gmail.com>
5584             Chung-Ju Wu  <jasonwucj@gmail.com>
5586         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5587         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5588         Add enum values for DSP extension instructions.
5589         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5590         New constraints.
5591         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5592         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5593         New code iterators.
5594         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5595         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5596         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5597         * config/nds32/nds32-intrinsic.md: Likewise.
5598         * config/nds32/nds32_intrinsic.h: Likewise.
5599         * config/nds32/nds32-md-auxiliary.c: Likewise.
5600         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5601         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5602         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5603         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5604         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5605         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5606         TYPE_DMAC in switch statement.
5607         * config/nds32/nds32.c: New checking and implementation for DSP
5608         extension instructions.
5609         * config/nds32/nds32.h: Likewise.
5610         * config/nds32/nds32.md: Likewise.
5611         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5612         * config/nds32/predicates.md: Implement new predicates for DSP
5613         extension.
5615 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5617         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5618         Reformat alternatives and attributes so it is easier to identify
5619         which constraints/attributes go with which instruction.
5620         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5621         (mov<mode>_softfloat32, FMOVE64): Likewise.
5622         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5623         (mov<mode>_softfloat64, FMOVE64): Likewise.
5625 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5627         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5628         subsection.
5629         (Basic PowerPC Built-in Functions): The new name of the
5630         subsection previously known as "PowerPC Built-in Functions".
5631         (Basic PowerPC Built-in Functions Available on all Configurations):
5632         New subsubsection.
5633         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5634         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5635         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5636         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5638 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5640         PR ipa/85655
5641         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5642         single const.
5644 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5646         PR target/85733
5647         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5649 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5651         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5652         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5653         (ix86_handle_option): Handle -mwaitpkg.
5654         * config.gcc: New header.
5655         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5656         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5657         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5658         function type.
5659         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5660         OPTION_MASK_ISA_WAITPKG.
5661         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5662         (ix86_option_override_internal): Add PTA_WAITPKG.
5663         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5664         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5665         IX86_BUILTIN_TPAUSE.
5666         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5667         __builtin_ia32_umwait and __builtin_ia32_tpause.
5668         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5669         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5670         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5671         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5672         UNSPECV_TPAUSE): New.
5673         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5674         * config/i386/i386.opt: Add -mwaitpkg.
5675         * config/i386/waitpkgintrin.h: New file.
5676         * config/i386/x86intrin.h: New header.
5677         * doc/invoke.texi: Add -mwaitpkg.
5679 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5681         PR target/85606
5682         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5683         equivalent.
5684         (cortex-m0): Use armv6s-m isa.
5685         (cortex-m0plus): Likewise.
5686         (cortex-m1): Likewise.
5687         (cortex-m0.small-multiply): Likewise.
5688         (cortex-m0plus.small-multiply): Likewise.
5689         (cortex-m1.small-multiply): Likewise.
5691 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5692             Jakub Jelinek  <jakub@redhat.com>
5694         PR tree-optimization/85692
5695         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5696         source permute as well.
5698 2018-05-11  Martin Liska  <mliska@suse.cz>
5700         PR sanitizer/85556
5701         * doc/extend.texi: Document LLVM style format for no_sanitize
5702         attribute.
5704 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5706         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5707         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5708         (mode_supports_vsx_dform_quad): Likewise.
5709         (mode_supports_vmx_dform): Move these functions to be next to the
5710         other mode_supports functions.
5711         (mode_supports_dq_form): Likewise.
5712         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5713         mode_supports_dq_form.
5714         (reg_offset_addressing_ok_p): Likewise.
5715         (offsettable_ok_by_alignment): Likewise.
5716         (rs6000_legitimate_offset_address_p): Likewise.
5717         (legitimate_lo_sum_address_p): Likewise.
5718         (rs6000_legitimize_address): Likewise.
5719         (rs6000_legitimize_reload_address): Likewise.
5720         (rs6000_secondary_reload_inner): Likewise.
5721         (rs6000_preferred_reload_class): Likewise.
5722         (rs6000_output_move_128bit): Likewise.
5724 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5726         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5727         Generate SImode target register for null target.
5728         <case IX86_BUILTIN_XGETBV>: Ditto.
5729         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5730         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5732 2018-05-10  Carl Love  <cel@us.ibm.com>
5734         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5735         dcbtt and dcbtstt if operands[2] is 0.
5737 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5739         PR target/85693
5740         * config/i386/sse.md (usadv64qi): New expander.
5742 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5744         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5745         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5746         -maltivec=be support.
5747         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5748         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5749         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5750         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5751         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5752         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5753         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5754         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5755         altivec_vsumsws): Adjust.
5756         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5757         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5758         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5759         support.
5760         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5761         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5762         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5763         (altivec_lve<VI_char>x): Delete expand.
5764         (*altivec_lve<VI_char>x_internal): Rename to...
5765         (altivec_lve<VI_char>x): ... this.
5766         (altivec_lvxl_<mode>): Delete expand.
5767         (*altivec_lvxl_<mode>_internal): Rename to ...
5768         (altivec_lvxl_<mode>): ... this.
5769         (altivec_stvxl_<mode>): Delete expand.
5770         (*altivec_stvxl_<mode>_internal): Rename to ...
5771         (altivec_stvxl_<mode>): ... this.
5772         (altivec_stve<VI_char>x): Delete expand.
5773         (*altivec_stve<VI_char>x_internal): Rename to ...
5774         (altivec_stve<VI_char>x): ... this.
5775         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5776         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5777         reduc_plus_scal_<mode>): Adjust.
5778         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5779         comment.
5780         (rs6000_cpu_cpp_builtins): Adjust.
5781         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5782         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5783         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5784         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5785         -maltivec=be support.
5786         (rs6000_split_vec_extract_var): Adjust.
5787         (rs6000_split_v4si_init): Adjust.
5788         (swap_selector_for_mode): Delete.
5789         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5790         altivec_expand_stvex_be): Delete.
5791         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5792         -maltivec=be support.
5793         (rs6000_gimple_fold_builtin): Ditto.
5794         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5795         Adjust.
5796         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5797         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5798         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5799         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5800         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5801         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5802         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5803         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5804         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5805         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5806         anonymous split): Adjust.
5807         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5808         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5810 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5812         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5813         when --with-gxx-include-dir is also specified.
5814         * configure: Regenerate.
5816 2018-05-09  Jim Wilson  <jimw@sifive.com>
5818         PR target/84797
5819         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5820         * config/riscv/t-withmultilib: New.
5821         * config/riscv/withmultilib.h: New.
5822         * doc/install.texi: Document RISC-V --with-multilib-list support.
5824 2018-05-09  Richard Biener  <rguenther@suse.de>
5826         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5827         vector.
5828         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5829         actual scalar cost using the cost vector and the add_stmt_cost
5830         machinery.
5832 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5834         PR rtl-optimization/85645
5835         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5836         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5838 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5840         PR rtl-optimization/85645
5841         * shrink-wrap.c (spread_components): Return a boolean saying if
5842         anything was changed.
5843         (try_shrink_wrapping_separate): Iterate spread_components until
5844         nothing changes anymore.
5846 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5848         PR rtl-optimization/85645
5849         * regrename.c (build_def_use): Also kill the chains that include the
5850         destination of a REG_CFA_REGISTER note.
5852 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5854         PR rtl-optimization/85645
5855         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5856         insn that has a REG_CFA_REGISTER note.
5858 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5860         * cfgexpand.c (expand_clobber): New function.
5861         (expand_gimple_stmt_1): Use it.
5862         * tree-vect-stmts.c (vect_clobber_variable): New function,
5863         split out from...
5864         (vectorizable_simd_clone_call): ...here.
5865         (vectorizable_store): Emit a clobber either side of an
5866         IFN_STORE_LANES sequence.
5867         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5869 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5871         PR target/85626
5872         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5873         (define_insn "trap_if_false"): Add exit after trap.
5875 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5877         PR rtl-optimization/85638
5878         * bb-reorder.c: Include common/common-target.h.
5879         (create_forwarder_block): New function extracted from...
5880         (fix_up_crossing_landing_pad): ...here.  Rename into...
5881         (dw2_fix_up_crossing_landing_pad): ...this.
5882         (sjlj_fix_up_crossing_landing_pad): New function.
5883         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5884         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5885         from both partitions and exit the loop after one iteration.
5887 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5889         Revert:
5890         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5891         subsection.
5892         (Basic PowerPC Built-in Functions): The new name of the
5893         subsection previously known as "PowerPC Built-in Functions".
5894         (Basic PowerPC Built-in Functions Available on all Configurations):
5895         New subsubsection.
5896         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5897         subsubsection.
5898         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5899         subsubsection.
5900         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5901         subsubsection.
5902         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5903         subsubsection.
5905 2018-05-08  Jim Wilson  <jimw@sifive.com>
5907         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5908         (LD_EMUL_SUFFIX): New.
5909         (LINK_SPEC): Use it.
5911 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5913         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5914         subsection.
5915         (Basic PowerPC Built-in Functions): The new name of the
5916         subsection previously known as "PowerPC Built-in Functions".
5917         (Basic PowerPC Built-in Functions Available on all Configurations):
5918         New subsubsection.
5919         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5920         subsubsection.
5921         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5922         subsubsection.
5923         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5924         subsubsection.
5925         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5926         subsubsection.
5928 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5930         PR target/85683
5931         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5932         after cmpelim optimization.
5934 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5936         * config.gcc: Support "goldmont".
5937         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5938         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5939         PROCESSOR_GOLDMONT.
5940         * config/i386/i386.c (m_GOLDMONT): Define.
5941         (processor_target_table): Add "goldmont".
5942         (PTA_GOLDMONT): Define.
5943         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5944         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5945         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5946         (fold_builtin_cpu): Add "goldmont".
5947         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5948         (ix86_option_override_internal): Add "goldmont".
5949         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5950         (processor_type): Add PROCESSOR_GOLDMONT.
5951         * config/i386/i386.md: Add CPU "glm".
5952         * config/i386/glm.md: New file.
5953         * config/i386/x86-tune.def: Add m_GOLDMONT.
5954         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5956 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5958         PR target/85572
5959         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5960         E_V4DImode.
5961         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5962         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5963         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5965         PR target/85317
5966         * config/i386/i386.c (ix86_fold_builtin): Handle
5967         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5969         PR target/85480
5970         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5971         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5973 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5975         PR target/85658
5976         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5977         (check_arch): Likewise.
5978         (check_fpu): Return the result rather than printing it.
5979         (end arch): Fix operator precedence.
5980         (end cpu): Likewise.
5981         (END): Print the result from check_fpu.
5983 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5984             Alan Hayward  <alan.hayward@arm.com>
5985             David Sherwood  <david.sherwood@arm.com>
5987         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5988         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5989         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5990         (*fcmuo<mode>_and): New patterns.
5992 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5994         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5995         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5996         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5997         (cmp_op, sve_imm_con): New code attributes.
5998         (SVE_COND_INT_CMP, imm_con): Delete.
5999         (cmp_op): Remove above unspecs from int attribute.
6000         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
6001         to...
6002         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
6003         comparison-specific unspecs.
6004         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
6005         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
6006         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
6007         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
6008         (*vec_fcm<cmp_op><mode>): Rename to...
6009         (*fcm<cmp_op><mode>): ...this and adjust likewise.
6010         (*vec_fcmuo<mode>): Rename to...
6011         (*fcmuo<mode>): ...this and adjust likewise.
6012         (*pred_fcm<cmp_op><mode>): New pattern.
6013         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
6014         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
6015         functions.
6016         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
6017         and UNORDERED.
6018         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
6019         (aarch64_emit_sve_predicated_cond): New function.
6020         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
6021         (aarch64_emit_unspec_cond_or): Replace with...
6022         (aarch64_emit_sve_or_conds): ...this new function.  Use
6023         aarch64_emit_sve_ptrue_op for the individual comparisons and
6024         aarch64_emit_binop to OR them together.
6025         (aarch64_emit_inverted_unspec_cond): Replace with...
6026         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
6027         aarch64_emit_sve_ptrue_op for the comparison and
6028         aarch64_emit_unop to invert the result.
6029         (aarch64_expand_sve_vec_cmp_float): Update after the above
6030         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
6032 2018-05-07  Nathan Sidwell  <nathan@acm.org>
6034         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6035         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6036         (Backwards Compatibility): Likewise.
6038 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6040         PR bootstrap/85681
6041         Revert:
6042         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6044         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6045         <prefetch_dynamic_strides>: New const bool field.
6046         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6047         prefetch_dynamic_strides.
6048         (exynosm1_prefetch_tune): Likewise.
6049         (thunderxt88_prefetch_tune): Likewise.
6050         (thunderx_prefetch_tune): Likewise.
6051         (thunderx2t99_prefetch_tune): Likewise.
6052         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6053         to false.
6054         (aarch64_override_options_internal): Update to set
6055         PARAM_PREFETCH_DYNAMIC_STRIDES.
6056         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6057         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6058         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6060         prefetch-dynamic-strides setting.
6062         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6064         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6065         <minimum_stride>: New const int field.
6066         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6067         minimum_stride field.
6068         (exynosm1_prefetch_tune): Likewise.
6069         (thunderxt88_prefetch_tune): Likewise.
6070         (thunderx_prefetch_tune): Likewise.
6071         (thunderx2t99_prefetch_tune): Likewise.
6072         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6073         (aarch64_override_options_internal): Update to set
6074         PARAM_PREFETCH_MINIMUM_STRIDE.
6075         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6076         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6077         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6078         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6079         stride is constant and is below the minimum stride threshold.
6081 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6083         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6084         to 512.
6086 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6088         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6089         <prefetch_dynamic_strides>: New const bool field.
6090         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6091         prefetch_dynamic_strides.
6092         (exynosm1_prefetch_tune): Likewise.
6093         (thunderxt88_prefetch_tune): Likewise.
6094         (thunderx_prefetch_tune): Likewise.
6095         (thunderx2t99_prefetch_tune): Likewise.
6096         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6097         to false.
6098         (aarch64_override_options_internal): Update to set
6099         PARAM_PREFETCH_DYNAMIC_STRIDES.
6100         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6101         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6102         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6103         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6104         prefetch-dynamic-strides setting.
6106 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6108         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6109         <minimum_stride>: New const int field.
6110         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6111         minimum_stride field.
6112         (exynosm1_prefetch_tune): Likewise.
6113         (thunderxt88_prefetch_tune): Likewise.
6114         (thunderx_prefetch_tune): Likewise.
6115         (thunderx2t99_prefetch_tune): Likewise.
6116         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6117         (aarch64_override_options_internal): Update to set
6118         PARAM_PREFETCH_MINIMUM_STRIDE.
6119         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6120         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6121         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6122         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6123         stride is constant and is below the minimum stride threshold.
6125 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
6127         PR c++/85659
6128         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6129         the type is addressable.  Don't force op into register if it has
6130         BLKmode.
6132 2018-05-05  Roland McGrath  <mcgrathr@google.com>
6134         PR other/77609
6135         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6136         any section for which we don't know a specific type it should have,
6137         regardless of name.  Previously this was done only for the exact
6138         names ".init_array", ".fini_array", and ".preinit_array".
6139         (default_elf_asm_named_section): Add comment about
6140         relationship with default_section_type_flags and SECTION_NOTYPE.
6141         (get_section): Don't consider it a type conflict if one side has
6142         SECTION_NOTYPE and the other doesn't, as long as neither has the
6143         SECTION_BSS et al used in the default_section_type_flags logic.
6145 2018-05-05  Tom de Vries  <tom@codesourcery.com>
6147         PR target/85653
6148         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6149         (workaround_barsyncs): New function.
6150         (nvptx_reorg): Use workaround_barsyncs.
6151         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6152         (define_expand "nvptx_membar_cta"): New define_expand.
6153         (define_insn "*nvptx_membar_cta"): New insn.
6155 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
6157         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6158         To improve optimization opportunities.
6159         * builtin-types.def: The new needed builtin types for the above.
6161 2018-05-04  Richard Biener  <rguenther@suse.de>
6163         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6164         * gimple-ssa-store-merging.c
6165         (imm_store_chain_info::output_merged_store): Remove redundant create,
6166         release split_store vector contents on failure.
6167         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6168         scalar stmt vector on cache hit.
6170 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
6172         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6173         Xilinx FP support.
6174         * config.gcc (powerpc-xilinx-eabi*): Remove.
6175         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6176         support.
6177         (fusion_addis_mem_combo_load): Ditto.
6178         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6179         FP support.
6180         (rs6000_cpu_cpp_builtins): Ditto.
6181         * config/rs6000/rs6000-linux.c
6182         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6183         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6184         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6185         support.
6186         (rs6000_setup_reg_addr_masks): Ditto.
6187         (rs6000_init_hard_regno_mode_ok): Ditto.
6188         (rs6000_option_override_internal): Ditto.
6189         (legitimate_lo_sum_address_p): Ditto.
6190         (rs6000_legitimize_address): Ditto.
6191         (rs6000_legitimize_reload_address): Ditto.
6192         (rs6000_legitimate_address_p): Ditto.
6193         (abi_v4_pass_in_fpr): Ditto.
6194         (setup_incoming_varargs): Ditto.
6195         (rs6000_gimplify_va_arg): Ditto.
6196         (rs6000_split_multireg_move): Ditto.
6197         (rs6000_savres_strategy): Ditto.
6198         (rs6000_emit_prologue_components): Ditto.
6199         (rs6000_emit_epilogue_components): Ditto.
6200         (rs6000_emit_prologue): Ditto.
6201         (rs6000_emit_epilogue): Ditto.
6202         (rs6000_elf_file_end): Ditto.
6203         (rs6000_function_value): Ditto.
6204         (rs6000_libcall_value): Ditto.
6205         * config/rs6000/rs6000.h: Ditto.
6206         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6207         (TARGET_MINMAX): ... this.  New.
6208         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6209         * config/rs6000/rs6000.md: Remove Xilinx FP support.
6210         (*movsi_internal1_single): Delete.
6211         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6212         mfpu=, mxilinx-fpu): Delete.
6213         * config/rs6000/singlefp.h: Delete.
6214         * config/rs6000/sysv4.h: Remove Xilinx FP support.
6215         * config/rs6000/t-rs6000: Ditto.
6216         * config/rs6000/t-xilinx: Delete.
6217         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6218         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6219         (VStype_simple): Delete.
6220         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6221         * config/rs6000/xfpu.h: Delete.
6222         * config/rs6000/xfpu.md: Delete.
6223         * config/rs6000/xilinx.h: Delete.
6224         * config/rs6000/xilinx.opt: Delete.
6225         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6226         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6228 2018-05-04  Tom de Vries  <tom@codesourcery.com>
6230         PR libgomp/85639
6231         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6232         if ignore == 0.
6234 2018-05-04  Richard Biener  <rguenther@suse.de>
6236         PR middle-end/85627
6237         * tree-complex.c (update_complex_assignment): We are always in SSA form.
6238         (expand_complex_div_wide): Likewise.
6239         (expand_complex_operations_1): Likewise.
6240         (expand_complex_libcall): Preserve EH info of the original stmt.
6241         (tree_lower_complex): Handle removed blocks.
6242         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6243         on complex multiplication and division libcall builtins.
6245 2018-05-04  Richard Biener  <rguenther@suse.de>
6247         PR middle-end/85574
6248         * fold-const.c (negate_expr_p): Restrict negation of operand
6249         zero of a division to when we know that can happen without
6250         overflow.
6251         (fold_negate_expr_1): Likewise.
6253 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
6255         PR libstdc++/85466
6256         * real.h (real_nextafter): Declare.
6257         * real.c (real_nextafter): New function.
6258         * fold-const-call.c (fold_const_nextafter): New function.
6259         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6260         CASE_CFN_NEXTTOWARD.
6261         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6262         even when arg1_mode is different from arg0_mode.
6264 2018-05-03  Nathan Sidwell  <nathan@acm.org>
6266         * doc/extend.texi (Deprecated Features): Remove
6267         -ffriend-injection.
6268         (Backwards Compatibility): Likewise.
6269         * doc/invoke.texi (C++ Language Options): Likewise.
6270         (C++ Dialect Options): Likewise.
6272 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
6274         PR target/85530
6275         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6276         _mm512_mask_mullox_epi64): New intrinsics.
6278 2018-05-03  Tom de Vries  <tom@codesourcery.com>
6280         PR testsuite/85106
6281         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6282         dump files): Add offload-tree.
6284 2018-05-03  Richard Biener  <rguenther@suse.de>
6286         PR tree-optimization/85615
6287         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6288         to loops not nested in BBs loop father to avoid creating multi-entry
6289         loops.
6291 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6293         PR tree-optimization/70291
6294         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6295         arguments.  Change return type to tree.  Emit libcall as a new
6296         statement rather than replacing existing one when inplace_p is true.
6297         (expand_complex_multiplication_components): New function.
6298         (expand_complex_multiplication): Expand floating-point complex
6299         multiplication using the above.
6300         (expand_complex_division): Rename inner_type parameter to type.
6301         Update expand_complex_libcall call-site.
6302         (expand_complex_operations_1): Update expand_complex_multiplication
6303         and expand_complex_division call-sites.
6305 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6307         PR target/85582
6308         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6309         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6310         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6311         the highest significant bit of the shift count mask is clear.  In
6312         check whether and[sq]i3 is needed verify that all significant bits
6313         of the shift count other than the highest are set.
6315 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6317         PR libgomp/82428
6318         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6319         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6320         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6321         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6322         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6323         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6324         __builtin_goacc_parlevel_size.
6326 2018-05-02  Richard Biener  <rguenther@suse.de>
6328         PR tree-optimization/85597
6329         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6330         do not use split vect_get_vec_defs call but call vect_get_slp_defs
6331         directly.
6333 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6335         PR testsuite/85106
6336         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6337         dump files): Add ltrans-tree.
6339 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6341         PR testsuite/85106
6342         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6343         dump files): Add wpa-ipa.
6345 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
6347         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
6348         powerpc*-*-linux*paired* target.
6349         * config/rs6000/750cl.h: Delete.
6350         * config/rs6000/paired.h: Delete.
6351         * config/rs6000/paired.md: Delete.
6352         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6353         float support.
6354         * config/rs6000/rs6000-builtin.def: Remove paired float support.
6355         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6356         comment.  Remove paired float support.
6357         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6358         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6359         VECTOR_PAIRED.
6360         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6361         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6362         declarations.
6363         * config/rs6000/rs6000.c: Remove paired float support.
6364         (paired_expand_vector_init, paired_expand_vector_move,
6365         paired_emit_vector_compare, paired_emit_vector_cond_expr,
6366         (paired_expand_lv_builtin, paired_expand_stv_builtin,
6367         paired_expand_builtin, paired_expand_predicate_builtin,
6368         paired_init_builtins): Delete.
6369         * config/rs6000/rs6000.h: Remove paired float support.
6370         * config/rs6000/rs6000.md: Remove paired float support.
6371         (move_from_CR_ov_bit): Delete.
6372         * config/rs6000/rs6000.opt (mpaired): Delete.
6373         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6374         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6376 2018-05-02  Richard Biener  <rguenther@suse.de>
6378         PR middle-end/85567
6379         * gimplify.c (gimplify_save_expr): When in SSA form allow
6380         SAVE_EXPRs to compute to SSA vars.
6382 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6384         PR target/85582
6385         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6386         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6387         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6388         clobber operands[2], instead use a new pseudo.  Formatting fixes.
6390 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
6392         PR tree-optimization/85586
6393         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6394         exit early for statements in the same group if the accesses are
6395         not strided.
6397 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6399         PR lto/85451
6400         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6401         error message.
6403 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
6405         PR tree-optimization/85143
6406         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6408 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6410         PR lto/85451
6411         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6412         not found" error message.
6414 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6416         PR other/83786
6417         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6418         * vec.c (test_ordered_remove_if): New function.
6419         (vec_c_tests): Call test_ordered_remove_if.
6420         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6421         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6422         * tree-vect-patterns.c (vect_pattern_recog_1): Use
6423         VEC_ORDERED_REMOVE_IF.
6425 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6427         PR tree-optimization/82665
6428         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6429         pointer subtraction where arguments come from a memchr call.
6431 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
6433         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6434         --push-state --as-needed and --pop-state instead of --as-needed and
6435         --no-as-needed if ld supports it.
6436         * configure: Regenerated.
6438         PR web/85578
6439         * doc/install.texi2html: Replace _002d with - and _002a with * in
6440         generated html files using sed.
6442 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6444         PR c++/85523
6445         * gcc-rich-location.c (blank_line_before_p): New function.
6446         (use_new_line): New function.
6447         (gcc_rich_location::add_fixit_insert_formatted): New function.
6448         * gcc-rich-location.h
6449         (gcc_rich_location::add_fixit_insert_formatted): New function.
6451 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6453         * selftest.c (assert_streq): Rename "expected" and "actual" to
6454         "val1" and "val2".  Extend NULL-handling to cover both inputs
6455         symmetrically, while still requiring both to be non-NULL for a pass.
6456         * selftest.h (assert_streq): Rename "expected" and "actual" to
6457         "val1" and "val2".
6458         (ASSERT_EQ): Likewise.
6459         (ASSERT_EQ_AT): Likewise.
6460         (ASSERT_KNOWN_EQ): Likewise.
6461         (ASSERT_KNOWN_EQ_AT): Likewise.
6462         (ASSERT_NE): Likewise.
6463         (ASSERT_MAYBE_NE): Likewise.
6464         (ASSERT_MAYBE_NE_AT): Likewise.
6465         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
6466         the assertion to pass.
6467         (ASSERT_STREQ_AT): Likewise.
6469 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6471         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6472         interaction with -pie.
6474 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6476         * selftest.h: Fix alphabetization of per-source-file selftest
6477         declarations.
6479 2018-04-30  Jason Merrill  <jason@redhat.com>
6481         PR c++/61982 - dead stores to destroyed objects.
6482         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6483         of clobber.
6485 2018-04-30  Jason Merrill  <jason@redhat.com>
6487         * tree.c (build_clobber): New.
6488         * tree.h: Declare it.
6489         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6491 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6493         * diagnostic-show-locus.c (layout::layout): Update for
6494         location_get_source_line returning a char_span.
6495         (struct char_span): Move to input.h.
6496         (struct correction): Update for fields in char_span becoming
6497         private.
6498         (struct source_line): Update for location_get_source_line
6499         returning a char_span.
6500         (layout::print_line): Likewise.
6501         * edit-context.c (edited_file::print_content): Likewise.
6502         (edited_file::print_diff_hunk): Likewise.
6503         (edited_file::print_run_of_changed_lines): Likewise.
6504         (edited_file::get_num_lines): Likewise.
6505         (edited_line::edited_line): Likewise.
6506         * final.c (asm_show_source): Likewise.
6507         * input.c (location_get_source_line): Convert return type
6508         from const char * to char_span, losing the final "line_len"
6509         param.
6510         (dump_location_info): Update for the above.
6511         (get_substring_ranges_for_loc): Likewise.  Use a char_span
6512         when handling the literal within the line.
6513         (test_reading_source_line): Update for location_get_source_line
6514         returning a char_span.
6515         * input.h (class char_span): Move here from
6516         diagnostic-show-locus.c, converting from a struct to a class.
6517         Make data members private.
6518         (char_span::operator bool): New.
6519         (char_span::length): New.
6520         (char_span::get_buffer): New.
6521         (char_span::operator[]): New.
6522         (char_span::subspan): Make const.
6523         (char_span::xstrdup): New.
6524         (location_get_source_line): Convert return type from const char *
6525         to char_span, losing the final "line_size" param.
6527 2018-04-30  Jan Hubicka  <jh@suse.cz>
6529         * lto-wrapper.c (ltrans_priorities): New static var.
6530         (cmp_priority): New.
6531         (run_gcc): Read priorities and if doing parallel build order
6532         the Makefile by them.
6534 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6536         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6538 2018-04-30  Richard Biener  <rguenther@suse.de>
6540         * tree-cfg.c (verify_address): Remove base argument, add
6541         flag whether to check TREE_ADDRESSABLE and do that.
6542         (verify_expr): Remove.
6543         (verify_types_in_gimple_reference): Add pieces from verify_expr.
6544         (verify_gimple_assign_single): Likewise.
6545         (verify_gimple_switch): Likewise.
6546         (verify_expr_location_1): Dereference tp once.  Add (disabled)
6547         piece from verify_expr.
6548         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6550 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6552         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6554 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6556         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6557         (small_data_pattern): Likewise.
6558         (arc_rewrite_small_data): Likewise.
6559         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6560         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6561         (get_symbol_alignment): New function.
6562         (legitimate_small_data_address_p): Likewise.
6563         (legitimate_scaled_address): Update, call
6564         legitimate_small_data_address_p.
6565         (output_sdata): New static variable.
6566         (arc_print_operand): Update how we handle small data operands.
6567         (arc_print_operand_address): Likewise.
6568         (arc_legitimate_address_p): Update, use
6569         legitimate_small_data_address_p.
6570         (arc_rewrite_small_data_p): Remove.
6571         (arc_rewrite_small_data_1): Likewise.
6572         (arc_rewrite_small_data): Likewise.
6573         (small_data_pattern): Likewise.
6574         (compact_sda_memory_operand): Update to use
6575         legitimate_small_data_address_p and get_symbol_alignment.
6576         (prepare_move_operands): Don't rewite sdata pattern.
6577         (prepare_extend_operands): Remove.
6578         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6579         pattern.
6580         (zero_extendqisi2): Likewise.
6581         (zero_extendhisi2): Likewise.
6582         (extendqihi2): Likewise.
6583         (extendqisi2): Likewise.
6584         (extendhisi2): Likewise.
6585         (addsi3): Likewise.
6586         (subsi3): Likewise.
6587         (andsi3): Likewise.
6588         * config/arc/constraints.md (Usd): Change it to memory constraint.
6590 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6592         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6593         as source of std instructions.
6594         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6595         allow 6-bit constants as source for store instructions.
6596         (movdi_insn): Update instruction pattern to allow 6-bit constants
6597         as source for store instructions.
6599 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6601         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6603 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6604             Sandra Loosemore <sandra@codesourcery.com>
6606         * dumpfile.c (dump_open): Allow '-' for stdout.
6607         * doc/invoke.texi (Developer Options): Document dump filename
6608         determination early.  Document stdin/stdout selection.
6610 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6612         Microblaze Target: PIC data text relative
6614         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6615         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6616         Add declaration.
6617         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6618         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6619         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6620         New addressing mode for data-text relative position indepenedent code.
6621         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6622         'ADDRESS_SYMBOLIC_TXT_REL'.
6623         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6624         (microblaze_legitimate_pic_operand): Exclude function calls from
6625         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6626         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6627         addresses cases.
6628         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6629         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6630         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6631         for 'address + offset'.
6632         (microblaze_expand_prologue): Add new function prologue call for
6633         'r20' assignation.
6634         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6635         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6636         table in case of TARGET_PIC_DATA_TEXT_REL.
6637         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6638         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6639         Add new macros 'UNSPEC_TEXT',
6640         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6641         + exclude function calls from 'UNSPEC_PLT' in case of data text
6642         relative mode.
6643         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6644         new target hook for generating address diff vector tables in case of
6645         flag_pic.
6646         * doc/tm.texi : Regenerate.
6647         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6648         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6649         of addr diff vector generation.
6650         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6651         target hook definition.
6652         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6653         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6654         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6655         option for data text relative.
6657 2018-04-30  Richard Biener  <rguenther@suse.de>
6659         * tree-chrec.h (evolution_function_is_constant_p): Remove
6660         redundant check.
6661         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6663 2018-04-30  Richard Biener  <rguenther@suse.de>
6665         PR bootstrap/85571
6666         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6668 2018-04-30  Richard Biener  <rguenther@suse.de>
6670         PR tree-optimization/28364
6671         PR tree-optimization/85275
6672         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6673         copying first exit test.
6675 2018-04-28  Mark Wielaard  <mark@klomp.org>
6677         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6678         dwarf_version >= 5.
6679         (dwarf_AT): Handle DW_AT_addr_base.
6680         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6682 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6684         PR target/84431
6685         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6686         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6687         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6688         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6690 2018-04-28  Richard Biener  <rguenther@suse.de>
6692         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6693         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6694         to reflect use.  Only add interesting stmts.
6696 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6698         PR ipa/85549
6699         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6700         the jump function allows for passing through aggregate values.
6702 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6704         * input.h (in_system_header_at): Convert from macro to inline
6705         function.
6706         (from_macro_expansion_at): Likewise.
6707         (from_macro_definition_at): Likewise.
6709 2018-04-27  Jeff Law  <law@redhat.com>
6711         * config.gcc: Mark tile* targets as deprecated/obsolete.
6713 2018-04-27  Richard Biener  <rguenther@suse.de>
6715         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6716         fix for ILP32.
6718 2018-04-27  Richard Biener  <rguenther@suse.de>
6720         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6722 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6724         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6725         with Yd constraint. Set "preferred_for_speed" attribute from
6726         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6727         with Yd constraint.
6728         (*movdi_internal): Ditto.
6729         (movti_interunit splitters): Remove
6730         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6731         (movdi_interunit splitters): Ditto.
6732         * config/i386/constraints.md (Ye): Remove.
6733         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6735 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6737         PR target/85512
6738         * config/aarch64/constraints.md (Usg): Limit to 31.
6739         (Usj): Limit to 63.
6741 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6743         PR tree-optimization/85529
6744         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6745         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6746         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6747         zero extension or masking of the MSB bit.
6748         (optimize_range_tests): Add FIRST_BB argument, pass it through
6749         to optimize_range_tests_var_bound.
6750         (maybe_optimize_range_tests, reassociate_bb): Adjust
6751         optimize_range_tests callers.
6753 2018-04-26  Richard Biener  <rguenther@suse.de>
6754             Jakub Jelinek  <jakub@redhat.com>
6756         * cgraph.h (symbol_table): Just declare debug method here.
6757         * symtab.c (symbol_table::debug): Define.
6759 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6761         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6763 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6765         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6766         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6767         (*movdi_internal): Substitute Yi and Yj constraint with x
6768         and Ym and Yn constraint with y constraint.  Update "isa"
6769         attribute and set "preferred_for_speed" attribute from
6770         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6771         (*movsi_internal): Ditto.
6772         (*movdf_internal): Ditto.
6773         (*movsf_internal): Ditto.
6774         (*zero_extendsidi2): Ditto.
6775         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6776         (sse2_loadld): Ditto.
6777         (*vec_extract<ssevecmodelower>_0): Ditto.
6778         (*vec_extractv4si_0_zext_sse4): Ditto.
6779         (vec_concatv2di): Ditto.
6780         (*vec_dup<mode>): Ditto.
6781         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6782         * config/i386/constraints.md (Yi): Remove.
6783         (Yj): Remove.
6784         (Ym): Remove.
6785         (Yn): Remove.
6787 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6789         * dumpfile.c (dump_open): New.
6790         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6791         (dump_finish): Detect stdio/stderr by value not name.
6793 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6795         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6797 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6799         PR target/84952
6800         * config/nvptx/nvptx.c (verify_neutering_jumps)
6801         (verify_neutering_labels): New function
6802         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6804 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6806         PR target/84025
6807         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6808         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6809         need neutering.
6811 2018-04-26  Richard Biener <rguenther@suse.de>
6812             Tom de Vries  <tom@codesourcery.com>
6814         PR lto/85422
6815         * lto-streamer-out.c (output_function): Fixup loops if required to match
6816         discovery done in the reader.
6818 2018-04-26  Richard Biener  <rguenther@suse.de>
6820         PR tree-optimization/85116
6821         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6822         have a loop exit from the single latch predecessor.  Remove
6823         case of header with just condition.
6824         (ch_base::copy_headers): Exclude infinite loops from any
6825         processing.
6826         (pass_ch::execute): Record exits.
6828 2018-04-26  Richard Biener  <rguenther@suse.de>
6830         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6831         prologue cost vector and pass it to vect_get_load_cost.
6832         (vect_get_peeling_costs_all_drs): Likewise.
6833         (vect_peeling_hash_get_lowest_cost): Likewise.
6834         (vect_enhance_data_refs_alignment): Likewise.
6836 2018-04-26  Richard Biener  <rguenther@suse.de>
6838         PR middle-end/85450
6839         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6840         checking of integer<->pointer conversions.
6841         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6842         sign-/zero-extending pointer types.
6843         (expand_omp_for_static_chunk): Likewise.
6845 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6846             Jean Lee  <xiaoyur347@gmail.com>
6848         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6849         (TARGET_ASAN_SHADOW_OFFSET): Define.
6850         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6851         true for -fsanitize=address.
6853 2018-04-25  Mark Wielaard  <mark@klomp.org>
6855         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6856         shorter ones.
6858 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6860         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6861         than "alu", remove explicit "memory" and "imm_disp" attributes.
6862         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6864         PR middle-end/85414
6865         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6866         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6867         gen_lowpart_no_emit.
6869 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6871         PR target/85473
6872         * config/i386/i386.c (ix86_expand_builtin): Change memory
6873         operand to XI, extend p0 to Pmode.
6874         * config/i386/i386.md: Change unspec volatile and operand
6875         1 mode to XI, change operand 0 mode to P.
6877 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6879         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6880         GET_MODE_MASK before any checking.
6881         (nds32_can_use_bset_p): Likewise.
6882         (nds32_can_use_btgl_p): Likewise.
6884 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6886         * config/nds32/nds32-doubleword.md: New define_split pattern for
6887         illegal register number.
6889 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6891         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6893 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6895         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6897 2018-04-25  Richard Biener  <rguenther@suse.de>
6899         * lto-streamer.h (LTO_major_version): Bump to 8.
6901 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6903         * BASE-VER: Set to 9.0.0.
6905 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6907         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6908         in __abskf2 and __powikf2.
6910 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6912         PR target/85512
6913         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6914         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6915         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6916         Use the above on operand 2.  Reindent.
6917         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6919 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6921         PR target/85485
6922         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6923         handle OPT_mcet.
6924         * config/i386/i386.opt (mcet): Removed.
6925         * doc/install.texi: Remove -mcet documentation.
6926         * doc/invoke.texi: Likewise.
6928 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6930         PR target/85485
6931         * doc/install.texi: Remove -mcet from bootstrap-cet.
6933 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6935         PR target/85511
6936         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6937         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6938         if TARGET_64BIT.
6940         PR target/85503
6941         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6942         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6943         containing a CONST_VECTOR.
6945 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6947         * doc/install.texi: Update newlib dependency for nvptx.
6949 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6951         PR target/85508
6952         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6953         instead of INTVAL when shifting x left.
6955 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6957         PR tree-optimization/85478
6958         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6959         vect_grouped_store_supported for single element vectors.
6961 2018-04-24  Richard Biener  <rguenther@suse.de>
6963         PR target/85491
6964         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6965         load cost increase to the case of non-constant step.
6967 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6969         PR target/84828
6970         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6971         destination if any_malformed_asm.
6973 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6975         PR middle-end/85496
6976         * expr.c (store_field): In the bitfield case, if the value comes from
6977         a function call and is returned in registers by means of a PARALLEL,
6978         do not change the mode of the temporary unless BLKmode and VOIDmode.
6980 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6982         PR rtl-optimization/85423
6983         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6984         dependencies to debug insns when the previous insn is non-debug.
6986 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6988         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6989         enums into a single definition.
6990         (fls): Fix predicates and printing.
6991         (seti): Likewise.
6993 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6995         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6996         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6997         and short u6 immediate.
6998         (check_if_valid_sleep_operand): Remove.
6999         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
7001 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7003         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
7004         flag_always_save_lp condition.
7005         * config/nds32/nds32.opt (malways-save-lp): New option.
7007 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7009         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
7010         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
7011         * config/nds32/nds32.h
7012         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
7013         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
7015 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7017         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
7018         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
7020 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7021             Chung-Ju Wu  <jasonwucj@gmail.com>
7023         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
7024         Declare.
7025         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
7026         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
7028 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7030         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
7032 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7034         * config/nds32/nds32-protos.h (nds32_data_alignment,
7035         nds32_local_alignment): Declare.
7036         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7037         nds32_local_alignment): New functions.
7038         (TARGET_CONSTANT_ALIGNMENT): Define.
7039         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7041 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7043         * config/nds32/nds32.c
7044         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7045         (TARGET_MODES_TIEABLE_P): Likewise.
7047 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7049         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7050         level Ofast and Og.
7052 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
7053             Chung-Ju Wu  <jasonwucj@gmail.com>
7055         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7056         for unaligned access.
7057         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7058         unaligned access.
7059         * config/nds32/nds32-intrinsic.md: Likewise.
7060         * config/nds32/nds32_intrinsic.h: Likewise.
7061         * config/nds32/nds32.h (nds32_builtins): Likewise.
7062         * config/nds32/nds32.opt (munaligned-access): New option.
7063         * config/nds32/nds32.c (nds32_asm_file_start): Display
7064         flag_unaligned_access status.
7066 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7068         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7069         -mno-relax is present.
7070         * config/riscv/linux.h (LINK_SPEC): Ditto.
7072 2018-04-20  Martin Sebor  <msebor@redhat.com>
7074         PR c/85365
7075         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7076         for null pointers.
7077         (gimple_fold_builtin_stxcpy_chk): Same.
7078         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7080 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
7082         PR target/85456
7083         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7084         __powikf2 when long double is IEEE 128-bit.
7086 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7088         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7089         step to make sure stack always aligned.
7091 2018-04-20  Carl Love  <cel@us.ibm.com>
7093         PR target/83402
7094         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7095         size check for arg0.
7097 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7098             Tom de Vries  <tom@codesourcery.com>
7100         PR target/85445
7101         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7102         Emit insns for calls too.
7103         (nvptx_find_par): Always look for worker-level predecessor insn.
7104         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
7105         calls.
7106         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7107         (nvptx_process_pars): Propagate frames for calls.
7109 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
7111         PR target/85469
7112         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7113         Removed.
7114         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7115         (ix86_handle_option): Don't handle OPT_mibt.
7116         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7117         __SHSTK__.
7118         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7119         has_ibt and ibt.
7120         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7121         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7122         (ix86_target_macros): Define __CET__ with flag_cf_protection
7123         for -fcf-protection.
7124         * config/i386/i386.c (isa2_opts): Remove -mibt.
7125         * config/i386/i386.h (TARGET_IBT): Removed.
7126         (TARGET_IBT_P): Likewise.
7127         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7128         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7129         * config/i386/i386.opt (mcet): Update help message.
7130         (mshstk): Likewise.
7131         (mibt): Removed.
7132         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
7133         -mcet as an alias for -mshstk.
7135 2018-04-20  Richard Biener <rguenther@suse.de>
7137         PR middle-end/85475
7138         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7139         complexity by forcing a single use of the multiply operand.
7141 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7143         ipa/85449
7144         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7145         recursion dependency to only apply to non-clones.
7147 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7149         ipa/85447
7150         * ipa-cp.c (create_specialized_node): Check that clones of
7151         self-recursive edges exist during IPA-CP.
7153 2018-04-19  Toon Moene  <toon@moene.org>
7155         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7156         by -O3.
7158 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7160         PR tree-optimization/85467
7161         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7162         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
7163         VECTOR_CST element to type.
7165 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7167         PR target/85397
7168         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7169         * config/i386/i386.md (builtin_setjmp_setup): Removed.
7170         (builtin_longjmp): Likewise.
7171         (save_stack_nonlocal): New pattern.
7172         (restore_stack_nonlocal): Likewise.
7174 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7176         PR target/85404
7177         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7178         Replace ASM_OUTPUT_LABEL with fprintf.
7180 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7182         PR target/85417
7183         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7184         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7185         * config/i386/i386-c.c (ix86_target_macros_internal): Also
7186         define __IBT__ and __SHSTK__ for -fcf-protection.
7187         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7188         TARGET_IBT.
7189         (ix86_trampoline_init): Likewise.
7190         (x86_output_mi_thunk): Likewise.
7191         (ix86_notrack_prefixed_insn_p): Likewise.
7192         (ix86_option_override_internal): Don't disallow -fcf-protection.
7193         * config/i386/i386.md (rdssp<mode>): Also enable for
7194         -fcf-protection.
7195         (incssp<mode>): Likewise.
7196         (nop_endbr): Likewise.
7197         * config/i386/i386.opt (mcet): Change help message to built-in
7198         functions only.
7199         (mibt): Likewise.
7200         (mshstk): Likewise.
7201         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7202         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
7203         enable CET built-in functions.
7205 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
7207         * common/config/i386/i386-common.c
7208         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7209         OPTION_MASK_ISA_MOVDIRI_UNSET,
7210         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7211         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7212         * config.gcc (movdirintrin.h): New header.
7213         * config/i386/cpuid.h (bit_MOVDIRI,
7214         bit_MOVDIR64B): New bits.
7215         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7216         and -mmvodir64b.
7217         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7218         (VOID, PVOID, PCVOID)): New function types.
7219         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7220         __builtin_ia32_directstoreu_u64,
7221         __builtin_ia32_movdir64b): New builtins.
7222         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7223         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7224         and -mmovdiri.
7225         (ix86_valid_target_attribute_inner_p): Ditto.
7226         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7227         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7228         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7229         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7230         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7231         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7232         (movdiri<mode>, movdir64b_<mode>): New.
7233         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7234         * config/i386/immintrin.h: Include movdirintrin.h.
7235         * config/i386/movdirintrin.h: New file.
7236         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7238 2018-04-19  Richard Biener  <rguenther@suse.de>
7240         PR middle-end/85455
7241         * cfg.c (clear_bb_flags): When loop state says we have
7242         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7244 2018-04-19  Richard Biener  <rguenther@suse.de>
7246         PR tree-optimization/84737
7247         * tree-vect-data-refs.c (vect_copy_ref_info): New function
7248         copying restrict info.
7249         (vect_setup_realignment): Use it.
7250         * tree-vectorizer.h (vect_copy_ref_info): Declare.
7251         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7252         the first DR to all generated stores.
7253         (vectorizable_load): Likewise for loads.
7255 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7257         PR tree-optimization/85446
7258         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7259         the integral and pointer types to have the same precision.
7261         * doc/install.texi: Document --disable-cet being the default and
7262         --enable-cet=auto.
7264 2018-04-18  Martin Liska  <mliska@suse.cz>
7266         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7267         style.
7269 2018-04-18  Martin Liska  <mliska@suse.cz>
7271         Revert
7272         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
7274         PR ipa/83983
7275         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7276         arguments if they are comparable.
7278 2018-04-18  Martin Liska  <mliska@suse.cz>
7280         Revert
7281         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7283         PR lto/84805
7284         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7285         incomplete types.
7287 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
7289         PR target/85388
7290         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7291         ENDBR after calling __morestack.
7293 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
7295         PR jit/85384
7296         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7297         by using gcc_base_ver to generate a gcc_driver_version, and use
7298         it when generating GCC_DRIVER_NAME.
7299         * configure: Regenerate.
7301 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
7303         PR target/81084
7304         * config.gcc: Obsolete powerpc*-*-*spe*.
7306 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7308         PR debug/84637
7309         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7310         (stabstr_D): Change type of unum from unsigned int to
7311         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
7312         type.
7314 2018-04-17  Jim Wilson  <jimw@sifive.com>
7316         PR 84856
7317         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7318         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7319         Set arg_pointer_offset after using pretend_args_size.
7321 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7323         PR rtl-optimization/85431
7324         * dse.c (record_store): Ignore zero width stores.
7326         PR sanitizer/85230
7327         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
7328         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7329         __builtin_stack_restore rather than after it.
7330         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7331         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7332         argument instead of virtual_dynamic_stack_rtx.
7334 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7336         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7337         New prototype.
7338         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7339         Add note to error message to explain internal mapping of overloaded
7340         built-in function name to non-overloaded built-in function name.
7341         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7342         function.
7344 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
7346         PR target/85424
7347         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7348         where the inputs overlap with the output.
7350 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7352         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7353         (=v, v) alternative and explicit "memory" attribute.
7354         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
7355         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7356         attributes.
7357         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7358         "sselog1" type instead of "sselog".
7359         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7360         "sselog".  Remove explicit "memory" attribute.
7361         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7362         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7363         attributes.
7364         (vec_extract_hi_v32hi): Merge all alternatives into one, use
7365         "sselog1" type instead of "sselog".  Remove explicit "memory"
7366         attribute.
7367         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7368         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7369         attribute.
7370         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7371         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7372         attributes.
7373         (vec_extract_hi_v64qi): Merge all alternatives into one, use
7374         "sselog1" type instead of "sselog".  Remove explicit "memory"
7375         attribute.
7376         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7377         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7378         attribute.
7380         PR target/85430
7381         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7383         PR middle-end/85414
7384         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7385         on a SUBREG.
7387 2018-04-17  Martin Jambor  <mjambor@suse.cz>
7389         PR ipa/85421
7390         * ipa-cp.c (create_specialized_node): Call
7391         expand_all_artificial_thunks if necessary.
7393 2018-04-17  Martin Liska  <mliska@suse.cz>
7395         PR lto/85405
7396         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7397         in message, remote space in between '_G' and '('.
7399 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7401         PR target/85281
7402         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7403         avx512f_vmcmp<mode>3<round_saeonly_name>,
7404         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7405         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7406         avx512f_rndscale<mode><round_saeonly_name>,
7407         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7408         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7409         Use %<iptr>2 instead of %2 for -masm=intel.
7410         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7411         avx512f_vcvttss2usi<round_saeonly_name>,
7412         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7413         -masm=intel.
7414         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7415         avx512f_vcvttsd2usi<round_saeonly_name>,
7416         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7417         Use %q1 instead of %1 for -masm=intel.
7418         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7419         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7420         of %3 for -masm=intel.
7421         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7422         -masm=intel.
7423         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7424         -masm=intel.
7425         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7426         -masm=intel.
7427         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7428         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7429         %g1.
7430         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7431         -masm=intel.
7432         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7433         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7434         %g1 and one with %0 and %1.
7435         (avx512er_vmrcp28<mode><round_saeonly_name>,
7436         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7437         %1 for -masm=intel.
7438         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7439         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7440         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7441         of %0 and %{%4%} for -masm=intel.
7442         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7443         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7444         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7445         order of %0 and %{%5%}%{z%} for -masm=intel.
7447 2018-04-17  Jan Hubicka  <jh@suse.cz>
7449         PR lto/85405
7450         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7452 2018-04-17  Martin Liska  <mliska@suse.cz>
7454         PR ipa/85329
7455         * multiple_target.c (create_dispatcher_calls): Set apostrophes
7456         for target_clone error message.  Make default implementation
7457         clone to be a local declaration.
7458         (separate_attrs): Add new argument and check for an empty
7459         string.
7460         (expand_target_clones): Handle it.
7461         (ipa_target_clone): Make redirection just for target_clones
7462         functions.
7464 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
7465             Tom de Vries  <tom@codesourcery.com>
7467         PR middle-end/84955
7468         * omp-expand.c (expand_oacc_for): Add dummy false branch for
7469         tiled basic blocks without omp continue statements.
7471 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
7473         PR target/83660
7474         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7475         vec_extract expression as having side effects to make sure it gets
7476         a cleanup point.
7478 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
7480         PR target/85403
7481         * config/i386/i386.c (get_builtin_code_for_version): Check
7482         error_mark_node.
7484 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
7486         PR target/84331
7487         * gcc/config.gcc: Support "skylake".
7488         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7489         PROCESSOR_SKYLAKE.
7490         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7491         (processor_target_table): Add "skylake".
7492         (ix86_option_override_internal): Add "skylake".
7493         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7494         PROCESSOR_CANNONLAKE.
7495         (get_builtin_code_for_version): Fix priority for
7496         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7497         PROCESSOR_SKYLAKE-AVX512.
7498         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7499         (processor_type): Add PROCESSOR_SKYLAKE.
7501 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
7502             Jason Merrill  <jason@redhat.com>
7504         PR c++/85112
7505         * convert.c (convert_to_integer_1): Use direct recursion for
7506         enumeral types and types with a precision less than the number
7507         of bits in their mode.
7509 2018-04-16  Julia Koval  <julia.koval@intel.com>
7511         PR target/84413
7512         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7513         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7515 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
7517         PR target/85293
7518         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7519         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7520         and -mno-direct-move.
7522 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
7524         PR target/83402
7525         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7526         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7527         Ensure negative shifts result in {0}.
7529 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
7531         PR rtl-optimization/79916
7532         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7533         regs (if any) to define how to gnerate SD moves when LRA is in
7534         progress.
7536 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
7538         PR rtl-optimization/85393
7539         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7540         * except.c (expand_dw2_landing_pad_for_region): Make static.
7541         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7542         a label and unconditional jump to old_bb, rather than
7543         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7544         basic block.
7546         PR rtl-optimization/85376
7547         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7548         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7549         instead of a specific value.
7551 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7552             Bin Cheng  <bin.cheng@arm.com>
7554         PR tree-optimization/82965
7555         PR tree-optimization/83991
7556         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7557         by_profile_only parameter.
7558         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7559         information if the loop was predicted to iterate too many times.
7560         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7562 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7564         PR lto/71991
7565         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7566         always inline.
7568 2018-04-13  Martin Liska  <mliska@suse.cz>
7569             Jakub Jelinek  <jakub@redhat.com>
7571         PR middle-end/81657
7572         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7573         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7574         * builtins.c (expand_builtin_memory_copy_args): Use
7575         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7576         handle dest_addr == pc_rtx.
7578 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7580         PR target/85291
7581         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7582         asked to not generate direct moves.
7583         (fix_trunc<mode>si2_stfiwx): Similar.
7584         (fix_trunc<mode>si2_internal): Similar.
7586 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7588         PR debug/83157
7589         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7590         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7591         lookup if dest in some wider mode is known to be const0_rtx and
7592         if so, record permanent equivalence for it to be ZERO_EXTEND of
7593         the narrower mode destination.
7595 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7597         * lto-streamer-out.c (output_function): Revert 259346.
7598         * omp-expand.c (expand_oacc_for): Likewise.
7600 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7602         PR rtl-optimization/85354
7603         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7604         * sel-sched.c (sel_global_init): ... here.
7606 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7608         PR target/85238
7609         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7610         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7611         mode for PE-COFF targets.
7612         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7613         (i386_pe_asm_lto_end): Likewise.
7614         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7615         (TARGET_ASM_LTO_END): Likewise.
7616         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7617         (i386_pe_asm_lto_start): New function.
7618         (i386_pe_asm_lto_end): Likewise.
7620 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7621             Richard Biener  <rguenther@suse.de>
7623         PR middle-end/84955
7624         * lto-streamer-out.c (output_function): Fix CFG loop state before
7625         streaming out.
7626         * omp-expand.c (expand_oacc_for): Handle calls to internal
7627         functions like regular functions.
7629 2018-04-12  Richard Biener  <rguenther@suse.de>
7631         PR lto/85371
7632         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7633         for the early LTO debug to properly generate references to it
7634         during DIE emission.  Do not re-use that for the skeleton for
7635         split-dwarf.
7636         (dwarf2out_early_finish): Likewise.
7638 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7640         PR target/85328
7641         * config/i386/sse.md
7642         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7643         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7644         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7645         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7646         and output is a reg, avoid creating invalid lowpart subreg, but
7647         instead split into a 512-bit move.  Don't split if not AVX512VL,
7648         input is xmm16+ reg and output is a mem.
7649         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7650         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7651         xmm16+ reg and output is a mem.
7653 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7655         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7656         also for flag_dwarf2_cfi_asm.
7658 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7660         PR rtl-optimization/85342
7661         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7662         a bool scalar var inside of the loop instead.  Don't try to update
7663         recog_data.operand after failed apply_change_group.
7665 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7667         PR target/85296
7668         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7669         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7670         array with flexible array member as array without given dimension.
7671         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7672         argument for undefined param to true.
7674 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7676         PR target/85321
7677         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7678         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7679         from PowerPC section.
7680         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7681         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7682         help text that is too long.
7683         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7684         help text that is too long.
7685         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7686         help text that is too long.
7688 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7690         * config/alpha/alpha.md (stack_probe_internal): Rename
7691         from "probe_stack".  Update all callers.
7693 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7695         PR rtl-optimization/84566
7696         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7697         sched_macro_fuse_insns.
7699 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7701         PR target/84301
7702         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7703         (compute_block_dependences): ... from here.
7705 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7707         PR tree-optimization/85331
7708         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7709         from int to HOST_WIDE_INT.
7711 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7713         PR ipa/84149
7714         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7715         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7716         not the same as the source val.
7717         (cgraph_edge_brings_value_p): New parameter.
7718         (gather_edges_for_value): Pass destination value to
7719         cgraph_edge_brings_value_p.
7720         (perhaps_add_new_callers): Likewise.
7721         (get_info_about_necessary_edges): Likewise and exclude values brought
7722         only by self-recursive edges.
7723         (create_specialized_node): Redirect only clones of self-calling edges.
7724         (+self_recursive_pass_through_p): New function.
7725         (find_more_scalar_values_for_callers_subset): Use it.
7726         (find_aggregate_values_for_callers_subset): Likewise.
7727         (known_aggs_to_agg_replacement_list): Removed.
7728         (decide_whether_version_node): Re-calculate known constants for all
7729         remaining context clones.
7731 2018-04-11  Richard Biener  <rguenther@suse.de>
7733         PR lto/85339
7734         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7735         from early DWARF output.
7736         (dwarf2out_early_finish): Output line info unconditionally into
7737         early DWARF and add reference to it.
7739 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7741         PR target/85281
7742         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7743         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7744         other than V2DFmode using iptr mode attribute.
7745         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7747 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7749         PR rtl-optimization/84659
7750         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7752 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7754         PR debug/85302
7755         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7756         SIZEP is NULL.
7757         (output_loc_list): Pass address of a dummy size variable even in the
7758         locview handling loop.
7759         (index_location_lists): Add comment on why skip_loc_list_entry can't
7760         call size_of_locs.
7762 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7764         PR target/85261
7765         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7766         into register.
7768 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7770         PR target/85321
7771         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7772         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7773         and -mstring-compare-inline-limit.
7775 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7777         PR target/85287
7778         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7779         for stack clash protection in a register whenever we need it to be in
7780         a register.
7782 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7784         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7785         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7787 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7789         PR target/85321
7790         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7791         the help text.
7792         (mlong-double-): Ditto.
7793         * config/rs6000/sysv4.opt (msdata=): Ditto.
7794         (mtls-size=): Ditto.
7796 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7798         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7799         erroneous entries for
7800         "vector int vec_ldl (int, long int *)", and
7801         "vector unsigned int vec_ldl (int, unsigned long int *)".
7802         Add comments and entries for
7803         "vector bool char vec_ldl (int, bool char *)",
7804         "vector bool short vec_ldl (int, bool short *)",
7805         "vector bool int vec_ldl (int, bool int *)",
7806         "vector bool long long vec_ldl (int, bool long long *)",
7807         "vector pixel vec_ldl (int, pixel *)",
7808         "vector long long vec_ldl (int, long long *)",
7809         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7810         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7811         type tree bool_long_long_type_node and correct definition of
7812         bool_V2DI_type_node to make reference to this new type tree.
7813         (rs6000_mangle_type): Replace erroneous reference to
7814         bool_long_type_node with bool_long_long_type_node.
7815         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7816         comments to emphasize sign distinctions for char and int types and
7817         replace RS6000_BTI_bool_long constant with
7818         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7819         use of RS6000_BTI_pixel.
7820         (bool_long_type_node): Remove this macro definition.
7821         (bool_long_long_type_node): New macro definition
7823 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7825         PR rtl-optimization/85300
7826         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7827         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7828         simplify_unary_operation fails.
7830 2018-04-10  Martin Liska  <mliska@suse.cz>
7832         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7833         cgraph_edge and ipa_ref.
7835 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7837         PR target/85177
7838         PR target/85255
7839         * config/i386/sse.md
7840         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7841         computation of the VEC_MERGE selector from mask.
7842         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7843         Fix decoding of the VEC_MERGE selector into mask.
7845 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7847         PR tree-optimization/85286
7848         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7850 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7852         * final.c (final_1): Set insn_last_address as well as
7853         insn_current_address.
7855 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7857         PR target/85173
7858         * explow.c (emit_stack_probe): Call validize_mem on memory location
7859         before passing it to gen_probe_stack.  Create address operand and
7860         legitimize it for the probe_stack_address case.
7862 2018-04-09  Jan Hubicka  <jh@suse.cz>
7864         PR lto/85078
7865         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7866         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7867         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7868         walk basetypes.
7869         (free_lang_data): Rebuild type inheritance graph.
7871 2018-04-09  Martin Sebor  <msebor@redhat.com>
7873         * invoke.texi (-finline-small-functions): Mention other optimization
7874         options.
7875         (-findirect-inlining, -fpartial-inlining): Same.
7876         (-finline-functions-called-once): Same.
7877         (-freorder-blocks-and-partition): Same.
7879 2018-04-09  Jan Hubicka  <jh@suse.cz>
7881         PR rtl/84058
7882         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7883         jumps; choose last target that matches the criteria (i.e.
7884         no partition changes for non-crossing jumps).
7885         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7886         support for redirecting crossing jumps to non-crossing.
7888 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7890         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7891         also for naked functions.
7893 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7895         * config/arc/arc.md (add_shift): New pattern.
7896         (add_shift2): Likewise.
7897         (sub_shift): Likewise.
7898         (sub_shift_cmp0_noout): Likewise.
7899         (compare_si_ashiftsi): Likewise.
7900         (xbfu_cmp0_noout): New combine pattern.
7901         (xbfu_cmp0"): Likewise.
7902         (movsi_set_cc_insn): Place the predicable variant first.
7903         (commutative_binary_cmp0_noout): Remove clobber.
7904         (commutative_binary_cmp0): New pattern.
7905         (noncommutative_binary_cmp0): Likewise.
7906         (noncommutative_binary_cmp0_noout): Likewise.
7907         (noncommutative_binary_comparison_result_used): Removed.
7908         (rsub_cmp0): New pattern.
7909         (rsub_cmp0_noout): Likewise.
7910         (extzvsi): Changed, keep only meaningful variants.
7911         (SQH, SEZ): New iterators.
7912         (SQH_postfix): New mode attribute.
7913         (SEZ_prefix): New code attribute.
7914         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7915         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7916         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7917         of numerical value.
7918         (noncommutative_operator): Check the availability of barrel
7919         shifter option.
7921 2018-04-09  Richard Biener  <rguenther@suse.de>
7923         PR tree-optimization/85284
7924         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7925         Only use the niter constraining form of simple_iv when the exit
7926         is always executed.
7928 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7930         PR target/84041
7931         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7932         (define_expand "*memory_barrier"): New define_expand.
7933         (define_insn "memory_barrier"): New insn.
7935 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7937         PR rtl-optimization/80463
7938         PR rtl-optimization/83972
7939         PR rtl-optimization/83480
7941         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7942         correct producer for the insn.
7943         (tidy_control_flow): Fixup seqnos in case of debug insns.
7945 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7947         PR rtl-optimization/83913
7949         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7950         different sched-times when merging exprs.
7952 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7954         PR rtl-optimization/83962
7956         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7957         tidy_fallthru_edge and tidy_control_flow.
7959 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7961         PR rtl-optimization/83530
7963         * sel-sched.c (force_next_insn): New global variable.
7964         (remove_insn_for_debug): When force_next_insn is true, also leave only
7965         next insn in the ready list.
7966         (sel_sched_region): When the region wasn't scheduled, make another pass
7967         over it with force_next_insn set to 1.
7969 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7971         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7972         into tm_file.
7973         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7974         for interrupt control.
7975         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7976         functions for interrupt control.
7977         * config/nds32/nds32-intrinsic.md: Likewise.
7978         * config/nds32/nds32_intrinsic.h: Likewise.
7979         * config/nds32/nds32.h (nds32_builtins): Likewise.
7981 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7983         * config/nds32/nds32.c (nds32_init_machine_status,
7984         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7985         strict_aligned_p field.
7986         (nds32_expand_to_rtl_hook): New function.
7987         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7988         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7990 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7991             Chung-Ju Wu  <jasonwucj@gmail.com>
7993         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7994         * config/nds32/nds32-n7.md: New file.
7995         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7996         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7997         pipeline.
7998         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7999         * config/nds32/nds32.md (pipeline_model): Add n7.
8000         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
8001         * config/nds32/pipelines.md: Include n7 settings.
8003 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8004             Chung-Ju Wu  <jasonwucj@gmail.com>
8006         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
8007         * config/nds32/nds32-e8.md: New file.
8008         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
8009         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
8010         pipeline.
8011         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
8012         * config/nds32/nds32.md (pipeline_model): Add e8.
8013         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
8014         * config/nds32/pipelines.md: Include e8 settings.
8016 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8017             Chung-Ju Wu  <jasonwucj@gmail.com>
8019         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
8020         * config/nds32/nds32-n8.md: New file.
8021         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
8022         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
8023         pipeline.
8024         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
8025         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
8026         * config/nds32/nds32.md (pipeline_model): Add n8.
8027         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
8028         * config/nds32/pipelines.md: Include n8 settings.
8030 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8031             Chung-Ju Wu  <jasonwucj@gmail.com>
8033         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8034         * config/nds32/nds32-n9-2r1w.md: New file.
8035         * config/nds32/nds32-n9-3r2w.md: New file.
8036         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8037         nds32_register_ports): New or modify for cpu n9.
8038         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8039         pipeline.
8040         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8041         * config/nds32/nds32-utils.c: New file.
8042         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8043         TARGET_MUL_SLOW): Define.
8044         * config/nds32/nds32.md (pipeline_model): New attribute.
8045         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8046         New options that support cpu n9.
8047         * config/nds32/pipelines.md: Include n9 settings.
8048         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8050 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8052         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8053         information if necessary.
8054         (output_cond_branch_compare_zero): Likewise.
8055         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8056         (nds32_target_alignment): Refine for alignment.
8057         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8058         (FUNCTION_BOUNDARY): Modify.
8059         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8060         align case.
8061         * config/nds32/nds32.opt (malways-align, malign-functions): New.
8063 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8065         * config/nds32/constants.md (unspec_volatile_element): Add values for
8066         TLB operation and data prefetch.
8067         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8068         functions for TLB operation and data prefetch.
8069         * config/nds32/nds32-intrinsic.md: Likewise.
8070         * config/nds32/nds32_intrinsic.h: Likewise.
8071         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8072         (nds32_print_operand): Likewise.
8073         * config/nds32/nds32.h (nds32_builtins): Likewise.
8075 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
8076         Andrew Pinski <pinsika@gcc.gnu.org>
8078         PR middle-end/82976
8079         * match.pd: Use constant_boolean_node of correct type instead of
8080         boolean_true_node or boolean_false_node for simplifying
8081         pointer comparisons to zero.
8083 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8085         PR tree-optimization/80021
8086         * tree.c (verify_type_variant): Make error call in verify_variant_match
8087         translatable and remove final full stop.
8089 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8091         * config/nds32/constants.md (unspec_volatile_element): Add
8092         UNSPEC_VOLATILE_EH_RETURN.
8093         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8094         nds32_output_stack_pop): Support dwarf exception handling process.
8095         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8096         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8097         exception handling process.
8098         (nds32_compute_stack_frame): Likewise.
8099         (nds32_return_addr_rtx): Likewise.
8100         (nds32_initial_elimination_offset): Likewise.
8101         (nds32_expand_prologue): Likewise.
8102         (nds32_expand_epilogue): Likewise.
8103         (nds32_dynamic_chain_address): New function.
8104         * config/nds32/nds32.h (machine_function): Add fields for dwarf
8105         exception handling.
8106         (DYNAMIC_CHAIN_ADDRESS): Define.
8107         (EH_RETURN_DATA_REGNO): Define.
8108         (EH_RETURN_STACKADJ_RTX): Define.
8109         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8110         patterns for dwarf exception handling.
8112 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8114         * config/nds32/nds32.h: Clean up obsolete macros.
8116 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8118         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8119         Add enum values for particular instructions.
8120         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8121         particular intrinsic functions.
8122         * config/nds32/nds32-intrinsic.md: Likewise.
8123         * config/nds32/nds32_intrinsic.h: Likewise.
8124         * config/nds32/nds32.h (nds32_builtins): Likewise.
8125         * config/nds32/nds32.md (type): Add pbsad and pbsada.
8126         (btst, ave): New patterns for particular instructions.
8128 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8130         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8131         Add enum values for atomic load/store and memory sync.
8132         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8133         and memory sync.
8134         * config/nds32/nds32-intrinsic.md: Likewise.
8135         * config/nds32/nds32_intrinsic.h: Likewise.
8136         * config/nds32/nds32.h (nds32_builtins): Likewise.
8138 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8140         PR tree-optimization/85257
8141         * fold-const.c (native_encode_vector): If not all elts could fit
8142         and off is -1, return 0 rather than offset.
8143         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8144         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8145         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
8146         adjust buffer in native_interpret_expr call.
8148 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8150         * config/nds32/constants.md (unspec_volatile_element): Add cache
8151         control enum values.
8152         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8153         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8154         * config/nds32/nds32.c (nds32_cctl_names): New.
8155         (nds32_print_operand): Handle cache control register names.
8156         * config/nds32/nds32.h (nds32_builtins): New enum values.
8157         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8158         macros.
8159         * config/nds32/nds32.md (type): Add mmu.
8160         * config/nds32/pipelines.md (simple_insn): Add mmu.
8162 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8164         * config/nds32/nds32.md (type): Remove call.
8165         * config/nds32/pipelines.md (simple_insn): Likewise.
8167 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8169         * config/nds32/constants.md (unspec_volatile_element): Add
8170         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8171         UNSPEC_VOLATILE_FMFCFG.
8172         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8173         description for fmfcfg and fmfcsr.
8174         (bdesc_1arg): Add fmtcsr.
8175         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8176         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8177         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8178         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8179         unspec_fmfcfg): New patterns.
8180         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8181         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8182         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8183         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8184         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8185         __nds32__fmfcfg): Define.
8187 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8189         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8190         intrinsic register names.
8191         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8192         intrinsic register enum values and macros.
8194 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8196         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8197         for load/store addressing form.
8198         (nds32_print_operand_address): Likewise.
8200 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
8202         PR target/85196
8203         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8204         based on LABEL_REF.  Remove useless assertion.
8205         (pic_address_needs_scratch): Fix formatting.
8206         (sparc_legitimize_pic_address): Minor tweaks.
8207         (sparc_delegitimize_address): Adjust assertion accordingly.
8208         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8209         into symbolic_operand.
8210         (movsi_high_pic_label_ref): Likewise.
8211         (movsi_lo_sum_pic_label_ref): Likewise.
8212         (movdi_pic_label_ref): Likewise.
8213         (movdi_high_pic_label_ref): Likewise.
8214         (movdi_lo_sum_pic_label_ref): Likewise.
8216 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
8218         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8219         custom LIB_SPEC setup.
8221 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
8222             Kito Cheng  <kito.cheng@gmail.com>
8224         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8225         * config/riscv/freebsd.h: New.
8227 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8229         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8230         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8231         file.
8233 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8234             Kito Cheng  <kito.cheng@gmail.com>
8236         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8237         nds32_output_call, nds32_symbol_binds_local_p): New functions.
8238         * config/nds32/nds32-protos.h (nds32_output_call,
8239         nds32_output_return): Declare.
8240         * config/nds32/nds32.md: Refine all the call and return patterns.
8242 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8244         PR debug/85252
8245         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8246         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8248         PR rtl-optimization/84872
8249         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8250         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8251         EDGE_CROSSING edge.
8253 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
8255         * expr.c (copy_blkmode_to_reg): Revert 254862.
8256         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8258 2018-04-06  Richard Biener  <rguenther@suse.de>
8260         PR middle-end/85244
8261         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8262         after seeing a component reference with an adjacent field.  Treat
8263         refs to arrays at struct end of external decls similar to
8264         refs to unconstrained commons.
8266 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8268         PR sanitizer/85213
8269         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8270         look through SAVE_EXPRs with non-side-effects argument.  Adjust
8271         recursive calls.
8272         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8273         save_p here.
8275 2018-04-06  Richard Biener  <rguenther@suse.de>
8277         PR middle-end/85180
8278         * alias.c (find_base_term): New wrapper around find_base_term
8279         unwinding CSELIB_VAL_PTR changes.
8280         (find_base_term): Do not restore CSELIB_VAL_PTR during the
8281         recursion.
8283 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8285         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8286         instructions.
8287         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8288         constant definitions.
8289         ("nop"): lr 0,0 -> nopr r0
8290         ("nop_lr0", "nop_lr1"): New insn definitions.
8292 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8294         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8295         NDS32_V3PUSH_AVAILABLE_P macro.
8297 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
8298             Chung-Ju Wu  <jasonwucj@gmail.com>
8300         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8301         (nds32*-*-*): Add float and fpu_config into supported_defaults.
8302         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8303         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8304         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8305         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8306         * config/nds32/constraints.md: New constraints and checking for hard
8307         float configuration.
8308         * config/nds32/iterators.md: New mode iterator and attribute for hard
8309         float configuration.
8310         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8311         patterns.
8312         * config/nds32/nds32-fpu.md: New file.
8313         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8314         deal with hard float code generation.
8315         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8316         ARCH_V3S.
8317         (abi_type, float_reg_number): New enum type.
8318         * config/nds32/nds32-predicates.c: New predicates for hard float.
8319         * config/nds32/nds32-protos.h: Declare functions for hard float.
8320         * config/nds32/nds32.c: Implementation for hard float configuration.
8321         * config/nds32/nds32.h: Definitions for hard float configuration.
8322         * config/nds32/nds32.md: Include hard float machine description and
8323         modify patterns for hard float configuration.
8324         * config/nds32/nds32.opt: New options for hard float configuration.
8325         * config/nds32/predicates.md: New predicates for hard float
8326         configuration.
8328 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8330         * common/config/nds32/nds32-common.c
8331         (nds32_option_optimization_table): Enable -mreleax-hint by default.
8333 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
8335         PR middle-end/85195
8336         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8337         CONSTRUCTOR_ELT (ctor, ...)->value.
8339 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
8341         PR target/85193
8342         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8344 2018-04-05  Tom de Vries  <tom@codesourcery.com>
8346         PR target/85204
8347         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8348         cond jump.
8350 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8351             Kito Cheng  <kito.cheng@gmail.com>
8353         * config/nds32/constraints.md (U33): Fine-tune checking condition.
8354         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8355         * config/nds32/nds32.h (nds32_16bit_address_type): Add
8356         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8358 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8359             Kito Cheng  <kito.cheng@gmail.com>
8361         * config/nds32/constraints.md (Ufe): New memory constraint.
8362         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8363         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8364         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8365         operands.
8366         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8367         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8369 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8371         * config/nds32/nds32.md: Use optimize_size in the condition for
8372         alu-shift instructions.
8374 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8376         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8378 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8380         * config/nds32/nds32.md (negsi2): Refine pattern.
8382 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8383             Chung-Ju Wu  <jasonwucj@gmail.com>
8385         * config/nds32/iterators.md (shift_rotate): New code iterator.
8386         (shift): New code attribute.
8387         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8388         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8389         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8390         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8391         bit-wise operations.
8392         (andsi3, *andsi3): Ditto.
8393         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8394         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8395         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8396         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8397         nds32_ior_operand, nds32_xor_operand): New predicates.
8399 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8401         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8402         (addsi3, subsi3): ... this.
8404 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8406         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8408 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8410         * config/nds32/nds32.md: Adjust indention.
8412 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8414         * config/nds32/nds32.md (feature): New attribute.
8416 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8418         * config/nds32/nds32.md (subtype): New attribute.
8420 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8422         PR target/85203
8423         * config/arm/arm-builtins.c (arm_expand_builtin): Change
8424         expansion to perform a bitwise AND of the argument followed by a
8425         boolean negation of the result.
8427 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
8429         PR rtl-optimization/84878
8430         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8431         the basic block.  Assert the use reference is not artificial and that
8432         it has an associated insn.
8434 2018-04-04  Michael Matz  <matz@suse.de>
8436         * builtins.c (compute_objsize): Pass correct operand
8437         to array_at_struct_end_p.
8439 2018-04-04  Richard Biener  <rguenther@suse.de>
8441         PR lto/85176
8442         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8443         from contexts for DINFO_LEVEL_TERSE and below.
8445 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8447         * config/nds32/nds32-doubleword.md (move_<mode>): Require
8448         resiter_operand condition.
8449         * config/nds32/nds32.md (*move<mode>): Ditto.
8451 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8452             Monk Chiang  <sh.chiang04@gmail.com>
8454         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8456 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8458         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8460 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8461             Kito Cheng  <kito.cheng@gmail.com>
8463         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8464         nds32_cond_code_str, output_cond_branch,
8465         output_cond_branch_compare_zero, nds32_expand_cbranch,
8466         nds32_expand_cstore, nds32_expand_movcc,
8467         nds32_output_cbranchsi4_equality_zero,
8468         nds32_output_cbranchsi4_equality_reg,
8469         nds32_output_cbranchsi4_equality_reg_or_const_int,
8470         nds32_output_cbranchsi4_greater_less_zero: New functions.
8471         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8472         nds32_expand_cstore, nds32_expand_movcc,
8473         nds32_output_cbranchsi4_equality_zero,
8474         nds32_output_cbranchsi4_equality_reg,
8475         nds32_output_cbranchsi4_equality_reg_or_const_int,
8476         nds32_output_cbranchsi4_greater_less_zero): Declare.
8477         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8478         nds32_rimm11s_operand): New predicates.
8479         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8480         * config/nds32/nds32.md: Rewrite all the branch and conditional move
8481         patterns.
8483 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8485         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8486         * config/nds32/nds32.md: Ditto.
8487         * config/nds32/pipelines.md: Ditto.
8489 2018-04-04  Richard Biener  <rguenther@suse.de>
8491         PR tree-optimization/85168
8492         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8493         propagating abnormals.
8495 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8497         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8499 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8500             Kito Cheng  <kito.cheng@gmail.com>
8502         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8503         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8504         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8505         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8506         * config/nds32/nds32.md (sibcall_internal): New.
8507         (sibcall_register): Remove.
8508         (sibcall_immediate): Remove.
8509         (sibcall_value_internal): New.
8510         (sibcall_value_register): Remove.
8511         (sibcall_value_immediate): Remove.
8512         * config/nds32/predicates.md (nds32_general_register_operand): New.
8513         (nds32_call_address_operand): New.
8515 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8517         PR rtl-optimization/85167
8518         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8519         bb_defs if *split_p, instead preinitialize it to NULL.
8521         PR tree-optimization/85156
8522         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8523         evaluating the argument multiple times.
8525 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
8527         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8528         than vector.
8529         (_mm_cvtpd_ps): Likewise.
8530         (_mm_cvttpd_epi32): Likewise.
8531         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8532         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8533         vector, pixel, and bool following altivec.h include.
8535 2018-04-03  Martin Sebor  <msebor@redhat.com>
8537         * doc/extend.texi (Common Function Attributes): Clarify.
8538         (const attribute): Likewise.
8539         (pure attribute): Likewise.
8541 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8543         PR target/85169
8544         * config/i386/i386.c (ix86_expand_vector_set): Use
8545         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
8547 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
8549         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8550         instructions when changing rounding bits to preserve precision bits
8551         in the x87 control word.
8553 2018-04-03  Martin Liska  <mliska@suse.cz>
8555         PR tree-optimization/82491
8556         * rtl.h (strip_offset_and_add): Replace += suboffset with
8557         poly_uint64 () + suboffset.
8559 2018-03-29  Martin Liska  <mliska@suse.cz>
8560             Martin Jambor  <mjambor@suse.cz>
8562         PR ipa/84947
8563         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8564         param_type is not an integral or pointer type.
8566 2018-04-03  Richard Biener  <rguenther@suse.de>
8568         * sese.h (recompute_all_dominators): Remove.
8570 2018-04-02  Martin Sebor  <msebor@redhat.com>
8572         * doc/invoke.texi (-Wrestrict): Fix typos.
8574 2018-04-02  Jim Wilson  <jimw@sifive.com>
8576         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8577         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8578         (<optab>di3, <optab>si3_extend): Likewise.
8579         (<optab>si3_mask, <optab>si3_mask_1): New.
8580         (<optab>di3_mask, <optab>di3_mask_1): New.
8581         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8582         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8583         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8585 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8587         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8588         example.
8590 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8592         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8593         (nds32_canonicalize_comparison): New function.
8595 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8596             Kito Cheng  <kito.cheng@gmail.com>
8597             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8599         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8600         * config/nds32/constants.md (unspec_volatile_element): Add
8601         UNSPEC_VOLATILE_RELAX_GROUP.
8602         * config/nds32/nds32-relax-opt.c: New file.
8603         * config/nds32/nds32-predicates.c
8604         (nds32_symbol_load_store_p): New function.
8605         * config/nds32/nds32-protos.h
8606         (nds32_symbol_load_store_p): Declare function.
8607         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8608         * config/nds32/nds32.c
8609         (nds32_register_pass): New function to register pass.
8610         (nds32_register_passes): New function to register passes.
8611         * config/nds32/nds32.md (relax_group): New pattern.
8612         * config/nds32/nds32.opt (mrelax-hint): New option.
8613         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8615 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8617         * config/nds32/t-nds32: Modify files dependency.
8619 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8621         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8622         (PROFILE_HOOK): Define its implementation.
8624 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8626         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8627         type and 32-bit size.
8629 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8631         PR middle-end/85090
8632         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8633         (V_128_256): New mode iterator.
8634         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8635         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8636         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8637         of V.
8638         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8639         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8641 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8643         PR target/83315
8644         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8645         NaN inputs correctly.
8647 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8649         PR target/80546
8650         * config/rs6000/vsx.md (??r): New mode attribute.
8651         (*vsx_mov<mode>_64bit): Use it.
8652         (*vsx_mov<mode>_32bit): Likewise.
8654 2018-03-30  Martin Sebor  <msebor@redhat.com>
8656         PR tree-optimization/84818
8657         * builtins.c (check_access): Use warning_n.
8659 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8661         PR target/83822
8662         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8663         condition.
8664         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8665         condition.
8667 2018-03-30  Julia Koval  <julia.koval@intel.com>
8669         PR target/84413
8670         * x86-tune.def (movx, partial_reg_dependency): Enable for
8671         m_SKYLAKE_AVX512.
8673 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8675         PR inline-asm/84985
8676         * lra-constraints.c (process_alt_operands): Move setting
8677         this_alternative_matches below.
8679 2018-03-29  Martin Liska  <mliska@suse.cz>
8681         PR lto/84995.
8682         * doc/invoke.texi: Document how LTO works with debug info.
8683         Describe auto-load support of binutils.  Mention 'x86-64'
8684         as valid option value of -march option.
8686 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8688         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8690         PR c/85094
8691         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8692         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8693         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8694         checking.
8696 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8698         PR target/84912
8699         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8700         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8701         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8702         for RS6000_BTM_POWERPC64.
8703         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8704         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8705         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8706         definition.
8707         (DIVDE): Use it.
8708         (DIVDEU): Likewise.
8710 2018-03-28 Carl Love  <cel@us.ibm.com>
8712         Revert
8713         2017-09-27  Carl Love  <cel@us.ibm.com>
8715         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8716         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8717         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8718         fctiw instruction.
8720 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8722         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8723         instead of __vector bool.
8724         (_mm_max_pu8): Likewise.
8725         (_mm_min_pi16): Likewise.
8727 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8729         PR target/84912
8730         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8731         (DIVWEUO): Likewise.
8732         (DIVDEO): Likewise.
8733         (DIVDEUO): Likewise.
8734         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8735         DIVWEUO and DIVDEUO.
8736         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8737         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8738         (div_extend): Likewise.
8739         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8740         builtin function.
8741         (__builtin_divweuo): Likewise.
8742         (__builtin_divdeo): Likewise.
8743         (__builtin_divdeuo): Likewise.
8745 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8747         PR target/85095
8748         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8749         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8751         PR tree-optimization/82004
8752         * gimple-match-head.c (optimize_pow_to_exp): New function.
8753         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8754         Don't fold to exp if optimize_pow_to_exp is false.
8756 2018-03-28  Martin Liska  <mliska@suse.cz>
8758         PR other/84819
8759         * calls.c (initialize_argument_information): Fix trailing space.
8760         * common.opt: Fix typo and provide better explanation for
8761         -fsanitize-coverage option.
8762         * config/i386/i386.opt: Fix typo.
8764 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8765             Martin Liska  <mliska@suse.cz>
8767         PR sanitizer/85081
8768         * gimplify.c (asan_poison_variable): Don't do the check for
8769         gimplify_omp_ctxp here.
8770         (gimplify_decl_expr): Do it here.
8771         (gimplify_target_expr): Likewise.
8773 2018-03-28  Martin Liska  <mliska@suse.cz>
8775         PR target/84988
8776         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8777         chkp_type_bounds_count if MPX is not enabled.
8779 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8781         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8783 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8785         PR target/84914
8786         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8787         function to create the function decl for complex long double
8788         multiply and divide for -mabi=ieeelongdouble.
8789         (init_float128_ieee): Call it.
8791 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8793         PR target/85044
8794         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8795         -fcf-protection=branch -mibt.
8796         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8798 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8800         PR target/81863
8801         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8802         arm_word_relocations.
8804 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8806         PR target/85056
8807         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8808         extern array declarations.
8810 2018-03-27  Richard Biener  <rguenther@suse.de>
8812         PR middle-end/84067
8813         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8814         explicit single_use checks.
8816 2018-03-27  Richard Biener  <rguenther@suse.de>
8818         PR tree-optimization/85082
8819         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8820         Valueize the VUSE.
8822 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8824         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8825         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8826         Turn on fasynchronous-unwind-tables and funwind-tables.
8828 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8830         PR target/85073
8831         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8832         (*bmi_blsr_<mode>_ccz): Ditto.
8834 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8836         PR tree-optimization/85063
8837         * omp-general.c (offloading_function_p): New function.  Factor out
8838         of ...
8839         * omp-offload.c (pass_omp_target_link::gate): ... here.
8840         * omp-general.h (offloading_function_p): Declare.
8841         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8842         with attribute omp declare target for offloading functions.
8844 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8846         PR tree-optimization/84005
8847         * tree-data-ref.h (get_base_for_alignment): Declare.
8848         * tree-data-ref.c (get_base_for_alignment_1): New function.
8849         (get_base_for_alignment): Likewise.
8850         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8851         get_base_for_alignment to find a suitable base object, instead
8852         of always using drb->base_address.
8854 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8856         PR inline-asm/85022
8857         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8858         known size by default.
8860 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8862         PR inline-asm/85030
8863         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8864         and non BLKmode operands.
8866 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8868         PR target/85026
8869         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8870         Clean up attributes.
8872 2018-03-23  Richard Biener  <rguenther@suse.de>
8874         PR debug/85020
8875         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8876         we are going to emit early debug for LTO.
8878 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8880         PR inline-asm/85034
8881         * function.c (match_asm_constraints_1): Don't optimize if input
8882         doesn't satisfy general_operand predicate for output's mode.
8884         PR inline-asm/85022
8885         * alias.c (write_dependence_p): Don't require for x_canonicalized
8886         non-VOIDmode if x has VOIDmode.
8888         PR sanitizer/85029
8889         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8890         just don't try to optimize it rather than assert it never happens.
8892 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8894         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8895         macro expansions for definition of ST_INTERNAL_<mode> and
8896         LD_INTERNAL_<mode> builtins.
8897         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8898         Remove prototype.
8899         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8900         function.
8901         (altivec_expand_st_builtin): Likewise.
8902         (altivec_expand_builtin): Remove calls to deleted functions.
8903         (rs6000_address_for_altivec): Delete this function.
8904         * config/rs6000/vector.md: Remove expands for
8905         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8907 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8909         PR target/84826
8910         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8911         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8912         re-computing once computed.
8913         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8914         (arm_init_machine_status): Initialize
8915         machine->static_chain_stack_bytes.
8917 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8919         PR target/84760
8920         * doc/extend.texi: Add four new prototypes for vec_ld.
8921         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8922         definitions for more logical presentation.
8923         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8924         entries for V1TI variants of __builtin_altivec_ld builtin.
8925         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8926         handling of V1TI variant of LVX icode pattern.
8927         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8928         (rs6000_gimple_fold_builtin): Likewise.
8929         (altivec_init_builtins): Add code to define
8930         __builtin_altivec_lvx_v1ti function.
8932 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8934         PR inline-asm/84941
8935         * function.c (match_asm_constraints_1): Don't do the optimization
8936         if input isn't a REG, SUBREG, MEM or constant.
8938 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8940         PR tree-optimization/84956
8941         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8942         bb_has_abnormal_pred.
8944 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8946         PR sanitizer/85018
8947         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8948         DECL_INITIAL (decl) to decl at the end.
8949         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8950         adjust the comment.
8952 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8954         * doc/extend.texi (__builtin_tgmath): Document when complex
8955         integer types are treated as _Complex _Float64.
8957 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8959         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8961 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8963         PR tree-optimization/84960
8964         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8965         if it is ENTRY block, move them into single succ of ENTRY in that case.
8967 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8969         PR tree-optimization/84811
8970         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8971         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8972         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8973         (known_subrange_p): Update accordingly.  Cast each value involved
8974         in the size comparison, rather than casting the result of the
8975         subtraction.
8977 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8979         PR tree-optimization/84982
8980         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8981         by flipping the least significant bit rather than all bits from
8982         bitpos to bitpos + bitsize - 1.
8984 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8986         * doc/extend.texi (Deprecated Features): Remove mention of
8987         long-deleted deprecations.
8989 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8991         PR jit/84288
8992         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8993         * configure: Regenerate.
8995 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8997         PR tree-optimization/83126
8998         * tree-parloops.c (num_phis): New function.
8999         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
9001 2018-03-21  Nathan Sidwell  <nathan@acm.org>
9003         * doc/extend.texi (Deprecated Features): Update deprecated flags,
9004         mention anon-struct/union members and trailing attributes.
9006 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
9008         PR tree-optimization/84969
9009         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
9010         builtin memset partitions if they set different rhs values.
9012 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9014         PR rtl-optimization/84989
9015         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
9016         VEC_DUPLICATE with scalar result mode.
9018 2018-03-21  Martin Liska  <mliska@suse.cz>
9020         PR ipa/84963
9021         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
9022         not intended return statement.
9024 2018-03-21  Martin Liska  <mliska@suse.cz>
9026         PR target/84988
9027         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
9028         (chkp_find_bound_slots_1): Limit number of iterations.
9030 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
9032         PR target/84838
9033         * Minor grammar fixes for x86 options.
9035 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9037         PR debug/84875
9038         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9039         holding REG_CFA_RESTORE notes, instead turn them into a USE.
9041 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
9043         PR target/83789
9044         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9045         (altivec_lvx_<mode>_1op): Likewise.
9046         (altivec_stvx_<mode>_2op): Likewise.
9047         (altivec_stvx_<mode>_1op): Likewise.
9048         (altivec_lvx_<VM2:mode>): New define_expand.
9049         (altivec_stvx_<VM2:mode>): Likewise.
9050         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9051         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9052         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9053         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9054         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9055         (rs6000_gen_lvx): Likewise.
9056         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9057         (altivec_expand_stv_builtin): Likewise.
9058         (altivec_expand_builtin): Likewise.
9059         * config/rs6000/vector.md: Likewise.
9061 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9063         PR target/82518
9064         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9065         BYTES_BIG_ENDIAN.
9067 2018-03-20  Richard Biener  <rguenther@suse.de>
9069         PR target/84986
9070         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9071         sign-conversions as zero, fall back to standard scalar_stmt
9072         cost for the rest.
9074 2018-03-20  Martin Liska  <mliska@suse.cz>
9076         PR ipa/84825
9077         * predict.c (rebuild_frequencies): Handle case when we have
9078         PROFILE_ABSENT, but flag_guess_branch_prob is false.
9080 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9082         PR target/84990
9083         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9084         flag_section_anchors.
9085         * varasm.c (use_blocks_for_decl_p): Remove hack for
9086         dw2_force_const_mem.
9088         PR target/84845
9089         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9090         to ...
9091         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
9092         be created, use lowpart_subreg of operands[0] rather than operands[0]
9093         itself.
9094         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9095         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9096         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9097         and n constraint instead of aarch64_shift_imm_di and Usd.
9098         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9099         (*aarch64_<optab>_reg_minus<mode>3): ... this.
9101 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
9103         PR target/82989
9104         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9105         to favor GPR over NEON registers.
9106         (<shift>di3_neon): Likewise.
9108 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9110         PR target/84952
9111         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9112         (nvptx_process_pars): Emit bar.sync asap and alap.
9114 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9116         PR target/84954
9117         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9118         seen_label if seen_label is already set.
9120 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9122         PR target/84945
9123         * config/i386/i386.c (fold_builtin_cpu): For features above 31
9124         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9125         Use 1U instead of 1.  Formatting fixes.
9127         PR c/84953
9128         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9129         instead of TREE_TYPE (s1) for the return value.
9131 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
9133         PR tree-optimization/84946
9134         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9135         bitsize + bitsize in poly_uint64 rather than poly_int64.
9137         PR sanitizer/78651
9138         * dwarf2asm.c: Include fold-const.c.
9139         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9140         of decl rather than decl itself.
9142         PR rtl-optimization/84643
9143         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9145 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
9147         PR sanitizer/78651
9148         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9149         calling assemble_variable.
9151 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
9153         PR target/81647
9154         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9155         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9157 2018-03-19  Jim Wilson  <jimw@sifive.com>
9159         PR bootstrap/84856
9160         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9161         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9162         (riscv_first_stack_step): Likewise.
9163         (riscv_option_override): Use STACK_BOUNDARY instead of
9164         MIN_STACK_BOUNDARY.
9165         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9166         MIN_STACK_BOUNDARY.
9167         (BIGGEST_ALIGNMENT): Set to 128.
9168         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9169         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9170         STACK_BOUNDARY.
9172 2018-03-19  Richard Biener  <rguenther@suse.de>
9174         PR tree-optimization/84933
9175         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9176         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9178 2018-03-19  Richard Biener  <rguenther@suse.de>
9180         PR tree-optimization/84859
9181         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9182         (cond_if_else_store_replacement): Perform sinking operation on
9183         single-store BBs regardless of MAX_STORES_TO_SINK setting.
9184         Generalize what a BB with a single eligible store is.
9186 2018-03-19  Richard Biener  <rguenther@suse.de>
9188         PR tree-optimization/84929
9189         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9190         chrec_is_positive against non-chrec arg.
9192 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
9194         PR target/84711
9195         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9197 2018-03-18  Martin Liska  <mliska@suse.cz>
9199         PR rtl-optimization/84635
9200         * regrename.c (build_def_use): Use matches_mode only when
9201         matches >= 0.
9203 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
9205         PR tree-optimization/84913
9206         * tree-vect-loop.c (vectorizable_reduction): Don't try to
9207         vectorize chains of COND_EXPRs.
9209 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9211         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9213 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9215         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9217 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9219         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9221 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9222             Kito Cheng  <kito.cheng@gmail.com>
9224         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9225         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9226         (nds32_adjust_reg_alloc_order): New function.
9227         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9229 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
9231         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9232         nds32_print_operand, nds32_print_operand_address): Use
9233         HOST_WIDE_INT_PRINT_DEC instead.
9235 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9237         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9239 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
9241         PR target/84902
9242         * config/i386/i386.c (initial_ix86_tune_features,
9243         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9244         unsigned long long.
9245         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9246         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9247         rather than 1u << ix86_tune.  Formatting fix.
9248         (ix86_option_override_internal): Change ix86_arch_mask from
9249         unsigned int to unsigned HOST_WIDE_INT, initialize to
9250         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9251         (ix86_function_specific_restore): Likewise.
9253 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9255         PR target/84899
9256         * postreload.c (reload_combine_recognize_pattern): Perform
9257         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9258         truncate_int_for_mode the result for the destination's mode.
9260         PR c/84909
9261         * hsa-gen.c (mem_type_for_type): Fix comment typo.
9262         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9263         Likewise.
9264         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9265         Likewise.
9267 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
9269         PR target/84876
9270         * lra-assigns.c (lra_split_hard_reg_for): Don't use
9271         regno_allocno_class_array and sorted_pseudos.
9272         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9273         insns where regno is used.
9275 2018-03-16  Martin Liska  <mliska@suse.cz>
9277         PR ipa/84833
9278         * multiple_target.c (create_dispatcher_calls): Redirect
9279         reference in the symbol table.
9281 2018-03-16  Martin Liska  <mliska@suse.cz>
9283         PR ipa/84722
9284         * multiple_target.c (create_dispatcher_calls): Redirect also
9285         an alias.
9287 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9289         PR c++/79937
9290         PR c++/82410
9291         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9292         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9293         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9295 2018-03-16  Julia Koval  <julia.koval@intel.com>
9297         * doc/invoke.texi (Skylake Server): Add CLWB.
9298         Cannonlake): Remove CLWB.
9300 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9302         PR tree-optimization/84841
9303         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9304         1 << 3.
9305         (FLOAT_ONE_CONST_TYPE): Define.
9306         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9307         (sort_by_operand_rank): Put entries with higher constant_type last
9308         rather than first to match comments.
9310 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
9312         * config/nios2/nios2.md (movsi_internal): Fix thinko in
9313         split predicate.
9315 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9317         PR c++/79085
9318         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9319         check and use address of target always.
9321 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
9323         PR target/84574
9324         * config/i386/i386.c (indirect_thunk_needed): Update comments.
9325         (indirect_thunk_bnd_needed): Likewise.
9326         (indirect_thunks_used): Likewise.
9327         (indirect_thunks_bnd_used): Likewise.
9328         (indirect_return_needed): New.
9329         (indirect_return_bnd_needed): Likewise.
9330         (output_indirect_thunk_function): Add a bool argument for
9331         function return.
9332         (output_indirect_thunk_function): Don't generate alias for
9333         function return thunk.
9334         (ix86_code_end): Call output_indirect_thunk_function to generate
9335         function return thunks.
9336         (ix86_output_function_return): Set indirect_return_bnd_needed
9337         and indirect_return_needed instead of indirect_thunk_bnd_needed
9338         and indirect_thunk_needed.
9340 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
9342         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9343         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9344         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9346 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
9347             Paul Hua <paul.hua.gm@gmail.com>
9349         PR c/84852
9350         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9352 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
9354         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9355         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9356         resp. SFmode cases.
9358 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
9360         PR target/84711
9361         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9362         instead of GET_MODE_SIZE when comparing Units.
9364 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9366         PR target/68256
9367         * varasm.c (hash_section): Return an unchangeble hash value
9368         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9369         Return !aarch64_can_use_per_function_literal_pools_p ().
9371 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9373         PR target/84860
9374         * optabs.c (emit_conditional_move): Pass address of cmode's copy
9375         rather than address of cmode as last argument to prepare_cmp_insn.
9377 2018-03-15  Julia Koval  <julia.koval@intel.com>
9379         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9380         F_AVX512VNNI, F_AVX512BITALG): New.
9382 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
9384         PR target/83451
9385         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
9386         insn for floating-point loads and stores.
9388 2018-03-14  Carl Love  <cel@us.ibm.com>
9390         * config/rs6000/rs6000-c.c: Add macro definitions for
9391         ALTIVEC_BUILTIN_VEC_PERMXOR.
9392         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9393         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9394         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9395         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9396         UNSPEC_VPERMXOR.
9397         * config/doc/extend.texi: Add prototypes for vec_permxor.
9399 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
9401         PR c/84852
9402         * diagnostic-show-locus.c (class layout_point): Convert m_line
9403         from int to linenum_type.
9404         (line_span::comparator): Use linenum "compare" function when
9405         comparing line numbers.
9406         (test_line_span): New function.
9407         (layout_range::contains_point): Convert param "row" from int to
9408         linenum_type.
9409         (layout_range::intersects_line_p): Likewise.
9410         (layout::will_show_line_p): Likewise.
9411         (layout::print_source_line): Likewise.
9412         (layout::should_print_annotation_line_p): Likewise.
9413         (layout::print_annotation_line): Likewise.
9414         (layout::print_leading_fixits): Likewise.
9415         (layout::annotation_line_showed_range_p): Likewise.
9416         (struct line_corrections): Likewise for field m_row.
9417         (line_corrections::line_corrections): Likewise for param "row".
9418         (layout::print_trailing_fixits): Likewise.
9419         (layout::get_state_at_point): Likewise.
9420         (layout::get_x_bound_for_row): Likewise.
9421         (layout::print_line): Likewise.
9422         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9423         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9424         * input.c (selftest::test_linenum_comparisons): New function.
9425         (selftest::input_c_tests): Call it.
9426         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9427         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9428         * selftest.h (ASSERT_GT): New macro.
9429         (ASSERT_GT_AT): New macro.
9430         (ASSERT_LT): New macro.
9431         (ASSERT_LT_AT): New macro.
9433 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
9435         PR rtl-optimization/84780
9436         * combine.c (distribute_links): Don't make a link based on pc_rtx.
9438 2018-03-14  Martin Liska  <mliska@suse.cz>
9440         * tree.c (record_node_allocation_statistics): Use
9441         get_stats_node_kind.
9442         (get_stats_node_kind): New function extracted from
9443         record_node_allocation_statistics.
9444         (free_node): Use get_stats_node_kind.
9446 2018-03-14  Richard Biener  <rguenther@suse.de>
9448         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9449         that the value-set of ANTIC_IN doesn't grow.
9451         Revert
9452         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9453         member.
9454         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9455         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9457 2018-03-14  Julia Koval  <julia.koval@intel.com>
9459         * config.gcc (icelake-client, icelake-server): New.
9460         (icelake): Remove.
9461         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9462         (initial_ix86_arch_features): Ditto.
9463         (PTA_SKYLAKE): Add SGX.
9464         (PTA_ICELAKE): Remove.
9465         (PTA_ICELAKE_CLIENT): New.
9466         (PTA_ICELAKE_SERVER): New.
9467         (ix86_option_override_internal): Split up icelake on icelake client and
9468         icelake server.
9469         (get_builtin_code_for_version): Ditto.
9470         (fold_builtin_cpu): Ditto.
9471         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9472         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9473         * config/i386/i386.h (processor_type): Ditto.
9474         * doc/invoke.texi: Ditto.
9476 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
9478         PR sanitizer/83392
9479         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9480         INTEGER_CST offset, add it together with bitpos / 8 and
9481         sign extend based on POINTER_SIZE.
9483         PR target/84844
9484         Revert
9485         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
9487         PR target/78090
9488         * config/i386/constraints.md (Yc): New register constraint.
9489         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9490         Use Yc constraint for alternative 2 of operand 0.  Remove
9491         preferred_for_speed attribute.
9493 2018-03-14  Richard Biener  <rguenther@suse.de>
9495         PR tree-optimization/84830
9496         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9497         with the old one to avoid oscillations.
9499 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
9501         PR target/83712
9502         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9503         pseudos.
9504         (assign_by_spills): Return a flag of reload assignment failure.
9505         Do not process the reload assignment failures.  Do not spill other
9506         reload pseudos if they has the same reg class.  Update n if
9507         necessary.
9508         (lra_assign): Add a return arg.  Set up from the result of
9509         assign_by_spills call.
9510         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9511         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9512         usage_insns if it is not NULL.
9513         (spill_hard_reg_in_range): New function.
9514         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9515         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9516         function prototypes.
9517         (lra_assign): Change prototype.
9518         * lra.c (lra): Add code to deal with fails by splitting hard reg
9519         live ranges.
9521 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
9523         * config/riscv/riscv.opt (mrelax): New option.
9524         * config/riscv/riscv.c (riscv_file_start): Emit ".option
9525         "norelax" when riscv_mrelax is disabled.
9526         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9528 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9530         PR target/84743
9531         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9532         reassociation for int modes.
9534 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9536         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9537         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9538         for big-endian.
9539         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9540         * config/aarch64/aarch64-sve.md
9541         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9542         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9543         (*extend<mode><Vwide>2): Rename to...
9544         (aarch64_sve_extend<mode><Vwide>2): ...this.
9545         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9546         renaming the old pattern to...
9547         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
9548         unsigned packs.
9549         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9550         define_expand, renaming the old pattern to...
9551         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9552         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9553         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9554         account when deciding which SVE instruction the optab should use.
9555         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9557 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9559         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9560         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9561         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9562         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9563         (tlsdesc_small_<mode>): Turn a define_expand and use
9564         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9565         (tlsdesc_small_advsimd_<mode>): ...this.
9566         (tlsdesc_small_sve_<mode>): New pattern.
9568 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9570         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9571         (UNSPEC_UMUL_HIGHPART): New constants.
9572         (MUL_HIGHPART): New int iteraor.
9573         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9574         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9575         define_expand.
9576         (*<su>mul<mode>3_highpart): New define_insn.
9578 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9580         PR lto/84805
9581         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9582         incomplete types.
9584 2018-03-13  Martin Liska  <mliska@suse.cz>
9586         PR ipa/84658.
9587         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9588         vector.
9589         (sem_item_optimizer::~sem_item_optimizer): Release it.
9590         (sem_item_optimizer::merge_classes): Register variable aliases.
9591         (sem_item_optimizer::fixup_pt_set): New function.
9592         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9593         * ipa-icf.h: Declare new variables and functions.
9595 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9597         PR middle-end/84834
9598         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9599         integer_pow2p@2 and test integer_pow2p in condition.
9600         (A < 0 ? C : 0): Similarly for @1.
9602         PR middle-end/84831
9603         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9604         characters starting at p contain '\0' character, don't look beyond
9605         that.
9607         PR target/84827
9608         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9609         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9611         PR target/84828
9612         * reg-stack.c (change_stack): Change update_end var from int to
9613         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9614         also call set_block_for_insn on the newly added insns and rescan.
9616         PR target/84786
9617         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9618         on the last operand.
9620         PR c++/84704
9621         * tree.c (stabilize_reference_1): Return save_expr (e) for
9622         STATEMENT_LIST even if it doesn't have side-effects.
9624 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9626         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9628 2018-03-12  Renlin Li  <renlin.li@arm.com>
9630         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9631         aarch64_output_scalar_simd_mov_immediate.
9633 2018-03-12  Martin Sebor  <msebor@redhat.com>
9635         PR tree-optimization/83456
9636         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9637         for perfectly overlapping calls to memcpy.
9638         (gimple_fold_builtin_memory_chk): Same.
9639         (gimple_fold_builtin_strcpy): Handle no-warning.
9640         (gimple_fold_builtin_stxcpy_chk): Same.
9641         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9643 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9645         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9646         parameter.  Use it for SFmode.
9647         (rs6000_function_arg_advance_1): Adjust.
9648         (rs6000_function_arg): Adjust.
9649         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9651 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9653         PR rtl-optimization/84169
9654         PR rtl-optimization/84780
9655         * combine.c (can_combine_p): Check for a 2-insn combination whether
9656         the destination register is used between the two insns, too.
9658 2018-03-12  Richard Biener  <rguenther@suse.de>
9660         PR tree-optimization/84803
9661         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9662         for refs DR analysis didn't process.
9664 2018-03-12  Richard Biener  <rguenther@suse.de>
9666         PR tree-optimization/84777
9667         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9668         force-vectorize loops ignore whether we are optimizing for size.
9670 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9672         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9673         (TARGET_MD_ASM_ADJUST): Define.
9675 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9676             Kito Cheng  <kito.cheng@gmail.com>
9677             Chung-Ju Wu  <jasonwucj@gmail.com>
9679         * config/nds32/nds32.c (nds32_compute_stack_frame,
9680         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9681         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9682         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9683         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9684         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9685         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9686         * config/nds32/nds32.md (prologue, epilogue): Use macro
9687         NDS32_V3PUSH_AVAILABLE_P to do checking.
9689 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9691         PR debug/58150
9692         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9693         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9694         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9695         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9696         addition of most attributes on !orig_type_die or the attribute not
9697         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9699 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9700             Chung-Ju Wu  <jasonwucj@gmail.com>
9702         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9703         __NDS32_VH__ macro.
9704         * config/nds32/nds32.opt (mvh): New option.
9706 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9707             Chung-Ju Wu  <jasonwucj@gmail.com>
9709         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9710         function.
9711         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9712         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9713         definition.
9715 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9716             Chung-Ju Wu  <jasonwucj@gmail.com>
9718         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9719         function.
9720         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9721         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9723 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9724             Kito Cheng  <kito.cheng@gmail.com>
9725             Chung-Ju Wu  <jasonwucj@gmail.com>
9727         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9728         UNSPEC_FFMISM and UNSPEC_FLMISM.
9729         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9730         for ffb, ffmism and flmism.
9731         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9732         (unspec_ffmism): Ditto.
9733         (unspec_flmism): Ditto.
9734         (nds32_expand_builtin_impl): Check if string extension is available.
9735         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9736         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9738 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9740         Reverting patch:
9741         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9743         PR target/83712
9744         * lra-assigns.c (assign_by_spills): Return a flag of reload
9745         assignment failure.  Do not process the reload assignment
9746         failures.  Do not spill other reload pseudos if they has the same
9747         reg class.
9748         (lra_assign): Add a return arg.  Set up from the result of
9749         assign_by_spills call.
9750         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9751         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9752         usage_insns if it is not NULL.
9753         (spill_hard_reg_in_range): New function.
9754         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9755         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9756         function prototypes.
9757         (lra_assign): Change prototype.
9758         * lra.c (lra): Add code to deal with fails by splitting hard reg
9759         live ranges.
9761 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9763         PR target/84807
9764         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9766 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9768         PR debug/84620
9769         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9770         (dw_val_node): Add val_symbolic_view.
9771         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9772         (symview_upper_bound): New.
9773         (new_line_info_table): Initialize symviews_since_reset.
9774         (dwarf2out_source_line): Count symviews_since_reset and set
9775         symview_upper_bound.
9776         (dw_val_equal_p): Handle symview.
9777         (add_AT_symview): New.
9778         (print_dw_val): Handle symview.
9779         (attr_checksum, attr_checksum_ordered): Likewise.
9780         (same_dw_val_p, size_of_die): Likewise.
9781         (value_format, output_die): Likewise.
9782         (add_high_low_attributes): Use add_AT_symview for entry_view.
9783         (dwarf2out_finish): Reset symview_upper_bound, clear
9784         zero_view_p.
9786 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9788         PR target/83969
9789         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9790         Add strict argument and use it.
9791         (rs6000_split_multireg_move): Update for new strict argument.
9792         (mem_operand_gpr): Disallow all non-offsettable addresses.
9793         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9795 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9797         PR target/84772
9798         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9799         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9800         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9802         PR c++/84767
9803         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9804         decl, use remap_type if we want to use the type.
9806 2018-03-09  Martin Sebor  <msebor@redhat.com>
9808         PR tree-optimization/84526
9809         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9810         Remove dead code.
9811         (builtin_access::generic_overlap): Be prepared to handle non-array
9812         base objects.
9814 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9816         PR rtl-optimization/84682
9817         * lra-constraints.c (process_address_1): Check is_address flag
9818         for address constraints.
9819         (process_alt_operands): Likewise.
9820         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9821         preprocess_constraints.
9822         * recog.h (preprocess_constraints): Add oploc parameter.
9823         Adjust callers.
9824         * recog.c (preprocess_constraints): Test address_operand for
9825         CT_ADDRESS constraints.
9827 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9829         PR target/83712
9830         * lra-assigns.c (assign_by_spills): Return a flag of reload
9831         assignment failure.  Do not process the reload assignment
9832         failures.  Do not spill other reload pseudos if they has the same
9833         reg class.
9834         (lra_assign): Add a return arg.  Set up from the result of
9835         assign_by_spills call.
9836         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9837         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9838         usage_insns if it is not NULL.
9839         (spill_hard_reg_in_range): New function.
9840         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9841         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9842         function prototypes.
9843         (lra_assign): Change prototype.
9844         * lra.c (lra): Add code to deal with fails by splitting hard reg
9845         live ranges.
9847 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9849         PR target/83193
9850         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9851         Accept complain bool parameter.  Only emit errors if it is true.
9852         (arm_parse_cpu_option_name): Likewise.
9853         (arm_target_thumb_only): Adjust callers of the above.
9854         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9855         prototype to take a default true bool parameter.
9856         (arm_parse_arch_option_name): Likewise.
9858 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9859             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9861         PR jit/64089
9862         PR jit/84288
9863         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9864         * configure: Regenerate.
9865         * configure.ac ("linker --version-script option"): New.
9866         ("linker soname option"): New.
9868 2018-03-09  Richard Biener  <rguenther@suse.de>
9870         PR tree-optimization/84775
9871         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9872         immediate uses of predicate stmts and mark them modified.
9874         Revert
9875         PR tree-optimization/84178
9876         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9877         to caller.
9878         (version_loop_for_if_conversion): Delay update_ssa call.
9879         (tree_if_conversion): Delay update_ssa until after predicate
9880         insertion.
9882 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9884         PR target/84763
9885         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9886         when the function accesses prior frames.
9888 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9890         PR debug/84456
9891         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9892         gen_llsym, otherwise call maybe_gen_llsym.
9894         PR inline-asm/84742
9895         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9896         has ',' character inside of it.
9898 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9900         PR target/84748
9901         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9902         as clobbering CC_REGNUM.
9904 2018-03-08  Richard Biener  <rguenther@suse.de>
9906         PR middle-end/84552
9907         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9908         (follow_copies_to_constant): Do not follow SSA names registered
9909         for update.
9911 2018-03-08  Richard Biener  <rguenther@suse.de>
9913         PR tree-optimization/84178
9914         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9915         to caller.
9916         (version_loop_for_if_conversion): Delay update_ssa call.
9917         (tree_if_conversion): Delay update_ssa until after predicate
9918         insertion.
9920 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9922         PR tree-optimization/84178
9923         * tree-if-conv.c (release_bb_predicate): Remove the
9924         the assertion that the stmts have NULL use_ops.
9925         Discard the statements, asserting that they haven't
9926         yet been added to a BB.
9928 2018-03-08  Richard Biener  <rguenther@suse.de>
9930         PR tree-optimization/84746
9931         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9932         (phi_translate): Pass in destination ANTIC_OUT set.
9933         (phi_translate_1): Likewise.  For a simplified result lookup
9934         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9935         (phi_translate_set): Adjust.
9936         (do_pre_regular_insertion): Likewise.
9937         (do_pre_partial_partial_insertion): Likewise.
9939 2018-03-08  Martin Liska  <mliska@suse.cz>
9941         PR gcov-profile/84735
9942         * doc/gcov.texi: Document usage of profile files.
9943         * gcov-io.h: Document changes in the format.
9945 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9947         PR debug/84404
9948         PR debug/84408
9949         * dwarf2out.c (struct dw_line_info_table): Update comments for
9950         view == -1.
9951         (FORCE_RESET_NEXT_VIEW): New.
9952         (FORCE_RESETTING_VIEW_P): New.
9953         (RESETTING_VIEW_P): Check for -1 too.
9954         (ZERO_VIEW_P): Likewise.
9955         (new_line_info_table): Force-reset next view.
9956         (dwarf2out_begin_function): Likewise.
9957         (dwarf2out_source_line): Simplify zero_view_p initialization.
9958         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9959         view directly.  Omit view when omitting .loc at line 0.
9961 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9963         PR tree-optimization/84740
9964         * tree-switch-conversion.c (process_switch): Call build_constructors
9965         only if info.phi_count is non-zero.
9967         PR tree-optimization/84739
9968         * tree-tailcall.c (find_tail_calls): Check call arguments against
9969         DECL_ARGUMENTS (current_function_decl) rather than
9970         DECL_ARGUMENTS (func) when checking for tail recursion.
9972 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9974         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9975         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9976         Volker Reichelt's entry and add entries for people that perform
9977         GCC fuzzy testing and report numerous bugs.
9979 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9981         PR target/82411
9982         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9983         readonly data in sdata, if that is disabled.
9984         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9985         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9986         -mreadonly-in-sdata option.
9988 2018-03-07  Martin Sebor  <msebor@redhat.com>
9990         PR tree-optimization/84468
9991         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9992         basic block when looking for nul assignment.
9994 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9996         PR target/84277
9997         * except.h (output_function_exception_table): Adjust prototype.
9998         * except.c (output_function_exception_table): Remove FNNAME parameter
9999         and add SECTION parameter.  Ouput one part of the table at a time.
10000         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
10001         the first part of the exception table and emit unwind directives.
10002         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
10003         (i386_pe_seh_cold_init): Likewise.
10004         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
10005         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
10006         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
10007         (ix86_output_call_insn): Emit a nop in one more case for SEH.
10008         * config/i386/winnt.c: Include except.h.
10009         (struct seh_frame_state): Add reg_offset, after_prologue and
10010         in_cold_section fields.
10011         (i386_pe_seh_end_prologue): Set seh->after_prologue.
10012         (i386_pe_seh_cold_init): New function.
10013         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
10014         to seh->in_cold_section.
10015         (seh_emit_push): Record the offset of the push.
10016         (seh_emit_save): Record the offet of the save.
10017         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
10018         Test seh->after_prologue to disregard the epilogue.
10019         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
10020         (i386_pe_end_cold_function): New function.
10022 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
10024         PR fortran/84565
10025         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
10026         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
10028         PR c++/84704
10029         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
10030         on tmp_var.
10031         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
10032         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10034         PR middle-end/84723
10035         * multiple_target.c: Include tree-inline.h and intl.h.
10036         (expand_target_clones): Diagnose and fail if node->definition and
10037         !tree_versionable_function_p (node->decl).
10039 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
10041         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10042         sprint_ul.
10043         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10044         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10045         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10047 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10049         PR target/84710
10050         * combine.c (try_combine): Use reg_or_subregno instead of handling
10051         just paradoxical SUBREGs and REGs.
10053 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
10055         * config/arc/arc.c (arc_finalize_pic): Remove function.
10056         (arc_must_save_register): We use single base PIC register, remove
10057         checks to save/restore the PIC register.
10058         (arc_expand_prologue): Likewise.
10059         * config/arc/arc-protos.h (arc_set_default_type_attributes):
10060         Remove.
10061         (arc_verify_short): Likewise.
10062         (arc_attr_type): Likewise.
10063         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10064         (walk_stores): Likewise.
10065         (arc_address_cost): Make it static.
10066         (arc_verify_short): Likewise.
10067         (branch_dest): Likewise.
10068         (arc_attr_type): Likewise.
10069         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10070         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10071         (arc_final_prescan_insn): Remove inserting the nops due to
10072         hardware hazards.  It is done in reorg step.
10073         (insn_length_variant_t): Remove.
10074         (insn_length_parameters_t): Likewise.
10075         (arc_insn_length_parameters): Likewise.
10076         (arc_get_insn_variants): Likewise.
10077         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10079 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10081         PR inline-asm/84683
10082         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10083         assertion failure.
10085         PR tree-optimization/84687
10086         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10087         on new_node->decl.
10088         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10090 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10092         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10093         Rename to ppc_speculation_barrier.
10094         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10095         __builtin_ppc_speculation_barrier.
10097 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10099         PR target/84700
10100         * combine.c (combine_simplify_rtx): Don't try to simplify if
10101         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10102         are equal to x.
10104 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
10106         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10107         to 32 bytes when compiling for POWER9.
10109 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10111         PR target/84564
10112         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10113         regparm >= 3 with no arg reg available also for calls with
10114         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
10116         PR target/84524
10117         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10118         orig,vex.
10119         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
10121 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
10123         PR target/84264
10124         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10126 2018-03-05  Richard Biener  <rguenther@suse.de>
10128         PR tree-optimization/84486
10129         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10130         When inserting a __builtin_assume_aligned call set the LHS
10131         SSA name alignment info accordingly.
10133 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
10135         PR tree-optimization/84114
10136         * config/aarch64/aarch64.c (aarch64_reassociation_width)
10137         Avoid reassociation of FLOAT_MODE addition.
10139 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
10141         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10142         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10143         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10144         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10145         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10146         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10147         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10148         and -mwbnoinvd.
10149         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10150         __builtin_ia32_wbinvd): New builtins.
10151         (SPECIAL_ARGS2): New.
10152         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10153         (SPECIAL_ARGS2): New.
10154         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10155         (ix86_valid_target_attribute_inner_p): Ditto.
10156         (ix86_init_mmx_sse_builtins): Add special_args2.
10157         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10158         TARGET_WBNOINVD_P): New.
10159         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10160         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10161         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10162         * config/i386/immintrin.h (_wbinvd): New intrinsic.
10163         * config/i386/pconfigintrin.h: New file.
10164         * config/i386/wbnoinvdintrin.h: Ditto.
10165         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10166         wbnoinvdintrin.h.
10167         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10169 2018-03-05  Richard Biener  <rguenther@suse.de>
10171         PR tree-optimization/84670
10172         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10173         member.
10174         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10175         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10176         (compute_antic_aux): Only assert the number of values in ANTIC_IN
10177         doesn't grow if all successors (recursively) were visited at least
10178         once.
10180 2018-03-05  Richard Biener  <rguenther@suse.de>
10182         PR tree-optimization/84650
10183         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10184         if executed in the loop pipeline.
10186 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
10188         * doc/configfiles.texi (Configuration Files): Move info about
10189         conditionalizing $target-protos.h to...
10190         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
10191         differs from $target-protos.h.
10193 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
10194             Chung-Ju Wu  <jasonwucj@gmail.com>
10196         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10197         * config/nds32/nds32-multiple.md (setmemsi): Define.
10198         * config/nds32/nds32-memory-manipulation.c
10199         (nds32_gen_dup_4_byte_to_word_value): New.
10200         (emit_setmem_word_loop): New.
10201         (emit_setmem_byte_loop): New.
10202         (nds32_expand_setmem_loop): New.
10203         (nds32_expand_setmem_loop_v3m): New.
10204         (nds32_expand_setmem_unroll): New.
10205         (nds32_expand_setmem): New.
10207 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10208             Chung-Ju Wu  <jasonwucj@gmail.com>
10210         * config/nds32/nds32-memory-manipulation.c
10211         (nds32_emit_load_store): New.
10212         (nds32_emit_post_inc_load_store): New.
10213         (nds32_emit_mem_move): New.
10214         (nds32_emit_mem_move_block): New.
10215         (nds32_expand_movmemsi_loop_unknown_size): New.
10216         (nds32_expand_movmemsi_loop_known_size): New.
10217         (nds32_expand_movmemsi_loop): New.
10218         (nds32_expand_movmemsi_unroll): New.
10219         (nds32_expand_movmemqi): Rename ...
10220         (nds32_expand_movmemsi): ... to this.
10221         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10222         (movmemsi): ... to this.
10223         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10224         (nds32_expand_movmemsi): ... to this.
10226 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10227             Monk Chiang  <sh.chiang04@gmail.com>
10228             Chung-Ju Wu  <jasonwucj@gmail.com>
10230         * config/nds32/nds32-protos.h
10231         (nds32_expand_load_multiple): New arguments.
10232         (nds32_expand_store_multiple): Ditto.
10233         (nds32_valid_multiple_load_store): Rename ...
10234         (nds32_valid_multiple_load_store_p): ... to this.
10235         * config/nds32/nds32-memory-manipulation.c
10236         (nds32_expand_load_multiple): Refine implementation.
10237         (nds32_expand_store_multiple): Ditto.
10238         * config/nds32/nds32-multiple.md
10239         (load_multiple): Update nds32_expand_load_multiple interface.
10240         (store_multiple): Update nds32_expand_store_multiple interface.
10241         * config/nds32/nds32-predicates.c
10242         (nds32_valid_multiple_load_store): Rename ...
10243         (nds32_valid_multiple_load_store_p): ... to this and refine
10244         implementation.
10245         * config/nds32/predicates.md
10246         (nds32_load_multiple_and_update_address_operation): New predicate.
10247         (nds32_store_multiple_and_update_address_operation): New predicate.
10249 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10250             Chung-Ju Wu  <jasonwucj@gmail.com>
10252         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10253         (combo): New attribute.
10254         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10256 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10258         * config/nds32/nds32.opt: Change -mcmodel= default value.
10260 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
10261             Monk Chiang  <sh.chiang04@gmail.com>
10262             Chung-Ju Wu  <jasonwucj@gmail.com>
10264         * config/nds32/constants.md (unspec_element): New enum.
10265         * config/nds32/constraints.md (Umw): New constraint.
10266         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10267         * config/nds32/nds32-intrinsic.md: Likewise.
10268         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10269         (nds32_valid_smw_lwm_base_p): New.
10270         (nds32_output_smw_single_word): New.
10271         (nds32_output_lmw_single_word): New.
10272         (nds32_expand_unaligned_load): New.
10273         (nds32_expand_unaligned_store): New.
10274         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10275         (nds32_output_smw_single_word): Declare.
10276         (nds32_output_lmw_single_word): Declare.
10277         (nds32_expand_unaligned_load): Declare.
10278         (nds32_expand_unaligned_store): Declare.
10279         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10280         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10281         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10282         NDS32_BUILTIN_UASTORE_DW.
10283         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10284         predicate.
10286 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
10287             Kito Cheng  <kito.cheng@gmail.com>
10288             Chung-Ju Wu  <jasonwucj@gmail.com>
10290         * config/nds32/nds32-intrinsic.c
10291         (nds32_expand_builtin_null_ftype_reg): Delete.
10292         (nds32_expand_builtin_reg_ftype_imm): Ditto.
10293         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10294         (nds32_read_argument): New.
10295         (nds32_legitimize_target): Ditto.
10296         (nds32_legitimize_argument): Ditto.
10297         (nds32_check_constant_argument): Ditto.
10298         (nds32_expand_unop_builtin): Ditto.
10299         (nds32_expand_unopimm_builtin): Ditto.
10300         (nds32_expand_binop_builtin): Ditto.
10301         (nds32_builtin_decl_impl): Ditto.
10302         (builtin_description): Ditto.
10303         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10304         (nds32_init_builtins_impl): Ditto.
10305         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10306         (nds32_builtin_decl): New.
10307         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10308         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10310 2018-03-02  Jeff Law  <law@redhat.com>
10312         * reorg.c (stop_search_p): Handle DEBUG_INSN.
10313         (redundant_insn, fill_simple_delay_slots): Likewise.
10314         (fill_slots_from_thread): Likewise.
10315         * resource.c (mark_referenced_resources): Likewise.
10316         (mark_set_resources, find_dead_or_set_registers): Likewise.
10318 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10320         * substring-locations.h (format_warning_va): Formatting fix for
10321         ATTRIBUTE_GCC_DIAG.
10322         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10323         argument.
10324         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10325         * substring-locations.c: Include intl.h.
10326         (format_warning_va): Turned into small wrapper around
10327         format_warning_n_va, renamed to ...
10328         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10329         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10330         use ngettext.
10331         (format_warning_at_substring_n): New function.
10332         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10333         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
10334         format_warning_at_substring with just a shorter name instead of
10335         const function pointer.
10336         (fmtwarn_n): New function.
10337         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10338         appropriate, get rid of all the fmtstr temporaries, move conditionals
10339         with G_() wrapped string literals directly into fmtwarn arguments,
10340         cast dir.len to (int), formatting fixes.
10342 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
10344         * doc/invoke.texi: Remove "Cilk Plus" references.
10346 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10347             Richard Biener  <rguenther@suse.de>
10349         PR ipa/84628
10350         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10351         for error or warning attributes if CALL_FROM_THUNK_P is set.
10352         Formatting fixes.
10354 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10356         PR target/56540
10357         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10358         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10360         PR target/56540
10361         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10362         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10364         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10365         instead of -1U in last predictors element's probability member.
10367 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10369         PR ipa/83983
10370         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10371         arguments if they are comparable.
10373 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10375         PR tree-optimization/84634
10376         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10377         masks and masked_loop_p with a single loop_masks, making sure it's
10378         null for bb vectorization.
10380 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10382         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10383         (vect_analyze_data_ref_access): Use loop->safe_len rather than
10384         loop->force_vectorize to check whether there is no alias.
10386 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10388         PR target/84614
10389         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10390         prototypes.
10391         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10392         comments.
10393         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10394         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10395         instead of a loop around prev_real_insn.
10396         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10397         prev_real_insn.
10399         PR inline-asm/84625
10400         * config/i386/i386.c (ix86_print_operand): Use conditional
10401         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10402         zero vector.
10404 2018-03-02  Richard Biener  <rguenther@suse.de>
10406         PR tree-optimization/84427
10407         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10408         (bitmap_set_subtract_values): Rewrite to handle multiple
10409         exprs per value.
10410         (clean): Likewise.
10411         (prune_clobbered_mems): Likewise.
10412         (phi_translate): Take edge instead of pred/phiblock.
10413         (phi_translate_1): Likewise.
10414         (phi_translate_set): Likewise.  Insert all translated
10415         exprs for a value into the set, keeping possibly multiple
10416         expressions per value.
10417         (compute_antic_aux): Adjust for phi_translate changes.
10418         When intersecting union the expressions and prune those
10419         not in the final value set, keeping possibly multiple
10420         expressions per value.  Do not use value-insertion
10421         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10422         all expressions.  Add verification that the value-sets
10423         only shrink during iteration.
10424         (compute_partial_antic_aux): Adjust for the phi_translate changes.
10425         (do_pre_regular_insertion): Likewise.
10426         (do_pre_partial_partial_insertion): Likewise.
10428 2018-03-02  Richard Biener  <rguenther@suse.de>
10430         PR target/82005
10431         * config/darwin.c (saved_debug_info_level): New static global.
10432         (darwin_asm_lto_start): Disable debug info generation for LTO out.
10433         (darwin_asm_lto_end): Restore debug info generation settings.
10435 2018-03-01  Martin Liska  <mliska@suse.cz>
10437         PR sanitizer/82484
10438         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10439         volatile arguments.
10441 2018-03-01  Richard Biener  <rguenther@suse.de>
10443         PR debug/84645
10444         * dwarf2out.c (gen_variable_die): Properly handle late VLA
10445         type annotation with LTO when debug was disabled at compile-time.
10447 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
10449         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10450         XINT with INTVAL.
10451         (mips_final_postscan_insn): Likewise.
10453 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
10455         PR rtl-optimization/84528
10456         * alias.c (init_alias_target): Add commentary.
10457         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10458         a unique base value if the frame pointer is not eliminated
10459         to the stack pointer.
10461 2018-03-01  Tom de Vries  <tom@codesourcery.com>
10463         PR rtl-optimization/83327
10464         * lra-int.h (hard_regs_spilled_into): Declare.
10465         * lra.c (hard_regs_spilled_into): Define.
10466         (init_reg_info): Init hard_regs_spilled_into.
10467         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10468         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10469         (process_bb_lives): Handle hard_regs_spilled_into.
10470         (lra_create_live_ranges_1): Before doing liveness propagation, clear
10471         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10473 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
10475         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10476         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10477         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10478         * config/rs6000/aix72.h: New file.
10480 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
10482         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10483         instead of warning_at with conditional singular and plural messages
10484         where possible.
10486         PR target/52991
10487         * stor-layout.c (update_alignment_for_field): For
10488         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10489         && !DECL_PACKED (field), do the alignment update, just use
10490         only desired_align instead of MAX (type_align, desired_align)
10491         as the alignment.
10492         (place_field): Don't do known_align < desired_align handling
10493         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10494         is non-NULL, instead do it after rli->prev_field handling and
10495         only if not within a bitfield word.  For DECL_PACKED (field)
10496         use type_align of BITS_PER_UNIT.
10498 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
10500         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10501         superfluous parentheses and trailing spaces.
10503 2018-02-28  Richard Biener  <rguenther@suse.de>
10505         PR tree-optimization/84584
10506         * graphite-scop-detection.c (scop_detection::add_scop): Discard
10507         SCoPs with fake exit edge.
10509 2018-02-28  Martin Liska  <mliska@suse.cz>
10511         PR testsuite/84597
10512         * timevar.c (timer::print): Fix format to properly print 100%
10513         values.
10515 2018-02-28  Richard Biener  <rguenther@suse.de>
10517         PR middle-end/84607
10518         * genmatch.c (capture_info::walk_match): Do not mark
10519         captured expressions without operands as expr_p given
10520         they act more like predicates and should be subject to
10521         "lost tail" side-effect preserving.
10523 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
10525         PR rtl-optimization/81611
10526         * auto-inc-dec.c (attempt_change): Move dead note from
10527         mem_insn if it's the next use of regno
10528         (find_address): Take address use of reg holding
10529         non-incremented value.  Add parm to limit search to the named
10530         reg only.
10531         (merge_in_block): Attempt to use a mem insn that is the next
10532         use of the original regno.
10534 2018-02-27  Martin Sebor  <msebor@redhat.com>
10536         PR c++/83871
10537         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10538         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10540 2018-02-27  Martin Sebor  <msebor@redhat.com>
10542         PR translation/84207
10543         * diagnostic-core.h (warning_n, error_n, inform_n): Change
10544         n argument to unsigned HOST_WIDE_INT.
10545         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10546         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
10547         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10548         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10550 2018-02-27  Richard Biener  <rguenther@suse.de>
10552         PR tree-optimization/84512
10553         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10554         Do not use the estimate returned from record_stmt_cost for
10555         the scalar iteration cost but sum properly using add_stmt_cost.
10557 2018-02-27  Richard Biener  <rguenther@suse.de>
10559         PR tree-optimization/84466
10560         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10561         Adjust last change to less strictly validate use operands.
10563 2018-02-27  Martin Liska  <mliska@suse.cz>
10565         PR gcov-profile/84548
10566         * gcov.c (process_file): Allow partial overlap and consider it
10567         also as group functions.
10568         (output_lines): Properly calculate range of lines for a group.
10570 2018-02-27  Martin Liska  <mliska@suse.cz>
10572         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10573         'ggc' suffixes.  Change first column width.
10574         (timer::print): Fix formatting of the column.
10576 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10578         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10579         preserve inline entry blocks for the sake of debug inline
10580         entry point markers alone.
10581         (remove_unused_locals): Suggest in comments a better place to
10582         force the preservation of inline entry blocks that are
10583         otherwise unused, but do not preserve them.
10585 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10587         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10589 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10591         PR target/84039
10592         * config/i386/constraints.md (Bs): Replace
10593         ix86_indirect_branch_register with
10594         TARGET_INDIRECT_BRANCH_REGISTER.
10595         (Bw): Likewise.
10596         * config/i386/i386.md (indirect_jump): Likewise.
10597         (tablejump): Likewise.
10598         (*sibcall_memory): Likewise.
10599         (*sibcall_value_memory): Likewise.
10600         Peepholes of indirect call and jump via memory: Likewise.
10601         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10602         (*sibcall_value_GOT_32): Likewise.
10603         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10604         (GOT_memory_operand): Likewise.
10605         (call_insn_operand): Likewise.
10606         (sibcall_insn_operand): Likewise.
10607         (GOT32_symbol_operand): Likewise.
10608         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10610 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10612         PR rtl-optimization/83496
10613         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10614         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10615         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10616         redundant insn, if any.
10617         (relax_delay_slots): Likewise.
10618         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10620 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10622         PR tree-optimization/83965
10623         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10624         that grouped statements are part of a reduction chain.  Return
10625         true if the statement is not marked as a reduction itself but
10626         is part of a group.
10627         (vect_recog_dot_prod_pattern): Don't check whether the statement
10628         is part of a group here.
10629         (vect_recog_sad_pattern): Likewise.
10630         (vect_recog_widen_sum_pattern): Likewise.
10632 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10634         PR debug/84545
10635         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10637 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10639         PR target/84530
10640         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10641         the bool argument.
10642         (ix86_output_indirect_function_return): New prototype.
10643         (ix86_split_simple_return_pop_internal): Likewise.
10644         * config/i386/i386.c (indirect_return_via_cx): New.
10645         (indirect_return_via_cx_bnd): Likewise.
10646         (indirect_thunk_name): Handle return va CX_REG.
10647         (output_indirect_thunk_function): Create alias for
10648         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10649         (ix86_output_indirect_jmp): Remove the bool argument.
10650         (ix86_output_indirect_function_return): New function.
10651         (ix86_split_simple_return_pop_internal): Likewise.
10652         * config/i386/i386.md (*indirect_jump): Don't pass false
10653         to ix86_output_indirect_jmp.
10654         (*tablejump_1): Likewise.
10655         (simple_return_pop_internal): Change it to define_insn_and_split.
10656         Call ix86_split_simple_return_pop_internal to split it for
10657         -mfunction-return=.
10658         (simple_return_indirect_internal): Call
10659         ix86_output_indirect_function_return instead of
10660         ix86_output_indirect_jmp.
10662 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10664         PR bootstrap/84405
10665         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10666         memset and value initialization afterwards.
10668 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10670         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10672 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10674         PR target/84521
10675         * common/config/aarch64/aarch64-common.c
10676         (aarch_option_optimization_table[]): Switch
10677         off fomit-frame-pointer
10679 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10680             Chung-Ju Wu  <jasonwucj@gmail.com>
10682         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10683         volatile memory.
10684         (store_multiple): Ditto.
10686 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10688         * config.gcc: Add --with-cpu support for nds32 target.
10689         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10690         * config/nds32/nds32.opt: Add -mcpu= option.
10692 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10694         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10695         isel=yes): Warn for these deprecated options.
10697 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10699         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10700         ISA_2_5_MASKS_EMBEDDED.
10702 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10704         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10705         p->max as pointers rather than using iterative_hash_expr.
10707 2018-02-23  Carl Love  <cel@us.ibm.com>
10709         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10710         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10711         BU_P8V_OVERLOAD_2.
10712         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10713         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10714         P8V_BUILTIN_VEC_VUNSIGNED2.
10716 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10718         PR target/81572
10719         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10720         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10721         LRA_UNKNOWN_ALT.
10722         * lra-constraints.c (curr_insn_transform): Set up
10723         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10724         LRA_UNKNOWN_ALT.
10725         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10726         * lra-eliminations.c (spill_pseudos): Ditto.
10727         (process_insn_for_elimination): Ditto.
10728         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10729         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10730         LRA_NON_CLOBBERED_ALT.
10732 2018-02-22  Martin Sebor  <msebor@redhat.com>
10734         PR tree-optimization/84480
10735         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10736         to maybe_diag_stxncpy_trunc.  Call it.
10737         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10738         from gimple_fold_builtin_strcpy.  Print inlining stack.
10739         (handle_builtin_stxncpy): Print inlining stack.
10740         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10742 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10744         PR target/84176
10745         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10746         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10747         and -fcheck-pointer-bounds are used together.
10748         (indirect_thunk_prefix): New enum.
10749         (indirect_thunk_need_prefix): New function.
10750         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10751         "_nt" instead of "_bnd" for NOTRACK prefix.
10752         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10753         (output_indirect_thunk_function): Likewise.
10754         (): Likewise.
10755         (ix86_code_end): Update output_indirect_thunk_function calls.
10756         (ix86_output_indirect_branch_via_reg): Replace
10757         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10758         (ix86_output_indirect_branch_via_push): Likewise.
10759         (ix86_output_function_return): Likewise.
10760         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10761         incompatible with -fcf-protection=branch and
10762         -fcheck-pointer-bounds.
10764 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10766         PR target/83335
10767         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10768         Change gcc_assert call to output_operand_lossage.
10770 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10772         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10774 2018-02-22  DJ Delorie  <dj@redhat.com>
10775             Sebastian Perta  <sebastian.perta@renesas.com>
10776             Oleg Endo  <olegendo@gcc.gnu.org>
10778         * config/rx/rx.c (rx_rtx_costs): New function.
10779         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10781 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10783         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10785 2018-02-22  Martin Liska  <mliska@suse.cz>
10787         PR driver/83193
10788         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10789         Add "native" as a possible value.
10791 2018-02-22  Martin Liska  <mliska@suse.cz>
10793         PR driver/83193
10794         * config/i386/i386.c (ix86_option_override_internal):
10795         Add "native" as a possible value for -march and -mtune.
10797 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10799         PR target/84502
10800         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10801         to all type variants.
10803         PR tree-optimization/84503
10804         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10805         width as info->bitpos + info->bitsize - start.
10806         (merged_store_group::merge_overlapping): Simplify width computation.
10807         (check_no_overlap): New function.
10808         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10809         start + width and last_order of the group, fail if check_no_overlap
10810         fails.
10811         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10812         to group if check_no_overlap fails.
10814 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10816         * config/rs6000/altivec.md: Delete contraint arguments to
10817         define_expand, define_split, and define_peephole2, and in
10818         define_insn_and_split if always unused.
10819         * config/rs6000/darwin.md: Ditto.
10820         * config/rs6000/dfp.md: Ditto.
10821         * config/rs6000/rs6000.md: Ditto.
10822         * config/rs6000/sync.md: Ditto.
10823         * config/rs6000/vector.md: Ditto.
10824         * config/rs6000/vsx.md: Ditto.
10826 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10828         * config/rs6000/altivec.md: Write output control strings as braced
10829         blocks instead of double-quoted strings.
10830         * config/rs6000/darwin.md: Ditto.
10831         * config/rs6000/rs6000.md: Ditto.
10832         * config/rs6000/vector.md: Ditto.
10833         * config/rs6000/vsx.md: Ditto.
10835 2018-02-21  Jason Merrill  <jason@redhat.com>
10837         PR c++/84314 - ICE with templates and fastcall attribute.
10838         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10840 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10842         * ipa-cp.c (determine_versionability): Fix comment typos.
10844 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10846         PR c/84229
10847         * ipa-cp.c (determine_versionability): Do not version functions caling
10848         va_arg_pack.
10850 2018-02-21  Martin Liska  <mliska@suse.cz>
10852         PR driver/83193
10853         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10854         Add "native" as a possible value.
10855         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10856         the macro when native cpu detection is available.
10858 2018-02-21  Martin Liska  <mliska@suse.cz>
10860         PR driver/83193
10861         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10862         Add "native" as a possible value.
10863         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10864         when native cpu detection is available.
10866 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10867             Martin Sebor  <msebor@redhat.com>
10869         PR tree-optimization/84478
10870         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10871         false.
10872         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10873         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10874         support which is conservatively correct, for 2 only stay conservative
10875         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10876         argument to the 2 argument get_range_strlen, adjust 6 arg
10877         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10878         false.
10879         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10880         (gimple_fold_builtin_strlen): Pass true as last argument to
10881         get_range_strlen.
10883 2018-02-20  Martin Sebor  <msebor@redhat.com>
10885         PR middle-end/84095
10886         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10887         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10888         (builtin_memref::builtin_memref): Factor out parts into
10889         set_base_and_offset and call it.
10891 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10893         PR middle-end/84406
10894         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10895         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10896         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10897         search at the associated MODE_INT.
10899 2018-02-20  Jeff Law  <law@redhat.com>
10901         PR middle-end/82123
10902         PR tree-optimization/81592
10903         PR middle-end/79257
10904         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10905         for range data rather than using global data.
10906         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10907         range data rather than using global data.
10908         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10909         pass it to children as needed.
10910         (struct directive::fmtresult): Similarly.
10911         (struct directive::set_width): Similarly.
10912         (struct directive::set_precision): Similarly.
10913         (format_integer, format_directive, parse_directive): Similarly.
10914         (format_none): Accept unnamed vr_values parameter.
10915         (format_percent, format_floating, format_character): Similarly.
10916         (format_string, format_plain): Similarly.
10917         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10918         the EVRP range analyzer for range data rather than using global data.
10919         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10920         gimple-ssa-evrp-analyze.h
10921         (class sprintf_dom_walker): Add after_dom_children member function.
10922         Add evrp_range_analyzer member.
10923         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10924         range analyzer as needed.
10925         (sprintf_dom_walker::after_dom_children): New member function.
10926         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10927         if not optimizing.
10928         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10929         (evrp_range_analyzer::pop_to_marker): Likewise.
10931 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10933         PR tree-optimization/84419
10934         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10935         with the required type if its current type is compatible but
10936         different.
10938 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10940         PR middle-end/82004
10941         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10942         after vectorization.
10944 2018-02-20  Martin Liska  <mliska@suse.cz>
10946         PR driver/83193
10947         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10948         possible values if we don't have a hint.
10950 2018-02-20  Martin Liska  <mliska@suse.cz>
10952         PR c/84310
10953         PR target/79747
10954         * final.c (shorten_branches): Build align_tab array with one
10955         more element.
10956         * opts.c (finish_options): Add alignment option limit check.
10957         (MAX_CODE_ALIGN): Likewise.
10958         (MAX_CODE_ALIGN_VALUE): Likewise.
10959         * doc/invoke.texi: Document maximum allowed option value for
10960         all -falign-* options.
10962 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10964         PR target/84146
10965         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10966         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10967         * var-tracking.c (emit_note_insn_var_location): Remove all references
10968         to NOTE_INSN_CALL_ARG_LOCATION.
10969         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10970         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10971         Use copy_rtx_if_shared.
10972         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10973         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10974         (dwarf2out_var_location): Remove handling of
10975         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10976         on call_insn.
10977         * final.c (final_scan_insn): Remove all references to
10978         NOTE_INSN_CALL_ARG_LOCATION.
10979         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10980         before dumping final insns.
10981         * except.c (emit_note_eh_region_end): Remove all references to
10982         NOTE_INSN_CALL_ARG_LOCATION.
10983         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10984         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10985         * config/arc/arc.c (hwloop_optimize): Likewise.
10986         * config/arm/arm.c (create_fix_barrier): Likewise.
10987         * config/s390/s390.c (s390_chunkify_start): Likewise.
10988         * config/sh/sh.c (find_barrier): Likewise.
10989         * config/i386/i386.c (rest_of_insert_endbranch,
10990         ix86_seh_fixup_eh_fallthru): Likewise.
10991         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10992         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10993         * config/frv/frv.c (frv_function_prologue): Likewise.
10994         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10995         reg note.
10996         (note_outside_basic_block_p): Remove all references to
10997         NOTE_INSN_CALL_ARG_LOCATION.
10998         * gengtype.c (adjust_field_rtx_def): Likewise.
10999         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
11000         Likewise.
11001         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
11002         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
11004         PR c++/84444
11005         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
11006         is ADDR_EXPR.
11008         PR tree-optimization/84452
11009         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
11010         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
11011         is NULL.
11013 2018-02-19  Martin Liska  <mliska@suse.cz>
11015         PR sanitizer/82183
11016         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
11018 2018-02-19  Martin Liska  <mliska@suse.cz>
11019             Richard Sandiford  <richard.sandiford@linaro.org>
11021         PR tree-optimization/82491
11022         * gimple-fold.c (get_base_constructor): Make earlier bail out
11023         to prevent ubsan.
11025 2018-02-19  Carl Love  <cel@us.ibm.com>
11027         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
11028         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
11029         BU_P8V_OVERLOAD_1.
11030         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
11031         P8V_BUILTIN_VEC_NEG.
11033 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
11035         * config/rl78/rl78.md (movdf): New define expand.
11037 2018-02-19  Martin Liska  <mliska@suse.cz>
11039         PR other/80589
11040         * doc/invoke.texi: Fix typo.
11041         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11043 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
11045         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11046         handle rs6000_single_float and rs6000_double_float specially for
11047         e500 family CPUs.
11049 2018-02-16  Jeff Law  <law@redhat.com>
11051         * config/rx/rx.c (add_pop_cfi_notes): New function.;
11052         (pop_regs): Use it.
11054 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11056         PR ipa/84425
11057         * ipa-inline.c (inline_small_functions): Fix a typo.
11059 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11061         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11063 2018-02-16  Carl Love  <cel@us.ibm.com>
11065         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11066         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11067         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11068         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11069         expansion to P8V_BUILTIN_VEC_FLOAT2.
11071 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
11073         PR rtl-optimization/70023
11074         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11075         src_regno into account.
11077 2018-02-16  Carl Love  <cel@us.ibm.com>
11079         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11080         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11081         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11082         * config/rs6000/rs6000.c: Remove case statements for
11083         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11084         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11085         and P9V_BUILTIN_VEC_VINSERT4B.
11086         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11087         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11088         * config/rs6000/vsx.md:
11089         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11090         vec_insert4b.
11092 2018-02-16  Carl Love  <cel@us.ibm.com>
11094         * config/rs6000/altivec.h: Add builtin names vec_extract4b
11095         vec_insert4b.
11096         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11097         definitions.
11098         * config/rs6000/rs6000-c.c: Add the definitions for
11099         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11100         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11101         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11102         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
11103         definition for insert4b and define insn *insert3b_internal.
11104         * doc/extend.texi: Add documentation for vec_extract4b.
11106 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11108         * doc/extend.texi (Backwards Compatibility): Mention friend
11109         injection.  Note for-scope is deprecated.
11110         * doc/invoke.texi (-ffriend-injection): Deprecate.
11112 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
11114         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11115         that moved to I2, also allow destinations that are a paradoxical
11116         subreg (instead of a normal reg).
11118 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
11120         PR target/83831
11121         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11122         to QImode.
11124 2018-02-16  Richard Biener  <rguenther@suse.de>
11126         PR tree-optimization/84037
11127         PR tree-optimization/84016
11128         PR target/82862
11129         * config/i386/i386.c (ix86_builtin_vectorization_cost):
11130         Adjust vec_construct for the fact we need additional higher latency
11131         128bit inserts for AVX256 and AVX512 vector builds.
11132         (ix86_add_stmt_cost): Scale vector construction cost for
11133         elementwise loads.
11135 2018-02-16  Richard Biener  <rguenther@suse.de>
11137         PR tree-optimization/84417
11138         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11139         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11140         (non_rewritable_lvalue_p): Likewise, use poly-ints.
11142 2018-02-16  Martin Liska  <mliska@suse.cz>
11144         PR sanitizer/84307
11145         * internal-fn.def (ASAN_CHECK): Set proper flags.
11146         (ASAN_MARK): Likewise.
11148 2018-02-16  Julia Koval  <julia.koval@intel.com>
11150         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11151         from PTA_CANNONLAKE.
11153 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11155         PR target/84272
11156         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11157         Use ++iter rather than iter++ for std::list iterators.
11158         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
11159         defer deleting them until all nodes in the forest are processed.  Do
11160         free even leaf nodes.  Change to_process into auto_vec.
11162         PR bootstrap/84405
11163         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11164         * vec.h (vec_default_construct): Use memset instead of placement new
11165         if BROKEN_VALUE_INITIALIZATION is defined.
11166         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11167         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11168         is defined.
11170         PR rtl-optimization/83723
11171         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11172         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
11173         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
11174         recursive calls.
11175         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11176         callers.
11177         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11179 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
11181         PR rtl-optimization/81443
11182         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11183         from inner REGs to paradoxical SUBREGs.
11185 2018-02-16  Richard Biener  <rguenther@suse.de>
11187         PR tree-optimization/84399
11188         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11189         For operands we can analyze at their definition make sure we can
11190         analyze them at each use as well.
11192 2018-02-16  Richard Biener  <rguenther@suse.de>
11194         PR tree-optimization/84190
11195         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11196         volatile accesses if the decl isn't volatile.
11198 2018-02-15  Jason Merrill  <jason@redhat.com>
11200         PR c++/84314 - ICE with templates and fastcall attribute.
11201         * attribs.c (build_type_attribute_qual_variant): Don't clobber
11202         TYPE_CANONICAL on an existing type.
11204 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
11206         PR tree-optimization/84383
11207         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11208         dstoff nor call operand_equal_p if dstbase is NULL.
11210         PR tree-optimization/84334
11211         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11212         also a CONSTANT_CLASS_P, punt.
11214 2018-02-14  Jim Wilson  <jimw@sifive.com>
11216         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11217         first SMALL_OPERAND check.  New local min_second_step.  Move assert
11218         to where locals are set.  Add TARGET_RVC support.
11219         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11221 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
11223         * doc/invoke.texi: Correct -Wformat-overflow code sample.
11225 2018-02-14  Martin Sebor  <msebor@redhat.com>
11227         PR tree-optimization/83698
11228         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11229         arrays constrain the offset range to their bounds.
11230         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11231         (builtin_access::overlap): Avoid setting the size of overlap if it's
11232         already been set.
11233         (maybe_diag_overlap): Also consider arrays when deciding what values
11234         of offsets to include in diagnostics.
11236 2018-02-14  Martin Sebor  <msebor@redhat.com>
11238         PR c/84108
11239         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11240         that correspond to the kind of a declaration.
11242 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
11244         PR target/83984
11245         * config/pa/pa.md: Load address of PIC label using the linkage table
11246         if the label is nonlocal.
11248 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11250         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11251         warning message if user requests -maltivec=be.
11252         * doc/invoke.texi: Document deprecation of -maltivec=be.
11254 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
11256         PR target/84220
11257         * config/rs6000/rs6000-c.c: Update definitions for
11258         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11259         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11261 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11263         PR target/84239
11264         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11265         add _get_ssp intrinsics. Remove argument from
11266         __builtin_ia32_rdssp[d|q].
11267         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11268         * config/i386/i386-builtin.def: Remove argument from
11269         __builtin_ia32_rdssp[d|q].
11270         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11271         ix86_expand_special_args_builtin for _rdssp[d|q].
11272         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11273         Clear register before usage.
11274         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11275         Add documentation for new _get_ssp and _inc_ssp intrinsics.
11277 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
11279         PR tree-optimization/84357
11280         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11281         operand 1 of an ARRAY_REF too.
11283 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
11285         PR target/83831
11286         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11287         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11288         declarations.
11289         (set_of_reg): New struct.
11290         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11291         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11292         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11293         functions.
11294         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11295         Split into bitclr, bitset, bitinvert patterns if appropriate.
11296         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11297         use rx_fuse_in_memory_bitop.
11298         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11299         to named insn, correct maximum insn length.
11301 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
11303         PR target/79242
11304         * machmode.def: Define a complex mode for PARTIAL_INT.
11305         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11306         MODE_PARTIAL_INT.
11307         * doc/rtl.texi: Document CSPImode.
11308         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11309         handling.
11310         (msp430_hard_regno_nregs_with_padding): Likewise.
11312 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
11314         PR target/84279
11315         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11317 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
11319         PR rtl-optimization/84169
11320         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
11321         we generated a parallel as new i3 and we split that to new i2 and i3
11322         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
11323         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
11324         those to i2, not i1.  Partially rewrite this scan code.
11326 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11328         PR c/82210
11329         * stor-layout.c (place_field): For variable length fields, adjust
11330         offset_align afterwards not just based on the field's alignment,
11331         but also on the size.
11333         PR middle-end/84309
11334         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11335         of exps and logs in the use_exp2 case.
11337 2018-02-13  Jeff Law  <law@redhat.com>
11339         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11340         entry for "vector".
11342         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11343         ARGS as unused.
11345 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
11347         PR debug/84342
11348         PR debug/84319
11349         * common.opt (gas-loc-support, gas-locview-support): New.
11350         (ginline-points, ginternal-reset-location-views): New.
11351         * doc/invoke.texi: Document them.  Use @itemx where intended.
11352         (gvariable-location-views): Adjust.
11353         * target.def (reset_location_view): New.
11354         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11355         (TARGET_RESET_LOCATION_VIEW): New.
11356         * doc/tm.texi: Rebuilt.
11357         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11358         (dwarf2out_default_as_locview_support): New.
11359         (output_asm_line_debug_info): Use option variables.
11360         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11361         (output_loc_list): Likewise.
11362         (add_high_low_attributes): Check option variables.
11363         Don't output entry view attribute in strict mode.
11364         (gen_inlined_subroutine_die): Check option variables.
11365         (dwarf2out_inline_entry): Likewise.
11366         (init_sections_and_labels): Likewise.
11367         (dwarf2out_early_finish): Likewise.
11368         (maybe_reset_location_view): New, from...
11369         (dwarf2out_var_location): ... here.  Call it.
11370         * debug.h (dwarf2out_default_as_loc_support): Declare.
11371         (dwarf2out_default_as_locview_support): Declare.
11372         * hooks.c (hook_int_rtx_insn_0): New.
11373         * hooks.h (hook_int_rtx_insn_0): Declare.
11374         * toplev.c (process_options): Take -gas-loc-support and
11375         -gas-locview-support from dwarf2out.  Enable
11376         -gvariable-location-views by default only with locview
11377         assembler support.  Enable -ginternal-reset-location-views by
11378         default only if the target defines the corresponding hook.
11379         Enable -ginline-points by default if location views are
11380         enabled; force it disabled if statement frontiers are
11381         disabled.
11382         * tree-inline.c (expand_call_inline): Check option variables.
11383         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11385 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
11387         PR tree-optimization/84321
11388         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11389         handling.  Also check whether the anti-range contains any values
11390         that satisfy the mask; switch to a VR_RANGE if not.
11392 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
11394         PR sanitizer/84340
11395         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11397 2018-02-13  Martin Jambor  <mjambor@suse.cz>
11399         PR c++/83990
11400         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11401         of call statements, also set location of a load to a temporary.
11403 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
11405         * config/rl78/rl78.c (add_vector_labels): New function.
11406         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11407         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11408         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11409         which checks that no arguments are passed.
11410         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11411         * doc/extend.texi: Documentation for the new attribute.
11413 2018-02-13  Andreas Schwab  <schwab@suse.de>
11415         * config/riscv/linux.h (CPP_SPEC): Define.
11417 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11419         PR target/84335
11420         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11421         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11422         OPTION_MASK_ISA_AES as first argument to def_builtin_const
11423         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11424         instead of OPTION_MASK_ISA_PCLMUL as first argument to
11425         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11426         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11427         temporarily for AES and PCLMUL builtins.
11429         PR tree-optimization/84339
11430         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11431         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11432         Formatting fixes.
11434         PR middle-end/84309
11435         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11436         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11437         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11438         inline function.
11439         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11440         inline function.
11441         * omp-simd-clone.h: New file.
11442         * omp-simd-clone.c: Include omp-simd-clone.h.
11443         (expand_simd_clones): No longer static.
11444         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11445         cgraph.h and omp-simd-clone.h.
11446         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11447         (vect_recog_widen_shift_pattern): Formatting fix.
11448         (vect_pattern_recog_1): Don't check optab for calls.
11450         PR target/84336
11451         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11452         operands[2] into a REG before using gen_lowpart on it.
11454 2018-02-12  Jeff Law  <law@redhat.com>
11456         PR target/83760
11457         * config/sh/sh.c (find_barrier): Consider a sibling call
11458         a barrier as well.
11460         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11461         successfully back substituting a reg.
11463 2018-02-12  Richard Biener  <rguenther@suse.de>
11465         PR tree-optimization/84037
11466         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11467         parameter, move visited init to caller.
11468         (vect_slp_analyze_operations): Separate cost from validity
11469         check, initialize visited once for all instances.
11470         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11471         for all instances.
11472         * tree-vect-stmts.c (vect_model_simple_cost): Make early
11473         out an assert.
11474         (vect_model_promotion_demotion_cost): Likewise.
11475         (vectorizable_bswap): Guard cost modeling with !slp_node
11476         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11477         SLP stmts.
11478         (vectorizable_call): Likewise.
11479         (vectorizable_conversion): Likewise.
11480         (vectorizable_assignment): Likewise.
11481         (vectorizable_shift): Likewise.
11482         (vectorizable_operation): Likewise.
11483         (vectorizable_store): Likewise.
11484         (vectorizable_load): Likewise.
11485         (vectorizable_condition): Likewise.
11486         (vectorizable_comparison): Likewise.
11488 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
11490         PR sanitizer/84307
11491         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11492         (ASAN_MARK): Fix fnspec to account for return value, change pointer
11493         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11495 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11497         PR middle-end/83665
11498         * params.def (inline-min-speedup): Increase from 8 to 15.
11499         (max-inline-insns-auto): Decrease from 40 to 30.
11500         * ipa-split.c (consider_split): Add some buffer for function to
11501         be considered inlining candidate.
11502         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11503         default values.
11505 2018-02-12  Richard Biener  <rguenther@suse.de>
11507         PR tree-optimization/84037
11508         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11509         matched stmts if we cannot swap the non-matched ones.
11511 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11513         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11514         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11515         _mm_maskz_scalef_round_ss): New intrinsics.
11516         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11517         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11518         __builtin_ia32_scalefss_round): Remove.
11519         (__builtin_ia32_scalefsd_mask_round,
11520         __builtin_ia32_scalefss_mask_round): New intrinsics.
11521         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11522         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11523         ((match_operand:VF_128 2 "<round_nimm_predicate>"
11524         "<round_constraint>")): Changed to ...
11525         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11526         "<round_scalar_constraint>")): ... this.
11527         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11528         %0, %1, %2<round_op3>}"): Changed to ...
11529         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11530         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11531         %2<round_scalar_mask_op3>}"): ... this.
11532         * config/i386/subst.md (round_scalar_nimm_predicate): New.
11534 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11536         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11537         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11538         (_mm_maskz_sqrt_round_ss): New intrinsics.
11539         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11540         (__builtin_ia32_sqrtsd_mask_round)
11541         (__builtin_ia32_sqrtss_mask_round): New builtins.
11542         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11543         (__builtin_ia32_sqrtss_round): Remove.
11544         (__builtin_ia32_sqrtsd_mask_round)
11545         (__builtin_ia32_sqrtss_mask_round): New builtins.
11546         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11547         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11548         ((match_operand:VF_128 1 "vector_operand"
11549         "xBm,<round_constraint>")): Changed to ...
11550         ((match_operand:VF_128 1 "vector_operand"
11551         "xBm,<round_scalar_constraint>")): ... this.
11552         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11553         %0, %2, %<iptr>1<round_op3>}): Changed to ...
11554         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11555         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11556         %<iptr>1<round_scalar_mask_op3>}): ... this.
11557         ((set_attr "prefix" "<round_prefix>")): Changed to ...
11558         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11560 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11562         PR target/84266
11563         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11564         Cast vec_cmpeq result to correct type.
11565         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11566         Cast vec_cmpgt result to correct type.
11568 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11570         * final.c (final_scan_insn_1): Renamed from...
11571         (final_scan_insn): ... this.  New wrapper, to recover
11572         seen from the outermost call in recursive ones.
11573         * config/sparc/sparc.c (output_return): Drop seen from call.
11574         (output_sibcall): Likewise.
11575         * config/visium/visium.c (output_branch): Likewise.
11577 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11579         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11580         function label.
11582 2018-02-10  Alan Modra  <amodra@gmail.com>
11584         PR target/84300
11585         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11586         Specify LR as an input.
11588 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11590         PR sanitizer/83987
11591         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11592         remove_member_access_dummy_vars): New functions.
11593         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11594         lower_omp_1, execute_lower_omp): Use them.
11596         PR rtl-optimization/84308
11597         * shrink-wrap.c (spread_components): Release todo vector.
11599 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11601         PR rtl-optimization/57193
11602         * ira-color.c (struct allocno_color_data): Add member
11603         conflict_allocno_hard_prefs.
11604         (update_conflict_allocno_hard_prefs): New.
11605         (bucket_allocno_compare_func): Add a preference based on
11606         conflict_allocno_hard_prefs.
11607         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11608         (color_allocnos): Remove a dead code.  Initiate
11609         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11611 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11613         PR target/84226
11614         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11615         constraint from =wa to wa.  Avoid a subreg on the output operand,
11616         instead use a pseudo and subreg it in a move.
11617         (p9_xxbrd_<mode>): Changed to ...
11618         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11619         (p9_xxbrd_v2df): New expander.
11620         (p9_xxbrw_<mode>): Changed to ...
11621         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11622         (p9_xxbrw_v4sf): New expander.
11624 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11626         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11628 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11630         PR target/83926
11631         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11632         multiply in 32-bit mode.
11633         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11634         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11635         mode.
11637 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11639         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11640         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11641         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11642         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11644 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11646         PR lto/84213
11647         * dwarf2out.c (is_trivial_indirect_ref): New function.
11648         (dwarf2out_late_global_decl): Do not generate a location
11649         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11650         and that are not defined in the current unit.
11652 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11654         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11655         instead of a libcall for UNORDERED.
11657 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11659         PR target/82641
11660         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11661         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11663 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11665         PR target/PR84295
11666         * config/s390/s390.c (s390_set_current_function): Invoke
11667         s390_indirect_branch_settings also if fndecl didn't change.
11669 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11671         * config/rs6000/rs6000.md (blockage): Set length to zero.
11673 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11675         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11677 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11679         PR sanitizer/84285
11680         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11681         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11682         -static-lib*san.
11684         PR debug/84252
11685         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11686         PARALLEL incoming that failed vt_get_decl_and_offset check.
11688         PR middle-end/84237
11689         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11690         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11691         TREE_READONLY bit.
11692         (get_variable_section): For decls in named .bss* sections pass true as
11693         second argument to bss_initializer_p.
11695 2018-02-09  Marek Polacek  <polacek@redhat.com>
11696             Jakub Jelinek  <jakub@redhat.com>
11698         PR c++/83659
11699         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11700         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11701         Sync some changes from cxx_fold_indirect_ref.
11703 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11705         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11706         markers.
11707         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11708         (BLOCK_INLINE_ENTRY_LABEL): New.
11709         (dwarf2out_var_location): Disregard inline entry markers.
11710         (inline_entry_data): New struct.
11711         (inline_entry_data_hasher): New hashtable type.
11712         (inline_entry_data_hasher::hash): New.
11713         (inline_entry_data_hasher::equal): New.
11714         (inline_entry_data_table): New variable.
11715         (add_high_low_attributes): Add DW_AT_entry_pc and
11716         DW_AT_GNU_entry_view attributes if a pending entry is found
11717         in inline_entry_data_table.  Add old entry_pc attribute only
11718         if debug nonbinding markers are disabled.
11719         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11720         markers are enabled.
11721         (block_within_block_p, dwarf2out_inline_entry): New.
11722         (dwarf2out_finish): Check that no entries remained in
11723         inline_entry_data_table.
11724         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11725         (final_scan_insn, notice_source_line): Likewise.
11726         (rest_of_clean_state): Skip inline entry markers.
11727         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11728         markers.
11729         * gimple.c (gimple_build_debug_inline_entry): New.
11730         * gimple.h (enum gimple_debug_subcode): Add
11731         GIMPLE_DEBUG_INLINE_ENTRY.
11732         (gimple_build_debug_inline_entry): Declare.
11733         (gimple_debug_inline_entry_p): New.
11734         (gimple_debug_nonbind_marker_p): Adjust.
11735         * insn-notes.def (INLINE_ENTRY): New.
11736         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11737         inline entry marker notes.
11738         (print_insn): Likewise.
11739         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11740         (INSN_DEBUG_MARKER_KIND): Likewise.
11741         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11742         * tree-inline.c (expand_call_inline): Build and insert
11743         debug_inline_entry stmt.
11744         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11745         inline entry blocks early, if nonbind markers are enabled.
11746         (dump_scope_block): Dump fragment info.
11747         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11748         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11749         (gimple_build_debug_inline_entry): New.
11750         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11751         Enable/disable inline entry points too.
11752         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11753         (DEBUG_INSN): Describe inline entry markers.
11755         * common.opt (gvariable-location-views): New.
11756         (gvariable-location-views=incompat5): New.
11757         * config.in: Rebuilt.
11758         * configure: Rebuilt.
11759         * configure.ac: Test assembler for view support.
11760         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11761         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11762         * dwarf2out.c (var_loc_view): New typedef.
11763         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11764         (dwarf2out_locviews_in_attribute): New.
11765         (dwarf2out_locviews_in_loclist): New.
11766         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11767         (enum dw_line_info_opcode): Add LI_adv_address.
11768         (struct dw_line_info_table): Add view.
11769         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11770         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11771         (zero_view_p): New variable.
11772         (ZERO_VIEW_P): New macro.
11773         (output_asm_line_debug_info): New.
11774         (struct var_loc_node): Add view.
11775         (add_AT_view_list, AT_loc_list): New.
11776         (add_var_loc_to_decl): Add view param.  Test it against last.
11777         (new_loc_list): Add view params.  Record them.
11778         (AT_loc_list_ptr): Handle loc and view lists.
11779         (view_list_to_loc_list_val_node): New.
11780         (print_dw_val): Handle dw_val_class_view_list.
11781         (size_of_die): Likewise.
11782         (value_format): Likewise.
11783         (loc_list_has_views): New.
11784         (gen_llsym): Set vl_symbol too.
11785         (maybe_gen_llsym, skip_loc_list_entry): New.
11786         (dwarf2out_maybe_output_loclist_view_pair): New.
11787         (output_loc_list): Output view list or entries too.
11788         (output_view_list_offset): New.
11789         (output_die): Handle dw_val_class_view_list.
11790         (output_dwarf_version): New.
11791         (output_compilation_unit_header): Use it.
11792         (output_skeleton_debug_sections): Likewise.
11793         (output_rnglists, output_line_info): Likewise.
11794         (output_pubnames, output_aranges): Update version comments.
11795         (output_one_line_info_table): Output view numbers in asm comments.
11796         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11797         Call maybe_gen_llsym.
11798         (loc_list_from_tree_1): Adjust.
11799         (add_AT_location_description): Create view list attribute if
11800         needed, check it's absent otherwise.
11801         (convert_cfa_to_fb_loc_list): Adjust.
11802         (maybe_emit_file): Call output_asm_line_debug_info for test.
11803         (dwarf2out_var_location): Reset views as needed.  Precompute
11804         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11805         attribute.  Set view.
11806         (new_line_info_table): Reset next view.
11807         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11808         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11809         the assembler, or select appropriate line info opcodes.
11810         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11811         (optimize_string_length): Catch it.  Adjust.
11812         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11813         dw_val_class_view_list, and remove it if no longer needed.
11814         (hash_loc_list): Hash view numbers.
11815         (loc_list_hasher::equal): Compare them.
11816         (optimize_location_lists): Check whether a view list symbol is
11817         needed, and whether the locview attribute is present, and
11818         whether they match.  Remove the locview attribute if no longer
11819         needed.
11820         (index_location_lists): Call skip_loc_list_entry for test.
11821         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11822         Use output_dwarf_version.
11823         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11824         (struct dw_val_node): Add val_view_list.
11825         * final.c (SEEN_NEXT_VIEW): New.
11826         (set_next_view_needed): New.
11827         (clear_next_view_needed): New.
11828         (maybe_output_next_view): New.
11829         (final_start_function): Rename to...
11830         (final_start_function_1): ... this.  Take pointer to FIRST,
11831         add SEEN parameter.  Emit param bindings in the initial view.
11832         (final_start_function): Reintroduce SEEN-less interface.
11833         (final): Rename to...
11834         (final_1): ... this.  Take SEEN parameter.  Output final pending
11835         next view at the end.
11836         (final): Reintroduce seen-less interface.
11837         (final_scan_insn): Output pending next view before switching
11838         sections or ending a block.  Mark the next view as needed when
11839         outputting variable locations.  Notify debug backend of section
11840         changes, and of location view changes.
11841         (rest_of_handle_final): Adjust.
11842         * toplev.c (process_options): Autodetect value for debug variable
11843         location views option.  Warn on incompat5 without -gdwarf-5.
11844         * doc/invoke.texi (gvariable-location-views): New.
11845         (gvariable-location-views=incompat5): New.
11846         (gno-variable-location-views): New.
11848 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11850         PR tree-optimization/84136
11851         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11852         that the result of find_edge is non-NULL.
11854 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11856         PR target/83008
11857         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11858         storing integer register in SImode.  Fix cost of 256 and 512
11859         byte aligned SSE register store.
11861 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11863         * config/i386/i386.c (ix86_multiplication_cost): Fix
11864         multiplication cost for TARGET_AVX512DQ.
11866 2018-02-08  Marek Polacek  <polacek@redhat.com>
11868         PR tree-optimization/84238
11869         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11870         get_range_strlen.
11872 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11874         PR tree-optimization/84265
11875         * tree-vect-stmts.c (vectorizable_store): Don't treat
11876         VMAT_CONTIGUOUS accesses as grouped.
11877         (vectorizable_load): Likewise.
11879 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11881         PR tree-optimization/81635
11882         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11883         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11884         (test_round_for_mask): New functions.
11885         (wide_int_cc_tests): Call test_round_for_mask.
11886         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11887         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11888         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11889         range returned by get_range_info.
11891 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11893         PR ipa/81360
11894         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11895         * symtab.c: Include builtins.h
11896         (symtab_node::output_to_lto_symbol_table_p): Move here
11897         from lto-streamer-out.c:output_symbol_p.
11898         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11899         (output_symbol_p): Move all logic to symtab.c
11900         (produce_symtab): Update.
11902 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11904         * config/s390/s390-opts.h (enum indirect_branch): Define.
11905         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11906         (s390_indirect_branch_via_thunk)
11907         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11908         (enum s390_indirect_branch_type): Define.
11909         * config/s390/s390.c (struct s390_frame_layout, struct
11910         machine_function): Remove.
11911         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11912         (indirect_branch_table_label_no, indirect_branch_table_name):
11913         Define variables.
11914         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11915         (enum s390_indirect_branch_option): Define.
11916         (s390_return_addr_from_memory): New function.
11917         (s390_handle_string_attribute): New function.
11918         (s390_attribute_table): Add new attribute handler.
11919         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11920         (s390_indirect_branch_via_thunk): New function.
11921         (s390_indirect_branch_via_inline_thunk): New function.
11922         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11923         sibling call optimization for non z10 compiles.
11924         (s390_emit_call): Force indirect branch target to be a single
11925         register.  Add r1 clobber for non-z10 compiles.
11926         (s390_emit_epilogue): Emit return jump via return_use expander.
11927         (s390_reorg): Handle JUMP_INSNs as execute targets.
11928         (s390_option_override_internal): Perform validity checks for the
11929         new command line options.
11930         (s390_indirect_branch_attrvalue): New function.
11931         (s390_indirect_branch_settings): New function.
11932         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11933         (s390_output_indirect_thunk_function):  New function.
11934         (s390_code_end): Implement target hook.
11935         (s390_case_values_threshold): Implement target hook.
11936         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11937         macros.
11938         * config/s390/s390.h (struct s390_frame_layout)
11939         (struct machine_function): Move here from s390.c.
11940         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11941         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11942         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11943         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11944         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11945         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11946         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11947         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11948         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11949         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11950         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11951         (mnemonic attribute): Add values which aren't recognized
11952         automatically.
11953         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11954         pattern for branch conversion.  Fix mnemonic attribute.
11955         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11956         indirect branch via thunk if requested.
11957         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11958         ("*indirect_jump"): Disable for branch conversion using out of
11959         line thunks.
11960         ("indirect_jump_via_thunk<mode>_z10")
11961         ("indirect_jump_via_thunk<mode>")
11962         ("indirect_jump_via_inlinethunk<mode>_z10")
11963         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11964         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11965         ("casesi_jump_via_inlinethunk<mode>_z10")
11966         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11967         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11968         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11969         ("*indirect2_jump"): Disable for branch conversion.
11970         ("casesi_jump"): Turn into expander and expand patterns for branch
11971         conversion.
11972         ("return_use"): New expander.
11973         ("*return"): Emit return via thunk and rename it to ...
11974         ("*return<mode>"): ... this one.
11975         * config/s390/s390.opt: Add new options and and enum for the
11976         option values.
11978 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11980         * lra-constraints.c (match_reload): Unconditionally use
11981         gen_lowpart_SUBREG, rather than selecting between that
11982         and equivalent gen_rtx_SUBREG code.
11984 2018-02-08  Richard Biener  <rguenther@suse.de>
11986         PR tree-optimization/84233
11987         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11988         changed flag instead of boguously re-using phi_inserted.
11990 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11992         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11993         static local variables.
11995 2018-02-08  Richard Biener  <rguenther@suse.de>
11997         PR tree-optimization/84278
11998         * tree-vect-stmts.c (vectorizable_store): When looking for
11999         smaller vector types to perform grouped strided loads/stores
12000         make sure the mode is supported by the target.
12001         (vectorizable_load): Likewise.
12003 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12005         * config/aarch64/aarch64.c (aarch64_components_for_bb):
12006         Increase LDP/STP opportunities by adding adjacent callee-saves.
12008 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12010         PR rtl-optimization/84068
12011         PR rtl-optimization/83459
12012         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
12014 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
12016         PR tree-optimization/84224
12017         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
12018         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
12019         non-zero arguments.
12021 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
12023         PR target/84113
12024         * config/rs6000/altivec.md (*restore_world): Remove LR use.
12025         * config/rs6000/predicates.md (restore_world_operation): Adjust op
12026         count, remove one USE.
12028 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
12030         * doc/install.texi (Configuration): Document the
12031         --with-long-double-format={ibm,ieee} PowerPC configuration
12032         options.
12034         PR target/84154
12035         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12036         Convert from define_expand to be define_insn_and_split.  Rework
12037         float/double/_Float128 conversions to QI/HI/SImode to work with
12038         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
12039         conversions to QI/HImode types did a store and then a load to
12040         truncate the value.  For conversions to VSX registers, don't split
12041         the insn, instead emit the code directly.  Use the code iterator
12042         any_fix to combine signed and unsigned conversions.
12043         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12044         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12045         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12046         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12047         (fix_<mode>di2_hw): Likewise.
12048         (fixuns_<mode>di2_hw): Likewise.
12049         (fix_<mode>si2_hw): Likewise.
12050         (fixuns_<mode>si2_hw): Likewise.
12051         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12052         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12053         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12054         fix<uns>_trunc<SFDF:mode>si2_p8.
12055         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12056         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12057         (fix<uns>_<mode>_mem): Likewise.
12058         (fctiw<u>z_<mode>_mem): Likewise.
12059         (fix<uns>_<mode>_mem): Likewise.
12060         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12061         the register allocator from doing a direct move to the GPRs to do
12062         a store, and instead use the ISA 3.0 store byte/half-word from
12063         vector register instruction.  For IEEE 128-bit floating point,
12064         also optimize stores of 32-bit ints.
12065         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12067 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
12069         * genextract.c (push_pathstr_operand): New function to support
12070         [a-zA-Z].
12071         (walk_rtx): Call push_pathstr_operand.
12072         (print_path): Support [a-zA-Z].
12074 2018-02-07  Richard Biener  <rguenther@suse.de>
12076         PR tree-optimization/84037
12077         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12078         (cse_and_gimplify_to_preheader): Declare.
12079         (vect_get_place_in_interleaving_chain): Likewise.
12080         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12081         ivexpr_map.
12082         (_loop_vec_info::~_loop_vec_info): Delete it.
12083         (cse_and_gimplify_to_preheader): New function.
12084         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12085         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12086         (vectorizable_load): Likewise.  For grouped stores always base
12087         the IV on the first element.
12088         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12089         condition before gimplifying.
12091 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12093         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12094         *DIV_EXPR and *MOD_EXPR.
12096 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
12098         PR target/84248
12099         * config/i386/i386.c (ix86_option_override_internal): Mask out
12100         the CF_SET bit when checking -fcf-protection.
12102 2018-02-07  Tom de Vries  <tom@codesourcery.com>
12104         PR libgomp/84217
12105         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12106         enough.
12108 2018-02-07  Richard Biener  <rguenther@suse.de>
12110         PR tree-optimization/84204
12111         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12112         this place.
12114         PR tree-optimization/84205
12115         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12116         special-case isl_ast_op_zdiv_r.
12118         PR tree-optimization/84223
12119         * graphite-scop-detection.c (gather_bbs::before_dom_children):
12120         Only add conditions from within the region.
12121         (gather_bbs::after_dom_children): Adjust.
12123 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
12125         PR target/84209
12126         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12127         * config/avr/avr.md: Only post-reload split REG-REG moves if
12128         either register is GENERAL_REG_P.
12130 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12132         PR tree-optimization/84235
12133         * tree-ssa-scopedtables.c
12134         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12135         if the subtraction is performed in floating point type where NaNs are
12136         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12137         build 1.  Formatting fix.
12139 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
12141         PR target/84146
12142         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12143         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12144         and skip it regardless of bb boundaries.  Use CALL_P macro,
12145         don't test INSN_P (insn) together with CALL_P or JUMP_P check
12146         unnecessarily, formatting fix.
12148 2018-02-06  Michael Collison  <michael.collison@arm.com>
12150         * config/arm/thumb2.md:
12151         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12152         (*thumb_mov_notscc): Ditto.
12154 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
12156         PR target/84154
12157         * config/rs6000/rs6000.md (su code attribute): Use "u" for
12158         unsigned_fix, not "s".
12160 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12162         * configure.ac (gcc_fn_eh_frame_ro): New function.
12163         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12164         correct .eh_frame permissions.
12165         * configure: Regenerate.
12167 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
12169         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12170         irrelevant options.
12172 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12174         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12175         Display warning message for -mno-speculate-indirect-jumps.
12177 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
12179         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12180         Undocumented.
12181         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12183 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
12185         PR tree-optimization/84225
12186         * tree-eh.c (find_trapping_overflow): Only call
12187         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12189 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12191         PR target/84145
12192         * config/i386/i386.c: Reimplement the check of possible options
12193         -mibt/-mshstk conbination. Change error messages.
12194         * doc/invoke.texi: Fix a typo: remove extra '='.
12196 2018-02-06  Marek Polacek  <polacek@redhat.com>
12198         PR tree-optimization/84228
12199         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12201 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
12203         PR target/82641
12204         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12205         emitted arch directives.
12206         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12207         __ARM_FEATURE_COPROC before changing architectures.
12209 2018-02-06  Richard Biener  <rguenther@suse.de>
12211         * config/i386/i386.c (print_reg): Fix typo.
12212         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12214 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12216         * configure: Regenerate.
12218 2018-02-05  Martin Sebor  <msebor@redhat.com>
12220         PR tree-optimization/83369
12221         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12222         inlining context.
12224 2018-02-05  Martin Liska  <mliska@suse.cz>
12226         * doc/invoke.texi: Cherry-pick upstream r323995.
12228 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
12230         * ira.c (ira_init_register_move_cost): Adjust comment.
12232 2018-02-05  Martin Liska  <mliska@suse.cz>
12234         PR gcov-profile/84137
12235         * doc/gcov.texi: Fix typo in documentation.
12237 2018-02-05  Martin Liska  <mliska@suse.cz>
12239         PR gcov-profile/83879
12240         * doc/gcov.texi: Document necessity of --dynamic-list-data when
12241         using dlopen functionality.
12243 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
12245         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12246         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12247         _mm_maskz_range_ss, _mm_mask_range_round_ss,
12248         _mm_maskz_range_round_ss): New intrinsics.
12249         (__builtin_ia32_rangesd128_round)
12250         (__builtin_ia32_rangess128_round): Remove.
12251         (__builtin_ia32_rangesd128_mask_round,
12252         __builtin_ia32_rangess128_mask_round): New builtins.
12253         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12254         __builtin_ia32_rangess128_round): Remove.
12255         (__builtin_ia32_rangesd128_mask_round,
12256         __builtin_ia32_rangess128_mask_round): New builtins.
12257         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12258         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12259         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12260         "<round_saeonly_constraint>")): Changed to ...
12261         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12262         "<round_saeonly_scalar_constraint>")): ... this.
12263         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12264         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12265         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12266         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12267         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12269 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
12271         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12272         options.
12273         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12274         Remove all values except native, 8540 and 8548.
12276 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
12278         * config/i386/i386.c (ix86_output_function_return): Pass
12279         INVALID_REGNUM, instead of -1, as invalid register number to
12280         indirect_thunk_name and output_indirect_thunk.
12282 2018-02-02  Julia Koval  <julia.koval@intel.com>
12284         * config.gcc: Add -march=icelake.
12285         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12286         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12287         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12288         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12289         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12290         (processor_target_table): Add icelake.
12291         (ix86_option_override_internal): Handle new PTAs.
12292         (get_builtin_code_for_version): Handle icelake.
12293         (M_INTEL_COREI7_ICELAKE): New.
12294         (fold_builtin_cpu): Handle icelake.
12295         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12296         * doc/invoke.texi: Add -march=icelake.
12298 2018-02-02  Julia Koval  <julia.koval@intel.com>
12300         * config/i386/i386.c (ix86_option_override_internal): Change flags type
12301         to wide_int_bitmask.
12302         * wide-int-bitmask.h: New.
12304 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12306         PR target/84066
12307         * config/i386/i386.md: Replace Pmode with word_mode in
12308         builtin_setjmp_setup and builtin_longjmp to support x32.
12310 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
12312         PR target/56010
12313         PR target/83743
12314         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12315         #include "opts.h".
12316         (rs6000_supported_cpu_names): New static variable.
12317         (linux_cpu_translation_table): Likewise.
12318         (elf_platform) <cpu>: Define new static variable and use it.
12319         Translate kernel AT_PLATFORM name to canonical name if needed.
12320         Error if platform name is unknown.
12322 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
12324         PR target/84089
12325         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12327 2018-02-01  Jeff Law  <law@redhat.com>
12329         PR target/84128
12330         * config/i386/i386.c (release_scratch_register_on_entry): Add new
12331         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
12332         the scratch if RELEASE_VIA_POP is false.
12333         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12334         If we have to save a temporary register, decrement SIZE appropriately.
12335         Pass new arguments to release_scratch_register_on_entry.
12336         (ix86_adjust_stack_and_probe): Likewise.
12337         (ix86_emit_probe_stack_range): Pass new arguments to
12338         release_scratch_register_on_entry.
12340 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
12342         PR rtl-optimization/84157
12343         * combine.c (change_zero_ext): Use REG_P predicate in
12344         front of HARD_REGISTER_P predicate.
12346 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
12348         * config/avr/avr.c (avr_option_override): Move disabling of
12349         -fdelete-null-pointer-checks to...
12350         * common/config/avr/avr-common.c (avr_option_optimization_table):
12351         ...here.
12353 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12355         PR tree-optimization/81635
12356         * tree-data-ref.c (split_constant_offset_1): For types that
12357         wrap on overflow, try to use range info to prove that wrapping
12358         cannot occur.
12360 2018-02-01  Renlin Li  <renlin.li@arm.com>
12362         PR target/83370
12363         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12364         TAILCALL_ADDR_REGS.
12365         (aarch64_register_move_cost): Likewise.
12366         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12367         TAILCALL_ADDR_REGS.
12368         (REG_CLASS_NAMES): Likewise.
12369         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12370         TAILCALL_ADDR_REGS. Remove IP registers.
12371         * config/aarch64/aarch64.md (Ucs): Update register constraint.
12373 2018-02-01  Richard Biener  <rguenther@suse.de>
12375         * domwalk.h (dom_walker::dom_walker): Add additional constructor
12376         for specifying RPO order and allow NULL for that.
12377         * domwalk.c (dom_walker::dom_walker): Likewise.
12378         (dom_walker::walk): Handle NULL RPO order.
12379         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12380         in RPO order.
12381         (rewrite_update_dom_walker): Likewise.
12382         (mark_def_dom_walker): Likewise.
12384 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12386         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12387         (aarch64_maybe_expand_sve_subreg_move): Declare.
12388         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12389         * config/aarch64/predicates.md (aarch64_any_register_operand): New
12390         predicate.
12391         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12392         that are semantically a reverse operation.
12393         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12394         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12395         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12396         functions.
12397         (aarch64_can_change_mode_class): For big-endian, forbid changes
12398         between two SVE modes if they have different element sizes.
12400 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12402         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12403         the TImode handling for big-endian targets.
12405 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12407         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12408         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
12409         not just bytes.
12410         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12411         Remove BSWAP handing for big-endian targets and use the form of
12412         LD1RQ appropariate for the mode.
12414 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12416         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12417         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12418         duplicated element.
12420 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12422         PR tearget/83845
12423         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12424         check for operands that need to go through aarch64_sve_reload_be.
12426 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
12428         PR tree-optimization/81661
12429         PR tree-optimization/84117
12430         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12431         * tree-eh.c: Include gimplify.h.
12432         (find_trapping_overflow, replace_trapping_overflow,
12433         rewrite_to_non_trapping_overflow): New functions.
12434         * tree-vect-loop.c: Include tree-eh.h.
12435         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12436         * tree-data-ref.c: Include tree-eh.h.
12437         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12439 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
12441         PR rtl-optimization/84123
12442         * combine.c (change_zero_ext): Check if hard register satisfies
12443         can_change_dest_mode before calling gen_lowpart_SUBREG.
12445 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
12447         PR target/82444
12448         * ira.c (ira_init_register_move_cost): Remove assert.
12450 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12452         PR rtl-optimization/84071
12453         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12454         * doc/tm.texi: Regenerate.
12456 2018-01-31  Richard Biener  <rguenther@suse.de>
12458         PR tree-optimization/84132
12459         * tree-data-ref.c (analyze_miv_subscript): Properly
12460         check whether evolution_function_is_affine_multivariate_p
12461         before calling gcd_of_steps_may_divide_p.
12463 2018-01-31  Julia Koval  <julia.koval@intel.com>
12465         PR target/83618
12466         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12467         * config/i386/i386.md (rdpid_rex64) New.
12468         (rdpid): Make 32bit only.
12470 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
12472         PR lto/84105
12473         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12474         an IDENTIFIER_NODE for FUNCTION_TYPE's.
12476 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12478         Revert
12479         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
12481         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12483 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12485         PR rtl-optimization/84071
12486         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12487         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12489 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12491         * config/arc/arc.c (arc_handle_aux_attribute): New function.
12492         (arc_attribute_table): Add 'aux' attribute.
12493         (arc_in_small_data_p): Consider aux like variables.
12494         (arc_is_aux_reg_p): New function.
12495         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12496         (arc_get_aux_arg): New function.
12497         (prepare_move_operands): Handle aux-register access.
12498         (arc_handle_aux_attribute): New function.
12499         * doc/extend.texi (ARC Variable attributes): Add subsection.
12501 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12503         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12504         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12505         (arc_attribute_table): Add 'uncached' attribute.
12506         (arc_print_operand): Print '.di' flag for uncached memory
12507         accesses.
12508         (arc_in_small_data_p): Do not consider for small data the uncached
12509         types.
12510         (arc_is_uncached_mem_p): New function.
12511         * config/arc/predicates.md (compact_store_memory_operand): Check
12512         for uncached memory accesses.
12513         (nonvol_nonimm_operand): Likewise.
12514         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12516 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
12518         PR c/84100
12519         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12520         falign-loops=): Add Optimization flag.
12522 2018-01-30  Jeff Law  <law@redhat.com>
12524         PR target/84064
12525         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12526         INT_REGISTERS_SAVED.  Check it prior to calling
12527         get_scratch_register_on_entry.
12528         (ix86_adjust_stack_and_probe): Similarly.
12529         (ix86_emit_probe_stack_range): Similarly.
12530         (ix86_expand_prologue): Corresponding changes.
12532 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12534         PR target/40411
12535         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12536         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12538 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
12540         PR target/84112
12541         * lra-constraints.c (curr_insn_transform): Process AND in the
12542         address.
12544 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
12546         PR rtl-optimization/83986
12547         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12548         dependence against last_pending_memory_flush in addition to
12549         pending_jump_insns.
12551 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
12553         PR tree-optimization/81611
12554         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12555         copies.
12557 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12559         PR target/83758
12560         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12561         a reg rtx.
12563 2018-01-30  Richard Biener  <rguenther@suse.de>
12564             Jakub Jelinek  <jakub@redhat.com>
12566         PR tree-optimization/84111
12567         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12568         inner loops added during recursion, as they don't have up-to-date
12569         SSA form.
12571 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12573         PR ipa/81360
12574         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12575         (can_inline_edge_by_limits_p): ... here.
12576         (can_early_inline_edge_p, check_callers,
12577         update_caller_keys, update_callee_keys, recursive_inlining,
12578         add_new_edges_to_heap, speculation_useful_p,
12579         inline_small_functions,
12580         inline_small_functions, flatten_function,
12581         inline_to_all_callers_1): Update.
12583 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12585         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12586         zeros correctly.
12588 2018-01-30  Richard Biener  <rguenther@suse.de>
12590         PR tree-optimization/83008
12591         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12592         invariant and constant vector uses in stmts when they need
12593         more than one stmt.
12595 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12597         PR bootstrap/84017
12598         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12599         * configure: Regenerate.
12601 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12603         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12604         pattern.
12605         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12606         Use gen_rtx_REG rather than gen_lowpart.
12608 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12610         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12611         rather than 0 when creating partial subregs.
12613 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12615         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12616         of usage.
12618 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12620         PR target/81550
12621         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12622         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12623         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12624         flags.  This restores the settings used before the 2017-07-24.
12625         Turning off pre increment/decrement/modify allows IVOPTS to
12626         optimize DF/SF loops where the index is an int.
12628 2018-01-29  Richard Biener  <rguenther@suse.de>
12629             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12631         PR bootstrap/80867
12632         * tree-vect-stmts.c (vectorizable_call): Don't call
12633         targetm.vectorize_builtin_md_vectorized_function if callee is
12634         NULL.
12636 2018-01-22  Carl Love  <cel@us.ibm.com>
12638         * doc/extend.tex: Fix typo in second arg in
12639         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12641 2018-01-29  Richard Biener  <rguenther@suse.de>
12643         PR tree-optimization/84086
12644         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12645         (flush_ssaname_freelist): When SSA names were released reset
12646         the SCEV hash table.
12648 2018-01-29  Richard Biener  <rguenther@suse.de>
12650         PR tree-optimization/84057
12651         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12652         removed paths when removing edges.
12654 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12656         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12657         -mfunction-return=@var{choice}.
12659 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12661         PR diagnostic/84034
12662         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12663         Handle CR like TAB.
12664         (layout::print_source_line): Likewise.
12665         (test_get_line_width_without_trailing_whitespace): Add test cases.
12667 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12669         PR middle-end/84040
12670         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12671         debug insns.
12673 2018-01-26  Jim Wilson  <jimw@sifive.com>
12675         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12677         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12678         specified.
12680 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12682         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12683         and CMP + SUB-immediate -> SUBS.
12685 2018-01-26  Martin Sebor  <msebor@redhat.com>
12687         PR tree-optimization/83896
12688         * tree-ssa-strlen.c (get_string_len): Rename...
12689         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12690         Avoid assuming length is constant.
12691         (handle_char_store): Use HOST_WIDE_INT for string length.
12693 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12695         PR target/81763
12696         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12697         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12699 2018-01-26  Richard Biener  <rguenther@suse.de>
12701         PR rtl-optimization/84003
12702         * dse.c (record_store): Only record redundant stores when
12703         the earlier store aliases at least all accesses the later one does.
12705 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12707         PR rtl-optimization/83985
12708         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12709         REG_CFA_RESTORE insns.
12710         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12711         REG_CFA_RESTORE insns here.
12713         PR c/83989
12714         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12715         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12717 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12719         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12720         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12721         (arc_init): Likewise.
12722         (arc_override_options): Likewise.
12723         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12724         value.
12725         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12726         support.
12727         * config/arc/arc.h (TARGET_DBNZ): Define.
12728         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12729         properly set the tune attribute.
12730         (dbnz): Use TARGET_DBNZ guard.
12731         * config/arc/arc.opt (mtune): Add core3 option.
12733 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12735         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12736         recognize new pic like addresses.
12737         (arc_delegitimize_address): Clean up.
12739 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12741         * config/arc/arc-arches.def: Option mrf16 valid for all
12742         architectures.
12743         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12744         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12745         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12746         * config/arc/arc-tables.opt: Regenerate.
12747         * config/arc/arc.c (arc_conditional_register_usage): Handle
12748         reduced register file case.
12749         (arc_file_start): Set must have build attributes.
12750         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12751         mrf16 option value.
12752         * config/arc/arc.opt (mrf16): Add new option.
12753         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12754         * config/arc/genmultilib.awk: Handle new mrf16 option.
12755         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12756         * config/arc/t-multilib: Regenerate.
12757         * doc/invoke.texi (ARC Options): Document mrf16 option.
12759 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12761         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12762         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12763         (arc_attribute_table): Add 'secure_call' attribute.
12764         (arc_print_operand): Print secure call operand.
12765         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12766         secure.
12767         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12768         (call_i): Add support for sjli instruction.
12769         (call_value_i): Likewise.
12770         * config/arc/constraints.md (Csc): New constraint.
12772 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12773             John Eric Martin  <John.Martin@emmicro-us.com>
12775         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12776         * config/arc/arc.c (_arc_jli_section): New struct.
12777         (arc_jli_section): New type.
12778         (rc_jli_sections): New static variable.
12779         (arc_handle_jli_attribute): New function.
12780         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12781         (arc_file_end): New function.
12782         (TARGET_ASM_FILE_END): Define.
12783         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12784         (arc_add_jli_section): New function.
12785         (jli_call_scan): Likewise.
12786         (arc_reorg): Call jli_call_scan.
12787         (arc_output_addsi): Remove 'S' from printing asm operand.
12788         (arc_is_jli_call_p): New function.
12789         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12790         operand.
12791         (movhi_insn): Likewise.
12792         (movsi_insn): Likewise.
12793         (movsi_set_cc_insn): Likewise.
12794         (loadqi_update): Likewise.
12795         (load_zeroextendqisi_update): Likewise.
12796         (load_signextendqisi_update): Likewise.
12797         (loadhi_update): Likewise.
12798         (load_zeroextendhisi_update): Likewise.
12799         (load_signextendhisi_update): Likewise.
12800         (loadsi_update): Likewise.
12801         (loadsf_update): Likewise.
12802         (movsicc_insn): Likewise.
12803         (bset_insn): Likewise.
12804         (bxor_insn): Likewise.
12805         (bclr_insn): Likewise.
12806         (bmsk_insn): Likewise.
12807         (bicsi3_insn): Likewise.
12808         (cmpsi_cc_c_insn): Likewise.
12809         (movsi_ne): Likewise.
12810         (movsi_cond_exec): Likewise.
12811         (clrsbsi2): Likewise.
12812         (norm_f): Likewise.
12813         (normw): Likewise.
12814         (swap): Likewise.
12815         (divaw): Likewise.
12816         (flag): Likewise.
12817         (sr): Likewise.
12818         (kflag): Likewise.
12819         (ffs): Likewise.
12820         (ffs_f): Likewise.
12821         (fls): Likewise.
12822         (call_i): Remove 'S' asm letter, add jli instruction.
12823         (call_value_i): Likewise.
12824         * config/arc/arc.op (mjli-always): New option.
12825         * config/arc/constraints.md (Cji): New constraint.
12826         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12827         operand.
12828         (subsf3_fpx): Likewise.
12829         (mulsf3_fpx): Likewise.
12830         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12831         asm operand.
12832         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12833         function attrbutes.
12834         * doc/invoke.texi (ARC): Document mjli-always option.
12836 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12838         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12839         avoid addition with 0 and use incw and decw where possible.
12841 2018-01-26  Richard Biener  <rguenther@suse.de>
12843         PR tree-optimization/81082
12844         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12845         association if it requires casting to unsigned.
12846         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12847         from fold_plusminus_mult_expr to catch important cases late when
12848         range info is available.
12850 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12852         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12853         * configure.ac (hidden_linkonce): New test.
12854         * configure: Regenerate.
12855         * config.in: Regenerate.
12857 2018-01-26  Julia Koval  <julia.koval@intel.com>
12859         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12860         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12861         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12862         _mm_mask_bitshuffle_epi64_mask): Fix type.
12863         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12864         USI_FTYPE_V4DI_V4DI_USI): Remove.
12865         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12866         __builtin_ia32_vpshufbitqmb256_mask,
12867         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12868         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12869         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12871 2018-01-26  Alan Modra  <amodra@gmail.com>
12873         PR target/84033
12874         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12875         UNSPEC_VBPERMQ.  Sort other unspecs.
12877 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12879         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12881 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12883         PR middle-end/83055
12884         * predict.c (drop_profile): Do not push/pop cfun; update also
12885         node->count.
12886         (handle_missing_profiles): Fix logic looking for zero profiles.
12888 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12890         PR middle-end/83977
12891         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12892         on functions with #pragma omp declare simd or functions with simd
12893         attribute.
12894         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12895         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12896         Remove trailing \n from warning_at calls.
12898 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12900         PR target/84028
12901         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12902         for neutered workers.
12904 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12906         PR target/68467
12907         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12908         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12910 2018-01-24  Jeff Law  <law@redhat.com>
12912         PR target/83994
12913         * i386.c (get_probe_interval): Move to earlier point.
12914         (ix86_compute_frame_layout): If -fstack-clash-protection and
12915         the frame is larger than the probe interval, then use pushes
12916         to save registers rather than reg->mem moves.
12917         (ix86_expand_prologue): Remove conditional for int_registers_saved
12918         assertion.
12920 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12922         PR target/84014
12923         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12924         min/max for never referenced object.
12926 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12928         PR middle-end/83977
12929         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12930         here.
12931         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12932         attributes from DECL_ATTRIBUTES (decl) without affecting
12933         DECL_ATTRIBUTES (current_function_decl).
12934         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12935         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12937 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12939         PR tree-optimization/83979
12940         * fold-const.c (fold_comparison): Use constant_boolean_node
12941         instead of boolean_{true,false}_node.
12943 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12945         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12946         with zero counts.
12948 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12950         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12951         Simplify the clause that sets the length attribute.
12952         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12953         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12954         clause that sets the length attribute.
12955         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12957 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12959         PR target/83589
12960         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12961         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12962         Add strict parameter.
12963         (prevent_branch_around_nothing): Insert dummy insn between branch to
12964         label and label with no ptx insn inbetween.
12965         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12967 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12969         PR target/81352
12970         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12971         for neutered threads in warp.
12972         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12974 2018-01-24  Richard Biener  <rguenther@suse.de>
12976         PR tree-optimization/83176
12977         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12978         operands.
12980 2018-01-24  Richard Biener  <rguenther@suse.de>
12982         PR tree-optimization/82819
12983         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12984         code generating pluses that are no-ops in the target precision.
12986 2018-01-24  Richard Biener  <rguenther@suse.de>
12988         PR middle-end/84000
12989         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12991 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12993         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12994         to merge probabilities.
12995         * predict.c (probably_never_executed): Also mark as cold functions
12996         with global 0 profile and guessed local profile.
12997         * profile-count.c (profile_probability::combine_with_count): New
12998         member function.
12999         * profile-count.h (profile_probability::operator*,
13000         profile_probability::operator*=, profile_probability::operator/,
13001         profile_probability::operator/=): Reduce precision to adjusted
13002         and set value to guessed on contradictory divisions.
13003         (profile_probability::combine_with_freq): Remove.
13004         (profile_probability::combine_wiht_count): Declare.
13005         (profile_count::force_nonzero):: Set to adjusted.
13006         (profile_count::probability_in):: Set quality to adjusted.
13007         * tree-ssa-tail-merge.c (replace_block_by): Use
13008         combine_with_count.
13010 2018-01-23  Andrew Waterman  <andrew@sifive.com>
13011             Jim Wilson  <jimw@sifive.com>
13013         * config/riscv/riscv.c (riscv_stack_boundary): New.
13014         (riscv_option_override): Set riscv_stack_boundary.  Handle
13015         riscv_preferred_stack_boundary_arg.
13016         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
13017         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
13018         (STACK_BOUNDARY): Set to riscv_stack_boundary.
13019         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
13020         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
13021         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
13023 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
13025         PR target/83905
13026         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
13027         of struct ix86_frame.
13028         (ix86_expand_epilogue): Likewise.  Add a local variable for
13029         the reg_save_offset field in struct ix86_frame.
13031 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
13033         PR tree-optimization/82604
13034         * tree-loop-distribution.c (enum partition_kind): New enum item
13035         PKIND_PARTIAL_MEMSET.
13036         (partition_builtin_p): Support above new enum item.
13037         (generate_code_for_partition): Ditto.
13038         (compute_access_range): Differentiate cases that equality can be
13039         proven at all loops, the innermost loops or no loops.
13040         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13041         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
13042         (finalize_partitions, distribute_loop): Don't fuse partition of
13043         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13044         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13045         parloop is enabled.
13047 2018-01-23  Martin Liska  <mliska@suse.cz>
13049         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13050         order to ignore the predictor.
13051         (PRED_POLYMORPHIC_CALL): Likewise.
13052         (PRED_RECURSIVE_CALL): Likewise.
13054 2018-01-23  Martin Liska  <mliska@suse.cz>
13056         * tree-profile.c (tree_profiling): Print function header to
13057         aware reader which function we are working on.
13058         * value-prof.c (gimple_find_values_to_profile): Do not print
13059         not interesting value histograms.
13061 2018-01-23  Martin Liska  <mliska@suse.cz>
13063         * profile-count.h (enum profile_quality): Add
13064         profile_uninitialized as the first value. Do not number values
13065         as they are zero based.
13066         (profile_count::verify): Update sanity check.
13067         (profile_probability::verify): Likewise.
13069 2018-01-23  Nathan Sidwell  <nathan@acm.org>
13071         * doc/invoke.texi (ffor-scope): Deprecate.
13073 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13075         PR tree-optimization/83510
13076         * domwalk.c (set_all_edges_as_executable): New function.
13077         (dom_walker::dom_walker): Convert bool param
13078         "skip_unreachable_blocks" to enum reachability.  Move setup of
13079         edge flags to set_all_edges_as_executable and only do it when
13080         reachability is REACHABLE_BLOCKS.
13081         * domwalk.h (enum dom_walker::reachability): New enum.
13082         (dom_walker::dom_walker): Convert bool param
13083         "skip_unreachable_blocks" to enum reachability.
13084         (set_all_edges_as_executable): New decl.
13085         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
13086         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13087         "reachability".
13088         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13089         but converting true to REACHABLE_BLOCKS.
13090         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13091         * tree-vrp.c
13092         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13093         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13094         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13095         REACHABLE_BLOCKS.
13096         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13097         if check_all_array_refs will be called.
13099 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13101         * tree.c (selftest::test_location_wrappers): Add more test
13102         coverage.
13104 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13106         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13107         (selftest::test_bit_in_range): Likewise.
13109 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13111         PR testsuite/83888
13112         * doc/sourcebuild.texi (vect_float): Say that the selector
13113         only describes the situation when -funsafe-math-optimizations is on.
13114         (vect_float_strict): Document.
13116 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13118         PR tree-optimization/83965
13119         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13120         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13121         instead of checking only for a reduction.
13122         (vect_recog_widen_sum_pattern): Likewise.
13124 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13126         * predict.c (probably_never_executed): Only use precise profile info.
13127         (compute_function_frequency): Skip after inlining hack since we now
13128         have quality checking.
13130 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13132         * profile-count.h (profile_probability::very_unlikely,
13133         profile_probability::unlikely, profile_probability::even): Set
13134         precision to guessed.
13136 2018-01-23  Richard Biener  <rguenther@suse.de>
13138         PR tree-optimization/83963
13139         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13140         Properly terminate dominator walk when crossing the exit edge not
13141         when visiting its source block.
13143 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
13145         PR c++/83918
13146         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13147         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13149 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
13151         PR tree-optimization/83957
13152         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
13153         semicolon after for body surrounded by braces.
13155         PR tree-optimization/83081
13156         * profile-count.h (profile_probability::split): New method.
13157         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13158         Use profile_probability::split.
13159         (do_compare_rtx_and_jump): Fix adjustment of probabilities
13160         when splitting a single conditional jump into 2.
13162 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
13164         PR tree-optimization/69452
13165         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13166         decl.
13168 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13170         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13171         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13172         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13174 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13176         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13177         declaration.
13178         * config/rl78/rl78.md (movdi): New define_expand.
13179         * config/rl78/rl78.c (rl78_split_movdi): New function.
13181 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
13183         PR target/83862
13184         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13185         no longer used.
13186         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13187         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13188         128-bit to produce an UNSPEC move to get the double word with the
13189         signbit and then a shift directly to do signbit.
13190         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13191         implementation with a new version that just does either a direct
13192         move or a regular move.  Move memory interface to separate insns.
13193         Move insns so they are next to the expander.
13194         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13195         with signbit move.  Split big and little endian case.
13196         (signbit<mode>2_dm_mem_le): Likewise.
13197         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13198         (signbit<mode>2_dm2): Likewise.
13200 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13202         * config/rl78/rl78.md (anddi3): New define_expand.
13204 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13206         * config/rl78/rl78.md (umindi3): New define_expand.
13208 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13210         * config/rl78/rl78.md (smindi3): New define_expand.
13212 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13214         * config/rl78/rl78.md (smaxdi3): New define_expand.
13216 2018-01-22  Carl Love  <cel@us.ibm.com>
13218         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13219         LVX_V1TI): Add macro expansion.
13220         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13221         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13222         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13223         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13224         Change check to determine if the instruction is a byte reversing
13225         entry.  Fix typo in comment.
13226         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13227         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13228         Add def_builtin calls for new builtins.
13229         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13230         Add define_insn expansion.
13232 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13234         * config/rl78/rl78.md (umaxdi3): New define_expand.
13236 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13238         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13239         for non-QImode registers.
13241 2018-01-22  Richard Biener  <rguenther@suse.de>
13243         PR tree-optimization/83963
13244         * graphite-scop-detection.c (scop_detection::get_sese): Delay
13245         including the loop exit block.
13246         (scop_detection::merge_sese): Likewise.
13247         (scop_detection::add_scop): Do it here instead.
13249 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13251         * doc/sourcebuild.texi (arm_softfloat): Document.
13253 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
13255         PR gcc/77734
13256         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13257         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13258         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13260 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13261             David Edelsohn  <dje.gcc@gmail.com>
13263         PR target/83946
13264         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13265         Change "crset eq" to "crset 2".
13266         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13267         (*call_indirect_aix<mode>_nospec): Likewise.
13268         (*call_value_indirect_aix<mode>_nospec): Likewise.
13269         (*call_indirect_elfv2<mode>_nospec): Likewise.
13270         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13271         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13272         change assembly output from . to $.
13273         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13274         (indirect_jump<mode>_nospec): Change assembly output from . to $.
13275         (*tablejump<mode>_internal1_nospec): Likewise.
13277 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
13279         PR target/80870
13280         * config/sh/sh_optimize_sett_clrt.cc:
13281         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13283 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
13285         PR tree-optimization/83940
13286         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13287         offset_dt to vect_constant_def rather than vect_unknown_def_type.
13288         (vect_check_load_store_mask): Add a mask_dt_out parameter and
13289         use it to pass back the definition type.
13290         (vect_check_store_rhs): Likewise rhs_dt_out.
13291         (vect_build_gather_load_calls): Add a mask_dt argument and use
13292         it instead of a call to vect_is_simple_use.
13293         (vectorizable_store): Update calls to vect_check_load_store_mask
13294         and vect_check_store_rhs.  Use the dt returned by the latter instead
13295         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
13296         instead of calls to vect_is_simple_use.  Pass the scalar rather
13297         than the vector operand to vect_is_simple_use when handling
13298         second and subsequent copies of an rhs value.
13299         (vectorizable_load): Update calls to vect_check_load_store_mask
13300         and vect_build_gather_load_calls.  Use the cached mask_dt and
13301         gs_info.offset_dt instead of calls to vect_is_simple_use.
13303 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
13305         PR middle-end/83945
13306         * tree-emutls.c: Include gimplify.h.
13307         (lower_emutls_2): New function.
13308         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13309         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13310         it before further processing.
13312         PR target/83930
13313         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13314         UINTVAL (trueop1) instead of INTVAL (op1).
13316 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
13318         PR debug/81570
13319         PR debug/83728
13320         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13321         INCOMING_FRAME_SP_OFFSET if not defined.
13322         (scan_trace): Add ENTRY argument.  If true and
13323         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13324         emit a note to adjust the CFA offset.
13325         (create_cfi_notes): Adjust scan_trace callers.
13326         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13327         INCOMING_FRAME_SP_OFFSET in the CIE.
13328         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13329         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13330         Likewise.
13331         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13332         * doc/tm.texi: Regenerated.
13334 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13336         PR rtl-optimization/83147
13337         * lra-constraints.c (remove_inheritance_pseudos): Use
13338         lra_substitute_pseudo_within_insn.
13340 2018-01-19  Tom de Vries  <tom@codesourcery.com>
13341             Cesar Philippidis  <cesar@codesourcery.com>
13343         PR target/83920
13344         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13346 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
13348         PR target/83790
13349         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13350         spaces for function labels.
13352 2018-01-19  Martin Liska  <mliska@suse.cz>
13354         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13355         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13356         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13357         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13358         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13359         (PRED_CONST_RETURN): Change from 69 to 65.
13360         (PRED_NULL_RETURN): Change from 91 to 71.
13361         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13362         (PRED_LOOP_GUARD): Change from 66 to 73.
13364 2018-01-19  Martin Liska  <mliska@suse.cz>
13366         * predict.c (predict_insn_def): Add new assert.
13367         (struct branch_predictor): Change type to signed integer.
13368         (test_prediction_value_range): Amend test to cover
13369         PROB_UNINITIALIZED.
13370         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13371         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13372         (PRED_LOOP_ITERATIONS_MAX): Likewise.
13373         (PRED_LOOP_IV_COMPARE): Likewise.
13374         * predict.h (PROB_UNINITIALIZED): Define new constant.
13376 2018-01-19  Martin Liska  <mliska@suse.cz>
13378         * predict.c (dump_prediction): Add new format for
13379         analyze_brprob.py script which is enabled with -details
13380         suboption.
13381         * profile-count.h (precise_p): New function.
13383 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13385         PR tree-optimization/83922
13386         * tree-vect-loop.c (vect_verify_full_masking): Return false if
13387         there are no statements that need masking.
13388         (vect_active_double_reduction_p): New function.
13389         (vect_analyze_loop_operations): Use it when handling phis that
13390         are not in the loop header.
13392 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13394         PR tree-optimization/83914
13395         * tree-vect-loop.c (vectorizable_induction): Don't convert
13396         init_expr or apply the peeling adjustment for inductions
13397         that are nested within the vectorized loop.
13399 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13401         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13402         instead of NEG.
13404 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13406         PR sanitizer/81715
13407         PR testsuite/83882
13408         * function.h (gimplify_parameters): Add gimple_seq * argument.
13409         * function.c: Include gimple.h and options.h.
13410         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13411         for the added local temporaries if needed.
13412         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13413         if there are any parameter cleanups, wrap whole body into a
13414         try/finally with the cleanups.
13416 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
13418         PR target/82964
13419         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13420         Use GET_MODE_CLASS for scalar floating point.
13422 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13424         PR ipa/82256
13425         patch by PaX Team
13426         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13427         Fix call of call_cgraph_insertion_hooks.
13429 2018-01-18  Martin Sebor  <msebor@redhat.com>
13431         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13433 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13435         PR ipa/83619
13436         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13437         frequencies.
13439 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
13441         PR other/70268
13442         * common.opt: (-ffile-prefix-map): New option.
13443         * opts.c (common_handle_option): Defer it.
13444         * opts-global.c (handle_common_deferred_options): Handle it.
13445         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13446         * file-prefix-map.h: New file.
13447         (remap_debug_filename, add_debug_prefix_map): ...here.
13448         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13449         * final.c (debug_prefix_map, add_debug_prefix_map
13450         remap_debug_filename): Move to...
13451         * file-prefix-map.c: New file.
13452         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13453         generalize, get rid of alloca(), use strrchr() instead of strchr().
13454         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13455         Implement in terms of add_prefix_map().
13456         (remap_macro_filename, remap_debug_filename): Implement in term of
13457         remap_filename().
13458         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13459         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13460         * dbxout.c: Include file-prefix-map.h.
13461         * varasm.c: Likewise.
13462         * vmsdbgout.c: Likewise.
13463         * xcoffout.c: Likewise.
13464         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13465         * doc/cppopts.texi (-fmacro-prefix-map): Document.
13466         * doc/invoke.texi (-ffile-prefix-map): Document.
13467         (-fdebug-prefix-map): Update description.
13469 2018-01-18  Martin Liska  <mliska@suse.cz>
13471         * config/i386/i386.c (indirect_thunk_name): Document that also
13472         lfence is emitted.
13473         (output_indirect_thunk): Document why both instructions
13474         (pause and lfence) are generated.
13476 2018-01-18  Richard Biener  <rguenther@suse.de>
13478         PR tree-optimization/83887
13479         * graphite-scop-detection.c
13480         (scop_detection::get_nearest_dom_with_single_entry): Remove.
13481         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13482         (scop_detection::merge_sese): Re-implement with a flood-fill
13483         algorithm that properly finds a SESE region if it exists.
13485 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13487         PR c/61240
13488         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13489         pointer_diff optimizations use view_convert instead of convert.
13491 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13493         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13494         Generate different code for -mno-speculate-indirect-jumps.
13495         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13496         (*call_indirect_aix<mode>): Disable for
13497         -mno-speculate-indirect-jumps.
13498         (*call_indirect_aix<mode>_nospec): New define_insn.
13499         (*call_value_indirect_aix<mode>): Disable for
13500         -mno-speculate-indirect-jumps.
13501         (*call_value_indirect_aix<mode>_nospec): New define_insn.
13502         (*sibcall_nonlocal_sysv<mode>): Generate different code for
13503         -mno-speculate-indirect-jumps.
13504         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13506 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13508         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13509         long double type, set the flags for noting the default long double
13510         type, even if we don't pass or return a long double type.
13512 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
13514         PR ipa/83051
13515         * ipa-inline.c (flatten_function): Do not overwrite final inlining
13516         failure.
13518 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
13520         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13521         support for merge[hl].
13522         (fold_mergehl_helper): New helper function.
13523         (tree-vector-builder.h): New #include for tree_vector_builder usage.
13524         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13525         (altivec_vmrglw_direct): Add xxmrglw insn.
13527 2018-01-17  Andrew Waterman  <andrew@sifive.com>
13529         * config/riscv/riscv.c (riscv_conditional_register_usage): If
13530         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13532 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
13534         PR lto/83121
13535         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13536         call the lto_location_cache before reading the
13537         DECL_SOURCE_LOCATION of the types.
13539 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
13540             Richard Sandiford  <richard.sandiford@linaro.org>
13542         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13543         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13544         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13545         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13546         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13547         Add declaration.
13548         * config/aarch64/constraints.md (aarch64_movti_operand):
13549         Limit immediates.
13550         * config/aarch64/predicates.md (Uti): Add new constraint.
13552 2018-01-17 Carl Love  <cel@us.ibm.com>
13554         * config/rs6000/vsx.md (define_expand xl_len_r,
13555         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13556         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13557         lxvll.
13558         (define_expand, define_insn): Move the shift left from  the
13559         define_insn to the define_expand for lxvl and stxvl instructions.
13560         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13561         and XL_LEN_R definitions to PURE.
13563 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13565         * config/i386/i386.c (indirect_thunk_name): Declare regno
13566         as unsigned int.  Compare regno with INVALID_REGNUM.
13567         (output_indirect_thunk): Ditto.
13568         (output_indirect_thunk_function): Ditto.
13569         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13570         in the call to output_indirect_thunk_function.
13572 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13574         PR middle-end/83884
13575         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13576         rather than the size of inner_type to determine the stack slot size
13577         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13579 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13581         PR target/83546
13582         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13583         to PTA_SILVERMONT.
13585 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13587         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13588         endian Linux systems to optionally enable multilibs for selecting
13589         the long double type if the user configured an explicit type.
13590         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13591         have no long double multilibs if not defined.
13592         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13593         warn if the user used -mabi={ieee,ibm}longdouble and we built
13594         multilibs for long double.
13595         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13596         appropriate multilib option.
13597         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13598         multilib options.
13599         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13600         for building long double multilibs.
13601         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13603 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13605         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13606         copies.
13608         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13609         64 bits.
13610         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13611         128 bits.
13613         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13614         variables.
13616         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13617         return value.
13619 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13621         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13622         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13624 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13626         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13627         different rtl trees depending on TARGET_64BIT.
13628         (rs6000_gen_lvx): Likewise.
13630 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13632         * config/visium/visium.md (nop): Tweak comment.
13633         (hazard_nop): Likewise.
13635 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13637         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13638         -mspeculate-indirect-jumps.
13639         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13640         for -mno-speculate-indirect-jumps.
13641         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13642         (*call_value_indirect_elfv2<mode>): Disable for
13643         -mno-speculate-indirect-jumps.
13644         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13645         (indirect_jump): Emit different RTL for
13646         -mno-speculate-indirect-jumps.
13647         (*indirect_jump<mode>): Disable for
13648         -mno-speculate-indirect-jumps.
13649         (*indirect_jump<mode>_nospec): New define_insn.
13650         (tablejump): Emit different RTL for
13651         -mno-speculate-indirect-jumps.
13652         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13653         (tablejumpsi_nospec): New define_expand.
13654         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13655         (tablejumpdi_nospec): New define_expand.
13656         (*tablejump<mode>_internal1): Disable for
13657         -mno-speculate-indirect-jumps.
13658         (*tablejump<mode>_internal1_nospec): New define_insn.
13659         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13660         option.
13662 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13664         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13665         callers updated.
13667 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13668             Richard Biener  <rguenth@suse.de>
13670         PR libgomp/83590
13671         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13672         return early, inline manually is_gimple_sizepos.  Make sure if we
13673         call gimplify_expr we don't end up with a gimple constant.
13674         * tree.c (variably_modified_type_p): Don't return true for
13675         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13676         * gimplify.h (is_gimple_sizepos): Remove.
13678 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13680         PR tree-optimization/83857
13681         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13682         vectorizable_live_operation for pure SLP statements.
13683         (vectorizable_live_operation): Handle PHIs.
13685 2018-01-16  Richard Biener  <rguenther@suse.de>
13687         PR tree-optimization/83867
13688         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13689         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13691 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13693         PR c/83844
13694         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13695         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13696         If off is not INTEGER_CST, issue a may not be aligned warning
13697         rather than isn't aligned.  Use isn%'t rather than isn't.
13698         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13699         into MULT_EXPR.
13700         <case MULT_EXPR>: Improve the case when bottom and one of the
13701         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13702         operand, in that case check if the other operand is multiple of
13703         bottom divided by the INTEGER_CST operand.
13705 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13707         PR target/83858
13708         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13709         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13710         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13711         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13712         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13713         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13714         (pa_function_arg_size): New function.
13716 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13718         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13719         in a separate statement.
13721 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13723         PR tree-optimization/83847
13724         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13725         group gathers and scatters.
13727 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13729         PR rtl-optimization/86620
13730         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13732         PR rtl-optimization/83213
13733         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13734         to last if both are JUMP_INSNs.
13736         PR tree-optimization/83843
13737         * gimple-ssa-store-merging.c
13738         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13739         store_immediate_info for bswap/nop orig_stores.
13741 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13743         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13744         !TARGET_MUL.
13745         <UDIV>: Increase cost if !TARGET_DIV.
13747 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13749         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13750         (define_attr "cr_logical_3op"): New.
13751         (cceq_ior_compare): Adjust.
13752         (cceq_ior_compare_complement): Adjust.
13753         (*cceq_rev_compare): Adjust.
13754         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13755         (is_cracked_insn): Adjust.
13756         (insn_must_be_first_in_group): Adjust.
13757         * config/rs6000/40x.md: Adjust.
13758         * config/rs6000/440.md: Adjust.
13759         * config/rs6000/476.md: Adjust.
13760         * config/rs6000/601.md: Adjust.
13761         * config/rs6000/603.md: Adjust.
13762         * config/rs6000/6xx.md: Adjust.
13763         * config/rs6000/7450.md: Adjust.
13764         * config/rs6000/7xx.md: Adjust.
13765         * config/rs6000/8540.md: Adjust.
13766         * config/rs6000/cell.md: Adjust.
13767         * config/rs6000/e300c2c3.md: Adjust.
13768         * config/rs6000/e500mc.md: Adjust.
13769         * config/rs6000/e500mc64.md: Adjust.
13770         * config/rs6000/e5500.md: Adjust.
13771         * config/rs6000/e6500.md: Adjust.
13772         * config/rs6000/mpc.md: Adjust.
13773         * config/rs6000/power4.md: Adjust.
13774         * config/rs6000/power5.md: Adjust.
13775         * config/rs6000/power6.md: Adjust.
13776         * config/rs6000/power7.md: Adjust.
13777         * config/rs6000/power8.md: Adjust.
13778         * config/rs6000/power9.md: Adjust.
13779         * config/rs6000/rs64.md: Adjust.
13780         * config/rs6000/titan.md: Adjust.
13782 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13784         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13785         ix86_indirect_branch_register logic.
13787 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13789         * config/i386/constraints.md (Bs): Update
13790         ix86_indirect_branch_register check.  Don't check
13791         ix86_indirect_branch_register with GOT_memory_operand.
13792         (Bw): Likewise.
13793         * config/i386/predicates.md (GOT_memory_operand): Don't check
13794         ix86_indirect_branch_register here.
13795         (GOT32_symbol_operand): Likewise.
13797 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13799         * config/i386/predicates.md (constant_call_address_operand):
13800         Rewrite ix86_indirect_branch_register logic.
13801         (sibcall_insn_operand): Likewise.
13803 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13805         * config/i386/constraints.md (Bs): Replace
13806         ix86_indirect_branch_thunk_register with
13807         ix86_indirect_branch_register.
13808         (Bw): Likewise.
13809         * config/i386/i386.md (indirect_jump): Likewise.
13810         (tablejump): Likewise.
13811         (*sibcall_memory): Likewise.
13812         (*sibcall_value_memory): Likewise.
13813         Peepholes of indirect call and jump via memory: Likewise.
13814         * config/i386/i386.opt: Likewise.
13815         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13816         (GOT_memory_operand): Likewise.
13817         (call_insn_operand): Likewise.
13818         (sibcall_insn_operand): Likewise.
13819         (GOT32_symbol_operand): Likewise.
13821 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13823         PR middle-end/83837
13824         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13825         type rather than type addr's type points to.
13826         (expand_omp_atomic_mutex): Likewise.
13827         (expand_omp_atomic): Likewise.
13829 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13831         PR target/83839
13832         * config/i386/i386.c (output_indirect_thunk_function): Use
13833         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13834         for  __x86_return_thunk.
13836 2018-01-15  Richard Biener  <rguenther@suse.de>
13838         PR middle-end/83850
13839         * expmed.c (extract_bit_field_1): Fix typo.
13841 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13843         PR target/83687
13844         * config/arm/iterators.md (VF): New mode iterator.
13845         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13846         Remove integer-related logic from pattern.
13847         (neon_vabd<mode>_3): Likewise.
13849 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13851         PR middle-end/82694
13852         * common.opt (fstrict-overflow): No longer an alias.
13853         (fwrapv-pointer): New option.
13854         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13855         also for pointer types based on flag_wrapv_pointer.
13856         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13857         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13858         opts->x_flag_wrapv got set.
13859         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13860         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13861         POINTER_TYPE_OVERFLOW_UNDEFINED.
13862         * match.pd: Likewise in address comparison pattern.
13863         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13865 2018-01-15  Richard Biener  <rguenther@suse.de>
13867         PR lto/83804
13868         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13869         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13870         Reset type names to their identifier if their TYPE_DECL doesn't
13871         have linkage (and thus is used for ODR and devirt).
13872         (save_debug_info_for_decl): Remove.
13873         (save_debug_info_for_type): Likewise.
13874         (add_tree_to_fld_list): Adjust.
13875         * tree-pretty-print.c (dump_generic_node): Make dumping of
13876         type names more robust.
13878 2018-01-15  Richard Biener  <rguenther@suse.de>
13880         * BASE-VER: Bump to 8.0.1.
13882 2018-01-14  Martin Sebor  <msebor@redhat.com>
13884         PR other/83508
13885         * builtins.c (check_access): Avoid warning when the no-warning bit
13886         is set.
13888 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13890         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13891         * ira-color (allocno_hard_regs_compare): Likewise.
13893 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13895         PR target/83013
13896         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13897         Use .pushsection/.popsection.
13899 2018-01-14  Martin Sebor  <msebor@redhat.com>
13901         PR c++/81327
13902         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13904 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13906         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13907         entry from extra_headers.
13908         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13909         extra_headers, make the list bitwise identical to the i?86-*-* one.
13911 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13913         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13914         -mcmodel=large with -mindirect-branch=thunk,
13915         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13916         -mfunction-return=thunk-extern.
13917         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13918         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13919         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13921 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13923         * config/i386/i386.c (print_reg): Print the name of the full
13924         integer register without '%'.
13925         (ix86_print_operand): Handle 'V'.
13926         * doc/extend.texi: Document 'V' modifier.
13928 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13930         * config/i386/constraints.md (Bs): Disallow memory operand for
13931         -mindirect-branch-register.
13932         (Bw): Likewise.
13933         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13934         (GOT_memory_operand): Likewise.
13935         (call_insn_operand): Likewise.
13936         (sibcall_insn_operand): Likewise.
13937         (GOT32_symbol_operand): Likewise.
13938         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13939         for -mindirect-branch-register.
13940         (tablejump): Likewise.
13941         (*sibcall_memory): Likewise.
13942         (*sibcall_value_memory): Likewise.
13943         Disallow peepholes of indirect call and jump via memory for
13944         -mindirect-branch-register.
13945         (*call_pop): Replace m with Bw.
13946         (*call_value_pop): Likewise.
13947         (*sibcall_pop_memory): Replace m with Bs.
13948         * config/i386/i386.opt (mindirect-branch-register): New option.
13949         * doc/invoke.texi: Document -mindirect-branch-register option.
13951 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13953         * config/i386/i386-protos.h (ix86_output_function_return): New.
13954         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13955         set function_return_type.
13956         (indirect_thunk_name): Add ret_p to indicate thunk for function
13957         return.
13958         (output_indirect_thunk_function): Pass false to
13959         indirect_thunk_name.
13960         (ix86_output_indirect_branch_via_reg): Likewise.
13961         (ix86_output_indirect_branch_via_push): Likewise.
13962         (output_indirect_thunk_function): Create alias for function
13963         return thunk if regno < 0.
13964         (ix86_output_function_return): New function.
13965         (ix86_handle_fndecl_attribute): Handle function_return.
13966         (ix86_attribute_table): Add function_return.
13967         * config/i386/i386.h (machine_function): Add
13968         function_return_type.
13969         * config/i386/i386.md (simple_return_internal): Use
13970         ix86_output_function_return.
13971         (simple_return_internal_long): Likewise.
13972         * config/i386/i386.opt (mfunction-return=): New option.
13973         (indirect_branch): Mention -mfunction-return=.
13974         * doc/extend.texi: Document function_return function attribute.
13975         * doc/invoke.texi: Document -mfunction-return= option.
13977 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13979         * config/i386/i386-opts.h (indirect_branch): New.
13980         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13981         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13982         with local indirect jump when converting indirect call and jump.
13983         (ix86_set_indirect_branch_type): New.
13984         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13985         (indirectlabelno): New.
13986         (indirect_thunk_needed): Likewise.
13987         (indirect_thunk_bnd_needed): Likewise.
13988         (indirect_thunks_used): Likewise.
13989         (indirect_thunks_bnd_used): Likewise.
13990         (INDIRECT_LABEL): Likewise.
13991         (indirect_thunk_name): Likewise.
13992         (output_indirect_thunk): Likewise.
13993         (output_indirect_thunk_function): Likewise.
13994         (ix86_output_indirect_branch_via_reg): Likewise.
13995         (ix86_output_indirect_branch_via_push): Likewise.
13996         (ix86_output_indirect_branch): Likewise.
13997         (ix86_output_indirect_jmp): Likewise.
13998         (ix86_code_end): Call output_indirect_thunk_function if needed.
13999         (ix86_output_call_insn): Call ix86_output_indirect_branch if
14000         needed.
14001         (ix86_handle_fndecl_attribute): Handle indirect_branch.
14002         (ix86_attribute_table): Add indirect_branch.
14003         * config/i386/i386.h (machine_function): Add indirect_branch_type
14004         and has_local_indirect_jump.
14005         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
14006         to true.
14007         (tablejump): Likewise.
14008         (*indirect_jump): Use ix86_output_indirect_jmp.
14009         (*tablejump_1): Likewise.
14010         (simple_return_indirect_internal): Likewise.
14011         * config/i386/i386.opt (mindirect-branch=): New option.
14012         (indirect_branch): New.
14013         (keep): Likewise.
14014         (thunk): Likewise.
14015         (thunk-inline): Likewise.
14016         (thunk-extern): Likewise.
14017         * doc/extend.texi: Document indirect_branch function attribute.
14018         * doc/invoke.texi: Document -mindirect-branch= option.
14020 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
14022         PR ipa/83051
14023         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
14025 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
14027         * ipa-inline.c (want_inline_small_function_p): Return false if
14028         inlining has already failed with CIF_FINAL_ERROR.
14029         (update_caller_keys): Call want_inline_small_function_p before
14030         can_inline_edge_p.
14031         (update_callee_keys): Likewise.
14033 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14035         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14036         New function.
14037         (rs6000_quadword_masked_address_p): Likewise.
14038         (quad_aligned_load_p): Likewise.
14039         (quad_aligned_store_p): Likewise.
14040         (const_load_sequence_p): Add comment to describe the outer-most loop.
14041         (mimic_memory_attributes_and_flags): New function.
14042         (rs6000_gen_stvx): Likewise.
14043         (replace_swapped_aligned_store): Likewise.
14044         (rs6000_gen_lvx): Likewise.
14045         (replace_swapped_aligned_load): Likewise.
14046         (replace_swapped_load_constant): Capitalize argument name in
14047         comment describing this function.
14048         (rs6000_analyze_swaps): Add a third pass to search for vector loads
14049         and stores that access quad-word aligned addresses and replace
14050         with stvx or lvx instructions when appropriate.
14051         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14052         New function prototype.
14053         (rs6000_quadword_masked_address_p): Likewise.
14054         (rs6000_gen_lvx): Likewise.
14055         (rs6000_gen_stvx): Likewise.
14056         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14057         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14058         when memory address is aligned.
14059         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14060         this split to select lvx instruction when memory address is aligned.
14061         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14062         instruction when memory address is aligned.
14063         (*vsx_le_perm_load_v16qi): Likewise.
14064         (four unnamed splitters): Modify to select the stvx instruction
14065         when memory is aligned.
14067 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
14069         * predict.c (determine_unlikely_bbs): Handle correctly BBs
14070         which appears in the queue multiple times.
14072 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14073             Alan Hayward  <alan.hayward@arm.com>
14074             David Sherwood  <david.sherwood@arm.com>
14076         * tree-vectorizer.h (vec_lower_bound): New structure.
14077         (_loop_vec_info): Add check_nonzero and lower_bounds.
14078         (LOOP_VINFO_CHECK_NONZERO): New macro.
14079         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14080         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14081         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14082         fields.  Make seg_len the distance travelled, not including the
14083         access size.
14084         (dr_direction_indicator): Declare.
14085         (dr_zero_step_indicator): Likewise.
14086         (dr_known_forward_stride_p): Likewise.
14087         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14088         tree-ssanames.h.
14089         (runtime_alias_check_p): Allow runtime alias checks with
14090         variable strides.
14091         (operator ==): Compare access_size and align.
14092         (prune_runtime_alias_test_list): Rework for new distinction between
14093         the access_size and seg_len.
14094         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
14095         segment lengths.
14096         (get_segment_min_max): New function.
14097         (create_intersect_range_checks): Use it.
14098         (dr_step_indicator): New function.
14099         (dr_direction_indicator): Likewise.
14100         (dr_zero_step_indicator): Likewise.
14101         (dr_known_forward_stride_p): Likewise.
14102         * tree-loop-distribution.c (data_ref_segment_size): Return
14103         DR_STEP * (niters - 1).
14104         (compute_alias_check_pairs): Update call to the dr_with_seg_len
14105         constructor.
14106         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14107         (vect_preserves_scalar_order_p): New function, split out from...
14108         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
14109         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14110         (vect_vfa_access_size): New function.
14111         (vect_vfa_align): Likewise.
14112         (vect_compile_time_alias): Take access_size_a and access_b arguments.
14113         (dump_lower_bound): New function.
14114         (vect_check_lower_bound): Likewise.
14115         (vect_small_gap_p): Likewise.
14116         (vectorizable_with_step_bound_p): Likewise.
14117         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14118         depencies if the vectorization factor is 1.  Convert the checks
14119         for nonzero steps into checks on the bounds of DR_STEP.  Try using
14120         a bunds check for variable steps if the minimum required step is
14121         relatively small. Update calls to the dr_with_seg_len
14122         constructor and to vect_compile_time_alias.
14123         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14124         function.
14125         (vect_loop_versioning): Call it.
14126         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14127         when retrying.
14128         (vect_estimate_min_profitable_iters): Account for any bounds checks.
14130 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14131             Alan Hayward  <alan.hayward@arm.com>
14132             David Sherwood  <david.sherwood@arm.com>
14134         * doc/sourcebuild.texi (vect_scatter_store): Document.
14135         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14136         optabs.
14137         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14138         Document.
14139         * genopinit.c (main): Add supports_vec_scatter_store and
14140         supports_vec_scatter_store_cached to target_optabs.
14141         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14142         IFN_MASK_SCATTER_STORE.
14143         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14144         functions.
14145         * internal-fn.h (internal_store_fn_p): Declare.
14146         (internal_fn_stored_value_index): Likewise.
14147         * internal-fn.c (scatter_store_direct): New macro.
14148         (expand_scatter_store_optab_fn): New function.
14149         (direct_scatter_store_optab_supported_p): New macro.
14150         (internal_store_fn_p): New function.
14151         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14152         IFN_MASK_SCATTER_STORE.
14153         (internal_fn_mask_index): Likewise.
14154         (internal_fn_stored_value_index): New function.
14155         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14156         for scatter stores.
14157         * optabs-query.h (supports_vec_scatter_store_p): Declare.
14158         * optabs-query.c (supports_vec_scatter_store_p): New function.
14159         * tree-vectorizer.h (vect_get_store_rhs): Declare.
14160         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14161         true for scatter stores.
14162         (vect_gather_scatter_fn_p): Handle scatter stores too.
14163         (vect_check_gather_scatter): Consider using scatter stores if
14164         supports_vec_scatter_store_p.
14165         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14166         scatter stores too.
14167         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14168         internal_fn_stored_value_index.
14169         (check_load_store_masking): Handle scatter stores too.
14170         (vect_get_store_rhs): Make public.
14171         (vectorizable_call): Use internal_store_fn_p.
14172         (vectorizable_store): Handle scatter store internal functions.
14173         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14174         when deciding whether the end of the group has been reached.
14175         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14176         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14177         (mask_scatter_store<mode>): New insns.
14179 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14180             Alan Hayward  <alan.hayward@arm.com>
14181             David Sherwood  <david.sherwood@arm.com>
14183         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14184         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14185         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14186         function.
14187         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14188         Use vect_truncate_gather_scatter_offset if we can't treat the
14189         operation as a normal gather load or scatter store.
14190         (get_group_load_store_type): Take the gather_scatter_info
14191         as argument.  Try using a gather load or scatter store for
14192         single-element groups.
14193         (get_load_store_type): Update calls to get_group_load_store_type
14194         and vect_use_strided_gather_scatters_p.
14196 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14197             Alan Hayward  <alan.hayward@arm.com>
14198             David Sherwood  <david.sherwood@arm.com>
14200         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14201         optional tree argument.
14202         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14203         null target hooks.
14204         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14205         but continue to use the current value as a fallback.
14206         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14207         to compare the updates.
14208         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14209         (get_load_store_type): Use it when handling a strided access.
14210         (vect_get_strided_load_store_ops): New function.
14211         (vect_get_data_ptr_increment): Likewise.
14212         (vectorizable_load): Handle strided gather loads.  Always pass
14213         a step to vect_create_data_ref_ptr and bump_vector_ptr.
14215 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14216             Alan Hayward  <alan.hayward@arm.com>
14217             David Sherwood  <david.sherwood@arm.com>
14219         * doc/md.texi (gather_load@var{m}): Document.
14220         (mask_gather_load@var{m}): Likewise.
14221         * genopinit.c (main): Add supports_vec_gather_load and
14222         supports_vec_gather_load_cached to target_optabs.
14223         * optabs-tree.c (init_tree_optimization_optabs): Use
14224         ggc_cleared_alloc to allocate target_optabs.
14225         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14226         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14227         functions.
14228         * internal-fn.h (internal_load_fn_p): Declare.
14229         (internal_gather_scatter_fn_p): Likewise.
14230         (internal_fn_mask_index): Likewise.
14231         (internal_gather_scatter_fn_supported_p): Likewise.
14232         * internal-fn.c (gather_load_direct): New macro.
14233         (expand_gather_load_optab_fn): New function.
14234         (direct_gather_load_optab_supported_p): New macro.
14235         (direct_internal_fn_optab): New function.
14236         (internal_load_fn_p): Likewise.
14237         (internal_gather_scatter_fn_p): Likewise.
14238         (internal_fn_mask_index): Likewise.
14239         (internal_gather_scatter_fn_supported_p): Likewise.
14240         * optabs-query.c (supports_at_least_one_mode_p): New function.
14241         (supports_vec_gather_load_p): Likewise.
14242         * optabs-query.h (supports_vec_gather_load_p): Declare.
14243         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14244         and memory_type field.
14245         (NUM_PATTERNS): Bump to 15.
14246         * tree-vect-data-refs.c: Include internal-fn.h.
14247         (vect_gather_scatter_fn_p): New function.
14248         (vect_describe_gather_scatter_call): Likewise.
14249         (vect_check_gather_scatter): Try using internal functions for
14250         gather loads.  Recognize existing calls to a gather load function.
14251         (vect_analyze_data_refs): Consider using gather loads if
14252         supports_vec_gather_load_p.
14253         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14254         (vect_get_gather_scatter_offset_type): Likewise.
14255         (vect_convert_mask_for_vectype): Likewise.
14256         (vect_add_conversion_to_patterm): Likewise.
14257         (vect_try_gather_scatter_pattern): Likewise.
14258         (vect_recog_gather_scatter_pattern): New pattern recognizer.
14259         (vect_vect_recog_func_ptrs): Add it.
14260         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14261         internal_fn_mask_index and internal_gather_scatter_fn_p.
14262         (check_load_store_masking): Take the gather_scatter_info as an
14263         argument and handle gather loads.
14264         (vect_get_gather_scatter_ops): New function.
14265         (vectorizable_call): Check internal_load_fn_p.
14266         (vectorizable_load): Likewise.  Handle gather load internal
14267         functions.
14268         (vectorizable_store): Update call to check_load_store_masking.
14269         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14270         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14271         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14272         (aarch64_gather_scale_operand_d): New predicates.
14273         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14274         (mask_gather_load<mode>): New insns.
14276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14277             Alan Hayward  <alan.hayward@arm.com>
14278             David Sherwood  <david.sherwood@arm.com>
14280         * optabs.def (fold_left_plus_optab): New optab.
14281         * doc/md.texi (fold_left_plus_@var{m}): Document.
14282         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14283         * internal-fn.c (fold_left_direct): Define.
14284         (expand_fold_left_optab_fn): Likewise.
14285         (direct_fold_left_optab_supported_p): Likewise.
14286         * fold-const-call.c (fold_const_fold_left): New function.
14287         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14288         * tree-parloops.c (valid_reduction_p): New function.
14289         (gather_scalar_reductions): Use it.
14290         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14291         (vect_finish_replace_stmt): Declare.
14292         * tree-vect-loop.c (fold_left_reduction_fn): New function.
14293         (needs_fold_left_reduction_p): New function, split out from...
14294         (vect_is_simple_reduction): ...here.  Accept reductions that
14295         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14296         (vect_force_simple_reduction): Also store the reduction type in
14297         the assignment's STMT_VINFO_REDUC_TYPE.
14298         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14299         (merge_with_identity): New function.
14300         (vect_expand_fold_left): Likewise.
14301         (vectorize_fold_left_reduction): Likewise.
14302         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
14303         scalar phi in place for it.  Check for target support and reject
14304         cases that would reassociate the operation.  Defer the transform
14305         phase to vectorize_fold_left_reduction.
14306         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14307         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14308         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14310 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14312         * tree-if-conv.c (predicate_mem_writes): Remove redundant
14313         call to ifc_temp_var.
14315 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14316             Alan Hayward  <alan.hayward@arm.com>
14317             David Sherwood  <david.sherwood@arm.com>
14319         * target.def (legitimize_address_displacement): Take the original
14320         offset as a poly_int.
14321         * targhooks.h (default_legitimize_address_displacement): Update
14322         accordingly.
14323         * targhooks.c (default_legitimize_address_displacement): Likewise.
14324         * doc/tm.texi: Regenerate.
14325         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14326         as an argument, moving assert of ad->disp == ad->disp_term to...
14327         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
14328         Try calling targetm.legitimize_address_displacement before expanding
14329         the address rather than afterwards, and adjust for the new interface.
14330         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14331         Match the new hook interface.  Handle SVE addresses.
14332         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14333         new hook interface.
14335 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14337         * Makefile.in (OBJS): Add early-remat.o.
14338         * target.def (select_early_remat_modes): New hook.
14339         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14340         * doc/tm.texi: Regenerate.
14341         * targhooks.h (default_select_early_remat_modes): Declare.
14342         * targhooks.c (default_select_early_remat_modes): New function.
14343         * timevar.def (TV_EARLY_REMAT): New timevar.
14344         * passes.def (pass_early_remat): New pass.
14345         * tree-pass.h (make_pass_early_remat): Declare.
14346         * early-remat.c: New file.
14347         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14348         function.
14349         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14351 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14352             Alan Hayward  <alan.hayward@arm.com>
14353             David Sherwood  <david.sherwood@arm.com>
14355         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14356         vfm1 with a bound_epilog parameter.
14357         (vect_do_peeling): Update calls accordingly, and move the prologue
14358         call earlier in the function.  Treat the base bound_epilog as 0 for
14359         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
14360         this base when peeling for gaps.
14361         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14362         with fully-masked loops.
14363         (vect_estimate_min_profitable_iters): Handle the single peeled
14364         iteration in that case.
14366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14367             Alan Hayward  <alan.hayward@arm.com>
14368             David Sherwood  <david.sherwood@arm.com>
14370         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14371         single-element interleaving even if the size is not a power of 2.
14372         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14373         accesses for single-element interleaving if the group size is
14374         not a power of 2.
14376 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14377             Alan Hayward  <alan.hayward@arm.com>
14378             David Sherwood  <david.sherwood@arm.com>
14380         * doc/md.texi (fold_extract_last_@var{m}): Document.
14381         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14382         * optabs.def (fold_extract_last_optab): New optab.
14383         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14384         * internal-fn.c (fold_extract_direct): New macro.
14385         (expand_fold_extract_optab_fn): Likewise.
14386         (direct_fold_extract_optab_supported_p): Likewise.
14387         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14388         * tree-vect-loop.c (vect_model_reduction_cost): Handle
14389         EXTRACT_LAST_REDUCTION.
14390         (get_initial_def_for_reduction): Do not create an initial vector
14391         for EXTRACT_LAST_REDUCTION reductions.
14392         (vectorizable_reduction): Leave the scalar phi in place for
14393         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
14394         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
14395         epilogue code for EXTRACT_LAST_REDUCTION and defer the
14396         transform phase to vectorizable_condition.
14397         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14398         split out from...
14399         (vect_finish_stmt_generation): ...here.
14400         (vect_finish_replace_stmt): New function.
14401         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14402         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14403         pattern.
14404         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14406 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14407             Alan Hayward  <alan.hayward@arm.com>
14408             David Sherwood  <david.sherwood@arm.com>
14410         * doc/md.texi (extract_last_@var{m}): Document.
14411         * optabs.def (extract_last_optab): New optab.
14412         * internal-fn.def (EXTRACT_LAST): New internal function.
14413         * internal-fn.c (cond_unary_direct): New macro.
14414         (expand_cond_unary_optab_fn): Likewise.
14415         (direct_cond_unary_optab_supported_p): Likewise.
14416         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14417         loops using EXTRACT_LAST.
14418         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14419         (extract_last_<mode>): ...this optab.
14420         (vec_extract<mode><Vel>): Update accordingly.
14422 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14423             Alan Hayward  <alan.hayward@arm.com>
14424             David Sherwood  <david.sherwood@arm.com>
14426         * target.def (empty_mask_is_expensive): New hook.
14427         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14428         * doc/tm.texi: Regenerate.
14429         * targhooks.h (default_empty_mask_is_expensive): Declare.
14430         * targhooks.c (default_empty_mask_is_expensive): New function.
14431         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14432         if the target says that empty masks are expensive.
14433         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14434         New function.
14435         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14437 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14438             Alan Hayward  <alan.hayward@arm.com>
14439             David Sherwood  <david.sherwood@arm.com>
14441         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14442         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14443         (vect_use_loop_mask_for_alignment_p): New function.
14444         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14445         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14446         niters_skip argument.  Make sure that the first niters_skip elements
14447         of the first iteration are inactive.
14448         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14449         Update call to vect_set_loop_masks_directly.
14450         (get_misalign_in_elems): New function, split out from...
14451         (vect_gen_prolog_loop_niters): ...here.
14452         (vect_update_init_of_dr): Take a code argument that specifies whether
14453         the adjustment should be added or subtracted.
14454         (vect_update_init_of_drs): Likewise.
14455         (vect_prepare_for_masked_peels): New function.
14456         (vect_do_peeling): Skip prologue peeling if we're using a mask
14457         instead.  Update call to vect_update_inits_of_drs.
14458         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14459         mask_skip_niters.
14460         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14461         alignment.  Do not include the number of peeled iterations in
14462         the minimum threshold in that case.
14463         (vectorizable_induction): Adjust the start value down by
14464         LOOP_VINFO_MASK_SKIP_NITERS iterations.
14465         (vect_transform_loop): Call vect_prepare_for_masked_peels.
14466         Take the number of skipped iterations into account when calculating
14467         the loop bounds.
14468         * tree-vect-stmts.c (vect_gen_while_not): New function.
14470 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14471             Alan Hayward  <alan.hayward@arm.com>
14472             David Sherwood  <david.sherwood@arm.com>
14474         * doc/sourcebuild.texi (vect_fully_masked): Document.
14475         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14476         default value to 0.
14477         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14478         split out from...
14479         (vect_analyze_loop_2): ...here. Don't check the vectorization
14480         factor against the number of loop iterations if the loop is
14481         fully-masked.
14483 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14484             Alan Hayward  <alan.hayward@arm.com>
14485             David Sherwood  <david.sherwood@arm.com>
14487         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14488         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14489         (dump_groups): Update accordingly.
14490         (iv_use::mem_type): New member variable.
14491         (address_p): New function.
14492         (record_use): Add a mem_type argument and initialize the new
14493         mem_type field.
14494         (record_group_use): Add a mem_type argument.  Use address_p.
14495         Remove obsolete null checks of base_object.  Update call to record_use.
14496         (find_interesting_uses_op): Update call to record_group_use.
14497         (find_interesting_uses_cond): Likewise.
14498         (find_interesting_uses_address): Likewise.
14499         (get_mem_type_for_internal_fn): New function.
14500         (find_address_like_use): Likewise.
14501         (find_interesting_uses_stmt): Try find_address_like_use before
14502         calling find_interesting_uses_op.
14503         (addr_offset_valid_p): Use the iv mem_type field as the type
14504         of the addressed memory.
14505         (add_autoinc_candidates): Likewise.
14506         (get_address_cost): Likewise.
14507         (split_small_address_groups_p): Use address_p.
14508         (split_address_groups): Likewise.
14509         (add_iv_candidate_for_use): Likewise.
14510         (autoinc_possible_for_pair): Likewise.
14511         (rewrite_groups): Likewise.
14512         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14513         (determine_group_iv_cost): Update after split of USE_ADDRESS.
14514         (get_alias_ptr_type_for_ptr_address): New function.
14515         (rewrite_use_address): Rewrite address uses in calls that were
14516         identified by find_address_like_use.
14518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14519             Alan Hayward  <alan.hayward@arm.com>
14520             David Sherwood  <david.sherwood@arm.com>
14522         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14523         TARGET_MEM_REFs.
14524         * gimple-expr.h (is_gimple_addressable: Likewise.
14525         * gimple-expr.c (is_gimple_address): Likewise.
14526         * internal-fn.c (expand_call_mem_ref): New function.
14527         (expand_mask_load_optab_fn): Use it.
14528         (expand_mask_store_optab_fn): Likewise.
14530 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14531             Alan Hayward  <alan.hayward@arm.com>
14532             David Sherwood  <david.sherwood@arm.com>
14534         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14535         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14536         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14537         (cond_umax@var{mode}): Document.
14538         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14539         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14540         (cond_umin_optab, cond_umax_optab): New optabs.
14541         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14542         (COND_IOR, COND_XOR): New internal functions.
14543         * internal-fn.h (get_conditional_internal_fn): Declare.
14544         * internal-fn.c (cond_binary_direct): New macro.
14545         (expand_cond_binary_optab_fn): Likewise.
14546         (direct_cond_binary_optab_supported_p): Likewise.
14547         (get_conditional_internal_fn): New function.
14548         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14549         Cope with reduction statements that are vectorized as calls rather
14550         than assignments.
14551         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14552         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14553         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14554         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14555         (UNSPEC_COND_EOR): New unspecs.
14556         (optab): Add mappings for them.
14557         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14558         (sve_int_op, sve_fp_op): New int attributes.
14560 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14561             Alan Hayward  <alan.hayward@arm.com>
14562             David Sherwood  <david.sherwood@arm.com>
14564         * optabs.def (while_ult_optab): New optab.
14565         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14566         * internal-fn.def (WHILE_ULT): New internal function.
14567         * internal-fn.h (direct_internal_fn_supported_p): New override
14568         that takes two types as argument.
14569         * internal-fn.c (while_direct): New macro.
14570         (expand_while_optab_fn): New function.
14571         (convert_optab_supported_p): Likewise.
14572         (direct_while_optab_supported_p): New macro.
14573         * wide-int.h (wi::udiv_ceil): New function.
14574         * tree-vectorizer.h (rgroup_masks): New structure.
14575         (vec_loop_masks): New typedef.
14576         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14577         and fully_masked_p.
14578         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14579         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14580         (vect_max_vf): New function.
14581         (slpeel_make_loop_iterate_ntimes): Delete.
14582         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14583         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14584         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14585         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14586         internal-fn.h, stor-layout.h and optabs-query.h.
14587         (vect_set_loop_mask): New function.
14588         (add_preheader_seq): Likewise.
14589         (add_header_seq): Likewise.
14590         (interleave_supported_p): Likewise.
14591         (vect_maybe_permute_loop_masks): Likewise.
14592         (vect_set_loop_masks_directly): Likewise.
14593         (vect_set_loop_condition_masked): Likewise.
14594         (vect_set_loop_condition_unmasked): New function, split out from
14595         slpeel_make_loop_iterate_ntimes.
14596         (slpeel_make_loop_iterate_ntimes): Rename to..
14597         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14598         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14599         (vect_do_peeling): Update call accordingly.
14600         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14601         loops.
14602         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14603         mask_compare_type, can_fully_mask_p and fully_masked_p.
14604         (release_vec_loop_masks): New function.
14605         (_loop_vec_info): Use it to free the loop masks.
14606         (can_produce_all_loop_masks_p): New function.
14607         (vect_get_max_nscalars_per_iter): Likewise.
14608         (vect_verify_full_masking): Likewise.
14609         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14610         retries, and free the mask rgroups before retrying.  Check loop-wide
14611         reasons for disallowing fully-masked loops.  Make the final decision
14612         about whether use a fully-masked loop or not.
14613         (vect_estimate_min_profitable_iters): Do not assume that peeling
14614         for the number of iterations will be needed for fully-masked loops.
14615         (vectorizable_reduction): Disable fully-masked loops.
14616         (vectorizable_live_operation): Likewise.
14617         (vect_halve_mask_nunits): New function.
14618         (vect_double_mask_nunits): Likewise.
14619         (vect_record_loop_mask): Likewise.
14620         (vect_get_loop_mask): Likewise.
14621         (vect_transform_loop): Handle the case in which the final loop
14622         iteration might handle a partial vector.  Call vect_set_loop_condition
14623         instead of slpeel_make_loop_iterate_ntimes.
14624         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14625         (check_load_store_masking): New function.
14626         (prepare_load_store_mask): Likewise.
14627         (vectorizable_store): Handle fully-masked loops.
14628         (vectorizable_load): Likewise.
14629         (supportable_widening_operation): Use vect_halve_mask_nunits for
14630         booleans.
14631         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14632         (vect_gen_while): New function.
14633         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14634         (aarch64_uqdec<mode>): New insn.
14636 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14637             Alan Hayward  <alan.hayward@arm.com>
14638             David Sherwood  <david.sherwood@arm.com>
14640         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14641         (reduc_xor_scal_optab): New optabs.
14642         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14643         (reduc_xor_scal_@var{m}): Document.
14644         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14645         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14646         internal functions.
14647         * fold-const-call.c (fold_const_call): Handle them.
14648         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14649         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14650         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14651         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14652         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14653         (UNSPEC_XORV): New unspecs.
14654         (optab): Add entries for them.
14655         (BITWISEV): New int iterator.
14656         (bit_reduc_op): New int attributes.
14658 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14659             Alan Hayward  <alan.hayward@arm.com>
14660             David Sherwood  <david.sherwood@arm.com>
14662         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14663         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14664         * optabs.def (vec_shl_insert_optab): New optab.
14665         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14666         (duplicate_and_interleave): Likewise.
14667         * tree-vect-loop.c: Include internal-fn.h.
14668         (neutral_op_for_slp_reduction): New function, split out from
14669         get_initial_defs_for_reduction.
14670         (get_initial_def_for_reduction): Handle option 2 for variable-length
14671         vectors by loading the neutral value into a vector and then shifting
14672         the initial value into element 0.
14673         (get_initial_defs_for_reduction): Replace the code argument with
14674         the neutral value calculated by neutral_op_for_slp_reduction.
14675         Use gimple_build_vector for constant-length vectors.
14676         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14677         but the first group_size elements have a neutral value.
14678         Use duplicate_and_interleave otherwise.
14679         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14680         Update call to get_initial_defs_for_reduction.  Handle SLP
14681         reductions for variable-length vectors by creating one vector
14682         result for each scalar result, with the elements associated
14683         with other scalar results stubbed out with the neutral value.
14684         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14685         Require IFN_VEC_SHL_INSERT for double reductions on
14686         variable-length vectors, or SLP reductions that have
14687         a neutral value.  Require can_duplicate_and_interleave_p
14688         support for variable-length unchained SLP reductions if there
14689         is no neutral value, such as for MIN/MAX reductions.  Also require
14690         the number of vector elements to be a multiple of the number of
14691         SLP statements when doing variable-length unchained SLP reductions.
14692         Update call to vect_create_epilog_for_reduction.
14693         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14694         and remove initial values.
14695         (duplicate_and_interleave): Make public.
14696         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14697         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14699 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14700             Alan Hayward  <alan.hayward@arm.com>
14701             David Sherwood  <david.sherwood@arm.com>
14703         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14704         (can_duplicate_and_interleave_p): New function.
14705         (vect_get_and_check_slp_defs): Take the vector of statements
14706         rather than just the current one.  Remove excess parentheses.
14707         Restriction rejectinon of vect_constant_def and vect_external_def
14708         for variable-length vectors to boolean types, or types for which
14709         can_duplicate_and_interleave_p is false.
14710         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14711         (duplicate_and_interleave): New function.
14712         (vect_get_constant_vectors): Use gimple_build_vector for
14713         constant-length vectors and suitable variable-length constant
14714         vectors.  Use duplicate_and_interleave for other variable-length
14715         vectors.  Don't defer the update when inserting new statements.
14717 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14718             Alan Hayward  <alan.hayward@arm.com>
14719             David Sherwood  <david.sherwood@arm.com>
14721         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14722         min_profitable_iters doesn't go negative.
14724 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14725             Alan Hayward  <alan.hayward@arm.com>
14726             David Sherwood  <david.sherwood@arm.com>
14728         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14729         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14730         * optabs.def (vec_mask_load_lanes_optab): New optab.
14731         (vec_mask_store_lanes_optab): Likewise.
14732         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14733         (MASK_STORE_LANES): Likewise.
14734         * internal-fn.c (mask_load_lanes_direct): New macro.
14735         (mask_store_lanes_direct): Likewise.
14736         (expand_mask_load_optab_fn): Handle masked operations.
14737         (expand_mask_load_lanes_optab_fn): New macro.
14738         (expand_mask_store_optab_fn): Handle masked operations.
14739         (expand_mask_store_lanes_optab_fn): New macro.
14740         (direct_mask_load_lanes_optab_supported_p): Likewise.
14741         (direct_mask_store_lanes_optab_supported_p): Likewise.
14742         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14743         parameter.
14744         (vect_load_lanes_supported): Likewise.
14745         * tree-vect-data-refs.c (strip_conversion): New function.
14746         (can_group_stmts_p): Likewise.
14747         (vect_analyze_data_ref_accesses): Use it instead of checking
14748         for a pair of assignments.
14749         (vect_store_lanes_supported): Take a masked_p parameter.
14750         (vect_load_lanes_supported): Likewise.
14751         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14752         vect_store_lanes_supported and vect_load_lanes_supported.
14753         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14754         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14755         parameter.  Don't allow gaps for masked accesses.
14756         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14757         and vect_load_lanes_supported.
14758         (get_load_store_type): Take a masked_p parameter and update
14759         call to get_group_load_store_type.
14760         (vectorizable_store): Update call to get_load_store_type.
14761         Handle IFN_MASK_STORE_LANES.
14762         (vectorizable_load): Update call to get_load_store_type.
14763         Handle IFN_MASK_LOAD_LANES.
14765 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14766             Alan Hayward  <alan.hayward@arm.com>
14767             David Sherwood  <david.sherwood@arm.com>
14769         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14770         modes for SVE.
14771         * config/aarch64/aarch64-protos.h
14772         (aarch64_sve_struct_memory_operand_p): Declare.
14773         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14774         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14775         (VPRED, vpred): Handle SVE structure modes.
14776         * config/aarch64/constraints.md (Utx): New constraint.
14777         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14778         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14779         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14780         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14781         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14782         structure modes.  Split into pieces after RA.
14783         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14784         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14785         New patterns.
14786         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14787         SVE structure modes.
14788         (aarch64_classify_address): Likewise.
14789         (sizetochar): Move earlier in file.
14790         (aarch64_print_operand): Handle SVE register lists.
14791         (aarch64_array_mode): New function.
14792         (aarch64_sve_struct_memory_operand_p): Likewise.
14793         (TARGET_ARRAY_MODE): Redefine.
14795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14796             Alan Hayward  <alan.hayward@arm.com>
14797             David Sherwood  <david.sherwood@arm.com>
14799         * target.def (array_mode): New target hook.
14800         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14801         * doc/tm.texi: Regenerate.
14802         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14803         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14804         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14805         targetm.array_mode.
14806         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14807         type sizes.
14809 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14810             Alan Hayward  <alan.hayward@arm.com>
14811             David Sherwood  <david.sherwood@arm.com>
14813         * fold-const.c (fold_binary_loc): Check the argument types
14814         rather than the result type when testing for a vector operation.
14816 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14818         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14819         * doc/tm.texi: Regenerate.
14821 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14822             Alan Hayward  <alan.hayward@arm.com>
14823             David Sherwood  <david.sherwood@arm.com>
14825         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14826         (sve): Document new AArch64 extension.
14827         * doc/md.texi (w): Extend the description of the AArch64
14828         constraint to include SVE vectors.
14829         (Upl, Upa): Document new AArch64 predicate constraints.
14830         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14831         enum.
14832         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14833         (msve-vector-bits=): New option.
14834         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14835         SVE when these are disabled.
14836         (sve): New extension.
14837         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14838         modes.  Adjust their number of units based on aarch64_sve_vg.
14839         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14840         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14841         aarch64_addr_query_type.
14842         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14843         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14844         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14845         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14846         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14847         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14848         (aarch64_simd_imm_zero_p): Delete.
14849         (aarch64_check_zero_based_sve_index_immediate): Declare.
14850         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14851         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14852         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14853         (aarch64_sve_float_mul_immediate_p): Likewise.
14854         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14855         rather than an rtx.
14856         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14857         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14858         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14859         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14860         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14861         (aarch64_regmode_natural_size): Likewise.
14862         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14863         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14864         left one place.
14865         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14866         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14867         for VG and the SVE predicate registers.
14868         (V_ALIASES): Add a "z"-prefixed alias.
14869         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14870         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14871         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14872         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14873         (REG_CLASS_NAMES): Add entries for them.
14874         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14875         and the predicate registers.
14876         (aarch64_sve_vg): Declare.
14877         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14878         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14879         (REGMODE_NATURAL_SIZE): Define.
14880         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14881         SVE macros.
14882         * config/aarch64/aarch64.c: Include cfgrtl.h.
14883         (simd_immediate_info): Add a constructor for series vectors,
14884         and an associated step field.
14885         (aarch64_sve_vg): New variable.
14886         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14887         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14888         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14889         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14890         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14891         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14892         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14893         (aarch64_get_mask_mode): New functions.
14894         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14895         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14896         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14897         predicate modes and predicate registers.  Explicitly restrict
14898         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14899         to store a vector mode if it is recognized by
14900         aarch64_classify_vector_mode.
14901         (aarch64_regmode_natural_size): New function.
14902         (aarch64_hard_regno_caller_save_mode): Return the original mode
14903         for predicates.
14904         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14905         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14906         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14907         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14908         functions.
14909         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14910         does not overlap dest if the function is frame-related.  Handle
14911         SVE constants.
14912         (aarch64_split_add_offset): New function.
14913         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14914         them aarch64_add_offset.
14915         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14916         and update call to aarch64_sub_sp.
14917         (aarch64_add_cfa_expression): New function.
14918         (aarch64_expand_prologue): Pass extra temporary registers to the
14919         functions above.  Handle the case in which we need to emit new
14920         DW_CFA_expressions for registers that were originally saved
14921         relative to the stack pointer, but now have to be expressed
14922         relative to the frame pointer.
14923         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14924         functions above.
14925         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14926         IP0 and IP1 values for SVE frames.
14927         (aarch64_expand_vec_series): New function.
14928         (aarch64_expand_sve_widened_duplicate): Likewise.
14929         (aarch64_expand_sve_const_vector): Likewise.
14930         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14931         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14932         into the register, rather than emitting a SET directly.
14933         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14934         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14935         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14936         (offset_9bit_signed_scaled_p): New functions.
14937         (aarch64_replicate_bitmask_imm): New function.
14938         (aarch64_bitmask_imm): Use it.
14939         (aarch64_cannot_force_const_mem): Reject expressions involving
14940         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14941         (aarch64_classify_index): Handle SVE indices, by requiring
14942         a plain register index with a scale that matches the element size.
14943         (aarch64_classify_address): Handle SVE addresses.  Assert that
14944         the mode of the address is VOIDmode or an integer mode.
14945         Update call to aarch64_classify_symbol.
14946         (aarch64_classify_symbolic_expression): Update call to
14947         aarch64_classify_symbol.
14948         (aarch64_const_vec_all_in_range_p): New function.
14949         (aarch64_print_vector_float_operand): Likewise.
14950         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14951         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14952         and the FP immediates 1.0 and 0.5.
14953         (aarch64_print_address_internal): Handle SVE addresses.
14954         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14955         (aarch64_regno_regclass): Handle predicate registers.
14956         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14957         data modes.
14958         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14959         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14960         (aarch64_convert_sve_vector_bits): New function.
14961         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14962         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14963         rather than an rtx.
14964         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14965         Handle SVE vector and predicate modes.  Accept VL-based constants
14966         that need only one temporary register, and VL offsets that require
14967         no temporary registers.
14968         (aarch64_conditional_register_usage): Mark the predicate registers
14969         as fixed if SVE isn't available.
14970         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14971         Return true for SVE vector and predicate modes.
14972         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14973         rather than an unsigned int.  Handle SVE modes.
14974         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14975         SVE modes.
14976         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14977         if SVE is enabled.
14978         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14979         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14980         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14981         (aarch64_sve_float_mul_immediate_p): New functions.
14982         (aarch64_sve_valid_immediate): New function.
14983         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14984         Explicitly reject structure modes.  Check for INDEX constants.
14985         Handle PTRUE and PFALSE constants.
14986         (aarch64_check_zero_based_sve_index_immediate): New function.
14987         (aarch64_simd_imm_zero_p): Delete.
14988         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14989         vector modes.  Accept constants in the range of CNT[BHWD].
14990         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14991         ask for an Advanced SIMD mode.
14992         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14993         (aarch64_simd_vector_alignment): Handle SVE predicates.
14994         (aarch64_vectorize_preferred_vector_alignment): New function.
14995         (aarch64_simd_vector_alignment_reachable): Use it instead of
14996         the vector size.
14997         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14998         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14999         functions.
15000         (MAX_VECT_LEN): Delete.
15001         (expand_vec_perm_d): Add a vec_flags field.
15002         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
15003         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
15004         (aarch64_evpc_ext): Don't apply a big-endian lane correction
15005         for SVE modes.
15006         (aarch64_evpc_rev): Rename to...
15007         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
15008         (aarch64_evpc_rev_global): New function.
15009         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
15010         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
15011         MAX_VECT_LEN.
15012         (aarch64_evpc_sve_tbl): New function.
15013         (aarch64_expand_vec_perm_const_1): Update after rename of
15014         aarch64_evpc_rev.  Handle SVE permutes too, trying
15015         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
15016         than aarch64_evpc_tbl.
15017         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
15018         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
15019         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
15020         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
15021         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
15022         (aarch64_expand_sve_vcond): New functions.
15023         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
15024         of aarch64_vector_mode_p.
15025         (aarch64_dwarf_poly_indeterminate_value): New function.
15026         (aarch64_compute_pressure_classes): Likewise.
15027         (aarch64_can_change_mode_class): Likewise.
15028         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
15029         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
15030         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
15031         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
15032         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15033         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15034         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15035         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15036         constraints.
15037         (Dn, Dl, Dr): Accept const as well as const_vector.
15038         (Dz): Likewise.  Compare against CONST0_RTX.
15039         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15040         of "vector" where appropriate.
15041         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15042         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15043         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15044         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15045         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15046         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15047         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15048         (v_int_equiv): Extend to SVE modes.
15049         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15050         mode attributes.
15051         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15052         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15053         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15054         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15055         (SVE_COND_FP_CMP): New int iterators.
15056         (perm_hilo): Handle the new unpack unspecs.
15057         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15058         attributes.
15059         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15060         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15061         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15062         (aarch64_equality_operator, aarch64_constant_vector_operand)
15063         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15064         (aarch64_sve_nonimmediate_operand): Likewise.
15065         (aarch64_sve_general_operand): Likewise.
15066         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15067         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15068         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15069         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15070         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15071         (aarch64_sve_float_arith_immediate): Likewise.
15072         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15073         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15074         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15075         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15076         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15077         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15078         (aarch64_sve_float_arith_operand): Likewise.
15079         (aarch64_sve_float_arith_with_sub_operand): Likewise.
15080         (aarch64_sve_float_mul_operand): Likewise.
15081         (aarch64_sve_vec_perm_operand): Likewise.
15082         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15083         (aarch64_mov_operand): Accept const_poly_int and const_vector.
15084         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15085         as well as const_vector.
15086         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15087         in file.  Use CONST0_RTX and CONSTM1_RTX.
15088         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
15089         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15090         Use aarch64_simd_imm_zero.
15091         * config/aarch64/aarch64-sve.md: New file.
15092         * config/aarch64/aarch64.md: Include it.
15093         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15094         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15095         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15096         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15097         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15098         (sve): New attribute.
15099         (enabled): Disable instructions with the sve attribute unless
15100         TARGET_SVE.
15101         (movqi, movhi): Pass CONST_POLY_INT operaneds through
15102         aarch64_expand_mov_immediate.
15103         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15104         CNT[BHSD] immediates.
15105         (movti): Split CONST_POLY_INT moves into two halves.
15106         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15107         Split additions that need a temporary here if the destination
15108         is the stack pointer.
15109         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15110         (*add<mode>3_poly_1): New instruction.
15111         (set_clobber_cc): New expander.
15113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15115         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15116         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
15117         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15118         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15119         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
15120         Change innermode from fixed_mode_size to machine_mode.
15121         (simplify_subreg): Update call accordingly.  Handle a constant-sized
15122         subreg of a variable-length CONST_VECTOR.
15124 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15125             Alan Hayward  <alan.hayward@arm.com>
15126             David Sherwood  <david.sherwood@arm.com>
15128         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15129         (add_offset_to_base): New function, split out from...
15130         (create_mem_ref): ...here.  When handling a scale other than 1,
15131         check first whether the address is valid without the offset.
15132         Add it into the base if so, leaving the index and scale as-is.
15134 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15136         PR c++/83778
15137         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15138         fold_for_warn before checking if arg2 is INTEGER_CST.
15140 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
15142         * config/rs6000/predicates.md (load_multiple_operation): Delete.
15143         (store_multiple_operation): Delete.
15144         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15145         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15146         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15147         guarded by TARGET_STRING.
15148         (rs6000_output_load_multiple): Delete.
15149         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15150         OPTION_MASK_STRING / TARGET_STRING handling.
15151         (print_operand) <'N', 'O'>: Add comment that these are unused now.
15152         (const rs6000_opt_masks) <"string">: Change mask to 0.
15153         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15154         (MASK_STRING): Delete.
15155         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15156         parts.  Simplify.
15157         (load_multiple): Delete.
15158         (*ldmsi8): Delete.
15159         (*ldmsi7): Delete.
15160         (*ldmsi6): Delete.
15161         (*ldmsi5): Delete.
15162         (*ldmsi4): Delete.
15163         (*ldmsi3): Delete.
15164         (store_multiple): Delete.
15165         (*stmsi8): Delete.
15166         (*stmsi7): Delete.
15167         (*stmsi6): Delete.
15168         (*stmsi5): Delete.
15169         (*stmsi4): Delete.
15170         (*stmsi3): Delete.
15171         (movmemsi_8reg): Delete.
15172         (corresponding unnamed define_insn): Delete.
15173         (movmemsi_6reg): Delete.
15174         (corresponding unnamed define_insn): Delete.
15175         (movmemsi_4reg): Delete.
15176         (corresponding unnamed define_insn): Delete.
15177         (movmemsi_2reg): Delete.
15178         (corresponding unnamed define_insn): Delete.
15179         (movmemsi_1reg): Delete.
15180         (corresponding unnamed define_insn): Delete.
15181         * config/rs6000/rs6000.opt (mno-string): New.
15182         (mstring): Replace by deprecation warning stub.
15183         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15185 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15187         * regrename.c (regrename_do_replace): If replacing the same
15188         reg multiple times, try to reuse last created gen_raw_REG.
15190         PR debug/81155
15191         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15192         main to workaround a bug in GDB.
15194 2018-01-12  Tom de Vries  <tom@codesourcery.com>
15196         PR target/83737
15197         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15199 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
15201         PR rtl-optimization/80481
15202         * ira-color.c (get_cap_member): New function.
15203         (allocnos_conflict_by_live_ranges_p): Use it.
15204         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15205         (setup_slot_coalesced_allocno_live_ranges): Ditto.
15207 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
15209         PR target/83628
15210         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15211         (*saddl_se_1): Ditto.
15212         (*ssubsi_1): Ditto.
15213         (*ssubl_se_1): Ditto.
15215 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15217         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15218         rather than wi::to_widest for DR_INITs.
15219         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15220         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15221         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15222         INTEGER_CSTs.
15223         (vect_analyze_group_access_1): Note that here.
15225 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15227         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15228         polynomial type sizes.
15230 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15232         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15233         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15234         (gimple_add_tmp_var): Likewise.
15236 2018-01-12  Martin Liska  <mliska@suse.cz>
15238         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15239         (gimple_alloc_sizes): Likewise.
15240         (dump_gimple_statistics): Use PRIu64 in printf format.
15241         * gimple.h: Change uint64_t to int.
15243 2018-01-12  Martin Liska  <mliska@suse.cz>
15245         * tree-core.h: Use uint64_t instead of int.
15246         * tree.c (tree_node_counts): Likewise.
15247         (tree_node_sizes): Likewise.
15248         (dump_tree_statistics): Use PRIu64 in printf format.
15250 2018-01-12  Martin Liska  <mliska@suse.cz>
15252         * Makefile.in: As qsort_chk is implemented in vec.c, add
15253         vec.o to linkage of gencfn-macros.
15254         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15255         passing the info to record_node_allocation_statistics.
15256         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15257         and pass the info.
15258         * ggc-common.c (struct ggc_usage): Add operator== and use
15259         it in operator< and compare function.
15260         * mem-stats.h (struct mem_usage): Likewise.
15261         * vec.c (struct vec_usage): Remove operator< and compare
15262         function. Can be simply inherited.
15264 2018-01-12  Martin Jambor  <mjambor@suse.cz>
15266         PR target/81616
15267         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15268         * tree-ssa-math-opts.c: Include domwalk.h.
15269         (convert_mult_to_fma_1): New function.
15270         (fma_transformation_info): New type.
15271         (fma_deferring_state): Likewise.
15272         (cancel_fma_deferring): New function.
15273         (result_of_phi): Likewise.
15274         (last_fma_candidate_feeds_initial_phi): Likewise.
15275         (convert_mult_to_fma): Added deferring logic, split actual
15276         transformation to convert_mult_to_fma_1.
15277         (math_opts_dom_walker): New type.
15278         (math_opts_dom_walker::after_dom_children): New method, body moved
15279         here from pass_optimize_widening_mul::execute, added deferring logic
15280         bits.
15281         (pass_optimize_widening_mul::execute): Moved most of code to
15282         math_opts_dom_walker::after_dom_children.
15283         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15284         * config/i386/i386.c (ix86_option_override_internal): Added
15285         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15287 2018-01-12  Richard Biener  <rguenther@suse.de>
15289         PR debug/83157
15290         * dwarf2out.c (gen_variable_die): Do not reset old_die for
15291         inline instance vars.
15293 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
15295         PR target/81819
15296         * config/rx/rx.c (rx_is_restricted_memory_address):
15297         Handle SUBREG case.
15299 2018-01-12  Richard Biener  <rguenther@suse.de>
15301         PR tree-optimization/80846
15302         * target.def (split_reduction): New target hook.
15303         * targhooks.c (default_split_reduction): New function.
15304         * targhooks.h (default_split_reduction): Declare.
15305         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15306         target requests first reduce vectors by combining low and high
15307         parts.
15308         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15309         (get_vectype_for_scalar_type_and_size): Export.
15310         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15311         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15312         * doc/tm.texi: Regenerate.
15313         * config/i386/i386.c (ix86_split_reduction): Implement
15314         TARGET_VECTORIZE_SPLIT_REDUCTION.
15316 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15318         PR target/83368
15319         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15320         in PIC mode except for TARGET_VXWORKS_RTP.
15321         * config/sparc/sparc.c: Include cfgrtl.h.
15322         (TARGET_INIT_PIC_REG): Define.
15323         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15324         (sparc_pic_register_p): New predicate.
15325         (sparc_legitimate_address_p): Use it.
15326         (sparc_legitimize_pic_address): Likewise.
15327         (sparc_delegitimize_address): Likewise.
15328         (sparc_mode_dependent_address_p): Likewise.
15329         (gen_load_pcrel_sym): Remove 4th parameter.
15330         (load_got_register): Adjust call to above.  Remove obsolete stuff.
15331         (sparc_expand_prologue): Do not call load_got_register here.
15332         (sparc_flat_expand_prologue): Likewise.
15333         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15334         (sparc_use_pseudo_pic_reg): New function.
15335         (sparc_init_pic_reg): Likewise.
15336         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15337         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15339 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
15341         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15342         Add item for branch_cost.
15344 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15346         PR rtl-optimization/83565
15347         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15348         not extend the result to a larger mode for rotate operations.
15349         (num_sign_bit_copies1): Likewise.
15351 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15353         PR target/40411
15354         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15355         -symbolic.
15356         Use values-Xc.o for -pedantic.
15357         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15359 2018-01-12  Martin Liska  <mliska@suse.cz>
15361         PR ipa/83054
15362         * ipa-devirt.c (final_warning_record::grow_type_warnings):
15363         New function.
15364         (possible_polymorphic_call_targets): Use it.
15365         (ipa_devirt): Likewise.
15367 2018-01-12  Martin Liska  <mliska@suse.cz>
15369         * profile-count.h (enum profile_quality): Use 0 as invalid
15370         enum value of profile_quality.
15372 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15374         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15375         -mext-string options.
15377 2018-01-12  Richard Biener  <rguenther@suse.de>
15379         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15380         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15381         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15382         Likewise.
15383         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15385 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15387         * configure.ac (--with-long-double-format): Add support for the
15388         configuration option to change the default long double format on
15389         PowerPC systems.
15390         * config.gcc (powerpc*-linux*-*): Likewise.
15391         * configure: Regenerate.
15392         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15393         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15394         used without modification.
15396 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15398         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15399         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15400         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15401         MISC_BUILTIN_SPEC_BARRIER.
15402         (rs6000_init_builtins): Likewise.
15403         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15404         enum value.
15405         (speculation_barrier): New define_insn.
15406         * doc/extend.texi: Document __builtin_speculation_barrier.
15408 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15410         PR target/83203
15411         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15412         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15413         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15414         iterators.
15415         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
15416         integral modes instead of "ss" and "sd".
15417         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15418         vectors with 32-bit and 64-bit elements.
15419         (vecdupssescalarmodesuffix): New mode attribute.
15420         (vec_dup<mode>): Use it.
15422 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
15424         PR target/83330
15425         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15426         frame if argument is passed on stack.
15428 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15430         PR target/82682
15431         * ree.c (combine_reaching_defs): Optimize also
15432         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15433         reg2=any_extend(exp); reg1=reg2;, formatting fix.
15435 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15437         PR middle-end/83189
15438         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15440 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15442         PR middle-end/83718
15443         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15444         after they are computed.
15446 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
15448         PR tree-optimization/83695
15449         * gimple-loop-linterchange.cc
15450         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15451         reset cached scev information after interchange.
15452         (pass_linterchange::execute): Remove call to scev_reset_htab.
15454 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15456         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15457         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15458         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15459         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15460         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15461         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15462         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15463         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15464         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15465         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15466         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15467         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15468         (V_lane_reg): Likewise.
15469         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15470         New define_expand.
15471         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15472         (vfmal_lane_low<mode>_intrinsic,
15473         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15474         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15475         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15476         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15477         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15478         vfmsl_lane_high<mode>_intrinsic): New define_insns.
15480 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15482         * config/arm/arm-cpus.in (fp16fml): New feature.
15483         (ALL_SIMD): Add fp16fml.
15484         (armv8.2-a): Add fp16fml as an option.
15485         (armv8.3-a): Likewise.
15486         (armv8.4-a): Add fp16fml as part of fp16.
15487         * config/arm/arm.h (TARGET_FP16FML): Define.
15488         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15489         when appropriate.
15490         * config/arm/arm-modes.def (V2HF): Define.
15491         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15492         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15493         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15494         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15495         vfmsl_low, vfmsl_high): New set of builtins.
15496         * config/arm/iterators.md (PLUSMINUS): New code iterator.
15497         (vfml_op): New code attribute.
15498         (VFMLHALVES): New int iterator.
15499         (VFML, VFMLSEL): New mode attributes.
15500         (V_reg): Define mapping for V2HF.
15501         (V_hi, V_lo): New mode attributes.
15502         (VF_constraint): Likewise.
15503         (vfml_half, vfml_half_selector): New int attributes.
15504         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15505         define_expand.
15506         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15507         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15508         New define_insn.
15509         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15510         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15511         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15512         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
15513         documentation.
15514         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15515         Document new effective target and option set.
15517 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15519         * config/arm/arm-cpus.in (armv8_4): New feature.
15520         (ARMv8_4a): New fgroup.
15521         (armv8.4-a): New arch.
15522         * config/arm/arm-tables.opt: Regenerate.
15523         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15524         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15525         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15526         Add matching rules for -march=armv8.4-a and extensions.
15527         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15529 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
15531         PR target/81821
15532         * config/rx/rx.md (BW): New mode attribute.
15533         (sync_lock_test_and_setsi): Add mode suffix to insn output.
15535 2018-01-11  Richard Biener  <rguenther@suse.de>
15537         PR tree-optimization/83435
15538         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15539         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15540         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15542 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15543             Alan Hayward  <alan.hayward@arm.com>
15544             David Sherwood  <david.sherwood@arm.com>
15546         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15547         field.
15548         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
15549         (aarch64_print_address_internal): Use it to check for a zero offset.
15551 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15552             Alan Hayward  <alan.hayward@arm.com>
15553             David Sherwood  <david.sherwood@arm.com>
15555         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15556         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15557         Return a poly_int64 rather than a HOST_WIDE_INT.
15558         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15559         rather than a HOST_WIDE_INT.
15560         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15561         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15562         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15563         final_offset from HOST_WIDE_INT to poly_int64.
15564         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15565         to_constant when getting the number of units in an Advanced SIMD
15566         mode.
15567         (aarch64_builtin_vectorized_function): Check for a constant number
15568         of units.
15569         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15570         GET_MODE_SIZE.
15571         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15572         attribute instead of GET_MODE_NUNITS.
15573         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15574         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15575         GET_MODE_SIZE for fixed-size registers.
15576         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15577         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15578         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15579         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15580         (aarch64_print_operand, aarch64_print_address_internal)
15581         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15582         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15583         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15584         Handle polynomial GET_MODE_SIZE.
15585         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15586         wider than SImode without modification.
15587         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15588         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15589         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15590         passing and returning SVE modes.
15591         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15592         rather than GEN_INT.
15593         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15594         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15595         (aarch64_allocate_and_probe_stack_space): Likewise.
15596         (aarch64_layout_frame): Cope with polynomial offsets.
15597         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15598         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15599         polynomial offsets.
15600         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15601         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15602         poly_int64 rather than a HOST_WIDE_INT.
15603         (aarch64_get_separate_components, aarch64_process_components)
15604         (aarch64_expand_prologue, aarch64_expand_epilogue)
15605         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15606         (aarch64_anchor_offset): New function, split out from...
15607         (aarch64_legitimize_address): ...here.
15608         (aarch64_builtin_vectorization_cost): Handle polynomial
15609         TYPE_VECTOR_SUBPARTS.
15610         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15611         GET_MODE_NUNITS.
15612         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15613         number of elements from the PARALLEL rather than the mode.
15614         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15615         rather than GET_MODE_BITSIZE.
15616         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15617         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15618         (aarch64_expand_vec_perm_const_1): Handle polynomial
15619         d->perm.length () and d->perm elements.
15620         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15621         Apply to_constant to d->perm elements.
15622         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15623         polynomial CONST_VECTOR_NUNITS.
15624         (aarch64_move_pointer): Take amount as a poly_int64 rather
15625         than an int.
15626         (aarch64_progress_pointer): Avoid temporary variable.
15627         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15628         the mode attribute instead of GET_MODE.
15630 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15631             Alan Hayward  <alan.hayward@arm.com>
15632             David Sherwood  <david.sherwood@arm.com>
15634         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15635         x exists before using it.
15636         (aarch64_add_constant_internal): Rename to...
15637         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15638         src and dest rtxes.  Handle the case in which they're different,
15639         including when the offset is zero.  Replace scratchreg with an rtx.
15640         Use 2 additions if there is no spare register into which we can
15641         move a 16-bit constant.
15642         (aarch64_add_constant): Delete.
15643         (aarch64_add_offset): Replace reg with separate src and dest
15644         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15645         Use aarch64_add_offset_1.
15646         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15647         an rtx rather than an int.  Take the delta as a poly_int64
15648         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15649         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15650         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15651         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15652         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15653         and aarch64_add_sp.
15654         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15655         aarch64_add_constant.
15657 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15659         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15660         Use scalar_float_mode.
15662 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15664         * config/aarch64/aarch64-simd.md
15665         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15666         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15667         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15668         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15669         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15670         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15671         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15672         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15673         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15674         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15676 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15678         PR target/83514
15679         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15680         targ_options->x_arm_arch_string is non NULL.
15682 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15684         * config/aarch64/aarch64.h
15685         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15687 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15689         PR target/82096
15690         * expmed.c (emit_store_flag_force): Swap if const op0
15691         and change VOIDmode to mode of op0.
15693 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15695         PR rtl-optimization/83761
15696         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15697         than bytes to mode_for_size.
15699 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15701         PR middle-end/83189
15702         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15703         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15704         profile.
15706 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15708         PR middle-end/83575
15709         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15710         when in layout mode.
15711         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15712         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15713         partition fixup.
15715 2018-01-10  Michael Collison  <michael.collison@arm.com>
15717         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15718         * config/aarch64/aarch64-option-extension.def: Add
15719         AARCH64_OPT_EXTENSION of 'fp16fml'.
15720         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15721         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15722         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15723         * config/aarch64/constraints.md (Ui7): New constraint.
15724         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15725         (VFMLA_SEL_W): Ditto.
15726         (f16quad): Ditto.
15727         (f16mac1): Ditto.
15728         (VFMLA16_LOW): New int iterator.
15729         (VFMLA16_HIGH): Ditto.
15730         (UNSPEC_FMLAL): New unspec.
15731         (UNSPEC_FMLSL): Ditto.
15732         (UNSPEC_FMLAL2): Ditto.
15733         (UNSPEC_FMLSL2): Ditto.
15734         (f16mac): New code attribute.
15735         * config/aarch64/aarch64-simd-builtins.def
15736         (aarch64_fmlal_lowv2sf): Ditto.
15737         (aarch64_fmlsl_lowv2sf): Ditto.
15738         (aarch64_fmlalq_lowv4sf): Ditto.
15739         (aarch64_fmlslq_lowv4sf): Ditto.
15740         (aarch64_fmlal_highv2sf): Ditto.
15741         (aarch64_fmlsl_highv2sf): Ditto.
15742         (aarch64_fmlalq_highv4sf): Ditto.
15743         (aarch64_fmlslq_highv4sf): Ditto.
15744         (aarch64_fmlal_lane_lowv2sf): Ditto.
15745         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15746         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15747         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15748         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15749         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15750         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15751         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15752         (aarch64_fmlal_lane_highv2sf): Ditto.
15753         (aarch64_fmlsl_lane_highv2sf): Ditto.
15754         (aarch64_fmlal_laneq_highv2sf): Ditto.
15755         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15756         (aarch64_fmlalq_lane_highv4sf): Ditto.
15757         (aarch64_fmlsl_lane_highv4sf): Ditto.
15758         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15759         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15760         * config/aarch64/aarch64-simd.md:
15761         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15762         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15763         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15764         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15765         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15766         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15767         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15768         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15769         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15770         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15771         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15772         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15773         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15774         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15775         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15776         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15777         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15778         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15779         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15780         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15781         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15782         (vfmlsl_low_u32): Ditto.
15783         (vfmlalq_low_u32): Ditto.
15784         (vfmlslq_low_u32): Ditto.
15785         (vfmlal_high_u32): Ditto.
15786         (vfmlsl_high_u32): Ditto.
15787         (vfmlalq_high_u32): Ditto.
15788         (vfmlslq_high_u32): Ditto.
15789         (vfmlal_lane_low_u32): Ditto.
15790         (vfmlsl_lane_low_u32): Ditto.
15791         (vfmlal_laneq_low_u32): Ditto.
15792         (vfmlsl_laneq_low_u32): Ditto.
15793         (vfmlalq_lane_low_u32): Ditto.
15794         (vfmlslq_lane_low_u32): Ditto.
15795         (vfmlalq_laneq_low_u32): Ditto.
15796         (vfmlslq_laneq_low_u32): Ditto.
15797         (vfmlal_lane_high_u32): Ditto.
15798         (vfmlsl_lane_high_u32): Ditto.
15799         (vfmlal_laneq_high_u32): Ditto.
15800         (vfmlsl_laneq_high_u32): Ditto.
15801         (vfmlalq_lane_high_u32): Ditto.
15802         (vfmlslq_lane_high_u32): Ditto.
15803         (vfmlalq_laneq_high_u32): Ditto.
15804         (vfmlslq_laneq_high_u32): Ditto.
15805         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15806         (AARCH64_FL_FOR_ARCH8_4): New.
15807         (AARCH64_ISA_F16FML): New ISA flag.
15808         (TARGET_F16FML): New feature flag for fp16fml.
15809         (doc/invoke.texi): Document new fp16fml option.
15811 2018-01-10  Michael Collison  <michael.collison@arm.com>
15813         * config/aarch64/aarch64-builtins.c:
15814         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15815         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15816         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15817         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15818         (AARCH64_ISA_SHA3): New ISA flag.
15819         (TARGET_SHA3): New feature flag for sha3.
15820         * config/aarch64/iterators.md (sha512_op): New int attribute.
15821         (CRYPTO_SHA512): New int iterator.
15822         (UNSPEC_SHA512H): New unspec.
15823         (UNSPEC_SHA512H2): Ditto.
15824         (UNSPEC_SHA512SU0): Ditto.
15825         (UNSPEC_SHA512SU1): Ditto.
15826         * config/aarch64/aarch64-simd-builtins.def
15827         (aarch64_crypto_sha512hqv2di): New builtin.
15828         (aarch64_crypto_sha512h2qv2di): Ditto.
15829         (aarch64_crypto_sha512su0qv2di): Ditto.
15830         (aarch64_crypto_sha512su1qv2di): Ditto.
15831         (aarch64_eor3qv8hi): Ditto.
15832         (aarch64_rax1qv2di): Ditto.
15833         (aarch64_xarqv2di): Ditto.
15834         (aarch64_bcaxqv8hi): Ditto.
15835         * config/aarch64/aarch64-simd.md:
15836         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15837         (aarch64_crypto_sha512su0qv2di): Ditto.
15838         (aarch64_crypto_sha512su1qv2di): Ditto.
15839         (aarch64_eor3qv8hi): Ditto.
15840         (aarch64_rax1qv2di): Ditto.
15841         (aarch64_xarqv2di): Ditto.
15842         (aarch64_bcaxqv8hi): Ditto.
15843         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15844         (vsha512h2q_u64): Ditto.
15845         (vsha512su0q_u64): Ditto.
15846         (vsha512su1q_u64): Ditto.
15847         (veor3q_u16): Ditto.
15848         (vrax1q_u64): Ditto.
15849         (vxarq_u64): Ditto.
15850         (vbcaxq_u16): Ditto.
15851         * config/arm/types.md (crypto_sha512): New type attribute.
15852         (crypto_sha3): Ditto.
15853         (doc/invoke.texi): Document new sha3 option.
15855 2018-01-10  Michael Collison  <michael.collison@arm.com>
15857         * config/aarch64/aarch64-builtins.c:
15858         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15859         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15860         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15861         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15862         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15863         (AARCH64_ISA_SM4): New ISA flag.
15864         (TARGET_SM4): New feature flag for sm4.
15865         * config/aarch64/aarch64-simd-builtins.def
15866         (aarch64_sm3ss1qv4si): Ditto.
15867         (aarch64_sm3tt1aq4si): Ditto.
15868         (aarch64_sm3tt1bq4si): Ditto.
15869         (aarch64_sm3tt2aq4si): Ditto.
15870         (aarch64_sm3tt2bq4si): Ditto.
15871         (aarch64_sm3partw1qv4si): Ditto.
15872         (aarch64_sm3partw2qv4si): Ditto.
15873         (aarch64_sm4eqv4si): Ditto.
15874         (aarch64_sm4ekeyqv4si): Ditto.
15875         * config/aarch64/aarch64-simd.md:
15876         (aarch64_sm3ss1qv4si): Ditto.
15877         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15878         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15879         (aarch64_sm4eqv4si): Ditto.
15880         (aarch64_sm4ekeyqv4si): Ditto.
15881         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15882         (sm3part_op): Ditto.
15883         (CRYPTO_SM3TT): Ditto.
15884         (CRYPTO_SM3PART): Ditto.
15885         (UNSPEC_SM3SS1): New unspec.
15886         (UNSPEC_SM3TT1A): Ditto.
15887         (UNSPEC_SM3TT1B): Ditto.
15888         (UNSPEC_SM3TT2A): Ditto.
15889         (UNSPEC_SM3TT2B): Ditto.
15890         (UNSPEC_SM3PARTW1): Ditto.
15891         (UNSPEC_SM3PARTW2): Ditto.
15892         (UNSPEC_SM4E): Ditto.
15893         (UNSPEC_SM4EKEY): Ditto.
15894         * config/aarch64/constraints.md (Ui2): New constraint.
15895         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15896         * config/arm/types.md (crypto_sm3): New type attribute.
15897         (crypto_sm4): Ditto.
15898         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15899         (vsm3tt1aq_u32): Ditto.
15900         (vsm3tt1bq_u32): Ditto.
15901         (vsm3tt2aq_u32): Ditto.
15902         (vsm3tt2bq_u32): Ditto.
15903         (vsm3partw1q_u32): Ditto.
15904         (vsm3partw2q_u32): Ditto.
15905         (vsm4eq_u32): Ditto.
15906         (vsm4ekeyq_u32): Ditto.
15907         (doc/invoke.texi): Document new sm4 option.
15909 2018-01-10  Michael Collison  <michael.collison@arm.com>
15911         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15912         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15913         (AARCH64_FL_FOR_ARCH8_4): New.
15914         (AARCH64_FL_V8_4): New flag.
15915         (doc/invoke.texi): Document new armv8.4-a option.
15917 2018-01-10  Michael Collison  <michael.collison@arm.com>
15919         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15920         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15921         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15922         * config/aarch64/aarch64-option-extension.def: Add
15923         AARCH64_OPT_EXTENSION of 'sha2'.
15924         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15925         (crypto): Disable sha2 and aes if crypto disabled.
15926         (crypto): Enable aes and sha2 if enabled.
15927         (simd): Disable sha2 and aes if simd disabled.
15928         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15929         New flags.
15930         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15931         (TARGET_SHA2): New feature flag for sha2.
15932         (TARGET_AES): New feature flag for aes.
15933         * config/aarch64/aarch64-simd.md:
15934         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15935         conditional on TARGET_AES.
15936         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15937         (aarch64_crypto_sha1hsi): Make pattern conditional
15938         on TARGET_SHA2.
15939         (aarch64_crypto_sha1hv4si): Ditto.
15940         (aarch64_be_crypto_sha1hv4si): Ditto.
15941         (aarch64_crypto_sha1su1v4si): Ditto.
15942         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15943         (aarch64_crypto_sha1su0v4si): Ditto.
15944         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15945         (aarch64_crypto_sha256su0v4si): Ditto.
15946         (aarch64_crypto_sha256su1v4si): Ditto.
15947         (doc/invoke.texi): Document new aes and sha2 options.
15949 2018-01-10  Martin Sebor  <msebor@redhat.com>
15951         PR tree-optimization/83781
15952         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15953         as string arrays.
15955 2018-01-11  Martin Sebor  <msebor@gmail.com>
15956             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15958         PR tree-optimization/83501
15959         PR tree-optimization/81703
15961         * tree-ssa-strlen.c (get_string_cst): Rename...
15962         (get_string_len): ...to this.  Handle global constants.
15963         (handle_char_store): Adjust.
15965 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15966             Jim Wilson  <jimw@sifive.com>
15968         * config/riscv/riscv-protos.h (riscv_output_return): New.
15969         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15970         (riscv_attribute_table, riscv_output_return),
15971         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15972         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15973         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15974         function.
15975         (riscv_expand_prologue): Add early return for naked function.
15976         (riscv_expand_epilogue): Likewise.
15977         (riscv_function_ok_for_sibcall): Return false for naked function.
15978         (riscv_set_current_function): New.
15979         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15980         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15981         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15982         * doc/extend.texi (RISC-V Function Attributes): New.
15984 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15986         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15987         check for 128-bit long double before checking TCmode.
15988         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15989         128-bit long doubles before checking TFmode or TCmode.
15990         (FLOAT128_IBM_P): Likewise.
15992 2018-01-10  Martin Sebor  <msebor@redhat.com>
15994         PR tree-optimization/83671
15995         * builtins.c (c_strlen): Unconditionally return zero for the empty
15996         string.
15997         Use -Warray-bounds for warnings.
15998         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15999         for non-constant array indices with COMPONENT_REF, arrays of
16000         arrays, and pointers to arrays.
16001         (gimple_fold_builtin_strlen): Determine and set length range for
16002         non-constant character arrays.
16004 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
16006         PR middle-end/81897
16007         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
16008         empty blocks.
16010 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
16012         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
16014 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16016         PR target/83399
16017         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
16018         VECTOR_MEM_ALTIVEC_OR_VSX_P.
16019         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
16020         indexed_or_indirect_operand predicate.
16021         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
16022         (*vsx_le_perm_load_v8hi): Likewise.
16023         (*vsx_le_perm_load_v16qi): Likewise.
16024         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
16025         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
16026         (*vsx_le_perm_store_v8hi): Likewise.
16027         (*vsx_le_perm_store_v16qi): Likewise.
16028         (eight unnamed splitters): Likewise.
16030 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16032         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16033         * config/rs6000/emmintrin.h: Likewise.
16034         * config/rs6000/mmintrin.h: Likewise.
16035         * config/rs6000/xmmintrin.h: Likewise.
16037 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
16039         PR c++/43486
16040         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16041         "public_flag".
16042         * tree.c (tree_nop_conversion): Return true for location wrapper
16043         nodes.
16044         (maybe_wrap_with_location): New function.
16045         (selftest::check_strip_nops): New function.
16046         (selftest::test_location_wrappers): New function.
16047         (selftest::tree_c_tests): Call it.
16048         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16049         (maybe_wrap_with_location): New decl.
16050         (EXPR_LOCATION_WRAPPER_P): New macro.
16051         (location_wrapper_p): New inline function.
16052         (tree_strip_any_location_wrapper): New inline function.
16054 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
16056         PR target/83735
16057         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16058         stack_realign_offset for the largest alignment of stack slot
16059         actually used.
16060         (ix86_find_max_used_stack_alignment): New function.
16061         (ix86_finalize_stack_frame_flags): Use it.  Set
16062         max_used_stack_alignment if we don't realign stack.
16063         * config/i386/i386.h (machine_function): Add
16064         max_used_stack_alignment.
16066 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
16068         * config/arm/arm.opt (-mbranch-cost): New option.
16069         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16070         account.
16072 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
16074         PR target/83629
16075         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16076         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16078 2018-01-10  Richard Biener  <rguenther@suse.de>
16080         PR debug/83765
16081         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16082         early out so it also covers the case where we have a non-NULL
16083         origin.
16085 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16087         PR tree-optimization/83753
16088         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16089         for non-strided grouped accesses if the number of elements is 1.
16091 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16093         PR target/81616
16094         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16095         * i386.h (TARGET_USE_GATHER): Define.
16096         * x86-tune.def (X86_TUNE_USE_GATHER): New.
16098 2018-01-10  Martin Liska  <mliska@suse.cz>
16100         PR bootstrap/82831
16101         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16102         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16103         partitioning.
16104         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16105         CLEANUP_NO_PARTITIONING is not set.
16107 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16109         * doc/rtl.texi: Remove documentation of (const ...) wrappers
16110         for vectors, as a partial revert of r254296.
16111         * rtl.h (const_vec_p): Delete.
16112         (const_vec_duplicate_p): Don't test for vector CONSTs.
16113         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16114         * expmed.c (make_tree): Likewise.
16116         Revert:
16117         * common.md (E, F): Use CONSTANT_P instead of checking for
16118         CONST_VECTOR.
16119         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16120         checking for CONST_VECTOR.
16122 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16124         PR middle-end/83575
16125         * predict.c (force_edge_cold): Handle in more sane way edges
16126         with no prediction.
16128 2018-01-09  Carl Love  <cel@us.ibm.com>
16130         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16131         V4SI, V4SF types.
16132         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16133         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16134         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16135         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
16136         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16137         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
16138         * config/rs6000/rs6000-protos.h: Add extern defition for
16139         rs6000_generate_float2_double_code.
16140         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16141         function.
16142         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16143         (float2_v2df): Add define_expand.
16145 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
16147         PR target/83628
16148         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16149         op_mode in the force_to_mode call.
16151 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16153         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16154         instead of checking each element individually.
16155         (aarch64_evpc_uzp): Likewise.
16156         (aarch64_evpc_zip): Likewise.
16157         (aarch64_evpc_ext): Likewise.
16158         (aarch64_evpc_rev): Likewise.
16159         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16160         instead of checking each element individually.  Return true without
16161         generating rtl if
16162         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16163         whether all selected elements come from the same input, instead of
16164         checking each element individually.  Remove calls to gen_rtx_REG,
16165         start_sequence and end_sequence and instead assert that no rtl is
16166         generated.
16168 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16170         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16171         order of HIGH and CONST checks.
16173 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16175         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16176         if the destination isn't an SSA_NAME.
16178 2018-01-09  Richard Biener  <rguenther@suse.de>
16180         PR tree-optimization/83668
16181         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16182         move prologue...
16183         (canonicalize_loop_form): ... here, renamed from ...
16184         (canonicalize_loop_closed_ssa_form): ... this and amended to
16185         swap successor edges for loop exit blocks to make us use
16186         the RPO order we need for initial schedule generation.
16188 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
16190         PR tree-optimization/64811
16191         * match.pd: When optimizing comparisons with Inf, avoid
16192         introducing or losing exceptions from comparisons with NaN.
16194 2018-01-09  Martin Liska  <mliska@suse.cz>
16196         PR sanitizer/82517
16197         * asan.c (shadow_mem_size): Add gcc_assert.
16199 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
16201         Don't save registers in main().
16203         PR target/83738
16204         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16205         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16206         * config/avr/avr.c (avr_set_current_function): Don't error if
16207         naked, OS_task or OS_main are specified at the same time.
16208         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16209         OS_main.
16210         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16211         attribute.
16212         * common/config/avr/avr-common.c (avr_option_optimization_table):
16213         Switch on -mmain-is-OS_task for optimizing compilations.
16215 2018-01-09  Richard Biener  <rguenther@suse.de>
16217         PR tree-optimization/83572
16218         * graphite.c: Include cfganal.h.
16219         (graphite_transform_loops): Connect infinite loops to exit
16220         and remove fake edges at the end.
16222 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16224         * ipa-inline.c (edge_badness): Revert accidental checkin.
16226 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16228         PR ipa/80763
16229         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16230         symbols; not inline clones.
16232 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
16234         PR target/83507
16235         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16236         hard registers.  Formatting fixes.
16238         PR preprocessor/83722
16239         * gcc.c (try_generate_repro): Pass
16240         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16241         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16242         do_report_bug.
16244 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
16245             Kito Cheng  <kito.cheng@gmail.com>
16247         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16248         (riscv_leaf_function_p): Delete.
16249         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16251 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16253         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16254         function.
16255         (do_ifelse): New function.
16256         (do_isel): New function.
16257         (do_sub3): New function.
16258         (do_add3): New function.
16259         (do_load_mask_compare): New function.
16260         (do_overlap_load_compare): New function.
16261         (expand_compare_loop): New function.
16262         (expand_block_compare): Call expand_compare_loop() when appropriate.
16263         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16264         option description.
16265         (-mblock-compare-inline-loop-limit): New option.
16267 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16269         PR target/83677
16270         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16271         Reverse order of second and third operands in first alternative.
16272         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16273         of first and second elements in UNSPEC_VPERMR vector.
16274         (altivec_expand_vec_perm_le): Likewise.
16276 2018-01-08  Jeff Law  <law@redhat.com>
16278         PR rtl-optimizatin/81308
16279         * tree-switch-conversion.c (cfg_altered): New file scoped static.
16280         (process_switch): If group_case_labels makes a change, then set
16281         cfg_altered.
16282         (pass_convert_switch::execute): If a switch is converted, then
16283         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
16285         PR rtl-optimization/81308
16286         * recog.c (split_all_insns): Conditionally cleanup the CFG after
16287         splitting insns.
16289 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
16291         PR target/83663 - Revert r255946
16292         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16293         generation for cases where splatting a value is not useful.
16294         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16295         across a vec_duplicate and a paradoxical subreg forming a vector
16296         mode to a vec_concat.
16298 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16300         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16301         -march=armv8.3-a variants.
16302         * config/arm/t-multilib: Likewise.
16303         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
16305 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16307         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16308         to generate rtl.
16309         (cceq_ior_compare_complement): Give it a name so I can use it, and
16310         change boolean_or_operator predicate to boolean_operator so it can
16311         be used to generate a crand.
16312         (eqne): New code iterator.
16313         (bd/bd_neg): New code_attrs.
16314         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16315         a single define_insn.
16316         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16317         decrement (bdnzt/bdnzf/bdzt/bdzf).
16318         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16319         with the new names of the branch decrement patterns, and added the
16320         names of the branch decrement conditional patterns.
16322 2018-01-08  Richard Biener  <rguenther@suse.de>
16324         PR tree-optimization/83563
16325         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16326         cache.
16328 2018-01-08  Richard Biener  <rguenther@suse.de>
16330         PR middle-end/83713
16331         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16333 2018-01-08  Richard Biener  <rguenther@suse.de>
16335         PR tree-optimization/83685
16336         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16337         references to abnormals.
16339 2018-01-08  Richard Biener  <rguenther@suse.de>
16341         PR lto/83719
16342         * dwarf2out.c (output_indirect_strings): Handle empty
16343         skeleton_debug_str_hash.
16344         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16346 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16348         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16349         (emit_store_direct): Likewise.
16350         (arc_trampoline_adjust_address): Likewise.
16351         (arc_asm_trampoline_template): New function.
16352         (arc_initialize_trampoline): Use asm_trampoline_template.
16353         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16354         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16355         * config/arc/arc.md (flush_icache): Delete pattern.
16357 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16359         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16360         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16361         munaligned-access.
16363 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16365         PR target/83681
16366         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16367         by not USED_FOR_TARGET.
16368         (make_pass_resolve_sw_modes): Likewise.
16370 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16372         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16373         USED_FOR_TARGET.
16375 2018-01-08  Richard Biener  <rguenther@suse.de>
16377         PR middle-end/83580
16378         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16380 2018-01-08  Richard Biener  <rguenther@suse.de>
16382         PR middle-end/83517
16383         * match.pd ((t * 2) / 2) -> t): Add missing :c.
16385 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
16387         PR middle-end/81897
16388         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16389         basic blocks with a small number of successors.
16390         (convert_control_dep_chain_into_preds): Improve handling of
16391         forwarder blocks.
16392         (dump_predicates): Split apart into...
16393         (dump_pred_chain): ...here...
16394         (dump_pred_info): ...and here.
16395         (can_one_predicate_be_invalidated_p): Add debugging printfs.
16396         (can_chain_union_be_invalidated_p): Improve check for invalidation
16397         of paths.
16398         (uninit_uses_cannot_happen): Avoid unnecessary if
16399         convert_control_dep_chain_into_preds yielded nothing.
16401 2018-01-06  Martin Sebor  <msebor@redhat.com>
16403         PR tree-optimization/83640
16404         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16405         subtracting negative offset from size.
16406         (builtin_access::overlap): Adjust offset bounds of the access to fall
16407         within the size of the object if possible.
16409 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
16411         PR rtl-optimization/83699
16412         * expmed.c (extract_bit_field_1): Restrict the vector usage of
16413         extract_bit_field_as_subreg to cases in which the extracted
16414         value is also a vector.
16416         * lra-constraints.c (process_alt_operands): Test for the equivalence
16417         substitutions when detecting a possible reload cycle.
16419 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
16421         PR debug/83480
16422         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16423         by default if flag_selective_schedling{,2}.  Formatting fixes.
16425         PR rtl-optimization/83682
16426         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16427         if it has non-VECTOR_MODE element mode.
16428         (vec_duplicate_p): Likewise.
16430         PR middle-end/83694
16431         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16432         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16434 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16436         PR target/83604
16437         * config/i386/i386-builtin.def
16438         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16439         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16440         Require also OPTION_MASK_ISA_AVX512F in addition to
16441         OPTION_MASK_ISA_GFNI.
16442         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16443         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16444         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16445         to OPTION_MASK_ISA_GFNI.
16446         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16447         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16448         OPTION_MASK_ISA_AVX512BW.
16449         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16450         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16451         addition to OPTION_MASK_ISA_GFNI.
16452         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16453         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16454         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16455         to OPTION_MASK_ISA_GFNI.
16456         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16457         a requirement for all ISAs rather than any of them with a few
16458         exceptions.
16459         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16460         processing.
16461         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16462         bitmasks to be enabled with 3 exceptions, instead of requiring any
16463         enabled ISA with lots of exceptions.
16464         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16465         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16466         Change avx512bw in isa attribute to avx512f.
16467         * config/i386/sgxintrin.h: Add license boilerplate.
16468         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
16469         to __AVX512F__ and __AVX512VL to __AVX512VL__.
16470         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16471         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16472         defined.
16473         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16474         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16475         temporarily sse2 rather than sse if not enabled already.
16477         PR target/83604
16478         * config/i386/sse.md (VI248_VLBW): Rename to ...
16479         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
16480         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16481         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16482         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16483         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16484         mode iterator instead of VI248_VLBW.
16486 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
16488         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16489         (record_modified): Skip clobbers; add debug output.
16490         (param_change_prob): Use sreal frequencies.
16492 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16494         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16495         punt for user-aligned variables.
16497 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16499         * tree-chrec.c (chrec_contains_symbols): Return true for
16500         POLY_INT_CST.
16502 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
16504         PR target/82439
16505         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16506         of (x|y) == x for BICS pattern.
16508 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16510         PR tree-optimization/83605
16511         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16512         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16513         can throw.
16515 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16517         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16518         * config/epiphany/rtems.h: New file.
16520 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16521             Uros Bizjak  <ubizjak@gmail.com>
16523         PR target/83554
16524         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16525         QIreg_operand instead of register_operand predicate.
16526         * config/i386/i386.c (ix86_rop_should_change_byte_p,
16527         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16528         comments instead of -fmitigate[-_]rop.
16530 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16532         PR bootstrap/81926
16533         * cgraphunit.c (symbol_table::compile): Switch to text_section
16534         before calling assembly_start debug hook.
16535         * run-rtl-passes.c (run_rtl_passes): Likewise.
16536         Include output.h.
16538 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16540         * tree-vrp.c (extract_range_from_binary_expr_1): Check
16541         range_int_cst_p rather than !symbolic_range_p before calling
16542         extract_range_from_multiplicative_op_1.
16544 2018-01-04  Jeff Law  <law@redhat.com>
16546         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16547         redundant test in assertion.
16549 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16551         * doc/rtl.texi: Document machine_mode wrapper classes.
16553 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16555         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16556         using tree_to_uhwi.
16558 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16560         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16561         the VEC_PERM_EXPR fold to fail.
16563 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16565         PR debug/83585
16566         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16567         to switched_sections.
16569 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16571         PR target/83680
16572         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16573         test for d.testing.
16575 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16577         PR target/83387
16578         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16579         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16581 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16583         PR debug/83666
16584         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16585         is BLKmode and bitpos not zero or mode change is needed.
16587 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16589         PR target/83675
16590         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16591         TARGET_VIS2.
16593 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16595         PR target/83628
16596         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16597         instead of MULT rtx.  Update all corresponding splitters.
16598         (*saddl_se): Ditto.
16599         (*ssub<modesuffix>): Ditto.
16600         (*ssubl_se): Ditto.
16601         (*cmp_sadd_di): Update split patterns.
16602         (*cmp_sadd_si): Ditto.
16603         (*cmp_sadd_sidi): Ditto.
16604         (*cmp_ssub_di): Ditto.
16605         (*cmp_ssub_si): Ditto.
16606         (*cmp_ssub_sidi): Ditto.
16607         * config/alpha/predicates.md (const23_operand): New predicate.
16608         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16609         Look for ASHIFT, not MULT inner operand.
16610         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16612 2018-01-04  Martin Liska  <mliska@suse.cz>
16614         PR gcov-profile/83669
16615         * gcov.c (output_intermediate_file): Add version to intermediate
16616         gcov file.
16617         * doc/gcov.texi: Document new field 'version' in intermediate
16618         file format. Fix location of '-k' option of gcov command.
16620 2018-01-04  Martin Liska  <mliska@suse.cz>
16622         PR ipa/82352
16623         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16625 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16627         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16629 2018-01-03  Martin Sebor  <msebor@redhat.com>
16631         PR tree-optimization/83655
16632         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16633         checking calls with invalid arguments.
16635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16637         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16638         (vectorizable_mask_load_store): Delete.
16639         (vectorizable_call): Return false for masked loads and stores.
16640         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16641         instead of gimple_assign_rhs1.
16642         (vectorizable_load): Handle IFN_MASK_LOAD.
16643         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16647         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16648         split out from..,
16649         (vectorizable_mask_load_store): ...here.
16650         (vectorizable_load): ...and here.
16652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16654         * tree-vect-stmts.c (vect_build_all_ones_mask)
16655         (vect_build_zero_merge_argument): New functions, split out from...
16656         (vectorizable_load): ...here.
16658 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16660         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16661         split out from...
16662         (vectorizable_mask_load_store): ...here.
16663         (vectorizable_store): ...and here.
16665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16667         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16668         split out from...
16669         (vectorizable_mask_load_store): ...here.
16671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16673         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16674         (vect_model_store_cost): Take a vec_load_store_type instead of a
16675         vect_def_type.
16676         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16677         (vect_model_store_cost): Take a vec_load_store_type instead of a
16678         vect_def_type.
16679         (vectorizable_mask_load_store): Update accordingly.
16680         (vectorizable_store): Likewise.
16681         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16685         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16686         IFN_MASK_LOAD calls here rather than...
16687         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16689 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16690             Alan Hayward  <alan.hayward@arm.com>
16691             David Sherwood  <david.sherwood@arm.com>
16693         * expmed.c (extract_bit_field_1): For vector extracts,
16694         fall back to extract_bit_field_as_subreg if vec_extract
16695         isn't available.
16697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16698             Alan Hayward  <alan.hayward@arm.com>
16699             David Sherwood  <david.sherwood@arm.com>
16701         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16702         they are variable or constant sized.
16703         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16704         slots for constant-sized data.
16706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16707             Alan Hayward  <alan.hayward@arm.com>
16708             David Sherwood  <david.sherwood@arm.com>
16710         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16711         handling COND_EXPRs with boolean comparisons, try to find a better
16712         basis for the mask type than the boolean itself.
16714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16716         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16717         is calculated and how it can be overridden.
16718         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16719         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16720         if defined.
16721         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16722         if nonzero.
16724 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16725             Alan Hayward  <alan.hayward@arm.com>
16726             David Sherwood  <david.sherwood@arm.com>
16728         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16729         Remove the mode argument.
16730         (aarch64_simd_valid_immediate): Remove the mode and inverse
16731         arguments.
16732         * config/aarch64/iterators.md (bitsize): New iterator.
16733         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16734         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16735         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16736         aarch64_simd_valid_immediate.
16737         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16738         (aarch64_reg_or_bic_imm): Likewise.
16739         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16740         with an insn_type enum and msl with a modifier_type enum.
16741         Replace element_width with a scalar_mode.  Change the shift
16742         to unsigned int.  Add constructors for scalar_float_mode and
16743         scalar_int_mode elements.
16744         (aarch64_vect_float_const_representable_p): Delete.
16745         (aarch64_can_const_movi_rtx_p)
16746         (aarch64_simd_scalar_immediate_valid_for_move)
16747         (aarch64_simd_make_constant): Update call to
16748         aarch64_simd_valid_immediate.
16749         (aarch64_advsimd_valid_immediate_hs): New function.
16750         (aarch64_advsimd_valid_immediate): Likewise.
16751         (aarch64_simd_valid_immediate): Remove mode and inverse
16752         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16753         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16754         and aarch64_float_const_representable_p on the result.
16755         (aarch64_output_simd_mov_immediate): Remove mode argument.
16756         Update call to aarch64_simd_valid_immediate and use of
16757         simd_immediate_info.
16758         (aarch64_output_scalar_simd_mov_immediate): Update call
16759         accordingly.
16761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16762             Alan Hayward  <alan.hayward@arm.com>
16763             David Sherwood  <david.sherwood@arm.com>
16765         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16766         (mode_nunits): Likewise CONST_MODE_NUNITS.
16767         * machmode.def (ADJUST_NUNITS): Document.
16768         * genmodes.c (mode_data::need_nunits_adj): New field.
16769         (blank_mode): Update accordingly.
16770         (adj_nunits): New variable.
16771         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16772         parameter.
16773         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16774         listed in adj_nunits.
16775         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16776         listed in adj_nunits.  Don't emit case statements for such modes.
16777         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16778         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16779         nothing if adj_nunits is nonnull.
16780         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16781         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16782         (emit_mode_fbit): Update use of print_maybe_const_decl.
16783         (emit_move_size): Likewise.  Treat the array as non-const
16784         if adj_nunits.
16785         (emit_mode_adjustments): Handle adj_nunits.
16787 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16789         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16790         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16791         (VECTOR_MODES): Use it.
16792         (make_vector_modes): Take the prefix as an argument.
16794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16795             Alan Hayward  <alan.hayward@arm.com>
16796             David Sherwood  <david.sherwood@arm.com>
16798         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16799         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16800         for MODE_VECTOR_BOOL.
16801         * machmode.def (VECTOR_BOOL_MODE): Document.
16802         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16803         (make_vector_bool_mode): New function.
16804         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16805         MODE_VECTOR_BOOL.
16806         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16807         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16808         Likewise.
16809         * stor-layout.c (int_mode_for_mode): Likewise.
16810         * tree.c (build_vector_type_for_mode): Likewise.
16811         * varasm.c (output_constant_pool_2): Likewise.
16812         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16813         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16814         for MODE_VECTOR_BOOL.
16815         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16816         of mode class checks.
16817         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16818         instead of a list of mode class checks.
16819         (expand_vector_scalar_condition): Likewise.
16820         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16823             Alan Hayward  <alan.hayward@arm.com>
16824             David Sherwood  <david.sherwood@arm.com>
16826         * machmode.h (mode_size): Change from unsigned short to
16827         poly_uint16_pod.
16828         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16829         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16830         or if measurement_type is not polynomial.
16831         (fixed_size_mode::includes_p): Check for constant-sized modes.
16832         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16833         return a poly_uint16 rather than an unsigned short.
16834         (emit_mode_size): Change the type of mode_size from unsigned short
16835         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16836         (emit_mode_adjustments): Cope with polynomial vector sizes.
16837         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16838         for GET_MODE_SIZE.
16839         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16840         for GET_MODE_SIZE.
16841         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16842         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16843         * caller-save.c (setup_save_areas): Likewise.
16844         (replace_reg_with_saved_mem): Likewise.
16845         * calls.c (emit_library_call_value_1): Likewise.
16846         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16847         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16848         (gen_lowpart_for_combine): Likewise.
16849         * convert.c (convert_to_integer_1): Likewise.
16850         * cse.c (equiv_constant, cse_insn): Likewise.
16851         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16852         (cselib_subst_to_values): Likewise.
16853         * dce.c (word_dce_process_block): Likewise.
16854         * df-problems.c (df_word_lr_mark_ref): Likewise.
16855         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16856         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16857         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16858         (rtl_for_decl_location): Likewise.
16859         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16860         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16861         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16862         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16863         (expand_expr_real_1): Likewise.
16864         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16865         (pad_below): Likewise.
16866         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16867         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16868         * ira.c (get_subreg_tracking_sizes): Likewise.
16869         * ira-build.c (ira_create_allocno_objects): Likewise.
16870         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16871         (ira_sort_regnos_for_alter_reg): Likewise.
16872         * ira-costs.c (record_operand_costs): Likewise.
16873         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16874         (resolve_simple_move): Likewise.
16875         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16876         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16877         (lra_constraints): Likewise.
16878         (CONST_POOL_OK_P): Reject variable-sized modes.
16879         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16880         (add_pseudo_to_slot, lra_spill): Likewise.
16881         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16882         * optabs-query.c (get_best_extraction_insn): Likewise.
16883         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16884         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16885         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16886         * recog.c (offsettable_address_addr_space_p): Likewise.
16887         * regcprop.c (maybe_mode_change): Likewise.
16888         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16889         * regrename.c (build_def_use): Likewise.
16890         * regstat.c (dump_reg_info): Likewise.
16891         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16892         (find_reloads, find_reloads_subreg_address): Likewise.
16893         * reload1.c (eliminate_regs_1): Likewise.
16894         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16895         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16896         (simplify_binary_operation_1, simplify_subreg): Likewise.
16897         * targhooks.c (default_function_arg_padding): Likewise.
16898         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16899         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16900         (verify_gimple_assign_ternary): Likewise.
16901         * tree-inline.c (estimate_move_cost): Likewise.
16902         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16903         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16904         (get_address_cost_ainc): Likewise.
16905         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16906         (vect_supportable_dr_alignment): Likewise.
16907         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16908         (vectorizable_reduction): Likewise.
16909         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16910         (vectorizable_operation, vectorizable_load): Likewise.
16911         * tree.c (build_same_sized_truth_vector_type): Likewise.
16912         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16913         * var-tracking.c (emit_note_insn_var_location): Likewise.
16914         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16915         (ADDR_VEC_ALIGN): Likewise.
16917 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16918             Alan Hayward  <alan.hayward@arm.com>
16919             David Sherwood  <david.sherwood@arm.com>
16921         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16922         unsigned short.
16923         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16924         or if measurement_type is polynomial.
16925         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16926         * combine.c (make_extraction): Likewise.
16927         * dse.c (find_shift_sequence): Likewise.
16928         * dwarf2out.c (mem_loc_descriptor): Likewise.
16929         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16930         (extract_bit_field, extract_low_bits): Likewise.
16931         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16932         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16933         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16934         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16935         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16936         * reload.c (find_reloads): Likewise.
16937         * reload1.c (alter_reg): Likewise.
16938         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16939         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16940         * tree-if-conv.c (predicate_mem_writes): Likewise.
16941         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16942         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16943         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16944         * valtrack.c (dead_debug_insert_temp): Likewise.
16945         * varasm.c (mergeable_constant_section): Likewise.
16946         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16949             Alan Hayward  <alan.hayward@arm.com>
16950             David Sherwood  <david.sherwood@arm.com>
16952         * expr.c (expand_assignment): Cope with polynomial mode sizes
16953         when assigning to a CONCAT.
16955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16956             Alan Hayward  <alan.hayward@arm.com>
16957             David Sherwood  <david.sherwood@arm.com>
16959         * machmode.h (mode_precision): Change from unsigned short to
16960         poly_uint16_pod.
16961         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16962         short.
16963         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16964         or if measurement_type is not polynomial.
16965         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16966         in which the mode is already known to be a scalar_int_mode.
16967         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16968         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16969         initializer.
16970         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16971         for GET_MODE_PRECISION.
16972         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16973         for GET_MODE_PRECISION.
16974         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16975         as polynomial.
16976         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16977         (expand_field_assignment, make_extraction): Likewise.
16978         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16979         (get_last_value): Likewise.
16980         * convert.c (convert_to_integer_1): Likewise.
16981         * cse.c (cse_insn): Likewise.
16982         * expr.c (expand_expr_real_1): Likewise.
16983         * lra-constraints.c (simplify_operand_subreg): Likewise.
16984         * optabs-query.c (can_atomic_load_p): Likewise.
16985         * optabs.c (expand_atomic_load): Likewise.
16986         (expand_atomic_store): Likewise.
16987         * ree.c (combine_reaching_defs): Likewise.
16988         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16989         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16990         * tree.h (type_has_mode_precision_p): Likewise.
16991         * ubsan.c (instrument_si_overflow): Likewise.
16993 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16994             Alan Hayward  <alan.hayward@arm.com>
16995             David Sherwood  <david.sherwood@arm.com>
16997         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16998         polynomial numbers of units.
16999         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
17000         (valid_vector_subparts_p): New function.
17001         (build_vector_type): Remove temporary shim and take the number
17002         of units as a poly_uint64 rather than an int.
17003         (build_opaque_vector_type): Take the number of units as a
17004         poly_uint64 rather than an int.
17005         * tree.c (build_vector_from_ctor): Handle polynomial
17006         TYPE_VECTOR_SUBPARTS.
17007         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
17008         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
17009         (build_vector_from_val): If the number of units is variable,
17010         use build_vec_duplicate_cst for constant operands and
17011         VEC_DUPLICATE_EXPR otherwise.
17012         (make_vector_type): Remove temporary is_constant ().
17013         (build_vector_type, build_opaque_vector_type): Take the number of
17014         units as a poly_uint64 rather than an int.
17015         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
17016         VECTOR_CST_NELTS.
17017         * cfgexpand.c (expand_debug_expr): Likewise.
17018         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
17019         (store_constructor, expand_expr_real_1): Likewise.
17020         (const_scalar_mask_from_tree): Likewise.
17021         * fold-const-call.c (fold_const_reduction): Likewise.
17022         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
17023         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
17024         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
17025         (fold_relational_const): Likewise.
17026         (native_interpret_vector): Likewise.  Change the size from an
17027         int to an unsigned int.
17028         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
17029         TYPE_VECTOR_SUBPARTS.
17030         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
17031         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
17032         duplicating a non-constant operand into a variable-length vector.
17033         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17034         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17035         * ipa-icf.c (sem_variable::equals): Likewise.
17036         * match.pd: Likewise.
17037         * omp-simd-clone.c (simd_clone_subparts): Likewise.
17038         * print-tree.c (print_node): Likewise.
17039         * stor-layout.c (layout_type): Likewise.
17040         * targhooks.c (default_builtin_vectorization_cost): Likewise.
17041         * tree-cfg.c (verify_gimple_comparison): Likewise.
17042         (verify_gimple_assign_binary): Likewise.
17043         (verify_gimple_assign_ternary): Likewise.
17044         (verify_gimple_assign_single): Likewise.
17045         * tree-pretty-print.c (dump_generic_node): Likewise.
17046         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17047         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17048         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17049         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17050         (vect_shift_permute_load_chain): Likewise.
17051         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17052         (expand_vector_condition, optimize_vector_constructor): Likewise.
17053         (lower_vec_perm, get_compute_type): Likewise.
17054         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17055         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17056         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17057         (vect_recog_mask_conversion_pattern): Likewise.
17058         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17059         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17060         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17061         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17062         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17063         (vectorizable_shift, vectorizable_operation, vectorizable_store)
17064         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17065         (supportable_widening_operation): Likewise.
17066         (supportable_narrowing_operation): Likewise.
17067         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17068         Likewise.
17069         * varasm.c (output_constant): Likewise.
17071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17072             Alan Hayward  <alan.hayward@arm.com>
17073             David Sherwood  <david.sherwood@arm.com>
17075         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17076         so that both the length == 3 and length != 3 cases set up their
17077         own permute vectors.  Add comments explaining why we know the
17078         number of elements is constant.
17079         (vect_permute_load_chain): Likewise.
17081 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17082             Alan Hayward  <alan.hayward@arm.com>
17083             David Sherwood  <david.sherwood@arm.com>
17085         * machmode.h (mode_nunits): Change from unsigned char to
17086         poly_uint16_pod.
17087         (ONLY_FIXED_SIZE_MODES): New macro.
17088         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17089         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17090         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17091         New typedefs.
17092         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17093         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17094         or if measurement_type is not polynomial.
17095         * genmodes.c (ZERO_COEFFS): New macro.
17096         (emit_mode_nunits_inline): Make mode_nunits_inline return a
17097         poly_uint16.
17098         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17099         Use ZERO_COEFFS when emitting initializers.
17100         * data-streamer.h (bp_pack_poly_value): New function.
17101         (bp_unpack_poly_value): Likewise.
17102         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17103         for GET_MODE_NUNITS.
17104         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17105         for GET_MODE_NUNITS.
17106         * tree.c (make_vector_type): Remove temporary shim and make
17107         the real function take the number of units as a poly_uint64
17108         rather than an int.
17109         (build_vector_type_for_mode): Handle polynomial nunits.
17110         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17111         * emit-rtl.c (const_vec_series_p_1): Likewise.
17112         (gen_rtx_CONST_VECTOR): Likewise.
17113         * fold-const.c (test_vec_duplicate_folding): Likewise.
17114         * genrecog.c (validate_pattern): Likewise.
17115         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17116         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17117         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17118         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17119         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17120         * rtlanal.c (subreg_get_info): Likewise.
17121         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17122         (vect_grouped_load_supported): Likewise.
17123         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17124         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17125         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17126         (simplify_const_unary_operation, simplify_binary_operation_1)
17127         (simplify_const_binary_operation, simplify_ternary_operation)
17128         (test_vector_ops_duplicate, test_vector_ops): Likewise.
17129         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17130         instead of CONST_VECTOR_NUNITS.
17131         * varasm.c (output_constant_pool_2): Likewise.
17132         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17133         explicit-encoded elements in the XVEC for variable-length vectors.
17135 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17137         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17139 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17140             Alan Hayward  <alan.hayward@arm.com>
17141             David Sherwood  <david.sherwood@arm.com>
17143         * coretypes.h (fixed_size_mode): Declare.
17144         (fixed_size_mode_pod): New typedef.
17145         * builtins.h (target_builtins::x_apply_args_mode)
17146         (target_builtins::x_apply_result_mode): Change type to
17147         fixed_size_mode_pod.
17148         * builtins.c (apply_args_size, apply_result_size, result_vector)
17149         (expand_builtin_apply_args_1, expand_builtin_apply)
17150         (expand_builtin_return): Update accordingly.
17152 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17154         * cse.c (hash_rtx_cb): Hash only the encoded elements.
17155         * cselib.c (cselib_hash_rtx): Likewise.
17156         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17157         CONST_VECTOR encoding.
17159 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17160             Jeff Law  <law@redhat.com>
17162         PR target/83641
17163         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17164         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17165         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17166         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17168         PR target/83641
17169         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17170         explicitly probe *sp in a noreturn function if there were any callee
17171         register saves or frame pointer is needed.
17173 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17175         PR debug/83621
17176         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17177         BLKmode for ternary, binary or unary expressions.
17179         PR debug/83645
17180         * var-tracking.c (delete_vta_debug_insn): New inline function.
17181         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17182         insns from get_insns () to NULL instead of each bb separately.
17183         Use delete_vta_debug_insn.  No longer static.
17184         (vt_debug_insns_local, variable_tracking_main_1): Adjust
17185         delete_vta_debug_insns callers.
17186         * rtl.h (delete_vta_debug_insns): Declare.
17187         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17188         instead of variable_tracking_main.
17190 2018-01-03  Martin Sebor  <msebor@redhat.com>
17192         PR tree-optimization/83603
17193         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17194         arguments past the endof the argument list in functions declared
17195         without a prototype.
17196         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17197         Avoid checking when arguments are null.
17199 2018-01-03  Martin Sebor  <msebor@redhat.com>
17201         PR c/83559
17202         * doc/extend.texi (attribute const): Fix a typo.
17203         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17204         issuing -Wsuggest-attribute for void functions.
17206 2018-01-03  Martin Sebor  <msebor@redhat.com>
17208         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17209         offset_int::from instead of wide_int::to_shwi.
17210         (maybe_diag_overlap): Remove assertion.
17211         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17212         * gimple-ssa-sprintf.c (format_directive): Same.
17213         (parse_directive): Same.
17214         (sprintf_dom_walker::compute_format_length): Same.
17215         (try_substitute_return_value): Same.
17217 2018-01-03  Jeff Law  <law@redhat.com>
17219         PR middle-end/83654
17220         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17221         non-constant residual for zero at runtime and avoid probing in
17222         that case.  Reorganize code for trailing problem to mirror handling
17223         of the residual.
17225 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17227         PR tree-optimization/83501
17228         * tree-ssa-strlen.c (get_string_cst): New.
17229         (handle_char_store): Call get_string_cst.
17231 2018-01-03  Martin Liska  <mliska@suse.cz>
17233         PR tree-optimization/83593
17234         * tree-ssa-strlen.c: Include tree-cfg.h.
17235         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17236         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17237         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17238         to false.
17239         (strlen_dom_walker::before_dom_children): Call
17240         gimple_purge_dead_eh_edges. Dump tranformation with details
17241         dump flags.
17242         (strlen_dom_walker::before_dom_children): Update call by adding
17243         new argument cleanup_eh.
17244         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17246 2018-01-03  Martin Liska  <mliska@suse.cz>
17248         PR ipa/83549
17249         * cif-code.def (VARIADIC_THUNK): New enum value.
17250         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17251         thunks.
17253 2018-01-03  Jan Beulich  <jbeulich@suse.com>
17255         * sse.md (mov<mode>_internal): Tighten condition for when to use
17256         vmovdqu<ssescalarsize> for TI and OI modes.
17258 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17260         Update copyright years.
17262 2018-01-03  Martin Liska  <mliska@suse.cz>
17264         PR ipa/83594
17265         * ipa-visibility.c (function_and_variable_visibility): Skip
17266         functions with noipa attribure.
17268 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17270         * gcc.c (process_command): Update copyright notice dates.
17271         * gcov-dump.c (print_version): Ditto.
17272         * gcov.c (print_version): Ditto.
17273         * gcov-tool.c (print_version): Ditto.
17274         * gengtype.c (create_file): Ditto.
17275         * doc/cpp.texi: Bump @copying's copyright year.
17276         * doc/cppinternals.texi: Ditto.
17277         * doc/gcc.texi: Ditto.
17278         * doc/gccint.texi: Ditto.
17279         * doc/gcov.texi: Ditto.
17280         * doc/install.texi: Ditto.
17281         * doc/invoke.texi: Ditto.
17283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17285         * vector-builder.h (vector_builder::m_full_nelts): Change from
17286         unsigned int to poly_uint64.
17287         (vector_builder::full_nelts): Update prototype accordingly.
17288         (vector_builder::new_vector): Likewise.
17289         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17290         (vector_builder::operator ==): Likewise.
17291         (vector_builder::finalize): Likewise.
17292         * int-vector-builder.h (int_vector_builder::int_vector_builder):
17293         Take the number of elements as a poly_uint64 rather than an
17294         unsigned int.
17295         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17296         from unsigned int to poly_uint64.
17297         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17298         (vec_perm_indices::new_vector): Likewise.
17299         (vec_perm_indices::length): Likewise.
17300         (vec_perm_indices::nelts_per_input): Likewise.
17301         (vec_perm_indices::input_nelts): Likewise.
17302         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17303         number of elements per input as a poly_uint64 rather than an
17304         unsigned int.  Use the original encoding for variable-length
17305         vectors, rather than clamping each individual element.
17306         For the second and subsequent elements in each pattern,
17307         clamp the step and base before clamping their sum.
17308         (vec_perm_indices::series_p): Handle polynomial element counts.
17309         (vec_perm_indices::all_in_range_p): Likewise.
17310         (vec_perm_indices_to_tree): Likewise.
17311         (vec_perm_indices_to_rtx): Likewise.
17312         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17313         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17314         (tree_vector_builder::new_binary_operation): Handle polynomial
17315         element counts.  Return false if we need to know the number
17316         of elements at compile time.
17317         * fold-const.c (fold_vec_perm): Punt if the number of elements
17318         isn't known at compile time.
17320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17322         * vec-perm-indices.h (vec_perm_builder): Change element type
17323         from HOST_WIDE_INT to poly_int64.
17324         (vec_perm_indices::element_type): Update accordingly.
17325         (vec_perm_indices::clamp): Handle polynomial element_types.
17326         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17327         (vec_perm_indices::all_in_range_p): Likewise.
17328         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17329         than shwi trees.
17330         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17331         polynomial vec_perm_indices element types.
17332         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17333         * fold-const.c (fold_vec_perm): Likewise.
17334         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17335         * tree-vect-generic.c (lower_vec_perm): Likewise.
17336         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17337         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17338         element type to HOST_WIDE_INT.
17340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17341             Alan Hayward  <alan.hayward@arm.com>
17342             David Sherwood  <david.sherwood@arm.com>
17344         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17345         rather than an int.  Use plus_constant.
17346         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17347         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17350             Alan Hayward  <alan.hayward@arm.com>
17351             David Sherwood  <david.sherwood@arm.com>
17353         * calls.c (emit_call_1, expand_call): Change struct_value_size from
17354         a HOST_WIDE_INT to a poly_int64.
17356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17357             Alan Hayward  <alan.hayward@arm.com>
17358             David Sherwood  <david.sherwood@arm.com>
17360         * calls.c (load_register_parameters): Cope with polynomial
17361         mode sizes.  Require a constant size for BLKmode parameters
17362         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
17363         forces a parameter to be padded at the lsb end in order to
17364         fill a complete number of words, require the parameter size
17365         to be ordered wrt UNITS_PER_WORD.
17367 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17368             Alan Hayward  <alan.hayward@arm.com>
17369             David Sherwood  <david.sherwood@arm.com>
17371         * reload1.c (spill_stack_slot_width): Change element type
17372         from unsigned int to poly_uint64_pod.
17373         (alter_reg): Treat mode sizes as polynomial.
17375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17376             Alan Hayward  <alan.hayward@arm.com>
17377             David Sherwood  <david.sherwood@arm.com>
17379         * reload.c (complex_word_subreg_p): New function.
17380         (reload_inner_reg_of_subreg, push_reload): Use it.
17382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17383             Alan Hayward  <alan.hayward@arm.com>
17384             David Sherwood  <david.sherwood@arm.com>
17386         * lra-constraints.c (process_alt_operands): Reject matched
17387         operands whose sizes aren't ordered.
17388         (match_reload): Refer to this check here.
17390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17391             Alan Hayward  <alan.hayward@arm.com>
17392             David Sherwood  <david.sherwood@arm.com>
17394         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17395         that the mode size is in the set {1, 2, 4, 8, 16}.
17397 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17398             Alan Hayward  <alan.hayward@arm.com>
17399             David Sherwood  <david.sherwood@arm.com>
17401         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17402         Use plus_constant instead of gen_rtx_PLUS.
17404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17405             Alan Hayward  <alan.hayward@arm.com>
17406             David Sherwood  <david.sherwood@arm.com>
17408         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17409         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17410         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17411         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17412         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17413         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17414         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17415         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17416         * config/i386/i386.c (ix86_push_rounding): ...this new function.
17417         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17418         a poly_int64.
17419         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17420         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17421         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17422         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17423         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17424         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17425         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17426         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17427         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17428         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17429         function.
17430         * expr.c (emit_move_resolve_push): Treat the input and result
17431         of PUSH_ROUNDING as a poly_int64.
17432         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17433         (emit_push_insn): Likewise.
17434         * lra-eliminations.c (mark_not_eliminable): Likewise.
17435         * recog.c (push_operand): Likewise.
17436         * reload1.c (elimination_effects): Likewise.
17437         * rtlanal.c (nonzero_bits1): Likewise.
17438         * calls.c (store_one_arg): Likewise.  Require the padding to be
17439         known at compile time.
17441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17442             Alan Hayward  <alan.hayward@arm.com>
17443             David Sherwood  <david.sherwood@arm.com>
17445         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17446         Use plus_constant instead of gen_rtx_PLUS.
17448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17449             Alan Hayward  <alan.hayward@arm.com>
17450             David Sherwood  <david.sherwood@arm.com>
17452         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17453         rather than an int.
17455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17456             Alan Hayward  <alan.hayward@arm.com>
17457             David Sherwood  <david.sherwood@arm.com>
17459         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17460         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17461         via stack temporaries.  Treat the mode size as polynomial too.
17463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17464             Alan Hayward  <alan.hayward@arm.com>
17465             David Sherwood  <david.sherwood@arm.com>
17467         * expr.c (expand_expr_real_2): When handling conversions involving
17468         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17469         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
17470         as a poly_uint64 too.
17472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17473             Alan Hayward  <alan.hayward@arm.com>
17474             David Sherwood  <david.sherwood@arm.com>
17476         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17479             Alan Hayward  <alan.hayward@arm.com>
17480             David Sherwood  <david.sherwood@arm.com>
17482         * combine.c (can_change_dest_mode): Handle polynomial
17483         REGMODE_NATURAL_SIZE.
17484         * expmed.c (store_bit_field_1): Likewise.
17485         * expr.c (store_constructor): Likewise.
17486         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17487         and polynomial REGMODE_NATURAL_SIZE.
17488         (gen_lowpart_common): Likewise.
17489         * reginfo.c (record_subregs_of_mode): Likewise.
17490         * rtlanal.c (read_modify_subreg_p): Likewise.
17492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17493             Alan Hayward  <alan.hayward@arm.com>
17494             David Sherwood  <david.sherwood@arm.com>
17496         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17497         numbers of elements.
17499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17500             Alan Hayward  <alan.hayward@arm.com>
17501             David Sherwood  <david.sherwood@arm.com>
17503         * match.pd: Cope with polynomial numbers of vector elements.
17505 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17506             Alan Hayward  <alan.hayward@arm.com>
17507             David Sherwood  <david.sherwood@arm.com>
17509         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17510         in a POINTER_PLUS_EXPR.
17512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17513             Alan Hayward  <alan.hayward@arm.com>
17514             David Sherwood  <david.sherwood@arm.com>
17516         * omp-simd-clone.c (simd_clone_subparts): New function.
17517         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17518         (ipa_simd_modify_function_body): Likewise.
17520 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17521             Alan Hayward  <alan.hayward@arm.com>
17522             David Sherwood  <david.sherwood@arm.com>
17524         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17525         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17526         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17527         (expand_vector_condition, vector_element): Likewise.
17528         (subparts_gt): New function.
17529         (get_compute_type): Use subparts_gt.
17530         (count_type_subparts): Delete.
17531         (expand_vector_operations_1): Use subparts_gt instead of
17532         count_type_subparts.
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         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17539         (vect_compile_time_alias): ...this new function.  Do the calculation
17540         on poly_ints rather than trees.
17541         (vect_prune_runtime_alias_test_list): Update call accordingly.
17543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17544             Alan Hayward  <alan.hayward@arm.com>
17545             David Sherwood  <david.sherwood@arm.com>
17547         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17548         numbers of units.
17549         (vect_schedule_slp_instance): Likewise.
17551 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17552             Alan Hayward  <alan.hayward@arm.com>
17553             David Sherwood  <david.sherwood@arm.com>
17555         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17556         constant and extern definitions for variable-length vectors.
17557         (vect_get_constant_vectors): Note that the number of units
17558         is known to be constant.
17560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17561             Alan Hayward  <alan.hayward@arm.com>
17562             David Sherwood  <david.sherwood@arm.com>
17564         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17565         of units as polynomial.  Choose between WIDE and NARROW based
17566         on multiple_p.
17568 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17569             Alan Hayward  <alan.hayward@arm.com>
17570             David Sherwood  <david.sherwood@arm.com>
17572         * tree-vect-stmts.c (simd_clone_subparts): New function.
17573         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17576             Alan Hayward  <alan.hayward@arm.com>
17577             David Sherwood  <david.sherwood@arm.com>
17579         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17580         vectors as polynomial.  Use build_index_vector for
17581         IFN_GOMP_SIMD_LANE.
17583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17584             Alan Hayward  <alan.hayward@arm.com>
17585             David Sherwood  <david.sherwood@arm.com>
17587         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17588         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17589         for variable-length vectors.
17590         (vectorizable_mask_load_store): Treat the number of units as
17591         polynomial, asserting that it is constant if the condition has
17592         already been enforced.
17593         (vectorizable_store, vectorizable_load): Likewise.
17595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17596             Alan Hayward  <alan.hayward@arm.com>
17597             David Sherwood  <david.sherwood@arm.com>
17599         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17600         of units as polynomial.  Punt if we can't tell at compile time
17601         which vector contains the final result.
17603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17604             Alan Hayward  <alan.hayward@arm.com>
17605             David Sherwood  <david.sherwood@arm.com>
17607         * tree-vect-loop.c (vectorizable_induction): Treat the number
17608         of units as polynomial.  Punt on SLP inductions.  Use an integer
17609         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17610         cast of such a series for variable-length floating-point
17611         reductions.
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.h (build_index_vector): Declare.
17618         * tree.c (build_index_vector): New function.
17619         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17620         of units as polynomial, forcibly converting it to a constant if
17621         vectorizable_reduction has already enforced the condition.
17622         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17623         to create a {1,2,3,...} vector.
17624         (vectorizable_reduction): Treat the number of units as polynomial.
17625         Choose vectype_in based on the largest scalar element size rather
17626         than the smallest number of units.  Enforce the restrictions
17627         relied on above.
17629 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17630             Alan Hayward  <alan.hayward@arm.com>
17631             David Sherwood  <david.sherwood@arm.com>
17633         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17634         number of units as polynomial.
17636 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17637             Alan Hayward  <alan.hayward@arm.com>
17638             David Sherwood  <david.sherwood@arm.com>
17640         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17641         * target.def (autovectorize_vector_sizes): Return the vector sizes
17642         by pointer, using vector_sizes rather than a bitmask.
17643         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17644         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17645         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17646         Likewise.
17647         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17648         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17649         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17650         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17651         * omp-general.c (omp_max_vf): Likewise.
17652         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17653         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17654         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17655         * tree-vect-slp.c (vect_slp_bb): Likewise.
17656         * doc/tm.texi: Regenerate.
17657         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17658         to a poly_uint64.
17659         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17660         the vector size as a poly_uint64 rather than an unsigned int.
17661         (current_vector_size): Change from an unsigned int to a poly_uint64.
17662         (get_vectype_for_scalar_type): Update accordingly.
17663         * tree.h (build_truth_vector_type): Take the size and number of
17664         units as a poly_uint64 rather than an unsigned int.
17665         (build_vector_type): Add a temporary overload that takes
17666         the number of units as a poly_uint64 rather than an unsigned int.
17667         * tree.c (make_vector_type): Likewise.
17668         (build_truth_vector_type): Take the number of units as a poly_uint64
17669         rather than an unsigned int.
17671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17672             Alan Hayward  <alan.hayward@arm.com>
17673             David Sherwood  <david.sherwood@arm.com>
17675         * target.def (get_mask_mode): Take the number of units and length
17676         as poly_uint64s rather than unsigned ints.
17677         * targhooks.h (default_get_mask_mode): Update accordingly.
17678         * targhooks.c (default_get_mask_mode): Likewise.
17679         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17680         * doc/tm.texi: Regenerate.
17682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17683             Alan Hayward  <alan.hayward@arm.com>
17684             David Sherwood  <david.sherwood@arm.com>
17686         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17687         * omp-general.c (omp_max_vf): Likewise.
17688         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17689         (expand_omp_simd): Handle polynomial safelen.
17690         * omp-low.c (omplow_simd_context): Add a default constructor.
17691         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17692         (lower_rec_simd_input_clauses): Update accordingly.
17693         (lower_rec_input_clauses): Likewise.
17695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17696             Alan Hayward  <alan.hayward@arm.com>
17697             David Sherwood  <david.sherwood@arm.com>
17699         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17700         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17701         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17702         (vect_analyze_slp_cost): Likewise.
17703         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17704         (vect_model_load_cost): Likewise.
17706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17707             Alan Hayward  <alan.hayward@arm.com>
17708             David Sherwood  <david.sherwood@arm.com>
17710         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17711         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17712         from an unsigned int * to a poly_uint64_pod *.
17713         (calculate_unrolling_factor): New function.
17714         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17716 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17717             Alan Hayward  <alan.hayward@arm.com>
17718             David Sherwood  <david.sherwood@arm.com>
17720         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17721         from an unsigned int to a poly_uint64.
17722         (_loop_vec_info::slp_unrolling_factor): Likewise.
17723         (_loop_vec_info::vectorization_factor): Change from an int
17724         to a poly_uint64.
17725         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17726         (vect_get_num_vectors): New function.
17727         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17728         (vect_get_num_copies): Use vect_get_num_vectors.
17729         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17730         to an unsigned int *.
17731         (vect_analyze_data_refs): Change min_vf from an int * to a
17732         poly_uint64 *.
17733         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17734         than an unsigned HOST_WIDE_INT.
17735         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17736         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17737         to an unsigned int *.
17738         (vect_analyze_data_ref_dependences): Likewise.
17739         (vect_compute_data_ref_alignment): Handle polynomial vf.
17740         (vect_enhance_data_refs_alignment): Likewise.
17741         (vect_prune_runtime_alias_test_list): Likewise.
17742         (vect_shift_permute_load_chain): Likewise.
17743         (vect_supportable_dr_alignment): Likewise.
17744         (dependence_distance_ge_vf): Take the vectorization factor as a
17745         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17746         (vect_analyze_data_refs): Change min_vf from an int * to a
17747         poly_uint64 *.
17748         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17749         vfm1 as a poly_uint64 rather than an int.  Make the same change
17750         for the returned bound_scalar.
17751         (vect_gen_vector_loop_niters): Handle polynomial vf.
17752         (vect_do_peeling): Likewise.  Update call to
17753         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17754         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17755         be constant.
17756         * tree-vect-loop.c (vect_determine_vectorization_factor)
17757         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17758         (vect_get_known_peeling_cost): Likewise.
17759         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17760         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17761         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17762         updating the upper bounds of the loop.
17763         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17764         rather than an int.
17765         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17766         polynomial unroll factors.
17767         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17768         (vect_make_slp_decision): Likewise.
17769         (vect_supported_load_permutation_p): Likewise, and polynomial
17770         vf too.
17771         (vect_analyze_slp_cost): Handle polynomial vf.
17772         (vect_slp_analyze_node_operations): Likewise.
17773         (vect_slp_analyze_bb_1): Likewise.
17774         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17775         than an unsigned HOST_WIDE_INT.
17776         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17777         (vectorizable_load): Handle polynomial vf.
17778         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17779         a poly_uint64.
17780         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17783             Alan Hayward  <alan.hayward@arm.com>
17784             David Sherwood  <david.sherwood@arm.com>
17786         * match.pd: Handle bit operations involving three constants
17787         and try to fold one pair.
17789 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17791         * tree-vect-loop-manip.c: Include gimple-fold.h.
17792         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17793         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17794         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17795         Add a path that uses a step of VF instead of 1, but disable it
17796         for now.
17797         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17798         and niters_no_overflow parameters.  Update calls to
17799         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17800         Create a new SSA name if the latter choses to use a ste other
17801         than zero, and return it via niters_vector_mult_vf_var.
17802         * tree-vect-loop.c (vect_transform_loop): Update calls to
17803         vect_do_peeling, vect_gen_vector_loop_niters and
17804         slpeel_make_loop_iterate_ntimes.
17805         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17806         (vect_gen_vector_loop_niters): Update declarations after above changes.
17808 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17810         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17811         128-bit round to integer instructions.
17812         (ceil<mode>2): Likewise.
17813         (btrunc<mode>2): Likewise.
17814         (round<mode>2): Likewise.
17816 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17818         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17819         unaligned VSX load/store on P8/P9.
17820         (expand_block_clear): Allow the use of unaligned VSX
17821         load/store on P8/P9.
17823 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17825         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17826         New function.
17827         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17828         swap associated with both a load and a store.
17830 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17832         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17833         * config/riscv/riscv.md (clear_cache): Use it.
17835 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17837         * web.c: Remove out-of-date comment.
17839 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17841         * expr.c (fixup_args_size_notes): Check that any existing
17842         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17843         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17844         (emit_single_push_insn): ...here.
17846 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17848         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17849         (const_vector_encoded_nelts): New function.
17850         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17851         (const_vector_int_elt, const_vector_elt): Declare.
17852         * emit-rtl.c (const_vector_int_elt_1): New function.
17853         (const_vector_elt): Likewise.
17854         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17855         of CONST_VECTOR_ELT.
17857 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17859         * expr.c: Include rtx-vector-builder.h.
17860         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17861         directly on the tree encoding.
17862         (const_vector_from_tree): Likewise.
17863         * optabs.c: Include rtx-vector-builder.h.
17864         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17865         sequence of "u" values.
17866         * vec-perm-indices.c: Include rtx-vector-builder.h.
17867         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17868         directly on the vec_perm_indices encoding.
17870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17872         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17873         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17874         * rtx-vector-builder.h: New file.
17875         * rtx-vector-builder.c: Likewise.
17876         * rtl.h (rtx_def::u2): Add a const_vector field.
17877         (CONST_VECTOR_NPATTERNS): New macro.
17878         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17879         (CONST_VECTOR_DUPLICATE_P): Likewise.
17880         (CONST_VECTOR_STEPPED_P): Likewise.
17881         (CONST_VECTOR_ENCODED_ELT): Likewise.
17882         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17883         (unwrap_const_vec_duplicate): Likewise.
17884         (const_vec_series_p): Check for a non-duplicated vector encoding.
17885         Say that the function only returns true for integer vectors.
17886         * emit-rtl.c: Include rtx-vector-builder.h.
17887         (gen_const_vec_duplicate_1): Delete.
17888         (gen_const_vector): Call gen_const_vec_duplicate instead of
17889         gen_const_vec_duplicate_1.
17890         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17891         (gen_const_vec_duplicate): Use rtx_vector_builder.
17892         (gen_const_vec_series): Likewise.
17893         (gen_rtx_CONST_VECTOR): Likewise.
17894         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17895         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17896         Build a new vector rather than modifying a CONST_VECTOR in-place.
17897         (handle_special_swappables): Update call accordingly.
17898         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17899         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17900         Build a new vector rather than modifying a CONST_VECTOR in-place.
17901         (handle_special_swappables): Update call accordingly.
17903 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17905         * simplify-rtx.c (simplify_const_binary_operation): Use
17906         CONST_VECTOR_ELT instead of XVECEXP.
17908 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17910         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17911         the selector elements to be different from the data elements
17912         if the selector is a VECTOR_CST.
17913         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17914         ssizetype for the selector.
17916 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17918         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17919         before testing each element individually.
17920         * tree-vect-generic.c (lower_vec_perm): Likewise.
17922 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17924         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17925         * selftest-run-tests.c (selftest::run_tests): Call it.
17926         * vector-builder.h (vector_builder::operator ==): New function.
17927         (vector_builder::operator !=): Likewise.
17928         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17929         (vec_perm_indices::all_from_input_p): New function.
17930         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17931         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17932         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17933         instead of reading the VECTOR_CST directly.  Detect whether both
17934         vector inputs are the same before constructing the vec_perm_indices,
17935         and update the number of inputs argument accordingly.  Use the
17936         utility functions added above.  Only construct sel2 if we need to.
17938 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17940         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17941         the broadcast of the low byte.
17942         (expand_mult_highpart): Use an explicit encoding for the permutes.
17943         * optabs-query.c (can_mult_highpart_p): Likewise.
17944         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17945         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17946         (vectorizable_bswap): Likewise.
17947         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17948         explicit encoding for the power-of-2 permutes.
17949         (vect_permute_store_chain): Likewise.
17950         (vect_grouped_load_supported): Likewise.
17951         (vect_permute_load_chain): Likewise.
17953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17955         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17956         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17957         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17958         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17959         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17960         (vect_gen_perm_mask_any): Likewise.
17962 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17964         * int-vector-builder.h: New file.
17965         * vec-perm-indices.h: Include int-vector-builder.h.
17966         (vec_perm_indices): Redefine as an int_vector_builder.
17967         (auto_vec_perm_indices): Delete.
17968         (vec_perm_builder): Redefine as a stand-alone class.
17969         (vec_perm_indices::vec_perm_indices): New function.
17970         (vec_perm_indices::clamp): Likewise.
17971         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17972         (vec_perm_indices::new_vector): New function.
17973         (vec_perm_indices::new_expanded_vector): Update for new
17974         vec_perm_indices class.
17975         (vec_perm_indices::rotate_inputs): New function.
17976         (vec_perm_indices::all_in_range_p): Operate directly on the
17977         encoded form, without computing elided elements.
17978         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17979         encoding.  Update for new vec_perm_indices class.
17980         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17981         the given vec_perm_builder.
17982         (expand_vec_perm_var): Update vec_perm_builder constructor.
17983         (expand_mult_highpart): Use vec_perm_builder instead of
17984         auto_vec_perm_indices.
17985         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17986         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17987         or double series encoding as appropriate.
17988         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17989         vec_perm_indices instead of auto_vec_perm_indices.
17990         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17991         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17992         (vect_permute_store_chain): Likewise.
17993         (vect_grouped_load_supported): Likewise.
17994         (vect_permute_load_chain): Likewise.
17995         (vect_shift_permute_load_chain): Likewise.
17996         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17997         (vect_transform_slp_perm_load): Likewise.
17998         (vect_schedule_slp_instance): Likewise.
17999         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18000         (vectorizable_mask_load_store): Likewise.
18001         (vectorizable_bswap): Likewise.
18002         (vectorizable_store): Likewise.
18003         (vectorizable_load): Likewise.
18004         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
18005         vec_perm_indices instead of auto_vec_perm_indices.  Use
18006         tree_to_vec_perm_builder to read the vector from a tree.
18007         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
18008         vec_perm_builder instead of a vec_perm_indices.
18009         (have_whole_vector_shift): Use vec_perm_builder and
18010         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
18011         truncation to calc_vec_perm_mask_for_shift.
18012         (vect_create_epilog_for_reduction): Likewise.
18013         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
18014         from auto_vec_perm_indices to vec_perm_indices.
18015         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18016         instead of changing individual elements.
18017         (aarch64_vectorize_vec_perm_const): Use new_vector to install
18018         the vector in d.perm.
18019         * config/arm/arm.c (expand_vec_perm_d::perm): Change
18020         from auto_vec_perm_indices to vec_perm_indices.
18021         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18022         instead of changing individual elements.
18023         (arm_vectorize_vec_perm_const): Use new_vector to install
18024         the vector in d.perm.
18025         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
18026         Update vec_perm_builder constructor.
18027         (rs6000_expand_interleave): Likewise.
18028         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
18029         (rs6000_expand_interleave): Likewise.
18031 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18033         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18034         to qimode could truncate the indices.
18035         * optabs.c (expand_vec_perm_var): Likewise.
18037 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18039         * Makefile.in (OBJS): Add vec-perm-indices.o.
18040         * vec-perm-indices.h: New file.
18041         * vec-perm-indices.c: Likewise.
18042         * target.h (vec_perm_indices): Replace with a forward class
18043         declaration.
18044         (auto_vec_perm_indices): Move to vec-perm-indices.h.
18045         * optabs.h: Include vec-perm-indices.h.
18046         (expand_vec_perm): Delete.
18047         (selector_fits_mode_p, expand_vec_perm_var): Declare.
18048         (expand_vec_perm_const): Declare.
18049         * target.def (vec_perm_const_ok): Replace with...
18050         (vec_perm_const): ...this new hook.
18051         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18052         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18053         * doc/tm.texi: Regenerate.
18054         * optabs.def (vec_perm_const): Delete.
18055         * doc/md.texi (vec_perm_const): Likewise.
18056         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18057         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18058         expand_vec_perm for constant permutation vectors.  Assert that
18059         the mode of variable permutation vectors is the integer equivalent
18060         of the mode that is being permuted.
18061         * optabs-query.h (selector_fits_mode_p): Declare.
18062         * optabs-query.c: Include vec-perm-indices.h.
18063         (selector_fits_mode_p): New function.
18064         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18065         is defined, instead of checking whether the vec_perm_const_optab
18066         exists.  Use targetm.vectorize.vec_perm_const instead of
18067         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
18068         fit in the vector mode before using a variable permute.
18069         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18070         vec_perm_indices instead of an rtx.
18071         (expand_vec_perm): Replace with...
18072         (expand_vec_perm_const): ...this new function.  Take the selector
18073         as a vec_perm_indices rather than an rtx.  Also take the mode of
18074         the selector.  Update call to shift_amt_for_vec_perm_mask.
18075         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18076         Use vec_perm_indices::new_expanded_vector to expand the original
18077         selector into bytes.  Check whether the indices fit in the vector
18078         mode before using a variable permute.
18079         (expand_vec_perm_var): Make global.
18080         (expand_mult_highpart): Use expand_vec_perm_const.
18081         * fold-const.c: Includes vec-perm-indices.h.
18082         * tree-ssa-forwprop.c: Likewise.
18083         * tree-vect-data-refs.c: Likewise.
18084         * tree-vect-generic.c: Likewise.
18085         * tree-vect-loop.c: Likewise.
18086         * tree-vect-slp.c: Likewise.
18087         * tree-vect-stmts.c: Likewise.
18088         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18089         Delete.
18090         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18091         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18092         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18093         (aarch64_vectorize_vec_perm_const): ...this new function.
18094         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18095         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18096         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18097         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18098         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18099         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18100         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18101         into...
18102         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
18103         check for NEON modes.
18104         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18105         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18106         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18107         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18108         into...
18109         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
18110         the old VEC_PERM_CONST conditions.
18111         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18112         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18113         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18114         (ia64_vectorize_vec_perm_const_ok): Merge into...
18115         (ia64_vectorize_vec_perm_const): ...this new function.
18116         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18117         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18118         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18119         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18120         * config/mips/mips.c (mips_expand_vec_perm_const)
18121         (mips_vectorize_vec_perm_const_ok): Merge into...
18122         (mips_vectorize_vec_perm_const): ...this new function.
18123         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18124         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18125         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18126         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18127         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18128         (rs6000_expand_vec_perm_const): Delete.
18129         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18130         Delete.
18131         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18132         (altivec_expand_vec_perm_const_le): Take each operand individually.
18133         Operate on constant selectors rather than rtxes.
18134         (altivec_expand_vec_perm_const): Likewise.  Update call to
18135         altivec_expand_vec_perm_const_le.
18136         (rs6000_expand_vec_perm_const): Delete.
18137         (rs6000_vectorize_vec_perm_const_ok): Delete.
18138         (rs6000_vectorize_vec_perm_const): New function.
18139         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18140         an element count and rtx array.
18141         (rs6000_expand_extract_even): Update call accordingly.
18142         (rs6000_expand_interleave): Likewise.
18143         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18144         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18145         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18146         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18147         (rs6000_expand_vec_perm_const): Delete.
18148         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18149         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18150         (altivec_expand_vec_perm_const_le): Take each operand individually.
18151         Operate on constant selectors rather than rtxes.
18152         (altivec_expand_vec_perm_const): Likewise.  Update call to
18153         altivec_expand_vec_perm_const_le.
18154         (rs6000_expand_vec_perm_const): Delete.
18155         (rs6000_vectorize_vec_perm_const_ok): Delete.
18156         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
18157         reference to the SPE evmerge intructions.
18158         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18159         an element count and rtx array.
18160         (rs6000_expand_extract_even): Update call accordingly.
18161         (rs6000_expand_interleave): Likewise.
18162         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18163         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18164         new function.
18165         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18167 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18169         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18170         vector mode and that that mode matches the mode of the data
18171         being permuted.
18172         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18173         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
18174         directly using expand_vec_perm_1 when forcing selectors into
18175         registers.
18176         (expand_vec_perm_var): New function, split out from expand_vec_perm.
18178 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18180         * optabs-query.h (can_vec_perm_p): Delete.
18181         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18182         * optabs-query.c (can_vec_perm_p): Split into...
18183         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18184         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18185         particular selector is valid.
18186         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18187         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18188         (vect_grouped_load_supported): Likewise.
18189         (vect_shift_permute_load_chain): Likewise.
18190         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18191         (vect_transform_slp_perm_load): Likewise.
18192         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18193         (vectorizable_bswap): Likewise.
18194         (vect_gen_perm_mask_checked): Likewise.
18195         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
18196         implementations of variable permutation vectors into account
18197         when deciding which selector to use.
18198         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18199         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18200         with a false third argument.
18201         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18202         to test whether the constant selector is valid and can_vec_perm_var_p
18203         to test whether a variable selector is valid.
18205 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18207         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18208         * optabs-query.c (can_vec_perm_p): Likewise.
18209         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18210         instead of vec_perm_indices.
18211         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18212         (vect_gen_perm_mask_checked): Likewise,
18213         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18214         (vect_gen_perm_mask_checked): Likewise,
18216 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18218         * optabs-query.h (qimode_for_vec_perm): Declare.
18219         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18220         (qimode_for_vec_perm): ...this new function.
18221         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18223 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18225         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18226         does not have a conditional at the top.
18228 2018-01-02  Richard Biener  <rguenther@suse.de>
18230         * ipa-inline.c (big_speedup_p): Fix expression.
18232 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18234         PR target/81616
18235         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18236         for generic 4->6.
18238 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18240         PR target/81616
18241         Generic tuning.
18242         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18243         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18244         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18245         cond_taken_branch_cost 3->4.
18247 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
18249         PR tree-optimization/83581
18250         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18251         TODO_cleanup_cfg if any changes have been made.
18253         PR middle-end/83608
18254         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18255         convert_modes if target mode has the right side, but different mode
18256         class.
18258         PR middle-end/83609
18259         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18260         last argument when extracting from CONCAT.  If either from_real or
18261         from_imag is NULL, use expansion through memory.  If result is not
18262         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18263         the parts directly to inner mode, if even that fails, use expansion
18264         through memory.
18266         PR middle-end/83623
18267         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18268         check for bswap in mode rather than HImode and use that in expand_unop
18269         too.
18271 Copyright (C) 2018 Free Software Foundation, Inc.
18273 Copying and distribution of this file, with or without modification,
18274 are permitted in any medium without royalty provided the copyright
18275 notice and this notice are preserved.