* config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
[official-gcc.git] / gcc / ChangeLog
blobb215706ccfa9a166a5ed7384ba60e469a451a4b9
1 2018-08-09  Jeff Law  <law@redhat.com>
3         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
4         unused variable.
6 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
8         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9         prototype.
11 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
13         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
14         reductions for variable-length vectors.
16 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
18         PR other/84889
19         * common.opt (fdiagnostics-show-line-numbers): New option.
20         * diagnostic-show-locus.c (class layout): Add fields
21         "m_show_line_numbers_p" and "m_linenum_width";
22         (num_digits): New function.
23         (test_num_digits): New function.
24         (layout::layout): Initialize new fields.  Update m_x_offset
25         logic to handle any left margin.
26         (layout::print_source_line): Print line number when requested.
27         (layout::start_annotation_line): New member function.
28         (layout::print_annotation_line): Call it.
29         (layout::print_leading_fixits): Likewise.
30         (layout::print_trailing_fixits): Likewise.  Update calls to
31         move_to_column for new parameter.
32         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
33         it to potentially call start_annotation_line.
34         (layout::show_ruler): Call start_annotation_line.
35         (selftest::test_line_numbers_multiline_range): New selftest.
36         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
37         and selftest::test_line_numbers_multiline_range.
38         * diagnostic.c (diagnostic_initialize): Initialize
39         show_line_numbers_p.
40         * diagnostic.h (struct diagnostic_context): Add field
41         "show_line_numbers_p".
42         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
43         -fno-diagnostics-show-line-numbers.
44         * dwarf2out.c (gen_producer_string): Add
45         OPT_fdiagnostics_show_line_numbers to the ignored options.
46         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
47         one setting" options.
48         (append_compiler_options): Likewise to the dropped options.
49         (append_diag_options): Likewise to the passed-on options.
50         * opts.c (common_handle_option): Handle the new option.
51         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
53 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
55         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
56         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
57         third argument of type "const signed char" to descriptions of
58         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
59         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
60         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
61         __builtin_bcdsub_ov functions.
63 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
65         PR tree-optimization/86858
66         * tree-vect-loop.c (vect_is_simple_reduction): Restore
67         flow_bb_inside_loop_p calls.
69 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
71         PR tree-optimization/86871
72         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
73         instead of gimple_assign_lhs.
75 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
77         PR target/86887
78         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
79         register constraint to operand 0.
80         (add<mode>3_carryinC): Likewise.
81         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
83 2018-08-09  Martin Liska  <mliska@suse.cz>
85         PR c/86895
86         * common.opt: Remove extra line.
88 2018-08-09  Martin Liska  <mliska@suse.cz>
90         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
91         at the end of a line, make first letter capital and end up
92         a sentence with a dot.
93         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
94         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
95         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
96         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
97         (PARAM_MAX_ISL_OPERATIONS): Likewise.
98         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
99         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
100         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
101         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
102         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
103         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
104         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
105         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
106         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
107         (PARAM_TREE_REASSOC_WIDTH): Likewise.
108         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
109         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
110         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
112 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
114         PR target/84332
115         * config/s390/s390.c (s390_option_override_internal): Reduce the
116         stack-clash-protection-probe-interval param if it would be too big
117         for z900.
119 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
121         PR target/46179
122         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
123         * config/m68k/m68k.c (handle_move_double): Don't call
124         m68k_final_prescan_insn.
125         (m68k_adjust_decorated_operand): Renamed from
126         m68k_final_prescan_insn, remove first and third operand and
127         simplify.
128         (print_operand): Call it.
129         (print_operand_address): Call it.
131 2018-08-08  Nathan Sidwell  <nathan@acm.org>
133         * diagnostic.c (diagnostic_report_current_module): Use
134         linemap_included_from & linemap_included_from_linemap.
136 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
138         * config/aarch64/aarch64-cores.def: Add phecda core.
139         * config/aarch64/aarch64-tune.md: Regenerate.
140         * doc/invoke.texi: Add phecda core.
142 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
144         PR target/85295
145         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
146         definitions.
147         * config/s390/s390.md ("movti"): Add more alternatives for
148         constant to GPR copies.
150 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
152         * config/s390/s390.c: Fix whitespace damage throughout the file.
153         * config/s390/s390.h: Likewise.
154         * config/s390/tpf.h: Likewise.
156 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
158         * config/s390/s390.c (s390_loadrelative_operand_p):
159         Remove TARGET_CPU_ZARCH usages.
160         (s390_rtx_costs): Likewise.
161         (s390_legitimate_constant_p): Likewise.
162         (s390_cannot_force_const_mem): Likewise.
163         (legitimate_reload_constant_p): Likewise.
164         (s390_preferred_reload_class): Likewise.
165         (legitimize_pic_address): Likewise.
166         (legitimize_tls_address): Likewise.
167         (s390_split_branches): Removed.
168         (s390_add_execute): Removed.
169         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
170         (s390_mainpool_start): Likewise.
171         (s390_mainpool_finish): Likewise.
172         (s390_mainpool_cancel): Removed.
173         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
174         (s390_chunkify_cancel): Likewise.
175         (s390_return_addr_rtx): Likewise.
176         (s390_register_info): Remove split_branches_pending_p uages.
177         (s390_optimize_register_info): Likewise.
178         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
179         split_branches_pending_p usages.
180         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
181         (s390_load_got): Likewise.
182         (s390_expand_split_stack_prologue): Likewise.
183         (output_asm_nops): Likewise.
184         (s390_function_profiler): Likewise.
185         (s390_emit_call): Likewise.
186         (s390_conditional_register_usage): Likewise.
187         (s390_optimize_prologue): Likewise.
188         (s390_reorg): Remove TARGET_CPU_ZARCH and
189         split_branches_pending_p usages.
190         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
191         usages.
192         (s390_output_indirect_thunk_function): Likewise.
193         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
194         (TARGET_CPU_ZARCH_P): Removed.
195         (struct machine_function): Remove split_branches_pending_p.
196         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
198 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
200         * common/config/s390/s390-common.c (processor_flags_table):
201         Remove flags.
202         * config.gcc: Remove with_arch/with_tune support.
203         * config/s390/2064.md: Remove cpu attribute comparisons.
204         * config/s390/driver-native.c (s390_host_detect_local_cpu):
205         Remove MTN.
206         * config/s390/linux.h (ASM_SPEC):
207         Remove -march support.
208         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
209         Use a table to get an arch level.
210         * config/s390/s390-opts.h (enum processor_type):
211         Remove enum values.
212         * config/s390/s390.c
213         (processor_table): Remove entries, add arch_level values.
214         (s390_issue_rate): Remove cases.
215         (s390_option_override): Adjust
216         s390_option_override_internal() call.
217         (s390_option_override_internal): Remove deprecation warning.
218         (s390_valid_target_attribute_tree): Adjust
219         s390_option_override_internal() call.
220         * config/s390/s390.h (struct s390_processor):
221         Share with s390-c.c, add arch_level field.
222         * config/s390/s390.md:
223         Remove occurrences in cpu attribute.
224         * config/s390/s390.opt: Remove -march/-mtune support.
225         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
226         * doc/invoke.texi: Remove deprecation warning.
228 2018-08-08  Luis Machado  <luis.machado@linaro.org>
230         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
231         global.
232         (qdf24xx_tunings): Set vector cost structure to
233         qdf24xx_vector_cost.
235         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
236         <register_sextend>: Set to 3.
238 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
240         PR target/86838
241         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
242         * config/aarch64/aarch64-simd.md
243         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
244         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
245         (aarch64_frecpx<mode>): ...this new pattern.
246         * config/aarch64/aarch64-simd-builtins.def: Remove comment
247         about aarch64_frecp<FRECP:frecp_suffix><mode>.
249 2018-08-07  Martin Liska  <mliska@suse.cz>
251         PR middle-end/83023
252         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
253         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
254         * predict.def (PRED_MALLOC_NONNULL): New predictor.
255         * doc/extend.texi: Document that malloc attribute adds
256         hit to compiler.
258 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
260         PR target/86785
261         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
262         Define to speculation_safe_value_not_needed.
264 2018-08-06  Jeff Law  <law@redhat.com>
266         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
267         the vr_values instance to cprop_into_stmt.
268         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
269         (cprop_operand): Also query EVRP to determine if OP is a constant.
270         
271 2018-08-06  Nathan Sidwell  <nathan@acm.org>
273         * diagnostic.c (diagnostic_report_current_module): Reroll
274         included-at loop.  Translate text.
276 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
278         * function-tests.c (selftest::test_expansion_to_rtl): Call
279         free_after_compilation.
281 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
283         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
285 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
287         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
288         loops with memory block operations from getting unrolled.
290 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
292         PR target/86807
293         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
294         Define to speculation_safe_value_not_needed.
296 2018-08-06  Jeff Law  <law@redhat.com>
298         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
299         assert.
301 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
303         PR target/86662
304         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
305         with all enabled __intN types.
307         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
309 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
311         * alias.c (record_set): Check for clobber high.
312         * cfgexpand.c (expand_gimple_stmt): Likewise.
313         * combine-stack-adj.c (single_set_for_csa): Likewise.
314         * combine.c (find_single_use_1): Likewise.
315         (set_nonzero_bits_and_sign_copies): Likewise.
316         (get_combine_src_dest): Likewise.
317         (is_parallel_of_n_reg_sets): Likewise.
318         (try_combine): Likewise.
319         (record_dead_and_set_regs_1): Likewise.
320         (reg_dead_at_p_1): Likewise.
321         (reg_dead_at_p): Likewise.
322         * dce.c (deletable_insn_p): Likewise.
323         (mark_nonreg_stores_1): Likewise.
324         (mark_nonreg_stores_2): Likewise.
325         * df-scan.c (df_find_hard_reg_defs): Likewise.
326         (df_uses_record): Likewise.
327         (df_get_call_refs): Likewise.
328         * dwarf2out.c (mem_loc_descriptor): Likewise.
329         * haifa-sched.c (haifa_classify_rtx): Likewise.
330         * ira-build.c (create_insn_allocnos): Likewise.
331         * ira-costs.c (scan_one_insn): Likewise.
332         * ira.c (equiv_init_movable_p): Likewise.
333         (rtx_moveable_p): Likewise.
334         (interesting_dest_for_shprep): Likewise.
335         * jump.c (mark_jump_label_1): Likewise.
336         * postreload-gcse.c (record_opr_changes): Likewise.
337         * postreload.c (reload_cse_simplify): Likewise.
338         (struct reg_use): Add source expr.
339         (reload_combine): Check for clobber high.
340         (reload_combine_note_use): Likewise.
341         (reload_cse_move2add): Likewise.
342         (move2add_note_store): Likewise.
343         * print-rtl.c (print_pattern): Likewise.
344         * recog.c (decode_asm_operands): Likewise.
345         (store_data_bypass_p): Likewise.
346         (if_test_bypass_p): Likewise.
347         * regcprop.c (kill_clobbered_value): Likewise.
348         (kill_set_value): Likewise.
349         * reginfo.c (reg_scan_mark_refs): Likewise.
350         * reload1.c (maybe_fix_stack_asms): Likewise.
351         (eliminate_regs_1): Likewise.
352         (elimination_effects): Likewise.
353         (mark_not_eliminable): Likewise.
354         (scan_paradoxical_subregs): Likewise.
355         (forget_old_reloads_1): Likewise.
356         * reorg.c (find_end_label): Likewise.
357         (try_merge_delay_insns): Likewise.
358         (redundant_insn): Likewise.
359         (own_thread_p): Likewise.
360         (fill_simple_delay_slots): Likewise.
361         (fill_slots_from_thread): Likewise.
362         (dbr_schedule): Likewise.
363         * resource.c (update_live_status): Likewise.
364         (mark_referenced_resources): Likewise.
365         (mark_set_resources): Likewise.
366         * rtl.c (copy_rtx): Likewise.
367         * rtlanal.c (reg_referenced_p): Likewise.
368         (single_set_2): Likewise.
369         (noop_move_p): Likewise.
370         (note_stores): Likewise.
371         * sched-deps.c (sched_analyze_reg): Likewise.
372         (sched_analyze_insn): Likewise.
374 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
376         * cse.c (invalidate_reg): New function extracted from...
377         (invalidate): ...here.
378         (canonicalize_insn): Check for clobber high.
379         (invalidate_from_clobbers): invalidate clobber highs.
380         (invalidate_from_sets_and_clobbers): Likewise.
381         (count_reg_usage): Check for clobber high.
382         (insn_live_p): Likewise.
383         * cselib.c (cselib_expand_value_rtx_1):Likewise.
384         (cselib_invalidate_regno): Check for clobber in setter.
385         (cselib_invalidate_rtx): Pass through setter.
386         (cselib_invalidate_rtx_note_stores):
387         (cselib_process_insn): Check for clobber high.
388         * cselib.h (cselib_invalidate_rtx): Add operand.
390 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
392         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
393         (mark_not_eliminable): Likewise.
394         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
395         * lra-lives.c (process_bb_lives): Check for clobber high.
396         * lra.c (new_insn_reg): Remember clobber highs.
397         (collect_non_operand_hard_regs): Check for clobber high.
398         (lra_set_insn_recog_data): Likewise.
399         (add_regs_to_insn_regno_info): Likewise.
400         (lra_update_insn_regno_info): Likewise.
402 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
404         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
405         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
407 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
409         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
410         (copy_insn_1): Likewise.
411         (gen_hard_reg_clobber_high): New gen function.
412         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
413         * genemit.c (gen_exp): Likewise.
414         (gen_emit_seq): Pass through info.
415         (gen_insn): Check for CLOBBER_HIGH.
416         (gen_expand): Pass through info.
417         (gen_split): Likewise.
418         (output_add_clobbers): Likewise.
419         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
420         (remove_clobbers): Likewise.
421         * rtl.h (gen_hard_reg_clobber_high): New declaration.
423 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
425         * doc/rtl.texi (clobber_high): Add.
426         (parallel): Add in clobber high
427         * rtl.c (rtl_check_failed_code3): Add function.
428         * rtl.def (CLOBBER_HIGH): Add expression.
429         * rtl.h (RTL_CHECKC3): Add macro.
430         (rtl_check_failed_code3): Add declaration.
431         (XC3EXP): Add macro.
433 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
435         PR target/86386
436         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
437         cfun->machine->max_used_stack_alignment if needed.
439 2018-08-04  Martin Sebor  <msebor@redhat.com>
441         PR tree-optimization/86571
442         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
443         NaN output to 4.
445 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
447         PR target/86799
448         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
449         Define.
451 2018-08-03  Jeff Law  <law@redhat.com>
453         PR target/86795
454         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
455         Define to speculation_safe_value_not_needed.
457 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
459         * doc/gcov.texi (-x): Remove duplicate "to".
460         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
461         (-Wif-not-aligned): Remove duplicate "is".
462         (-flto): Remove duplicate "the".
463         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
464         duplicate "v5.00.b".
465         (MSP430 Options): Remove duplicate "and" from the description
466         of "-mgprel-sec=regexp".
467         (x86 Options): Remove duplicate copies of "vmldLog102" and
468         vmlsLog104 from description of "-mveclibabi=type".
470 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
472         * internal-fn.h (first_commutative_argument): Declare.
473         * internal-fn.c (first_commutative_argument): New function.
474         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
475         restrictions for pattern statements.  Use first_commutative_argument
476         to look for commutative operands in calls to internal functions.
478 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
480         * Makefile.in (wide-int-range.o): New.
481         * tree-vrp.c: Move all the wide_int_* functions to...
482         * wide-int-range.cc: ...here.
483         * tree-vrp.h: Move all the wide_int_* prototypes to...
484         * wide-int-range.h: ...here.
486 2018-08-03  Tom de Vries  <tdevries@suse.de>
488         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
489         UI_NONE.
490         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
491         * except.c (output_function_exception_table): Do early exit if
492         targetm_common.except_unwind_info (&global_options) == UI_NONE.
494 2018-08-03  Martin Liska  <mliska@suse.cz>
496         * predict.c (dump_prediction): Change to 2 digits
497         in fraction part.
499 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
501         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
502         neon_dup_q to...
503         (falkor_am_1_gtov_gtov): ... a new insn reservation.
505 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
507         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
508         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
509         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
510         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
511         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
513 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
515         * diagnostic-show-locus.c (diagnostic_show_locus): Use
516         pp_take_prefix when saving the existing prefix.
517         * diagnostic.c (diagnostic_append_note): Likewise.
518         * langhooks.c (lhd_print_error_function): Likewise.
519         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
520         param's type.  Free the existing prefix.
521         (pp_take_prefix): New function.
522         (pretty_printer::pretty_printer): Drop the prefix parameter.
523         Rename the length parameter to match the comment.
524         (pretty_printer::~pretty_printer): Free the prefix.
525         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
526         parameter.
527         (struct pretty_printer): Drop the "const" from "prefix" field's
528         type and clarify memory management.
529         (pp_set_prefix): Drop the "const" from the 2nd param.
530         (pp_take_prefix): New decl.
532 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
534         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
535         for word_mode_ok here instead of passing as argument.
536         (expand_block_compare): Change select_block_compare_mode() call.
537         (expand_strncmp_gpr_sequence): New function.
538         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
540 2018-08-02  Jeff Law  <law@redhat.com>
542         PR target/86790
543         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
544         Define to speculation_safe_value_not_needed.
546         PR target/86784
547         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
548         Define to speculation_safe_value_not_needed.
550 2018-08-02  Tom de Vries  <tdevries@suse.de>
552         PR target/86660
553         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
554         function.  Return UI_TARGET unconditionally.
555         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
556         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
558 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
560         * genemit.c (print_overload_test): Fix typo.
562 2018-08-02  Richard Biener  <rguenther@suse.de>
564         PR tree-optimization/86816
565         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
566         which checks for value availability before querying it.
567         (gvn_uses_equal): Use it.
568         (same_succ_hash): Likewise.
569         (gimple_equal_p): Likewise.
571 2018-08-02  Nick Clifton  <nickc@redhat.com>
573         PR target/86813
574         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
575         Define to speculation_safe_value_not_needed.
577         PR target/86810
578         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
579         Define to speculation_safe_value_not_needed.
581         PR target/86810
582         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
583         Define to speculation_safe_value_not_needed.
585         PR target/86803
586         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
587         Define to speculation_safe_value_not_needed.
589         PR target/86797
590         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
591         Define to speculation_safe_value_not_needed.
593         PR target/86791
594         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
595         Define to speculation_safe_value_not_needed.
597         PR target/86789
598         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
599         Define to speculation_safe_value_not_needed.
601         PR target/86787
602         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
603         Define to speculation_safe_value_not_needed.
605         PR target/86782
606         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
607         speculation_safe_value_not_needed.
609         PR target/86781
610         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
611         to speculation_safe_value_not_needed.
613 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
615         * doc/md.texi: Expand the documentation of instruction names
616         to mention port-local uses.  Document '@' in pattern names.
617         * read-md.h (overloaded_instance, overloaded_name): New structs.
618         (mapping): Declare.
619         (md_reader::handle_overloaded_name): New member function.
620         (md_reader::get_overloads): Likewise.
621         (md_reader::m_first_overload): New member variable.
622         (md_reader::m_next_overload_ptr): Likewise.
623         (md_reader::m_overloads_htab): Likewise.
624         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
625         m_next_overload_ptr and m_overloads_htab.
626         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
627         (get_mode_token, get_code_token, get_int_token): New functions.
628         (map_attr_string): Add an optional argument that passes back
629         the associated iterator.
630         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
631         (md_reader::handle_overloaded_name, add_overload_instance): New
632         functions.
633         (apply_iterators): Handle '@' names.  Report an error if '@'
634         is used without iterators.
635         (initialize_iterators): Initialize the new iterator_group fields.
636         * genopinit.c (handle_overloaded_code_for)
637         (handle_overloaded_gen): New functions.
638         (main): Use them to print declarations of maybe_code_for_* and
639         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
640         * genemit.c (print_overload_arguments, print_overload_test)
641         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
642         (main): Use it to print definitions of maybe_code_for_* and
643         maybe_gen_* functions.
644         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
645         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
646         instead of explicit mode checks.
647         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
648         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
649         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
650         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
651         (aarch64_expand_compare_and_swap): Likewise
652         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
653         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
654         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
655         (aarch64_constant_pool_reload_icode): Delete.
656         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
657         instead of aarch64_constant_pool_reload_icode.  Use
658         code_for_aarch64_reload_mov instead of explicit mode checks.
659         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
660         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
661         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
662         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
663         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
664         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
665         (aarch64_atomic_load_op_code): Delete.
666         (aarch64_emit_atomic_load_op): Likewise.
667         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
668         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
669         instead of aarch64_emit_atomic_load_op.
670         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
671         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
672         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
673         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
674         character before the pattern name.
675         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
676         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
677         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
678         (aarch64_frecps<mode>): Likewise.
679         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
680         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
681         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
682         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
683         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
685 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
687         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
688         Allow HFmode constants if TARGET_FP_F16INST.
690 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
692         PR target/86014
693         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
694         No longer check last store for clobber of address register.
696 2018-08-02  Martin Liska  <mliska@suse.cz>
698         PR gcov-profile/86817
699         * gcov.c (process_all_functions): New function.
700         (main): Call it.
701         (process_file): Move functions processing to
702         process_all_functions.
704 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
706         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
707         "const" to the "gimple *" and "rtx_insn *" parameters.
708         * dumpfile.h (dump_user_location_t::dump_user_location_t):
709         Likewise.
710         (dump_location_t::dump_location_t): Likewise.
712 2018-08-01  Martin Sebor  <msebor@redhat.com>
714         PR tree-optimization/86650
715         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
716         rather than a "gcall *".  Directly pass the data of interest
717         to percent_K_format, rather than building a temporary CALL_EXPR
718         to hold it.
719         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
720         (gimple_fold_builtin_strncat): Adjust.
721         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
722         gcall* argument with gimple*.
723         * gimple-ssa-warn-restrict.c (check_call): Same.
724         (wrestrict_dom_walker::before_dom_children): Same.
725         (builtin_access::builtin_access): Same.
726         (check_bounds_or_overlap): Same
727         (maybe_diag_overlap): Same.
728         (maybe_diag_offset_bounds): Same.
729         * tree-diagnostic.c (default_tree_printer): Move usage of
730         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
731         to this callsite.
732         * tree-pretty-print.c (percent_K_format): Add argument.
733         * tree-pretty-print.h: Add argument.
734         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
735         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
736         (maybe_diag_stxncpy_trunc): Same.
737         (handle_builtin_stxncpy): Same.
738         (handle_builtin_strcat): Same.
740 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
742         * match.pd: Optimise pointer range checks.
744 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
746         PR tree-optimization/86758
747         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
748         to remove pattern statements.
750 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
752         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
753         result of dfs_enumerate_from when constructing stmt_vec_infos,
754         instead of additionally calling get_loop_body.
756 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
758         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
759         parameter.
760         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
761         When creating an iv, assert that the step is not known to be zero.
762         (vect_setup_realignment): Update call accordingly.
763         * tree-vect-stmts.c (vectorizable_store): Likewise.
764         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
766 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
768         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
769         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
770         (vectorizable_reduction): Likewise.
771         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
772         (vect_detect_hybrid_slp_stmts): Likewise.
773         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
775 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
777         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
778         (wide_int_set_zero_nonzero_bits): ...this.
779         (zero_nonzero_bits_from_vr): Rename to...
780         (vrp_set_zero_nonzero_bits): ...this.
781         (extract_range_from_multiplicative_op_1): Abstract wide int
782         code...
783         (wide_int_range_multiplicative_op): ...here.
784         (extract_range_from_binary_expr_1): Extract wide int binary
785         operations into their own functions.
786         (wide_int_range_lshift): New.
787         (wide_int_range_can_optimize_bit_op): New.
788         (wide_int_range_shift_undefined_p): New.
789         (wide_int_range_bit_xor): New.
790         (wide_int_range_bit_ior): New.
791         (wide_int_range_bit_and): New.
792         (wide_int_range_trunc_mod): New.
793         (extract_range_into_wide_ints): New.
794         (vrp_shift_undefined_p): New.
795         (extract_range_from_multiplicative_op): New.
796         (vrp_can_optimize_bit_op): New.
797         * tree-vrp.h (value_range::dump): New.
798         (wide_int_range_multiplicative_op): New.
799         (wide_int_range_lshift):New.
800         (wide_int_range_shift_undefined_p): New.
801         (wide_int_range_bit_xor): New.
802         (wide_int_range_bit_ior): New.
803         (wide_int_range_bit_and): New.
804         (wide_int_range_trunc_mod): New.
805         (zero_nonzero_bits_from_bounds): Rename to...
806         (wide_int_set_zero_nonzero_bits): ...this.
807         (zero_nonzero_bits_from_vr): Rename to...
808         (vrp_set_zero_nonzero_bits): ...this.
809         (range_easy_mask_min_max): Rename to...
810         (wide_int_range_can_optimize_bit_op): this.
811         * vr-values.c (simplify_bit_ops_using_ranges): Rename
812         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
814 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
816         * tree-vectorizer.h (vect_orig_stmt): New function.
817         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
818         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
819         (vect_create_epilog_for_reduction): Likewise.
820         (vectorizable_live_operation): Likewise.
821         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
822         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
823         * tree-vect-stmts.c (vectorizable_call): Likewise.
824         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
826 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
828         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
829         argument.
830         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
831         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
832         (vect_transform_loop): Likewise.
833         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
835 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
837         * tree-vectorizer.h (vect_schedule_slp): Return void.
838         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
839         (vect_schedule_slp): Likewise.
841 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
843         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
844         argument.
845         (vect_transform_loop): Update calls accordingly.  Schedule SLP
846         instances before the main loop, if any exist.
848 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
850         PR tree-optimization/86749
851         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
852         If the lhs is used in a COND_EXPR, check that it is being used
853         as the "then" or "else" value.
855 2018-08-01  Tom de Vries  <tdevries@suse.de>
857         PR target/86800
858         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
859         speculation_safe_value_not_needed.
861 2018-08-01  Richard Biener  <rguenther@suse.de>
863         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
864         as base and offset.
866 2018-08-01  Martin Liska  <mliska@suse.cz>
868         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
869         format how successful transformation is dumped.
870         (gimple_mod_pow2_value_transform): Likewise.
871         (gimple_mod_subtract_transform): Likewise.
872         (gimple_stringops_transform): Likewise.
874 2018-08-01  Martin Liska  <mliska@suse.cz>
876         PR value-prof/35543
877         * value-prof.c (interesting_stringop_to_profile_p):
878         Simplify the code and add BUILT_IN_MEMMOVE.
879         (gimple_stringops_transform): Likewise.
881 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
883         * config/aarch64/aarch64-simd.md
884         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
885         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
886         use GPI iterator instead of SI mode.
888 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
890         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
891         rs6000_speculation_barrier.
892         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
893         new barrier pattern name.
895 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
897         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
898         (speculation_barrier): New insn.
900 2018-08-01  Richard Biener  <rguenther@suse.de>
902         PR bootstrap/86724
903         * graphite.h: Include isl/id.h and isl/space.h to allow build
904         with ISL 0.20.
906 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
908         PR target/86651
909         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
910         mode for COFF targets.
911         * defaults.h (TARGET_COFF): Define.
912         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
913         TARGET_COFF): Define.
914         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
915         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
916         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
918 2018-07-31  Alexandre Oliva <oliva@adacore.com>
920         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
921         * gimple-streamer-out.c (output_bb): Save it.
922         * lto-streamer-in.c (input_struct_function_base): Restore
923         instance discriminator if available.  Create map on demand.
924         * lto-streamer-out.c (output_struct_function_base): Save it if
925         available.
926         * final.c (decl_to_instance_map): Document LTO strategy.
928 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
929             Olivier Hainque  <hainque@adacore.com>
931         * debug.h (decl_to_instance_map_t): New type.
932         (decl_to_instance_map): Declare.
933         (maybe_create_decl_to_instance_map): New inline function.
934         * final.c (bb_discriminator, last_bb_discriminator): New statics,
935         to track basic block discriminators.
936         (final_start_function_1): Initialize them.
937         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
938         bb_discriminator.
939         (decl_to_instance_map): New variable.
940         (map_decl_to_instance, maybe_set_discriminator): New functions.
941         (notice_source_line): Set discriminator.
943 2018-07-31  Ian Lance Taylor  <iant@golang.org>
945         * targhooks.c (default_have_speculation_safe_value): Add
946         ATTRIBUTE_UNUSED.
948 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
950         * dump-context.h: Include "pretty-print.h".
951         (dump_context::refresh_dumps_are_enabled): New decl.
952         (dump_context::emit_item): New decl.
953         (class dump_context): Add fields "m_test_pp" and
954         "m_test_pp_flags".
955         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
956         (temp_dump_context::get_dumped_text): New decl.
957         (class temp_dump_context): Add field "m_pp".
958         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
959         (dump_context::refresh_dumps_are_enabled): ...and add a test for
960         m_test_pp.
961         (set_dump_file): Update for above change.
962         (set_alt_dump_file): Likewise.
963         (dump_loc): New overload, taking a pretty_printer *.
964         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
965         to any test pretty-printer.
966         (make_item_for_dump_gimple_stmt): New function, adapted from
967         optinfo::add_gimple_stmt.
968         (dump_context::dump_gimple_stmt): Call it, and use the result,
969         eliminating the direct usage of dump_file and alt_dump_file in
970         favor of indirectly using them via emit_item.
971         (make_item_for_dump_gimple_expr): New function, adapted from
972         optinfo::add_gimple_expr.
973         (dump_context::dump_gimple_expr): Call it, and use the result,
974         eliminating the direct usage of dump_file and alt_dump_file in
975         favor of indirectly using them via emit_item.
976         (make_item_for_dump_generic_expr): New function, adapted from
977         optinfo::add_tree.
978         (dump_context::dump_generic_expr): Call it, and use the result,
979         eliminating the direct usage of dump_file and alt_dump_file in
980         favor of indirectly using them via emit_item.
981         (make_item_for_dump_printf_va): New function, adapted from
982         optinfo::add_printf_va.
983         (make_item_for_dump_printf): New function.
984         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
985         and use the result, eliminating the direct usage of dump_file and
986         alt_dump_file in favor of indirectly using them via emit_item.
987         (make_item_for_dump_dec): New function.
988         (dump_context::dump_dec): Call it, and use the result,
989         eliminating the direct usage of dump_file and alt_dump_file in
990         favor of indirectly using them via emit_item.
991         (make_item_for_dump_symtab_node): New function, adapted from
992         optinfo::add_symtab_node.
993         (dump_context::dump_symtab_node): Call it, and use the result,
994         eliminating the direct usage of dump_file and alt_dump_file in
995         favor of indirectly using them via emit_item.
996         (dump_context::begin_scope): Reimplement, avoiding direct usage
997         of dump_file and alt_dump_file in favor of indirectly using them
998         via emit_item.
999         (dump_context::emit_item): New member function.
1000         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1001         Set up test pretty-printer on the underlying context.  Call
1002         refresh_dumps_are_enabled.
1003         (temp_dump_context::~temp_dump_context): Call
1004         refresh_dumps_are_enabled.
1005         (temp_dump_context::get_dumped_text): New member function.
1006         (selftest::verify_dumped_text): New function.
1007         (ASSERT_DUMPED_TEXT_EQ): New macro.
1008         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1009         and then without optinfo enabled.  Add uses of
1010         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1011         * dumpfile.h: Update comment for the dump_* API.
1012         * optinfo-emit-json.cc
1013         (selftest::test_building_json_from_dump_calls): Update for new
1014         param for temp_dump_context ctor.
1015         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1016         and "m_owned" field.
1017         (optinfo_item::~optinfo_item): Likewise.
1018         (optinfo::add_item): New member function.
1019         (optinfo::emit): Update comment.
1020         (optinfo::add_string): Delete.
1021         (optinfo::add_printf): Delete.
1022         (optinfo::add_printf_va): Delete.
1023         (optinfo::add_gimple_stmt): Delete.
1024         (optinfo::add_gimple_expr): Delete.
1025         (optinfo::add_tree): Delete.
1026         (optinfo::add_symtab_node): Delete.
1027         (optinfo::add_dec): Delete.
1028         * optinfo.h (class dump_context): New forward decl.
1029         (optinfo::add_item): New decl.
1030         (optinfo::add_string): Delete.
1031         (optinfo::add_printf): Delete.
1032         (optinfo::add_printf_va): Delete.
1033         (optinfo::add_gimple_stmt): Delete.
1034         (optinfo::add_gimple_expr): Delete.
1035         (optinfo::add_tree): Delete.
1036         (optinfo::add_symtab_node): Delete.
1037         (optinfo::add_dec): Delete.
1038         (optinfo::add_poly_int): Delete.
1039         (optinfo_item::optinfo_item): Remove "owned" param.
1040         (class optinfo_item): Remove field "m_owned".
1042 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1044         PR middle-end/86705
1045         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1046         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1047         requested variable alignment.
1048         (expand_one_ssa_partition): Likewise.
1049         (expand_one_var): Likewise.
1051 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1053         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1054         to speculation_safe_value_not_needed.
1056 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1058         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1059         * targhooks.c (speculation_safe_value_not_needed): New function.
1060         * target.def (have_speculation_safe_value): Update documentation.
1061         * doc/tm.texi: Regenerated.
1063 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1065         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1066         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1067         expand.
1068         (despeculate_copy<ALLI:mode>_insn): New insn.
1069         (despeculate_copyti_insn): New insn.
1070         (despeculate_simple<ALLI:mode>): New insn
1071         (despeculate_simpleti): New insn.
1072         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1073         function.
1074         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1075         aarch64_speculation_safe_value.
1076         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1078 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1080         * config/aarch64/aarch64-speculation.cc: New file.
1081         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1082         before pass_reorder_blocks.
1083         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1084         prototype.
1085         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1086         X14 and X15 when tracking speculation.
1087         * config/aarch64/aarch64.md (register name constants): Add
1088         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1089         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1090         (speculation_barrier): New insn attribute.
1091         (cmp<mode>): Allow SP in comparisons.
1092         (speculation_tracker): New insn.
1093         (speculation_barrier): Add speculation_barrier attribute.
1094         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1095         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1096         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1098 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1100         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1101         aarch64_track_speculation is true.
1102         (tb<optab><mode>1): Likewise.
1103         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1104         generate CB[N]Z when tracking speculation.
1105         (aarch64_split_compare_and_swap): Likewise.
1106         (aarch64_split_atomic_op): Likewise.
1108 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1110         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1112 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1114         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1115         (speculation_barrier): New insn.
1117 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1119         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1120         * config/arm/arm.md (speculation_barrier): New expand.
1121         (speculation_barrier_insn): New pattern.
1123 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1125         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1126         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1127         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1128         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1129         list.
1130         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1131         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1132         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1133         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1134         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1135         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1136         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1137         * builtins.c (expand_speculation_safe_value): New function.
1138         (expand_builtin): Call it.
1139         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1140         * doc/extend.texi: Document __builtin_speculation_safe_value.
1141         * doc/md.texi: Document "speculation_barrier" pattern.
1142         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1143         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1144         * doc/tm.texi: Regenerated.
1145         * target.def (have_speculation_safe_value, speculation_safe_value): New
1146         hooks.
1147         * targhooks.c (default_have_speculation_safe_value): New function.
1148         (default_speculation_safe_value): New function.
1149         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1150         (default_speculation_safe_value): Add prototype.
1152 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1154         * dump-context.h (dump_context::dump_loc): New decl.
1155         * dumpfile.c (dump_context::dump_loc): New member function.
1156         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1157         and dump_gimple_stmt.
1158         (dump_context::dump_gimple_expr_loc): Likewise, using
1159         dump_gimple_expr.
1160         (dump_context::dump_generic_expr_loc): Likewise, using
1161         dump_generic_expr.
1162         (dump_context::dump_printf_loc_va): Likewise, using
1163         dump_printf_va.
1164         (dump_context::begin_scope): Explicitly using the global function
1165         "dump_loc", rather than the member function.
1167 2018-07-31  Martin Sebor  <msebor@redhat.com>
1169         PR tree-optimization/86741
1170         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1172 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1174         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1175         depend on whether prefetch instructions will be emitted or not.
1176         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1177         will be emitted or not.
1178         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1179         (TARGET_SETMEM_PFD): New macros.
1181 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1183         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1184         (NULL_STMT_VEC_INFO): Delete.
1185         (stmt_vec_info::operator*): Likewise.
1186         (stmt_vec_info::operator gimple *): Likewise.
1187         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1188         of NULL_STMT_VEC_INFO.
1189         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1190         (vect_reassociating_reduction_p): Likewise.
1191         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1192         (vectorizable_store): Likewise.
1193         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1194         (vec_info::free_stmt_vec_infos): Likewise.
1196 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1198         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1199         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1201 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1203         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1204         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1205         (vec_info::free_stmt_vec_info): New private member functions.
1206         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1207         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1208         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1209         set_stmt_vec_info_vec and free_stmt_vec_infos.
1210         * tree-vect-loop.c (_loop_vec_info): Remove call to
1211         set_stmt_vec_info_vec.
1212         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1213         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1214         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1215         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1216         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1217         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1218         with the clearing in the xcalloc.
1219         (stmt_vec_info_vec): Delete.
1220         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1221         (vectorize_loops): Likewise.
1222         (vec_info::~vec_info): Remove argument from call to
1223         free_stmt_vec_infos.
1224         (vec_info::add_stmt): Remove vinfo argument from call to
1225         new_stmt_vec_info.
1227 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1229         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1230         rather than a gimple stmt.
1231         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1232         information for pattern statements when passed the original
1233         statement; instead wait to be passed the pattern statement itself.
1234         Don't call set_vinfo_for_stmt here.
1235         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1236         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1237         stmt_vec_infos here.
1238         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1239         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1240         stmt_vec_infos entry.
1242 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1244         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1245         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1246         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1247         * tree-vect-stmts.c (vectorizable_call): Likewise.
1248         (vectorizable_simd_clone_call): Likewise.
1250 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1252         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1253         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1254         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1255         * tree-vect-loop.c (vect_transform_loop): Likewise.
1256         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1257         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1259 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1261         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1262         (vect_dr_stmt): Delete.
1263         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1264         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1265         of DR_VECT_AUX.
1266         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1267         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1268         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1269         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1270         (vect_analyze_data_refs): Likewise.
1271         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1272         argument.
1273         (vect_find_same_alignment_drs): Likewise.
1274         (vect_slp_analyze_node_dependences): Update calls accordingly.
1275         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1276         instead of DR_VECT_AUX.
1277         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1278         of a vector data references.  Use vec_info::lookup_dr instead of
1279         DR_VECT_AUX.
1280         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1281         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1282         instead of DR_VECT_AUX.
1284 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1286         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1287         dr_vec_info.
1288         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1289         accordingly.
1290         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1291         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1292         (vect_gen_prolog_loop_niters): Likewise.
1294 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1296         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1297         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1298         (vect_known_alignment_in_bytes, vect_dr_behavior)
1299         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1300         instead of data_references.  Update calls to other routines for
1301         which the same change has been made.
1302         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1303         dr_vec_infos instead of stmt_vec_infos.
1304         (vect_analyze_data_ref_dependence): Update call accordingly.
1305         (vect_slp_analyze_data_ref_dependence)
1306         (vect_record_base_alignments): Use DR_VECT_AUX.
1307         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1308         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1309         (vector_alignment_reachable_p, vect_get_data_access_cost)
1310         (vect_peeling_supportable, vect_analyze_group_access_1)
1311         (vect_analyze_group_access, vect_analyze_data_ref_access)
1312         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1313         (vect_compile_time_alias, vect_small_gap_p)
1314         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1315         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1316         instead of data_references.  Update calls to other routines for
1317         which the same change has been made.
1318         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1319         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1320         (vect_slp_analyze_and_verify_node_alignment)
1321         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1322         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1323         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1324         above changes.
1325         (_vect_peel_info::dr): Replace with...
1326         (_vect_peel_info::dr_info): ...this new field.
1327         (vect_peeling_hash_get_most_frequent)
1328         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1329         (vect_peeling_hash_get_lowest_cost):
1330         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1331         routines for which the same change has been made.
1332         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1333         data_reference.
1334         * tree-vect-loop-manip.c (get_misalign_in_elems)
1335         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1336         above changes.
1337         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1338         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1339         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1340         (get_group_load_store_type, get_negative_load_store_type)
1341         (vect_get_data_ptr_increment, vectorizable_store)
1342         (vectorizable_load): Likewise.
1343         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1344         Update calls to other routines for which the same change has been made.
1346 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1348         * tree-vectorizer.h (vec_info::move_dr): New member function.
1349         (dataref_aux): Rename to...
1350         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1351         (_stmt_vec_info::dr_aux): Update accordingly.
1352         (_stmt_vec_info::data_ref_info): Delete.
1353         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1354         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1355         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1356         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1357         of data_ref.
1358         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1359         (STMT_VINFO_DR_INFO): New macro.
1360         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1361         (set_dr_misalignment): Update after rename of dataref_aux.
1362         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1363         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1364         initialization of STMT_VINFO_DATA_REF.
1365         * tree-vectorizer.c (vec_info::move_dr): New function.
1366         * tree-vect-patterns.c (vect_recog_bool_pattern)
1367         (vect_recog_mask_conversion_pattern)
1368         (vect_recog_gather_scatter_pattern): Use it.
1369         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1370         the "dr" and "stmt" fields of dr_vec_info instead of
1371         STMT_VINFO_DATA_REF.
1373 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1375         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1376         (is_pattern_stmt_p): Use it.
1377         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1378         on pattern statements.
1380 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1382         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1383         original stmt as a stmt_vec_info rather than a gimple stmt.
1384         (vect_pattern_recog_1): Take the statement directly as a
1385         stmt_vec_info, rather than via a gimple_stmt_iterator.
1386         Update call to vect_mark_pattern_stmts.
1387         (vect_pattern_recog): Update calls accordingly.
1389 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1391         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1392         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1393         a vect_def_type for the first argument.
1394         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1395         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1396         operand if it isn't defined by a vectorized statement.
1397         (vect_build_gather_load_calls): Remove the mask_dt argument and
1398         update calls to vect_get_vec_def_for_stmt_copy.
1399         (vectorizable_bswap): Likewise the dt argument.
1400         (vectorizable_call): Update calls to vectorizable_bswap and
1401         vect_get_vec_def_for_stmt_copy.
1402         (vectorizable_simd_clone_call, vectorizable_assignment)
1403         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1404         (vectorizable_comparison): Update calls to
1405         vect_get_vec_def_for_stmt_copy.
1406         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1407         vect_is_simple_use.
1408         (vect_get_loop_based_defs): Remove dt argument and update call
1409         to vect_get_vec_def_for_stmt_copy.
1410         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1411         and vect_get_vec_def_for_stmt_copy.
1412         (vectorizable_load): Update calls to vect_build_gather_load_calls
1413         and vect_get_vec_def_for_stmt_copy.
1414         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1415         (vectorizable_reduction, vectorizable_live_operation): Update calls
1416         to vect_get_vec_def_for_stmt_copy.
1418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1420         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1421         and gimple stmt arguments with a stmt_vec_info.
1422         (vect_record_base_alignments): Update calls accordingly.
1423         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1424         and gimple stmt arguments with a stmt_vec_info.
1425         (vect_build_slp_tree_1): Remove vinfo argument and update call
1426         to vect_record_max_nunits.
1427         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1428         and vect_record_max_nunits.
1430 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1432         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1433         file and take a stmt_vec_info instead of a gimple stmt.
1434         (supportable_widening_operation, vect_finish_replace_stmt)
1435         (vect_finish_stmt_generation, vect_get_store_rhs)
1436         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1437         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1438         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1439         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1440         (vect_create_data_ref_ptr, bump_vector_ptr)
1441         (vect_permute_store_chain, vect_setup_realignment)
1442         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1443         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1444         (vectorizable_reduction, vectorizable_induction)
1445         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1446         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1447         than gimple stmts as arguments.
1448         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1449         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1450         (can_group_stmts_p, vect_check_gather_scatter)
1451         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1452         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1453         (vect_permute_load_chain, vect_shift_permute_load_chain)
1454         (vect_transform_grouped_load)
1455         (vect_record_grouped_load_vectors): Likewise.
1456         * tree-vect-loop.c (vect_fixup_reduc_chain)
1457         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1458         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1459         (vectorizable_reduction, vectorizable_induction)
1460         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1461         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1462         (vect_get_load_store_mask): Likewise.
1463         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1464         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1465         * tree-vect-stmts.c (vect_mark_relevant)
1466         (is_simple_and_all_uses_invariant)
1467         (exist_non_indexing_operands_for_use_p, process_use)
1468         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1469         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1470         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1471         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1472         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1473         (get_negative_load_store_type, get_load_store_type)
1474         (vect_check_load_store_mask, vect_check_store_rhs)
1475         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1476         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1477         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1478         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1479         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1480         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1481         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1482         (supportable_widening_operation): Likewise.
1484 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1486         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1487         a stmt_vec_info instead of a gcall.
1488         (vect_check_gather_scatter): Update call accordingly.
1489         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1490         of a gphi.
1491         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1492         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1493         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1494         instead of a gimple stmt.
1495         (vect_transform_loop): Update calls accordingly.
1496         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1497         stmt_vec_infos instead of gimple stmts.
1498         (vect_analyze_slp_instance): Update use accordingly.
1499         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1500         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1501         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1502         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1503         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1504         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1505         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1506         down to subroutines.
1508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1510         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1511         of the worklist from a vector of gimple stmts to a vector of
1512         stmt_vec_infos.
1513         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1514         (vect_mark_stmts_to_be_vectorized): Likewise
1516 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1518         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1519         statement before passing it to vect_analyze_stmt.
1520         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1521         the chain of phi vector definitions.  Track the exit phi via its
1522         stmt_vec_info.
1523         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1524         STMT_VINFO_REDUC_DEF.
1525         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1526         stmt_vec_infos to handle the statement chains.
1527         (vect_get_slp_defs): Record the first statement in the node
1528         using a stmt_vec_info.
1529         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1530         statements here and pass their stmt_vec_info down to subroutines.
1531         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1532         down to vect_finish_stmt_generation.
1533         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1534         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1535         stmt_vec_infos to subroutines.
1536         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1537         chains.
1539 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1541         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1542         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1543         (vect_permute_store_chain, vect_setup_realignment)
1544         (vect_permute_load_chain, vect_shift_permute_load_chain)
1545         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1546         stmts internally, and when passing values to other vectorizer routines.
1547         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1548         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1549         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1550         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1551         (vectorizable_reduction, vectorizable_induction)
1552         (vectorizable_live_operation, vect_transform_loop_stmt)
1553         (vect_transform_loop): Likewise.
1554         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1555         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1556         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1557         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1558         (vect_slp_analyze_node_operations_1): Likewise.
1559         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1560         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1561         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1562         (vect_finish_stmt_generation_1, get_group_load_store_type)
1563         (get_load_store_type, vect_build_gather_load_calls)
1564         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1565         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1566         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1567         (vectorizable_store, vectorizable_load, vectorizable_condition)
1568         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1569         (supportable_widening_operation): Likewise.
1570         (vect_get_vector_types_for_stmt): Likewise.
1571         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1573 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1575         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1576         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1577         (vect_permute_store_chain, vect_permute_load_chain)
1578         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1579         repeated stmt_vec_info lookups.
1580         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1581         (vect_update_ivs_after_vectorizer): Likewise.
1582         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1583         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1584         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1585         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1586         (vect_bb_slp_scalar_cost): Likewise.
1587         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1589 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1591         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1592         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1593         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1594         to get gassigns and gcalls, rather than operating on generc gimple
1595         stmts.
1596         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1597         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1598         (vectorizable_load, vect_analyze_stmt): Likewise.
1599         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1601 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1603         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1604         return stmt_vec_infos rather than gimple stmts.  Do not accept
1605         null arguments.
1606         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1607         of a gimple stmt.
1608         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1609         Update use of get_later_stmt.
1610         (vect_get_constant_vectors): Update call accordingly.
1611         (vect_schedule_slp_instance): Likewise
1612         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1613         (vect_slp_analyze_instance_dependence): Likewise.
1614         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1616 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1618         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1619         (stmt_info_for_cost::stmt_info): ...this new field.
1620         (add_stmt_costs): Update accordingly.
1621         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1622         (vect_get_known_peeling_cost): Likewise.
1623         (vect_estimate_min_profitable_iters): Likewise.
1624         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1626 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1628         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1629         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1630         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1631         accordingly.
1632         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1636         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1637         a gimple stmt to a stmt_vec_info.
1638         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1640 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1642         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1643         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1644         (_loop_vec_info::reduction_chains): Likewise.
1645         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1646         accordingly.
1647         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1649 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1651         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1652         a gimple stmt to a stmt_vec_info.
1653         (_stmt_vec_info::next_element): Likewise.
1654         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1655         (vect_slp_analyze_and_verify_node_alignment)
1656         (vect_analyze_group_access_1, vect_analyze_group_access)
1657         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1658         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1659         (vect_supportable_dr_alignment): Update accordingly.
1660         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1661         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1662         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1663         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1664         * tree-vect-slp.c (vect_build_slp_tree_1)
1665         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1666         (vect_split_slp_store_group, vect_analyze_slp_instance)
1667         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1668         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1669         (get_group_load_store_type, get_load_store_type)
1670         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1671         (vect_transform_stmt, vect_remove_stores): Likewise.
1673 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1675         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1676         than a gimple stmt.
1677         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1678         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1679         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1680         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1681         (vector_alignment_reachable_p, vect_get_data_access_cost)
1682         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1683         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1684         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1685         (vect_analyze_group_access_1, vect_analyze_group_access)
1686         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1687         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1688         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1689         result of vect_dr_stmt and use the stmt_vec_info instead of
1690         the associated gimple stmt.
1691         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1692         (vect_gen_prolog_loop_niters): Likewise.
1693         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1695 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1697         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1698         to a vec<stmt_vec_info>.
1699         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1700         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1701         vec<stmt_vec_info>.
1702         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1703         to a vec<stmt_vec_info>.
1704         (bst_traits::value_type, bst_traits::value_type): Likewise.
1705         (bst_traits::hash): Update accordingly.
1706         (vect_get_and_check_slp_defs): Change the stmts parameter from
1707         a vec<gimple *> to a vec<stmt_vec_info>.
1708         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1709         (vect_build_slp_tree): Likewise.
1710         (vect_build_slp_tree_2): Likewise.  Update uses of
1711         SLP_TREE_SCALAR_STMTS.
1712         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1713         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1714         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1715         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1716         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1717         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1718         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1719         (vect_get_constant_vectors, vect_get_slp_defs)
1720         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1721         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1722         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1723         instead of gimple stmts.
1724         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1725         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1726         (vect_slp_analyze_instance_dependence): Update uses of
1727         SLP_TREE_SCALAR_STMTS.
1728         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1729         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1730         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1731         (get_initial_defs_for_reduction): Likewise.
1732         (vect_create_epilog_for_reduction): Likewise.
1733         (vectorize_fold_left_reduction): Likewise.
1734         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1735         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1736         (can_vectorize_live_stmts): Likewise.
1738 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1740         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1741         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1742         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1743         than gimple stmts.
1744         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1745         of a gimple stmt.
1746         (gather_scalar_reductions): Update after above interface changes.
1747         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1748         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1749         than gimple stmts.
1750         (vect_force_simple_reduction): Likewise.
1751         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1752         LOOP_VINFO_REDUCTIONS.
1753         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1755 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1757         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1758         a gimple stmt to a stmt_vec_info.
1759         * tree-vect-loop.c (vect_active_double_reduction_p)
1760         (vect_force_simple_reduction, vectorizable_reduction): Update
1761         accordingly.
1763 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1765         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1766         vec<gimple *> to a vec<stmt_vec_info>.
1767         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1768         the reduction_phis argument from a vec<gimple *> to a
1769         vec<stmt_vec_info>.
1770         (vectorizable_reduction): Likewise the phis local variable that
1771         is passed to vect_create_epilog_for_reduction.  Update for new type
1772         of SLP_TREE_VEC_STMTS.
1773         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1774         (vectorizable_live_operation): Likewise.
1775         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1776         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1780         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1781         a gimple stmt to a stmt_vec_info.
1782         (vectorizable_condition, vectorizable_live_operation)
1783         (vectorizable_reduction, vectorizable_induction): Pass back the
1784         vectorized statement as a stmt_vec_info.
1785         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1786         use of STMT_VINFO_VEC_STMT.
1787         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1788         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1789         as stmt_vec_infos rather than gimple stmts.
1790         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1791         to a stmt_vec_info.
1792         (vectorizable_live_operation): Likewise.
1793         (vectorizable_reduction, vectorizable_induction): Likewise,
1794         updating use of STMT_VINFO_VEC_STMT.
1795         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1796         of STMT_VINFO_VEC_STMT.
1797         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1798         (vectorizable_simd_clone_call, vectorizable_conversion)
1799         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1800         (vectorizable_store, vectorizable_load, vectorizable_condition)
1801         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1802         from a gimple stmt to a stmt_vec_info.
1803         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
1804         pointer to a stmt_vec_info to the vectorizable_* routines.
1806 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1808         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1809         a gimple stmt to a stmt_vec_info.
1810         (is_pattern_stmt_p): Update accordingly.
1811         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1812         (vect_record_grouped_load_vectors): Likewise.
1813         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1814         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1815         (vect_model_reduction_cost): Likewise.
1816         (vect_create_epilog_for_reduction): Likewise.
1817         (vectorizable_reduction, vectorizable_induction): Likewise.
1818         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1819         Return the stmt_vec_info for the pattern statement.
1820         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1821         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1822         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1823         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1824         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1825         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1826         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1827         (free_stmt_vec_info, vect_is_simple_use): Likewise.
1829 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1831         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1832         (vect_finish_stmt_generation): Likewise.
1833         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1834         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1835         (vect_build_gather_load_calls): Use the return value of the above
1836         functions instead of a separate call to vinfo_for_stmt.  Use narrow
1837         scopes for the input gimple stmt and wider scopes for the associated
1838         stmt_vec_info.  Use vec_info::lookup_def when setting these
1839         stmt_vec_infos from an SSA_NAME definition.
1840         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1841         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1842         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1843         (vectorizable_store, vectorizable_load, vectorizable_condition)
1844         (vectorizable_comparison): Likewise.
1845         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1846         (vectorizable_reduction): Likewise.
1848 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1850         * tree-vectorizer.h (vect_is_simple_use): Add an optional
1851         stmt_vec_info * parameter before the optional gimple **.
1852         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1853         (process_use, vect_get_vec_def_for_operand_1): Update callers.
1854         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1855         * tree-vect-loop.c (vectorizable_reduction): Likewise.
1856         (vectorizable_live_operation): Likewise.
1857         * tree-vect-patterns.c (type_conversion_p): Likewise.
1858         (vect_look_through_possible_promotion): Likewise.
1859         (vect_recog_rotate_pattern): Likewise.
1860         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1864         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1865         a typedef to a wrapper class.
1866         (NULL_STMT_VEC_INFO): New macro.
1867         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1868         (stmt_vec_info::operator*): New function.
1869         (stmt_vec_info::operator gimple *): Likewise.
1870         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1871         (add_stmt_costs): Likewise.
1872         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1873         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1874         (vect_get_known_peeling_cost): Likewise.
1875         (vect_estimate_min_profitable_iters): Likewise.
1876         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1877         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1878         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1879         (vectorizable_store, free_stmt_vec_infos): Likewise.
1880         (new_stmt_vec_info): Change return type of xcalloc to
1881         _stmt_vec_info *.
1883 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1885         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1886         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1887         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1888         a single_imm_use-based sequence.
1889         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1891 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1893         * tree-vectorizer.h (vec_info::lookup_def): Declare.
1894         * tree-vectorizer.c (vec_info::lookup_def): New function.
1895         * tree-vect-patterns.c (vect_get_internal_def): Use it.
1896         (vect_widened_op_tree): Likewise.
1897         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1898         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1899         (vectorizable_reduction): Likewise.
1900         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1901         of a gimple *.
1902         (vect_is_slp_reduction): Update calls accordingly.  Use
1903         vec_info::lookup_def.
1904         (vect_is_simple_reduction): Likewise
1905         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1907 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1909         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1910         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1911         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1912         of vinfo_for_stmt.
1913         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1914         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1915         (vect_update_vf_for_slp, vect_analyze_loop_operations)
1916         (vect_is_slp_reduction, vectorizable_induction)
1917         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1918         * tree-vect-patterns.c (vect_init_pattern_stmt):
1919         (vect_determine_min_output_precision_1, vect_determine_precisions)
1920         (vect_pattern_recog): Likewise.
1921         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1922         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1923         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1924         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1925         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1926         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
1927         info field from a loop to a loop_vec_info.
1929 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1931         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1932         (vec_info::add_stmt): Declare.
1933         * tree-vectorizer.c (vec_info::add_stmt): New function.
1934         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1935         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1936         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1937         (vectorizable_induction): Likewise.
1938         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1939         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1940         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1941         (vectorizable_load): Likewise.
1942         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1943         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1944         (vect_recog_gather_scatter_pattern): Likewise.
1945         (append_pattern_def_seq): Likewise.  Remove a check that is
1946         performed by add_stmt itself.
1948 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1950         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1951         which make_ssa_name was called with new_stmt before new_stmt
1952         had been created.
1954 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1956         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1957         split out from...
1958         (vect_is_slp_reduction): ...here...
1959         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
1960         that are already known to be false.
1962 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1964         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1965         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
1966         STMT_VINFO_NUM_SLP_USES when it's true.
1967         (vect_free_slp_instance): Add a final_p parameter and pass it to
1968         vect_free_slp_tree.
1969         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1970         (vect_analyze_slp_instance): Likewise.
1971         (vect_slp_analyze_operations): Likewise.
1972         (vect_slp_analyze_bb_1): Likewise.
1973         * tree-vectorizer.c (vec_info): Likewise.
1974         * tree-vect-loop.c (vect_transform_loop): Likewise.
1976 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1978         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1979         function is not called for second and subsequent members of
1980         a reduction group.
1982 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1984         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1985         cases for nested loops from here to ...
1986         (vect_create_epilog_for_reduction): ...here.  Only call
1987         vect_is_simple_use for inner-loop reductions.
1989 2018-07-31  Martin Liska  <mliska@suse.cz>
1991         PR gcov-profile/85338
1992         PR gcov-profile/85350
1993         PR gcov-profile/85372
1994         * profile.c (struct location_triplet): New.
1995         (struct location_triplet_hash): Likewise.
1996         (output_location): Do not output a BB that
1997         is already recorded for a line.
1998         (branch_prob): Use streamed_locations.
2000 2018-07-31  Martin Liska  <mliska@suse.cz>
2002         PR gcov-profile/85370
2003         * coverage.c (coverage_begin_function): Do not mark target
2004         clones as artificial functions.
2006 2018-07-31  Martin Liska  <mliska@suse.cz>
2008         PR gcov-profile/83813
2009         PR gcov-profile/84758
2010         PR gcov-profile/85217
2011         PR gcov-profile/85332
2012         * profile.c (branch_prob): Do not record GOTO expressions
2013         for GIMPLE statements which locations are already streamed.
2015 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2017         * gcc.c (handle_spec_function): Accept a soft_matched_part
2018         argument, as do_spec_1.  Pass it down to ...
2019         (eval_spec_function): Accept a soft_matched_part argument,
2020         and pass it down to ...
2021         (do_spec_2): Accept a soft_matched_part argument, and pass
2022         it down to do_spec_1.
2023         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2024         (handle_braces): Update call to handle_spec_function.
2025         (driver::set_up_specs): Update calls to do_spec_2.
2026         (compare_debug_dump_opt_spec_function): Likewise.
2027         (compare_debug_self_opt_spec_function): Likewise.
2029 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2031         * common.opt (nolibc): New option.
2032         * doc/invoke.texi (Link Options): Document it.
2033         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2034         * config/alpha/linux.h: Likewise.
2035         * config/arc/elf.h: Likewise.
2036         * config/arm/uclinux-elf.h: Likewise.
2037         * config/arm/unknown-elf.h: Likewise.
2038         * config/avr/avrlibc.h: Likewise.
2039         * config/bfin/bfin.h: Likewise.
2040         * config/bfin/linux.h: Likewise.
2041         * config/bfin/uclinux.h: Likewise.
2042         * config/darwin.h: Likewise.
2043         * config/darwin10.h: Likewise.
2044         * config/darwin12.h: Likewise.
2045         * config/gnu-user.h: Likewise.
2046         * config/lm32/uclinux-elf.h: Likewise.
2047         * config/pa/pa-hpux11.h: Likewise.
2048         * config/pa/pa64-hpux.h: Likewise.
2049         * config/sparc/sparc.h: Likewise.
2051 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2053         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2054         undefined variables.
2056 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2058         PR target/86640
2059         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2060         instead of GEN_INT.
2062 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2064         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2065         terminated string literal.
2067 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2069         PR rtl-optimization/85160
2070         * combine.c (is_just_move): New function.
2071         (try_combine): Allow combining two instructions into two if neither of
2072         the original instructions was a move.
2074 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2076         PR target/86673
2077         * doc/extend.texi (Global Register Variables): Discourage use of type
2078         qualifiers.
2079         (Local Register Variables): Likewise.
2081 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2083         PR tree-optimization/86506
2084         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2086 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2088         PR target/86547
2089         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2090         hard_regno, make sure no insn between `from` and `to` clobbers it.
2092 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2093             Tom de Vries  <tdevries@suse.de>
2095         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2096         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2097         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2098         PTX_DEFAULT_RUNTIME_DIM.
2099         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2101 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2103         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2104         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2105         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2107 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2109         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2110         used.
2111         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2112         predicate to reflect toc fusion has been deleted.
2113         (toc_fusion_mem_raw): Delete, no longer used.
2114         (toc_fusion_mem_wrapped): Likewise.
2115         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2116         fusion mask bit.
2117         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2118         Delete, no longer used.
2119         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2120         meant to be used for toc fusion.
2121         (rs6000_debug_print_mode): Delete toc fusion debugging.
2122         (rs6000_debug_reg_global): Likewise.
2123         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2124         fusion and secondary reload support that were never used.
2125         (rs6000_option_override_internal): Delete TOC fusion, that was only
2126         partially defined, and it did not work unless you also used the
2127         -mcmodel= switch.
2128         (rs6000_legitimate_address_p): Delete TOC fusion support.
2129         (rs6000_opt_masks): Likewise.
2130         (fusion_wrap_memory_address): Delete function, no longer used.
2131         (fusion_split_address); Delete TOC fusion support.
2132         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2133         longer used with toc fusion being deleted.
2134         (TARGET_TOC_FUSION_FP): Likewise.
2135         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2136         UNSPEC.
2137         (toc fusion spliter): Delete TOC fusion support.
2138         (toc_fusionload_<mode>): Likewise.
2139         (toc_fusionload_di): Likewise.
2140         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2141         longer needs to be named.  Rename predicate to delete TOC fusion.
2142         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2143         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2144         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2145         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2146         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2148 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2150         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2151         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2152         __int128 in built-in function prototypes.
2153         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2154         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2156 2018-07-27  Martin Sebor  <msebor@redhat.com>
2158         PR tree-optimization/86696
2159         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2160         types, including enums.
2161         (handle_char_store): Be prepared for the above function to fail.
2163 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2165         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2166         when optimization level is lower than 2 or optimize for size.
2168 2018-07-26  Martin Sebor  <msebor@redhat.com>
2170         PR tree-optimization/86043
2171         PR tree-optimization/86042
2172         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2173         (get_string_cst_length): Rename...
2174         (get_min_string_length): ...to this.  Add argument.
2175         (handle_char_store): Extend to handle multi-character stores by
2176         MEM_REF.
2177         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2178         * tree.h (initializer_zerop): Add argument.
2180 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2182         PR middle-end/86660
2183         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2184         declare target to variables if they have always,{to,from,tofrom} map
2185         kinds.
2187 2018-07-26  Martin Liska  <mliska@suse.cz>
2189         PR lto/86548
2190         * lto-wrapper.c: Add linker_output as prefix
2191         for ltrans_output_file.
2193 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2195         PR rtl-optimization/85805
2196         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2197         value for hard registers if that was written in the same mode.
2199 2018-07-26  Martin Liska  <mliska@suse.cz>
2201         PR gcov-profile/86536
2202         * gcov.c (format_gcov): Use printf format %.*f directly
2203         and do not handle special values.
2205 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2207         * common/config/arc/arc-common.c (arc_option_optimization_table):
2208         Update default optimizations for size.
2210 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2212         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2213         * config/arc/constraints.md (CfZ): New constraint.
2214         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2215         (subsf3_fpu): Likewise.
2216         (cmpsf_fpu): Likewise.
2217         (cmpsf_fpu_uneq): Likewise.
2219 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2221         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2222         accesses as well.
2223         (arc_is_uncached_mem_p): uncached applies to both the variable and
2224         the pointer.
2226 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2228         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2229         register names.
2231 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2233         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2234         field "m_scopes" from vec to auto_vec.
2236 2018-07-25  Martin Liska  <mliska@suse.cz>
2238         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2239         return type.
2241 2018-07-25  Richard Biener  <rguenther@suse.de>
2243         PR debug/86654
2244         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2245         special wrt context_die late.
2246         (gen_subprogram_die): Re-use DIEs in local scope.
2248 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2250         PR tree-optimization/86644
2251         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2253 2018-07-25  Martin Liska  <mliska@suse.cz>
2255         PR middle-end/86645
2256         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2257         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2259 2018-07-25  Martin Liska  <mliska@suse.cz>
2261         PR sanitizer/79635
2262         * params.def: Explain ASan abbreviation and provide
2263         a documentation link.
2265 2018-07-24  Martin Sebor  <msebor@redhat.com>
2267         PR tree-optimization/86622
2268         PR tree-optimization/86532
2269         * builtins.h (string_length): Declare.
2270         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
2271         (check_access): Be prepared for non-constant length ranges.
2272         (string_length): Make extern.
2273         * expr.c (string_constant): Only handle the minor non-constant
2274         array index.  Use string_constant to compute the length of
2275         a generic string constant.
2277 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2279         PR tree-optimization/86618
2280         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2281         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2283 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2285         PR tree-optimization/86636
2286         * json.cc (json::object::set): Fix comment.  Add assertions.
2287         (json::array::append): Move here from json.h.  Add comment and an
2288         assertion.
2289         (json::string::string): Likewise.
2290         * json.h (json::array::append): Move to json.cc.
2291         (json::string::string): Likewise.
2292         * optinfo-emit-json.cc
2293         (optrecord_json_writer::impl_location_to_json): Assert that we
2294         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2295         wrapper around it.  Expand the location once, rather than three
2296         times.
2297         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2298         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2299         wrappers.
2300         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2301         places.  Fix some overlong lines.
2303 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2305         * config/aarch64/aarch64-simd.md
2306         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2307         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2308         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2309         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2310         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2311         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2312         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2313         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2314         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2316 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2318         PR middle-end/86627
2319         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2320         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2321         and abs_d == d, do the power of two handling if profitable.
2323 2018-07-24  Richard Biener  <rguenther@suse.de>
2325         * match.pd: Add BIT_FIELD_REF canonicalizations.
2327 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2329         PR c/86617
2330         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2332 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2334         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2335         terminated STRING_CST object.
2337 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2339         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2341 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2343         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2344         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2345         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2346         the elements into a register.
2347         (rs6000_split_v4si_init_di_reg): Delete.
2348         (rs6000_split_v4si_init): Delete.
2349         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2350         (vsx_init_v4si): Rewrite as a define_expand.
2352 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2354         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2355         zero_extend argument from memory): New.
2357 2018-07-22  Martin Sebor  <msebor@redhat.com>
2359         PR bootstrap/86621
2360         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2361         diagnosing calls with unknown arguments unless -Walloca-larger-than
2362         is restricted to less than PTRDIFF_MAX bytes.
2364 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2366         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2368 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2370         * pretty-print.c (text_info::set_location): Remove redundant
2371         "line_table" parameter from call to rich_location::set_range.
2373 2018-07-20  Martin Sebor  <msebor@redhat.com>
2375         PR middle-end/82063
2376         * builtins.c (expand_builtin_alloca): Adjust.
2377         * calls.c (alloc_max_size): Simplify.
2378         * cgraphunit.c (cgraph_node::expand): Adjust.
2379         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2380         variables.
2381         (frame_larger_than_size): Same.
2382         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2383         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2384         Initialize.
2385         * doc/invoke.texi (GCC Command Options): Document option arguments.
2386         Explain byte-size arguments and suffixes.
2387         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2388         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2389         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2390         * doc/options.texi (UInteger): Expand.
2391         (Host_Wide_Int, ByteSize): Document new properties.
2392         * final.c (final_start_function_1): Include sizes in an error message.
2393         * function.c (frame_offset_overflow): Same.
2394         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2395         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2396         Diagnose unbounded alloca calls only for limits of less than
2397         PTRDIFF_MAX.
2398         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2399         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2400         for alloca(0).
2401         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2402         only for limits of less than PTRDIFF_MAX.
2403         * langhooks-def.h (lhd_handle_option): Change function argument
2404         to HOST_WIDE_INT.
2405         * langhooks.c (lhd_handle_option): Same.
2406         * langhooks.h (handle_option): Same.
2407         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2408         ByteSize flags.
2409         (var_type, var_type_struct): Same.
2410         (var_set): Handle ByteSize flag.
2411         * optc-gen.awk: Add comments to output to ease debugging.  Make
2412         use of HOST_WIDE_INT where appropriate.
2413         * opts-gen-save.awk:  Use %lx to format unsigned long.
2414         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2415         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2416         arguments.  Parse bytes-size suffixes.
2417         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2418         (enum_value_to_arg): Same.
2419         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2420         (handle_option): Adjust.
2421         (generate_option): Change function argument to HOST_WIDE_INT.
2422         (cmdline_handle_error): Adjust.
2423         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2424         (set_option): Change function argument to HOST_WIDE_INT.
2425         (option_enabled): Handle cl_host_wide_int.
2426         (get_option_state): Handle CLVC_SIZE.
2427         (control_warning_option): Same.
2428         * opts.c (common_handle_option): Change function argument to
2429         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2430         OPT_Wvla_larger_than_.
2431         * opts.h (enum cl_var_type): Add an enumerator.
2432         * stor-layout.c (layout_decl): Print a more meaningful warning.
2433         * toplev.c (output_stack_usage): Adjust.
2435 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2437         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2438         call to inline_expand_builtin_string_cmp.
2439         (expand_builtin_strcmp): Likewise.
2440         (expand_builtin_strncmp): Likewise.
2441         (inline_string_cmp): Delete the last parameter, change char_type_node
2442         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2443         two operands.
2444         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2445         the inlining expansion on target where the type of the call has same or 
2446         narrower precision than unsigned char.
2448 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2450         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2451         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2452         * common.opt (fsave-optimization-record): New option.
2453         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2454         * doc/invoke.texi (-fsave-optimization-record): New option.
2455         * dumpfile.c: Include "optinfo-emit-json.h".
2456         (struct kv_pair): Move to coretypes.h.
2457         (optgroup_options): Make non-static.
2458         (dump_context::end_scope): Call
2459         optimization_records_maybe_pop_dump_scope.
2460         * dumpfile.h (optgroup_options): New decl.
2461         * json.cc: New file.
2462         * json.h: New file.
2463         * optinfo-emit-json.cc: New file.
2464         * optinfo-emit-json.h: New file.
2465         * optinfo.cc: Include "optinfo-emit-json.h".
2466         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2467         (optinfo_enabled_p): Check optimization_records_enabled_p.
2468         (optinfo_wants_inlining_info_p): Likewise.
2469         * optinfo.h: Update comment.
2470         * profile-count.c (profile_quality_as_string): New function.
2471         * profile-count.h (profile_quality_as_string): New decl.
2472         (profile_count::quality): New accessor.
2473         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2474         and optinfo_emit_json_cc_tests.
2475         * selftest.h (selftest::json_cc_tests): New decl.
2476         (selftest::optinfo_emit_json_cc_tests): New decl.
2477         * toplev.c: Include "optinfo-emit-json.h".
2478         (compile_file): Call optimization_records_finish.
2479         (do_compile): Call optimization_records_start.
2480         * tree-ssa-live.c: Include optinfo.h.
2481         (remove_unused_scope_block_p): Retain inlining information if
2482         optinfo_wants_inlining_info_p returns true.
2484 2018-07-20  Richard Biener  <rguenther@suse.de>
2486         PR debug/86585
2487         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2488         to cover -flto-partition=none.
2490 2018-07-20  Martin Liska  <mliska@suse.cz>
2492         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2493         (get_decl_source_range): Remove unused function.
2495 2018-07-20  Richard Biener  <rguenther@suse.de>
2497         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2498         (struct vn_phi_s): Likewise.
2499         (struct vn_reference_s): Likewise.
2500         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2501         for searching the slot of an entry known to be in the hash itself.
2502         (vn_phi_hasher::equal): Likewise.
2503         (vn_reference_hasher::equal): Likewise.
2504         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2505         globals.
2506         (optimistic_info, current_info): Remove, keeping only valid_info.
2507         (vn_reference_lookup_1): Remove fallback lookup.
2508         (vn_reference_lookup_2): Likewise.
2509         (vn_nary_op_lookup_1): Likewise.
2510         (vn_phi_lookup): Likewise.
2511         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2512         hash element.
2513         (vn_reference_insert): Adjust, chain the inserted hash element
2514         at last_inserted_ref.
2515         (vn_reference_insert_pieces): Likewise.
2516         (visit_reference_op_call): Likewise.
2517         (vn_nary_op_insert_into): Chain the inserted hash element at
2518         last_inserted_nary.
2519         (vn_nary_op_insert_pieces): Adjust.
2520         (vn_nary_op_insert): Likewise.
2521         (vn_nary_op_insert_stmt): Likewise.
2522         (vn_phi_insert): Adjust, chain the inserted hash element at
2523         last_inserted_phi.
2524         (process_scc): Remove clearing and copying the optimistic
2525         table.  Instead remove elements inserted during an optimistic
2526         iteration from the single table we maintain.
2527         (init_scc_vn): Adjust.
2528         (free_scc_vn): Likewise.
2529         (sccvn_dom_walker::record_cond): Likewise.
2530         (sccvn_dom_walker::after_dom_children): Likewise.
2532 2018-07-19  Martin Sebor  <msebor@redhat.com>
2534         PR tree-optimization/84047
2535         PR tree-optimization/83776
2536         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2537         (check_array_bounds): Call it.
2539 2018-07-19  Martin Sebor  <msebor@redhat.com>
2541         * align.h (align_flags): Use member initialization.
2543 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2545         * Makefile.in (OBJS): Add optinfo.o.
2546         * coretypes.h (class symtab_node): New forward decl.
2547         (struct cgraph_node): New forward decl.
2548         (class varpool_node): New forward decl.
2549         * dump-context.h: New file.
2550         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2551         "tree-pass.h".
2552         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2553         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2554         (set_alt_dump_file): Likewise.
2555         (dump_context::~dump_context): New dtor.
2556         (dump_gimple_stmt): Move implementation to...
2557         (dump_context::dump_gimple_stmt): ...this new member function.
2558         Add the stmt to any pending optinfo, creating one if need be.
2559         (dump_gimple_stmt_loc): Move implementation to...
2560         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2561         Start a new optinfo and add the stmt to it.
2562         (dump_gimple_expr): Move implementation to...
2563         (dump_context::dump_gimple_expr): ...this new member function.
2564         Add the stmt to any pending optinfo, creating one if need be.
2565         (dump_gimple_expr_loc): Move implementation to...
2566         (dump_context::dump_gimple_expr_loc): ...this new member function.
2567         Start a new optinfo and add the stmt to it.
2568         (dump_generic_expr): Move implementation to...
2569         (dump_context::dump_generic_expr): ...this new member function.
2570         Add the tree to any pending optinfo, creating one if need be.
2571         (dump_generic_expr_loc): Move implementation to...
2572         (dump_context::dump_generic_expr_loc): ...this new member
2573         function.  Add the tree to any pending optinfo, creating one if
2574         need be.
2575         (dump_printf): Move implementation to...
2576         (dump_context::dump_printf_va): ...this new member function.  Add
2577         the text to any pending optinfo, creating one if need be.
2578         (dump_printf_loc): Move implementation to...
2579         (dump_context::dump_printf_loc_va): ...this new member function.
2580         Start a new optinfo and add the stmt to it.
2581         (dump_dec): Move implementation to...
2582         (dump_context::dump_dec): ...this new member function.  Add the
2583         value to any pending optinfo, creating one if need be.
2584         (dump_context::dump_symtab_node): New member function.
2585         (dump_context::get_scope_depth): New member function.
2586         (dump_context::begin_scope): New member function.
2587         (dump_context::end_scope): New member function.
2588         (dump_context::ensure_pending_optinfo): New member function.
2589         (dump_context::begin_next_optinfo): New member function.
2590         (dump_context::end_any_optinfo): New member function.
2591         (dump_context::s_current): New global.
2592         (dump_context::s_default): New global.
2593         (dump_scope_depth): Delete global.
2594         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2595         (dump_symtab_node): New function.
2596         (get_dump_scope_depth): Reimplement in terms of dump_context.
2597         (dump_begin_scope): Likewise.
2598         (dump_end_scope): Likewise.
2599         (selftest::temp_dump_context::temp_dump_context): New ctor.
2600         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2601         (selftest::verify_item): New function.
2602         (ASSERT_IS_TEXT): New macro.
2603         (ASSERT_IS_TREE): New macro.
2604         (ASSERT_IS_GIMPLE): New macro.
2605         (selftest::test_capture_of_dump_calls): New test.
2606         (selftest::dumpfile_c_tests): Call it.
2607         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2608         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2609         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2610         descriptive comment.
2611         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2612         (dump_node, dump_bb): Move these unrelated decls.
2613         (class dump_manager): Add leading comment.
2614         * optinfo.cc: New file.
2615         * optinfo.h: New file.
2617 2018-07-19  Michael Collison  <michael.collison@arm.com>
2618             Richard Henderson <rth@redhat.com>
2620         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2621         (subti): Handle op1 zero.
2622         (subvti4, usub4ti4): New.
2623         (*sub<GPI>3_compare1_imm): New.
2624         (sub<GPI>3_carryinCV): New.
2625         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2626         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2628 2018-07-19  Michael Collison  <michael.collison@arm.com>
2629             Richard Henderson <rth@redhat.com>
2631         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2632         (addti3): Create simpler code if low part is already known to be 0.
2633         (addvti4, uaddvti4): New.
2634         (*add<GPI>3_compareC_cconly_imm): New.
2635         (*add<GPI>3_compareC_cconly): New.
2636         (*add<GPI>3_compareC_imm): New.
2637         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2638         handle constants within this pattern..
2639         (*add<GPI>3_compareV_cconly_imm): New.
2640         (*add<GPI>3_compareV_cconly): New.
2641         (*add<GPI>3_compareV_imm): New.
2642         (add<GPI>3_compareV): New.
2643         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2644         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2645         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2646         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2647         with 'comparison' operator.
2648         (*add<GPI>3_compareV_cconly_imm): Ditto.
2649         (*add<GPI>3_compareV_cconly): Ditto.
2650         (*add<GPI>3_compareV_imm): Ditto.
2651         (add<GPI>3_compareV): Ditto.
2652         (add<mode>3_carryinC): Ditto.
2653         (*add<mode>3_carryinC_zero): Ditto.
2654         (*add<mode>3_carryinC): Ditto.
2655         (add<mode>3_carryinV): Ditto.
2656         (*add<mode>3_carryinV_zero): Ditto.
2657         (*add<mode>3_carryinV): Ditto.
2659 2018-07-19  Michael Collison  <michael.collison@arm.com>
2660             Richard Henderson <rth@redhat.com>
2662         * config/aarch64/aarch64-modes.def (CC_V): New.
2663         * config/aarch64/aarch64-protos.h
2664         (aarch64_addti_scratch_regs): Declare
2665         (aarch64_subvti_scratch_regs): Declare.
2666         (aarch64_expand_subvti): Declare.
2667         (aarch64_gen_unlikely_cbranch): Declare
2668         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2669         for signed overflow using CC_Vmode.
2670         (aarch64_get_condition_code_1): Handle CC_Vmode.
2671         (aarch64_gen_unlikely_cbranch): New function.
2672         (aarch64_addti_scratch_regs): New function.
2673         (aarch64_subvti_scratch_regs): New function.
2674         (aarch64_expand_subvti): New function.
2676 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2678         * config/aarch64/aarch64-option-extensions.def: New entry for profile
2679         extension.
2680         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2681         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2682         extension.
2684 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2686         PR target/83009
2687         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2688         address check not strict.
2690 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2692         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2693         Umq with Umn.
2694         (store_pair_lanes<mode>): Likewise.
2695         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2696         enum value 'ADDR_QUERY_LDP_STP_N'.
2697         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2698         (aarch64_print_address_internal): Add declaration.
2699         (aarch64_print_ldpstp_address): Remove.
2700         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2701         (aarch64_print_operand): Change printing of 'y'.
2702         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2703         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2704         'true' rather than '1'.
2705         * config/aarch64/constraints.md (Uml): Likewise.
2706         (Uml): Rename to Umn.
2707         (Umq): Remove.
2709 2018-07-19  Richard Biener  <rguenther@suse.de>
2711         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2712         a trailing array.
2713         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2714         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2715         (vn_reference_hasher): Likewise.
2716         (struct vn_tables_s): Remove obstack and alloc-pool members.
2717         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2718         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2719         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2720         (vn_reference_insert_pieces): Likewise.
2721         (alloc_vn_nary_op_noinit): Adjust.
2722         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2723         (vn_phi_eq): Adjust.
2724         (shared_lookup_phiargs): Remove.
2725         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2726         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2727         (visit_reference_op_call): Likewise.
2728         (copy_nary, copy_phi, copy_reference): Remove.
2729         (process_scc): Rewind the obstack when iterating.  Do not
2730         copy the elements to valid_info but just move them from one
2731         hashtable to the other.
2732         (allocate_vn_table): Adjust.
2733         (free_vn_table): Likewise.
2734         (init_scc_vn): Likewise.
2735         (free_scc_vn): Likewise.
2737 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2739         PR target/86560
2740         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2741         indirect_return as function type attribute.
2742         (ix86_attribute_table): Change indirect_return to function
2743         type attribute.
2744         * doc/extend.texi: Update indirect_return attribute.
2746 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
2748         * wide-int.h (widest2_int): New.
2749         * gimple-fold.c (arith_overflowed_p): Use it.
2750         * tree.h (widest2_int_cst): New.
2751         * tree-vrp.c (wide_int_binop_overflow): Rename from
2752         vrp_int_const_binop.
2753         Rewrite to work on trees.
2754         (extract_range_from_multiplicative_op_1): Abstract code to...
2755         (wide_int_range_min_max): ...here.
2756         (wide_int_range_cross_product): ...and here.
2757         (extract_range_from_binary_expr_1): Abstract overflow code to...
2758         (wide_int_range_mult_wrapping): ...here.
2759         * tree-vrp.h (wide_int_range_cross_product): New.
2760         (wide_int_range_mult_wrapping): New.
2762 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
2763             Julia Koval  <julia.koval@intel.com>
2765         * config/i386/x86-tune-costs.h (skylake_memcpy,
2766         skylake_memset): Replace rep_prefix with unrolling for size 512.
2768 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
2770         PR middle-end/86544
2771         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2772         in last stmt.
2774 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2776         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2777         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2778         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2779         previously known as "PowerPC AltiVec Built-in Functions".  Move
2780         some material to new subsubsections "PowerPC AltiVec Built-in
2781         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2782         ISA 2.07".
2783         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2784         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2785         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2786         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2788 2018-07-18  Richard Biener  <rguenther@suse.de>
2790         PR tree-optimization/86557
2791         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2792         EXACT_DIV_EXPR.
2794 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
2796         * config/s390/s390.c (s390_function_profiler): Generate CFI.
2798 2018-07-17  Jeff Law  <law@redhat.com>
2800         * config/arm/arm.c (get_label_padding): Update for recent
2801         changes to label_to_alignment.
2803         PR tree-optimization/86010
2804         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2806         * config/mips/mips.c (vr4130_align_insns): Update for recent
2807         changes to label_to_alignment.
2809         * config/frv/frv.c (frv_label_align): Update for recent changes
2810         to label_to_alignment.
2812         * config/nios2/nios2.c (nios2_label_align): Update for recent
2813         changes which dropped ALIGN_LABELS_LOG.
2815 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
2817         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2818         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2820 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
2822         * config/arc/arc.c (arc_label_align): Use align_labels instead of
2823         deprecated align_labels_log.
2825 2018-07-17  Richard Biener  <rguenther@suse.de>
2827         PR lto/86456
2828         * dwarf2out.c (init_sections_and_labels): Always generate
2829         a debug_line_str_section for early LTO debug.
2830         (dwarf2out_finish): Reset debug_line_str_hash output early.
2831         Bump counter for extra dwarf5 .debug_loc labels to not conflict
2832         with fat LTO part.
2833         (dwarf2out_early_finish): Output debug_line_str.
2835 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2837         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2838         index register on z196 or later.
2840 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2842         * config/s390/s390.c (s390_default_align): Set default function
2843         alignment to 16.
2844         (s390_override_options_after_change): Call s390_default align.
2845         (s390_option_override_internal): Call s390_default_align.
2846         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2848 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2850         PR middle-end/86542
2851         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2852         to _looptemp_ clauses, other than the first two.
2854 2018-07-17  Martin Liska  <mliska@suse.cz>
2856         * opts.c: Do not enable OPT_falign_* for -Os.
2858 2018-07-17  Martin Liska  <mliska@suse.cz>
2860         * align.h (MAX_CODE_ALIGN): New.
2861         (MAX_CODE_ALIGN_VALUE): New.
2862         * common/config/i386/i386-common.c (ix86_handle_option):
2863         (MAX_CODE_ALIGN): Moved to align.h.
2864         * final.c (MAX_CODE_ALIGN): Likewise.
2865         * opts.c (parse_and_check_align_values):
2866         (MAX_CODE_ALIGN): Likewise.
2867         (MAX_CODE_ALIGN_VALUE): Likewise.
2869 2018-07-17  Martin Liska  <mliska@suse.cz>
2871         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2872         in order to fulfil coding style.
2873         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2874         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2875         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2876         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2877         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2878         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2879         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2880         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2881         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2883 2018-07-17  Martin Liska  <mliska@suse.cz>
2885         * align.h: New file.
2886         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2887         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2888         align_flags of label_to_alignment.
2889         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2890         class.
2891         * config/m68k/m68k.c: Do not use removed align_labels_value and
2892         align_loops_value.
2893         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2894         (LOOP_ALIGN): Likewise.
2895         (LABEL_ALIGN): Likewise.
2896         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2897         Remove not used macro.
2898         (rs6000_loop_align): Change return type to align_flags.
2899         (rs6000_loop_align_max_skip): Remove.
2900         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2901         Change return type to align_flags.
2902         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2903         Remove not used macro.
2904         (rs6000_loop_align):  Change return type to align_flags.
2905         (rs6000_loop_align_max_skip): Remove.
2906         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2907         * config/rx/rx-protos.h (rx_align_for_label): Make it
2908         static function.
2909         * config/rx/rx.c (rx_align_for_label): Change return type
2910         to align_flags.
2911         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2912         macro definitions.
2913         into align_flags class.
2914         (LABEL_ALIGN): Likewise.
2915         (LOOP_ALIGN): Likewise.
2916         * config/s390/s390.c (s390_label_align): Use align_flags
2917         class member.
2918         (s390_asm_output_function_label): Likewise.
2919         * config/sh/sh.c (sh_override_options_after_change):
2920         Use align_flags class directly without macros.
2921         (find_barrier): Likewise.
2922         (barrier_align): Likewise.
2923         (sh_loop_align): Likewise.
2924         * config/spu/spu.c (spu_option_override):
2925         Use align_flags_tuple::get_value instead of removed macros.
2926         (spu_sched_init): Likewise.
2927         * config/spu/spu.h (GTY): Likewise.
2928         * config/visium/visium.c (visium_option_override):
2929         Set "8" as default secondary alignment.
2930         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2931         in order to guarantee secondary alignment of 8.
2932         * coretypes.h: Include align.h header file.
2933         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2934         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2935         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2936         * doc/tm.texi.in: Likewise.
2937         * final.c (struct label_alignment): Remove not used structure.
2938         (LABEL_ALIGN): Change type to align_flags.
2939         (LOOP_ALIGN): Likewise.
2940         (JUMP_ALIGN): Likewise.
2941         (default_loop_align_max_skip): Remove.
2942         (default_label_align_max_skip): Likewise.
2943         (default_jump_align_max_skip): Likewise.
2944         (default_label_align_after_barrier_max_skip):
2945         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2946         (LABEL_TO_MAX_SKIP): Remove.
2947         (label_to_alignment): Return align_flags type instead of integer.
2948         (label_to_max_skip): Remove.
2949         (align_fuzz): Use align_flags type.
2950         (compute_alignments): Use align_flags type and use align_flags::max
2951         to combine multiple alignments.
2952         (grow_label_align): Grow vec instead of C array.
2953         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2954         (shorten_branches):  Use align_flags type and use align_flags::max
2955         to combine multiple alignments.
2956         (final_scan_insn_1): Remove usage of secondary alignment that comes
2957         from label alignment, but instead use proper secondary alignment
2958         which is computed in grow_label_align.
2959         * flags.h (struct align_flags_tuple): Move to align.h.
2960         (struct align_flags): Likewise.
2961         (state_align_loops): Rename to align_loops.
2962         (state_align_jumps): Rename to align_jumps.
2963         (state_align_labels): Rename to align_labels.
2964         (state_align_functions): Rename to align_functions.
2965         (align_loops_log): Remove.
2966         (align_jumps_log): Remove.
2967         (align_labels_log): Remove.
2968         (align_functions_log): Remove.
2969         (align_loops_max_skip): Remove.
2970         (align_jumps_max_skip): Remove.
2971         (align_labels_max_skip): Remove.
2972         (align_functions_max_skip): Remove.
2973         (align_loops_value): Remove.
2974         (align_jumps_value): Remove.
2975         (align_labels_value): Remove.
2976         (align_functions_value): Remove.
2977         * output.h (label_to_alignment): Change return type to align_flags.
2978         (label_to_max_skip): Remove.
2979         * target.def: Remove loop_align_max_skip, label_align_max_skip,
2980         jump_align_max_skip macros.
2981         * targhooks.h (default_loop_align_max_skip): Remove.
2982         (default_label_align_max_skip): Likewise.
2983         (default_jump_align_max_skip): Likewise.
2984         (default_label_align_after_barrier_max_skip): Remove.
2985         * toplev.c (read_log_maxskip): Use ::normalize function.
2986         (parse_N_M): Remove not used argument and also call ::normalize.
2987         (parse_alignment_opts): Do not pass unused arguments.
2988         * varasm.c (assemble_start_function): Use directly align_functions
2989         instead of removed macros.
2990         * system.h: Do not poison removed macros.
2992 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2994         PR middle-end/86539
2995         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2996         and cond temporaries don't have reference type if iterator has
2997         pointer type.  For init use &for_pre_body instead of pre_p if
2998         for_pre_body is non-empty.
3000 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3002         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3003         double-double modes to SFmode directly directly.
3004         (trunc<mode>sf2_fprs): Delete.
3006 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3008         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3009         for conversions between IFmode and the decimal floating point modes.
3010         (init_float128_ieee): Use the correct names for conversions between
3011         KFmode and the decimal floating point modes.
3013 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3015         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3016         for the conversions between TDmode and IFmode.
3017         (init_float128_ieee): Use more correct names for the conversions
3018         between TDmode and KFmode.
3020 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3022         PR tree-optimization/86526
3023         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3024         (inline_expand_builtin_string_cmp): Likewise.
3025         (inline_string_cmp): Likewise.  Use c_readstr instead of
3026         builtin_memcpy_read_str.  Add unit_mode temporary.
3028 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3030         PR middle-end/86528
3031         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3032         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3034 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3036         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3037         Alphabetize prototypes of built-in functions, separating out
3038         built-in functions that are listed in this section but should be
3039         described elsewhere.
3041 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3043         PR target/86511
3044         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3045         conditional move when trapping comparison was split to a
3046         non-trapping one (and vice versa).
3048 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3050         * config/s390/s390.c (s390_function_profiler): Generate nops
3051         instead of profiler call sequences.
3052         * config/s390/s390.opt: Add the new option.
3054 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3056         * config/s390/s390.c (s390_function_profiler): Generate
3057         __mcount_loc section.
3058         * config/s390/s390.opt: Add the new option.
3060 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3062         * common.opt: Add the new warning.
3063         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3064         %r0,__fentry__" when -mfentry is specified.
3065         (s390_option_override_internal): Disallow -mfentry for 31-bit
3066         CPUs.
3067         * config/s390/s390.opt: Add the new option.
3069 2018-07-16  Richard Biener  <rguenther@suse.de>
3071         PR lto/86523
3072         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3073         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3075 2018-07-16  Martin Liska  <mliska@suse.cz>
3077         PR ipa/86529
3078         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3079         to ::get_create.
3081 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3083         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3085 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3087         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3088         for ARCHS4x.
3089         * config/arc/arc-cpus.def (hs4x): New cpu.
3090         (hs4xd): Likewise.
3091         * config/arc/arc-tables.opt: Regenerate.
3092         * config/arc/arc.c (arc_sched_issue_rate): New function.
3093         (TARGET_SCHED_ISSUE_RATE): Define.
3094         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3095         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3096         fpu_cvt.
3097         (attr tune): Add ARCHS4x tune values.
3098         (attr tune_dspmpy): Define.
3099         (*tst): Correct instruction type.
3100         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3101         * config/arc/arcHS4x.md: New file.
3102         * config/arc/fpu.md: Update instruction type attributes.
3103         * config/arc/t-multilib: Regenerate.
3105 2018-07-16  Tom de Vries  <tdevries@suse.de>
3107         PR debug/86455
3108         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3110 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3112         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3113         early clobber.
3115 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3117         PR tree-optimization/86514
3118         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3119         conversion to a boolean type from a type with greater precision.
3121 2018-07-16  Tom de Vries  <tdevries@suse.de>
3123         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3124         dump_flags request TDF_SLIM.
3126 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3128         * fold-const.c (int_const_binop_1): Abstract...
3129         (wide_int_binop): ...wide int code here.
3130         (poly_int_binop): ...poly int code here.
3131         Abstract the rest of int_const_binop_1 into int_const_binop.
3132         * fold-const.h (wide_int_binop): New.
3133         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3134         Remove useless PLUS/MINUS_EXPR case.
3135         (zero_nonzero_bits_from_vr): Move wide int code...
3136         (zero_nonzero_bits_from_bounds): ...here.
3137         (extract_range_from_binary_expr_1): Move mask optimization code...
3138         (range_easy_mask_min_max): ...here.
3139         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3140         (range_easy_mask_min_max): New.
3142 2018-07-15  Jeff Law  <law@redhat.com>
3144         PR target/85993
3145         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3146         block.
3148 2018-07-14  Jim Wilson  <jimw@sifive.com>
3150         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3152 2018-07-14  Paul Koning  <ni1d@arrl.net>
3154         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3156 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3158         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3159         copying section.
3161 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3162             Steve Munroe  <munroesj52@gmail.com>
3164         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3165         (_mm_andnot_si128): Likewise.
3166         (_mm_or_si128): Likewise.
3167         (_mm_xor_si128): Likewise.
3169 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3171         PR middle-end/78809
3172         * builtins.c (expand_builtin_memcmp): Inline the calls first
3173         when result_eq is false.
3174         (expand_builtin_strcmp): Inline the calls first.
3175         (expand_builtin_strncmp): Likewise.
3176         (inline_string_cmp): New routine. Expand a string compare
3177         call by using a sequence of char comparison.
3178         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3179         a call to str(n)cmp/memcmp.
3180         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3181         New option.
3182         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3184 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3186         * config/arm/driver-arm.c: Include arm-native.h.
3187         (host_detect_local_cpu): Use auto-generated data tables.
3188         (vendors, arm_cpu_table): Delete.  Move part information to ...
3189         * config/arm/arm-cpus.in: ... here.
3190         * config/arm/parsecpu.awk (gen_native): New function.
3191         (vendor, part): New CPU fields.
3192         (END): Add support for building the native CPU detection tables.
3193         * config/arm/t-arm (arm-native.h): Add build rule.
3194         (driver-arm.o): Add dependency on arm-native.h.
3196 2018-07-13  Richard Biener  <rguenther@suse.de>
3198         PR middle-end/85974
3199         * match.pd (addr1 - addr2): Allow either of the operand to
3200         have a conversion.
3202 2018-07-13  Tom de Vries  <tdevries@suse.de>
3204         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3205         in remap_ssa_name.
3207 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3209         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3210         arrays instead of numbered variables.
3212 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3214         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3215         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3217 2018-07-13  Richard Biener  <rguenther@suse.de>
3219         PR debug/86452
3220         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3221         instead of get_context_die.
3223 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3224             Richard Biener  <rguenther@suse.de>
3226         PR middle-end/86489
3227         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3228         that the loop latch destination where phi is defined.
3230 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3232         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3233         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3234         (riscv_set_current_function): Extract getting interrupt type to new
3235         function.
3236         (riscv_get_interrupt_type): New function.
3237         (riscv_merge_decl_attributes): New function, checking interrupt type is
3238         same.
3239         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3241 2018-07-12  Paul Koning  <ni1d@arrl.net>
3243         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3244         directive.
3246 2018-07-12  Paul Koning  <ni1d@arrl.net>
3248         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3249         zero reference, add doloop_end instead.
3250         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3251         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3252         detail for doloop_end.
3254 2018-07-12  Martin Sebor  <msebor@redhat.com>
3256         PR c/86453
3257         * attribs.c (decl_attributes): Reject conflicting attributes before
3258         calling attribute handlers.
3260 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3262         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3263          parameter.
3264         (gcc::dump_manager::get_dump_file_name): likewise.
3265         (dump_begin): Likewise.
3266         * dumpfile.h (dump_begin): Update prototype.
3267         (gcc::dump_manager::get_dump_file_name,
3268         gcc::dump_manager::get_dump_file_name): Update prototype.
3270 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3272         * internal-fn.h (vectorizable_internal_fn_p): New function.
3273         * tree-vect-slp.c (compatible_calls_p): Likewise.
3274         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3275         to internal functions.
3276         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3278 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3280         * fold-const.h (inverse_conditions_p): Declare.
3281         * fold-const.c (inverse_conditions_p): New function.
3282         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3283         that test the inverse condition of a conditional internal function.
3284         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3285         * internal-fn.c (internal_fn_mask_index): Handle conditional
3286         internal functions.
3287         (vectorized_internal_fn_supported_p): New function.
3288         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3289         (any_pred_load_store): Replace with...
3290         (need_to_predicate): ...this new variable.
3291         (redundant_ssa_names): New variable.
3292         (ifcvt_can_use_mask_load_store): Move initial checks to...
3293         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3294         for which a conditional internal function exists.
3295         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3296         instead of ifcvt_can_use_mask_load_store.  Update after variable
3297         name change.
3298         (predicate_load_or_store): New function, split out from
3299         predicate_mem_writes.
3300         (check_redundant_cond_expr): New function.
3301         (value_available_p): Likewise.
3302         (predicate_rhs_code): Likewise.
3303         (predicate_mem_writes): Rename to...
3304         (predicate_statements): ...this.  Use predicate_load_or_store
3305         and predicate_rhs_code.
3306         (combine_blocks, tree_if_conversion): Update after above name changes.
3307         (ifcvt_local_dce): Handle redundant_ssa_names.
3308         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3309         general conditional functions.
3310         * tree-vect-stmts.c (vectorizable_call): Likewise.
3312 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3313             Alan Hayward  <alan.hayward@arm.com>
3314             David Sherwood  <david.sherwood@arm.com>
3316         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3317         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3318         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3319         plus and minus and convert them into IFN_COND_FMA-based sequences.
3320         (convert_mult_to_fma): Handle conditional plus and minus.
3322 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3324         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3325         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3326         (cond_fnms_optab): New optabs.
3327         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3328         internal functions.
3329         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3330         * internal-fn.h (get_conditional_internal_fn): Declare.
3331         (get_unconditional_internal_fn): Likewise.
3332         * internal-fn.c (cond_ternary_direct): New macro.
3333         (expand_cond_ternary_optab_fn): Likewise.
3334         (direct_cond_ternary_optab_supported_p): Likewise.
3335         (FOR_EACH_COND_FN_PAIR): Likewise.
3336         (get_conditional_internal_fn): New function.
3337         (get_unconditional_internal_fn): Likewise.
3338         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3339         (gimple_match_op::gimple_match_op): Add a new overload for 5
3340         operands.
3341         (gimple_match_op::set_op): Likewise.
3342         (gimple_resimplify5): Declare.
3343         * genmatch.c (decision_tree::gen): Generate simplifications for
3344         5 operands.
3345         * gimple-match-head.c (gimple_simplify): Define an overload for
3346         5 operands.  Handle calls with 5 arguments in the top-level overload.
3347         (convert_conditional_op): Handle conversions from unconditional
3348         internal functions to conditional ones.
3349         (gimple_resimplify5): New function.
3350         (build_call_internal): Pass a fifth operand.
3351         (maybe_push_res_to_seq): Likewise.
3352         (try_conditional_simplification): Try converting conditional
3353         internal functions to unconditional internal functions.
3354         Handle 3-operand unconditional forms.
3355         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3356         Define ternary equivalents of the current rules for binary conditional
3357         internal functions.
3358         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3359         ternary operations.
3360         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3361         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3362         (optab): Handle them.
3363         (SVE_COND_FP_TERNARY): New int iterator.
3364         (sve_fmla_op, sve_fmad_op): New int attributes.
3365         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3366         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3367         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3369 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3371         * target.def (preferred_else_value): New target hook.
3372         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3373         * doc/tm.texi: Regenerate.
3374         * targhooks.h (default_preferred_else_value): Declare.
3375         * targhooks.c (default_preferred_else_value): New function.
3376         * internal-fn.h (conditional_internal_fn_code): Declare.
3377         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3378         (get_conditional_internal_fn): Use it.
3379         (conditional_internal_fn_code): New function.
3380         * gimple-match.h (gimple_match_cond): New struct.
3381         (gimple_match_op): Add a cond member function.
3382         (gimple_match_op::gimple_match_op): Update all forms to take a
3383         gimple_match_cond.
3384         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3385         for the suboperation, but don't specify a particular else_value.
3386         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3387         (visit_nary_op, visit_reference_op_load): Pass
3388         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3389         * gimple-match-head.c: Include tree-eh.h
3390         (convert_conditional_op): New function.
3391         (maybe_resimplify_conditional_op): Likewise.
3392         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3393         (gimple_resimplify2): Likewise.
3394         (gimple_resimplify3): Likewise.
3395         (gimple_resimplify4): Likewise.
3396         (maybe_push_res_to_seq): Return null for conditional operations.
3397         (try_conditional_simplification): New function.
3398         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3399         constructor.
3400         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3401         IFN_COND_* call.
3402         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3403         function.
3404         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3406 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3408         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3409         DECL_FCONTEXT
3410         (hash_tree): Do not hash DECL_FCONTEXT
3411         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3412         Do not stream DECL_FCONTEXT.
3413         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3414         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3416 2018-07-12  Richard Biener  <rguenther@suse.de>
3418         PR debug/86462
3419         * dwarf2out.c (gen_block_die): Only output blocks when they have
3420         at least one !DECL_IGNORED_P variable.
3422 2018-07-12  Richard Biener  <rguenther@suse.de>
3424         PR target/84829
3425         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3426         Remove -mieee-fp handling.
3428 2018-07-12  Richard Biener  <rguenther@suse.de>
3430         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3431         left-over from last patch.
3433 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3435         PR tree-optimization/86492
3436         * gimple-ssa-store-merging.c
3437         (imm_store_chain_info::coalesce_immediate_stores): Call
3438         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3440 2018-07-12  Richard Biener  <rguenther@suse.de>
3442         PR middle-end/86479
3443         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3444         move possibly trapping operations into the conditional.
3446 2018-07-12  Richard Biener  <rguenther@suse.de>
3448         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3449         (vn_lookup_simplify_result): Remove recursion limit applied
3450         here.
3451         (vn_nary_build_or_lookup_1): Adjust.
3452         (try_to_simplify): Likewise.
3453         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3454         here.
3455         (gimple_resimplify2): Likewise.
3456         (gimple_resimplify3): Likewise.
3457         (gimple_resimplify4): Likewise.
3459 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3461         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3462         Use __mmask64 type instead of __mmask8 for __M argument.
3463         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3464         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3465         __U argument.
3466         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3467         __mmask16 for __M argument.
3468         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3469         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3470         to __mmask16 instead of __mmask8.
3471         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3472         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3473         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3474         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3475         instead of __mmask16 for __U argument.
3476         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3477         __mmask16 instead of __mmask8 for __U argument.
3478         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3479         __U argument.
3480         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3481         __mmask16.
3482         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3483         argument.
3484         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3485         __U argument.
3486         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3487         __mmask16.
3488         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3489         of __mmask16.
3490         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3491         __U argument.
3492         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3493         __U argument.
3494         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3495         __U argument.
3496         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3497         __U argument.
3498         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3499         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3500         return type as well as __M argument type and all casts from __mmask8
3501         to __mmask32.
3502         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3503         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3504         return type as well as __M argument type and all casts from __mmask8
3505         to __mmask16.
3506         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3507         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3508         return type as well as __M argument type and all casts from __mmask8
3509         to __mmask32.
3510         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3511         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3512         return type as well as __M argument type and all casts from __mmask8
3513         to __mmask16.
3514         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3515         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3516         __mmask16.
3518 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3520         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3521         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3522         for __U argument.
3524 2018-07-11  Paul Koning  <ni1d@arrl.net>
3526         * doc/md.texi (define_subst): Document how multiple occurrences of
3527         the same argument in the replacement pattern are handled.
3529 2018-07-11  Paul Koning  <ni1d@arrl.net>
3531         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3532         alphabetical order.
3533         (Common Type Attributes): Add "mode" attribute.
3535 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3537         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3538         stream DECL_ORIGINAL_TYPE.
3539         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3540         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3541         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3542         Do not walk original type.
3543         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3544         external decls.
3545         (write_ts_decl_non_common_tree_pointers): Do not stream
3546         DECL_ORIGINAL_TYPE
3547         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3548         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3550 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3552         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3553         thread twice from the same starting edge.
3555 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3557         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3558         * gimple.c (gimple_call_nonnull_result_p): ...here...
3559         (gimple_call_nonnull_arg): ...and here.
3560         * gimple.h (gimple_call_nonnull_result_p): New.
3561         (gimple_call_nonnull_arg): New.
3563 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3565         * config/arm/arm-cpus.in: Move information from fpu field of each
3566         cpu definition to the isa field.
3567         * config/arm/parsecpu.awk (fpu): Delete match rule.
3568         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3570 2018-07-11  Richard Biener  <rguenther@suse.de>
3572         PR debug/86457
3573         * dwarf2out.c (init_sections_and_labels): Use
3574         output_asm_line_debug_info consistently.
3575         (dwarf2out_early_finish): Likewise.
3576         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3577         type units.
3579 2018-07-11  Richard Biener  <rguenther@suse.de>
3581         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3582         Rework father_bb setting in a way to avoid propagating constants
3583         multiple times on a loop body.
3585 2018-07-10  Mark Wielaard  <mark@klomp.org>
3587         PR debug/86459
3588         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3590 2018-07-10  Richard Biener  <rguenther@suse.de>
3592         * hash-map.h (hash_map::iterator::operator*): Return
3593         references to key and value.
3595 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3597         PR c++/86443
3598         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3599         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3600         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3601         (gimplify_omp_for): For composite loops, move outer
3602         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3603         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3604         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3605         TREE_LIST for both the original class iterator and the "last" helper
3606         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3607         loop, remember has_decl_expr from outer composite loops for the
3608         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3610 2018-07-09  Martin Sebor  <msebor@redhat.com>
3612         PR middle-end/77357
3613         PR middle-end/86428
3614         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3615         accessing implicitly initialized array elements.
3616         * expr.c (string_constant): Handle string initializers of
3617         character arrays within aggregates.
3618         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3619         Store element offset.  As a special case, handle zero size.
3620         (fold_nonarray_ctor_reference): Same.
3621         (fold_ctor_reference): Add argument.  Store subobject offset.
3622         * gimple-fold.h (fold_ctor_reference): Add argument.
3624 2018-07-09  Paul Koning  <ni1d@arrl.net>
3626         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3627         (pdp11_insn_cost): New function.
3628         (pdp11_md_asm_adjust): New function.
3629         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3630         (pdp11_rtx_costs): Update to match machine better.
3631         (output_addr_const_pdp11): Correct format mismatch warnings.
3632         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3633         * config/pdp11/pdp11.md: General change to add base_cost and/or
3634         length attributes for use by new pdp11_insn_cost function.
3635         (MIN_BRANCH): Correct definition.
3636         (MIN_SOB): Ditto.
3637         (doloop_end): Use standard pattern name for looping pattern.
3638         (doloop_end_nocc): New.
3639         (movsf): Add another constraint alternative.
3640         (zero_extendqihi2): Add constraint alternatives for not in place
3641         extend.
3642         (zero_extendhisi2): Remove.
3643         (shift patterns): Add CC handling variants.
3644         (bswaphi2): New.
3645         (bswapsi2): New.
3646         (rothi3): New.
3647         (define_peephole2): New peephole to recognize mov that sets CC for
3648         subsequent test.
3650 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3652         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3653         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3654         wi::add.
3656 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
3658         PR c/86420
3659         * real.c (real_nextafter): Return true if result is denormal.
3661 2018-07-09  Martin Liska  <mliska@suse.cz>
3663         * common.opt: Add back wrongly removed attribute.
3665 2018-07-09  Richard Biener  <rguenther@suse.de>
3667         PR debug/86413
3668         * dwarf2out.c (gen_block_die): For an early generated DIE
3669         always output high/low PC attributes.
3671 2018-07-09  Tom de Vries  <tdevries@suse.de>
3673         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3674         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3675         onto VAR_DECL with abstract origin.
3677 2018-07-07  Jim Wilson  <jimw@sifive.com>
3679         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3681 2018-07-07  Tom de Vries  <tdevries@suse.de>
3683         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3685 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
3687         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3688         overflow_type.
3689         (combine_bound): Use wide-int overflow calculation instead of
3690         rolling our own.
3691         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3692         overflow_type.
3693         * fold-const.c (int_const_binop_2): Same.
3694         (extract_muldiv_1): Same.
3695         (fold_div_compare): Same.
3696         (fold_abs_const): Same.
3697         * match.pd: Same.
3698         * poly-int.h (add): Same.
3699         (sub): Same.
3700         (neg): Same.
3701         (mul): Same.
3702         * predict.c (predict_iv_comparison): Same.
3703         * profile-count.c (slow_safe_scale_64bit): Same.
3704         * simplify-rtx.c (simplify_const_binary_operation): Same.
3705         * tree-chrec.c (tree_fold_binomial): Same.
3706         * tree-data-ref.c (split_constant_offset_1): Same.
3707         * tree-if-conv.c (idx_within_array_bound): Same.
3708         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3709         * tree-ssa-phiopt.c (minmax_replacement): Same.
3710         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3711         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3712         * vr-values.c (vr_values::adjust_range_with_scev): Same.
3713         * wide-int.cc (wi::add_large): Same.
3714         (wi::mul_internal): Same.
3715         (wi::sub_large): Same.
3716         (wi::divmod_internal): Same.
3717         * wide-int.h: Change overflow type to overflow_type for neg, add,
3718         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3719         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3720         mul_internal, divmod_internal.
3721         (overflow_type): New enum.
3722         (accumulate_overflow): New.
3724 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3726         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3727         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3729 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3731         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3732         argument is checked for zero before entering loop, avoid checking again.
3734 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3736         * gimplify.h (generic_expr_could_trap_p): Set as global function.
3737         * gimplify.h (generic_expr_could_trap_p): Likwise.
3738         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3740 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
3742         PR tree-optimization/86401
3743         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3744         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3745         (fold_bit_and_mask): ... here.  New helper function for match.pd.
3746         * fold-const.h (fold_bit_and_mask): Declare.
3747         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3749 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3751         PR target/86324
3752         * target.def (translate_mode_attribute): New hook.
3753         * targhooks.h (default_translate_mode_attribute): Declare.
3754         * targhooks.c (default_translate_mode_attribute): New function.
3755         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3756         * doc/tm.texi: Regenerate.
3757         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3758         (rs6000_translate_mode_attribute): New function.
3760 2018-07-06  Paul Koning  <ni1d@arrl.net>
3762         * doc/md.texi (define_split): Document DONE and FAIL.
3763         (define_peephole2): Ditto.
3765 2018-07-05  Jeff Law  <law@redhat.com>
3767         PR tree-optimization/86010
3768         * tree-ssa-dse.c (compute_trims): More aggressively trim at
3769         both the head and tail of mem* and str* calls.
3771 2018-07-05  Jim Wilson  <jimw@sifive.com>
3773         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3775 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
3777         * config/aarch64/aarch64-simd.md: correct flags text for
3778         MIN_EXPR replacement.
3780 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
3782         * configure: Regenerated.
3784 2018-07-05  Carl Love  <cel@us.ibm.com>
3786         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3787         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3788         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3789         VSX_BUILTIN_DOUBLEL_V4SF.
3791 2018-07-05  Martin Sebor  <msebor@redhat.com>
3793         PR c++/86400
3794         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3795         than its domain to compute its the upper bound of a char array.
3797 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3799         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3800         * doc/cpp.texi: Update comment.
3801         * doc/tm.texi: Rebuilt.
3802         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3803         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3804         * doc/extend.texi (Backwards Compatibility): Clarify it is system
3805         headers affected by extern "C".
3806         * system.h: Poison NO_IMPLICIT_EXTERN_C.
3807         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3808         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3809         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3810         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3811         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3812         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3813         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3814         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3815         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3816         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3817         config/sparc/sp64-elf.h, config/spu/spu.h,
3818         config/stormy16/stormy16.h, config/v850/v850.h,
3819         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3820         define NO_IMPLICIT_EXTERN_C.
3821         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3823 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3825         PR target/84711
3826         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3827         instead of GET_MODE_SIZE when comparing Units.
3829 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3831         PR target/84711
3832         * rtlanal.c (set_noop_p): Constrain on mode change,
3833         include hard-reg-set.h
3835 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3837         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3839 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
3841         Revert
3842         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3844         PR sanitizer/84250
3845         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3846         libasan.
3847         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3849 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3851         PR sanitizer/84250
3852         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3853         libasan.
3854         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3856 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
3858         PR middle-end/86380
3859         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3861 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
3863         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3864         neg_*_op* variables.
3866 2018-07-04  Martin Liska  <mliska@suse.cz>
3868         * tree-switch-conversion.c: Define
3869         max_ratio_for_speed and max_ratio_for_size constants.
3871 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3872             Martin Liska  <mliska@suse.cz>
3874         PR middle-end/66240
3875         PR target/45996
3876         PR c/84100
3877         * common.opt: Rename align options with 'str_' prefix.
3878         * common/config/i386/i386-common.c (set_malign_value): New
3879         function.
3880         (ix86_handle_option): Use it to set -falign-* options/
3881         * config/aarch64/aarch64-protos.h (struct tune_params): Change
3882         type from int to string.
3883         * config/aarch64/aarch64.c: Update default values from int
3884         to string.
3885         * config/alpha/alpha.c (alpha_override_options_after_change):
3886         Likewise.
3887         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3888         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3889         max skip conditionally.
3890         * config/i386/freebsd.h (SUBALIGN_LOG): New.
3891         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3892         max skip conditionally.
3893         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3894         max skip conditionally.
3895         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3896         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3897         max skip conditionally.
3898         * config/i386/i386.c (struct ptt): Change type from int to
3899         string.
3900         (ix86_default_align): Set default values.
3901         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3902         max skip conditionally.
3903         * config/i386/iamcu.h (SUBALIGN_LOG): New.
3904         (ASM_OUTPUT_MAX_SKIP_ALIGN):
3905         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3906         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3907         max skip conditionally.
3908         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3909         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3910         * config/i386/x86-64.h (SUBALIGN_LOG): New.
3911         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3912         max skip conditionally.
3913         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3914         * config/ia64/ia64.c (ia64_option_override): Set default values
3915         for alignment options.
3916         * config/m68k/m68k.c: Handle new str_align_* options.
3917         * config/mips/mips.c (mips_set_compression_mode): Change
3918         type of constants.
3919         (mips_option_override): Set default values for options.
3920         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3921         Likewise.
3922         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3923         Likewise.
3924         * config/rx/rx.c (rx_option_override): Likewise.
3925         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3926         (LABEL_ALIGN): Use align_labels_log.
3927         (LOOP_ALIGN): Use align_loops_align.
3928         * config/s390/s390.c (s390_asm_output_function_label): Use new
3929         macros.
3930         * config/sh/sh.c (sh_override_options_after_change):
3931         Change type of constants.
3932         * config/spu/spu.c (spu_sched_init): Likewise.
3933         * config/sparc/sparc.c (sparc_option_override): Set default
3934         values for options.
3935         * config/visium/visium.c (visium_option_override): Likewise.
3936         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3937         emit p2align format with last argument if it's not needed.
3938         * doc/invoke.texi: Document extended format of -falign-*.
3939         * final.c: Use align_labels alignment.
3940         * flags.h (struct target_flag_state): Change type to use
3941         align_flags.
3942         (struct align_flags_tuple): New.
3943         (struct align_flags): Likewise.
3944         (align_loops_log): Redefine macro to use new types.
3945         (align_loops_max_skip): Redefine macro to use new types.
3946         (align_jumps_log): Redefine macro to use new types.
3947         (align_jumps_max_skip): Redefine macro to use new types.
3948         (align_labels_log): Redefine macro to use new types.
3949         (align_labels_max_skip): Redefine macro to use new types.
3950         (align_functions_log): Redefine macro to use new types.
3951         (align_loops): Redefine macro to use new types.
3952         (align_jumps): Redefine macro to use new types.
3953         (align_labels): Redefine macro to use new types.
3954         (align_functions): Redefine macro to use new types.
3955         (align_functions_max_skip): Redefine macro to use new types.
3956         (align_loops_value): New macro.
3957         (align_jumps_value): New macro.
3958         (align_labels_value): New macro.
3959         (align_functions_value): New macro.
3960         * function.c (invoke_set_current_function_hook): Propagate
3961         alignment values from flags to global variables default in
3962         topleev.h.
3963         * ipa-icf.c (sem_function::equals_wpa): Use
3964         cl_optimization_option_eq instead of memcmp.
3965         * lto-streamer.h (cl_optimization_stream_out): Support streaming
3966         of string types.
3967         (cl_optimization_stream_in): Likewise.
3968         * optc-save-gen.awk: Support strings in cl_optimization.
3969         * opth-gen.awk: Likewise.
3970         * opts.c (finish_options): Remove error checking of invalid
3971         value ranges.
3972         (MAX_CODE_ALIGN): Remove.
3973         (MAX_CODE_ALIGN_VALUE): Likewise.
3974         (parse_and_check_align_values): New function.
3975         (check_alignment_argument): Likewise.
3976         (common_handle_option): Use check_alignment_argument.
3977         * opts.h (parse_and_check_align_values): Declare.
3978         * toplev.c (init_alignments): Remove.
3979         (read_log_maxskip): New.
3980         (parse_N_M): Likewise.
3981         (parse_alignment_opts): Likewise.
3982         (backend_init_target): Remove usage of init_alignments.
3983         * toplev.h (parse_alignment_opts): Declare.
3984         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3985         argument.
3986         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3987         * tree.c (cl_option_hasher::equal): New.
3988         * varasm.c: Use new global macros.
3990 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3992         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3993         Use a simpler align directive also if MAXSKIP = ALIGN-1.
3994         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3995         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3996         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3997         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3998         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3999         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4000         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4001         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4002         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4003         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4004         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4006 2018-07-04  Martin Liska  <mliska@suse.cz>
4007             Jonathan Wakely  <jwakely@redhat.com>
4009         * coverage.c: Use correct type.
4010         * doc/invoke.texi: Language correction.
4012 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4014         PR target/85620
4015         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4016         ENDBRANCH for non-tail call which may return via indirect branch.
4017         * doc/extend.texi: Document indirect_return attribute.
4019 2018-07-03  Martin Sebor  <msebor@redhat.com>
4021         PR tree-optimization/86274
4022         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4023         precondition.
4024         (format_floating): Correct handling of infinities and NaNs.
4026 2018-07-03  Martin Sebor  <msebor@redhat.com>
4028         * print-tree.c (print_real_cst): New function.
4029         (print_node_brief): Call it.
4030         (print_node): Ditto.
4032 2018-07-03  Jeff Law  <law@redhat.com>
4034         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4035         into a single pattern.
4037         * config/h8300/h8300.md (ors code_iterator): New.
4038         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4039         a single pattern and single splitter.
4040         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4041         (iorqi3_1, xorqi3_1): Likewise.
4042         (iorqi3, xorqi3 expanders): Similarly.
4044         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4045         (movmd_internal) into a single pattern using the P mode iterator.
4046         (movmd splitters): Similarly.
4047         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4048         (movsd splitters): Similarly.
4050         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4051         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4052         right table based on the size of the operand.
4053         * config/h8300/h8300.md (length_table): Corresponding changes. All
4054         references to "addb", "addw" and "addl" changed to "add".
4055         (btst patterns): Merge two variants into a single pattern.
4056         (tstqi, tsthi): Likewise.
4057         (addhi3_incdec, addsi3_incdec): Likewise.
4058         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4059         (mulhi3, mulsi3): Likewise.
4060         (udivhi3, udivsi3): Likewise.
4061         (divhi3, divsi3): Likewise.
4062         (andorqi3, andorhi3, andorsi3): Likewise.
4064 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4066         PR target/85694
4067         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4068         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4070 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4072         PR tree-optimization/85694
4073         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4074         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4075         UNSPEC_URHADD.
4076         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4077         (<u>avg<mode>3_ceil): New patterns.
4079 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4081         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4082         scan-tree-dump directive.
4083         * gcc.dg/vect/slp-perm-2.c: Likewise.
4084         * gcc.dg/vect/slp-perm-3.c: Likewise.
4085         * gcc.dg/vect/slp-perm-5.c: Likewise.
4086         * gcc.dg/vect/slp-perm-6.c: Likewise.
4087         * gcc.dg/vect/slp-perm-7.c: Likewise.
4088         * gcc.dg/vect/slp-perm-8.c: Likewise.
4090 2018-07-03  Marek Polacek  <polacek@redhat.com>
4092         PR middle-end/86202
4093         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4095 2018-07-03  Richard Biener  <rguenther@suse.de>
4097         PR ipa/86389
4098         * tree-ssa-structalias.c (find_func_clobbers): Properly
4099         handle indirect calls.
4101 2018-07-03  Jeff Law  <law@redhat.com>
4103         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4104         (shifts): New code iterator.
4105         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4106         expander.  Fix HImode handling on H8/SX.
4107         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4108         (subqi3, subhi3, subsi3 expanders): Likewise.
4109         (andqi3, andhi3, andsi3 expanders): Likewise.
4110         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4111         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4112         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4113         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4114         (zero_extendqihi2, zero_extendqisi2): Likewise.
4115         (extendqihi2, extendqisi2): Likewise.
4116         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4117         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4118         (rotlqi3_1, rotlhi3_1): Likewise.
4119         (logicalhi3_sn, logicalsi3_sn): Likewise.
4120         (logicalhi3, logicalsi3): Likewise.
4122 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4124         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4125         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4126         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4127         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4128         type to append_pattern_def_seq instead of creating a stmt_vec_info
4129         directly.
4130         (build_mask_conversion): Likewise.  Remove vinfo argument.
4131         (vect_add_conversion_to_patterm): Likewise, renaming to...
4132         (vect_add_conversion_to_pattern): ...this.
4133         (vect_recog_mask_conversion_pattern): Update call to
4134         build_mask_conversion.  Pass the vector type to
4135         append_pattern_def_seq here too.
4136         (vect_recog_gather_scatter_pattern): Update call to
4137         vect_add_conversion_to_pattern.
4139 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4141         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4142         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4143         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4144         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4145         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4146         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4147         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4148         append_pattern_def_seq instead of new_pattern_def_seq.
4149         (vect_recog_divmod_pattern): Do both of the above.
4150         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4151         is null.
4153 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4155         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4156         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4157         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4158         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4159         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4160         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4161         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4162         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4163         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4164         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4165         parameter with a single stmt_vec_info.
4166         (vect_recog_func_ptr): Likewise.
4167         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4168         (vect_try_gather_scatter_pattern): ...this.
4169         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4170         the stmt_vec_info of the statement to be matched.  Don't clear
4171         STMT_VINFO_RELATED_STMT.
4172         (vect_pattern_recog): Update call accordingly.
4174 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4176         PR tree-optimization/85694
4177         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4178         (uavgM3_ceil): Document new optabs.
4179         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4180         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4181         functions.
4182         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4183         (savg_ceil_optab): New optabs.
4184         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4185         (vect_vect_recog_func_ptrs): Add it.
4186         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4187         constant directly from the associated lhs.
4189 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4191         * tree-vect-patterns.c (vect_split_statement): New function.
4192         (vect_convert_input): Use it to try to split an existing cast.
4194 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4196         * poly-int.h (print_hex): New function.
4197         * dumpfile.h (dump_dec, dump_hex): Declare.
4198         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4199         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4200         min_input_precision, operation_precision and operation_sign.
4201         * tree-vect-patterns.c (vect_get_range_info): New function.
4202         (vect_same_loop_or_bb_p, vect_single_imm_use)
4203         (vect_operation_fits_smaller_type): Delete.
4204         (vect_look_through_possible_promotion): Add an optional
4205         single_use_p parameter.
4206         (vect_recog_over_widening_pattern): Rewrite to use new
4207         stmt_vec_info infomration.  Handle one operation at a time.
4208         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4209         (vect_truncatable_operation_p, vect_set_operation_type)
4210         (vect_set_min_input_precision): New functions.
4211         (vect_determine_min_output_precision_1): Likewise.
4212         (vect_determine_min_output_precision): Likewise.
4213         (vect_determine_precisions_from_range): Likewise.
4214         (vect_determine_precisions_from_users): Likewise.
4215         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4216         (vect_vect_recog_func_ptrs): Put over_widening first.
4217         Add cast_forwprop.
4218         (vect_pattern_recog): Call vect_determine_precisions.
4220 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4222         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4223         statements that have been replaced by further pattern statements.
4224         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4226 2018-07-03  Richard Biener  <rguenther@suse.de>
4228         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4229         always set *dt.  Dump vectype in vectype overload.
4230         * dumpfile.h (dump_gimple_expr): New function.
4231         (dump_gimple_expr_loc): Likewise.
4232         * dumpfile.c (dump_gimple_expr): New function.
4233         (dump_gimple_expr_loc): Likewise.
4235 2018-07-02  Jeff Law  <law@redhat.com>
4237         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4238         the H8/300, H8/300H and H8/S variants into a single pattern.
4239         (movhi_h8300, movqi_h8300hs): Similarly.
4240         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4241         (QHI mode iterator): New.
4243         * config/h8300/h8300.md: Remove trailing whitespace.
4245 2018-07-02  Jim Wilson  <jimw@sifive.com>
4247         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4248         instead of emit_insn for interrupt returns.
4249         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4250         (riscv_sret, riscv_uret): Likewise.
4252 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4254         * pretty-print.c (selftest::test_pp_format): Move save and restore
4255         of quotes to class auto_fix_quotes, and add an instance.
4256         * selftest.c: Include "intl.h".
4257         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4258         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4259         * selftest.h (selftest::auto_fix_quotes): New class.
4261 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4263         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4264         (aarch64_sve_prepare_conditional_op): Remove.
4265         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4266         Allow aarch64_simd_reg_or_zero as select operand; remove
4267         the aarch64_sve_prepare_conditional_op call.
4268         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4269         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4270         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4271         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4272         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4273         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4274         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4275         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4276         and a splitters to match all of the *_any patterns.
4277         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4279         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4280         (SVE_COND_FP_BINARY_REV): Remove.
4281         (sve_int_op_rev, sve_fp_op_rev): New.
4282         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4283         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4284         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4285         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4286         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4287         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4288         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4289         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4290         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4292         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4293         Remove match_dup 1 from the inner unspec.
4294         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4296         * config/aarch64/aarch64.md (movprfx): New attr.
4297         (length): Default movprfx to 8.
4298         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4299         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4300         (*<su>mul<SVE_I>3_highpart): Likewise.
4301         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4302         (*v<ASHIFT><SVE_I>3): Likewise.
4303         (*<su><MAXMIN><SVE_I>3): Likewise.
4304         (*<su><MAXMIN><SVE_F>3): Likewise.
4305         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4306         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4307         (*div<SVE_F>4): Likewise.
4309 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4311         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4312         in dump string.
4314 2018-07-02  Richard Biener  <rguenther@suse.de>
4316         PR tree-optimization/86363
4317         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4318         memset argument refers to a non-variable address.
4320 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4322         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4323         {PLUS,MINUS}_EXPR code to...
4324         (adjust_symbolic_bound): ...here,
4325         (combine_bound): ...here,
4326         (set_value_range_with_overflow): ...and here.
4328 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4330         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4331         code...
4332         (extract_range_from_abs_expr): ...here.
4334 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4336         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4337         -fno-omit-frame-pointer when not optimizing.
4339 2018-07-02  Martin Liska  <mliska@suse.cz>
4341         PR ipa/86279
4342         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4343         (propagate_nothrow): Likewise.
4345 2018-07-02  Martin Liska  <mliska@suse.cz>
4347         PR ipa/86323
4348         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4350 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4352         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4353         function in r262149, changing "loc" param from source_location to
4354         const dump_location_t &.
4355         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4356         declaration, as above.
4358 2018-07-01  Paul Koning  <ni1d@arrl.net>
4360         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4361         -munit-asm, -mgnu-asm, -mdec-asm.
4362         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4363         (pdp11_output_labelref): New.
4364         (pdp11_output_def): New.
4365         (pdp11_output_addr_vec_elt): New.
4366         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4367         %# and %@ format codes.
4368         (pdp11_option_override): New.
4369         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4370         (pdp11_output_ident): New.
4371         (pdp11_asm_named_section): New.
4372         (pdp11_asm_init_sections): New.
4373         (pdp11_file_start): New.
4374         (pdp11_file_end): New.
4375         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4376         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4377         %o, like %c but octal.
4378         (pdp11_option_override): New.
4379         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4380         -mdec-asm.
4381         (DATA_SECTION_ASM_OP): Ditto.
4382         (READONLY_DATA_SECTION_ASM_OP): New.
4383         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4384         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4385         (ASM_OUTPUT_LABELREF): Ditto.
4386         (ASM_OUTPUT_DEF): Ditto.
4387         (ASM_OUTPUT_EXTERNAL): New.
4388         (ASM_OUTPUT_SOURCE_FILENAME): New.
4389         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4390         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4391         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4392         %# and %@ format codes.
4393         * config/pdp11/pdp11.opt (mgnu-asm): New.
4394         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4395         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4396         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4398 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4400         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4401         dereferencing path[] beyond its length.
4402         (debug_path): New.
4403         (debug_all_paths): New.
4404         (rewire_first_differing_edge): New.
4405         (adjust_paths_after_duplication): New.
4406         (duplicate_thread_path): Call adjust_paths_after_duplication.
4407         Add new argument.
4408         (thread_through_all_blocks): Add new argument to
4409         duplicate_thread_path.
4411 2018-06-30  Jim Wilson  <jimw@sifive.com>
4413         * config/riscv/predicates.md (p2m1_shift_operand): New.
4414         (high_mask_shift_operand): New.
4415         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4416         pattern using p2m1_shift_operand.
4417         (lshsi3_zero_extend_3+2): New combiner pattern using
4418         high_mask_shift_operand.
4420 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4422         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4423         split out from...
4424         (vect_recog_rotate_pattern): ...here.
4425         (vect_convert_input): Try to insert casts of invariants in the
4426         preheader.
4427         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4428         preheader to be empty.
4430 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4432         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4433         vector type.  If given, install it in the new statement's
4434         STMT_VINFO_VECTYPE.
4435         (vect_element_precision): New function.
4436         (vect_unpromoted_value): New struct.
4437         (vect_unpromoted_value::vect_unpromoted_value): New function.
4438         (vect_unpromoted_value::set_op): Likewise.
4439         (vect_look_through_possible_promotion): Likewise.
4440         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4441         (vect_widened_op_tree, vect_convert_input): Likewise.
4442         (vect_convert_inputs, vect_convert_output): Likewise.
4443         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4444         to handle the optional cast of the multiplication result and
4445         vect_widened_op_tree to detect the widened multiplication itself.
4446         Do not require the input and output of promotion casts to have
4447         the same sign, but base the signedness of the operation on the
4448         input rather than the result.  If the pattern includes two
4449         promotions, check that those promotions have the same sign.
4450         Do not restrict the MULT_EXPR handling to a double-width result;
4451         handle quadruple-width results and wider.  Use vect_convert_inputs
4452         to convert the inputs to the common type.
4453         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4454         to handle the optional cast of the ABS result.  Also allow a sign
4455         change or a sign extension between the ABS and MINUS.
4456         Use vect_widened_op_tree to detect the widened subtraction and use
4457         vect_convert_inputs to convert the inputs to the common type.
4458         (vect_handle_widen_op_by_const): Delete.
4459         (vect_recog_widen_op_pattern): New function.
4460         (vect_recog_widen_mult_pattern): Use it.
4461         (vect_recog_widen_shift_pattern): Likewise.
4462         (vect_recog_widen_sum_pattern): Use
4463         vect_look_through_possible_promotion to handle the promoted
4464         PLUS_EXPR operand.
4466 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4468         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4469         the containing gimple_seq *.
4470         * gimple-iterator.h (gsi_for_stmt): Declare it.
4471         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4472         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4473         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4474         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4475         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4476         checks.
4477         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4478         split out from...
4479         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4480         statement being replaced is part of an existing pattern
4481         definition sequence, inserting the new pattern statements before
4482         the original one.
4483         (vect_pattern_recog_1): Don't return a bool.  If the statement
4484         is already part of a pattern, instead apply pattern matching
4485         to the pattern definition statements.  Don't clear the
4486         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4487         (vect_pattern_recog): Don't break after the first match;
4488         continue processing the pattern definition statements instead.
4489         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4491 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4493         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4494         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4495         (vect_recog_widen_sum_pattern): Use it.
4497 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4499         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4500         phi is not a pattern statement and has not been replaced by
4501         a pattern statement.
4502         * tree-vect-patterns.c (type_conversion_p): Don't check
4503         STMT_VINFO_IN_PATTERN_P.
4504         (vect_recog_vector_vector_shift_pattern): Likewise.
4505         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4506         the pattern statement rather than the original statement; check
4507         directly for a WIDEN_MULT_EXPR here.
4508         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4509         vect_is_simple_use to return the pattern statement rather
4510         than the original statement; use is_pattern_stmt_p to check
4511         for such a pattern statement.
4512         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4513         to return the pattern statement rather than the original statement;
4514         don't do the same transformation here.
4515         (vect_is_simple_use): If the defining statement has been replaced
4516         by a pattern statement, return the pattern statement instead.
4517         Remove the corresponding (local) transformation from the vectype
4518         overload.
4520 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4522         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4523         end and default to null.
4524         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4525         (vectorizable_reduction): Update calls accordingly, dropping the
4526         gimple ** argument if the passed-back statement isn't needed.
4527         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4528         (vect_recog_rotate_pattern): Likewise.
4529         (vect_recog_mask_conversion_pattern): Likewise.
4530         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4531         (vect_mask_constant_operand_p): Likewise.
4532         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4533         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4534         (get_group_load_store_type, get_load_store_type): Likewise.
4535         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4536         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4537         (vectorizable_conversion, vectorizable_assignment): Likewise.
4538         (vectorizable_shift, vectorizable_operation): Likewise.
4539         (vectorizable_store, vect_is_simple_cond): Likewise.
4540         (vectorizable_condition, vectorizable_comparison): Likewise.
4541         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4542         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4543         and move it to the end.  Cope with null def_stmt_outs.
4545 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4547         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4549 2018-06-29  Jeff Law  <law@redhat.com>
4551         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4552         displacements for TARGET_V850E2V3 and newer.
4553         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4554         * config/v850/v850.md (sign23byte_load): Remove.
4555         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4556         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4558 2018-06-29  Martin Liska  <mliska@suse.cz>
4560         PR lto/85759
4561         * coverage.c (coverage_init): Mangle full path name.
4562         * doc/invoke.texi: Document the change.
4563         * gcov-io.c (mangle_path): New.
4564         * gcov-io.h (mangle_path): Likewise.
4565         * gcov.c (mangle_name): Use mangle_path for path mangling.
4567 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4569         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4570         if starting source register is not even.
4572 2018-06-29  Martin Liska  <mliska@suse.cz>
4574         PR tree-optimization/86263
4575         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4576         Make edge redirection.
4578 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4580         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4581         (dump_scope_depth): New variable.
4582         (get_dump_scope_depth): New function.
4583         (dump_begin_scope): New function.
4584         (dump_end_scope): New function.
4585         * dumpfile.h (get_dump_scope_depth): New declaration.
4586         (dump_begin_scope): New declaration.
4587         (dump_end_scope): New declaration.
4588         (class auto_dump_scope): New class.
4589         (AUTO_DUMP_SCOPE): New macro.
4590         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4591         AUTO_DUMP_SCOPE.
4593 2018-06-29  Richard Biener  <rguenther@suse.de>
4595         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4596         compute_all_dependences succeeds.
4597         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4598         exceed --param loop-max-datarefs-for-datadeps.
4600 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4602         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4604 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4606         PR target/86348
4607         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4608         alternative 0 in preferred_for_speed attribute.
4610 2018-06-28  Paul Koning  <ni1d@arrl.net>
4612         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4613         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4614         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4615         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4616         for shift insn patterns.
4618 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4620         * cgraph.c (cgraph_node::get_body): Replace assignments to
4621         "dump_file" with calls to set_dump_file.
4622         * dumpfile.c (alt_dump_file): Make static, and group with...
4623         (alt_flags): ...this definition.
4624         (dumps_are_enabled): New variable.
4625         (refresh_dumps_are_enabled): New function.
4626         (set_dump_file): New function.
4627         (set_alt_dump_file): New function.
4628         (gcc::dump_manager::dump_start): Replace assignments to
4629         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4630         set_alt_dump_file.
4631         (gcc::dump_manager::dump_finish): Likewise.
4632         * dumpfile.h (alt_dump_file): Delete decl.
4633         (dumps_are_enabled): New variable decl.
4634         (set_dump_file): New function decl.
4635         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4636         global.
4637         * tree-nested.c (lower_nested_functions): Replace assignments to
4638         "dump_file" with calls to set_dump_file.
4640 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4642         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4643         goto_locus of each outgoing edge of each basic block.
4645 2018-06-28  Richard Biener  <rguenther@suse.de>
4647         * dwarf2out.c (decl_scope_table): Remove.
4648         (push_decl_scope): Likewise.
4649         (pop_decl_scope): Likewise.
4650         (gen_type_die_for_member): Do not call push/pop_decl_scope.
4651         (gen_struct_or_union_type_die): Likewise.
4652         (gen_tagged_type_die): Likewise.
4653         (dwarf2out_init): Do not initialize decl_scope_table.
4654         (dwarf2out_c_finalize): Do not free it.
4656 2018-06-28  Richard Biener  <rguenther@suse.de>
4658         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4659         deciding whether to not re-use a DIE.
4661 2018-06-28  Richard Biener  <rguenther@suse.de>
4663         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4664         DW_AT_abstract_origin attribute.
4666 2018-06-28  Martin Liska  <mliska@suse.cz>
4668         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4669         Use newly introduced constants.
4670         * tree-switch-conversion.h (struct jump_table_cluster):
4671         Define max_ratio_for_size and max_ratio_for_speed.
4673 2018-06-28  Martin Liska  <mliska@suse.cz>
4675         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4676         Add new checking assert to catch invalid state.
4677         (jump_table_cluster::can_be_handled): Handle single case
4678         clusters.
4679         (jump_table_cluster::is_beneficial): Bail out for such case.
4680         (bit_test_cluster::find_bit_tests):
4681         Add new checking assert to catch invalid state.
4682         (bit_test_cluster::can_be_handled): Handle single case
4683         clusters.
4684         (bit_test_cluster::is_beneficial): Bail out for such case.
4685         (switch_decision_tree::analyze_switch_statement):
4686         Fix comment.
4688 2018-06-28  Martin Liska  <mliska@suse.cz>
4690         * common.opt: Introduce -completion option.
4691         * gcc.c (driver_handle_option): Handle it.
4692         (driver::main): Print completions if completion
4693         is set.
4694         * opt-suggestions.c (option_proposer::get_completions):
4695         New function.
4696         (option_proposer::suggest_completion): Likewise.
4697         (option_proposer::find_param_completions): Likewise.
4698         (verify_autocompletions): Likewise.
4699         (test_completion_valid_options): Likewise.
4700         (test_completion_valid_params): Likewise.
4701         (in_completion_p): Likewise.
4702         (empty_completion_p): Likewise.
4703         (test_completion_partial_match): Likewise.
4704         (test_completion_garbage): Likewise.
4705         (opt_proposer_c_tests): Likewise.
4706         * opt-suggestions.h: Declare new functions.
4707         * opts.c (common_handle_option): Handle OPT__completion_.
4708         * selftest-run-tests.c (selftest::run_tests): Add
4709         opt_proposer_c_tests.
4710         * selftest.c (assert_str_startswith): New.
4711         * selftest.h (assert_str_startswith): Likewise.
4712         (opt_proposer_c_tests): New.
4713         (ASSERT_STR_STARTSWITH): Likewise.
4715 2018-06-28  Martin Liska  <mliska@suse.cz>
4717         * Makefile.in: Add opt-suggestions.o.
4718         * gcc-main.c: Include opt-suggestions.h.
4719         * gcc.c (driver::driver): Likewise.
4720         (driver::~driver): Remove m_option_suggestions.
4721         (driver::build_option_suggestions): Moved to option_proposer.
4722         (driver::suggest_option): Likewise.
4723         (driver::handle_unrecognized_options): Use option_proposer.
4724         * gcc.h (class driver): Add new memver m_option_proposer.
4725         * opt-suggestions.c: New file.
4726         * opt-suggestions.h: New file.
4728 2018-06-28  Martin Liska  <mliska@suse.cz>
4730         * vec.h (class auto_string_vec): New (moved from auto_argvec).
4731         (auto_string_vec::~auto_string_vec): Likewise.
4733 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4735         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4736         prevent_decl_creation_for_types fields up and add reset_location field.
4737         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4738         statement if id->reset_location is true.
4739         (copy_edges_for_bb): Do not set goto_locus on the new edges if
4740         id->reset_location is true.
4741         (copy_phis_for_bb): Force input_location on the arguments if
4742         id->reset_location is true.
4743         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4744         is set on the function to be inlined.
4746 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
4748         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4750 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
4752         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4753         registers for Pmode.
4754         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4755         hard registers for the clobbered pseudo.
4757 2018-06-27  Paul Koning  <ni1d@arrl.net>
4759         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4760         mutually exclusive options.
4761         * config/pdp11/constraints.md (h): New constraint.
4762         (O): Update definition to match shift code generation.
4763         (D): New constraint.
4764         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4765         (CCFP): Remove.
4766         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4767         function.
4768         (output_jump): Change arguments.
4769         (pdp11_fixed_cc_regs): New function.
4770         (pdp11_cc_mode): Ditto.
4771         (pdp11_expand_shift): Ditto.
4772         (pdp11_assemble_shift): Ditto.
4773         (pdp11_small_shift): Ditto.
4774         (pdp11_branch_cost): Remove.
4775         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4776         from output.
4777         (pdp11_register_move_cost): Update for CC registers.
4778         (pdp11_rtx_costs): Add case for LSHIFTRT.
4779         (pdp11_output_jump): Add CCNZ mode conditional branches.
4780         (notice_update_cc_on_set): Remove.
4781         (pdp11_cc_mode): New function.
4782         (simple_memory_operand): Correct pre/post decrement case.
4783         (no_side_effect_operand): New function.
4784         (pdp11_regno_reg_class): Add CC_REGS class.
4785         (pdp11_fixed_cc_regs): New function.
4786         (pdp11_small_shift): New function.
4787         (pdp11_expand_shift): New function to expand shift insns.
4788         (pdp11_assemble_shift): New function to output shifts.
4789         (pdp11_branch_cost): Remove.
4790         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4791         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4792         (WCHAR_TYPE): Ditto.
4793         (PTRDIFF_TYPE): Ditto.
4794         (ADJUST_INSN_LENGTH): New macro.
4795         (FIXED_REGISTERS): Add CC registers.
4796         (CALL_USED_REGISTERS): Ditto.
4797         (reg_class): Ditto.
4798         (REG_CLASS_NAMES): Ditto.
4799         (REG_CLASS_CONTENTS): Ditto.
4800         (SELECT_CC_MODE): Use new function.
4801         (TARGET_FLAGS_REGNUM): New macro.
4802         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4803         (cc0_reg_rtx): Remove.
4804         (CC_STATUS_MDEP): Remove.
4805         (CC_STATUS_MDEFP_INIT): Remove.
4806         (CC_IN_FPU): Remove.
4807         (NOTICE_UPDATE_CC): Remove.
4808         (REGISTER_NAMES): Add CC registers.
4809         (BRANCH_COST): Change to constant 1.
4810         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4811         handling.
4812         * config/pdp11/pdp11.opt (mbcopy): Remove.
4813         (mbcopy-builtin): Remove.
4814         (mbranch-cheap): Remove.
4815         (mbranch-expensive): Remove.
4816         * config/pdp11/predicates.md (expand_shift_operand): Update to
4817         match shift code generation.
4818         (ccnz_operator): New predicate.
4819         * doc/invoke.texi (PDP-11 Options): Remove deleted options
4820         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4821         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
4822         exclusive options.
4823         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
4824         description of O constraint.
4826 2018-06-27  Jeff Law  <law@redhat.com>
4827             Austin Law  <austinklaw@gmail.com>
4829         * config/v850/v850.md (addsi3_set_flags): New pattern.
4830         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4831         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4832         (zero_extendhisi2_v850_set_flags): Likewise.
4833         (zero_extendqisi2_v850_set_flags): Likewise.
4834         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4835         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4836         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4838         * config/v850/v850-protos.h (notice_update_cc): Remove.
4839         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4840         (v850_print_operand): Handle 'D' and "d".
4841         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4842         Add handling of arithmetic/logical operations compared against zero.
4843         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4844         Do not look at v850_compare_op, instead get mode from last argument.
4845         (v850_gen_compare): Remove
4846         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4847         after reload for prologue insns.
4848         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4849         patterns.
4850         (construct_save_jarl): Likewise.
4851         (TARGET_FLAGS_REGNUM): Define.
4852         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4853         (NOTICE_UPDATE_CC): Remove.
4854         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4855         than cc0.  Conditionalize on reload_completed.
4856         (cmpsi_insn, setfcc_insn): Likewise.
4857         (tst1 splitter): Turn into define_and_split which sets the flags
4858         after reload.
4859         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4860         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4861         (cstoresf4, cstoredf4): Clobber the flags.
4862         (cmpsi, cmpsf, cmpdf): Remove expanders.
4863         (setf_insn): Remove pattern.
4864         (addsi3): Turn into define_and_split which clobbers the flags after
4865         reload and a suitable pattern (addsi3_clobber_flags) for use after
4866         reload.
4867         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4868         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4869         (ashrsi3, ashrsi3_v850e2): Likewise.
4870         (bins): Clobber the flags.
4871         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4872         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4873         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4874         (call_value_internal_short, call_value_internal_long): Likewise.
4875         (callt_save_interrupt, callt_return_interrupt): Likewise.
4876         (save_interrupt, return_interrupt): Likewise.
4877         (callt_save_all_interrupt, save_all_interrupt): Likewise.
4878         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4879         (restore_all_interrupt, _restore_all_interrupt): Likewise.
4880         (All FP comparisons): Only allow after reload has completed.
4881         (trfsr): Likewise.
4882         (divh, divhu): Tweak output template.
4883         (branch_z_normal, branch_z_invert): Remove
4884         (branch_nz_normal, branch_nz_invert): Likewise.
4885         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4887         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4888         * config/v850/v850.c (notice_update_cc): Remove.
4889         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
4890         (CC_NO_CARRY): Likewise.
4891         (NOTICE_UPDATE_CC): Define to nothing.
4892         * config/v850/v850.md: Remove block comment on cc0 handling
4893         Remove "cc" attribute from all patterns.  Remove cc_status handling
4894         from all patterns.  Minor formatting fixes.
4896 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4898         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4899         (cortex-a76.cortex-a55): Likewise.
4900         * config/aarch64/aarch64-tune.md: Regenerate.
4901         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4902         cortex-a76.cortex-a55.
4904 2018-06-27  Jeff Law  <law@redhat.com>
4906         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4907         (MULTILIB_DIRNAMES): Similarly.
4909 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
4911         * gimple.h (gimple_return_retbnd): Delete.
4912         (gimple_return_set_retbnd): Likewise.
4913         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4914         gimple_return_set_retbnd.
4915         * gimple-pretty-print.c (dump_gimple_return): Remove call to
4916         gimple_return_retbnd and adjust.
4917         * tree-inline.h (struct copy_body_data): Remove retbnd field.
4918         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4919         Explicitly return NULL in a couple more cases.  Move assertion
4920         on debug statements and remove unreachable code.
4921         (reset_debug_binding): Do not test id->retbnd.
4922         (expand_call_inline): Do not set it.
4924 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4926         * configure.ac: Add --disable-gcov option.
4927         * configure: Regenerate.
4928         * Makefile.in: Honour @enable_gcov@.
4929         * doc/install.texi: Document --disable-gcov.
4931 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4933         * config/arm/arm-cpus.in (cortex-a76): New entry.
4934         (cortex-a76.cortex-a55): Likewise.
4935         * config/arm/arm-tables.opt: Regenerate.
4936         * config/arm/arm-tune.md: Likewise.
4937         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4938         * doc/invoke.texi (ARM Options): Document cortex-a76 and
4939         cortex-a76.cortex-a55.
4941 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
4943         PR target/85769
4944         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4946 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4948         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4949         comment.
4950         (EPILOGUE_USES): Likewise.
4952 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
4954         * tree-inline.c (remap_location): New function extracted from...
4955         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
4956         (copy_phis_for_bb): ...here.  Call remap_location.
4957         (copy_cfg_body): Adjust call to copy_edges_for_bb.
4959 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4961         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4962         unaligned vsx for 16B memset.
4964 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
4966         PR target/86285
4967         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4968         ieee128_float_type_node to long_double_type_node unless
4969         TARGET_LONG_DOUBLE_128 is set.
4971 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
4973         * cfgloop.c (get_loop_location): Convert return type from
4974         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4975         by implicit construction from rtx_insn *, and using
4976         dump_user_location_t::from_function_decl for the fallback case.
4977         * cfgloop.h (get_loop_location): Convert return type from
4978         location_t to dump_user_location_t.
4979         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4980         dump_printf_loc to pass in a dump_location_t rather than a
4981         location_t, via the gimple stmt.
4982         * coverage.c (get_coverage_counts): Update calls to
4983         dump_printf_loc to pass in dump_location_t rather than a
4984         location_t.
4985         * doc/optinfo.texi (Dump types): Convert example of
4986         dump_printf_loc from taking "locus" to taking "insn".  Update
4987         description of the "_loc" calls to cover dump_location_t.
4988         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4989         "selftest.h".
4990         (dump_user_location_t::dump_user_location_t): New constructors,
4991         from gimple *stmt and rtx_insn *.
4992         (dump_user_location_t::from_function_decl): New function.
4993         (dump_loc): Make static.
4994         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4995         const dump_location_t &.
4996         (dump_generic_expr_loc): Delete.
4997         (dump_printf_loc): Convert param "loc" from location_t to
4998         const dump_location_t &.
4999         (selftest::test_impl_location): New function.
5000         (selftest::dumpfile_c_tests): New function.
5001         * dumpfile.h: Include "profile-count.h".
5002         (class dump_user_location_t): New class.
5003         (struct dump_impl_location_t): New struct.
5004         (class dump_location_t): New class.
5005         (dump_printf_loc): Convert 2nd param from source_location to
5006         const dump_location_t &.
5007         (dump_generic_expr_loc): Delete.
5008         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5009         const dump_location_t &.
5010         * gimple-fold.c (fold_gimple_assign): Update call to
5011         dump_printf_loc to pass in a dump_location_t rather than a
5012         location_t, via the gimple stmt.
5013         (gimple_fold_call): Likewise.
5014         * gimple-loop-interchange.cc
5015         (loop_cand::analyze_iloop_reduction_var): Update for change to
5016         check_reduction_path.
5017         (tree_loop_interchange::interchange): Update for change to
5018         find_loop_location.
5019         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5020         change in return-type of find_loop_location.
5021         (graphite_regenerate_ast_isl): Likewise.
5022         * graphite-optimize-isl.c (optimize_isl): Likewise.
5023         * graphite.c (graphite_transform_loops): Likewise.
5024         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5025         pass in a dump_location_t rather than a location_t, via the
5026         gimple stmt.
5027         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5028         * ipa.c (walk_polymorphic_call_targets): Likewise.
5029         * loop-unroll.c (report_unroll): Convert "locus" param from
5030         location_t to dump_location_t.
5031         (decide_unrolling): Update for change to get_loop_location's
5032         return type.
5033         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5034         location_t to dump_user_location_t.
5035         (grid_find_single_omp_among_assignments_1): Updates calls to
5036         dump_printf_loc to pass in a dump_location_t rather than a
5037         location_t, via the gimple stmt.
5038         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5039         location_t to dump_location_t.  Updates calls to dump_printf_loc
5040         to pass in a dump_location_t rather than a location_t, via the
5041         gimple stmt.
5042         (grid_inner_loop_gridifiable_p): Likewise.
5043         (grid_dist_follows_simple_pattern): Likewise.
5044         (grid_gfor_follows_tiling_pattern): Likewise.
5045         (grid_target_follows_gridifiable_pattern): Likewise.
5046         (grid_attempt_target_gridification): Convert initialization
5047         of local "grid" from memset to zero-initialization; FIXME: does
5048         this require C++11?  Update call to dump_printf_loc to pass in a
5049         optinfo_location rather than a location_t, via the gimple stmt.
5050         * profile.c (read_profile_edge_counts): Updates call to
5051         dump_printf_loc to pass in a dump_location_t rather than a
5052         location_t
5053         (compute_branch_probabilities): Likewise.
5054         * selftest-run-tests.c (selftest::run_tests): Call
5055         dumpfile_c_tests.
5056         * selftest.h (dumpfile_c_tests): New decl.
5057         * tree-loop-distribution.c (pass_loop_distribution::execute):
5058         Update for change in return type of find_loop_location.
5059         * tree-parloops.c (parallelize_loops): Likewise.
5060         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5061         "locus" from location_t to dump_user_location_t.
5062         (canonicalize_loop_induction_variables): Likewise.
5063         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5064         for change in return type of find_loop_location.
5065         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5066         to dump_printf_loc to pass in a dump_location_t rather than a
5067         location_t, via the stmt.
5068         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5069         Likewise.
5070         * tree-vect-loop-manip.c (find_loop_location): Convert return
5071         type from source_location to dump_user_location_t.
5072         (vect_do_peeling): Update for above change.
5073         (vect_loop_versioning): Update for change in type of
5074         vect_location.
5075         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5076         from location_t to dump_user_location_t.
5077         (vect_estimate_min_profitable_iters): Update for change in type
5078         of vect_location.
5079         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5080         location_t to dump_location_t.
5081         (vect_slp_bb): Update for change in type of vect_location.
5082         * tree-vectorizer.c (vect_location): Convert from source_location
5083         to dump_user_location_t.
5084         (try_vectorize_loop_1): Update for change in vect_location's type.
5085         (vectorize_loops): Likewise.
5086         (increase_alignment): Likewise.
5087         * tree-vectorizer.h (vect_location): Convert from source_location
5088         to dump_user_location_t.
5089         (find_loop_location): Convert return type from source_location to
5090         dump_user_location_t.
5091         (check_reduction_path): Convert 1st param from location_t to
5092         dump_user_location_t.
5093         * value-prof.c (check_counter): Update call to dump_printf_loc to
5094         pass in a dump_user_location_t rather than a location_t; update
5095         call to error_at for change in type of "locus".
5096         (check_ic_target): Update call to dump_printf_loc to
5097         pass in a dump_user_location_t rather than a location_t, via the
5098         call_stmt.
5100 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5102         * config/s390/s390.h (enum processor_flags): Do not use
5103         default tune parameter when -march was specified.
5105 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5107         PR target/86314
5108         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5109         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5110         operands.
5112 2018-06-26  Richard Biener  <rguenther@suse.de>
5114         PR tree-optimization/86287
5115         PR bootstrap/86316
5116         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5117         (vect_analyze_loop): Initialize n_stmts.
5119 2018-06-26  Richard Biener  <rguenther@suse.de>
5121         PR middle-end/86271
5122         * fold-const.c (fold_convertible_p): Pointer extension
5123         isn't valid.
5125 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5127         PR debug/86064
5128         * dwarf2out.c (loc_list_has_views): Adjust comments.
5129         (dw_loc_list): Split single cross-partition range with
5130         nonzero locview.
5132 2018-06-25  Jeff Law  <law@redhat.com>
5134         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5135         on -mbig-switch by default.
5137         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5138         test.
5139         (const_float_0_operand): Remove unused predicate.
5140         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5141         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5142         (recipsf2): New expander.  Original pattern now called
5143         (recipsf2_insn).
5144         (recipdf2, recipdf2_insn): Similarly.
5145         (rsqrtsf2, rsqrtsf2_insn): Similarly
5146         (rsqrtdf2, rsqrtdf2_insn): Similarly
5148 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5150         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5151         Simplify logic for FreeBSD (twice).
5153 2018-06-25  Martin Sebor  <msebor@redhat.com>
5155         PR tree-optimization/86204
5156         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5157         a strnlen result if it's less than the length of the string.
5159 2018-06-25  Martin Sebor  <msebor@redhat.com>
5161         PR tree-optimization/85700
5162         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5163         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5164         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5166 2018-06-25  Martin Sebor  <msebor@redhat.com>
5168         * doc/extend.texi (Zero-length arrays): Update and clarify.
5170 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5172         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5173         added IEEE/IBM long double multilib support on PowerPC little
5174         endian Linux systems.
5175         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5176         (MULTILIB_DEFAULTS): Likewise.
5177         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5178         Likewise.
5179         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5180         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5181         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5183 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5185         PR middle-end/86311
5186         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5187         (REORDER_45): Likewise.
5189 2018-06-25  Jeff Law  <law@redhat.com>
5191         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5192         dividend to 32 bits.  Adjust length.
5193         (udivmodhi4): Cleanup output template.  Fix length.
5195 2018-06-25  Carl Love  <cel@us.ibm.com>
5197         * config/rs6000/vsx.md: Change word selector to prefered location.
5199 2018-06-25  Richard Biener  <rguenther@suse.de>
5201         PR tree-optimization/86304
5202         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5203         epilogue-if-converted loops as well.
5205 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5207         * lto-section-out.c (lto_begin_section): Do not print section
5208         name for noaddr and unnumbered dumps.
5210 2018-06-25  Richard Biener  <rguenther@suse.de>
5212         * tree-vectorizer.h (struct vec_info_shared): New structure
5213         with parts split out from struct vec_info and loop_nest from
5214         struct _loop_vec_info.
5215         (struct vec_info): Adjust accordingly.
5216         (struct _loop_vec_info): Likewise.
5217         (LOOP_VINFO_LOOP_NEST): Adjust.
5218         (LOOP_VINFO_DATAREFS): Likewise.
5219         (LOOP_VINFO_DDRS): Likewise.
5220         (struct _bb_vec_info): Likewise.
5221         (BB_VINFO_DATAREFS): Likewise.
5222         (BB_VINFO_DDRS): Likewise.
5223         (struct _stmt_vec_info): Add dr_aux member.
5224         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5225         (DR_MISALIGNMENT_UNINITIALIZED): New.
5226         (set_dr_misalignment): Adjust.
5227         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5228         (vect_analyze_loop): Adjust prototype.
5229         (vect_analyze_loop_form): Likewise.
5230         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5231         Compute dependences lazily.
5232         (vect_record_base_alignments): Use shared datarefs/ddrs.
5233         (vect_verify_datarefs_alignment): Likewise.
5234         (vect_analyze_data_refs_alignment): Likewise.
5235         (vect_analyze_data_ref_accesses): Likewise.
5236         (vect_analyze_data_refs): Likewise.
5237         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5238         constructor parameter for shared part.
5239         (vect_analyze_loop_form): Pass in shared part and adjust.
5240         (vect_analyze_loop_2): Pass in storage for the number of
5241         stmts.  Move loop nest finding to the caller.  Compute
5242         datarefs lazily.
5243         (vect_analyze_loop): Pass in shared part.
5244         (vect_transform_loop): Verify shared datarefs are unchanged.
5245         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5246         constructor parameter for shared part.
5247         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5248         (vect_slp_bb): Verify shared datarefs are unchanged before
5249         transform.
5250         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5251         change.
5252         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5253         DR_MISALIGNMENT_UNINITIALIZED.
5254         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5255         parameter for shared part.
5256         (vec_info::~vec_info): Adjust.
5257         (vec_info_shared::vec_info_shared): New.
5258         (vec_info_shared::~vec_info_shared): Likewise.
5259         (vec_info_shared::save_datarefs): Likewise.
5260         (vec_info_shared::check_datarefs): Likewise.
5261         (try_vectorize_loop_1): Construct shared part live for analyses
5262         of a single loop for multiple vector sizes.
5263         * tree-parloops.c (gather_scalar_reductions): Adjust.
5265 2018-06-25  Richard Biener  <rguenther@suse.de>
5267         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5268         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5269         (vect_analyze_data_refs): Remove similar code from here and
5270         simplify accordingly.
5272 2018-06-25  Richard Biener  <rguenther@suse.de>
5274         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5275         for reverse storage order accesses rather than asserting
5276         they cannot happen here.
5278 2018-06-25  Tom de Vries  <tdevries@suse.de>
5280         PR debug/86257
5281         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5282         Use data16 instead of .byte for insn prefix.
5284 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5286         PR C++/86082
5287         * parser.c (make_char_string_pack): Pass this literal chars
5288         through cpp_interpret_string.
5289         (cp_parser_userdef_numeric_literal): Check the result of
5290         make_char_string_pack.
5292 2018-06-24  Maya Rashish  <coypu@sdf.org>
5294         * ginclude/stddef.h: Simplify conditions around avoiding
5295         re-definition of __size_t.
5297 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5299         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5300         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5302 2018-06-22  Maya Rashish  <coypu@sdf.org>
5304         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5305         made to OpenBSD and NetBSD through the years.
5307 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5309         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5310         behavior of vec_pack (vector double, vector double) to match
5311         behavior of vec_float2 (vector double, vector double).
5313 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5315         * gimplify.c (gimplify_function_tree): Prevent creation
5316         of a trampoline for the address of the current function
5317         passed to entry/exit instrumentation hooks.
5319 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5321         PR target/86222
5322         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5323         correctly.
5325 2018-06-22  Martin Liska  <mliska@suse.cz>
5327         PR tree-optimization/86263
5328         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5329         Bail out if is_enabled is false.
5330         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5331         New declaration.
5332         (jump_table_cluster::is_enabled): New function.
5334 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5336         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5337         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5338         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5339         (lto_input_ts_binfo_tree_pointers): Likewise.
5340         * tree-streamer-out.c (streamer_write_tree_bitfields,
5341         write_ts_binfo_tree_pointers): Likewise.
5342         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5344 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5346         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5348 2018-06-22  Martin Liska  <mliska@suse.cz>
5350         * symbol-summary.h (get): Make it pure and inline move
5351         functionality from ::get function.
5352         (get): Remove and inline into ::get and ::get_create.
5353         (get_create): Move code from ::get function.
5355 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5357         PR target/85994
5358         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5359         -x assembler-with-cpp.
5361 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5363         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5364         _FILE_OFFSET_BITS=64 for C++.
5366 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5368         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5369         conversion insn that shows up when pr85657-3.c is compiled using
5370         IEEE 128-bit long double.
5371         (neg<mode>2_internal): Use the correct mode to check whether the
5372         mode is IBM extended.
5373         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5374         multiply and divide external functions from being created more
5375         than once.
5377 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5379         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5380         functions.
5381         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5382         the edge can be forwarded.
5383         (cfg_layout_merge_blocks): Likewise.
5385 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5387         * except.c (finish_eh_generation): Commit edge insertions only after
5388         the EH edges have been redirected from post-landing to landing pads.
5390 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5392         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5393         create_tmp_var_for to create the FRAME decl.
5394         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5396 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5398         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5399         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5400         debug statement when resetting its value.
5401         (expand_call_inline): Copy the locus of the call onto the assignment
5402         of the return value, if any.  Use local variable in more cases.
5404 2018-06-21  Martin Liska  <mliska@suse.cz>
5406         * ipa-pure-const.c (propagate_nothrow): Use
5407         funct_state_summaries->get.
5408         (dump_malloc_lattice): Likewise.
5409         (propagate_malloc): Likewise.
5411 2018-06-21  Richard Biener  <rguenther@suse.de>
5413         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5414         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5415         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5416         comment.
5417         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5418         BLOCK_ABSTRACT_ORIGIN unconditionally.
5420 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5422         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5423         deleting it.
5424         * ipa-reference.c (ipa_reference_c_finalize): Delete
5425         ipa_ref_opt_sum_summaries and set it to NULL.
5427 2018-06-21  Tom de Vries  <tdevries@suse.de>
5429         PR tree-optimization/85859
5430         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5431         test with comment from bb_no_side_effects_p.
5433 2018-06-21  Richard Biener  <rguenther@suse.de>
5435         PR tree-optimization/86232
5436         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5437         max for constant niter.
5439 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5441         * config/aarch64/aarch64-simd.md
5442         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5444 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5446         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5447         Make opernads of the unspec commutative.
5449 2018-06-21  Richard Biener  <rguenther@suse.de>
5451         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5452         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5453         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5454         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5455         NULL DR_STEP.
5456         (vect_record_base_alignments): Do not record base alignment
5457         for gathers or scatters.
5458         (vect_compute_data_ref_alignment): Drop return value that is always
5459         true.  Bail out early for gathers or scatters.
5460         (vect_enhance_data_refs_alignment): Bail out early for gathers
5461         or scatters.
5462         (vect_find_same_alignment_drs): Likewise.
5463         (vect_analyze_data_refs_alignment): Remove dead code.
5464         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5465         (vect_analyze_data_refs): For possible gathers or scatters do
5466         not create an alternate DR, just check their possible validity
5467         and mark them.  Adjust DECL_NONALIASED handling to not rely
5468         on DR_BASE_ADDRESS.
5469         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5470         update inits of gathers or scatters.
5471         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5472         Also copy gather/scatter flag to pattern vinfo.
5474 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5476         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5477         behavior of vec_packsu (vector unsigned long long, vector unsigned
5478         long long) to match behavior of vec_packs with same signature.
5480 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5481             Thomas Schwinge <thomas@codesourcery.com>
5482             Cesar Philippidis  <cesar@codesourcery.com>
5484         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5485         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5486         (gimplify_adjust_omp_clauses): Likewise.
5487         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5488         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5489         (gimplify_omp_target_update): Update handling of acc update and
5490         enter/exit data.
5491         * omp-low.c (install_var_field): Remove unused parameter
5492         base_pointers_restrict.
5493         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5494         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5495         FINALIZE}
5496         (omp_target_base_pointers_restrict_p): Delete.
5497         (scan_omp_target): Update call to scan_sharing_clauses.
5498         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5499         FINALIZE}.
5500         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5501         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5502         (convert_local_omp_clauses): Likewise.
5503         * tree-pretty-print.c (dump_omp_clause): Likewise.
5504         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5505         FINALIZE}.
5506         (omp_clause_code_name): Likewise.
5508 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5510         PR debug/86194
5511         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5512         be narrowed.
5514         PR tree-optimization/86231
5515         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5516         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5518 2018-06-20  Tom de Vries  <tdevries@suse.de>
5520         PR tree-optimization/86097
5521         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5522         iv type if signedness of iv type is not the same as that of *nit.
5524 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5526         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5527         EDGE_EH edges, verify they are all EDGE_EH.
5529 2018-06-20  Maya Rashish  <coypu@sdf.org>
5531         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5533 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5535         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5536         * config/aarch64/aarch64.c (xgene1_tunings): Add
5537         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5538         (aarch64_mode_valid_for_sched_fusion_p):
5539         Allow 16-byte modes.
5540         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5541         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5542         128-bit modes.
5543         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5544         New pattern.
5545         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5546         * config/aarch64/iterators.md (VQ2): New mode iterator.
5548 2018-06-20  Martin Liska  <mliska@suse.cz>
5550         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5551         Change default ratio from 10 to 8.
5553 2018-06-20  Martin Liska  <mliska@suse.cz>
5555         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5556         New.
5557         (bit_test_cluster::find_bit_tests): Likewise.
5558         (switch_decision_tree::analyze_switch_statement): Find clusters.
5559         * tree-switch-conversion.h (struct jump_table_cluster): Document
5560         hierarchy.
5562 2018-06-20  Martin Liska  <mliska@suse.cz>
5564         * tree-switch-conversion.c (switch_conversion::collect):
5565         Record m_uniq property.
5566         (switch_conversion::expand): Bail out for special conditions.
5567         (group_cluster::~group_cluster): New.
5568         (group_cluster::group_cluster): Likewise.
5569         (group_cluster::dump): Likewise.
5570         (jump_table_cluster::emit): New.
5571         (switch_decision_tree::fix_phi_operands_for_edges): New.
5572         (struct case_node): Remove struct.
5573         (jump_table_cluster::can_be_handled): New.
5574         (case_values_threshold): Moved to header.
5575         (reset_out_edges_aux): Likewise.
5576         (jump_table_cluster::is_beneficial): New.
5577         (bit_test_cluster::can_be_handled): Likewise.
5578         (add_case_node): Remove.
5579         (bit_test_cluster::is_beneficial): New.
5580         (case_bit_test::cmp): New.
5581         (bit_test_cluster::emit): New.
5582         (expand_switch_as_decision_tree_p): Remove.
5583         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5584         (fix_phi_operands_for_edge): Likewise.
5585         (switch_decision_tree::analyze_switch_statement): New.
5586         (compute_cases_per_edge): Move ...
5587         (switch_decision_tree::compute_cases_per_edge): ... here.
5588         (try_switch_expansion): Likewise.
5589         (switch_decision_tree::try_switch_expansion): Likewise.
5590         (record_phi_operand_mapping): Likewise.
5591         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5592         (emit_case_decision_tree): Likewise.
5593         (switch_decision_tree::emit): Likewise.
5594         (balance_case_nodes): Likewise.
5595         (switch_decision_tree::balance_case_nodes): Likewise.
5596         (dump_case_nodes): Likewise.
5597         (switch_decision_tree::dump_case_nodes): Likewise.
5598         (emit_jump): Likewise.
5599         (switch_decision_tree::emit_jump): Likewise.
5600         (emit_cmp_and_jump_insns): Likewise.
5601         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5602         (emit_case_nodes): Likewise.
5603         (switch_decision_tree::emit_case_nodes): Likewise.
5604         (conditional_probability): Remove.
5605         * tree-switch-conversion.h (enum cluster_type): New.
5606         (PRINT_CASE): New.
5607         (struct cluster): Likewise.
5608         (cluster::cluster): Likewise.
5609         (struct simple_cluster): Likewise.
5610         (simple_cluster::simple_cluster): Likewise.
5611         (struct group_cluster): Likewise.
5612         (struct jump_table_cluster): Likewise.
5613         (struct bit_test_cluster): Likewise.
5614         (struct min_cluster_item): Likewise.
5615         (struct case_tree_node): Likewise.
5616         (case_tree_node::case_tree_node): Likewise.
5617         (jump_table_cluster::case_values_threshold): Likewise.
5618         (struct case_bit_test): Likewise.
5619         (struct switch_decision_tree): Likewise.
5620         (struct switch_conversion): Likewise.
5621         (switch_decision_tree::reset_out_edges_aux): Likewise.
5623 2018-06-20  Martin Liska  <mliska@suse.cz>
5625         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5626         (hoist_edge_and_branch_if_true): Likewise.
5627         (expand_switch_using_bit_tests_p): Likewise.
5628         (struct case_bit_test): Likewise.
5629         (case_bit_test_cmp): Likewise.
5630         (emit_case_bit_tests): Likewise.
5631         (switch_conversion::switch_conversion): New class.
5632         (struct switch_conv_info): Remove old struct.
5633         (collect_switch_conv_info): More to ...
5634         (switch_conversion::collect): ... this.
5635         (check_range): Likewise.
5636         (switch_conversion::check_range): Likewise.
5637         (check_all_empty_except_final): Likewise.
5638         (switch_conversion::check_all_empty_except_final): Likewise.
5639         (check_final_bb): Likewise.
5640         (switch_conversion::check_final_bb): Likewise.
5641         (create_temp_arrays): Likewise.
5642         (switch_conversion::create_temp_arrays): Likewise.
5643         (free_temp_arrays): Likewise.
5644         (gather_default_values): Likewise.
5645         (switch_conversion::gather_default_values): Likewise.
5646         (build_constructors): Likewise.
5647         (switch_conversion::build_constructors): Likewise.
5648         (constructor_contains_same_values_p): Likewise.
5649         (switch_conversion::contains_same_values_p): Likewise.
5650         (array_value_type): Likewise.
5651         (switch_conversion::array_value_type): Likewise.
5652         (build_one_array): Likewise.
5653         (switch_conversion::build_one_array): Likewise.
5654         (build_arrays): Likewise.
5655         (switch_conversion::build_arrays): Likewise.
5656         (gen_def_assigns): Likewise.
5657         (switch_conversion::gen_def_assigns): Likewise.
5658         (prune_bbs): Likewise.
5659         (switch_conversion::prune_bbs): Likewise.
5660         (fix_phi_nodes): Likewise.
5661         (switch_conversion::fix_phi_nodes): Likewise.
5662         (gen_inbound_check): Likewise.
5663         (switch_conversion::gen_inbound_check): Likewise.
5664         (process_switch): Use the newly created class.
5665         (switch_conversion::expand): New.
5666         (switch_conversion::~switch_conversion): New.
5667         * tree-switch-conversion.h: New file.
5669 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5671         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5672         tree-vect-patterns.c.
5673         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5674         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
5675         (vect_recog_sad_pattern): Likewise.
5676         (vect_recog_widen_sum_pattern): Likewise.
5677         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
5678         (vect_recog_widen_shift_pattern): Remove the type_in argument.
5679         (vect_recog_rotate_pattern): Likewise.
5680         (vect_recog_mult_pattern): Likewise.
5681         (vect_recog_vector_vector_shift_pattern): Likewise.
5682         (vect_recog_divmod_pattern): Likewise.
5683         (vect_recog_mixed_size_cond_pattern): Likewise.
5684         (vect_recog_bool_pattern): Likewise.
5685         (vect_recog_mask_conversion_pattern): Likewise.
5686         (vect_try_gather_scatter_pattern): Likewise.
5687         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
5688         (vect_recog_over_widening_pattern): Likewise.
5689         (vect_recog_gather_scatter_pattern): Likewise.
5690         (vect_recog_func_ptr): Move from tree-vectorizer.h
5691         (vect_vect_recog_func_ptrs): Move further down the file.
5692         (vect_recog_func): Likewise.  Remove the third argument.
5693         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5694         (vect_pattern_recog_1): Expect the pattern function to do any
5695         necessary target tests.  Also expect it to provide a vector type.
5696         Remove the type_in handling.
5698 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5700         * tree-vect-patterns.c (vect_pattern_detected): New function.
5701         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5702         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5703         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5704         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5705         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5706         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5707         (vect_recog_mask_conversion_pattern)
5708         (vect_try_gather_scatter_pattern): Likewise.
5710 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5712         * tree-vect-patterns.c (vect_get_internal_def): New function.
5713         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5714         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5715         (search_type_for_mask_1): Use it.
5717 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5719         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5720         redundant WIDEN_SUM_EXPR handling.
5721         (vect_recog_sad_pattern): Likewise.
5723 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5725         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5726         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5727         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5728         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5729         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5731 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5733         * tree-vect-stmts.c (vectorizable_call): Make sure that we
5734         use the stmt_vec_info of the original bb statement for the
5735         new zero assignment, even if the call is part of a pattern.
5737 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5739         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5740         that the sequence is attached to the original statement rather
5741         than the pattern statement.
5742         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5743         PATTERN_DEF_SEQ from the original statement rather than
5744         the main pattern statement.
5745         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5746         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5747         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5749 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5751         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5752         definition statements before the early exit for statements that aren't
5753         live or relevant.
5754         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5755         split out from...
5756         (vect_transform_loop): ...here.  Process pattern definition
5757         statements without first checking whether the main pattern
5758         statement is live or relevant.
5760 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5762         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5763         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5765 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
5767         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5768         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5769         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5770         (expand_block_compare): Change select_block_compare_mode call.
5771         (expand_strncmp_align_check): Use new functions, fix comment.
5772         (emit_final_str_compare_gpr): New function.
5773         (expand_strn_compare): Refactor and clean up code.
5774         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5776 2018-06-19  Tony Reix  <tony.reix@atos.com>
5777             Damien Bergamini  <damien.bergamini@atos.com>
5778             David Edelsohn  <dje.gcc@gmail.com>
5780         * collect2.c (static_obj): New variable.
5781         (static_libs): New variable.
5782         (is_in_list): Uncomment declaration.
5783         (main): Track AIX libraries linked statically.
5784         (is_in_list): Uncomment definition.
5785         (scan_prog_file): Don't add AIX shared libraries initializer
5786         to constructor list if linking statically.
5788 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
5790         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5791         constant.
5792         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5794 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
5796         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5797         blocks.
5799 2018-06-19  Martin Liska  <mliska@suse.cz>
5801         * config/i386/i386.c (ix86_can_inline_p): Do not use
5802         ipa_fn_summaries::get_create.
5803         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5804         get.
5805         (devirtualization_time_bonus): Likewise.
5806         (ipcp_propagate_stage): Likewise.
5807         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5808         (edge_set_predicate): Likewise.
5809         (evaluate_conditions_for_known_args): Likewise.
5810         (evaluate_properties_for_edge): Likewise.
5811         (ipa_call_summary::reset): Tranform to ...
5812         (ipa_call_summary::~ipa_call_summary): ... this.
5813         (ipa_fn_summary::reset): Transform to ...
5814         (ipa_fn_summary::~ipa_fn_summary): ... this.
5815         (ipa_fn_summary_t::remove): Rename to ...
5816         (ipa_fn_summary_t::remove_callees): ... this.
5817         (ipa_fn_summary_t::duplicate): Use placement new
5818         instead of memory copy.
5819         (ipa_call_summary_t::duplicate): Likewise.
5820         (ipa_call_summary_t::remove): Remove.
5821         (dump_ipa_call_summary): Change get_create to get.
5822         (ipa_dump_fn_summary): Dump only when summary exists.
5823         (analyze_function_body): Use symbol_summary::get instead
5824         of get_create.
5825         (compute_fn_summary): Likewise.
5826         (estimate_edge_devirt_benefit): Likewise.
5827         (estimate_edge_size_and_time): Likewise.
5828         (inline_update_callee_summaries): Likewise.
5829         (remap_edge_change_prob): Likewise.
5830         (remap_edge_summaries): Likewise.
5831         (ipa_merge_fn_summary_after_inlining): Likewise.
5832         (write_ipa_call_summary): Likewise.
5833         (ipa_fn_summary_write): Likewise.
5834         (ipa_free_fn_summary): Likewise.
5835         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5836         (struct ipa_call_summary): Likewise.
5837         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5838         of get_create.
5839         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5840         (estimate_size_after_inlining): Likewise.
5841         (estimate_growth): Likewise.
5842         (growth_likely_positive): Likewise.
5843         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5844         (inline_call): Likewise.
5845         * ipa-inline.c (caller_growth_limits): Likewise.
5846         (can_inline_edge_p): Likewise.
5847         (can_inline_edge_by_limits_p): Likewise.
5848         (compute_uninlined_call_time): Likewise.
5849         (compute_inlined_call_time): Likewise.
5850         (want_inline_small_function_p): Likewise.
5851         (edge_badness): Likewise.
5852         (update_caller_keys): Likewise.
5853         (update_callee_keys): Likewise.
5854         (inline_small_functions): Likewise.
5855         (inline_to_all_callers_1): Likewise.
5856         (dump_overall_stats): Likewise.
5857         (early_inline_small_functions): Likewise.
5858         (early_inliner): Likewise.
5859         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5860         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5861         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5862         * ipa-split.c (execute_split_functions): Likewise.
5863         * symbol-summary.h: Likewise.
5864         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5866 2018-06-19  Richard Biener  <rguenther@suse.de>
5868         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5869         (vectorize_loops): ... here.  Fix dbgcnt handling.
5870         (try_vectorize_loop): Wrap try_vectorize_loop_1.
5872 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
5874         PR target/86197
5875         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5876         ieee128 argument takes up only one (vector) register, not two (floating
5877         point) registers.
5879 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5881         * gimplify.c (gimplify_init_constructor): Really never clear for an
5882         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5884 2018-06-19  Richard Biener  <rguenther@suse.de>
5886         PR tree-optimization/86179
5887         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5888         after failed recognition.
5890 2018-06-18  Martin Sebor  <msebor@redhat.com>
5892         PR middle-end/85602
5893         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5894         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5895         Handle integer subtraction.
5896         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5897         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5899 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5901         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5902         param from rtx to rtx_insn *.
5903         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5904         param.
5905         (frv_ifcvt_modify_insn): Likwise.
5906         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5907         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
5908         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5909         as_a <rtx_insn *> cast to local "unprotected_region" once
5910         it's been established that it's not NULL or pc_rtx.
5911         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5912         param "sethi" from rtx to rtx_insn *.
5913         (nds32_group_float_insns): Likewise for param "insn".
5914         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5915         param.
5916         (vax_output_int_subtract): Likewise.
5917         * config/vax/vax.c (vax_output_int_add): Likewise for param
5918         "insn".
5919         (vax_output_int_subtract): Likewise.
5920         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5921         (emit_pattern_after): Likewise for param "after".
5922         (emit_insn_after): Likewise.
5923         (emit_jump_insn_after): Likewise.
5924         (emit_call_insn_after): Likewise.
5925         (emit_debug_insn_after): Likewise.
5926         (emit_pattern_before): Likewise for param "before".
5927         (emit_insn_before): Likewise.
5928         (emit_jump_insn_before): Likewise.
5929         * final.c (get_insn_template): Likewise for param "insn", removing
5930         a cast.
5931         * output.h (get_insn_template): Likewise for 2nd param.
5932         * rtl.h (emit_insn_before): Likewise.
5933         (emit_jump_insn_before): Likewise.
5934         (emit_debug_insn_before_noloc): Likewise.
5935         (emit_insn_after): Likewise.
5936         (emit_jump_insn_after): Likewise.
5937         (emit_call_insn_after): Likewise.
5938         (emit_debug_insn_after): Likewise.
5939         (set_insn_deleted): Likewise for param.
5941 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
5943         PR target/85358
5944         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5945         floating point modes, so that IFmode is numerically greater than
5946         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5947         to declare the ordering.  This prevents IFmode from being
5948         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5949         machine.  Include rs6000-modes.h to share the fractional values
5950         between genmodes* and the rest of the compiler.
5951         (IFmode): Likewise.
5952         (KFmode): Likewise.
5953         (TFmode): Likewise.
5954         * config/rs6000/rs6000-modes.h: New file.
5955         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5956         meaning of rs6000_long_double_size so that 126..128 selects an
5957         appropriate 128-bit floating point type.
5958         (rs6000_option_override_internal): Likewise.
5959         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5960         (TARGET_LONG_DOUBLE_128): Change the meaning of
5961         rs6000_long_double_size so that 126..128 selects an appropriate
5962         128-bit floating point type.
5963         (LONG_DOUBLE_TYPE_SIZE): Update comment.
5964         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5965         source and destination to match the standard usage.
5966         (truncifkf2): Likewise.
5967         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5968         ISA 2.07 to use an explicit clobber, instead of passing in a
5969         temporary.
5970         (copysign<mode>3_soft): Likewise.
5972 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5974         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5975         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5976         (vect_slp_analyze_instance_dependence): Likewise.
5977         (vect_enhance_data_refs_alignment): Likewise.
5978         (vect_analyze_data_refs_alignment): Likewise.
5979         (vect_slp_analyze_and_verify_instance_alignment
5980         (vect_analyze_data_ref_accesses): Likewise.
5981         (vect_prune_runtime_alias_test_list): Likewise.
5982         (vect_analyze_data_refs): Likewise.
5983         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5984         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5985         (vect_analyze_scalar_cycles_1): Likewise.
5986         (vect_get_loop_niters): Likewise.
5987         (vect_analyze_loop_form_1): Likewise.
5988         (vect_update_vf_for_slp): Likewise.
5989         (vect_analyze_loop_operations): Likewise.
5990         (vect_analyze_loop): Likewise.
5991         (vectorizable_induction): Likewise.
5992         (vect_transform_loop): Likewise.
5993         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5994         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5995         (vect_make_slp_decision): Likewise.
5996         (vect_detect_hybrid_slp): Likewise.
5997         (vect_slp_analyze_operations): Likewise.
5998         (vect_slp_bb): Likewise.
5999         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6000         (vectorizable_bswap): Likewise.
6001         (vectorizable_call): Likewise.
6002         (vectorizable_simd_clone_call): Likewise.
6003         (vectorizable_conversion): Likewise.
6004         (vectorizable_assignment): Likewise.
6005         (vectorizable_shift): Likewise.
6006         (vectorizable_operation): Likewise.
6007         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6009 2018-06-18  Martin Sebor  <msebor@redhat.com>
6011         PR tree-optimization/81384
6012         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6013         * builtins.c (expand_builtin_strnlen): New function.
6014         (expand_builtin): Call it.
6015         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6016         * builtins.def (BUILT_IN_STRNLEN): New.
6017         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6018         Warn for bounds in excess of maximum object size.
6019         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6020         single-value ranges.  Handle strnlen.
6021         (handle_builtin_strlen): Handle strnlen.
6022         (strlen_check_and_optimize_stmt): Same.
6023         * doc/extend.texi (Other Builtins): Document strnlen.
6025 2018-06-18  Maya Rashish  <coypu@sdf.org>
6027         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6028         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6029         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6031         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6032         here to ...
6033         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6035 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6037         * tree.c (escaped_string::escape): Replace cast to char * by
6038         const_cast<char *> (unescaped).
6040 2018-06-18  Nick Clifton  <nickc@redhat.com>
6042         PR 84195
6043         * tree.c (escaped_string): New class.  Converts an unescaped
6044         string into its escaped equivalent.
6045         (warn_deprecated_use): Use the new class to convert the
6046         deprecation message, if present.
6047         (test_escaped_strings): New self test.
6048         (test_c_tests): Add test_escaped_strings.
6049         * doc/extend.texi (deprecated): Add a note that the
6050         deprecation message is affected by the -fmessage-length
6051         option, and that control characters will be escaped.
6052         (#pragma GCC error): Document this pragma.
6053         (#pragma GCC warning): Likewise.
6054         * doc/invoke.texi (-fmessage-length): Document this option's
6055         effect on the #warning and #error preprocessor directives and
6056         the deprecated attribute.
6058 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6060         * tree.c (decl_value_expr_lookup): Revert latest change.
6061         (decl_value_expr_insert): Likewise.
6063 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6065         * gimplify.c (nonlocal_vlas): Delete.
6066         (nonlocal_vla_vars): Likewise.
6067         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6068         referenced VLAs.
6069         (gimplify_body): Do not create and destroy nonlocal_vlas.
6070         * tree-nested.c: Include diagnostic.h.
6071         (use_pointer_in_frame): Tweak.
6072         (lookup_field_for_decl): Add assertion and declare the transformation.
6073         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6074         internal error when the reference is in a wrong context.  Do not
6075         create a debug decl by default.
6076         (note_nonlocal_block_vlas): Delete.
6077         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6078         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6079         create a debug decl by default.
6080         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6081         call is in a wrong context.
6082         (fixup_vla_decls): New function.
6083         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6084         debug variables were created.
6085         * tree.c (decl_value_expr_lookup): Add checking assertion.
6086         (decl_value_expr_insert): Likewise.
6088 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6090         PR middle-end/82479
6091         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6092         * tree-scalar-evolution.c (interpret_expr): Likewise.
6093         (expression_expensive_p): Likewise.
6094         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6095         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6096         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6097         (ssa_defined_by_minus_one_stmt_p): New.
6099 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6101         PR middle-end/64946
6102         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6103         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6104         * dojump.c (do_jump): Likewise.
6105         * expr.c (expand_expr_real_2): Check operand type's sign.
6106         * fold-const.c (const_unop): Handle ABSU_EXPR.
6107         (fold_abs_const): Likewise.
6108         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6109         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6110         (strip_sign_op_1): Likesise.
6111         * match.pd: Add new pattern to generate ABSU_EXPR.
6112         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6113         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6114         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6115         * tree-inline.c (estimate_operator_cost): Likewise.
6116         * tree-pretty-print.c (dump_generic_node): Likewise.
6117         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6118         * tree.def (ABSU_EXPR): New.
6120 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6122         PR middle-end/86095
6123         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6124         documented as preserved for backward compatibility only.
6125         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6127         PR rtl-optimization/86108
6128         * bb-reorder.c (create_forwarder_block): Renamed to ...
6129         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6130         jump from new landing pad to the second part.
6131         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6132         Adjust callers.
6134 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6136         PR middle-end/85878
6137         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6138         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6139         Only call store_expr for halves if the mode is the same.
6141         PR middle-end/86123
6142         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6143         Fix up comment formatting.
6145 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6147         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6148         (typed_splay_tree::closure,
6149         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6150         (typed_splay_tree::typed_splay_tree,
6151         typed_splay_tree::operator =): Declared private.
6152         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6153         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6154         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6155         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6156         typed_splay_tree::splay_tree_splay,
6157         typed_splay_tree::splay_tree_foreach_helper,
6158         typed_splay_tree::splay_tree_insert,
6159         typed_splay_tree::splay_tree_remove,
6160         typed_splay_tree::splay_tree_lookup,
6161         typed_splay_tree::splay_tree_predecessor,
6162         typed_splay_tree::splay_tree_successor,
6163         typed_splay_tree::splay_tree_min,
6164         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6165         (typed_splay_tree::root, typed_splay_tree::comp,
6166         typed_splay_tree::delete_key,
6167         typed_splay_tree::delete_value): New data members.
6168         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6169         typed_splay_tree::remove.
6171 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6173         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6174         -mginv and -mno-ginv to the assembler.
6175         * config/mips/mips.opt (-mcrc): New option.
6176         (-mginv): Likewise.
6177         * doc/invoke.text (-mcrc): Document.
6178         (-mginv): Likewise.
6180 2018-06-15  Nick Clifton  <nickc@redhat.com>
6182         PR 84195
6183         * tree.c (escaped_string): New class.  Converts an unescaped
6184         string into its escaped equivalent.
6185         (warn_deprecated_use): Use the new class to convert the
6186         deprecation message, if present.
6187         (test_escaped_strings): New self test.
6188         (test_c_tests): Add test_escaped_strings.
6189         * doc/extend.texi (deprecated): Add a note that the
6190         deprecation message is affected by the -fmessage-length
6191         option, and that control characters will be escaped.
6192         (#pragma GCC error): Document this pragma.
6193         (#pragma GCC warning): Likewise.
6194         * doc/invoke.texi (-fmessage-length): Document this option's
6195         effect on the #warning and #error preprocessor directives and
6196         the deprecated attribute.
6198 2018-06-15  Richard Biener  <rguenther@suse.de>
6200         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6201         here, also noting vector size used.
6202         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6203         size used in MSG_OPTIMIZED_LOCATIONS dump.
6204         (pass_slp_vectorize::execute): Adjust.
6206 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6208         PR target/85968
6209         * config/arc/arc.c (arc_return_address_register): Fix
6210         if-condition.
6212 2018-06-15  Richard Biener  <rguenther@suse.de>
6214         PR middle-end/86159
6215         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6216         leave useless conversion stripping to force_gimple_operand_gsi.
6217         (gimplify_build2): Likewise.
6218         (gimplify_build1): Likewise.
6220 2018-06-15  Richard Biener  <rguenther@suse.de>
6222         PR middle-end/86076
6223         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6224         before adjusting their block.
6226 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6228         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6229         multilibs for *-*-rtems*.
6230         * config/riscv/t-rtems: New file.
6232 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6234         PR middle-end/86122
6235         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6236         unsigned_type_for returns NULL.
6238         PR target/85945
6239         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6240         subregs of multi-word pseudos unless the float mode has word size.
6242 2018-06-14  Richard Biener  <rguenther@suse.de>
6244         PR middle-end/86139
6245         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6246         duplicate and harmful type_hash_canon.
6247         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6249 2018-06-14  Richard Biener  <rguenther@suse.de>
6251         PR ipa/86124
6252         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6253         NULL cgraph_node.
6255 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6257         * config/rtems.h (STDINT_LONG32): Define.
6259 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6260             Prachi Godbole  <prachi.godbole@imgtec.com>
6262         * config/mips/mips-cpus.def: Define P6600.
6263         * config/mips/mips-tables.opt: Regenerate.
6264         * config/mips/mips.c (mips_ucbranch_type): New enum.
6265         (mips_rtx_cost_data): Add support for P6600.
6266         (mips_issue_rate): Likewise.
6267         (mips_multipass_dfa_lookahead): Likewise.
6268         (mips_avoid_hazard): Likewise.
6269         (mips_reorg_process_insns): Likewise.
6270         (mips_classify_branch_p6600): New function.
6271         * config/mips/mips.h (TUNE_P6600): New define.
6272         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6273         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6274         * config/mips/mips.md: Include p6600.md.
6275         (processor): Add p6600.
6276         * config/mips/p6600.md: New file.
6277         * doc/invoke.texi: Add p6600 to supported architectures.
6279 2018-06-13  Martin Sebor  <msebor@redhat.com>
6281         PR tree-optimization/86114
6282         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6283         of integer types.
6284         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6286 2018-06-13  Richard Biener  <rguenther@suse.de>
6288         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6289         Properly set vector type of the intermediate stmt.
6290         * tree-vect-stmts.c (vectorizable_operation): The destination
6291         var always has vectype_out type.
6293 2018-06-13  Jeff Law  <law@redhat.com>
6295         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6296         integer 0 for argument to print_rtl_with_bb.
6297         (rl78_reorg): Likewise.
6299 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6301         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6302         from rtx to rtx_insn *.
6303         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6304         "label".
6305         (add_sched_insns_for_speculation): Likewise for local "target",
6306         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6307         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6308         from rtx_insn ** to rtx_code_label **.
6309         (reorg_emit_nops): Likewise.
6310         (c6x_reorg): Likewise for local "call_labels".
6311         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6312         rtx to rtx_insn *.
6313         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6314         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6315         the loops over LABEL_REFS.
6316         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6317         braf_label.
6318         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6319         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6320         (split_branches): Strengthen local "olabel" from rtx to
6321         rtx_insn *, adding a safe_as_a cast.
6322         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6323         to "rtx_insn *".
6324         (add_insn_after): Likewise for first two params.
6325         (add_insn_before): Likewise.
6326         (remove_insn): Likewise for param.
6327         (emit_pattern_before_noloc): Likewise for second and third params.
6328         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6329         (emit_call_insn_before_noloc): Likewise.
6330         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6331         to "rtx_insn *".
6332         (emit_barrier_before): Likewise.
6333         (emit_label_before): Strengthen "label" param from "rtx" to
6334         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6335         "rtx_insn *".
6336         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6337         "rtx_insn *".
6338         (emit_pattern_after_noloc): Likewise.
6339         (emit_insn_after_noloc): Likewise.
6340         (emit_jump_insn_after_noloc): Likewise.
6341         (emit_call_insn_after_noloc): Likewise.
6342         (emit_debug_insn_after_noloc): Likewise.
6343         (emit_barrier_after): Likewise.
6344         (emit_label_after): Likewise for both params.
6345         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6346         "loc" param from "int" to "location_t".
6347         (emit_insn_after_setloc): Likewise.
6348         (emit_jump_insn_after_setloc): Likewise.
6349         (emit_call_insn_after_setloc): Likewise.
6350         (emit_debug_insn_after_setloc): Likewise.
6351         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6352         "loc" param from "int" to "location_t".
6353         (emit_pattern_before): Convert NULL_RTX to NULL.
6354         (emit_insn_before_setloc): Convert "loc" param from "int" to
6355         "location_t".
6356         (emit_jump_insn_before_setloc): Likewise.
6357         (emit_call_insn_before_setloc): Likewise.
6358         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6359         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6360         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6361         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6362         Convert 3rd param from "int" to "location_t".
6363         (emit_barrier_before, emit_barrier_after, next_real_insn):
6364         Strengthen param from rtx to rtx_insn *.
6365         (emit_label_before): Strengthen 1st param from "rtx" to
6366         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6367         "rtx_insn *".
6368         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6369         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6370         Strengthen 2nd param from "rtx" to "rtx_insn *".
6371         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6372         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6373         Likewise. Convert 3rd param from "int" to "location_t".
6374         (emit_label_after): Strengthen 1st param from "rtx" to
6375         "rtx_code_label *".
6376         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6377         "rtx_insn *".
6378         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6379         from "rtx" to "rtx_insn *".
6381 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6383         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6384         bodies streamed in with -Q.
6385         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6386         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6387         * gimple-streamer-out.c: Include gimple-pretty-print.h
6388         (output_bb): Dump stmts streamed.
6389         * lto-section-out.c: Include print-tree.h
6390         (lto_begin_section): Dump sections created.
6391         (lto_output_decl_index): Dump decl encoded.
6392         * lto-streamer-out.c: Include print-tree.h
6393         (create_output_block): Dump output block created.
6394         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6395         (output_function): Dump function output.
6396         (output_constructor): Dump constructor streamed.
6397         (write_global_stream): Output indexes encoded.
6398         (produce_asm_for_decls): Dump streams encoded.
6399         * lto-streamer.c (streamer_dump_file): New global var.
6400         * lto-streamer.h (streamer_dump_file): Declare.
6401         * passes.c (ipa_write_summaries): Initialize streamer dump.
6402         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6403         in.
6405 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6407         PR target/86048
6408         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6409         offsets for register save directives.  Emit a second batch of save
6410         directives, if need be, when the function accesses prior frames.
6412 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6414         * config/arc/fpu.md (fmasf4): Force operand to register.
6415         (fnmasf4): Likewise.
6417 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6419         * config/arc/arc-protos.h (arc_pad_return): Remove.
6420         * config/arc/arc.c (machine_function): Remove force_short_suffix
6421         and size_reason.
6422         (arc_print_operand): Adjust printing of '&'.
6423         (arc_verify_short): Remove conditional printing of short suffix.
6424         (arc_final_prescan_insn): Remove reference to size_reason.
6425         (pad_return): New function.
6426         (arc_reorg): Call pad_return.
6427         (arc_pad_return): Remove.
6428         (arc_init_machine_status): Remove reference to force_short_suffix.
6429         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6430         (attr length): When attribute iscompact is true force to 2
6431         regardless; in the case of maybe check if we want to force the
6432         instruction to have 4 bytes length.
6433         (nopv): Change it to generate 4 byte long nop as well.
6434         (blockage): New pattern.
6435         (simple_return): Remove call to arc_pad_return.
6436         (p_return_i): Likewise.
6438 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6440         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6442 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6444         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6445         ARC cores.
6447 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6449         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6450         for ARC700 and ARCv2.
6452 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6454         PR target/86076
6455         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6456         operands[2] instead of operands[1].
6459 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6461         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6462         case, check whether the outer register overlaps an unallocatable
6463         register, not just whether it fits the required class.
6465 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6467         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6468         are poly_ints.
6469         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6470         (memrefs_conflict_p): Likewise.
6471         (init_alias_analysis): Likewise.
6472         * cfgexpand.c (expand_debug_expr): Likewise.
6473         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6474         * cse.c (fold_rtx): Likewise.
6475         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6476         * expr.c (emit_block_move_hints): Likewise.
6477         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6478         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6479         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6480         (emit_group_store): Likewise.
6481         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6482         to read the PRE/POST_MODIFY increment.
6483         * calls.c (store_one_arg): Use strip_offset.
6484         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6485         poly_int_rtx_p.
6486         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6487         by a VEC_SELECT.
6488         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6489         (simplify_binary_operation_1): Extend CONST_INT handling to
6490         poly_int_rtx_p.
6491         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6492         than a HOST_WIDE_INT.
6493         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6494         poly_int64.
6495         (adjust_mems, add_stores): Update accodingly.
6496         (vt_canonicalize_addr): Track polynomial offsets.
6497         (emit_note_insn_var_location): Likewise.
6498         (vt_add_function_parameter): Likewise.
6499         (vt_initialize): Likewise.
6501 2018-06-12  Jeff Law  <law@redhat.com>
6503         * config.gcc (alpha*-*-freebsd*): Remove.
6504         * config/alpha/freebsd.h: Remove.
6506 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6508         PR other/69968
6509         * spellcheck-tree.c (levenshtein_distance): Rename to...
6510         (get_edit_distance): ...this, and update for underlying renaming.
6511         * spellcheck-tree.h (levenshtein_distance): Rename to...
6512         (get_edit_distance): ...this.
6513         * spellcheck.c (levenshtein_distance): Rename to...
6514         (get_edit_distance): ...this.  Convert from Levenshtein distance
6515         to Damerau-Levenshtein distance by supporting transpositions of
6516         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6517         "v_one_ago".
6518         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6519         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6520         update for underlying renaming.
6521         (selftest::levenshtein_distance_unit_test): Rename to...
6522         (selftest::test_get_edit_distance_unit): ...this, and update for
6523         underlying renaming.
6524         (selftest::test_find_closest_string): Add example from PR 69968
6525         where transposition helps
6526         (selftest::test_metric_conditions): Update for renaming.
6527         (selftest::test_metric_conditions): Likewise.
6528         (selftest::spellcheck_c_tests): Likewise.
6529         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6530         (get_edit_distance): ...this.
6531         (best_match::consider): Update for renaming.
6533 2018-06-12  Martin Sebor  <msebor@redhat.com>
6535         PR tree-optimization/85259
6536         * builtins.c (compute_objsize): Handle constant offsets.
6537         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6538         true iff a warning has been issued.
6539         * gimple.h (gimple_nonartificial_location): New function.
6540         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6541         gimple_nonartificial_location and handle -Wno-system-headers.
6542         (handle_builtin_stxncpy): Same.
6544 2018-06-12  Martin Sebor  <msebor@redhat.com>
6546         PR c/85931
6547         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6549 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6551         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6552         BUILTIN_VEC_XST entries for pointer to double and long long.
6554 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6556         PR target/85990
6557         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6558         Update comments.
6559         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6560         Likewise.
6562 2018-06-12  Martin Liska  <mliska@suse.cz>
6564         * doc/options.texi: Document IntegerRange.
6566 2018-06-12  Martin Liska  <mliska@suse.cz>
6568         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6569         * opt-functions.awk: Handle Deprecated flag.
6570         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6571         and report error.
6572         (read_cmdline_option): Report warning for a deprecated option.
6573         * opts.h (struct cl_option): Add new field cl_deprecated.
6574         (CL_ERR_DEPRECATED): New.
6576 2018-06-12  Martin Liska  <mliska@suse.cz>
6578         * doc/options.texi: Document Deprecated option flag.
6580 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6582         * config/arc/arc-arch.h (arc_extras): New enum.
6583         (arc_cpu_t):Add field extra.
6584         (arc_cpu_types): Consider the extras.
6585         * config/arc/arc-cpus.def: Add extras info.
6586         * config/arc/arc-opts.h (processor_type): Consider extra field.
6587         * config/arc/arc.c (arc_override_options): Handle extra field.
6589 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6591         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6592         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6593         field.
6594         * config/arc/arc.c (arc_init): Update pic warning.
6595         (irq_range): Update irq range parsing warnings.
6596         (arc_override_options): Update various warning messages.
6597         (arc_handle_aux_attribute): Likewise.
6599 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6601         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6603 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6605         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6606         compiler messages directives.
6608 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6610         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6611         * config/mips/mips-tables.opt: Regenerate.
6612         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6613         mips64r6.
6614         * doc/invoke.texi: Document -march=i6500.
6616 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6618         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6619         (i6400_gpmul): Add cpu_unit.
6620         (i6400_gpdiv): Likewise.
6621         (i6400_msa_add_d): Update reservations.
6622         (i6400_msa_int_add) Likewise.
6623         (i6400_msa_short_logic3) Likewise.
6624         (i6400_msa_short_logic2) Likewise.
6625         (i6400_msa_short_logic) Likewise.
6626         (i6400_msa_move) Likewise.
6627         (i6400_msa_cmp) Likewise.
6628         (i6400_msa_short_float2) Likewise.
6629         (i6400_msa_div_d) Likewise.
6630         (i6400_msa_long_logic1) Likewise.
6631         (i6400_msa_long_logic2) Likewise.
6632         (i6400_msa_mult) Likewise.
6633         (i6400_msa_long_float2) Likewise.
6634         (i6400_msa_long_float4) Likewise.
6635         (i6400_msa_long_float5) Likewise.
6636         (i6400_msa_long_float8) Likewise.
6637         (i6400_fpu_fadd): Include frint type.
6638         (i6400_fpu_store): New define_insn_reservation.
6639         (i6400_fpu_load): Likewise.
6640         (i6400_fpu_move): Likewise.
6641         (i6400_fpu_fcmp): Likewise.
6642         (i6400_fpu_fmadd): Likewise.
6643         (i6400_int_mult): Include imul3nc type and update reservation.
6644         (i6400_int_div): Include idiv3 type and update reservation.
6645         (i6400_int_load): Update to check type not move_type.
6646         (i6400_int_store): Likewise.
6647         (i6400_int_prefetch): Set zero latency.
6649 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6651         * gcc.c: Document new %@{...} sequence.
6652         (LINK_COMMAND_SPEC): Use it for the -L switches.
6653         (cpp_unique_options): Use it for the -I switches.
6654         (at_file_argbuf): New global variable.
6655         (in_at_file): Likewise.
6656         (alloc_args): Create at_file_argbuf.
6657         (clear_args): Truncate at_file_argbuf.
6658         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6659         (open_at_file): New function.
6660         (close_at_file): Likewise.
6661         (create_at_file): Delete.
6662         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6663         <'o'>: Likewise.
6664         <'@'>: New case.
6665         (validate_switches_from_spec): Deal with %@{...} sequence.
6666         (validate_switches): Likewise.
6667         (driver::finalize): Call clear_args.
6669 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
6671         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6673 2018-06-11  Martin Sebor  <msebor@redhat.com>
6675         * doc/invoke.texi (-Wall): List -Wc++17-compat.
6676         (Wno-class-memaccess): Add @opindex.
6677         (Wno-templates, Wno-multiple-inheritance): Same.
6678         (Wno-virtual-inheritance, Wno-namespaces): Same.
6679         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6680         (Wno-format-overflow, Wno-format-truncation): Same.
6681         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6682         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6683         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6684         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6685         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6686         (Wno-misspelled-isr): Same.
6688 2018-06-11  Martin Sebor  <msebor@redhat.com>
6690         * PR tree-optimization/86083
6691         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6693 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6695         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6697 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
6699         PR target/85755
6700         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6701         on the correct operand.
6702         (*movdi_internal64): Ditto.
6704 2018-06-11  Martin Liska  <mliska@suse.cz>
6706         PR tree-optimization/86089
6707         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6709 2018-06-11  Julia Koval  <julia.koval@intel.com>
6711         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6712         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6713         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6715 2018-06-11  Olivier Hainque  <hainque@adacore.com>
6717         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6718         for Ada with strict dwarf2.
6720 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
6722         PR target/85755
6723         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6724         addresses.
6726 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
6728         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6730 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
6732         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6733         TARGET_ELF.
6735 2018-06-08  Martin Liska  <mliska@suse.cz>
6737         * tree-cfg.h (debug_function): Fix argument type to match
6738         implementation.
6740 2018-06-08  Martin Liska  <mliska@suse.cz>
6742         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6743         Remove usage of MPX-related (and removed) fields.
6744         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6746 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
6748         * cfg.c (debug): Use TDF_NONE rather than 0.
6749         * cfghooks.c (debug): Likewise.
6750         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6751         (struct dump_option_value_info): Convert to...
6752         (struct kv_pair): ...this template type.
6753         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6754         rather than 0.
6755         (optinfo_verbosity_options): Likewise.
6756         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6757         OPTGROUP_NONE.
6758         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6759         than int for "optgroup_flags" param.
6760         (dump_generic_expr_loc): Use dump_flags_t rather than int for
6761         "dump_kind" param.
6762         (dump_dec): Likewise.
6763         (dump_finish): Use TDF_NONE rather than 0.
6764         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6765         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
6766         than 0.  Update for change to option_ptr.
6767         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6768         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
6769         0.  Update for changes to optinfo_verbosity_options and
6770         optgroup_options.
6771         (opt_info_switch_p): Convert optgroup_flags from int to
6772         optgroup_flags_t.
6773         (dump_basic_block): Use dump_flags_t rather than int
6774         for "dump_kind" param.
6775         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6776         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6777         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6778         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6779         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6780         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6781         TDF_NONE): Convert from macros to...
6782         (enum dump_flag): ...this new enum.
6783         (dump_flags_t): Update to use enum.
6784         (operator|, operator&, operator~, operator|=, operator&=):
6785         Implement for dump_flags_t.
6786         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6787         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6788         Convert from macros to...
6789         (enum optgroup_flag): ...this new enum.
6790         (optgroup_flags_t): New typedef.
6791         (operator|, operator|=): Implement for optgroup_flags_t.
6792         (struct dump_file_info): Convert field "alt_flags" to
6793         dump_flags_t.  Convert field "optgroup_flags" to
6794         optgroup_flags_t.
6795         (dump_basic_block): Use dump_flags_t rather than int for param.
6796         (dump_generic_expr_loc): Likewise.
6797         (dump_dec): Likewise.
6798         (dump_register): Convert param "optgroup_flags" to
6799         optgroup_flags_t.
6800         (opt_info_enable_passes): Likewise.
6801         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6802         than 0.
6803         * gimple-pretty-print.c (debug): Likewise.
6804         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6805         (merged_store_group::apply_stores): Likewise.
6806         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6807         * gimple.c (verify_gimple_pp): Likewise.
6808         * graphite-poly.c (print_pbb_body): Likewise.
6809         * passes.c (pass_manager::register_one_dump_file): Convert
6810         local "optgroup_flags" to optgroup_flags_t.
6811         * print-tree.c (print_node): Use TDF_NONE rather than 0.
6812         (debug): Likewise.
6813         (debug_body): Likewise.
6814         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6815         to optgroup_flags_t.
6816         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6817         than 0.
6818         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6819         (convert_mult_to_fma): Likewise.
6820         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6821         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6822         * tree-vect-data-refs.c (dump_lower_bound): Convert param
6823         "dump_kind" to dump_flags_t.
6825 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6827         * config/rs6000/rs6000.c (min, max): Delete.
6829 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6831         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6832         -mabi=spe and -mabi=no-spe.
6834 2018-06-08  Martin Liska  <mliska@suse.cz>
6836         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6837         where we expect an existing summary.
6839 2018-06-08  Martin Liska  <mliska@suse.cz>
6841         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6842         * ipa-inline.h (estimate_edge_growth): Likewise.
6844 2018-06-08  Martin Liska  <mliska@suse.cz>
6846         * cgraph.c (function_version_hasher::hash): Use
6847         cgraph_node::get_uid ().
6848         (function_version_hasher::equal):
6849         * cgraph.h (cgraph_node::get_uid): New method.
6850         * ipa-inline.c (update_caller_keys): Use
6851         cgraph_node::get_uid ().
6852         (update_callee_keys): Likewise.
6853         * ipa-utils.c (searchc): Likewise.
6854         (ipa_reduced_postorder): Likewise.
6855         * lto-cgraph.c (input_node): Likewise.
6856         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6857         * symbol-summary.h (symtab_insertion): Likewise.
6858         (symtab_removal): Likewise.
6859         (symtab_duplication): Likewise.
6860         * tree-pretty-print.c (dump_function_header): Likewise.
6861         * tree-sra.c (convert_callers_for_node): Likewise.
6863 2018-06-08  Martin Liska  <mliska@suse.cz>
6865         * cgraph.c (symbol_table::create_edge): Always assign a new
6866         unique number.
6867         (symbol_table::free_edge): Do not recycle numbers.
6868         * cgraph.h (cgraph_edge::get): New method.
6869         * symbol-summary.h (symtab_removal): Use it.
6870         (symtab_duplication): Likewise.
6871         (call_summary::hashable_uid): Remove.
6873 2018-06-08  Martin Liska  <mliska@suse.cz>
6875         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6876         (initialize_growth_caches): Remove.
6877         (free_growth_caches): Likewise.
6878         (do_estimate_edge_time): Use edge_growth_cache.
6879         (do_estimate_edge_size): Likewise.
6880         (do_estimate_edge_hints): Likewise.
6881         * ipa-inline.c (reset_edge_caches): Likewise.
6882         (recursive_inlining): Likewise.
6883         (inline_small_functions): Likewise.
6884         * ipa-inline.h (initialize_growth_caches): Remove.
6885         (estimate_edge_size): Likewise.
6886         (estimate_edge_time): Likewise.
6887         (estimate_edge_hints): Likewise.
6888         (reset_edge_growth_cache): Likewise.
6889         * symbol-summary.h (call_summary::remove): New method.
6891 2018-06-08  Martin Liska  <mliska@suse.cz>
6893         * ipa-cp.c (class edge_clone_summary): New summary.
6894         (grow_edge_clone_vectors): Remove.
6895         (ipcp_edge_duplication_hook): Remove.
6896         (class edge_clone_summary_t): New call_summary class.
6897         (ipcp_edge_removal_hook): Remove.
6898         (edge_clone_summary_t::duplicate): New function.
6899         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6900         (create_specialized_node): Likewise.
6901         (ipcp_driver): Initialize edge_clone_summaries and do not
6902         register hooks.
6904 2018-06-08  Martin Liska  <mliska@suse.cz>
6906         * symbol-summary.h (get): New function.
6907         (call_summary::m_initialize_when_cloning): New class member.
6909 2018-06-08  Martin Liska  <mliska@suse.cz>
6911         * cgraph.c (cgraph_node::remove): Do not recycle uid.
6912         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6913         (symbol_table::allocate_cgraph_symbol): Do not set uid.
6914         * passes.c (uid_hash_t): Record removed_nodes by their uids.
6915         (remove_cgraph_node_from_order): Use the removed_nodes set.
6916         (do_per_function_toporder): Likwise.
6917         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6918         instead of summary_uid.
6919         (symtab_removal): Likewise.
6920         (symtab_duplication): Likewise.
6922 2018-06-08  Martin Liska  <mliska@suse.cz>
6924         * ipa-cp.c (ipcp_store_bits_results): Use
6925         ipcp_transformation_sum.
6926         (ipcp_store_vr_results): Likewise.
6927         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6928         to ...
6929         (ipcp_transformation_initialize): ... this.
6930         (ipa_set_node_agg_value_chain):
6931         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6932         (write_ipcp_transformation_info): Likewise.
6933         (read_ipcp_transformation_info): Likewise.
6934         (ipcp_update_bits): Likewise.
6935         (ipcp_update_vr): Likewise.
6936         (ipcp_transform_function): Likewise.
6937         * ipa-prop.h: Rename ipcp_transformation_summary to
6938         ipcp_transformation.
6939         (class ipcp_transformation_t): New function summary.
6940         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6941         (ipa_get_agg_replacements_for_node): Likewise.
6943 2018-06-08  Martin Liska  <mliska@suse.cz>
6945         * ipa-pure-const.c (struct funct_state_d): Do it class instead
6946         of struct.
6947         (class funct_state_summary_t): New function_summary class.
6948         (has_function_state): Remove.
6949         (get_function_state): Likewise.
6950         (set_function_state): Likewise.
6951         (add_new_function): Likewise.
6952         (funct_state_summary_t::insert): New function.
6953         (duplicate_node_data): Remove.
6954         (remove_node_data): Remove.
6955         (funct_state_summary_t::duplicate): New function.
6956         (register_hooks): Create new funct_state_summaries.
6957         (pure_const_generate_summary): Use it.
6958         (pure_const_write_summary): Likewise.
6959         (pure_const_read_summary): Likewise.
6960         (propagate_pure_const): Likewise.
6961         (propagate_nothrow): Likewise.
6962         (dump_malloc_lattice): Likewise.
6963         (propagate_malloc): Likewise.
6964         (execute): Do not register hooks, just remove summary
6965         instead.
6966         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6967         constructor.
6969 2018-06-08  Martin Liska  <mliska@suse.cz>
6971         * ipa-reference.c (remove_node_data): Remove.
6972         (duplicate_node_data): Likewise.
6973         (class ipa_ref_var_info_summary_t): New class.
6974         (class ipa_ref_opt_summary_t): Likewise.
6975         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6976         (get_reference_optimization_summary): Use
6977         ipa_ref_opt_sum_summaries.
6978         (set_reference_vars_info): Remove.
6979         (set_reference_optimization_summary): Likewise.
6980         (ipa_init): Create summaries.
6981         (init_function_info): Use function summary.
6982         (ipa_ref_opt_summary_t::duplicate): New function.
6983         (ipa_ref_opt_summary_t::remove): New function.
6984         (get_read_write_all_from_node): Fix GNU coding style.
6985         (propagate): Use function summary.
6986         (write_node_summary_p): Fix GNU coding style.
6987         (stream_out_bitmap): Likewise.
6988         (ipa_reference_read_optimization_summary): Use function summary.
6989         (ipa_reference_c_finalize): Do not release hooks.
6991 2018-06-08  Martin Liska  <mliska@suse.cz>
6993         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6994         (analyze_function_body): Extract multiple calls of get_create.
6995         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6996         * ipa-inline.c (recursive_inlining): Use ::get method.
6997         * ipa-inline.h (estimate_edge_growth): Likewise.
6999 2018-06-08  Martin Liska  <mliska@suse.cz>
7001         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7002         HSA_INVALID.
7003         (hsa_function_summary::hsa_function_summary): Use the new enum
7004         value.
7005         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7006         * hsa-gen.c (hsa_get_host_function): Likewise.
7007         (get_brig_function_name): Likewise.
7008         * ipa-hsa.c (process_hsa_functions): Likewise.
7009         (ipa_hsa_write_summary): Likewise.
7010         * symbol-summary.h (symtab_duplication): Use ::get function/
7011         (get): New function.
7013 2018-06-08  Martin Liska  <mliska@suse.cz>
7015         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7016         of get.
7017         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7018         (hsa_register_kernel): Likewise.
7019         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7020         * hsa-gen.c (hsa_get_host_function): Likewise.
7021         (get_brig_function_name): Likewise.
7022         (generate_hsa): Likewise.
7023         (pass_gen_hsail::execute): Likewise.
7024         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7025         (devirtualization_time_bonus): Likewise.
7026         (ipcp_propagate_stage): Likewise.
7027         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7028         (edge_set_predicate): Likewise.
7029         (evaluate_conditions_for_known_args): Likewise.
7030         (evaluate_properties_for_edge): Likewise.
7031         (ipa_fn_summary::reset): Likewise.
7032         (ipa_fn_summary_t::duplicate): Likewise.
7033         (dump_ipa_call_summary): Likewise.
7034         (ipa_dump_fn_summary): Likewise.
7035         (analyze_function_body): Likewise.
7036         (compute_fn_summary): Likewise.
7037         (estimate_edge_devirt_benefit): Likewise.
7038         (estimate_edge_size_and_time): Likewise.
7039         (estimate_calls_size_and_time): Likewise.
7040         (estimate_node_size_and_time): Likewise.
7041         (inline_update_callee_summaries): Likewise.
7042         (remap_edge_change_prob): Likewise.
7043         (remap_edge_summaries): Likewise.
7044         (ipa_merge_fn_summary_after_inlining): Likewise.
7045         (ipa_update_overall_fn_summary): Likewise.
7046         (read_ipa_call_summary): Likewise.
7047         (inline_read_section): Likewise.
7048         (write_ipa_call_summary): Likewise.
7049         (ipa_fn_summary_write): Likewise.
7050         (ipa_free_fn_summary): Likewise.
7051         * ipa-hsa.c (process_hsa_functions): Likewise.
7052         (ipa_hsa_write_summary): Likewise.
7053         (ipa_hsa_read_section): Likewise.
7054         * ipa-icf.c (sem_function::merge): Likewise.
7055         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7056         (do_estimate_edge_time): Likewise.
7057         (estimate_size_after_inlining): Likewise.
7058         (estimate_growth): Likewise.
7059         (growth_likely_positive): Likewise.
7060         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7061         (inline_call): Likewise.
7062         * ipa-inline.c (caller_growth_limits): Likewise.
7063         (can_inline_edge_p): Likewise.
7064         (can_inline_edge_by_limits_p): Likewise.
7065         (compute_uninlined_call_time): Likewise.
7066         (compute_inlined_call_time): Likewise.
7067         (want_inline_small_function_p): Likewise.
7068         (edge_badness): Likewise.
7069         (update_caller_keys): Likewise.
7070         (update_callee_keys): Likewise.
7071         (recursive_inlining): Likewise.
7072         (inline_small_functions): Likewise.
7073         (inline_to_all_callers_1): Likewise.
7074         (dump_overall_stats): Likewise.
7075         (early_inline_small_functions): Likewise.
7076         (early_inliner): Likewise.
7077         * ipa-inline.h (estimate_edge_growth): Likewise.
7078         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7079         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7080         * ipa-prop.h (IPA_NODE_REF): Likewise.
7081         (IPA_EDGE_REF): Likewise.
7082         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7083         (propagate_malloc): Likewise.
7084         * ipa-split.c (execute_split_functions): Likewise.
7085         * symbol-summary.h: Rename get to get_create.
7086         (get): Likewise.
7087         (get_create): Likewise.
7088         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7090 2018-06-08  Martin Liska  <mliska@suse.cz>
7092         * symbol-summary.h (release): Move definition out of class
7093         declaration.
7094         (symtab_removal): Likewise.
7095         (symtab_duplication): Likewise.
7097 2018-06-08  Martin Liska  <mliska@suse.cz>
7099         * symbol-summary.h (function_summary): Move constructor
7100         implementation out of class declaration.
7101         (release): Likewise.
7102         (symtab_insertion): Likewise.
7103         (symtab_removal): Likewise.
7104         (symtab_duplication): Likewise.
7105         (get): Likewise.
7107 2018-06-08  Martin Liska  <mliska@suse.cz>
7109         * Makefile.in: Remove support for MPX (macros, related functions,
7110         fields in cgraph_node, ...).
7111         * builtin-types.def (BT_BND): Likewise.
7112         (BT_FN_BND_CONST_PTR): Likewise.
7113         (BT_FN_CONST_PTR_BND): Likewise.
7114         (BT_FN_VOID_PTR_BND): Likewise.
7115         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7116         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7117         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7118         (expand_builtin_mempcpy_with_bounds): Likewise.
7119         (expand_builtin_memset_with_bounds): Likewise.
7120         (expand_builtin_memset_args): Likewise.
7121         (std_expand_builtin_va_start): Likewise.
7122         (expand_builtin): Likewise.
7123         (expand_builtin_with_bounds): Likewise.
7124         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7125         (DEF_LIB_BUILTIN_CHKP): Likewise.
7126         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7127         (DEF_CHKP_BUILTIN): Likewise.
7128         (BUILT_IN_MEMCPY): Likewise.
7129         (BUILT_IN_MEMMOVE): Likewise.
7130         (BUILT_IN_MEMPCPY): Likewise.
7131         (BUILT_IN_MEMSET): Likewise.
7132         (BUILT_IN_STPCPY): Likewise.
7133         (BUILT_IN_STRCAT): Likewise.
7134         (BUILT_IN_STRCHR): Likewise.
7135         (BUILT_IN_STRCPY): Likewise.
7136         (BUILT_IN_STRLEN): Likewise.
7137         (BUILT_IN_MEMCPY_CHK): Likewise.
7138         (BUILT_IN_MEMMOVE_CHK): Likewise.
7139         (BUILT_IN_MEMPCPY_CHK): Likewise.
7140         (BUILT_IN_MEMSET_CHK): Likewise.
7141         (BUILT_IN_STPCPY_CHK): Likewise.
7142         (BUILT_IN_STRCAT_CHK): Likewise.
7143         (BUILT_IN_STRCPY_CHK): Likewise.
7144         * calls.c (store_bounds): Likewise.
7145         (emit_call_1): Likewise.
7146         (special_function_p): Likewise.
7147         (maybe_warn_nonstring_arg): Likewise.
7148         (initialize_argument_information): Likewise.
7149         (finalize_must_preallocate): Likewise.
7150         (compute_argument_addresses): Likewise.
7151         (expand_call): Likewise.
7152         * cfgexpand.c (expand_call_stmt): Likewise.
7153         (expand_return): Likewise.
7154         (expand_gimple_stmt_1): Likewise.
7155         (pass_expand::execute): Likewise.
7156         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7157         (cgraph_node::remove): Likewise.
7158         (cgraph_node::dump): Likewise.
7159         (cgraph_node::verify_node): Likewise.
7160         * cgraph.h (chkp_function_instrumented_p): Likewise.
7161         (symtab_node::get_alias_target): Likewise.
7162         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7163         (cgraph_local_p): Likewise.
7164         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7165         (cgraph_edge::rebuild_references): Likewise.
7166         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7167         (walk_polymorphic_call_targets): Likewise.
7168         (cgraph_node::expand_thunk): Likewise.
7169         (symbol_table::output_weakrefs): Likewise.
7170         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7171         (ix86_handle_option): Likewise.
7172         * config/i386/constraints.md: Likewise.
7173         * config/i386/i386-builtin-types.def (BND): Likewise.
7174         (VOID): Likewise.
7175         (PVOID): Likewise.
7176         (ULONG): Likewise.
7177         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7178         (BDESC_FIRST): Likewise.
7179         (BDESC): Likewise.
7180         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7181         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7182         * config/i386/i386.c (enum reg_class): Likewise.
7183         (ix86_target_string): Likewise.
7184         (ix86_option_override_internal): Likewise.
7185         (ix86_conditional_register_usage): Likewise.
7186         (ix86_valid_target_attribute_inner_p): Likewise.
7187         (ix86_set_indirect_branch_type): Likewise.
7188         (ix86_set_current_function): Likewise.
7189         (ix86_function_arg_regno_p): Likewise.
7190         (init_cumulative_args): Likewise.
7191         (ix86_function_arg_advance): Likewise.
7192         (ix86_function_arg): Likewise.
7193         (ix86_pass_by_reference): Likewise.
7194         (ix86_function_value_regno_p): Likewise.
7195         (ix86_function_value_1): Likewise.
7196         (ix86_function_value_bounds): Likewise.
7197         (ix86_return_in_memory): Likewise.
7198         (ix86_setup_incoming_vararg_bounds): Likewise.
7199         (ix86_va_start): Likewise.
7200         (indirect_thunk_need_prefix): Likewise.
7201         (print_reg): Likewise.
7202         (ix86_print_operand): Likewise.
7203         (ix86_expand_call): Likewise.
7204         (ix86_output_function_return): Likewise.
7205         (reg_encoded_number): Likewise.
7206         (BDESC_VERIFYS): Likewise.
7207         (ix86_init_mpx_builtins): Likewise.
7208         (ix86_init_builtins): Likewise.
7209         (ix86_emit_cmove): Likewise.
7210         (ix86_emit_move_max): Likewise.
7211         (ix86_expand_builtin): Likewise.
7212         (ix86_builtin_mpx_function): Likewise.
7213         (ix86_get_arg_address_for_bt): Likewise.
7214         (ix86_load_bounds): Likewise.
7215         (ix86_store_bounds): Likewise.
7216         (ix86_load_returned_bounds): Likewise.
7217         (ix86_store_returned_bounds): Likewise.
7218         (ix86_class_likely_spilled_p): Likewise.
7219         (ix86_hard_regno_mode_ok): Likewise.
7220         (x86_order_regs_for_local_alloc): Likewise.
7221         (ix86_mitigate_rop): Likewise.
7222         (ix86_bnd_prefixed_insn_p): Likewise.
7223         (ix86_mpx_bound_mode): Likewise.
7224         (ix86_make_bounds_constant): Likewise.
7225         (ix86_initialize_bounds): Likewise.
7226         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7227         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7228         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7229         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7230         (TARGET_CHKP_BOUND_MODE): Likewise.
7231         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7232         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7233         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7234         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7235         * config/i386/i386.h (TARGET_MPX): Likewise.
7236         (TARGET_MPX_P): Likewise.
7237         (VALID_BND_REG_MODE): Likewise.
7238         (FIRST_BND_REG): Likewise.
7239         (LAST_BND_REG): Likewise.
7240         (enum reg_class): Likewise.
7241         (BND_REG_P): Likewise.
7242         (BND_REGNO_P): Likewise.
7243         (BNDmode): Likewise.
7244         (ADJUST_INSN_LENGTH): Likewise.
7245         * config/i386/i386.md: Likewise.
7246         * config/i386/i386.opt: Likewise.
7247         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7248         (defined): Likewise.
7249         (LINK_MPX): Likewise.
7250         (MPX_SPEC): Likewise.
7251         (LIBMPX_SPEC): Likewise.
7252         (LIBMPXWRAPPERS_SPEC): Likewise.
7253         (CHKP_SPEC): Likewise.
7254         * config/i386/predicates.md: Likewise.
7255         * dbxout.c (dbxout_type): Likewise.
7256         * doc/extend.texi: Likewise.
7257         * doc/invoke.texi: Likewise.
7258         * doc/md.texi: Likewise.
7259         * doc/tm.texi: Likewise.
7260         * doc/tm.texi.in: Likewise.
7261         * dwarf2out.c (is_base_type): Likewise.
7262         (gen_formal_types_die): Likewise.
7263         (gen_subprogram_die): Likewise.
7264         (gen_type_die_with_usage): Likewise.
7265         (gen_decl_die): Likewise.
7266         (dwarf2out_late_global_decl): Likewise.
7267         * expr.c (expand_assignment): Likewise.
7268         (emit_storent_insn): Likewise.
7269         (store_expr_with_bounds): Likewise.
7270         (store_expr): Likewise.
7271         (expand_expr_real_1): Likewise.
7272         * expr.h (store_expr_with_bounds): Likewise.
7273         * function.c (use_register_for_decl): Likewise.
7274         (struct bounds_parm_data): Likewise.
7275         (assign_parms_augmented_arg_list): Likewise.
7276         (assign_parm_find_entry_rtl): Likewise.
7277         (assign_parm_is_stack_parm): Likewise.
7278         (assign_parm_load_bounds): Likewise.
7279         (assign_bounds): Likewise.
7280         (assign_parms): Likewise.
7281         (expand_function_start): Likewise.
7282         * gcc.c (CHKP_SPEC): Likewise.
7283         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7284         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7285         (wrestrict_dom_walker::check_call): Likewise.
7286         * gimple.c (gimple_build_call_from_tree): Likewise.
7287         * gimple.h (enum gf_mask): Likewise.
7288         (gimple_call_with_bounds_p): Likewise.
7289         (gimple_call_set_with_bounds): Likewise.
7290         * gimplify.c (gimplify_init_constructor): Likewise.
7291         * ipa-cp.c (initialize_node_lattices): Likewise.
7292         (propagate_constants_across_call): Likewise.
7293         (find_more_scalar_values_for_callers_subset): Likewise.
7294         * ipa-hsa.c (process_hsa_functions): Likewise.
7295         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7296         * ipa-icf.c (sem_function::merge): Likewise.
7297         * ipa-inline.c (early_inliner): Likewise.
7298         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7299         (warn_function_cold): Likewise.
7300         (propagate_pure_const): Likewise.
7301         * ipa-ref.h (enum GTY): Likewise.
7302         * ipa-split.c (find_retbnd): Likewise.
7303         (consider_split): Likewise.
7304         (split_function): Likewise.
7305         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7306         * ipa.c (walk_polymorphic_call_targets): Likewise.
7307         (symbol_table::remove_unreachable_nodes): Likewise.
7308         (process_references): Likewise.
7309         (cgraph_build_static_cdtor_1): Likewise.
7310         * lto-cgraph.c (lto_output_node): Likewise.
7311         (output_refs): Likewise.
7312         (compute_ltrans_boundary): Likewise.
7313         (input_overwrite_node): Likewise.
7314         (input_node): Likewise.
7315         (input_cgraph_1): Likewise.
7316         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7317         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7318         (class pass_chkp_instrumentation_passes): Likewise.
7319         (make_pass_chkp_instrumentation_passes): Likewise.
7320         * passes.def: Likewise.
7321         * rtl.h (struct GTY): Likewise.
7322         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7323         * stor-layout.c (layout_type): Likewise.
7324         * symtab.c: Likewise.
7325         * target.def: Likewise.
7326         * targhooks.c (default_chkp_bound_type): Likewise.
7327         (default_chkp_bound_mode): Likewise.
7328         (default_builtin_chkp_function): Likewise.
7329         (default_chkp_function_value_bounds): Likewise.
7330         (default_chkp_make_bounds_constant): Likewise.
7331         (default_chkp_initialize_bounds): Likewise.
7332         * targhooks.h (default_chkp_bound_type): Likewise.
7333         (default_chkp_bound_mode): Likewise.
7334         (default_builtin_chkp_function): Likewise.
7335         (default_chkp_function_value_bounds): Likewise.
7336         (default_chkp_make_bounds_constant): Likewise.
7337         (default_chkp_initialize_bounds): Likewise.
7338         * toplev.c (compile_file): Likewise.
7339         (process_options): Likewise.
7340         * tree-core.h (DEF_BUILTIN): Likewise.
7341         (DEF_BUILTIN_CHKP): Likewise.
7342         * tree-inline.c (declare_return_variable): Likewise.
7343         (remap_gimple_stmt): Likewise.
7344         (copy_bb): Likewise.
7345         (initialize_inlined_parameters): Likewise.
7346         (expand_call_inline): Likewise.
7347         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7348         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7349         (make_pass_ipa_chkp_produce_thunks): Likewise.
7350         (make_pass_chkp): Likewise.
7351         (make_pass_chkp_opt): Likewise.
7352         (make_pass_chkp_instrumentation_passes): Likewise.
7353         * tree-pretty-print.c (dump_generic_node): Likewise.
7354         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7355         * tree-ssa-dce.c (propagate_necessity): Likewise.
7356         (eliminate_unnecessary_stmts): Likewise.
7357         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7358         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7359         * tree-ssa-sccvn.h: Likewise.
7360         * tree-ssa-strlen.c (get_string_length): Likewise.
7361         (valid_builtin_call): Likewise.
7362         (adjust_last_stmt): Likewise.
7363         (handle_builtin_strchr): Likewise.
7364         (handle_builtin_strcpy): Likewise.
7365         (handle_builtin_stxncpy): Likewise.
7366         (handle_builtin_memcpy): Likewise.
7367         (handle_builtin_strcat): Likewise.
7368         (strlen_check_and_optimize_stmt): Likewise.
7369         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7370         * tree-streamer-in.c: Likewise.
7371         * tree-streamer.c (record_common_node): Likewise.
7372         * tree.c (tree_code_size): Likewise.
7373         (wide_int_to_tree_1): Likewise.
7374         (type_contains_placeholder_1): Likewise.
7375         (build_common_tree_nodes): Likewise.
7376         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7377         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7378         (POINTER_BOUNDS_P): Likewise.
7379         (BOUNDED_TYPE_P): Likewise.
7380         (BOUNDED_P): Likewise.
7381         (CALL_WITH_BOUNDS_P): Likewise.
7382         (pointer_bounds_type_node): Likewise.
7383         * value-prof.c (gimple_ic): Likewise.
7384         * var-tracking.c (vt_add_function_parameters): Likewise.
7385         * varasm.c (make_decl_rtl): Likewise.
7386         (assemble_start_function): Likewise.
7387         (output_constant): Likewise.
7388         (maybe_assemble_visibility): Likewise.
7389         * varpool.c (ctor_for_folding): Likewise.
7390         * chkp-builtins.def: Remove.
7391         * ipa-chkp.c: Remove.
7392         * ipa-chkp.h: Remove.
7393         * rtl-chkp.c: Remove.
7394         * rtl-chkp.h: Remove.
7395         * tree-chkp-opt.c: Remove.
7396         * tree-chkp.c: Remove.
7397         * tree-chkp.h: Remove.
7399 2018-06-07  Carl Love  <cel@us.ibm.com>
7401         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7402         vextract_fp_from_shortl): Add BE support.
7404 2018-06-07  Paul Koning  <ni1d@arrl.net>
7406         * compare-elim.c (try_merge_compare): Don't merge compare if
7407         address contains a side effect.
7408         (try_eliminate_compare): Likewise.
7410 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7412         * config.gcc: Support "tremont".
7413         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7414         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7415         PROCESSOR_TREMONT.
7416         * config/i386/i386.c (m_TREMONT): Define.
7417         (processor_target_table): Add "tremont".
7418         (PTA_TREMONT): Define.
7419         (ix86_lea_outperforms): Add TARGET_TREMONT.
7420         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7421         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7422         and M_INTEL_GOLDMONT_PLUS.
7423         (fold_builtin_cpu): Add "tremont".
7424         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7425         (ix86_option_override_internal): Add "tremont".
7426         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7427         (processor_type): Add PROCESSOR_TREMONT.
7428         * config/i386/x86-tune.def: Add m_TREMONT.
7429         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7431 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7433         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7434         symbol defined for msp430i* devices to be lower case.
7436 2018-06-07  Richard Biener  <rguenther@suse.de>
7438         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7439         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7440         Properly wrap signed arithmetic if overflow wraps.
7442 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7444         PR tree-optimization/69615
7445         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7446         of a cast from a same precision integral SSA_NAME in a bb dominated
7447         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7448         cast to utype if rhs2 has already a compatible type.
7450 2018-06-07  Richard Biener  <rguenther@suse.de>
7452         PR tree-optimization/85935
7453         * graphite-scop-detection.c (find_params_in_bb): Analyze
7454         condition operands with respect to the correct loop.  Assert
7455         the analysis doesn't fail.
7457 2018-06-04  Carl Love  <cel@us.ibm.com>
7459         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7460         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7461         as it is slightly cheaper.
7462         (first_match_or_eos_index_<mode>):
7463         Calculate index using natural element order.
7464         (first_match_index_<mode>):
7465         Calculate index using natural element order.
7466         (first_match_or_eos_index_<mode>):
7467         Calculate index using natural order.
7468         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7469         for BE and LE modes.
7470         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7471         P9V_BUILTIN_VCLZLSBB_V16QI.
7472         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7473         specific.
7475 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7477         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7478         indentation and line wrap for many prototypes.  Add missing
7479         @smallexample directives around block of prototypes for vec_xl and
7480         vec_xst.
7482 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7484         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7485         track if we pass or return IEEE 128-bit floating point.
7486         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7487         C++ mangling that is compatible with GCC 8.1.
7488         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7489         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7490         floating point types.
7491         (rs6000_function_arg_advance_1): Likewise.
7492         (rs6000_mangle_type): Optionally generate mangled names that match
7493         what GCC 8.1 generated for IEEE 128-bit floating point types.
7494         (rs6000_globalize_decl_name): If we have an external function that
7495         passes or returns IEEE 128-bit types, generate a weak reference
7496         from the mangled name used in GCC 8.1 to the current mangled
7497         name.
7498         (rs6000_init_builtins): Make __ibm128 use the long double type if
7499         long double is IBM extended double.  Make __float128 use the long
7500         double type if long double is IEEE 128-bit.
7502         PR target/85657
7503         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7504         macro for __ibm128 built-in functions.
7505         (PACK_IF): Add __ibm128 pack/unpack functions.
7506         (UNPACK_IF): Likewise.
7507         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7508         enable long double built-in functions if long double is IEEE
7509         128-bit floating point.
7510         (rs6000_invalid_builtin): Update long double built-in function
7511         error message.
7512         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7513         functions, adjust the built-in function to use the long double
7514         built-in function if __ibm128 and long double are the same type.
7515         * doc/extend.texi (PowerPC builtins): Update documention for
7516         __builtin_{,un}pack_longdouble.  Add documentation for
7517         __builtin_{,un}pack_ibm128.
7519 2018-06-06  Jim Wilson  <jimw@sifive.com>
7521         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7522         (struct machine_function): New field interrupt_mode.
7523         (riscv_handle_type_attribute): New function.  Add forward declaration.
7524         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7525         (riscv_expand_epilogue): Check interrupt_mode field.
7526         (riscv_set_current_function): Check interrupt attribute args and
7527         set interrupt_mode field.
7528         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7529         (riscv_sret, riscv_uret): New.
7530         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7531         new arguments to interrupt attribute.
7533 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7535         PR target/63177
7536         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7537         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7539 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7541         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7542         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7543         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7544         several redundant entries.
7546 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7548         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7549         type from "rtx" to "rtx_insn *".
7550         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7551         for local "call_insn", removing cast.
7552         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7554 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7556         PR tree-optimization/86066
7557         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7558         for BIT_INSERT_EXPR stores.
7560 2018-06-06  Richard Biener  <rguenther@suse.de>
7562         PR tree-optimization/86062
7563         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7564         component refs ontop
7565         of to be offsetted base.
7567 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7569         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7570         to be static and remove check on interrupt attribute name.
7572 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7574         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7575         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7577 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7579         PR target/79924
7580         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7581         second argument.
7582         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7583         Remove second argument, change how error is called.
7584         (aarch64_layout_arg): Remove second argument from
7585         aarch64_err_no_fpadvsimd call.
7586         (aarch64_init_cumulative_args): Ditto.
7587         (aarch64_gimplify_va_arg_expr): Ditto.
7588         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7590 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7592         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7593         (*simple_return_indirect_internal<mode>): Rename from
7594         simple_return_indirect_internal.  Use W mode iterator.
7595         (rstorssp): New expander.
7596         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7597         (clrssbsy): New expander.
7598         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7600 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7602         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7603         __typeof__.
7604         (cmse_check_pointed_object): Likewise.
7606 2018-06-05  Martin Liska  <mliska@suse.cz>
7608         PR gcov-profile/47618
7609         * doc/invoke.texi: Document how -fprofile-dir format
7610         is extended.
7612 2018-06-05  Richard Biener  <rguenther@suse.de>
7614         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7615         removal pretend DOM info isn't available so we do not update
7616         it and only remove edges, not dominated blocks.  Actually free
7617         DOM info in case we removed something.  Remove unreachable blocks.
7618         (mfb_keep_latches): Work with either DOM info or marked backedges.
7619         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7620         first.  Mark backedges if DOM info isn't available.
7621         (Re-)compute DOM info after cleanup_control_flow_pre.
7623 2018-06-05  Richard Biener  <rguenther@suse.de>
7625         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7626         (locus_discrim_hasher::hash): Adjust.
7627         (locus_discrim_hasher::equal): Likewise.
7628         (next_discriminator_for_locus): Work on line directly.
7629         (same_line_p): Pass in expanded locus1 as well.
7630         (assign_discriminators): Avoid redundant location expansions.
7632 2018-06-05  Richard Biener  <rguenther@suse.de>
7634         PR tree-optimization/86046
7635         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7636         if required after clearing TREE_ADDRESSABLE.
7638 2018-06-05  Richard Biener  <rguenther@suse.de>
7640         PR tree-optimization/86047
7641         * tree-ssa-loop.c (for_each_index): Glob handling of all
7642         decls and constants and really handle all of them.
7644 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7646         PR target/81497
7647         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7648         qualifier_void_pointer and qualifier_const_void_pointer.
7649         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7650         (arm_init_builtins): Handle the above.
7651         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7652         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7653         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7654         void intrinsics.
7656 2018-06-05  Martin Liska  <mliska@suse.cz>
7658         * auto-profile.c (read_autofdo_file): Do not use
7659         gcov_ctr_summary struct.
7660         (afdo_callsite_hot_enough_for_early_inline): Likewise.
7661         * coverage.c (struct counts_entry): Likewise.
7662         (read_counts_file): Read just single summary entry.
7663         (get_coverage_counts): Use gcov_summary struct.
7664         * coverage.h (get_coverage_counts): Likewise.
7665         * gcov-dump.c (dump_working_sets): Likewise.
7666         (tag_summary): Dump just single summary.
7667         * gcov-io.c (gcov_write_summary): Write just histogram
7668         summary.
7669         (gcov_read_summary): Read just single summary.
7670         (compute_working_sets): Use gcov_summary struct.
7671         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7672         of GCOV_COUNTERS_SUMMABLE.
7673         (GCOV_COUNTERS_SUMMABLE): Remove.
7674         (GCOV_FIRST_VALUE_COUNTER): Replace with
7675         GCOV_COUNTER_V_INTERVAL.
7676         (struct gcov_ctr_summary): Remove.
7677         (struct gcov_summary): Directly use fields of former
7678         gcov_ctr_summary.
7679         (compute_working_sets): Use gcov_summary struct.
7680         * gcov.c (read_count_file): Do not use ctrs fields.
7681         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7682         struct.
7683         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7684         struct.
7685         * profile.c: Likewise.
7686         * profile.h: Likewise.
7688 2018-06-05  Martin Liska  <mliska@suse.cz>
7690         PR gcov-profile/84846
7691         * gcov.c (output_lines): Print working directory only
7692         in intermediate format.
7694 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
7696         * config/s390/s390-builtin-types.def: Add void function type.
7697         * config/s390/s390-builtins.def: Use the function type for the
7698         tbeginc builtin.
7700 2018-06-04  Jim Wilson  <jimw@sifive.com>
7702         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7703         to int.
7704         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7705         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
7706         handle EH_RETURN_DATA_REGNO registers properly.
7707         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7708         (riscv_expand_epilogue): Update comment.  Change argument name and
7709         type.  Update code to use new name and type.  Pass new args to
7710         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
7711         EXCEPTION_RETURN.
7712         * config/riscv/riscv.md (NORMAL_RETURN): New.
7713         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7714         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7715         (eh_return): Call gen_eh_return_internal and emit barrier.
7716         (eh_return_internal): Call riscv_expand_epilogue.
7718 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7720         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7721         bit_insertion field and declare can_be_merged_into method.
7722         (merged_store_group::can_be_merged_into): New method.
7723         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7724         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
7725         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7727 2018-06-04  Richard Biener  <rguenther@suse.de>
7729         PR tree-optimization/85955
7730         * builtins.c (fold_builtin_sincos): Convert pointers to
7731         destination to appropriate type before dereferencing.
7733 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
7735         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7737 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
7739         * expr.c (expand_expr_real_1): Force the operand into memory if
7740         its TYPE_MODE is BLKmode and if there is no integer mode for
7741         the number of bits being extracted.
7743 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7745         PR target/85832
7746         PR target/86036
7747         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7748         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7750 2018-06-04  Richard Biener  <rguenther@suse.de>
7752         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7753         (cleanup_tree_cfg_noloop): ... single caller.  Do
7754         start_recording_case_labels later.
7756 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
7758         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7759         to _IMMINTRIN_H_INCLUDED.
7760         * config/i386/pconfigintrin.h: Ditto.
7761         * config/i386/waitpkgintrin.h: Ditto.
7762         * config/i386/immintrin.h: Add includes for sgxintrin.h,
7763         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7764         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7765         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7766         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7767         waitpkgintrin.h and cldemoteintrin.h.
7769 2018-06-04  Richard Biener  <rguenther@suse.de>
7771         PR tree-optimization/86038
7772         * tracer.c (find_best_successor): Check probability for
7773         being initialized, bail out if not.
7775 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
7777         PR target/86003
7778         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7779         of bits to ignore when comparing architectures.
7781 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7783         PR tree-optimization/69615
7784         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7785         maximum or minimum of the type, try to merge it also as if
7786         range1 is + [-, x - 1] or + [x + 1, -].
7788         PR c++/86025
7789         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7791 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
7793         PR tree-optimization/86034
7794         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7795         the unsigned bitfield type in a bit insertion sequence if it does not
7796         have a larger precision than the bitfield size.
7797         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7799 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
7801         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7803 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7805         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7806         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7807         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7808         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7810 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7812         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7813         Disable -fdelete-null-pointer-checks for ELF toolchain.
7815 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7816             Kito Cheng  <kito.cheng@gmail.com>
7818         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7819         (nds32le-*-*, nds32be-*-*): Integrate checking process.
7820         (nds32*-*-*): Add glibc and uclibc conditions.
7821         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7822         (TARGET_EXCEPT_UNWIND_INFO): Define.
7823         * config/nds32/elf.h: New file.
7824         * config/nds32/linux.h: New file.
7825         * config/nds32/nds32-elf.opt: New file.
7826         * config/nds32/nds32-linux.opt: New file.
7827         * config/nds32/nds32-fp-as-gp.c
7828         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7829         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7830         TARGET_LINUX_ABI.
7831         (nds32_asm_file_end): Ditto.
7832         (nds32_print_operand): Ditto.
7833         (nds32_insert_attributes): Ditto.
7834         (nds32_init_libfuncs): New function.
7835         (TARGET_HAVE_TLS): Define.
7836         (TARGET_INIT_LIBFUNCS): Define.
7837         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7838         spec content.
7839         (TARGET_ELF): Apply different mcmodel setting.
7840         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7841         been migrated into elf.h and linux.h files.
7842         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7843         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7844         (mcmodel): The content has been migrated into nds32-elf.opt and
7845         nds32-linux.opt files.
7846         * config/nds32/t-elf: New file.
7847         * config/nds32/t-linux: New file.
7849 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7850             Shiva Chen  <shiva0217@gmail.com>
7852         * config/nds32/constants.md (unspec_volatile_element): Add
7853         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7854         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7855         optimization.
7856         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7857         (make_pass_nds32_fp_as_gp): Declare.
7858         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7859         optmization pass.
7860         (nds32_asm_function_end_prologue): Remove unused asm output.
7861         (nds32_asm_function_begin_epilogue): Remove unused asm output.
7862         (nds32_asm_file_start): Output necessary fp_as_gp information.
7863         (nds32_option_override): Adjust register usage.
7864         (nds32_expand_prologue): Consider fp_as_gp situation.
7865         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7866         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7867         (epilogue): Ditto.
7868         (return): Ditto.
7869         (simple_return): Ditto.
7870         (omit_fp_begin): Output special directive for fp_as_gp.
7871         (omit_fp_end): Output special directive for fp_as_gp.
7872         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7873         mforbid-fp-as-gp): New options.
7875 2018-06-01  Mark Wielaard  <mark@klomp.org>
7877         * dwarf2out.c (dwarf2out_finish): Remove generation of
7878         DW_AT_loclists_base.
7880 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
7882         * gimple-ssa-store-merging.c: Include gimple-fold.h.
7883         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7884         (struct merged_store_group): Add bit_insertion field.
7885         (dump_char_array): Use standard hexadecimal format.
7886         (merged_store_group::merged_store_group): Set bit_insertion to false.
7887         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
7888         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
7889         also print the mask in the dump file.
7890         (pass_store_merging::gate): Minor tweak.
7891         (imm_store_chain_info::coalesce_immediate): Fix wrong association
7892         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
7893         stores with INTEGER_CST stores.
7894         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7895         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7896         and use it throughout.  Generate bit insertion sequences if need be.
7897         (pass_store_merging::process_store): Remove redundant condition.
7898         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7900 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
7902         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7903         the 128-bit floating point types.  Fix function comment.
7905 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7907         * config/aarch64/aarch64-simd.md
7908         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7909         mnemonics.
7910         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7911         mnemonics.
7913 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7915         PR tree-optimization/85989
7916         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7917         variable.
7918         (backprop::intersect_uses): Check it when deciding whether this
7919         is a backedge reference.
7920         (backprop::process_block): Add each phi to m_visited_phis
7921         after visiting it, then clear it at the end.
7923 2018-06-01  Richard Biener  <rguenther@suse.de>
7925         * tree-vectorizer.h (vect_dr_stmt): New function.
7926         (vect_get_load_cost): Adjust.
7927         (vect_get_store_cost): Likewise.
7928         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7929         Use vect_dr_stmt instead of DR_SMTT.
7930         (vect_record_base_alignments): Likewise.
7931         (vect_calculate_target_alignment): Likewise.
7932         (vect_compute_data_ref_alignment): Likewise and make static.
7933         (vect_update_misalignment_for_peel): Likewise.
7934         (vect_verify_datarefs_alignment): Likewise.
7935         (vector_alignment_reachable_p): Likewise.
7936         (vect_get_data_access_cost): Likewise.  Pass down
7937         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7938         (vect_get_peeling_costs_all_drs): Likewise.
7939         (vect_peeling_hash_get_lowest_cost): Likewise.
7940         (vect_enhance_data_refs_alignment): Likewise.
7941         (vect_find_same_alignment_drs): Likewise.
7942         (vect_analyze_data_refs_alignment): Likewise.
7943         (vect_analyze_group_access_1): Likewise.
7944         (vect_analyze_group_access): Likewise.
7945         (vect_analyze_data_ref_access): Likewise.
7946         (vect_analyze_data_ref_accesses): Likewise.
7947         (vect_vfa_segment_size): Likewise.
7948         (vect_small_gap_p): Likewise.
7949         (vectorizable_with_step_bound_p): Likewise.
7950         (vect_prune_runtime_alias_test_list): Likewise.
7951         (vect_analyze_data_refs): Likewise.
7952         (vect_supportable_dr_alignment): Likewise.
7953         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7954         (vect_gen_prolog_loop_niters): Likewise.
7955         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7956         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7957         modify DR_STMT.
7958         (vect_recog_mask_conversion_pattern): Likewise.
7959         (vect_try_gather_scatter_pattern): Likewise.
7960         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7961         to vect_get_store_cost.
7962         (vect_get_store_cost): Get stmt_info instead of DR.
7963         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7964         (vect_get_load_cost): Get stmt_info instead of DR.
7966 2018-06-01  Richard Biener  <rguenther@suse.de>
7968         PR middle-end/86017
7969         * gimple-fold.c (var_decl_component_p): Also allow offsetted
7970         vars wrapped in MEM_REFs.
7972 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7974         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7975         Fix subreg tests so that we only return a choice between
7976         GENERAL_REGS and FP_REGS if the original classes included both.
7978 2018-06-01  Richard Biener  <rguenther@suse.de>
7980         PR ipa/85960
7981         * tree-ssa-structalias.c (get_function_part_constraint):
7982         Handle NULL fi->decl.
7983         (find_func_aliases_for_call): Properly handle indirect
7984         fi from direct call.
7985         (find_func_clobbers): Likewise.
7986         (ipa_pta_execute): Likewise.
7987         (create_variable_info_for): For functions that are ifunc_resolver
7988         resolve to a varinfo that contains the result of the resolver call.
7989         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7990         aliases.
7992 2018-05-31  Michael Collison  <michael.collison@arm.com>
7994         * config/aarch64/aarch64.md:
7995         (*fix_to_zero_extenddfdi2): New pattern.
7996         * gcc.target/aarch64/fix_extend1.c: New testcase.
7998 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8000         PR middle-end/78809
8001         PR middle-end/83026
8002         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8003         and BUILT_IN_STRNCMP_EQ.
8004         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8005         BUILT_IN_STRNCMP_EQ.
8006         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8007         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8008         (gimple_fold_builtin): Likewise.
8009         * tree-ssa-strlen.c (compute_string_length): New function.
8010         (determine_min_obsize): New function.
8011         (handle_builtin_string_cmp): New function to handle calls to
8012         string compare functions.
8013         (strlen_optimize_stmt): Add handling to builtin string compare
8014         calls.
8015         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8016         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8017         * tree.c (build_common_builtin_nodes): Add new defines of
8018         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8020 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8022         PR target/85984
8023         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8024         functions with naked attribute.
8026 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8028         * config/i386/sse.md (avx_vec_concat<mode>):
8029         Substitute concat_tg_mode mode attribute with xtg_mode.
8030         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8031         (concat_tg_mode): Remove mode attribute.
8033 2018-05-31  Martin Sebor  <msebor@redhat.com>
8035         PR c/82063
8036         * calls.c (alloc_max_size): Correct a logic error/typo.
8037         Treat excessive arguments as infinite.  Warn for invalid arguments.
8038         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8040 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8042         PR target/85829
8043         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8044         and movx for Haswell.
8046 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8047             Cesar Philippidis  <cesar@codesourcery.com>
8049         PR middle-end/85879
8050         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8051         when emitting error on private/firstprivate reductions.
8052         * omp-low.c (lower_omp_target): Avoid reference-type processing
8053         on pointers for firstprivate clause.
8055 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8057         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8058         (st1x2): Likewise.
8059         (st1x3): Likewise.
8060         * config/aarch64/aarch64-simd.md
8061         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8062         (aarch64_ld1_x3_<mode>): Likewise
8063         (aarch64_st1x2<VALLDIF:mode>): Likewise
8064         (aarch64_st1_x2_<mode>): Likewise
8065         (aarch64_st1x3<VALLDIF:mode>): Likewise
8066         (aarch64_st1_x3_<mode>): Likewise
8067         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8068         (vld1_s8_x3): Likewise.
8069         (vld1_u16_x3): Likewise.
8070         (vld1_s16_x3): Likewise.
8071         (vld1_u32_x3): Likewise.
8072         (vld1_s32_x3): Likewise.
8073         (vld1_u64_x3): Likewise.
8074         (vld1_s64_x3): Likewise.
8075         (vld1_f16_x3): Likewise.
8076         (vld1_f32_x3): Likewise.
8077         (vld1_f64_x3): Likewise.
8078         (vld1_p8_x3): Likewise.
8079         (vld1_p16_x3): Likewise.
8080         (vld1_p64_x3): Likewise.
8081         (vld1q_u8_x3): Likewise.
8082         (vld1q_s8_x3): Likewise.
8083         (vld1q_u16_x3): Likewise.
8084         (vld1q_s16_x3): Likewise.
8085         (vld1q_u32_x3): Likewise.
8086         (vld1q_s32_x3): Likewise.
8087         (vld1q_u64_x3): Likewise.
8088         (vld1q_s64_x3): Likewise.
8089         (vld1q_f16_x3): Likewise.
8090         (vld1q_f32_x3): Likewise.
8091         (vld1q_f64_x3): Likewise.
8092         (vld1q_p8_x3): Likewise.
8093         (vld1q_p16_x3): Likewise.
8094         (vld1q_p64_x3): Likewise.
8095         (vst1_s64_x2): Likewise.
8096         (vst1_u64_x2): Likewise.
8097         (vst1_f64_x2): Likewise.
8098         (vst1_s8_x2): Likewise.
8099         (vst1_p8_x2): Likewise.
8100         (vst1_s16_x2): Likewise.
8101         (vst1_p16_x2): Likewise.
8102         (vst1_s32_x2): Likewise.
8103         (vst1_u8_x2): Likewise.
8104         (vst1_u16_x2): Likewise.
8105         (vst1_u32_x2): Likewise.
8106         (vst1_f16_x2): Likewise.
8107         (vst1_f32_x2): Likewise.
8108         (vst1_p64_x2): Likewise.
8109         (vst1q_s8_x2): Likewise.
8110         (vst1q_p8_x2): Likewise.
8111         (vst1q_s16_x2): Likewise.
8112         (vst1q_p16_x2): Likewise.
8113         (vst1q_s32_x2): Likewise.
8114         (vst1q_s64_x2): Likewise.
8115         (vst1q_u8_x2): Likewise.
8116         (vst1q_u16_x2): Likewise.
8117         (vst1q_u32_x2): Likewise.
8118         (vst1q_u64_x2): Likewise.
8119         (vst1q_f16_x2): Likewise.
8120         (vst1q_f32_x2): Likewise.
8121         (vst1q_f64_x2): Likewise.
8122         (vst1q_p64_x2): Likewise.
8123         (vst1_s64_x3): Likewise.
8124         (vst1_u64_x3): Likewise.
8125         (vst1_f64_x3): Likewise.
8126         (vst1_s8_x3): Likewise.
8127         (vst1_p8_x3): Likewise.
8128         (vst1_s16_x3): Likewise.
8129         (vst1_p16_x3): Likewise.
8130         (vst1_s32_x3): Likewise.
8131         (vst1_u8_x3): Likewise.
8132         (vst1_u16_x3): Likewise.
8133         (vst1_u32_x3): Likewise.
8134         (vst1_f16_x3): Likewise.
8135         (vst1_f32_x3): Likewise.
8136         (vst1_p64_x3): Likewise.
8137         (vst1q_s8_x3): Likewise.
8138         (vst1q_p8_x3): Likewise.
8139         (vst1q_s16_x3): Likewise.
8140         (vst1q_p16_x3): Likewise.
8141         (vst1q_s32_x3): Likewise.
8142         (vst1q_s64_x3): Likewise.
8143         (vst1q_u8_x3): Likewise.
8144         (vst1q_u16_x3): Likewise.
8145         (vst1q_u32_x3): Likewise.
8146         (vst1q_u64_x3): Likewise.
8147         (vst1q_f16_x3): Likewise.
8148         (vst1q_f32_x3): Likewise.
8149         (vst1q_f64_x3): Likewise.
8150         (vst1q_p64_x3): Likewise.
8152 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8154         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8155         user_label_prefix to name.
8157         * tree-core.h: Update comment about the format of NAME string
8158         passed to handler in attribute_spec.
8160         * config/msp430/msp430.md: Remove erroneous subreg expression from
8161         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8162         zero_extend{q,h}isi2.
8164 2018-05-30  Borislav Petkov  <bp@suse.de>
8166         * doc/extend.texi: Document some architecture specific
8167         constraints and sort entries.
8169 2018-05-30  Martin Sebor  <msebor@redhat.com>
8171         PR middle-end/85369
8172         * builtins.c (expand_builtin_stpcpy_1): New function.
8173         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8174         only if the former succeeds.
8176 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8178         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8179         in saphira.
8181 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8183         * doc/invoke.texi (-flinker-output): Document
8185 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8187         * passes.c (ipa_write_summaries): Only modify statements if body
8188         is in memory.
8189         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8190         incrementally linking.
8191         (ipa_passes): Likewise.
8192         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8193         pass down resolution info.
8194         * common.opt (flag_incremental_link): Update info.
8195         * gcc.c (plugin specs): Turn flinker-output=* to
8196         -plugin-opt=-linker-output-known
8197         * toplev.c (compile_file): Also cut compilation when doing incremental
8198         link.
8199         * flag-types. (enum lto_partition_model): Add
8200         LTO_LINKER_OUTPUT_NOLTOREL.
8201         (invoke.texi): Add -flinker-output docs.
8202         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8203         link same way as WPA; do not stream in dead initializers.
8205         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8206         darf2out_register_external_decl): Support incremental link.
8208 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8210         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8212 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8214         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8215         it down to simple_object_copy_lto_debug_sections.
8216         (run_gcc): Determine incremental LTO link time and configure
8217         lto1 into non-wpa mode, disable renaming of debug sections.
8219 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8221         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8222         descriptions of various incorrectly documented functions.
8224 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8226         Revert:
8227         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8228         address check not strict.
8230 2018-05-30  Richard Biener  <rguenther@suse.de>
8232         PR tree-optimization/85964
8233         * tracer.c (better_p): Drop initialized count check, we only
8234         call the function with initialized counts now.
8235         (find_best_successor): Do find a best edge if one
8236         has uninitialized count.
8237         (find_best_predecessor): Likewise.  Do BB frequency check only
8238         if count is initialized.
8240 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8242         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8243         (aarch64_ldrstr_offset_compare): New.
8244         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8245         load/store orderings.
8246         (aarch64_gen_adjusted_ldpstp): Likewise.
8248 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8250         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8251         Check for subset of GENERAL_REGS and FP_REGS.
8252         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8253         r=w alternative.
8255 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8257         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8258         and wi::to_poly_offset.  Add the current offset and then check
8259         whether the sum fits, rather than using an unchecked addition of
8260         a checked term.  Check for a shwi rather than a uhwi.
8261         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8262         (store_constructor): Use poly_int_tree_p.
8263         (expand_expr_real_1): Likewise.
8264         * function.c (assign_temp): Likewise.
8265         * fold-const.c (const_binop): Use poly_int_tree_p and
8266         wi::to_poly_offset.
8267         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8268         division.
8269         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8270         to_poly_offset for MEM offsets.
8271         * ipa-icf.c (sem_variable::equals): Likewise.
8272         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8273         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8274         wi::to_poly_offset for BIT_FIELD_REF offsets.
8275         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8276         wi::to_poly_offset.
8277         * var-tracking.c (emit_note_insn_var_location): Use
8278         tree_to_poly_uint64.
8280 2018-05-29  Jim Wilson  <jimw@sifive.com>
8282         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8284 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8286         PR target/85950
8287         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8288         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8289         sequence.
8290         (sse4_1_round<mode>2): Use nonimmediate_operand
8291         for operand 1 predicate.
8293 2018-05-29  Martin Sebor  <msebor@redhat.com>
8294             Richard Biener  <rguenther@suse.de>
8296         PR testsuite/85888
8297         * calls.c (get_size_range): Call determine_value_range instead
8298         of get_value_range..
8299         * tree-vrp.h (determine_value_range): Declared new function.
8300         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8302 2018-05-29  Richard Biener  <rguenther@suse.de>
8304         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8305         sure to use non-pattern stmts for get_earlier_stmt arguments.
8306         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8307         called on pattern stmts.
8308         (get_later_stmt): Likewise.
8310 2018-05-29  Martin Liska  <mliska@suse.cz>
8312         PR gcov-profile/85759
8313         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8314         env variables.
8316 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8318         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8319         VEC_UNPACK_*_EXPR.
8320         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8321         VEC_PACK_*_EXPR.
8323         PR target/85918
8324         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8325         VEC_PACK_FLOAT_EXPR): New tree codes.
8326         * tree-pretty-print.c (op_code_prio): Handle
8327         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8328         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8329         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8330         * tree-inline.c (estimate_operator_cost): Likewise.
8331         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8332         * fold-const.c (const_binop): Likewise.
8333         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8334         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8335         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8336         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8337         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8338         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8339         * expr.c (expand_expr_real_2): Likewise.
8340         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8341         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8342         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8343         optabs.
8344         * optabs.c (expand_widen_pattern_expr): For
8345         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8346         sign from result type rather than operand's type.
8347         (expand_binop_directly): For vec_packu_float_optab and
8348         vec_packs_float_optab allow result type to be different from operand's
8349         type.
8350         * optabs-tree.c (optab_for_tree_code): Handle
8351         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8352         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8353         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8354         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8355         VEC_PACK_FLOAT_EXPR.
8356         * tree-vect-stmts.c (supportable_widening_operation): Handle
8357         FIX_TRUNC_EXPR.
8358         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8359         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8360         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8361         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8362         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8363         mode attributes.
8364         (vec_pack<floatprefix>_float_<mode>): New expander.
8365         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8366         attributes.
8367         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8368         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8369         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8370         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8371         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8372         Document.
8373         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8374         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8375         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8376         VEC_PACK_FLOAT_EXPR): Document.
8378 2018-05-29  Richard Biener  <rguenther@suse.de>
8380         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8381         member.
8382         (stmt_vec_info_vec): Make pointer.
8383         (init_stmt_vec_info_vec): Remove.
8384         (free_stmt_vec_info_vec): Likewise.
8385         (set_stmt_vec_info_vec): New function.
8386         (free_stmt_vec_infos): Likewise.
8387         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8388         (set_vinfo_for_stmt): Likewise.
8389         (get_earlier_stmt): Likewise.
8390         (get_later_stmt): Likewise.
8391         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8392         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8393         (vec_info::~vec_info): Free stmt_vec_infos.
8394         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8395         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8396         (pass_slp_vectorize::execute): Likewise.
8397         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8398         (free_stmt_vec_info_vec): Likewise.
8399         (set_stmt_vec_info_vec): New function.
8400         (free_stmt_vec_infos): Likewise.
8401         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8402         the global stmt_vec_info_vec.
8403         * tree-parloops.c (gather_scalar_reductions): Use
8404         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8405         vector.
8407 2018-05-29  Richard Biener  <rguenther@suse.de>
8409         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8411 2018-05-29  Martin Liska  <mliska@suse.cz>
8412             David Malcolm  <dmalcolm@redhat.com>
8414         * vec.c (test_reverse): New.
8415         (vec_c_tests): Add new test.
8416         * vec.h (vl_ptr>::reverse): New function.
8418 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8420         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8422         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8423         and later.
8425 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8427         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8429 2018-05-28  Richard Biener  <rguenther@suse.de>
8431         PR tree-optimization/85933
8432         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8433         look at stmts marked as vectorizable.
8435 2018-05-28  Richard Biener  <rguenther@suse.de>
8437         PR tree-optimization/85934
8438         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8439         vector boolean check before scalar optimization.
8441 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8443         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8444         for armv5te.
8446 2018-05-28  Mark Wielaard  <mark@klomp.org>
8448         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8449         if it is an expression containing a minus sign.
8451 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8453         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8455 2018-05-27  Paul Koning  <ni1d@arrl.net>
8457         * config/pdp11/pdp11.md (truncsihi2): Remove.
8459 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8460             Chung-Ju Wu  <jasonwucj@gmail.com>
8462         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8463         implementation.
8464         (unaligned_store_dw): Ditto.
8465         * config/nds32/nds32-memory-manipulation.c
8466         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8467         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8468         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8469         (emit_setmem_word_loop): Rename to ...
8470         (emit_setmem_doubleword_loop): ... this.
8471         (nds32_gen_dup_4_byte_to_word_value): New function.
8472         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8473         (nds32_expand_setmem_loop): Refine implementation.
8474         (nds32_expand_setmem_loop_v3m): Ditto.
8475         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8476         pattern.
8478 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8480         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8482 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8484         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8485         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8486         machine->attr_no_prologue_p.
8487         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8488         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8489         (nds32_expand_epilogue): Consider attr_naked_p.
8490         (nds32_expand_epilogue_v3pop): Likewise.
8491         (nds32_can_use_return_insn): Likewise.
8492         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8493         attr_no_prologue_p fields.
8494         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8496 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8498         PR target/85918
8499         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8500         attributes.
8501         * config/i386/sse.md
8502         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8503         Rename to ...
8504         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8505         ... this.
8506         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8507         Rename to ...
8508         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8509         ... this.
8510         (*<floatsuffix>floatv2div2sf2): Rename to ...
8511         (*float<floatunssuffix>v2div2sf2): ... this.
8512         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8513         (float<floatunssuffix>v2div2sf2_mask): ... this.
8514         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8515         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8516         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8517         to ...
8518         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8519         ... this.
8520         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8521         Rename to ...
8522         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8523         ... this.
8524         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8525         Rename to ...
8526         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8527         ... this.
8528         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8529         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8530         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8531         gen_ufix_truncv8dfv8si2.
8532         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8533         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8534         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8535         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8536         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8537         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8538         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8539         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8541 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8543         PR target/85900
8544         PR target/85345
8545         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8547 2018-05-25  Jim Wilson  <jimw@sifive.com>
8549         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8550         * config/riscv/riscv.c (struct machine_function): Add
8551         interrupt_handler_p and attribute_checked_p fields.
8552         (riscv_attribute_table): Add interrupt.
8553         (riscv_interrupt_type_p): New.
8554         (riscv_save_reg_p): Save extra regs for interrupt handler.
8555         (riscv_use_save_libcall): Return false  for interrupt handler.
8556         (riscv_first_stack_step): Add forward declaration.
8557         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8558         for interrupt handler with large frame.  Use it for saved reg list.
8559         (riscv_expand_prologue): Move flag_stack_usage_info support to
8560         eliminate duplication.
8561         (riscv_expand_epilogue): Generate mret for interrupt handler.
8562         (riscv_epilogue_uses): New.
8563         (riscv_can_use_return_insn): Return false for interrupt handler.
8564         (riscv_function_ok_for_sibcall): Likewise.
8565         (riscv_set_current_function): Add interrupt handler support.
8566         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8567         * config/riscv/riscv.md (UNSPECV_MRET): New.
8568         (GP_REGNUM): New.
8569         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8570         (riscv_mret): New.
8571         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8573 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8575         PR tree-optimization/85712
8576         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8577         this candidate has already been replaced in-situ by a copy.
8579 2018-05-25  Jason Merrill  <jason@redhat.com>
8581         PR c++/80485 - inline function non-zero address.
8582         * symtab.c (nonzero_address): Check DECL_COMDAT.
8584 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8586         PR target/83628
8587         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8588         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8589         extension of SImode operation.  Use const123_operand predicate.
8590         (*saddsi_1): Remove.
8591         (*saddl_se_1): Ditto.
8592         (*ssubsi_1): Ditto.
8593         (*ssubl_se_1): Ditto.
8594         * config/alpha/predicates.md (const123_operand): New predicate.
8595         * config/alpha/constraints.md (P): Use IN_RANGE.
8597 2018-05-25  Richard Biener  <rguenther@suse.de>
8599         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8600         defaulted to true.
8601         (ref_maybe_used_by_stmt_p): Likewise.
8602         (stmt_may_clobber_ref_p): Likewise.
8603         (stmt_may_clobber_ref_p_1): Likewise.
8604         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8605         and pass it along.
8606         (ref_maybe_used_by_stmt_p): Likewise.
8607         (stmt_may_clobber_ref_p): Likewise.
8608         (stmt_may_clobber_ref_p_1): Likewise.
8609         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8610         the alias oracle to disambiguate DRs with stmts DR analysis
8611         couldn't handle.
8612         (vect_analyze_data_refs): Do not give up on not analyzable
8613         DRs for BB vectorization.  Remove code truncating the dataref
8614         vector.
8616 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8618         PR target/85832
8619         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8620         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8621         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8623 2018-05-25  Richard Biener  <rguenther@suse.de>
8625         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8626         function, combining stmt data ref gathering and fatal analysis
8627         parts.
8628         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8629         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8630         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8631         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8632         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8634 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8636         PR tree-optimization/85720
8637         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8638         SCC if all partitions are builtins.
8639         (version_loop_by_alias_check): New parameter.  Generate cancelable
8640         runtime alias check if all partitions are builtins.
8641         (distribute_loop): Update call to above function.
8643 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8645         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8646         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8647         (parm_default_def_partition_arg): Ditto.
8648         (set_parm_default_def_partition): Ditto.
8649         (get_parm_default_def_partitions): Ditto and make it static.
8650         (get_undefined_value_partitions): Ditto and make it static.
8651         (remove_ssa_form): Refactor call to init_var_map here.
8652         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8653         computation for loop region.
8654         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8655         (register_default_def): Delete.
8656         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8657         (parm_default_def_partition_arg): Ditto.
8658         (set_parm_default_def_partition): Ditto.
8659         (get_parm_default_def_partitions): Ditto and make it static.
8660         (get_undefined_value_partitions): Ditto and make it static.
8661         (coalesce_with_default, coalesce_with_default): Update comment.
8662         (create_coalesce_list_for_region): New func factored out from
8663         create_outofssa_var_map.
8664         (populate_coalesce_list_for_outofssa): New func factored out from
8665         create_outofssa_var_map and coalesce_ssa_name.
8666         (create_outofssa_var_map): Delete.
8667         (coalesce_ssa_name): Refactor to support live range computation.
8668         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8669         (get_parm_default_def_partitions): Delete.
8670         (get_undefined_value_partitions): Ditto.
8671         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8672         computation for loop region.
8673         (new_tree_live_info, loe_visit_block): Ditto.
8674         (live_worklist, set_var_live_on_entry): Ditto.
8675         (calculate_live_on_exit, verify_live_on_entry): Ditto.
8676         * tree-ssa-live.h (struct _var_map): New fields.
8677         (init_var_map): Change decl.
8678         (region_contains_p): New.
8680 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8682         * tree-ssa-live.h (live_merge_and_clear): Delete.
8684 2018-05-25  Richard Biener  <rguenther@suse.de>
8686         PR c++/85912
8687         * tree-dump.c (dequeue_and_dump): Remove access to removed
8688         operand 2 of a SWITCH_EXPR.
8690 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8692         * doc/sourcebuild.texi (vect_double_cond_arith): Include
8693         multiplication and division.
8694         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8695         (cond_udiv@var{m}, cond_umod@var{m}): Document.
8696         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8697         (cond_udiv_optab, cond_umod_optab): New optabs.
8698         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8699         (IFN_COND_RDIV): New internal functions.
8700         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8701         TRUNC_MOD_EXPR and RDIV_EXPR.
8702         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8703         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8704         New unspecs.
8705         (SVE_INT_BINARY): Include mult.
8706         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8707         (optab, sve_int_op): Handle mult.
8708         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8709         UNSPEC_COND_DIV.
8710         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8711         for SVE_INT_BINARY_SD.
8713 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8715         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8716         (optab, sve_int_op): Handle div and udiv.
8717         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8718         for SVE_INT_BINARY_SD.
8719         (*<optab><mode>3): New insn for the same.
8721 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8723         * tree-vect-patterns.c: Include predict.h.
8724         (vect_recog_divmod_pattern): Restrict check for division support
8725         to when optimizing for size.
8727 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8729         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8730         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8731         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8732         (gimple_match_op::set_op): Likewise.
8733         (gimple_resimplify4): Declare.
8734         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8735         (expr::gen_transform): Likewise.
8736         (decision_tree::gen): Generate a simplification routine for 4 operands.
8737         * gimple-match-head.c (gimple_simplify): Add an overload for
8738         4 operands.  In the top-level function, handle up to 4 call
8739         arguments and call gimple_resimplify4.
8740         (gimple_resimplify4): New function.
8741         (build_call_internal): Pass a fourth operand.
8742         (maybe_push_to_seq): Likewise.
8743         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8744         Fold VEC_COND_EXPRs of an operation and a default value into
8745         an IFN_COND_* function if possible.
8746         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8747         New unspecs.
8748         (SVE_COND_FP_BINARY): Include them.
8749         (optab, sve_fp_op): Handle them.
8750         (SVE_INT_BINARY_REV): New code iterator.
8751         (SVE_COND_FP_BINARY_REV): New int iterator.
8752         (commutative): New int attribute.
8753         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8754         Declare.
8755         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8756         function.
8757         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8758         (*cond_<optab><mode>): New patterns for reversed operands.
8760 2018-05-25  Richard Biener  <rguenther@suse.de>
8762         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8763         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8764         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8765         (STMT_VINFO_GROUPED_ACCESS): Adjust.
8766         * tree-vect-data-refs.c (everywhere): Adjust users.
8767         * tree-vect-loop.c (everywhere): Likewise.
8768         * tree-vect-slp.c (everywhere): Likewise.
8769         * tree-vect-stmts.c (everywhere): Likewise.
8770         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8772 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8774         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8775         Rename to...
8776         (gcc_cv_as_section_exclude): ... this.
8777         Try Solaris as #exclude syntax.
8778         * configure: Regenerate.
8779         * config.in: Regenerate.
8780         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8781         SECTION_EXCLUDE.
8782         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8783         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8785         * varasm.c (default_elf_asm_named_section): Don't check if
8786         HAVE_GAS_SECTION_EXCLUDE is defined.
8788 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8790         * doc/md.texi: Update the documentation of the cond_* optabs
8791         to mention the new final operand.  Fix GET_MODE_NUNITS call.
8792         Describe the scalar case too.
8793         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8794         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8795         instead of 2.
8796         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8797         (get_conditional_internal_fn): Update comment.
8798         * tree-vect-loop.c (vectorizable_reduction): Pass the original
8799         accumulator value as a final argument to conditional functions.
8800         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8801         a define_expand and add an "else" operand.  Assert for now that
8802         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
8803         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8804         (*cond_<optab><mode>): New patterns.
8805         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8806         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8807         (UNSPEC_COND_EOR): Delete.
8808         (optab): Remove associated mappings.
8809         (SVE_INT_BINARY): New code iterator.
8810         (sve_int_op): Remove int attribute and add "minus" to the code
8811         attribute.
8812         (SVE_COND_INT_OP): Delete.
8813         (SVE_COND_FP_OP): Rename to...
8814         (SVE_COND_FP_BINARY): ...this.
8816 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8818         * optabs.c (can_reuse_operands_p): New function.
8819         (maybe_legitimize_operands): Try to reuse the results for
8820         earlier operands.
8822 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8824         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8825         Add {q} suffix to insn mnemonic.
8827 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8829         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8830         (msp430_warn_func_return): New.
8832 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
8834         * fold-const.c (tree_nonzero_bits): New function.
8835         * fold-const.h (tree_nonzero_bits): Likewise.
8836         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8837         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8839 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8841         PR target/85900
8842         PR target/85345
8843         * varasm.c (assemble_alias): Check ifunc_resolver only on
8844         FUNCTION_DECL.
8846 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8848         PR target/85903
8849         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8850         when memory input operand is handled.
8852 2018-05-24  Luis Machado  <luis.machado@linaro.org>
8854         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8855         global.
8856         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8858 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8860         * match.pd: Delay FMA folds until after vectorization.
8862 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8864         PR target/83009
8865         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8866         address check not strict.
8868 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8870         * gimple-match.h (gimple_match_op): New class.
8871         (mprts_hook): Replace parameters with a gimple_match_op *.
8872         (maybe_build_generic_op): Likewise.
8873         (gimple_simplified_result_is_gimple_val): Replace parameters with
8874         a const gimple_match_op *.
8875         (gimple_simplify): Replace code_helper * and tree * parameters with
8876         a gimple_match_op * parameter.
8877         (gimple_resimplify1): Replace code_helper *, tree and tree *
8878         parameters with a gimple_match_op * parameter.
8879         (gimple_resimplify2): Likewise.
8880         (gimple_resimplify3): Likewise.
8881         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8882         parameters with a gimple_match_op * parameter.
8883         * gimple-match-head.c (gimple_simplify): Change prototypes of
8884         auto-generated functions to take a gimple_match_op * instead of
8885         separate code_helper * and tree * parameters.  Make the same
8886         change in the top-level overload and update calls to the
8887         gimple_resimplify routines.  Update calls to the auto-generated
8888         functions and to maybe_push_res_to_seq in the publicly-facing
8889         operation-specific gimple_simplify overloads.
8890         (gimple_match_op::MAX_NUM_OPS): Define.
8891         (gimple_resimplify1): Replace rcode and ops with a single res_op
8892         parameter.  Update call to gimple_simplify.
8893         (gimple_resimplify2): Likewise.
8894         (gimple_resimplify3): Likewise.
8895         (mprts_hook): Replace parameters with a gimple_match_op *.
8896         (maybe_build_generic_op): Likewise.
8897         (build_call_internal): Replace type, nargs and ops with
8898         a gimple_match_op *.
8899         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8900         with a single gimple_match_op *.  Update calls to mprts_hook,
8901         build_call_internal and gimple_simplified_result_is_gimple_val.
8902         Factor out code that is common to the tree_code and combined_fn cases.
8903         * genmatch.c (expr::gen_transform): Replace tem_code and
8904         tem_ops with a gimple_match_op called tem_op.  Update calls
8905         to the gimple_resimplify functions and maybe_push_res_to_seq.
8906         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8907         res_ops.  Update call to the gimple_resimplify functions.
8908         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8909         (decision_tree::gen): Make the functions take a gimple_match_op *
8910         called res_op instead of separate res_code and res_ops parameters.
8911         Update call accordingly.
8912         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8913         and ops with a single res_op parameter.  Update calls to
8914         maybe_build_generic_op and maybe_push_res_to_seq.
8915         (fold_stmt_1): Update calls to gimple_simplify and
8916         replace_stmt_with_simplification.
8917         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8918         and gimple_simplified_result_is_gimple_val.
8919         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8920         gimple_simplify.
8921         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8922         with a gimple_match_op *.
8923         (vn_nary_build_or_lookup): Likewise.  Update call to
8924         vn_nary_build_or_lookup_1.
8925         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8926         gimple_match_op *.  Update calls to the gimple_resimplify routines
8927         and to gimple_simplified_result_is_gimple_val.
8928         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8929         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8930         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8931         (visit_nary_op): Likewise.
8932         (visit_reference_op_load): Likewise.
8934 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8936         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8937         modifier for printing the step amount.
8939 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8941         PR target/78849
8942         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8943         types.
8945 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
8947         * doc/sourcebuild.texi (Endianness): New subsubsection.
8949 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8951         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8952         <prefetch_dynamic_strides>: New const bool field.
8953         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8954         prefetch_dynamic_strides.
8955         (exynosm1_prefetch_tune): Likewise.
8956         (thunderxt88_prefetch_tune): Likewise.
8957         (thunderx_prefetch_tune): Likewise.
8958         (thunderx2t99_prefetch_tune): Likewise.
8959         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8960         false.
8961         (aarch64_override_options_internal): Update to set
8962         PARAM_PREFETCH_DYNAMIC_STRIDES.
8963         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8964         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8965         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8966         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8967         prefetch-dynamic-strides setting.
8969 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8971         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8972         <minimum_stride>: New const int field.
8973         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8974         minimum_stride field defaulting to -1.
8975         (exynosm1_prefetch_tune): Likewise.
8976         (thunderxt88_prefetch_tune): Likewise.
8977         (thunderx_prefetch_tune): Likewise.
8978         (thunderx2t99_prefetch_tune): Likewise.
8979         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8980         <default_opt_level>: Set to 3.
8981         (aarch64_override_options_internal): Update to set
8982         PARAM_PREFETCH_MINIMUM_STRIDE.
8983         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8984         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8985         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8986         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8987         stride is constant and is below the minimum stride threshold.
8989 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8991         * config/arm/arm-cpus.in (mode26): Delete.
8992         (armv4): Delete mode26 reference.
8993         * config/arm/arm.c (arm_configure_build_target): Delete use of
8994         isa_bit_mode26.
8996 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8998         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8999         New insn pattern.
9000         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9001         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9002         for non-SSE modes.
9003         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9004         (floatunsdidf2): Ditto.
9006 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9008         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9009         (fixuns_trunc<mode>si2_avx512f): Ditto.
9010         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9011         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9012         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9014 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9016         PR rtl-optimization/79985
9017         * df-scan.c (df_insn_refs_collect): Remove special case for
9018         global registers and asm statements.
9020 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9022         * extend.texi (Global Register Variables): Rewrite the bullet list.
9023         Note that the register is available for allocation. Note that access
9024         via inline asm must use constraints. Add note about async-signal
9025         handlers. Remove paragraph about automagic register selection.
9027 2018-05-23  Richard Biener  <rguenther@suse.de>
9029         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9030         of fixed offset from memset VN.
9032 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9034         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9035         first_interp field.
9036         (alloc_cand_and_find_basis): Initialize first_interp field.
9037         (slsr_process_mul): Modify first_interp field.
9038         (slsr_process_add): Likewise.
9039         (slsr_process_cast): Modify first_interp field for each new
9040         interpretation.
9041         (slsr_process_copy): Likewise.
9042         (dump_candidate): Dump first_interp field.
9043         (replace_mult_candidate): Process all interpretations, not just
9044         subsequent ones.
9045         (replace_rhs_if_not_dup): Likewise.
9046         (replace_one_candidate): Likewise.
9048 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9050         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9051         Add new boolean.
9052         (aarch64_needs_frame_chain): New function.
9053         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9055 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9057         PR target/84882
9058         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9059         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9060         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9061         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9062         as true for strict-align.
9063         (aarch64_can_inline_p): Perform checks even when callee has no
9064         attributes to check for strict alignment.
9065         * doc/extend.texi (AArch64 Function Attributes): Document
9066         no-strict-align.
9067         * doc/invoke.texi: (AArch64 Options): Likewise.
9069 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9071         PR tree-optimization/85853
9072         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9073         the handling of the root of the node to...
9074         (vect_slp_analyze_node_operations_1): ...this new function,
9075         and run the whole thing with the child nodes' def types
9076         set according to their SLP node's def type.
9078 2018-05-23  Richard Biener  <rguenther@suse.de>
9080         PR middle-end/85874
9081         * tree-data-ref.c (create_runtime_alias_checks): Defer
9082         and ignore overflow warnings.
9084 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9086         PR tree-optimization/85822
9087         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9088         constants.
9090 2018-05-23  Richard Biener  <rguenther@suse.de>
9092         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9093         memset constants via native_interpret_expr.
9095 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9097         PR target/85345
9098         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9099         attribute.
9100         (cgraph_node::create_alias): Likewise.
9101         (cgraph_node::get_availability): Check ifunc_resolver instead
9102         of looking up ifunc attribute.
9103         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9104         * varasm.c (do_assemble_alias): Likewise.
9105         (assemble_alias): Likewise.
9106         (default_binds_local_p_3): Likewise.
9107         * cgraph.h (cgraph_node): Add ifunc_resolver.
9108         (cgraph_node::only_called_directly_or_aliased_p): Return false
9109         for IFUNC resolver.
9110         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9111         attribute.
9112         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9113         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9114         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9115         instead of looking up ifunc attribute.
9117 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9119         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9121 2018-05-22  Martin Sebor  <msebor@redhat.com>
9123         PR middle-end/85359
9124         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9125         only when expasion succeeds.
9126         (expand_builtin_strcmp): Same.
9127         (expand_builtin_strncmp): Same.
9129 2018-05-22  Martin Sebor  <msebor@redhat.com>
9131         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9133 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9134             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9136         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9137         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9138         code.
9139         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9140         Add check for legitimate_address.
9141         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9142         (aarch64_swap_ldrstr_operands): New.
9143         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9144         Define prototype.
9146 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9147             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9149         * config/aarch64/aarch64.md: New patterns to generate stp
9150         and ldp.
9151         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9152         single words and double words.
9153         (load_pair_sw, load_pair_dw): Likewise.
9154         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9155         Delete.
9156         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9157         Delete.
9158         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9159         for different mode ldpstp and add peephole for merged zero stores.
9160         Likewise for loads.
9161         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9162         Add size check.
9163         (aarch64_gen_store_pair): Rename calls to match new patterns.
9164         (aarch64_gen_load_pair): Rename calls to match new patterns.
9165         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9166         (load_pair<DREG:mode><DREG2:mode>): ... This.
9167         (store_pair<mode>): Rename to...
9168         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9169         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9170         New mode iterators.
9171         (V_INT_EQUIV): Handle SImode.
9172         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9173         New predicate.
9175 2018-05-22  Martin Sebor  <msebor@redhat.com>
9177         PR c/85623
9178         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9179         or ajust the presumed bound on an operation to avoid unnecessary
9180         warnings.
9182 2018-05-22  Martin Sebor  <msebor@redhat.com>
9184         PR tree-optimization/85826
9185         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9186         assuming that a DECL necesarily has a constant size.
9188 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9190         PR middle-end/85862
9191         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9193 2018-05-22  Richard Biener  <rguenther@suse.de>
9195         PR tree-optimization/85834
9196         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9197         non-constant and non-zero memset arguments.
9199 2018-05-22  Martin Liska  <mliska@suse.cz>
9201         PR ipa/85607
9202         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9204 2018-05-22  Richard Biener  <rguenther@suse.de>
9206         PR tree-optimization/85863
9207         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9208         comparisons when vectype is specified.
9209         (vectorizable_condition): Do not specify vectype for
9210         vect_is_simple_cond when SLP vectorizing.
9212 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9214         PR target/85657
9215         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9216         define __ibm128 as long double.
9217         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9218         as a distinct type when IEEE 128-bit support is enabled.
9219         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9220         128-bit types to use the correct functions.
9221         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9222         convert between 128-bit floating point types that have different
9223         modes but the same representation, instead of using gen_lowpart to
9224         makean alias.
9225         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9226         KFmode.
9227         (IFKF_reg): New attributes to give the register constraints for
9228         IFmode and KFmode.
9229         (extend<mode>tf2_internal): New insns to mark an explicit
9230         conversion between 128-bit floating point types that have a
9231         different mode but share the same representation.
9233 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9235         PR tree-optimization/85814
9236         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9237         a null return from get_strinfo when unsharing the next
9238         strinfo in the chain.
9240 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9242         PR gcc/84923
9243         * varasm.c (weak_finish): Clean up weak_decls.
9245 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9247         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9248         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9249         UNSPEC_UADALP values.
9250         * config/aarch64/iterators.md (ABAL): New int iterator.
9251         (ABDL2): Likewise.
9252         (ADALP): Likewise.
9253         (sur): Add mappings for the above.
9254         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9255         New define_insn.
9256         (aarch64_<sur>abal<mode>_4): Likewise.
9257         (aarch64_<sur>adalp<mode>_3): Likewise.
9258         (<sur>sadv16qi): New define_expand.
9260 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9262         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9263         (*movdf_internal): Ditto.
9264         (*rcpsf2_sse): Ditto.
9265         (*rsqrtsf2_sse): Ditto.
9266         (*sqrt<mode>2_sse): Ditto.
9268 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9270         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9271         eor3q<mode>4.
9272         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9273         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9274         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9275         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9276         vbcaxq_s64): New.
9277         * config/aarch64/arm_neon.h: Likewise.
9278         * config/aarch64/iterators.md (VQ_I): New.
9280 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9282         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9283         arc*-*-linux*.
9284         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9285         MULTILIB_DIRNAMES
9287 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9289         * config/nds32/constraints.md (S): New constraint.
9290         * config/nds32/nds32.md (call_internal): Use constraint S.
9291         (call_value_internal): Likewise.
9292         (sibcall_internal): Likewise.
9293         (sibcall_value_internal): Likewise.
9295 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9296             Chung-Ju Wu  <jasonwucj@gmail.com>
9298         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9299         into consideration.
9301 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9302             Chung-Ju Wu  <jasonwucj@gmail.com>
9304         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9305         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9306         (nds32_rtx_costs_impl): Simplify.
9307         (nds32_address_cost_impl): Simplify.
9308         (nds32_init_rtx_costs): New function.
9309         (nds32_rtx_costs_speed_prefer): Likewise.
9310         (nds32_rtx_costs_size_prefer): Likewise.
9311         (nds32_address_cost_speed_prefer): Likewise.
9312         (nds32_address_cost_speed_fwprop): Likewise.
9313         (nds32_address_cost_size_prefer): Likewise.
9314         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9315         * config/nds32/nds32.c (nds32_option_override): Use
9316         nds32_init_rtx_costs function.
9318 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9320         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9321         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9322         (TARGET_PIPELINE_N8): Likewise.
9323         (TARGET_PIPELINE_N10): Likewise.
9324         (TARGET_PIPELINE_N13): Likewise.
9325         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9327 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9329         * config/nds32/nds32-fpu.md: Update copyright year.
9331 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9333         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9335 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9337         * config/nds32/nds32.c
9338         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9339         * config/nds32/nds32.opt (minline-asm-r15): New option.
9341 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9343         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9344         MASK_HW_ABS.
9345         * config/nds32/nds32.md (abssi2): New pattern.
9347 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9349         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9350         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9351         Merge insn pattern from sse_cvtsi2ss<round_name> and
9352         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9353         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9354         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9355         using SWI48 mode iterator.
9356         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9357         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9358         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9359         pattern from sse_cvttss2si<round_saeonly_name>
9360         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9361         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9362         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9363         using SWI48 mode iterator.
9364         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9365         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9366         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9367         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9368         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9369         using SWI48 mode iterator.
9370         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9371         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9372         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9373         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9374         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9375         SWI48 mode iterator.
9376         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9377         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9378         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9379         pattern from sse_cvttsd2si<round_saeonly_name>
9380         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9382 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9384         * config/nds32/nds32-md-auxiliary.c
9385         (nds32_valid_smw_lwm_base_p): Refine.
9386         (nds32_output_smw_single_word): Refine.
9387         (nds32_output_smw_double_word): New.
9388         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9390 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9392         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9393         (nds32_output_stack_pop): Refine.
9394         (nds32_expand_unaligned_load): Refine.
9395         (nds32_expand_unaligned_store): Refine.
9397 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9398             Chung-Ju Wu  <jasonwucj@gmail.com>
9400         * config/nds32/constants.md: Add TP_REGNUM constant.
9401         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9402         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9403         UNSPEC_ADD32.
9404         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9405         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9406         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9407         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9408         and PIC code generation.
9409         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9410         code generation.
9411         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9412         optimization.
9413         * config/nds32/nds32.md: Support TLS and PIC.
9414         * config/nds32/nds32.c: Support TLS and PIC.
9415         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9416         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9417         predicate.
9419 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9421         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9422         mode with E_ prefix.
9424 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9425             Chung-Ju Wu  <jasonwucj@gmail.com>
9427         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9428         * config/nds32/nds32-md-auxiliary.c
9429         (symbolic_reference_mentioned_p): New.
9430         (nds32_legitimize_ict_address): New.
9431         (nds32_expand_ict_move): New.
9432         (nds32_indirect_call_referenced_p): New.
9433         (nds32_symbol_binds_local_p): Delete.
9434         (nds32_long_call_p): Modify.
9435         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9436         * config/nds32/nds32-protos.h
9437         (symbolic_reference_mentioned_p): Declare.
9438         (nds32_legitimize_ict_address): Declare.
9439         (nds32_expand_ict_move): Declare.
9440         (nds32_indirect_call_referenced_p): Declare.
9441         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9442         (nds32_relax_group): Use nds32_ict_const_p as condition.
9443         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9444         (nds32_asm_file_start): Output ict_model directive in asm code.
9445         (nds32_legitimate_address_p): Consider indirect call.
9446         (nds32_print_operand): Consider indirect call.
9447         (nds32_print_operand_address): Consider indirect call.
9448         (nds32_insert_attributes): Handle "indirect_call" attribute.
9449         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9450         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9451         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9452         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9453         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9454         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9455         (TARGET_ICT_MODEL_SMALL): Define.
9456         (TARGET_ICT_MODEL_LARGE): Define.
9457         * config/nds32/nds32.md (movsi): Consider ict model.
9458         (call, call_value): Consider ict model.
9459         (sibcall, sibcall_value): Consider ict model.
9460         * config/nds32/nds32.opt (mict-model): New option.
9461         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9462         model.
9464 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9465             Monk Chiang  <sh.chiang04@gmail.com>
9466             Jim Wilson <jimw@sifive.com>
9468         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9469         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9470         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9471         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9472         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9473         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9474         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9475         compute save_libcall_adjustment properly.
9476         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9477         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9478         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9479         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9480         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9481         (ABI_SPEC): Handle mabi=ilp32e.
9482         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9483         (RVE): Add RVE mask.
9484         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9485         <-march>: Add rv32e as an example.
9487 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9489         PR c++/82899
9490         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9491         (intra_create_variable_infos): Handle C++ constructors.
9493 2018-05-18  Martin Liska  <mliska@suse.cz>
9495         * passes.def: Remove a redundant pass.
9497 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9499         PR bootstrap/85838
9500         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9502 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9504         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9505         (ARMv4): Update.
9506         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9507         (ARMv6m): Update.
9508         (armv2, armv2a, armv3, armv3m): Delete architectures.
9509         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9510         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9511         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9512         Delete cpus.
9513         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9514         (*mulsidi3adddi): Likewise.
9515         (mulsidi3): Likewise.
9516         (*mulsidi3_nov6): Likewise.
9517         (umulsidi3): Likewise.
9518         (umulsidi3_nov6): Likewise.
9519         (umaddsidi4): Likewise.
9520         (*umulsidi3adddi): Likewise.
9521         (smulsi3_highpart): Likewise.
9522         (*smulsi3_highpart_nov6): Likewise.
9523         (umulsi3_highpart): Likewise.
9524         (*umulsi3_highpart_nov6): Likewise.
9525         * config/arm/arm.h (arm_arch3m): Delete.
9526         * config/arm/arm.c (arm_arch3m): Delete.
9527         (arm_option_override_internal): Update armv3-related comment.
9528         (arm_configure_build_target): Delete use of isa_bit_mode32.
9529         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9530         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9531         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9532         (mulsa3): Likewise.
9533         (mulusa3): Likewise.
9534         * config/arm/arm-protos.h (arm_arch3m): Delete.
9535         * config/arm/arm-tables.opt: Regenerate.
9536         * config/arm/arm-tune.md: Likewise.
9537         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9538         deleted architectures.
9540 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9542         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9543         (armv5t, armv5te): New features.
9544         (ARMv5, ARMv5e): Delete fgroups.
9545         (ARMv5t, ARMv5te): Adjust for above changes.
9546         (ARMv6m): Likewise.
9547         (armv5, armv5e): Delete arches.
9548         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9549         arm_arch5.
9550         (*call_reg_arm): Likewise.
9551         (*call_value_reg_armv5): Likewise.
9552         (*call_value_reg_arm): Likewise.
9553         (*call_symbol): Likewise.
9554         (*call_value_symbol): Likewise.
9555         (*sibcall_insn): Likewise.
9556         (*sibcall_value_insn): Likewise.
9557         (clzsi2): Likewise.
9558         (prefetch): Likewise.
9559         (define_split and define_peephole2 dependent on arm_arch5):
9560         Likewise.
9561         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9562         arm_arch5e.
9563         (TARGET_ARM_QBIT): Likewise.
9564         (TARGET_DSP_MULTIPLY): Likewise.
9565         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9566         (arm_arch5, arm_arch5e): Delete.
9567         (arm_arch5t, arm_arch5te): Declare.
9568         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9569         (arm_arch5t): Declare.
9570         (arm_option_reconfigure_globals): Update for the above.
9571         (arm_options_perform_arch_sanity_checks): Update comment, replace
9572         use of arm_arch5 with arm_arch5t.
9573         (use_return_insn): Likewise.
9574         (arm_emit_call_insn): Likewise.
9575         (output_return_instruction): Likewise.
9576         (arm_final_prescan_insn): Likewise.
9577         (arm_coproc_builtin_available): Likewise.
9578         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9579         arm_arch5e with arm_arch5t and arm_arch5te.
9580         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9581         (arm_arch5t, arm_arch5te): Declare.
9582         * config/arm/arm-tables.opt: Regenerate.
9583         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9584         * config/arm/t-multilib: Likewise.
9585         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9586         instead of arm_arch5.
9587         (*call_reg_thumb1): Likewise.
9588         (*call_value_reg_thumb1_v5): Likewise.
9589         (*call_value_reg_thumb1): Likewise.
9590         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9591         unreachable path.
9592         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9594 2018-05-18  Martin Liska  <mliska@suse.cz>
9596         PR gcov-profile/84846
9597         * doc/gcov.texi: Document -t option of gcov tool.
9599 2018-05-18  Martin Liska  <mliska@suse.cz>
9601         PR gcov-profile/84846
9602         * gcov.c (print_usage): Add new -t option.
9603         (process_args): Handle the option.
9604         (generate_results): Use stdout as output when requested by
9605         the option.
9607 2018-05-18  Martin Liska  <mliska@suse.cz>
9609         PR gcov-profile/84846
9610         * coverage.c (coverage_init): Write PWD to .gcno file.
9611         * doc/gcov.texi: Document how working directory is printed.
9612         * gcov-dump.c (dump_gcov_file): Print PWD.
9613         * gcov.c (output_intermediate_file): Likewise.
9614         (read_graph_file): Read PWD string.
9615         (output_lines): Print PWD.
9617 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9619         PR middle-end/85817
9620         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9621         for retval and return false if all args to phi are zero.
9623 2018-05-18  Richard Biener  <rguenther@suse.de>
9625         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9626         method.
9627         (evrp_dom_walker::before_dom_children): Call it.
9629 2018-05-18  Richard Biener  <rguenther@suse.de>
9631         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9632         results when processing array refs with variable index.
9634 2018-05-18  Toon Moene  <toon@moene.org>
9636         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9637         directly after that of -floop-interchange. Indicate that both
9638         options are enabled by default when specifying -O3.
9640 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9642         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9643         iterator.  Delete separate integer-mode vec_set<mode> expander.
9644         (aarch64_simd_vec_setv2di): Delete.
9645         (vec_setv2di): Delete.
9646         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9647         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9648         the "w, r" alternative.
9650 2018-05-18  Martin Liska  <mliska@suse.cz>
9652         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9653         * tree-pass.h (make_pass_lower_switch_O0): New function.
9654         * tree-switch-conversion.c (node_has_low_bound): Remove.
9655         (node_has_high_bound): Likewise.
9656         (node_is_bounded): Likewise.
9657         (class pass_lower_switch): Make it a template type and create
9658         two instances.
9659         (pass_lower_switch::execute): Add template argument.
9660         (make_pass_lower_switch): New function.
9661         (make_pass_lower_switch_O0): New function.
9662         (do_jump_if_equal): Remove.
9663         (emit_case_nodes): Simplify to just handle all 3 cases and leave
9664         all the hard work to tree optimization passes.
9666 2018-05-18  Martin Liska  <mliska@suse.cz>
9668         * dbgcnt.c (limit_low): Renamed from limit.
9669         (limit_high): New variable.
9670         (dbg_cnt_is_enabled): Check for upper limit.
9671         (dbg_cnt): Adjust dumping.
9672         (dbg_cnt_set_limit_by_index): Add new argument for high
9673         value.
9674         (dbg_cnt_set_limit_by_name): Likewise.
9675         (dbg_cnt_process_single_pair): Parse new format.
9676         (dbg_cnt_process_opt): Use strtok.
9677         (dbg_cnt_list_all_counters): Remove 'value' and add
9678         'limit_high'.
9679         * doc/invoke.texi: Document changes.
9681 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
9683         * doc/sourcebuild.texi (scalar_all_fma): Document.
9684         * tree.def (FMA_EXPR): Delete.
9685         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9686         * internal-fn.c (ternary_direct): New macro.
9687         (expand_ternary_optab_fn): Likewise.
9688         (direct_ternary_optab_supported_p): Likewise.
9689         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9690         * builtins.c (fold_builtin_fma): Delete.
9691         (fold_builtin_3): Don't call it.
9692         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9693         * expr.c (expand_expr_real_2): Likewise.
9694         * fold-const.c (operand_equal_p): Likewise.
9695         (fold_ternary_loc): Likewise.
9696         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9697         * gimple.c (DEFTREECODE): Likewise.
9698         * gimplify.c (gimplify_expr): Likewise.
9699         * optabs-tree.c (optab_for_tree_code): Likewise.
9700         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9701         * tree-eh.c (operation_could_trap_p): Likewise.
9702         (stmt_could_throw_1_p): Likewise.
9703         * tree-inline.c (estimate_operator_cost): Likewise.
9704         * tree-pretty-print.c (dump_generic_node): Likewise.
9705         (op_code_prio): Likewise.
9706         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9707         * tree-ssa-operands.c (get_expr_operands): Likewise.
9708         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9709         * fold-const-call.h (fold_fma): Delete.
9710         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9711         CFN_FNMA and CFN_FNMS.
9712         (fold_fma): Delete.
9713         * genmatch.c (combined_fn): New enum.
9714         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9715         (commutative_op): New function.
9716         (commutate): Use it.  Handle more than 2 operands.
9717         (dt_operand::gen_gimple_expr): Use commutative_op.
9718         (parser::parse_expr): Allow :c to be used with non-binary
9719         operators if the commutative operand is known.
9720         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9721         CFN_FMS, CFN_FNMA and CFN_FNMS.
9722         (backprop::process_assign_use): Remove FMA_EXPR handling.
9723         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9724         (gen_hsa_fma): New function.
9725         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9726         IFN_FNMA and IFN_FNMS.
9727         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9728         * gimple-fold.h (follow_all_ssa_edges): Declare.
9729         * gimple-fold.c (follow_all_ssa_edges): New function.
9730         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9731         gimple_build interface and use follow_all_ssa_edges to fold the result.
9732         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9733         instead of checking for optabs directly.
9734         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9735         rather than FMA_EXPRs.
9736         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9737         call to IFN_FMA instead of an FMA_EXPR.
9739 2018-05-17  Jim Wilson  <jimw@sifive.com>
9741         * expr.c (do_tablejump): When converting index to Pmode, if we have a
9742         sign extended promoted subreg, and the range does not have the sign bit
9743         set, then do a sign extend.
9745         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9746         test, check for sign extended subreg and/or constant operands, and
9747         do a sign extend in that case.
9749 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
9751         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9752         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9753         Add untyped.
9754         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9755         Change logics_shift_reg to logics_shift_imm.
9756         (thunderx2t99_fp_loadpair_basic): Delete.
9757         (thunderx2t99_fp_storepair_basic): Delete.
9758         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9759         (thunderx2t99_asimd_polynomial): Delete.
9760         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9761         and neon_fp_mul_d_scalar_q.
9762         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9763         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9764         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9765         (thunderx2t99_asimd_lut): Add missing tbl types.
9766         (thunderx2t99_asimd_ext): Delete.
9767         (thunderx2t99_asimd_load1_1_mult): Delete.
9768         (thunderx2t99_asimd_load1_2_mult): Delete.
9769         (thunderx2t99_asimd_load1_ldp): New.
9770         (thunderx2t99_asimd_load1): New.
9771         (thunderx2t99_asimd_load2): Add missing *load2* types.
9772         (thunderx2t99_asimd_load3): New.
9773         (thunderx2t99_asimd_load4): New.
9774         (thunderx2t99_asimd_store1_1_mult): Delete.
9775         (thunderx2t99_asimd_store1_2_mult): Delete.
9776         (thunderx2t99_asimd_store2_mult): Delete.
9777         (thunderx2t99_asimd_store2_onelane): Delete.
9778         (thunderx2t99_asimd_store_stp): New.
9779         (thunderx2t99_asimd_store1): New.
9780         (thunderx2t99_asimd_store2): New.
9781         (thunderx2t99_asimd_store3): New.
9782         (thunderx2t99_asimd_store4): New.
9784 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
9786         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9787         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
9789 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
9790             Segher Boessenkool  <segher@kernel.crashing.org>
9792         PR target/85698
9793         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9794         operand.
9796 2018-05-17  Richard Biener  <rguenther@suse.de>
9798         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9799         for pruning loop and prune defs feeding only already visited PHIs.
9801 2018-05-17  Richard Biener  <rguenther@suse.de>
9803         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9805 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
9806             Richard Biener  <rguenther@suse.de>
9808         PR tree-optimization/85793
9809         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9810         for VMAT_ELEMENTWISE.
9812 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9814         * internal-fn.h (lookup_internal_fn): Declare
9815         * internal-fn.c (lookup_internal_fn): New function.
9816         * gimple.c (gimple_build_call_from_tree): Handle calls to
9817         internal functions.
9818         * gimple-pretty-print.c (dump_gimple_call): Print "." before
9819         internal function names.
9820         * tree-pretty-print.c (dump_generic_node): Likewise.
9821         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9823 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9825         * gimple-fold.h (gimple_build): Make the function forms take
9826         combined_fn rather than built_in_function.
9827         (gimple_simplify): Likewise.
9828         * gimple-match-head.c (gimple_simplify): Likewise.
9829         * gimple-fold.c (gimple_build): Likewise.
9830         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9831         rather than gimple_build_call_internal.
9832         (get_initial_defs_for_reduction): Likewise.
9833         (vect_create_epilog_for_reduction): Likewise.
9834         (vectorizable_live_operation): Likewise.
9836 2018-05-17  Martin Liska  <mliska@suse.cz>
9838         * gimple-ssa-sprintf.c (format_directive): Do not use
9839         space in between 'G_' and '('.
9841 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
9843         PR target/85323
9844         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9845         even if the mask is not all ones.
9847         PR target/85323
9848         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9849         vector.
9850         (ix86_gimple_fold_builtin): Likewise.
9852         PR target/85323
9853         * config/i386/i386.c: Include tree-vector-builder.h.
9854         (ix86_vector_shift_count): New function.
9855         (ix86_fold_builtin): Fold shift builtins by scalar count.
9856         (ix86_gimple_fold_builtin): Likewise.
9858         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9859         _mm512_setzero): New intrinsics.
9861 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
9862             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9864         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9865         code generation for cases where splatting a value is not useful.
9866         * simplify-rtx.c (simplify_ternary_operation): Simplify
9867         vec_merge across a vec_duplicate and a paradoxical subreg forming
9868         a vector mode to a vec_concat.
9870 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
9872         * config.gcc: Support "goldmont-plus".
9873         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9874         "goldmont-plus".
9875         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9876         PROCESSOR_GOLDMONT_PLUS.
9877         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9878         (processor_target_table): Add "goldmont-plus".
9879         (PTA_GOLDMONT_PLUS): Define.
9880         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9881         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9882         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9883         (fold_builtin_cpu): Add "goldmont-plus".
9884         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9885         (ix86_option_override_internal): Add "goldmont-plus".
9886         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9887         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9888         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9889         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9891 2018-05-17  Richard Biener  <rguenther@suse.de>
9893         PR tree-optimization/85757
9894         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9895         remove defs that only feed that PHI from further processing.
9897 2018-05-16  Jim Wilson  <jimw@sifive.com>
9899         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9900         asterisk to name.
9901         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9903 2018-05-16  Mark Wielaard  <mark@klomp.org>
9905         * dwarf2out.c (count_index_strings): New function.
9906         (output_indirect_strings): Call count_index_strings and generate
9907         header for dwarf_version >= 5.
9909 2018-05-16  Mark Wielaard  <mark@klomp.org>
9911         * dwarf2out.c (dwarf_FORM): New function.
9912         (set_indirect_string): Use dwarf_FORM.
9913         (reset_indirect_string): Likewise.
9914         (size_of_die): Likewise.
9915         (value_format): Likewise.
9916         (output_die): Likewise.
9917         (add_skeleton_AT_string): Likewise.
9918         (output_macinfo_op): Likewise.
9919         (index_string): Likewise.
9920         (output_index_string_offset): Likewise.
9921         (output_index_string): Likewise.
9922         (count_index_strings): Likewise.
9924 2018-05-16  Carl Love  <cel@us.ibm.com>
9926         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9927         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9929 2018-05-16  Martin Jambor  <mjambor@suse.cz>
9931         * ipa-prop.c (ipa_free_all_edge_args): Remove.
9932         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9934 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
9936         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9937         (fnma<mode>4): Likewise.
9938         (fms<mode>4): Likewise.
9939         (fnms<mode>4): Likewise.
9940         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9941         (aarch64_fnma<mode>4): Likewise.
9942         (aarch64_fms<mode>4): Likewise.
9943         (aarch64_fnms<mode>4): Likewise.
9944         (aarch64_fnmadd<mode>4): Likewise.
9946 2018-05-16  Jason Merrill  <jason@redhat.com>
9948         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
9950 2018-05-16  Richard Biener  <rguenther@suse.de>
9952         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9953         (dump_stmt_cost): Declare.
9954         (add_stmt_cost): Dump cost we add.
9955         (add_stmt_costs): New function.
9956         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9957         No longer exported.
9958         (vect_analyze_stmt): Adjust prototype.
9959         (vectorizable_condition): Likewise.
9960         (vectorizable_live_operation): Likewise.
9961         (vectorizable_reduction): Likewise.
9962         (vectorizable_induction): Likewise.
9963         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9964         cost vector to pass to vectorizable_ and record afterwards.
9965         (vect_model_reduction_cost): Take cost vector argument and adjust.
9966         (vect_model_induction_cost): Likewise.
9967         (vectorizable_reduction): Likewise.
9968         (vectorizable_induction): Likewise.
9969         (vectorizable_live_operation): Likewise.
9970         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9971         SLP_TREE_NUMBER_OF_VEC_STMTS.
9972         (vect_analyze_slp_cost_1): Remove.
9973         (vect_analyze_slp_cost): Likewise.
9974         (vect_slp_analyze_node_operations): Take visited args and
9975         a target cost vector.  Avoid processing already visited stmt sets.
9976         (vect_slp_analyze_operations): Use a local cost vector to gather
9977         costs and register those of non-discarded instances.
9978         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9979         (vect_schedule_slp_instance): Remove copying of
9980         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
9981         zero.
9982         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9983         adding cost.  Record cost entry location.
9984         (vect_prologue_cost_for_slp_op): Function to compute cost of
9985         a constant or invariant generated for SLP vect in the prologue,
9986         split out from vect_analyze_slp_cost_1.
9987         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
9988         (vect_model_promotion_demotion_cost): Likewise.
9989         (vect_model_store_cost): Likewise, make static.
9990         (vect_model_load_cost): Likewise.
9991         (vectorizable_bswap): Add cost vector arg and adjust.
9992         (vectorizable_call): Likewise.
9993         (vectorizable_simd_clone_call): Likewise.
9994         (vectorizable_conversion): Likewise.
9995         (vectorizable_assignment): Likewise.
9996         (vectorizable_shift): Likewise.
9997         (vectorizable_operation): Likewise.
9998         (vectorizable_store): Likewise.
9999         (vectorizable_load): Likewise.
10000         (vectorizable_condition): Likewise.
10001         (vectorizable_comparison): Likewise.
10002         (can_vectorize_live_stmts): Likewise.
10003         (vect_analyze_stmt): Likewise.
10004         (vect_transform_stmt): Adjust calls to vectorizable_*.
10005         * tree-vectorizer.c: Include gimple-pretty-print.h.
10006         (dump_stmt_cost): New function.
10008 2018-05-16  Richard Biener  <rguenther@suse.de>
10010         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10011         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10012         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10013         (check_name): New callback.
10014         (dse_classify_store): Track cycles via a visited bitmap of PHI
10015         defs and simplify handling of in-loop and across loop dead stores
10016         and properly fail for loop-variant refs.  Handle byte-tracking with
10017         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10018         limiting the walk.
10020 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10022         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10023         (vect_get_mask_type_for_stmt): Likewise.
10024         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10025         split out from...
10026         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10027         to determine the statement's vector type and the vector type that
10028         should be used for calculating nunits.  Deal with cases in which
10029         the type has to be deferred.
10030         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10031         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10032         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10033         (vect_determine_vf_for_stmt): New functions, split out from...
10034         (vect_determine_vectorization_factor): ...here.
10035         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10036         (vect_get_mask_type_for_stmt): New functions, split out from
10037         vect_determine_vectorization_factor.
10039 2018-05-16  Richard Biener  <rguenther@suse.de>
10041         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10042         verify the [VEC_]COND_EXPR embedded comparison.
10044 2018-05-15  Martin Sebor  <msebor@redhat.com>
10046         PR tree-optimization/85753
10047         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10048         RECORD_TYPE in addition to ARRAY_TYPE.
10050 2018-05-15  Martin Sebor  <msebor@redhat.com>
10052         PR middle-end/85643
10053         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10055 2018-05-15  Richard Biener  <rguenther@suse.de>
10057         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10058         add by_clobber_p one.  Change algorithm to collect all defs
10059         representing uses we need to walk and try reducing them to
10060         a single one before failing.
10061         (dse_dom_walker::dse_optimize_stmt): Adjust.
10063 2018-05-13  Mark Wielaard  <mark@klomp.org>
10065         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10066         (size_of_loc_descr): Likewise.
10067         (output_loc_operands): Likewise.
10068         (output_loc_operands_raw): Likewise.
10069         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10070         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10071         (hash_loc_operands): Likewise.
10072         (compare_loc_operands): Likewise.
10074 2018-05-14  Mark Wielaard  <mark@klomp.org>
10076         * dwarf2out.c (count_index_addrs): New function.
10077         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10079 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10081         PR tree-optimization/83648
10082         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10083         return value as malloc candidate.
10085 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10087         PR ipa/85734
10088         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10089         param as true in call to suggest_attribute.
10091 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10093         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10094         -mreadonly-in-sdata.
10096 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10098         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10099         New pattern.
10100         (aarch64_crypto_aesd_fused): Likewise.
10102 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10104         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10105         (movsi_aarch64): Likewise.
10106         (load_pairsi): Likewise.
10107         (load_pairdi): Likewise.
10108         (store_pairsi): Likewise.
10109         (store_pairdi): Likewise.
10110         (load_pairsf): Likewise.
10111         (load_pairdf): Likewise.
10112         (store_pairsf): Likewise.
10113         (store_pairdf): Likewise.
10114         (zero_extend): Likewise.
10115         (trunc): Swap alternatives.
10116         (fcvt_target): Add '?' to prefer w over r.
10118 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10120         PR target/85756
10121         * config/i386/i386.md: Disallow non-commutative arithmetics in
10122         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10123         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10124         in the peephole2 before it.
10126 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10128         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10129         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10130         (ix86_handle_option): Handle -mcldemote.
10131         * config.gcc: New header.
10132         * config/i386/cldemoteintrin.h: New file.
10133         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10134         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10135         -mcldemote.
10136         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10137         OPTION_MASK_ISA_CLDEMOTE.
10138         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10139         (ix86_valid_target_attribute_inner_p): Ditto.
10140         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10141         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10142         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10143         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10144         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10145         (cldemote): New.
10146         * config/i386/i386.opt: Add -mcldemote.
10147         * config/i386/x86intrin.h: New header.
10148         * doc/invoke.texi: Add -mcldemote.
10150 2018-05-14  Richard Biener  <rguenther@suse.de>
10152         * doc/match-and-simplify.texi: Adjust :s documentation.
10154 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10156         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10157         intended memcpy size.
10158         (REORDER_45): Likewise.
10160 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10162         * sort.cc: New file.
10163         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10164         * vec.c (qsort_chk): Use gcc_qsort.
10165         * Makefile.in (OBJS-libcommon): Add sort.o.
10166         (build/sort.o): New target.  Use it...
10167         (BUILD_RTL): ... here, and...
10168         (build/gencfn-macros): ... here, and...
10169         (build/genmatch): ... here.
10171 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10172             Chung-Ju Wu  <jasonwucj@gmail.com>
10174         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10175         * config/nds32/nds32-graywolf.md: New file.
10176         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10177         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10178         pipeline.
10179         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10180         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10181         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10182         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10183         * config/nds32/pipelines.md: Include n15 settings.
10185 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10186             Chung-Ju Wu  <jasonwucj@gmail.com>
10188         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10189         * config/nds32/nds32-n13.md: New file.
10190         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10191         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10192         pipeline.
10193         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10194         * config/nds32/nds32.md (pipeline_model): Add n13.
10195         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10196         * config/nds32/pipelines.md: Include n13 settings.
10198 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10199             Chung-Ju Wu  <jasonwucj@gmail.com>
10201         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10202         * config/nds32/nds32-n10.md: New file.
10203         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10204         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10205         pipeline.
10206         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10207         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10208         * config/nds32/nds32.md (pipeline_model): Add n10.
10209         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10210         * config/nds32/pipelines.md: Include n10 settings.
10212 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10213             Kito Cheng  <kito.cheng@gmail.com>
10214             Chung-Ju Wu  <jasonwucj@gmail.com>
10216         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10217         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10218         Add enum values for DSP extension instructions.
10219         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10220         New constraints.
10221         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10222         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10223         New code iterators.
10224         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10225         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10226         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10227         * config/nds32/nds32-intrinsic.md: Likewise.
10228         * config/nds32/nds32_intrinsic.h: Likewise.
10229         * config/nds32/nds32-md-auxiliary.c: Likewise.
10230         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10231         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10232         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10233         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10234         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10235         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10236         TYPE_DMAC in switch statement.
10237         * config/nds32/nds32.c: New checking and implementation for DSP
10238         extension instructions.
10239         * config/nds32/nds32.h: Likewise.
10240         * config/nds32/nds32.md: Likewise.
10241         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10242         * config/nds32/predicates.md: Implement new predicates for DSP
10243         extension.
10245 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10247         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10248         Reformat alternatives and attributes so it is easier to identify
10249         which constraints/attributes go with which instruction.
10250         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10251         (mov<mode>_softfloat32, FMOVE64): Likewise.
10252         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10253         (mov<mode>_softfloat64, FMOVE64): Likewise.
10255 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10257         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10258         subsection.
10259         (Basic PowerPC Built-in Functions): The new name of the
10260         subsection previously known as "PowerPC Built-in Functions".
10261         (Basic PowerPC Built-in Functions Available on all Configurations):
10262         New subsubsection.
10263         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10264         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10265         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10266         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10268 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10270         PR ipa/85655
10271         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10272         single const.
10274 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10276         PR target/85733
10277         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10279 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10281         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10282         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10283         (ix86_handle_option): Handle -mwaitpkg.
10284         * config.gcc: New header.
10285         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10286         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10287         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10288         function type.
10289         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10290         OPTION_MASK_ISA_WAITPKG.
10291         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10292         (ix86_option_override_internal): Add PTA_WAITPKG.
10293         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10294         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10295         IX86_BUILTIN_TPAUSE.
10296         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10297         __builtin_ia32_umwait and __builtin_ia32_tpause.
10298         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10299         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10300         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10301         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10302         UNSPECV_TPAUSE): New.
10303         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10304         * config/i386/i386.opt: Add -mwaitpkg.
10305         * config/i386/waitpkgintrin.h: New file.
10306         * config/i386/x86intrin.h: New header.
10307         * doc/invoke.texi: Add -mwaitpkg.
10309 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10311         PR target/85606
10312         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10313         equivalent.
10314         (cortex-m0): Use armv6s-m isa.
10315         (cortex-m0plus): Likewise.
10316         (cortex-m1): Likewise.
10317         (cortex-m0.small-multiply): Likewise.
10318         (cortex-m0plus.small-multiply): Likewise.
10319         (cortex-m1.small-multiply): Likewise.
10321 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10322             Jakub Jelinek  <jakub@redhat.com>
10324         PR tree-optimization/85692
10325         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10326         source permute as well.
10328 2018-05-11  Martin Liska  <mliska@suse.cz>
10330         PR sanitizer/85556
10331         * doc/extend.texi: Document LLVM style format for no_sanitize
10332         attribute.
10334 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10336         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10337         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10338         (mode_supports_vsx_dform_quad): Likewise.
10339         (mode_supports_vmx_dform): Move these functions to be next to the
10340         other mode_supports functions.
10341         (mode_supports_dq_form): Likewise.
10342         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10343         mode_supports_dq_form.
10344         (reg_offset_addressing_ok_p): Likewise.
10345         (offsettable_ok_by_alignment): Likewise.
10346         (rs6000_legitimate_offset_address_p): Likewise.
10347         (legitimate_lo_sum_address_p): Likewise.
10348         (rs6000_legitimize_address): Likewise.
10349         (rs6000_legitimize_reload_address): Likewise.
10350         (rs6000_secondary_reload_inner): Likewise.
10351         (rs6000_preferred_reload_class): Likewise.
10352         (rs6000_output_move_128bit): Likewise.
10354 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10356         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10357         Generate SImode target register for null target.
10358         <case IX86_BUILTIN_XGETBV>: Ditto.
10359         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10360         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10362 2018-05-10  Carl Love  <cel@us.ibm.com>
10364         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10365         dcbtt and dcbtstt if operands[2] is 0.
10367 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10369         PR target/85693
10370         * config/i386/sse.md (usadv64qi): New expander.
10372 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10374         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10375         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10376         -maltivec=be support.
10377         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10378         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10379         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10380         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10381         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10382         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10383         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10384         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10385         altivec_vsumsws): Adjust.
10386         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10387         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10388         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10389         support.
10390         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10391         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10392         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10393         (altivec_lve<VI_char>x): Delete expand.
10394         (*altivec_lve<VI_char>x_internal): Rename to...
10395         (altivec_lve<VI_char>x): ... this.
10396         (altivec_lvxl_<mode>): Delete expand.
10397         (*altivec_lvxl_<mode>_internal): Rename to ...
10398         (altivec_lvxl_<mode>): ... this.
10399         (altivec_stvxl_<mode>): Delete expand.
10400         (*altivec_stvxl_<mode>_internal): Rename to ...
10401         (altivec_stvxl_<mode>): ... this.
10402         (altivec_stve<VI_char>x): Delete expand.
10403         (*altivec_stve<VI_char>x_internal): Rename to ...
10404         (altivec_stve<VI_char>x): ... this.
10405         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10406         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10407         reduc_plus_scal_<mode>): Adjust.
10408         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10409         comment.
10410         (rs6000_cpu_cpp_builtins): Adjust.
10411         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10412         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10413         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10414         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10415         -maltivec=be support.
10416         (rs6000_split_vec_extract_var): Adjust.
10417         (rs6000_split_v4si_init): Adjust.
10418         (swap_selector_for_mode): Delete.
10419         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10420         altivec_expand_stvex_be): Delete.
10421         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10422         -maltivec=be support.
10423         (rs6000_gimple_fold_builtin): Ditto.
10424         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10425         Adjust.
10426         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10427         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10428         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10429         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10430         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10431         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10432         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10433         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10434         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10435         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10436         anonymous split): Adjust.
10437         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10438         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10440 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10442         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10443         when --with-gxx-include-dir is also specified.
10444         * configure: Regenerate.
10446 2018-05-09  Jim Wilson  <jimw@sifive.com>
10448         PR target/84797
10449         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10450         * config/riscv/t-withmultilib: New.
10451         * config/riscv/withmultilib.h: New.
10452         * doc/install.texi: Document RISC-V --with-multilib-list support.
10454 2018-05-09  Richard Biener  <rguenther@suse.de>
10456         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10457         vector.
10458         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10459         actual scalar cost using the cost vector and the add_stmt_cost
10460         machinery.
10462 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10464         PR rtl-optimization/85645
10465         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10466         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10468 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10470         PR rtl-optimization/85645
10471         * shrink-wrap.c (spread_components): Return a boolean saying if
10472         anything was changed.
10473         (try_shrink_wrapping_separate): Iterate spread_components until
10474         nothing changes anymore.
10476 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10478         PR rtl-optimization/85645
10479         * regrename.c (build_def_use): Also kill the chains that include the
10480         destination of a REG_CFA_REGISTER note.
10482 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10484         PR rtl-optimization/85645
10485         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10486         insn that has a REG_CFA_REGISTER note.
10488 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10490         * cfgexpand.c (expand_clobber): New function.
10491         (expand_gimple_stmt_1): Use it.
10492         * tree-vect-stmts.c (vect_clobber_variable): New function,
10493         split out from...
10494         (vectorizable_simd_clone_call): ...here.
10495         (vectorizable_store): Emit a clobber either side of an
10496         IFN_STORE_LANES sequence.
10497         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10499 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10501         PR target/85626
10502         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10503         (define_insn "trap_if_false"): Add exit after trap.
10505 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10507         PR rtl-optimization/85638
10508         * bb-reorder.c: Include common/common-target.h.
10509         (create_forwarder_block): New function extracted from...
10510         (fix_up_crossing_landing_pad): ...here.  Rename into...
10511         (dw2_fix_up_crossing_landing_pad): ...this.
10512         (sjlj_fix_up_crossing_landing_pad): New function.
10513         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10514         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10515         from both partitions and exit the loop after one iteration.
10517 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10519         Revert:
10520         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10521         subsection.
10522         (Basic PowerPC Built-in Functions): The new name of the
10523         subsection previously known as "PowerPC Built-in Functions".
10524         (Basic PowerPC Built-in Functions Available on all Configurations):
10525         New subsubsection.
10526         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10527         subsubsection.
10528         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10529         subsubsection.
10530         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10531         subsubsection.
10532         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10533         subsubsection.
10535 2018-05-08  Jim Wilson  <jimw@sifive.com>
10537         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10538         (LD_EMUL_SUFFIX): New.
10539         (LINK_SPEC): Use it.
10541 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10543         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10544         subsection.
10545         (Basic PowerPC Built-in Functions): The new name of the
10546         subsection previously known as "PowerPC Built-in Functions".
10547         (Basic PowerPC Built-in Functions Available on all Configurations):
10548         New subsubsection.
10549         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10550         subsubsection.
10551         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10552         subsubsection.
10553         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10554         subsubsection.
10555         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10556         subsubsection.
10558 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10560         PR target/85683
10561         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10562         after cmpelim optimization.
10564 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10566         * config.gcc: Support "goldmont".
10567         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10568         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10569         PROCESSOR_GOLDMONT.
10570         * config/i386/i386.c (m_GOLDMONT): Define.
10571         (processor_target_table): Add "goldmont".
10572         (PTA_GOLDMONT): Define.
10573         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10574         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10575         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10576         (fold_builtin_cpu): Add "goldmont".
10577         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10578         (ix86_option_override_internal): Add "goldmont".
10579         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10580         (processor_type): Add PROCESSOR_GOLDMONT.
10581         * config/i386/i386.md: Add CPU "glm".
10582         * config/i386/glm.md: New file.
10583         * config/i386/x86-tune.def: Add m_GOLDMONT.
10584         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10586 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10588         PR target/85572
10589         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10590         E_V4DImode.
10591         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10592         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10593         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10595         PR target/85317
10596         * config/i386/i386.c (ix86_fold_builtin): Handle
10597         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10599         PR target/85480
10600         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10601         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10603 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10605         PR target/85658
10606         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10607         (check_arch): Likewise.
10608         (check_fpu): Return the result rather than printing it.
10609         (end arch): Fix operator precedence.
10610         (end cpu): Likewise.
10611         (END): Print the result from check_fpu.
10613 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10614             Alan Hayward  <alan.hayward@arm.com>
10615             David Sherwood  <david.sherwood@arm.com>
10617         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10618         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10619         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10620         (*fcmuo<mode>_and): New patterns.
10622 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10624         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10625         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10626         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10627         (cmp_op, sve_imm_con): New code attributes.
10628         (SVE_COND_INT_CMP, imm_con): Delete.
10629         (cmp_op): Remove above unspecs from int attribute.
10630         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10631         to...
10632         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10633         comparison-specific unspecs.
10634         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10635         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10636         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10637         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10638         (*vec_fcm<cmp_op><mode>): Rename to...
10639         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10640         (*vec_fcmuo<mode>): Rename to...
10641         (*fcmuo<mode>): ...this and adjust likewise.
10642         (*pred_fcm<cmp_op><mode>): New pattern.
10643         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10644         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10645         functions.
10646         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10647         and UNORDERED.
10648         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10649         (aarch64_emit_sve_predicated_cond): New function.
10650         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10651         (aarch64_emit_unspec_cond_or): Replace with...
10652         (aarch64_emit_sve_or_conds): ...this new function.  Use
10653         aarch64_emit_sve_ptrue_op for the individual comparisons and
10654         aarch64_emit_binop to OR them together.
10655         (aarch64_emit_inverted_unspec_cond): Replace with...
10656         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
10657         aarch64_emit_sve_ptrue_op for the comparison and
10658         aarch64_emit_unop to invert the result.
10659         (aarch64_expand_sve_vec_cmp_float): Update after the above
10660         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
10662 2018-05-07  Nathan Sidwell  <nathan@acm.org>
10664         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10665         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10666         (Backwards Compatibility): Likewise.
10668 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10670         PR bootstrap/85681
10671         Revert:
10672         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10674         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10675         <prefetch_dynamic_strides>: New const bool field.
10676         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10677         prefetch_dynamic_strides.
10678         (exynosm1_prefetch_tune): Likewise.
10679         (thunderxt88_prefetch_tune): Likewise.
10680         (thunderx_prefetch_tune): Likewise.
10681         (thunderx2t99_prefetch_tune): Likewise.
10682         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10683         to false.
10684         (aarch64_override_options_internal): Update to set
10685         PARAM_PREFETCH_DYNAMIC_STRIDES.
10686         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10687         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10688         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10689         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10690         prefetch-dynamic-strides setting.
10692         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10694         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10695         <minimum_stride>: New const int field.
10696         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10697         minimum_stride field.
10698         (exynosm1_prefetch_tune): Likewise.
10699         (thunderxt88_prefetch_tune): Likewise.
10700         (thunderx_prefetch_tune): Likewise.
10701         (thunderx2t99_prefetch_tune): Likewise.
10702         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10703         (aarch64_override_options_internal): Update to set
10704         PARAM_PREFETCH_MINIMUM_STRIDE.
10705         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10706         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10707         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10708         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10709         stride is constant and is below the minimum stride threshold.
10711 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10713         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10714         to 512.
10716 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10718         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10719         <prefetch_dynamic_strides>: New const bool field.
10720         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10721         prefetch_dynamic_strides.
10722         (exynosm1_prefetch_tune): Likewise.
10723         (thunderxt88_prefetch_tune): Likewise.
10724         (thunderx_prefetch_tune): Likewise.
10725         (thunderx2t99_prefetch_tune): Likewise.
10726         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10727         to false.
10728         (aarch64_override_options_internal): Update to set
10729         PARAM_PREFETCH_DYNAMIC_STRIDES.
10730         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10731         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10732         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10733         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10734         prefetch-dynamic-strides setting.
10736 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10738         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10739         <minimum_stride>: New const int field.
10740         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10741         minimum_stride field.
10742         (exynosm1_prefetch_tune): Likewise.
10743         (thunderxt88_prefetch_tune): Likewise.
10744         (thunderx_prefetch_tune): Likewise.
10745         (thunderx2t99_prefetch_tune): Likewise.
10746         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10747         (aarch64_override_options_internal): Update to set
10748         PARAM_PREFETCH_MINIMUM_STRIDE.
10749         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10750         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10751         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10752         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10753         stride is constant and is below the minimum stride threshold.
10755 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
10757         PR c++/85659
10758         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10759         the type is addressable.  Don't force op into register if it has
10760         BLKmode.
10762 2018-05-05  Roland McGrath  <mcgrathr@google.com>
10764         PR other/77609
10765         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10766         any section for which we don't know a specific type it should have,
10767         regardless of name.  Previously this was done only for the exact
10768         names ".init_array", ".fini_array", and ".preinit_array".
10769         (default_elf_asm_named_section): Add comment about
10770         relationship with default_section_type_flags and SECTION_NOTYPE.
10771         (get_section): Don't consider it a type conflict if one side has
10772         SECTION_NOTYPE and the other doesn't, as long as neither has the
10773         SECTION_BSS et al used in the default_section_type_flags logic.
10775 2018-05-05  Tom de Vries  <tom@codesourcery.com>
10777         PR target/85653
10778         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10779         (workaround_barsyncs): New function.
10780         (nvptx_reorg): Use workaround_barsyncs.
10781         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10782         (define_expand "nvptx_membar_cta"): New define_expand.
10783         (define_insn "*nvptx_membar_cta"): New insn.
10785 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
10787         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10788         To improve optimization opportunities.
10789         * builtin-types.def: The new needed builtin types for the above.
10791 2018-05-04  Richard Biener  <rguenther@suse.de>
10793         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10794         * gimple-ssa-store-merging.c
10795         (imm_store_chain_info::output_merged_store): Remove redundant create,
10796         release split_store vector contents on failure.
10797         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10798         scalar stmt vector on cache hit.
10800 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
10802         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10803         Xilinx FP support.
10804         * config.gcc (powerpc-xilinx-eabi*): Remove.
10805         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10806         support.
10807         (fusion_addis_mem_combo_load): Ditto.
10808         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10809         FP support.
10810         (rs6000_cpu_cpp_builtins): Ditto.
10811         * config/rs6000/rs6000-linux.c
10812         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10813         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10814         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10815         support.
10816         (rs6000_setup_reg_addr_masks): Ditto.
10817         (rs6000_init_hard_regno_mode_ok): Ditto.
10818         (rs6000_option_override_internal): Ditto.
10819         (legitimate_lo_sum_address_p): Ditto.
10820         (rs6000_legitimize_address): Ditto.
10821         (rs6000_legitimize_reload_address): Ditto.
10822         (rs6000_legitimate_address_p): Ditto.
10823         (abi_v4_pass_in_fpr): Ditto.
10824         (setup_incoming_varargs): Ditto.
10825         (rs6000_gimplify_va_arg): Ditto.
10826         (rs6000_split_multireg_move): Ditto.
10827         (rs6000_savres_strategy): Ditto.
10828         (rs6000_emit_prologue_components): Ditto.
10829         (rs6000_emit_epilogue_components): Ditto.
10830         (rs6000_emit_prologue): Ditto.
10831         (rs6000_emit_epilogue): Ditto.
10832         (rs6000_elf_file_end): Ditto.
10833         (rs6000_function_value): Ditto.
10834         (rs6000_libcall_value): Ditto.
10835         * config/rs6000/rs6000.h: Ditto.
10836         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10837         (TARGET_MINMAX): ... this.  New.
10838         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10839         * config/rs6000/rs6000.md: Remove Xilinx FP support.
10840         (*movsi_internal1_single): Delete.
10841         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10842         mfpu=, mxilinx-fpu): Delete.
10843         * config/rs6000/singlefp.h: Delete.
10844         * config/rs6000/sysv4.h: Remove Xilinx FP support.
10845         * config/rs6000/t-rs6000: Ditto.
10846         * config/rs6000/t-xilinx: Delete.
10847         * config/rs6000/titan.md: Adjust for fp_type removal.
10848         * config/rs6000/vsx.md: Remove Xilinx FP support.
10849         (VStype_simple): Delete.
10850         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10851         * config/rs6000/xfpu.h: Delete.
10852         * config/rs6000/xfpu.md: Delete.
10853         * config/rs6000/xilinx.h: Delete.
10854         * config/rs6000/xilinx.opt: Delete.
10855         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10856         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10858 2018-05-04  Tom de Vries  <tom@codesourcery.com>
10860         PR libgomp/85639
10861         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10862         if ignore == 0.
10864 2018-05-04  Richard Biener  <rguenther@suse.de>
10866         PR middle-end/85627
10867         * tree-complex.c (update_complex_assignment): We are always in SSA form.
10868         (expand_complex_div_wide): Likewise.
10869         (expand_complex_operations_1): Likewise.
10870         (expand_complex_libcall): Preserve EH info of the original stmt.
10871         (tree_lower_complex): Handle removed blocks.
10872         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10873         on complex multiplication and division libcall builtins.
10875 2018-05-04  Richard Biener  <rguenther@suse.de>
10877         PR middle-end/85574
10878         * fold-const.c (negate_expr_p): Restrict negation of operand
10879         zero of a division to when we know that can happen without
10880         overflow.
10881         (fold_negate_expr_1): Likewise.
10883 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
10885         PR libstdc++/85466
10886         * real.h (real_nextafter): Declare.
10887         * real.c (real_nextafter): New function.
10888         * fold-const-call.c (fold_const_nextafter): New function.
10889         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10890         CASE_CFN_NEXTTOWARD.
10891         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10892         even when arg1_mode is different from arg0_mode.
10894 2018-05-03  Nathan Sidwell  <nathan@acm.org>
10896         * doc/extend.texi (Deprecated Features): Remove
10897         -ffriend-injection.
10898         (Backwards Compatibility): Likewise.
10899         * doc/invoke.texi (C++ Language Options): Likewise.
10900         (C++ Dialect Options): Likewise.
10902 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
10904         PR target/85530
10905         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10906         _mm512_mask_mullox_epi64): New intrinsics.
10908 2018-05-03  Tom de Vries  <tom@codesourcery.com>
10910         PR testsuite/85106
10911         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10912         dump files): Add offload-tree.
10914 2018-05-03  Richard Biener  <rguenther@suse.de>
10916         PR tree-optimization/85615
10917         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10918         to loops not nested in BBs loop father to avoid creating multi-entry
10919         loops.
10921 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10923         PR tree-optimization/70291
10924         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10925         arguments.  Change return type to tree.  Emit libcall as a new
10926         statement rather than replacing existing one when inplace_p is true.
10927         (expand_complex_multiplication_components): New function.
10928         (expand_complex_multiplication): Expand floating-point complex
10929         multiplication using the above.
10930         (expand_complex_division): Rename inner_type parameter to type.
10931         Update expand_complex_libcall call-site.
10932         (expand_complex_operations_1): Update expand_complex_multiplication
10933         and expand_complex_division call-sites.
10935 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10937         PR target/85582
10938         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10939         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10940         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10941         the highest significant bit of the shift count mask is clear.  In
10942         check whether and[sq]i3 is needed verify that all significant bits
10943         of the shift count other than the highest are set.
10945 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10947         PR libgomp/82428
10948         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10949         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10950         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10951         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10952         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10953         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10954         __builtin_goacc_parlevel_size.
10956 2018-05-02  Richard Biener  <rguenther@suse.de>
10958         PR tree-optimization/85597
10959         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10960         do not use split vect_get_vec_defs call but call vect_get_slp_defs
10961         directly.
10963 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10965         PR testsuite/85106
10966         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10967         dump files): Add ltrans-tree.
10969 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10971         PR testsuite/85106
10972         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10973         dump files): Add wpa-ipa.
10975 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
10977         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
10978         powerpc*-*-linux*paired* target.
10979         * config/rs6000/750cl.h: Delete.
10980         * config/rs6000/paired.h: Delete.
10981         * config/rs6000/paired.md: Delete.
10982         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10983         float support.
10984         * config/rs6000/rs6000-builtin.def: Remove paired float support.
10985         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10986         comment.  Remove paired float support.
10987         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10988         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10989         VECTOR_PAIRED.
10990         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10991         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10992         declarations.
10993         * config/rs6000/rs6000.c: Remove paired float support.
10994         (paired_expand_vector_init, paired_expand_vector_move,
10995         paired_emit_vector_compare, paired_emit_vector_cond_expr,
10996         (paired_expand_lv_builtin, paired_expand_stv_builtin,
10997         paired_expand_builtin, paired_expand_predicate_builtin,
10998         paired_init_builtins): Delete.
10999         * config/rs6000/rs6000.h: Remove paired float support.
11000         * config/rs6000/rs6000.md: Remove paired float support.
11001         (move_from_CR_ov_bit): Delete.
11002         * config/rs6000/rs6000.opt (mpaired): Delete.
11003         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11004         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11006 2018-05-02  Richard Biener  <rguenther@suse.de>
11008         PR middle-end/85567
11009         * gimplify.c (gimplify_save_expr): When in SSA form allow
11010         SAVE_EXPRs to compute to SSA vars.
11012 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11014         PR target/85582
11015         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11016         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11017         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11018         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11020 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11022         PR tree-optimization/85586
11023         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11024         exit early for statements in the same group if the accesses are
11025         not strided.
11027 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11029         PR lto/85451
11030         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11031         error message.
11033 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11035         PR tree-optimization/85143
11036         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11038 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11040         PR lto/85451
11041         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11042         not found" error message.
11044 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11046         PR other/83786
11047         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11048         * vec.c (test_ordered_remove_if): New function.
11049         (vec_c_tests): Call test_ordered_remove_if.
11050         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11051         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11052         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11053         VEC_ORDERED_REMOVE_IF.
11055 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11057         PR tree-optimization/82665
11058         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11059         pointer subtraction where arguments come from a memchr call.
11061 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11063         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11064         --push-state --as-needed and --pop-state instead of --as-needed and
11065         --no-as-needed if ld supports it.
11066         * configure: Regenerated.
11068         PR web/85578
11069         * doc/install.texi2html: Replace _002d with - and _002a with * in
11070         generated html files using sed.
11072 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11074         PR c++/85523
11075         * gcc-rich-location.c (blank_line_before_p): New function.
11076         (use_new_line): New function.
11077         (gcc_rich_location::add_fixit_insert_formatted): New function.
11078         * gcc-rich-location.h
11079         (gcc_rich_location::add_fixit_insert_formatted): New function.
11081 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11083         * selftest.c (assert_streq): Rename "expected" and "actual" to
11084         "val1" and "val2".  Extend NULL-handling to cover both inputs
11085         symmetrically, while still requiring both to be non-NULL for a pass.
11086         * selftest.h (assert_streq): Rename "expected" and "actual" to
11087         "val1" and "val2".
11088         (ASSERT_EQ): Likewise.
11089         (ASSERT_EQ_AT): Likewise.
11090         (ASSERT_KNOWN_EQ): Likewise.
11091         (ASSERT_KNOWN_EQ_AT): Likewise.
11092         (ASSERT_NE): Likewise.
11093         (ASSERT_MAYBE_NE): Likewise.
11094         (ASSERT_MAYBE_NE_AT): Likewise.
11095         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11096         the assertion to pass.
11097         (ASSERT_STREQ_AT): Likewise.
11099 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11101         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11102         interaction with -pie.
11104 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11106         * selftest.h: Fix alphabetization of per-source-file selftest
11107         declarations.
11109 2018-04-30  Jason Merrill  <jason@redhat.com>
11111         PR c++/61982 - dead stores to destroyed objects.
11112         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11113         of clobber.
11115 2018-04-30  Jason Merrill  <jason@redhat.com>
11117         * tree.c (build_clobber): New.
11118         * tree.h: Declare it.
11119         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11121 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11123         * diagnostic-show-locus.c (layout::layout): Update for
11124         location_get_source_line returning a char_span.
11125         (struct char_span): Move to input.h.
11126         (struct correction): Update for fields in char_span becoming
11127         private.
11128         (struct source_line): Update for location_get_source_line
11129         returning a char_span.
11130         (layout::print_line): Likewise.
11131         * edit-context.c (edited_file::print_content): Likewise.
11132         (edited_file::print_diff_hunk): Likewise.
11133         (edited_file::print_run_of_changed_lines): Likewise.
11134         (edited_file::get_num_lines): Likewise.
11135         (edited_line::edited_line): Likewise.
11136         * final.c (asm_show_source): Likewise.
11137         * input.c (location_get_source_line): Convert return type
11138         from const char * to char_span, losing the final "line_len"
11139         param.
11140         (dump_location_info): Update for the above.
11141         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11142         when handling the literal within the line.
11143         (test_reading_source_line): Update for location_get_source_line
11144         returning a char_span.
11145         * input.h (class char_span): Move here from
11146         diagnostic-show-locus.c, converting from a struct to a class.
11147         Make data members private.
11148         (char_span::operator bool): New.
11149         (char_span::length): New.
11150         (char_span::get_buffer): New.
11151         (char_span::operator[]): New.
11152         (char_span::subspan): Make const.
11153         (char_span::xstrdup): New.
11154         (location_get_source_line): Convert return type from const char *
11155         to char_span, losing the final "line_size" param.
11157 2018-04-30  Jan Hubicka  <jh@suse.cz>
11159         * lto-wrapper.c (ltrans_priorities): New static var.
11160         (cmp_priority): New.
11161         (run_gcc): Read priorities and if doing parallel build order
11162         the Makefile by them.
11164 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11166         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11168 2018-04-30  Richard Biener  <rguenther@suse.de>
11170         * tree-cfg.c (verify_address): Remove base argument, add
11171         flag whether to check TREE_ADDRESSABLE and do that.
11172         (verify_expr): Remove.
11173         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11174         (verify_gimple_assign_single): Likewise.
11175         (verify_gimple_switch): Likewise.
11176         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11177         piece from verify_expr.
11178         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11180 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11182         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11184 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11186         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11187         (small_data_pattern): Likewise.
11188         (arc_rewrite_small_data): Likewise.
11189         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11190         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11191         (get_symbol_alignment): New function.
11192         (legitimate_small_data_address_p): Likewise.
11193         (legitimate_scaled_address): Update, call
11194         legitimate_small_data_address_p.
11195         (output_sdata): New static variable.
11196         (arc_print_operand): Update how we handle small data operands.
11197         (arc_print_operand_address): Likewise.
11198         (arc_legitimate_address_p): Update, use
11199         legitimate_small_data_address_p.
11200         (arc_rewrite_small_data_p): Remove.
11201         (arc_rewrite_small_data_1): Likewise.
11202         (arc_rewrite_small_data): Likewise.
11203         (small_data_pattern): Likewise.
11204         (compact_sda_memory_operand): Update to use
11205         legitimate_small_data_address_p and get_symbol_alignment.
11206         (prepare_move_operands): Don't rewite sdata pattern.
11207         (prepare_extend_operands): Remove.
11208         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11209         pattern.
11210         (zero_extendqisi2): Likewise.
11211         (zero_extendhisi2): Likewise.
11212         (extendqihi2): Likewise.
11213         (extendqisi2): Likewise.
11214         (extendhisi2): Likewise.
11215         (addsi3): Likewise.
11216         (subsi3): Likewise.
11217         (andsi3): Likewise.
11218         * config/arc/constraints.md (Usd): Change it to memory constraint.
11220 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11222         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11223         as source of std instructions.
11224         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11225         allow 6-bit constants as source for store instructions.
11226         (movdi_insn): Update instruction pattern to allow 6-bit constants
11227         as source for store instructions.
11229 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11231         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11233 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11234             Sandra Loosemore <sandra@codesourcery.com>
11236         * dumpfile.c (dump_open): Allow '-' for stdout.
11237         * doc/invoke.texi (Developer Options): Document dump filename
11238         determination early.  Document stdin/stdout selection.
11240 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
11242         Microblaze Target: PIC data text relative
11244         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11245         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11246         Add declaration.
11247         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11248         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11249         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11250         New addressing mode for data-text relative position indepenedent code.
11251         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11252         'ADDRESS_SYMBOLIC_TXT_REL'.
11253         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11254         (microblaze_legitimate_pic_operand): Exclude function calls from
11255         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11256         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11257         addresses cases.
11258         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11259         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11260         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11261         for 'address + offset'.
11262         (microblaze_expand_prologue): Add new function prologue call for
11263         'r20' assignation.
11264         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11265         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11266         table in case of TARGET_PIC_DATA_TEXT_REL.
11267         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11268         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11269         Add new macros 'UNSPEC_TEXT',
11270         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11271         + exclude function calls from 'UNSPEC_PLT' in case of data text
11272         relative mode.
11273         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11274         new target hook for generating address diff vector tables in case of
11275         flag_pic.
11276         * doc/tm.texi : Regenerate.
11277         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11278         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11279         of addr diff vector generation.
11280         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11281         target hook definition.
11282         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11283         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11284         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11285         option for data text relative.
11287 2018-04-30  Richard Biener  <rguenther@suse.de>
11289         * tree-chrec.h (evolution_function_is_constant_p): Remove
11290         redundant check.
11291         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11293 2018-04-30  Richard Biener  <rguenther@suse.de>
11295         PR bootstrap/85571
11296         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11298 2018-04-30  Richard Biener  <rguenther@suse.de>
11300         PR tree-optimization/28364
11301         PR tree-optimization/85275
11302         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11303         copying first exit test.
11305 2018-04-28  Mark Wielaard  <mark@klomp.org>
11307         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11308         dwarf_version >= 5.
11309         (dwarf_AT): Handle DW_AT_addr_base.
11310         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11312 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11314         PR target/84431
11315         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11316         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11317         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11318         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11320 2018-04-28  Richard Biener  <rguenther@suse.de>
11322         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11323         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11324         to reflect use.  Only add interesting stmts.
11326 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11328         PR ipa/85549
11329         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11330         the jump function allows for passing through aggregate values.
11332 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11334         * input.h (in_system_header_at): Convert from macro to inline
11335         function.
11336         (from_macro_expansion_at): Likewise.
11337         (from_macro_definition_at): Likewise.
11339 2018-04-27  Jeff Law  <law@redhat.com>
11341         * config.gcc: Mark tile* targets as deprecated/obsolete.
11343 2018-04-27  Richard Biener  <rguenther@suse.de>
11345         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11346         fix for ILP32.
11348 2018-04-27  Richard Biener  <rguenther@suse.de>
11350         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11352 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11354         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11355         with Yd constraint. Set "preferred_for_speed" attribute from
11356         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11357         with Yd constraint.
11358         (*movdi_internal): Ditto.
11359         (movti_interunit splitters): Remove
11360         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11361         (movdi_interunit splitters): Ditto.
11362         * config/i386/constraints.md (Ye): Remove.
11363         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11365 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11367         PR target/85512
11368         * config/aarch64/constraints.md (Usg): Limit to 31.
11369         (Usj): Limit to 63.
11371 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11373         PR tree-optimization/85529
11374         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11375         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11376         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11377         zero extension or masking of the MSB bit.
11378         (optimize_range_tests): Add FIRST_BB argument, pass it through
11379         to optimize_range_tests_var_bound.
11380         (maybe_optimize_range_tests, reassociate_bb): Adjust
11381         optimize_range_tests callers.
11383 2018-04-26  Richard Biener  <rguenther@suse.de>
11384             Jakub Jelinek  <jakub@redhat.com>
11386         * cgraph.h (symbol_table): Just declare debug method here.
11387         * symtab.c (symbol_table::debug): Define.
11389 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11391         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11393 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11395         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11396         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11397         (*movdi_internal): Substitute Yi and Yj constraint with x
11398         and Ym and Yn constraint with y constraint.  Update "isa"
11399         attribute and set "preferred_for_speed" attribute from
11400         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11401         (*movsi_internal): Ditto.
11402         (*movdf_internal): Ditto.
11403         (*movsf_internal): Ditto.
11404         (*zero_extendsidi2): Ditto.
11405         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11406         (sse2_loadld): Ditto.
11407         (*vec_extract<ssevecmodelower>_0): Ditto.
11408         (*vec_extractv4si_0_zext_sse4): Ditto.
11409         (vec_concatv2di): Ditto.
11410         (*vec_dup<mode>): Ditto.
11411         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11412         * config/i386/constraints.md (Yi): Remove.
11413         (Yj): Remove.
11414         (Ym): Remove.
11415         (Yn): Remove.
11417 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11419         * dumpfile.c (dump_open): New.
11420         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11421         (dump_finish): Detect stdio/stderr by value not name.
11423 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11425         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11427 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11429         PR target/84952
11430         * config/nvptx/nvptx.c (verify_neutering_jumps)
11431         (verify_neutering_labels): New function
11432         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11434 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11436         PR target/84025
11437         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11438         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11439         need neutering.
11441 2018-04-26  Richard Biener <rguenther@suse.de>
11442             Tom de Vries  <tom@codesourcery.com>
11444         PR lto/85422
11445         * lto-streamer-out.c (output_function): Fixup loops if required to match
11446         discovery done in the reader.
11448 2018-04-26  Richard Biener  <rguenther@suse.de>
11450         PR tree-optimization/85116
11451         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11452         have a loop exit from the single latch predecessor.  Remove
11453         case of header with just condition.
11454         (ch_base::copy_headers): Exclude infinite loops from any
11455         processing.
11456         (pass_ch::execute): Record exits.
11458 2018-04-26  Richard Biener  <rguenther@suse.de>
11460         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11461         prologue cost vector and pass it to vect_get_load_cost.
11462         (vect_get_peeling_costs_all_drs): Likewise.
11463         (vect_peeling_hash_get_lowest_cost): Likewise.
11464         (vect_enhance_data_refs_alignment): Likewise.
11466 2018-04-26  Richard Biener  <rguenther@suse.de>
11468         PR middle-end/85450
11469         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11470         checking of integer<->pointer conversions.
11471         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11472         sign-/zero-extending pointer types.
11473         (expand_omp_for_static_chunk): Likewise.
11475 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11476             Jean Lee  <xiaoyur347@gmail.com>
11478         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11479         (TARGET_ASAN_SHADOW_OFFSET): Define.
11480         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11481         true for -fsanitize=address.
11483 2018-04-25  Mark Wielaard  <mark@klomp.org>
11485         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11486         shorter ones.
11488 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11490         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11491         than "alu", remove explicit "memory" and "imm_disp" attributes.
11492         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11494         PR middle-end/85414
11495         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11496         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11497         gen_lowpart_no_emit.
11499 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11501         PR target/85473
11502         * config/i386/i386.c (ix86_expand_builtin): Change memory
11503         operand to XI, extend p0 to Pmode.
11504         * config/i386/i386.md: Change unspec volatile and operand
11505         1 mode to XI, change operand 0 mode to P.
11507 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11509         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11510         GET_MODE_MASK before any checking.
11511         (nds32_can_use_bset_p): Likewise.
11512         (nds32_can_use_btgl_p): Likewise.
11514 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11516         * config/nds32/nds32-doubleword.md: New define_split pattern for
11517         illegal register number.
11519 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11521         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11523 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11525         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11527 2018-04-25  Richard Biener  <rguenther@suse.de>
11529         * lto-streamer.h (LTO_major_version): Bump to 8.
11531 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11533         * BASE-VER: Set to 9.0.0.
11535 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11537         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11538         in __abskf2 and __powikf2.
11540 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11542         PR target/85512
11543         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11544         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11545         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11546         Use the above on operand 2.  Reindent.
11547         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11549 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11551         PR target/85485
11552         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11553         handle OPT_mcet.
11554         * config/i386/i386.opt (mcet): Removed.
11555         * doc/install.texi: Remove -mcet documentation.
11556         * doc/invoke.texi: Likewise.
11558 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11560         PR target/85485
11561         * doc/install.texi: Remove -mcet from bootstrap-cet.
11563 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11565         PR target/85511
11566         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11567         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11568         if TARGET_64BIT.
11570         PR target/85503
11571         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11572         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11573         containing a CONST_VECTOR.
11575 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11577         * doc/install.texi: Update newlib dependency for nvptx.
11579 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11581         PR target/85508
11582         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11583         instead of INTVAL when shifting x left.
11585 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11587         PR tree-optimization/85478
11588         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11589         vect_grouped_store_supported for single element vectors.
11591 2018-04-24  Richard Biener  <rguenther@suse.de>
11593         PR target/85491
11594         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11595         load cost increase to the case of non-constant step.
11597 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11599         PR target/84828
11600         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11601         destination if any_malformed_asm.
11603 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11605         PR middle-end/85496
11606         * expr.c (store_field): In the bitfield case, if the value comes from
11607         a function call and is returned in registers by means of a PARALLEL,
11608         do not change the mode of the temporary unless BLKmode and VOIDmode.
11610 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11612         PR rtl-optimization/85423
11613         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11614         dependencies to debug insns when the previous insn is non-debug.
11616 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11618         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11619         enums into a single definition.
11620         (fls): Fix predicates and printing.
11621         (seti): Likewise.
11623 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11625         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11626         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11627         and short u6 immediate.
11628         (check_if_valid_sleep_operand): Remove.
11629         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11631 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11633         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11634         flag_always_save_lp condition.
11635         * config/nds32/nds32.opt (malways-save-lp): New option.
11637 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11639         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11640         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11641         * config/nds32/nds32.h
11642         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11643         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11645 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11647         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11648         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11650 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11651             Chung-Ju Wu  <jasonwucj@gmail.com>
11653         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11654         Declare.
11655         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11656         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11658 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11660         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11662 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11664         * config/nds32/nds32-protos.h (nds32_data_alignment,
11665         nds32_local_alignment): Declare.
11666         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11667         nds32_local_alignment): New functions.
11668         (TARGET_CONSTANT_ALIGNMENT): Define.
11669         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11671 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11673         * config/nds32/nds32.c
11674         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11675         (TARGET_MODES_TIEABLE_P): Likewise.
11677 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11679         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11680         level Ofast and Og.
11682 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
11683             Chung-Ju Wu  <jasonwucj@gmail.com>
11685         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11686         for unaligned access.
11687         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11688         unaligned access.
11689         * config/nds32/nds32-intrinsic.md: Likewise.
11690         * config/nds32/nds32_intrinsic.h: Likewise.
11691         * config/nds32/nds32.h (nds32_builtins): Likewise.
11692         * config/nds32/nds32.opt (munaligned-access): New option.
11693         * config/nds32/nds32.c (nds32_asm_file_start): Display
11694         flag_unaligned_access status.
11696 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11698         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11699         -mno-relax is present.
11700         * config/riscv/linux.h (LINK_SPEC): Ditto.
11702 2018-04-20  Martin Sebor  <msebor@redhat.com>
11704         PR c/85365
11705         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11706         for null pointers.
11707         (gimple_fold_builtin_stxcpy_chk): Same.
11708         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11710 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
11712         PR target/85456
11713         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11714         __powikf2 when long double is IEEE 128-bit.
11716 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11718         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11719         step to make sure stack always aligned.
11721 2018-04-20  Carl Love  <cel@us.ibm.com>
11723         PR target/83402
11724         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11725         size check for arg0.
11727 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11728             Tom de Vries  <tom@codesourcery.com>
11730         PR target/85445
11731         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11732         Emit insns for calls too.
11733         (nvptx_find_par): Always look for worker-level predecessor insn.
11734         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
11735         calls.
11736         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11737         (nvptx_process_pars): Propagate frames for calls.
11739 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
11741         PR target/85469
11742         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11743         Removed.
11744         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11745         (ix86_handle_option): Don't handle OPT_mibt.
11746         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11747         __SHSTK__.
11748         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11749         has_ibt and ibt.
11750         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11751         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11752         (ix86_target_macros): Define __CET__ with flag_cf_protection
11753         for -fcf-protection.
11754         * config/i386/i386.c (isa2_opts): Remove -mibt.
11755         * config/i386/i386.h (TARGET_IBT): Removed.
11756         (TARGET_IBT_P): Likewise.
11757         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11758         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11759         * config/i386/i386.opt (mcet): Update help message.
11760         (mshstk): Likewise.
11761         (mibt): Removed.
11762         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
11763         -mcet as an alias for -mshstk.
11765 2018-04-20  Richard Biener <rguenther@suse.de>
11767         PR middle-end/85475
11768         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11769         complexity by forcing a single use of the multiply operand.
11771 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11773         ipa/85449
11774         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11775         recursion dependency to only apply to non-clones.
11777 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11779         ipa/85447
11780         * ipa-cp.c (create_specialized_node): Check that clones of
11781         self-recursive edges exist during IPA-CP.
11783 2018-04-19  Toon Moene  <toon@moene.org>
11785         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11786         by -O3.
11788 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11790         PR tree-optimization/85467
11791         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11792         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
11793         VECTOR_CST element to type.
11795 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11797         PR target/85397
11798         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11799         * config/i386/i386.md (builtin_setjmp_setup): Removed.
11800         (builtin_longjmp): Likewise.
11801         (save_stack_nonlocal): New pattern.
11802         (restore_stack_nonlocal): Likewise.
11804 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11806         PR target/85404
11807         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11808         Replace ASM_OUTPUT_LABEL with fprintf.
11810 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11812         PR target/85417
11813         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11814         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11815         * config/i386/i386-c.c (ix86_target_macros_internal): Also
11816         define __IBT__ and __SHSTK__ for -fcf-protection.
11817         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11818         TARGET_IBT.
11819         (ix86_trampoline_init): Likewise.
11820         (x86_output_mi_thunk): Likewise.
11821         (ix86_notrack_prefixed_insn_p): Likewise.
11822         (ix86_option_override_internal): Don't disallow -fcf-protection.
11823         * config/i386/i386.md (rdssp<mode>): Also enable for
11824         -fcf-protection.
11825         (incssp<mode>): Likewise.
11826         (nop_endbr): Likewise.
11827         * config/i386/i386.opt (mcet): Change help message to built-in
11828         functions only.
11829         (mibt): Likewise.
11830         (mshstk): Likewise.
11831         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11832         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
11833         enable CET built-in functions.
11835 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
11837         * common/config/i386/i386-common.c
11838         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11839         OPTION_MASK_ISA_MOVDIRI_UNSET,
11840         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11841         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11842         * config.gcc (movdirintrin.h): New header.
11843         * config/i386/cpuid.h (bit_MOVDIRI,
11844         bit_MOVDIR64B): New bits.
11845         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11846         and -mmvodir64b.
11847         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11848         (VOID, PVOID, PCVOID)): New function types.
11849         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11850         __builtin_ia32_directstoreu_u64,
11851         __builtin_ia32_movdir64b): New builtins.
11852         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11853         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11854         and -mmovdiri.
11855         (ix86_valid_target_attribute_inner_p): Ditto.
11856         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11857         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11858         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11859         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11860         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11861         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11862         (movdiri<mode>, movdir64b_<mode>): New.
11863         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11864         * config/i386/immintrin.h: Include movdirintrin.h.
11865         * config/i386/movdirintrin.h: New file.
11866         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11868 2018-04-19  Richard Biener  <rguenther@suse.de>
11870         PR middle-end/85455
11871         * cfg.c (clear_bb_flags): When loop state says we have
11872         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11874 2018-04-19  Richard Biener  <rguenther@suse.de>
11876         PR tree-optimization/84737
11877         * tree-vect-data-refs.c (vect_copy_ref_info): New function
11878         copying restrict info.
11879         (vect_setup_realignment): Use it.
11880         * tree-vectorizer.h (vect_copy_ref_info): Declare.
11881         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11882         the first DR to all generated stores.
11883         (vectorizable_load): Likewise for loads.
11885 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11887         PR tree-optimization/85446
11888         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11889         the integral and pointer types to have the same precision.
11891         * doc/install.texi: Document --disable-cet being the default and
11892         --enable-cet=auto.
11894 2018-04-18  Martin Liska  <mliska@suse.cz>
11896         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11897         style.
11899 2018-04-18  Martin Liska  <mliska@suse.cz>
11901         Revert
11902         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11904         PR ipa/83983
11905         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11906         arguments if they are comparable.
11908 2018-04-18  Martin Liska  <mliska@suse.cz>
11910         Revert
11911         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11913         PR lto/84805
11914         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11915         incomplete types.
11917 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
11919         PR target/85388
11920         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11921         ENDBR after calling __morestack.
11923 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
11925         PR jit/85384
11926         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11927         by using gcc_base_ver to generate a gcc_driver_version, and use
11928         it when generating GCC_DRIVER_NAME.
11929         * configure: Regenerate.
11931 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
11933         PR target/81084
11934         * config.gcc: Obsolete powerpc*-*-*spe*.
11936 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11938         PR debug/84637
11939         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11940         (stabstr_D): Change type of unum from unsigned int to
11941         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
11942         type.
11944 2018-04-17  Jim Wilson  <jimw@sifive.com>
11946         PR 84856
11947         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11948         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11949         Set arg_pointer_offset after using pretend_args_size.
11951 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11953         PR rtl-optimization/85431
11954         * dse.c (record_store): Ignore zero width stores.
11956         PR sanitizer/85230
11957         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
11958         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11959         __builtin_stack_restore rather than after it.
11960         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11961         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11962         argument instead of virtual_dynamic_stack_rtx.
11964 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11966         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11967         New prototype.
11968         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11969         Add note to error message to explain internal mapping of overloaded
11970         built-in function name to non-overloaded built-in function name.
11971         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11972         function.
11974 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
11976         PR target/85424
11977         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11978         where the inputs overlap with the output.
11980 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11982         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11983         (=v, v) alternative and explicit "memory" attribute.
11984         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
11985         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11986         attributes.
11987         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11988         "sselog1" type instead of "sselog".
11989         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11990         "sselog".  Remove explicit "memory" attribute.
11991         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11992         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11993         attributes.
11994         (vec_extract_hi_v32hi): Merge all alternatives into one, use
11995         "sselog1" type instead of "sselog".  Remove explicit "memory"
11996         attribute.
11997         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11998         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11999         attribute.
12000         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12001         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12002         attributes.
12003         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12004         "sselog1" type instead of "sselog".  Remove explicit "memory"
12005         attribute.
12006         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12007         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12008         attribute.
12010         PR target/85430
12011         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12013         PR middle-end/85414
12014         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12015         on a SUBREG.
12017 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12019         PR ipa/85421
12020         * ipa-cp.c (create_specialized_node): Call
12021         expand_all_artificial_thunks if necessary.
12023 2018-04-17  Martin Liska  <mliska@suse.cz>
12025         PR lto/85405
12026         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12027         in message, remote space in between '_G' and '('.
12029 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12031         PR target/85281
12032         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12033         avx512f_vmcmp<mode>3<round_saeonly_name>,
12034         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12035         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12036         avx512f_rndscale<mode><round_saeonly_name>,
12037         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12038         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12039         Use %<iptr>2 instead of %2 for -masm=intel.
12040         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12041         avx512f_vcvttss2usi<round_saeonly_name>,
12042         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12043         -masm=intel.
12044         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12045         avx512f_vcvttsd2usi<round_saeonly_name>,
12046         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12047         Use %q1 instead of %1 for -masm=intel.
12048         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12049         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12050         of %3 for -masm=intel.
12051         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12052         -masm=intel.
12053         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12054         -masm=intel.
12055         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12056         -masm=intel.
12057         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12058         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12059         %g1.
12060         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12061         -masm=intel.
12062         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12063         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12064         %g1 and one with %0 and %1.
12065         (avx512er_vmrcp28<mode><round_saeonly_name>,
12066         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12067         %1 for -masm=intel.
12068         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12069         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12070         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12071         of %0 and %{%4%} for -masm=intel.
12072         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12073         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12074         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12075         order of %0 and %{%5%}%{z%} for -masm=intel.
12077 2018-04-17  Jan Hubicka  <jh@suse.cz>
12079         PR lto/85405
12080         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12082 2018-04-17  Martin Liska  <mliska@suse.cz>
12084         PR ipa/85329
12085         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12086         for target_clone error message.  Make default implementation
12087         clone to be a local declaration.
12088         (separate_attrs): Add new argument and check for an empty
12089         string.
12090         (expand_target_clones): Handle it.
12091         (ipa_target_clone): Make redirection just for target_clones
12092         functions.
12094 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12095             Tom de Vries  <tom@codesourcery.com>
12097         PR middle-end/84955
12098         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12099         tiled basic blocks without omp continue statements.
12101 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12103         PR target/83660
12104         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12105         vec_extract expression as having side effects to make sure it gets
12106         a cleanup point.
12108 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12110         PR target/85403
12111         * config/i386/i386.c (get_builtin_code_for_version): Check
12112         error_mark_node.
12114 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12116         PR target/84331
12117         * config.gcc: Support "skylake".
12118         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12119         PROCESSOR_SKYLAKE.
12120         * config/i386/i386.c (m_SKYLAKE): Define.
12121         (processor_target_table): Add "skylake".
12122         (ix86_option_override_internal): Add "skylake".
12123         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12124         PROCESSOR_CANNONLAKE.
12125         (get_builtin_code_for_version): Fix priority for
12126         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12127         PROCESSOR_SKYLAKE-AVX512.
12128         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12129         (processor_type): Add PROCESSOR_SKYLAKE.
12131 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12132             Jason Merrill  <jason@redhat.com>
12134         PR c++/85112
12135         * convert.c (convert_to_integer_1): Use direct recursion for
12136         enumeral types and types with a precision less than the number
12137         of bits in their mode.
12139 2018-04-16  Julia Koval  <julia.koval@intel.com>
12141         PR target/84413
12142         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12143         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12145 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12147         PR target/85293
12148         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12149         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12150         and -mno-direct-move.
12152 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12154         PR target/83402
12155         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12156         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12157         Ensure negative shifts result in {0}.
12159 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12161         PR rtl-optimization/79916
12162         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12163         regs (if any) to define how to gnerate SD moves when LRA is in
12164         progress.
12166 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12168         PR rtl-optimization/85393
12169         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12170         * except.c (expand_dw2_landing_pad_for_region): Make static.
12171         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12172         a label and unconditional jump to old_bb, rather than
12173         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12174         basic block.
12176         PR rtl-optimization/85376
12177         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12178         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12179         instead of a specific value.
12181 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12182             Bin Cheng  <bin.cheng@arm.com>
12184         PR tree-optimization/82965
12185         PR tree-optimization/83991
12186         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12187         by_profile_only parameter.
12188         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12189         information if the loop was predicted to iterate too many times.
12190         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12192 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12194         PR lto/71991
12195         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12196         always inline.
12198 2018-04-13  Martin Liska  <mliska@suse.cz>
12199             Jakub Jelinek  <jakub@redhat.com>
12201         PR middle-end/81657
12202         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12203         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12204         * builtins.c (expand_builtin_memory_copy_args): Use
12205         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12206         handle dest_addr == pc_rtx.
12208 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12210         PR target/85291
12211         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12212         asked to not generate direct moves.
12213         (fix_trunc<mode>si2_stfiwx): Similar.
12214         (fix_trunc<mode>si2_internal): Similar.
12216 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12218         PR debug/83157
12219         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12220         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12221         lookup if dest in some wider mode is known to be const0_rtx and
12222         if so, record permanent equivalence for it to be ZERO_EXTEND of
12223         the narrower mode destination.
12225 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12227         * lto-streamer-out.c (output_function): Revert 259346.
12228         * omp-expand.c (expand_oacc_for): Likewise.
12230 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12232         PR rtl-optimization/85354
12233         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12234         * sel-sched.c (sel_global_init): ... here.
12236 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12238         PR target/85238
12239         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12240         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12241         mode for PE-COFF targets.
12242         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12243         (i386_pe_asm_lto_end): Likewise.
12244         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12245         (TARGET_ASM_LTO_END): Likewise.
12246         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12247         (i386_pe_asm_lto_start): New function.
12248         (i386_pe_asm_lto_end): Likewise.
12250 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12251             Richard Biener  <rguenther@suse.de>
12253         PR middle-end/84955
12254         * lto-streamer-out.c (output_function): Fix CFG loop state before
12255         streaming out.
12256         * omp-expand.c (expand_oacc_for): Handle calls to internal
12257         functions like regular functions.
12259 2018-04-12  Richard Biener  <rguenther@suse.de>
12261         PR lto/85371
12262         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12263         for the early LTO debug to properly generate references to it
12264         during DIE emission.  Do not re-use that for the skeleton for
12265         split-dwarf.
12266         (dwarf2out_early_finish): Likewise.
12268 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12270         PR target/85328
12271         * config/i386/sse.md
12272         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12273         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12274         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12275         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12276         and output is a reg, avoid creating invalid lowpart subreg, but
12277         instead split into a 512-bit move.  Don't split if not AVX512VL,
12278         input is xmm16+ reg and output is a mem.
12279         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12280         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12281         xmm16+ reg and output is a mem.
12283 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12285         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12286         also for flag_dwarf2_cfi_asm.
12288 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12290         PR rtl-optimization/85342
12291         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12292         a bool scalar var inside of the loop instead.  Don't try to update
12293         recog_data.operand after failed apply_change_group.
12295 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12297         PR target/85296
12298         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12299         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12300         array with flexible array member as array without given dimension.
12301         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12302         argument for undefined param to true.
12304 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12306         PR target/85321
12307         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12308         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12309         from PowerPC section.
12310         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12311         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12312         help text that is too long.
12313         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12314         help text that is too long.
12315         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12316         help text that is too long.
12318 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12320         * config/alpha/alpha.md (stack_probe_internal): Rename
12321         from "probe_stack".  Update all callers.
12323 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12325         PR rtl-optimization/84566
12326         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12327         sched_macro_fuse_insns.
12329 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12331         PR target/84301
12332         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12333         (compute_block_dependences): ... from here.
12335 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12337         PR tree-optimization/85331
12338         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12339         from int to HOST_WIDE_INT.
12341 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12343         PR ipa/84149
12344         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12345         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12346         not the same as the source val.
12347         (cgraph_edge_brings_value_p): New parameter.
12348         (gather_edges_for_value): Pass destination value to
12349         cgraph_edge_brings_value_p.
12350         (perhaps_add_new_callers): Likewise.
12351         (get_info_about_necessary_edges): Likewise and exclude values brought
12352         only by self-recursive edges.
12353         (create_specialized_node): Redirect only clones of self-calling edges.
12354         (+self_recursive_pass_through_p): New function.
12355         (find_more_scalar_values_for_callers_subset): Use it.
12356         (find_aggregate_values_for_callers_subset): Likewise.
12357         (known_aggs_to_agg_replacement_list): Removed.
12358         (decide_whether_version_node): Re-calculate known constants for all
12359         remaining context clones.
12361 2018-04-11  Richard Biener  <rguenther@suse.de>
12363         PR lto/85339
12364         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12365         from early DWARF output.
12366         (dwarf2out_early_finish): Output line info unconditionally into
12367         early DWARF and add reference to it.
12369 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12371         PR target/85281
12372         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12373         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12374         other than V2DFmode using iptr mode attribute.
12375         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12377 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12379         PR rtl-optimization/84659
12380         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12382 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12384         PR debug/85302
12385         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12386         SIZEP is NULL.
12387         (output_loc_list): Pass address of a dummy size variable even in the
12388         locview handling loop.
12389         (index_location_lists): Add comment on why skip_loc_list_entry can't
12390         call size_of_locs.
12392 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12394         PR target/85261
12395         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12396         into register.
12398 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12400         PR target/85321
12401         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12402         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12403         and -mstring-compare-inline-limit.
12405 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12407         PR target/85287
12408         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12409         for stack clash protection in a register whenever we need it to be in
12410         a register.
12412 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12414         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12415         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12417 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12419         PR target/85321
12420         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12421         the help text.
12422         (mlong-double-): Ditto.
12423         * config/rs6000/sysv4.opt (msdata=): Ditto.
12424         (mtls-size=): Ditto.
12426 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12428         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12429         erroneous entries for
12430         "vector int vec_ldl (int, long int *)", and
12431         "vector unsigned int vec_ldl (int, unsigned long int *)".
12432         Add comments and entries for
12433         "vector bool char vec_ldl (int, bool char *)",
12434         "vector bool short vec_ldl (int, bool short *)",
12435         "vector bool int vec_ldl (int, bool int *)",
12436         "vector bool long long vec_ldl (int, bool long long *)",
12437         "vector pixel vec_ldl (int, pixel *)",
12438         "vector long long vec_ldl (int, long long *)",
12439         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12440         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12441         type tree bool_long_long_type_node and correct definition of
12442         bool_V2DI_type_node to make reference to this new type tree.
12443         (rs6000_mangle_type): Replace erroneous reference to
12444         bool_long_type_node with bool_long_long_type_node.
12445         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12446         comments to emphasize sign distinctions for char and int types and
12447         replace RS6000_BTI_bool_long constant with
12448         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12449         use of RS6000_BTI_pixel.
12450         (bool_long_type_node): Remove this macro definition.
12451         (bool_long_long_type_node): New macro definition
12453 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12455         PR rtl-optimization/85300
12456         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12457         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12458         simplify_unary_operation fails.
12460 2018-04-10  Martin Liska  <mliska@suse.cz>
12462         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12463         cgraph_edge and ipa_ref.
12465 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12467         PR target/85177
12468         PR target/85255
12469         * config/i386/sse.md
12470         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12471         computation of the VEC_MERGE selector from mask.
12472         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12473         Fix decoding of the VEC_MERGE selector into mask.
12475 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12477         PR tree-optimization/85286
12478         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12480 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12482         * final.c (final_1): Set insn_last_address as well as
12483         insn_current_address.
12485 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12487         PR target/85173
12488         * explow.c (emit_stack_probe): Call validize_mem on memory location
12489         before passing it to gen_probe_stack.  Create address operand and
12490         legitimize it for the probe_stack_address case.
12492 2018-04-09  Jan Hubicka  <jh@suse.cz>
12494         PR lto/85078
12495         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12496         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12497         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12498         walk basetypes.
12499         (free_lang_data): Rebuild type inheritance graph.
12501 2018-04-09  Martin Sebor  <msebor@redhat.com>
12503         * invoke.texi (-finline-small-functions): Mention other optimization
12504         options.
12505         (-findirect-inlining, -fpartial-inlining): Same.
12506         (-finline-functions-called-once): Same.
12507         (-freorder-blocks-and-partition): Same.
12509 2018-04-09  Jan Hubicka  <jh@suse.cz>
12511         PR rtl/84058
12512         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12513         jumps; choose last target that matches the criteria (i.e.
12514         no partition changes for non-crossing jumps).
12515         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12516         support for redirecting crossing jumps to non-crossing.
12518 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12520         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12521         also for naked functions.
12523 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12525         * config/arc/arc.md (add_shift): New pattern.
12526         (add_shift2): Likewise.
12527         (sub_shift): Likewise.
12528         (sub_shift_cmp0_noout): Likewise.
12529         (compare_si_ashiftsi): Likewise.
12530         (xbfu_cmp0_noout): New combine pattern.
12531         (xbfu_cmp0"): Likewise.
12532         (movsi_set_cc_insn): Place the predicable variant first.
12533         (commutative_binary_cmp0_noout): Remove clobber.
12534         (commutative_binary_cmp0): New pattern.
12535         (noncommutative_binary_cmp0): Likewise.
12536         (noncommutative_binary_cmp0_noout): Likewise.
12537         (noncommutative_binary_comparison_result_used): Removed.
12538         (rsub_cmp0): New pattern.
12539         (rsub_cmp0_noout): Likewise.
12540         (extzvsi): Changed, keep only meaningful variants.
12541         (SQH, SEZ): New iterators.
12542         (SQH_postfix): New mode attribute.
12543         (SEZ_prefix): New code attribute.
12544         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12545         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12546         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12547         of numerical value.
12548         (noncommutative_operator): Check the availability of barrel
12549         shifter option.
12551 2018-04-09  Richard Biener  <rguenther@suse.de>
12553         PR tree-optimization/85284
12554         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12555         Only use the niter constraining form of simple_iv when the exit
12556         is always executed.
12558 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12560         PR target/84041
12561         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12562         (define_expand "*memory_barrier"): New define_expand.
12563         (define_insn "memory_barrier"): New insn.
12565 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12567         PR rtl-optimization/80463
12568         PR rtl-optimization/83972
12569         PR rtl-optimization/83480
12571         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12572         correct producer for the insn.
12573         (tidy_control_flow): Fixup seqnos in case of debug insns.
12575 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12577         PR rtl-optimization/83913
12579         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12580         different sched-times when merging exprs.
12582 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12584         PR rtl-optimization/83962
12586         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12587         tidy_fallthru_edge and tidy_control_flow.
12589 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12591         PR rtl-optimization/83530
12593         * sel-sched.c (force_next_insn): New global variable.
12594         (remove_insn_for_debug): When force_next_insn is true, also leave only
12595         next insn in the ready list.
12596         (sel_sched_region): When the region wasn't scheduled, make another pass
12597         over it with force_next_insn set to 1.
12599 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12601         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12602         into tm_file.
12603         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12604         for interrupt control.
12605         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12606         functions for interrupt control.
12607         * config/nds32/nds32-intrinsic.md: Likewise.
12608         * config/nds32/nds32_intrinsic.h: Likewise.
12609         * config/nds32/nds32.h (nds32_builtins): Likewise.
12611 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12613         * config/nds32/nds32.c (nds32_init_machine_status,
12614         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12615         strict_aligned_p field.
12616         (nds32_expand_to_rtl_hook): New function.
12617         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12618         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12620 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12621             Chung-Ju Wu  <jasonwucj@gmail.com>
12623         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12624         * config/nds32/nds32-n7.md: New file.
12625         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12626         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12627         pipeline.
12628         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12629         * config/nds32/nds32.md (pipeline_model): Add n7.
12630         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12631         * config/nds32/pipelines.md: Include n7 settings.
12633 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12634             Chung-Ju Wu  <jasonwucj@gmail.com>
12636         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12637         * config/nds32/nds32-e8.md: New file.
12638         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12639         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12640         pipeline.
12641         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12642         * config/nds32/nds32.md (pipeline_model): Add e8.
12643         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12644         * config/nds32/pipelines.md: Include e8 settings.
12646 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12647             Chung-Ju Wu  <jasonwucj@gmail.com>
12649         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12650         * config/nds32/nds32-n8.md: New file.
12651         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12652         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12653         pipeline.
12654         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12655         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12656         * config/nds32/nds32.md (pipeline_model): Add n8.
12657         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12658         * config/nds32/pipelines.md: Include n8 settings.
12660 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12661             Chung-Ju Wu  <jasonwucj@gmail.com>
12663         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12664         * config/nds32/nds32-n9-2r1w.md: New file.
12665         * config/nds32/nds32-n9-3r2w.md: New file.
12666         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12667         nds32_register_ports): New or modify for cpu n9.
12668         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12669         pipeline.
12670         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12671         * config/nds32/nds32-utils.c: New file.
12672         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12673         TARGET_MUL_SLOW): Define.
12674         * config/nds32/nds32.md (pipeline_model): New attribute.
12675         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12676         New options that support cpu n9.
12677         * config/nds32/pipelines.md: Include n9 settings.
12678         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12680 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12682         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12683         information if necessary.
12684         (output_cond_branch_compare_zero): Likewise.
12685         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12686         (nds32_target_alignment): Refine for alignment.
12687         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12688         (FUNCTION_BOUNDARY): Modify.
12689         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12690         align case.
12691         * config/nds32/nds32.opt (malways-align, malign-functions): New.
12693 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12695         * config/nds32/constants.md (unspec_volatile_element): Add values for
12696         TLB operation and data prefetch.
12697         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12698         functions for TLB operation and data prefetch.
12699         * config/nds32/nds32-intrinsic.md: Likewise.
12700         * config/nds32/nds32_intrinsic.h: Likewise.
12701         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12702         (nds32_print_operand): Likewise.
12703         * config/nds32/nds32.h (nds32_builtins): Likewise.
12705 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
12706         Andrew Pinski <pinsika@gcc.gnu.org>
12708         PR middle-end/82976
12709         * match.pd: Use constant_boolean_node of correct type instead of
12710         boolean_true_node or boolean_false_node for simplifying
12711         pointer comparisons to zero.
12713 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12715         PR tree-optimization/80021
12716         * tree.c (verify_type_variant): Make error call in verify_variant_match
12717         translatable and remove final full stop.
12719 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12721         * config/nds32/constants.md (unspec_volatile_element): Add
12722         UNSPEC_VOLATILE_EH_RETURN.
12723         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12724         nds32_output_stack_pop): Support dwarf exception handling process.
12725         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12726         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12727         exception handling process.
12728         (nds32_compute_stack_frame): Likewise.
12729         (nds32_return_addr_rtx): Likewise.
12730         (nds32_initial_elimination_offset): Likewise.
12731         (nds32_expand_prologue): Likewise.
12732         (nds32_expand_epilogue): Likewise.
12733         (nds32_dynamic_chain_address): New function.
12734         * config/nds32/nds32.h (machine_function): Add fields for dwarf
12735         exception handling.
12736         (DYNAMIC_CHAIN_ADDRESS): Define.
12737         (EH_RETURN_DATA_REGNO): Define.
12738         (EH_RETURN_STACKADJ_RTX): Define.
12739         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12740         patterns for dwarf exception handling.
12742 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12744         * config/nds32/nds32.h: Clean up obsolete macros.
12746 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12748         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12749         Add enum values for particular instructions.
12750         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12751         particular intrinsic functions.
12752         * config/nds32/nds32-intrinsic.md: Likewise.
12753         * config/nds32/nds32_intrinsic.h: Likewise.
12754         * config/nds32/nds32.h (nds32_builtins): Likewise.
12755         * config/nds32/nds32.md (type): Add pbsad and pbsada.
12756         (btst, ave): New patterns for particular instructions.
12758 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12760         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12761         Add enum values for atomic load/store and memory sync.
12762         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12763         and memory sync.
12764         * config/nds32/nds32-intrinsic.md: Likewise.
12765         * config/nds32/nds32_intrinsic.h: Likewise.
12766         * config/nds32/nds32.h (nds32_builtins): Likewise.
12768 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12770         PR tree-optimization/85257
12771         * fold-const.c (native_encode_vector): If not all elts could fit
12772         and off is -1, return 0 rather than offset.
12773         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12774         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12775         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
12776         adjust buffer in native_interpret_expr call.
12778 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12780         * config/nds32/constants.md (unspec_volatile_element): Add cache
12781         control enum values.
12782         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12783         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12784         * config/nds32/nds32.c (nds32_cctl_names): New.
12785         (nds32_print_operand): Handle cache control register names.
12786         * config/nds32/nds32.h (nds32_builtins): New enum values.
12787         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12788         macros.
12789         * config/nds32/nds32.md (type): Add mmu.
12790         * config/nds32/pipelines.md (simple_insn): Add mmu.
12792 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12794         * config/nds32/nds32.md (type): Remove call.
12795         * config/nds32/pipelines.md (simple_insn): Likewise.
12797 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12799         * config/nds32/constants.md (unspec_volatile_element): Add
12800         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12801         UNSPEC_VOLATILE_FMFCFG.
12802         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12803         description for fmfcfg and fmfcsr.
12804         (bdesc_1arg): Add fmtcsr.
12805         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12806         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12807         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12808         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12809         unspec_fmfcfg): New patterns.
12810         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12811         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12812         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12813         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12814         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12815         __nds32__fmfcfg): Define.
12817 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12819         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12820         intrinsic register names.
12821         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12822         intrinsic register enum values and macros.
12824 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12826         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12827         for load/store addressing form.
12828         (nds32_print_operand_address): Likewise.
12830 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
12832         PR target/85196
12833         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12834         based on LABEL_REF.  Remove useless assertion.
12835         (pic_address_needs_scratch): Fix formatting.
12836         (sparc_legitimize_pic_address): Minor tweaks.
12837         (sparc_delegitimize_address): Adjust assertion accordingly.
12838         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12839         into symbolic_operand.
12840         (movsi_high_pic_label_ref): Likewise.
12841         (movsi_lo_sum_pic_label_ref): Likewise.
12842         (movdi_pic_label_ref): Likewise.
12843         (movdi_high_pic_label_ref): Likewise.
12844         (movdi_lo_sum_pic_label_ref): Likewise.
12846 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
12848         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12849         custom LIB_SPEC setup.
12851 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
12852             Kito Cheng  <kito.cheng@gmail.com>
12854         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12855         * config/riscv/freebsd.h: New.
12857 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12859         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12860         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12861         file.
12863 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12864             Kito Cheng  <kito.cheng@gmail.com>
12866         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12867         nds32_output_call, nds32_symbol_binds_local_p): New functions.
12868         * config/nds32/nds32-protos.h (nds32_output_call,
12869         nds32_output_return): Declare.
12870         * config/nds32/nds32.md: Refine all the call and return patterns.
12872 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12874         PR debug/85252
12875         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12876         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12878         PR rtl-optimization/84872
12879         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12880         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12881         EDGE_CROSSING edge.
12883 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
12885         * expr.c (copy_blkmode_to_reg): Revert 254862.
12886         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12888 2018-04-06  Richard Biener  <rguenther@suse.de>
12890         PR middle-end/85244
12891         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12892         after seeing a component reference with an adjacent field.  Treat
12893         refs to arrays at struct end of external decls similar to
12894         refs to unconstrained commons.
12896 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12898         PR sanitizer/85213
12899         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12900         look through SAVE_EXPRs with non-side-effects argument.  Adjust
12901         recursive calls.
12902         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12903         save_p here.
12905 2018-04-06  Richard Biener  <rguenther@suse.de>
12907         PR middle-end/85180
12908         * alias.c (find_base_term): New wrapper around find_base_term
12909         unwinding CSELIB_VAL_PTR changes.
12910         (find_base_term): Do not restore CSELIB_VAL_PTR during the
12911         recursion.
12913 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12915         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12916         instructions.
12917         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12918         constant definitions.
12919         ("nop"): lr 0,0 -> nopr r0
12920         ("nop_lr0", "nop_lr1"): New insn definitions.
12922 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12924         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12925         NDS32_V3PUSH_AVAILABLE_P macro.
12927 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
12928             Chung-Ju Wu  <jasonwucj@gmail.com>
12930         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12931         (nds32*-*-*): Add float and fpu_config into supported_defaults.
12932         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12933         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12934         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12935         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12936         * config/nds32/constraints.md: New constraints and checking for hard
12937         float configuration.
12938         * config/nds32/iterators.md: New mode iterator and attribute for hard
12939         float configuration.
12940         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12941         patterns.
12942         * config/nds32/nds32-fpu.md: New file.
12943         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12944         deal with hard float code generation.
12945         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12946         ARCH_V3S.
12947         (abi_type, float_reg_number): New enum type.
12948         * config/nds32/nds32-predicates.c: New predicates for hard float.
12949         * config/nds32/nds32-protos.h: Declare functions for hard float.
12950         * config/nds32/nds32.c: Implementation for hard float configuration.
12951         * config/nds32/nds32.h: Definitions for hard float configuration.
12952         * config/nds32/nds32.md: Include hard float machine description and
12953         modify patterns for hard float configuration.
12954         * config/nds32/nds32.opt: New options for hard float configuration.
12955         * config/nds32/predicates.md: New predicates for hard float
12956         configuration.
12958 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12960         * common/config/nds32/nds32-common.c
12961         (nds32_option_optimization_table): Enable -mreleax-hint by default.
12963 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
12965         PR middle-end/85195
12966         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12967         CONSTRUCTOR_ELT (ctor, ...)->value.
12969 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
12971         PR target/85193
12972         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12974 2018-04-05  Tom de Vries  <tom@codesourcery.com>
12976         PR target/85204
12977         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12978         cond jump.
12980 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12981             Kito Cheng  <kito.cheng@gmail.com>
12983         * config/nds32/constraints.md (U33): Fine-tune checking condition.
12984         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12985         * config/nds32/nds32.h (nds32_16bit_address_type): Add
12986         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12988 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12989             Kito Cheng  <kito.cheng@gmail.com>
12991         * config/nds32/constraints.md (Ufe): New memory constraint.
12992         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12993         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12994         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12995         operands.
12996         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12997         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12999 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13001         * config/nds32/nds32.md: Use optimize_size in the condition for
13002         alu-shift instructions.
13004 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13006         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13008 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13010         * config/nds32/nds32.md (negsi2): Refine pattern.
13012 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13013             Chung-Ju Wu  <jasonwucj@gmail.com>
13015         * config/nds32/iterators.md (shift_rotate): New code iterator.
13016         (shift): New code attribute.
13017         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13018         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13019         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13020         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13021         bit-wise operations.
13022         (andsi3, *andsi3): Ditto.
13023         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13024         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13025         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13026         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13027         nds32_ior_operand, nds32_xor_operand): New predicates.
13029 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13031         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13032         (addsi3, subsi3): ... this.
13034 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13036         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13038 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13040         * config/nds32/nds32.md: Adjust indention.
13042 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13044         * config/nds32/nds32.md (feature): New attribute.
13046 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13048         * config/nds32/nds32.md (subtype): New attribute.
13050 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13052         PR target/85203
13053         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13054         expansion to perform a bitwise AND of the argument followed by a
13055         boolean negation of the result.
13057 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13059         PR rtl-optimization/84878
13060         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13061         the basic block.  Assert the use reference is not artificial and that
13062         it has an associated insn.
13064 2018-04-04  Michael Matz  <matz@suse.de>
13066         * builtins.c (compute_objsize): Pass correct operand
13067         to array_at_struct_end_p.
13069 2018-04-04  Richard Biener  <rguenther@suse.de>
13071         PR lto/85176
13072         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13073         from contexts for DINFO_LEVEL_TERSE and below.
13075 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13077         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13078         resiter_operand condition.
13079         * config/nds32/nds32.md (*move<mode>): Ditto.
13081 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13082             Monk Chiang  <sh.chiang04@gmail.com>
13084         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13086 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13088         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13090 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13091             Kito Cheng  <kito.cheng@gmail.com>
13093         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13094         nds32_cond_code_str, output_cond_branch,
13095         output_cond_branch_compare_zero, nds32_expand_cbranch,
13096         nds32_expand_cstore, nds32_expand_movcc,
13097         nds32_output_cbranchsi4_equality_zero,
13098         nds32_output_cbranchsi4_equality_reg,
13099         nds32_output_cbranchsi4_equality_reg_or_const_int,
13100         nds32_output_cbranchsi4_greater_less_zero: New functions.
13101         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13102         nds32_expand_cstore, nds32_expand_movcc,
13103         nds32_output_cbranchsi4_equality_zero,
13104         nds32_output_cbranchsi4_equality_reg,
13105         nds32_output_cbranchsi4_equality_reg_or_const_int,
13106         nds32_output_cbranchsi4_greater_less_zero): Declare.
13107         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13108         nds32_rimm11s_operand): New predicates.
13109         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13110         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13111         patterns.
13113 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13115         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13116         * config/nds32/nds32.md: Ditto.
13117         * config/nds32/pipelines.md: Ditto.
13119 2018-04-04  Richard Biener  <rguenther@suse.de>
13121         PR tree-optimization/85168
13122         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13123         propagating abnormals.
13125 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13127         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13129 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13130             Kito Cheng  <kito.cheng@gmail.com>
13132         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13133         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13134         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13135         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13136         * config/nds32/nds32.md (sibcall_internal): New.
13137         (sibcall_register): Remove.
13138         (sibcall_immediate): Remove.
13139         (sibcall_value_internal): New.
13140         (sibcall_value_register): Remove.
13141         (sibcall_value_immediate): Remove.
13142         * config/nds32/predicates.md (nds32_general_register_operand): New.
13143         (nds32_call_address_operand): New.
13145 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13147         PR rtl-optimization/85167
13148         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13149         bb_defs if *split_p, instead preinitialize it to NULL.
13151         PR tree-optimization/85156
13152         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13153         evaluating the argument multiple times.
13155 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13157         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13158         than vector.
13159         (_mm_cvtpd_ps): Likewise.
13160         (_mm_cvttpd_epi32): Likewise.
13161         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13162         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13163         vector, pixel, and bool following altivec.h include.
13165 2018-04-03  Martin Sebor  <msebor@redhat.com>
13167         * doc/extend.texi (Common Function Attributes): Clarify.
13168         (const attribute): Likewise.
13169         (pure attribute): Likewise.
13171 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13173         PR target/85169
13174         * config/i386/i386.c (ix86_expand_vector_set): Use
13175         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13177 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13179         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13180         instructions when changing rounding bits to preserve precision bits
13181         in the x87 control word.
13183 2018-04-03  Martin Liska  <mliska@suse.cz>
13185         PR tree-optimization/82491
13186         * rtl.h (strip_offset_and_add): Replace += suboffset with
13187         poly_uint64 () + suboffset.
13189 2018-03-29  Martin Liska  <mliska@suse.cz>
13190             Martin Jambor  <mjambor@suse.cz>
13192         PR ipa/84947
13193         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13194         param_type is not an integral or pointer type.
13196 2018-04-03  Richard Biener  <rguenther@suse.de>
13198         * sese.h (recompute_all_dominators): Remove.
13200 2018-04-02  Martin Sebor  <msebor@redhat.com>
13202         * doc/invoke.texi (-Wrestrict): Fix typos.
13204 2018-04-02  Jim Wilson  <jimw@sifive.com>
13206         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13207         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13208         (<optab>di3, <optab>si3_extend): Likewise.
13209         (<optab>si3_mask, <optab>si3_mask_1): New.
13210         (<optab>di3_mask, <optab>di3_mask_1): New.
13211         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13212         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13213         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13215 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13217         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13218         example.
13220 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13222         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13223         (nds32_canonicalize_comparison): New function.
13225 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13226             Kito Cheng  <kito.cheng@gmail.com>
13227             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13229         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13230         * config/nds32/constants.md (unspec_volatile_element): Add
13231         UNSPEC_VOLATILE_RELAX_GROUP.
13232         * config/nds32/nds32-relax-opt.c: New file.
13233         * config/nds32/nds32-predicates.c
13234         (nds32_symbol_load_store_p): New function.
13235         * config/nds32/nds32-protos.h
13236         (nds32_symbol_load_store_p): Declare function.
13237         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13238         * config/nds32/nds32.c
13239         (nds32_register_pass): New function to register pass.
13240         (nds32_register_passes): New function to register passes.
13241         * config/nds32/nds32.md (relax_group): New pattern.
13242         * config/nds32/nds32.opt (mrelax-hint): New option.
13243         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13245 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13247         * config/nds32/t-nds32: Modify files dependency.
13249 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13251         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13252         (PROFILE_HOOK): Define its implementation.
13254 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13256         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13257         type and 32-bit size.
13259 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13261         PR middle-end/85090
13262         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13263         (V_128_256): New mode iterator.
13264         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13265         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13266         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13267         of V.
13268         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13269         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13271 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13273         PR target/83315
13274         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13275         NaN inputs correctly.
13277 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13279         PR target/80546
13280         * config/rs6000/vsx.md (??r): New mode attribute.
13281         (*vsx_mov<mode>_64bit): Use it.
13282         (*vsx_mov<mode>_32bit): Likewise.
13284 2018-03-30  Martin Sebor  <msebor@redhat.com>
13286         PR tree-optimization/84818
13287         * builtins.c (check_access): Use warning_n.
13289 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13291         PR target/83822
13292         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13293         condition.
13294         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13295         condition.
13297 2018-03-30  Julia Koval  <julia.koval@intel.com>
13299         PR target/84413
13300         * x86-tune.def (movx, partial_reg_dependency): Enable for
13301         m_SKYLAKE_AVX512.
13303 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13305         PR inline-asm/84985
13306         * lra-constraints.c (process_alt_operands): Move setting
13307         this_alternative_matches below.
13309 2018-03-29  Martin Liska  <mliska@suse.cz>
13311         PR lto/84995.
13312         * doc/invoke.texi: Document how LTO works with debug info.
13313         Describe auto-load support of binutils.  Mention 'x86-64'
13314         as valid option value of -march option.
13316 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13318         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13320         PR c/85094
13321         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13322         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13323         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13324         checking.
13326 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13328         PR target/84912
13329         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13330         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13331         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13332         for RS6000_BTM_POWERPC64.
13333         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13334         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13335         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13336         definition.
13337         (DIVDE): Use it.
13338         (DIVDEU): Likewise.
13340 2018-03-28 Carl Love  <cel@us.ibm.com>
13342         Revert
13343         2017-09-27  Carl Love  <cel@us.ibm.com>
13345         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13346         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13347         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13348         fctiw instruction.
13350 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13352         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13353         instead of __vector bool.
13354         (_mm_max_pu8): Likewise.
13355         (_mm_min_pi16): Likewise.
13357 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13359         PR target/84912
13360         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13361         (DIVWEUO): Likewise.
13362         (DIVDEO): Likewise.
13363         (DIVDEUO): Likewise.
13364         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13365         DIVWEUO and DIVDEUO.
13366         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13367         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13368         (div_extend): Likewise.
13369         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13370         builtin function.
13371         (__builtin_divweuo): Likewise.
13372         (__builtin_divdeo): Likewise.
13373         (__builtin_divdeuo): Likewise.
13375 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13377         PR target/85095
13378         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13379         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13381         PR tree-optimization/82004
13382         * gimple-match-head.c (optimize_pow_to_exp): New function.
13383         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13384         Don't fold to exp if optimize_pow_to_exp is false.
13386 2018-03-28  Martin Liska  <mliska@suse.cz>
13388         PR other/84819
13389         * calls.c (initialize_argument_information): Fix trailing space.
13390         * common.opt: Fix typo and provide better explanation for
13391         -fsanitize-coverage option.
13392         * config/i386/i386.opt: Fix typo.
13394 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13395             Martin Liska  <mliska@suse.cz>
13397         PR sanitizer/85081
13398         * gimplify.c (asan_poison_variable): Don't do the check for
13399         gimplify_omp_ctxp here.
13400         (gimplify_decl_expr): Do it here.
13401         (gimplify_target_expr): Likewise.
13403 2018-03-28  Martin Liska  <mliska@suse.cz>
13405         PR target/84988
13406         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13407         chkp_type_bounds_count if MPX is not enabled.
13409 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13411         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13413 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13415         PR target/84914
13416         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13417         function to create the function decl for complex long double
13418         multiply and divide for -mabi=ieeelongdouble.
13419         (init_float128_ieee): Call it.
13421 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13423         PR target/85044
13424         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13425         -fcf-protection=branch -mibt.
13426         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13428 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13430         PR target/81863
13431         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13432         arm_word_relocations.
13434 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13436         PR target/85056
13437         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13438         extern array declarations.
13440 2018-03-27  Richard Biener  <rguenther@suse.de>
13442         PR middle-end/84067
13443         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13444         explicit single_use checks.
13446 2018-03-27  Richard Biener  <rguenther@suse.de>
13448         PR tree-optimization/85082
13449         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13450         Valueize the VUSE.
13452 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13454         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13455         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13456         Turn on fasynchronous-unwind-tables and funwind-tables.
13458 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13460         PR target/85073
13461         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13462         (*bmi_blsr_<mode>_ccz): Ditto.
13464 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13466         PR tree-optimization/85063
13467         * omp-general.c (offloading_function_p): New function.  Factor out
13468         of ...
13469         * omp-offload.c (pass_omp_target_link::gate): ... here.
13470         * omp-general.h (offloading_function_p): Declare.
13471         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13472         with attribute omp declare target for offloading functions.
13474 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13476         PR tree-optimization/84005
13477         * tree-data-ref.h (get_base_for_alignment): Declare.
13478         * tree-data-ref.c (get_base_for_alignment_1): New function.
13479         (get_base_for_alignment): Likewise.
13480         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13481         get_base_for_alignment to find a suitable base object, instead
13482         of always using drb->base_address.
13484 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13486         PR inline-asm/85022
13487         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13488         known size by default.
13490 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13492         PR inline-asm/85030
13493         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13494         and non BLKmode operands.
13496 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13498         PR target/85026
13499         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13500         Clean up attributes.
13502 2018-03-23  Richard Biener  <rguenther@suse.de>
13504         PR debug/85020
13505         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13506         we are going to emit early debug for LTO.
13508 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13510         PR inline-asm/85034
13511         * function.c (match_asm_constraints_1): Don't optimize if input
13512         doesn't satisfy general_operand predicate for output's mode.
13514         PR inline-asm/85022
13515         * alias.c (write_dependence_p): Don't require for x_canonicalized
13516         non-VOIDmode if x has VOIDmode.
13518         PR sanitizer/85029
13519         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13520         just don't try to optimize it rather than assert it never happens.
13522 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13524         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13525         macro expansions for definition of ST_INTERNAL_<mode> and
13526         LD_INTERNAL_<mode> builtins.
13527         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13528         Remove prototype.
13529         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13530         function.
13531         (altivec_expand_st_builtin): Likewise.
13532         (altivec_expand_builtin): Remove calls to deleted functions.
13533         (rs6000_address_for_altivec): Delete this function.
13534         * config/rs6000/vector.md: Remove expands for
13535         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13537 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13539         PR target/84826
13540         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13541         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13542         re-computing once computed.
13543         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13544         (arm_init_machine_status): Initialize
13545         machine->static_chain_stack_bytes.
13547 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13549         PR target/84760
13550         * doc/extend.texi: Add four new prototypes for vec_ld.
13551         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13552         definitions for more logical presentation.
13553         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13554         entries for V1TI variants of __builtin_altivec_ld builtin.
13555         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13556         handling of V1TI variant of LVX icode pattern.
13557         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13558         (rs6000_gimple_fold_builtin): Likewise.
13559         (altivec_init_builtins): Add code to define
13560         __builtin_altivec_lvx_v1ti function.
13562 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13564         PR inline-asm/84941
13565         * function.c (match_asm_constraints_1): Don't do the optimization
13566         if input isn't a REG, SUBREG, MEM or constant.
13568 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13570         PR tree-optimization/84956
13571         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13572         bb_has_abnormal_pred.
13574 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13576         PR sanitizer/85018
13577         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13578         DECL_INITIAL (decl) to decl at the end.
13579         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13580         adjust the comment.
13582 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13584         * doc/extend.texi (__builtin_tgmath): Document when complex
13585         integer types are treated as _Complex _Float64.
13587 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13589         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13591 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13593         PR tree-optimization/84960
13594         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13595         if it is ENTRY block, move them into single succ of ENTRY in that case.
13597 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13599         PR tree-optimization/84811
13600         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13601         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13602         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13603         (known_subrange_p): Update accordingly.  Cast each value involved
13604         in the size comparison, rather than casting the result of the
13605         subtraction.
13607 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13609         PR tree-optimization/84982
13610         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13611         by flipping the least significant bit rather than all bits from
13612         bitpos to bitpos + bitsize - 1.
13614 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13616         * doc/extend.texi (Deprecated Features): Remove mention of
13617         long-deleted deprecations.
13619 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13621         PR jit/84288
13622         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13623         * configure: Regenerate.
13625 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13627         PR tree-optimization/83126
13628         * tree-parloops.c (num_phis): New function.
13629         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13631 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13633         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13634         mention anon-struct/union members and trailing attributes.
13636 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13638         PR tree-optimization/84969
13639         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13640         builtin memset partitions if they set different rhs values.
13642 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13644         PR rtl-optimization/84989
13645         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13646         VEC_DUPLICATE with scalar result mode.
13648 2018-03-21  Martin Liska  <mliska@suse.cz>
13650         PR ipa/84963
13651         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13652         not intended return statement.
13654 2018-03-21  Martin Liska  <mliska@suse.cz>
13656         PR target/84988
13657         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13658         (chkp_find_bound_slots_1): Limit number of iterations.
13660 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
13662         PR target/84838
13663         * Minor grammar fixes for x86 options.
13665 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13667         PR debug/84875
13668         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13669         holding REG_CFA_RESTORE notes, instead turn them into a USE.
13671 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
13673         PR target/83789
13674         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13675         (altivec_lvx_<mode>_1op): Likewise.
13676         (altivec_stvx_<mode>_2op): Likewise.
13677         (altivec_stvx_<mode>_1op): Likewise.
13678         (altivec_lvx_<VM2:mode>): New define_expand.
13679         (altivec_stvx_<VM2:mode>): Likewise.
13680         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13681         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13682         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13683         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13684         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13685         (rs6000_gen_lvx): Likewise.
13686         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13687         (altivec_expand_stv_builtin): Likewise.
13688         (altivec_expand_builtin): Likewise.
13689         * config/rs6000/vector.md: Likewise.
13691 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13693         PR target/82518
13694         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13695         BYTES_BIG_ENDIAN.
13697 2018-03-20  Richard Biener  <rguenther@suse.de>
13699         PR target/84986
13700         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13701         sign-conversions as zero, fall back to standard scalar_stmt
13702         cost for the rest.
13704 2018-03-20  Martin Liska  <mliska@suse.cz>
13706         PR ipa/84825
13707         * predict.c (rebuild_frequencies): Handle case when we have
13708         PROFILE_ABSENT, but flag_guess_branch_prob is false.
13710 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13712         PR target/84990
13713         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13714         flag_section_anchors.
13715         * varasm.c (use_blocks_for_decl_p): Remove hack for
13716         dw2_force_const_mem.
13718         PR target/84845
13719         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13720         to ...
13721         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
13722         be created, use lowpart_subreg of operands[0] rather than operands[0]
13723         itself.
13724         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13725         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13726         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13727         and n constraint instead of aarch64_shift_imm_di and Usd.
13728         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13729         (*aarch64_<optab>_reg_minus<mode>3): ... this.
13731 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
13733         PR target/82989
13734         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13735         to favor GPR over NEON registers.
13736         (<shift>di3_neon): Likewise.
13738 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13740         PR target/84952
13741         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13742         (nvptx_process_pars): Emit bar.sync asap and alap.
13744 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13746         PR target/84954
13747         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13748         seen_label if seen_label is already set.
13750 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13752         PR target/84945
13753         * config/i386/i386.c (fold_builtin_cpu): For features above 31
13754         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13755         Use 1U instead of 1.  Formatting fixes.
13757         PR c/84953
13758         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13759         instead of TREE_TYPE (s1) for the return value.
13761 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
13763         PR tree-optimization/84946
13764         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13765         bitsize + bitsize in poly_uint64 rather than poly_int64.
13767         PR sanitizer/78651
13768         * dwarf2asm.c: Include fold-const.c.
13769         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13770         of decl rather than decl itself.
13772         PR rtl-optimization/84643
13773         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13775 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
13777         PR sanitizer/78651
13778         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13779         calling assemble_variable.
13781 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
13783         PR target/81647
13784         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13785         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13787 2018-03-19  Jim Wilson  <jimw@sifive.com>
13789         PR bootstrap/84856
13790         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13791         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13792         (riscv_first_stack_step): Likewise.
13793         (riscv_option_override): Use STACK_BOUNDARY instead of
13794         MIN_STACK_BOUNDARY.
13795         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13796         MIN_STACK_BOUNDARY.
13797         (BIGGEST_ALIGNMENT): Set to 128.
13798         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13799         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13800         STACK_BOUNDARY.
13802 2018-03-19  Richard Biener  <rguenther@suse.de>
13804         PR tree-optimization/84933
13805         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13806         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13808 2018-03-19  Richard Biener  <rguenther@suse.de>
13810         PR tree-optimization/84859
13811         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13812         (cond_if_else_store_replacement): Perform sinking operation on
13813         single-store BBs regardless of MAX_STORES_TO_SINK setting.
13814         Generalize what a BB with a single eligible store is.
13816 2018-03-19  Richard Biener  <rguenther@suse.de>
13818         PR tree-optimization/84929
13819         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13820         chrec_is_positive against non-chrec arg.
13822 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
13824         PR target/84711
13825         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13827 2018-03-18  Martin Liska  <mliska@suse.cz>
13829         PR rtl-optimization/84635
13830         * regrename.c (build_def_use): Use matches_mode only when
13831         matches >= 0.
13833 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
13835         PR tree-optimization/84913
13836         * tree-vect-loop.c (vectorizable_reduction): Don't try to
13837         vectorize chains of COND_EXPRs.
13839 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13841         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13843 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13845         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13847 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13849         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13851 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13852             Kito Cheng  <kito.cheng@gmail.com>
13854         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13855         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13856         (nds32_adjust_reg_alloc_order): New function.
13857         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13859 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
13861         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13862         nds32_print_operand, nds32_print_operand_address): Use
13863         HOST_WIDE_INT_PRINT_DEC instead.
13865 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13867         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13869 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
13871         PR target/84902
13872         * config/i386/i386.c (initial_ix86_tune_features,
13873         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13874         unsigned long long.
13875         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13876         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13877         rather than 1u << ix86_tune.  Formatting fix.
13878         (ix86_option_override_internal): Change ix86_arch_mask from
13879         unsigned int to unsigned HOST_WIDE_INT, initialize to
13880         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13881         (ix86_function_specific_restore): Likewise.
13883 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13885         PR target/84899
13886         * postreload.c (reload_combine_recognize_pattern): Perform
13887         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13888         truncate_int_for_mode the result for the destination's mode.
13890         PR c/84909
13891         * hsa-gen.c (mem_type_for_type): Fix comment typo.
13892         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13893         Likewise.
13894         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13895         Likewise.
13897 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
13899         PR target/84876
13900         * lra-assigns.c (lra_split_hard_reg_for): Don't use
13901         regno_allocno_class_array and sorted_pseudos.
13902         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13903         insns where regno is used.
13905 2018-03-16  Martin Liska  <mliska@suse.cz>
13907         PR ipa/84833
13908         * multiple_target.c (create_dispatcher_calls): Redirect
13909         reference in the symbol table.
13911 2018-03-16  Martin Liska  <mliska@suse.cz>
13913         PR ipa/84722
13914         * multiple_target.c (create_dispatcher_calls): Redirect also
13915         an alias.
13917 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13919         PR c++/79937
13920         PR c++/82410
13921         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13922         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13923         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13925 2018-03-16  Julia Koval  <julia.koval@intel.com>
13927         * doc/invoke.texi (Skylake Server): Add CLWB.
13928         Cannonlake): Remove CLWB.
13930 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13932         PR tree-optimization/84841
13933         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13934         1 << 3.
13935         (FLOAT_ONE_CONST_TYPE): Define.
13936         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13937         (sort_by_operand_rank): Put entries with higher constant_type last
13938         rather than first to match comments.
13940 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
13942         * config/nios2/nios2.md (movsi_internal): Fix thinko in
13943         split predicate.
13945 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13947         PR c++/79085
13948         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13949         check and use address of target always.
13951 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
13953         PR target/84574
13954         * config/i386/i386.c (indirect_thunk_needed): Update comments.
13955         (indirect_thunk_bnd_needed): Likewise.
13956         (indirect_thunks_used): Likewise.
13957         (indirect_thunks_bnd_used): Likewise.
13958         (indirect_return_needed): New.
13959         (indirect_return_bnd_needed): Likewise.
13960         (output_indirect_thunk_function): Add a bool argument for
13961         function return.
13962         (output_indirect_thunk_function): Don't generate alias for
13963         function return thunk.
13964         (ix86_code_end): Call output_indirect_thunk_function to generate
13965         function return thunks.
13966         (ix86_output_function_return): Set indirect_return_bnd_needed
13967         and indirect_return_needed instead of indirect_thunk_bnd_needed
13968         and indirect_thunk_needed.
13970 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
13972         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13973         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13974         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13976 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
13977             Paul Hua <paul.hua.gm@gmail.com>
13979         PR c/84852
13980         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13982 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
13984         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13985         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13986         resp. SFmode cases.
13988 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
13990         PR target/84711
13991         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13992         instead of GET_MODE_SIZE when comparing Units.
13994 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13996         PR target/68256
13997         * varasm.c (hash_section): Return an unchangeble hash value
13998         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13999         Return !aarch64_can_use_per_function_literal_pools_p ().
14001 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14003         PR target/84860
14004         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14005         rather than address of cmode as last argument to prepare_cmp_insn.
14007 2018-03-15  Julia Koval  <julia.koval@intel.com>
14009         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14010         F_AVX512VNNI, F_AVX512BITALG): New.
14012 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14014         PR target/83451
14015         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14016         insn for floating-point loads and stores.
14018 2018-03-14  Carl Love  <cel@us.ibm.com>
14020         * config/rs6000/rs6000-c.c: Add macro definitions for
14021         ALTIVEC_BUILTIN_VEC_PERMXOR.
14022         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14023         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14024         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14025         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14026         UNSPEC_VPERMXOR.
14027         * config/doc/extend.texi: Add prototypes for vec_permxor.
14029 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14031         PR c/84852
14032         * diagnostic-show-locus.c (class layout_point): Convert m_line
14033         from int to linenum_type.
14034         (line_span::comparator): Use linenum "compare" function when
14035         comparing line numbers.
14036         (test_line_span): New function.
14037         (layout_range::contains_point): Convert param "row" from int to
14038         linenum_type.
14039         (layout_range::intersects_line_p): Likewise.
14040         (layout::will_show_line_p): Likewise.
14041         (layout::print_source_line): Likewise.
14042         (layout::should_print_annotation_line_p): Likewise.
14043         (layout::print_annotation_line): Likewise.
14044         (layout::print_leading_fixits): Likewise.
14045         (layout::annotation_line_showed_range_p): Likewise.
14046         (struct line_corrections): Likewise for field m_row.
14047         (line_corrections::line_corrections): Likewise for param "row".
14048         (layout::print_trailing_fixits): Likewise.
14049         (layout::get_state_at_point): Likewise.
14050         (layout::get_x_bound_for_row): Likewise.
14051         (layout::print_line): Likewise.
14052         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14053         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14054         * input.c (selftest::test_linenum_comparisons): New function.
14055         (selftest::input_c_tests): Call it.
14056         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14057         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14058         * selftest.h (ASSERT_GT): New macro.
14059         (ASSERT_GT_AT): New macro.
14060         (ASSERT_LT): New macro.
14061         (ASSERT_LT_AT): New macro.
14063 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14065         PR rtl-optimization/84780
14066         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14068 2018-03-14  Martin Liska  <mliska@suse.cz>
14070         * tree.c (record_node_allocation_statistics): Use
14071         get_stats_node_kind.
14072         (get_stats_node_kind): New function extracted from
14073         record_node_allocation_statistics.
14074         (free_node): Use get_stats_node_kind.
14076 2018-03-14  Richard Biener  <rguenther@suse.de>
14078         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14079         that the value-set of ANTIC_IN doesn't grow.
14081         Revert
14082         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14083         member.
14084         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14085         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14087 2018-03-14  Julia Koval  <julia.koval@intel.com>
14089         * config.gcc (icelake-client, icelake-server): New.
14090         (icelake): Remove.
14091         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14092         (initial_ix86_arch_features): Ditto.
14093         (PTA_SKYLAKE): Add SGX.
14094         (PTA_ICELAKE): Remove.
14095         (PTA_ICELAKE_CLIENT): New.
14096         (PTA_ICELAKE_SERVER): New.
14097         (ix86_option_override_internal): Split up icelake on icelake client and
14098         icelake server.
14099         (get_builtin_code_for_version): Ditto.
14100         (fold_builtin_cpu): Ditto.
14101         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14102         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14103         * config/i386/i386.h (processor_type): Ditto.
14104         * doc/invoke.texi: Ditto.
14106 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14108         PR sanitizer/83392
14109         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14110         INTEGER_CST offset, add it together with bitpos / 8 and
14111         sign extend based on POINTER_SIZE.
14113         PR target/84844
14114         Revert
14115         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14117         PR target/78090
14118         * config/i386/constraints.md (Yc): New register constraint.
14119         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14120         Use Yc constraint for alternative 2 of operand 0.  Remove
14121         preferred_for_speed attribute.
14123 2018-03-14  Richard Biener  <rguenther@suse.de>
14125         PR tree-optimization/84830
14126         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14127         with the old one to avoid oscillations.
14129 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14131         PR target/83712
14132         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14133         pseudos.
14134         (assign_by_spills): Return a flag of reload assignment failure.
14135         Do not process the reload assignment failures.  Do not spill other
14136         reload pseudos if they has the same reg class.  Update n if
14137         necessary.
14138         (lra_assign): Add a return arg.  Set up from the result of
14139         assign_by_spills call.
14140         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14141         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14142         usage_insns if it is not NULL.
14143         (spill_hard_reg_in_range): New function.
14144         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14145         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14146         function prototypes.
14147         (lra_assign): Change prototype.
14148         * lra.c (lra): Add code to deal with fails by splitting hard reg
14149         live ranges.
14151 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14153         * config/riscv/riscv.opt (mrelax): New option.
14154         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14155         "norelax" when riscv_mrelax is disabled.
14156         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14158 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14160         PR target/84743
14161         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14162         reassociation for int modes.
14164 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14166         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14167         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14168         for big-endian.
14169         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14170         * config/aarch64/aarch64-sve.md
14171         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14172         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14173         (*extend<mode><Vwide>2): Rename to...
14174         (aarch64_sve_extend<mode><Vwide>2): ...this.
14175         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14176         renaming the old pattern to...
14177         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14178         unsigned packs.
14179         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14180         define_expand, renaming the old pattern to...
14181         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14182         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14183         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14184         account when deciding which SVE instruction the optab should use.
14185         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14187 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14189         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14190         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14191         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14192         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14193         (tlsdesc_small_<mode>): Turn a define_expand and use
14194         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14195         (tlsdesc_small_advsimd_<mode>): ...this.
14196         (tlsdesc_small_sve_<mode>): New pattern.
14198 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14200         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14201         (UNSPEC_UMUL_HIGHPART): New constants.
14202         (MUL_HIGHPART): New int iteraor.
14203         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14204         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14205         define_expand.
14206         (*<su>mul<mode>3_highpart): New define_insn.
14208 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14210         PR lto/84805
14211         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14212         incomplete types.
14214 2018-03-13  Martin Liska  <mliska@suse.cz>
14216         PR ipa/84658.
14217         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14218         vector.
14219         (sem_item_optimizer::~sem_item_optimizer): Release it.
14220         (sem_item_optimizer::merge_classes): Register variable aliases.
14221         (sem_item_optimizer::fixup_pt_set): New function.
14222         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14223         * ipa-icf.h: Declare new variables and functions.
14225 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14227         PR middle-end/84834
14228         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14229         integer_pow2p@2 and test integer_pow2p in condition.
14230         (A < 0 ? C : 0): Similarly for @1.
14232         PR middle-end/84831
14233         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14234         characters starting at p contain '\0' character, don't look beyond
14235         that.
14237         PR target/84827
14238         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14239         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14241         PR target/84828
14242         * reg-stack.c (change_stack): Change update_end var from int to
14243         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14244         also call set_block_for_insn on the newly added insns and rescan.
14246         PR target/84786
14247         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14248         on the last operand.
14250         PR c++/84704
14251         * tree.c (stabilize_reference_1): Return save_expr (e) for
14252         STATEMENT_LIST even if it doesn't have side-effects.
14254 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14256         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14258 2018-03-12  Renlin Li  <renlin.li@arm.com>
14260         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14261         aarch64_output_scalar_simd_mov_immediate.
14263 2018-03-12  Martin Sebor  <msebor@redhat.com>
14265         PR tree-optimization/83456
14266         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14267         for perfectly overlapping calls to memcpy.
14268         (gimple_fold_builtin_memory_chk): Same.
14269         (gimple_fold_builtin_strcpy): Handle no-warning.
14270         (gimple_fold_builtin_stxcpy_chk): Same.
14271         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14273 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14275         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14276         parameter.  Use it for SFmode.
14277         (rs6000_function_arg_advance_1): Adjust.
14278         (rs6000_function_arg): Adjust.
14279         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14281 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14283         PR rtl-optimization/84169
14284         PR rtl-optimization/84780
14285         * combine.c (can_combine_p): Check for a 2-insn combination whether
14286         the destination register is used between the two insns, too.
14288 2018-03-12  Richard Biener  <rguenther@suse.de>
14290         PR tree-optimization/84803
14291         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14292         for refs DR analysis didn't process.
14294 2018-03-12  Richard Biener  <rguenther@suse.de>
14296         PR tree-optimization/84777
14297         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14298         force-vectorize loops ignore whether we are optimizing for size.
14300 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14302         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14303         (TARGET_MD_ASM_ADJUST): Define.
14305 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14306             Kito Cheng  <kito.cheng@gmail.com>
14307             Chung-Ju Wu  <jasonwucj@gmail.com>
14309         * config/nds32/nds32.c (nds32_compute_stack_frame,
14310         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14311         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14312         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14313         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14314         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14315         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14316         * config/nds32/nds32.md (prologue, epilogue): Use macro
14317         NDS32_V3PUSH_AVAILABLE_P to do checking.
14319 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14321         PR debug/58150
14322         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14323         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14324         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14325         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14326         addition of most attributes on !orig_type_die or the attribute not
14327         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14329 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14330             Chung-Ju Wu  <jasonwucj@gmail.com>
14332         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14333         __NDS32_VH__ macro.
14334         * config/nds32/nds32.opt (mvh): New option.
14336 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14337             Chung-Ju Wu  <jasonwucj@gmail.com>
14339         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14340         function.
14341         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14342         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14343         definition.
14345 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14346             Chung-Ju Wu  <jasonwucj@gmail.com>
14348         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14349         function.
14350         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14351         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14353 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14354             Kito Cheng  <kito.cheng@gmail.com>
14355             Chung-Ju Wu  <jasonwucj@gmail.com>
14357         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14358         UNSPEC_FFMISM and UNSPEC_FLMISM.
14359         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14360         for ffb, ffmism and flmism.
14361         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14362         (unspec_ffmism): Ditto.
14363         (unspec_flmism): Ditto.
14364         (nds32_expand_builtin_impl): Check if string extension is available.
14365         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14366         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14368 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14370         Reverting patch:
14371         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14373         PR target/83712
14374         * lra-assigns.c (assign_by_spills): Return a flag of reload
14375         assignment failure.  Do not process the reload assignment
14376         failures.  Do not spill other reload pseudos if they has the same
14377         reg class.
14378         (lra_assign): Add a return arg.  Set up from the result of
14379         assign_by_spills call.
14380         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14381         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14382         usage_insns if it is not NULL.
14383         (spill_hard_reg_in_range): New function.
14384         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14385         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14386         function prototypes.
14387         (lra_assign): Change prototype.
14388         * lra.c (lra): Add code to deal with fails by splitting hard reg
14389         live ranges.
14391 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14393         PR target/84807
14394         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14396 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14398         PR debug/84620
14399         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14400         (dw_val_node): Add val_symbolic_view.
14401         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14402         (symview_upper_bound): New.
14403         (new_line_info_table): Initialize symviews_since_reset.
14404         (dwarf2out_source_line): Count symviews_since_reset and set
14405         symview_upper_bound.
14406         (dw_val_equal_p): Handle symview.
14407         (add_AT_symview): New.
14408         (print_dw_val): Handle symview.
14409         (attr_checksum, attr_checksum_ordered): Likewise.
14410         (same_dw_val_p, size_of_die): Likewise.
14411         (value_format, output_die): Likewise.
14412         (add_high_low_attributes): Use add_AT_symview for entry_view.
14413         (dwarf2out_finish): Reset symview_upper_bound, clear
14414         zero_view_p.
14416 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14418         PR target/83969
14419         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14420         Add strict argument and use it.
14421         (rs6000_split_multireg_move): Update for new strict argument.
14422         (mem_operand_gpr): Disallow all non-offsettable addresses.
14423         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14425 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14427         PR target/84772
14428         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14429         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14430         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14432         PR c++/84767
14433         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14434         decl, use remap_type if we want to use the type.
14436 2018-03-09  Martin Sebor  <msebor@redhat.com>
14438         PR tree-optimization/84526
14439         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14440         Remove dead code.
14441         (builtin_access::generic_overlap): Be prepared to handle non-array
14442         base objects.
14444 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14446         PR rtl-optimization/84682
14447         * lra-constraints.c (process_address_1): Check is_address flag
14448         for address constraints.
14449         (process_alt_operands): Likewise.
14450         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14451         preprocess_constraints.
14452         * recog.h (preprocess_constraints): Add oploc parameter.
14453         Adjust callers.
14454         * recog.c (preprocess_constraints): Test address_operand for
14455         CT_ADDRESS constraints.
14457 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14459         PR target/83712
14460         * lra-assigns.c (assign_by_spills): Return a flag of reload
14461         assignment failure.  Do not process the reload assignment
14462         failures.  Do not spill other reload pseudos if they has the same
14463         reg class.
14464         (lra_assign): Add a return arg.  Set up from the result of
14465         assign_by_spills call.
14466         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14467         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14468         usage_insns if it is not NULL.
14469         (spill_hard_reg_in_range): New function.
14470         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14471         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14472         function prototypes.
14473         (lra_assign): Change prototype.
14474         * lra.c (lra): Add code to deal with fails by splitting hard reg
14475         live ranges.
14477 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14479         PR target/83193
14480         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14481         Accept complain bool parameter.  Only emit errors if it is true.
14482         (arm_parse_cpu_option_name): Likewise.
14483         (arm_target_thumb_only): Adjust callers of the above.
14484         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14485         prototype to take a default true bool parameter.
14486         (arm_parse_arch_option_name): Likewise.
14488 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14489             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14491         PR jit/64089
14492         PR jit/84288
14493         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14494         * configure: Regenerate.
14495         * configure.ac ("linker --version-script option"): New.
14496         ("linker soname option"): New.
14498 2018-03-09  Richard Biener  <rguenther@suse.de>
14500         PR tree-optimization/84775
14501         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14502         immediate uses of predicate stmts and mark them modified.
14504         Revert
14505         PR tree-optimization/84178
14506         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14507         to caller.
14508         (version_loop_for_if_conversion): Delay update_ssa call.
14509         (tree_if_conversion): Delay update_ssa until after predicate
14510         insertion.
14512 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14514         PR target/84763
14515         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14516         when the function accesses prior frames.
14518 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14520         PR debug/84456
14521         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14522         gen_llsym, otherwise call maybe_gen_llsym.
14524         PR inline-asm/84742
14525         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14526         has ',' character inside of it.
14528 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14530         PR target/84748
14531         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14532         as clobbering CC_REGNUM.
14534 2018-03-08  Richard Biener  <rguenther@suse.de>
14536         PR middle-end/84552
14537         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14538         (follow_copies_to_constant): Do not follow SSA names registered
14539         for update.
14541 2018-03-08  Richard Biener  <rguenther@suse.de>
14543         PR tree-optimization/84178
14544         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14545         to caller.
14546         (version_loop_for_if_conversion): Delay update_ssa call.
14547         (tree_if_conversion): Delay update_ssa until after predicate
14548         insertion.
14550 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14552         PR tree-optimization/84178
14553         * tree-if-conv.c (release_bb_predicate): Remove the
14554         the assertion that the stmts have NULL use_ops.
14555         Discard the statements, asserting that they haven't
14556         yet been added to a BB.
14558 2018-03-08  Richard Biener  <rguenther@suse.de>
14560         PR tree-optimization/84746
14561         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14562         (phi_translate): Pass in destination ANTIC_OUT set.
14563         (phi_translate_1): Likewise.  For a simplified result lookup
14564         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14565         (phi_translate_set): Adjust.
14566         (do_pre_regular_insertion): Likewise.
14567         (do_pre_partial_partial_insertion): Likewise.
14569 2018-03-08  Martin Liska  <mliska@suse.cz>
14571         PR gcov-profile/84735
14572         * doc/gcov.texi: Document usage of profile files.
14573         * gcov-io.h: Document changes in the format.
14575 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14577         PR debug/84404
14578         PR debug/84408
14579         * dwarf2out.c (struct dw_line_info_table): Update comments for
14580         view == -1.
14581         (FORCE_RESET_NEXT_VIEW): New.
14582         (FORCE_RESETTING_VIEW_P): New.
14583         (RESETTING_VIEW_P): Check for -1 too.
14584         (ZERO_VIEW_P): Likewise.
14585         (new_line_info_table): Force-reset next view.
14586         (dwarf2out_begin_function): Likewise.
14587         (dwarf2out_source_line): Simplify zero_view_p initialization.
14588         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14589         view directly.  Omit view when omitting .loc at line 0.
14591 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14593         PR tree-optimization/84740
14594         * tree-switch-conversion.c (process_switch): Call build_constructors
14595         only if info.phi_count is non-zero.
14597         PR tree-optimization/84739
14598         * tree-tailcall.c (find_tail_calls): Check call arguments against
14599         DECL_ARGUMENTS (current_function_decl) rather than
14600         DECL_ARGUMENTS (func) when checking for tail recursion.
14602 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14604         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14605         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14606         Volker Reichelt's entry and add entries for people that perform
14607         GCC fuzzy testing and report numerous bugs.
14609 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14611         PR target/82411
14612         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14613         readonly data in sdata, if that is disabled.
14614         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14615         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14616         -mreadonly-in-sdata option.
14618 2018-03-07  Martin Sebor  <msebor@redhat.com>
14620         PR tree-optimization/84468
14621         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14622         basic block when looking for nul assignment.
14624 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14626         PR target/84277
14627         * except.h (output_function_exception_table): Adjust prototype.
14628         * except.c (output_function_exception_table): Remove FNNAME parameter
14629         and add SECTION parameter.  Ouput one part of the table at a time.
14630         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14631         the first part of the exception table and emit unwind directives.
14632         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14633         (i386_pe_seh_cold_init): Likewise.
14634         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14635         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14636         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14637         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14638         * config/i386/winnt.c: Include except.h.
14639         (struct seh_frame_state): Add reg_offset, after_prologue and
14640         in_cold_section fields.
14641         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14642         (i386_pe_seh_cold_init): New function.
14643         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14644         to seh->in_cold_section.
14645         (seh_emit_push): Record the offset of the push.
14646         (seh_emit_save): Record the offet of the save.
14647         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14648         Test seh->after_prologue to disregard the epilogue.
14649         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14650         (i386_pe_end_cold_function): New function.
14652 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14654         PR fortran/84565
14655         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14656         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14658         PR c++/84704
14659         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14660         on tmp_var.
14661         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14662         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14664         PR middle-end/84723
14665         * multiple_target.c: Include tree-inline.h and intl.h.
14666         (expand_target_clones): Diagnose and fail if node->definition and
14667         !tree_versionable_function_p (node->decl).
14669 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
14671         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14672         sprint_ul.
14673         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14674         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14675         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14677 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14679         PR target/84710
14680         * combine.c (try_combine): Use reg_or_subregno instead of handling
14681         just paradoxical SUBREGs and REGs.
14683 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
14685         * config/arc/arc.c (arc_finalize_pic): Remove function.
14686         (arc_must_save_register): We use single base PIC register, remove
14687         checks to save/restore the PIC register.
14688         (arc_expand_prologue): Likewise.
14689         * config/arc/arc-protos.h (arc_set_default_type_attributes):
14690         Remove.
14691         (arc_verify_short): Likewise.
14692         (arc_attr_type): Likewise.
14693         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14694         (walk_stores): Likewise.
14695         (arc_address_cost): Make it static.
14696         (arc_verify_short): Likewise.
14697         (branch_dest): Likewise.
14698         (arc_attr_type): Likewise.
14699         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14700         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14701         (arc_final_prescan_insn): Remove inserting the nops due to
14702         hardware hazards.  It is done in reorg step.
14703         (insn_length_variant_t): Remove.
14704         (insn_length_parameters_t): Likewise.
14705         (arc_insn_length_parameters): Likewise.
14706         (arc_get_insn_variants): Likewise.
14707         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14709 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14711         PR inline-asm/84683
14712         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14713         assertion failure.
14715         PR tree-optimization/84687
14716         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14717         on new_node->decl.
14718         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14720 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14722         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14723         Rename to ppc_speculation_barrier.
14724         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14725         __builtin_ppc_speculation_barrier.
14727 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14729         PR target/84700
14730         * combine.c (combine_simplify_rtx): Don't try to simplify if
14731         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14732         are equal to x.
14734 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
14736         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14737         to 32 bytes when compiling for POWER9.
14739 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14741         PR target/84564
14742         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14743         regparm >= 3 with no arg reg available also for calls with
14744         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
14746         PR target/84524
14747         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14748         orig,vex.
14749         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
14751 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
14753         PR target/84264
14754         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14756 2018-03-05  Richard Biener  <rguenther@suse.de>
14758         PR tree-optimization/84486
14759         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14760         When inserting a __builtin_assume_aligned call set the LHS
14761         SSA name alignment info accordingly.
14763 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
14765         PR tree-optimization/84114
14766         * config/aarch64/aarch64.c (aarch64_reassociation_width)
14767         Avoid reassociation of FLOAT_MODE addition.
14769 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
14771         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14772         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14773         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14774         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14775         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14776         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14777         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14778         and -mwbnoinvd.
14779         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14780         __builtin_ia32_wbinvd): New builtins.
14781         (SPECIAL_ARGS2): New.
14782         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14783         (SPECIAL_ARGS2): New.
14784         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14785         (ix86_valid_target_attribute_inner_p): Ditto.
14786         (ix86_init_mmx_sse_builtins): Add special_args2.
14787         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14788         TARGET_WBNOINVD_P): New.
14789         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14790         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14791         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14792         * config/i386/immintrin.h (_wbinvd): New intrinsic.
14793         * config/i386/pconfigintrin.h: New file.
14794         * config/i386/wbnoinvdintrin.h: Ditto.
14795         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14796         wbnoinvdintrin.h.
14797         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14799 2018-03-05  Richard Biener  <rguenther@suse.de>
14801         PR tree-optimization/84670
14802         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14803         member.
14804         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14805         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14806         (compute_antic_aux): Only assert the number of values in ANTIC_IN
14807         doesn't grow if all successors (recursively) were visited at least
14808         once.
14810 2018-03-05  Richard Biener  <rguenther@suse.de>
14812         PR tree-optimization/84650
14813         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14814         if executed in the loop pipeline.
14816 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
14818         * doc/configfiles.texi (Configuration Files): Move info about
14819         conditionalizing $target-protos.h to...
14820         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
14821         differs from $target-protos.h.
14823 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
14824             Chung-Ju Wu  <jasonwucj@gmail.com>
14826         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14827         * config/nds32/nds32-multiple.md (setmemsi): Define.
14828         * config/nds32/nds32-memory-manipulation.c
14829         (nds32_gen_dup_4_byte_to_word_value): New.
14830         (emit_setmem_word_loop): New.
14831         (emit_setmem_byte_loop): New.
14832         (nds32_expand_setmem_loop): New.
14833         (nds32_expand_setmem_loop_v3m): New.
14834         (nds32_expand_setmem_unroll): New.
14835         (nds32_expand_setmem): New.
14837 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14838             Chung-Ju Wu  <jasonwucj@gmail.com>
14840         * config/nds32/nds32-memory-manipulation.c
14841         (nds32_emit_load_store): New.
14842         (nds32_emit_post_inc_load_store): New.
14843         (nds32_emit_mem_move): New.
14844         (nds32_emit_mem_move_block): New.
14845         (nds32_expand_movmemsi_loop_unknown_size): New.
14846         (nds32_expand_movmemsi_loop_known_size): New.
14847         (nds32_expand_movmemsi_loop): New.
14848         (nds32_expand_movmemsi_unroll): New.
14849         (nds32_expand_movmemqi): Rename ...
14850         (nds32_expand_movmemsi): ... to this.
14851         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14852         (movmemsi): ... to this.
14853         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14854         (nds32_expand_movmemsi): ... to this.
14856 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14857             Monk Chiang  <sh.chiang04@gmail.com>
14858             Chung-Ju Wu  <jasonwucj@gmail.com>
14860         * config/nds32/nds32-protos.h
14861         (nds32_expand_load_multiple): New arguments.
14862         (nds32_expand_store_multiple): Ditto.
14863         (nds32_valid_multiple_load_store): Rename ...
14864         (nds32_valid_multiple_load_store_p): ... to this.
14865         * config/nds32/nds32-memory-manipulation.c
14866         (nds32_expand_load_multiple): Refine implementation.
14867         (nds32_expand_store_multiple): Ditto.
14868         * config/nds32/nds32-multiple.md
14869         (load_multiple): Update nds32_expand_load_multiple interface.
14870         (store_multiple): Update nds32_expand_store_multiple interface.
14871         * config/nds32/nds32-predicates.c
14872         (nds32_valid_multiple_load_store): Rename ...
14873         (nds32_valid_multiple_load_store_p): ... to this and refine
14874         implementation.
14875         * config/nds32/predicates.md
14876         (nds32_load_multiple_and_update_address_operation): New predicate.
14877         (nds32_store_multiple_and_update_address_operation): New predicate.
14879 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14880             Chung-Ju Wu  <jasonwucj@gmail.com>
14882         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14883         (combo): New attribute.
14884         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14886 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14888         * config/nds32/nds32.opt: Change -mcmodel= default value.
14890 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
14891             Monk Chiang  <sh.chiang04@gmail.com>
14892             Chung-Ju Wu  <jasonwucj@gmail.com>
14894         * config/nds32/constants.md (unspec_element): New enum.
14895         * config/nds32/constraints.md (Umw): New constraint.
14896         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14897         * config/nds32/nds32-intrinsic.md: Likewise.
14898         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14899         (nds32_valid_smw_lwm_base_p): New.
14900         (nds32_output_smw_single_word): New.
14901         (nds32_output_lmw_single_word): New.
14902         (nds32_expand_unaligned_load): New.
14903         (nds32_expand_unaligned_store): New.
14904         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14905         (nds32_output_smw_single_word): Declare.
14906         (nds32_output_lmw_single_word): Declare.
14907         (nds32_expand_unaligned_load): Declare.
14908         (nds32_expand_unaligned_store): Declare.
14909         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14910         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14911         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14912         NDS32_BUILTIN_UASTORE_DW.
14913         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14914         predicate.
14916 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
14917             Kito Cheng  <kito.cheng@gmail.com>
14918             Chung-Ju Wu  <jasonwucj@gmail.com>
14920         * config/nds32/nds32-intrinsic.c
14921         (nds32_expand_builtin_null_ftype_reg): Delete.
14922         (nds32_expand_builtin_reg_ftype_imm): Ditto.
14923         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14924         (nds32_read_argument): New.
14925         (nds32_legitimize_target): Ditto.
14926         (nds32_legitimize_argument): Ditto.
14927         (nds32_check_constant_argument): Ditto.
14928         (nds32_expand_unop_builtin): Ditto.
14929         (nds32_expand_unopimm_builtin): Ditto.
14930         (nds32_expand_binop_builtin): Ditto.
14931         (nds32_builtin_decl_impl): Ditto.
14932         (builtin_description): Ditto.
14933         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14934         (nds32_init_builtins_impl): Ditto.
14935         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14936         (nds32_builtin_decl): New.
14937         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14938         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14940 2018-03-02  Jeff Law  <law@redhat.com>
14942         * reorg.c (stop_search_p): Handle DEBUG_INSN.
14943         (redundant_insn, fill_simple_delay_slots): Likewise.
14944         (fill_slots_from_thread): Likewise.
14945         * resource.c (mark_referenced_resources): Likewise.
14946         (mark_set_resources, find_dead_or_set_registers): Likewise.
14948 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14950         * substring-locations.h (format_warning_va): Formatting fix for
14951         ATTRIBUTE_GCC_DIAG.
14952         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14953         argument.
14954         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14955         * substring-locations.c: Include intl.h.
14956         (format_warning_va): Turned into small wrapper around
14957         format_warning_n_va, renamed to ...
14958         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14959         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14960         use ngettext.
14961         (format_warning_at_substring_n): New function.
14962         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14963         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
14964         format_warning_at_substring with just a shorter name instead of
14965         const function pointer.
14966         (fmtwarn_n): New function.
14967         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14968         appropriate, get rid of all the fmtstr temporaries, move conditionals
14969         with G_() wrapped string literals directly into fmtwarn arguments,
14970         cast dir.len to (int), formatting fixes.
14972 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
14974         * doc/invoke.texi: Remove "Cilk Plus" references.
14976 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14977             Richard Biener  <rguenther@suse.de>
14979         PR ipa/84628
14980         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14981         for error or warning attributes if CALL_FROM_THUNK_P is set.
14982         Formatting fixes.
14984 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14986         PR target/56540
14987         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14988         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14990         PR target/56540
14991         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14992         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14994         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14995         instead of -1U in last predictors element's probability member.
14997 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14999         PR ipa/83983
15000         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15001         arguments if they are comparable.
15003 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15005         PR tree-optimization/84634
15006         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15007         masks and masked_loop_p with a single loop_masks, making sure it's
15008         null for bb vectorization.
15010 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15012         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15013         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15014         loop->force_vectorize to check whether there is no alias.
15016 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15018         PR target/84614
15019         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15020         prototypes.
15021         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15022         comments.
15023         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15024         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15025         instead of a loop around prev_real_insn.
15026         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15027         prev_real_insn.
15029         PR inline-asm/84625
15030         * config/i386/i386.c (ix86_print_operand): Use conditional
15031         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15032         zero vector.
15034 2018-03-02  Richard Biener  <rguenther@suse.de>
15036         PR tree-optimization/84427
15037         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15038         (bitmap_set_subtract_values): Rewrite to handle multiple
15039         exprs per value.
15040         (clean): Likewise.
15041         (prune_clobbered_mems): Likewise.
15042         (phi_translate): Take edge instead of pred/phiblock.
15043         (phi_translate_1): Likewise.
15044         (phi_translate_set): Likewise.  Insert all translated
15045         exprs for a value into the set, keeping possibly multiple
15046         expressions per value.
15047         (compute_antic_aux): Adjust for phi_translate changes.
15048         When intersecting union the expressions and prune those
15049         not in the final value set, keeping possibly multiple
15050         expressions per value.  Do not use value-insertion
15051         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15052         all expressions.  Add verification that the value-sets
15053         only shrink during iteration.
15054         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15055         (do_pre_regular_insertion): Likewise.
15056         (do_pre_partial_partial_insertion): Likewise.
15058 2018-03-02  Richard Biener  <rguenther@suse.de>
15060         PR target/82005
15061         * config/darwin.c (saved_debug_info_level): New static global.
15062         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15063         (darwin_asm_lto_end): Restore debug info generation settings.
15065 2018-03-01  Martin Liska  <mliska@suse.cz>
15067         PR sanitizer/82484
15068         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15069         volatile arguments.
15071 2018-03-01  Richard Biener  <rguenther@suse.de>
15073         PR debug/84645
15074         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15075         type annotation with LTO when debug was disabled at compile-time.
15077 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15079         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15080         XINT with INTVAL.
15081         (mips_final_postscan_insn): Likewise.
15083 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15085         PR rtl-optimization/84528
15086         * alias.c (init_alias_target): Add commentary.
15087         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15088         a unique base value if the frame pointer is not eliminated
15089         to the stack pointer.
15091 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15093         PR rtl-optimization/83327
15094         * lra-int.h (hard_regs_spilled_into): Declare.
15095         * lra.c (hard_regs_spilled_into): Define.
15096         (init_reg_info): Init hard_regs_spilled_into.
15097         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15098         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15099         (process_bb_lives): Handle hard_regs_spilled_into.
15100         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15101         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15103 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15105         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15106         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15107         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15108         * config/rs6000/aix72.h: New file.
15110 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15112         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15113         instead of warning_at with conditional singular and plural messages
15114         where possible.
15116         PR target/52991
15117         * stor-layout.c (update_alignment_for_field): For
15118         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15119         && !DECL_PACKED (field), do the alignment update, just use
15120         only desired_align instead of MAX (type_align, desired_align)
15121         as the alignment.
15122         (place_field): Don't do known_align < desired_align handling
15123         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15124         is non-NULL, instead do it after rli->prev_field handling and
15125         only if not within a bitfield word.  For DECL_PACKED (field)
15126         use type_align of BITS_PER_UNIT.
15128 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15130         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15131         superfluous parentheses and trailing spaces.
15133 2018-02-28  Richard Biener  <rguenther@suse.de>
15135         PR tree-optimization/84584
15136         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15137         SCoPs with fake exit edge.
15139 2018-02-28  Martin Liska  <mliska@suse.cz>
15141         PR testsuite/84597
15142         * timevar.c (timer::print): Fix format to properly print 100%
15143         values.
15145 2018-02-28  Richard Biener  <rguenther@suse.de>
15147         PR middle-end/84607
15148         * genmatch.c (capture_info::walk_match): Do not mark
15149         captured expressions without operands as expr_p given
15150         they act more like predicates and should be subject to
15151         "lost tail" side-effect preserving.
15153 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15155         PR rtl-optimization/81611
15156         * auto-inc-dec.c (attempt_change): Move dead note from
15157         mem_insn if it's the next use of regno
15158         (find_address): Take address use of reg holding
15159         non-incremented value.  Add parm to limit search to the named
15160         reg only.
15161         (merge_in_block): Attempt to use a mem insn that is the next
15162         use of the original regno.
15164 2018-02-27  Martin Sebor  <msebor@redhat.com>
15166         PR c++/83871
15167         * doc/invoke.texi (-Wmissing-attributes): New option.
15168         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15170 2018-02-27  Martin Sebor  <msebor@redhat.com>
15172         PR translation/84207
15173         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15174         n argument to unsigned HOST_WIDE_INT.
15175         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15176         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15177         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15178         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15180 2018-02-27  Richard Biener  <rguenther@suse.de>
15182         PR tree-optimization/84512
15183         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15184         Do not use the estimate returned from record_stmt_cost for
15185         the scalar iteration cost but sum properly using add_stmt_cost.
15187 2018-02-27  Richard Biener  <rguenther@suse.de>
15189         PR tree-optimization/84466
15190         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15191         Adjust last change to less strictly validate use operands.
15193 2018-02-27  Martin Liska  <mliska@suse.cz>
15195         PR gcov-profile/84548
15196         * gcov.c (process_file): Allow partial overlap and consider it
15197         also as group functions.
15198         (output_lines): Properly calculate range of lines for a group.
15200 2018-02-27  Martin Liska  <mliska@suse.cz>
15202         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15203         'ggc' suffixes.  Change first column width.
15204         (timer::print): Fix formatting of the column.
15206 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15208         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15209         preserve inline entry blocks for the sake of debug inline
15210         entry point markers alone.
15211         (remove_unused_locals): Suggest in comments a better place to
15212         force the preservation of inline entry blocks that are
15213         otherwise unused, but do not preserve them.
15215 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15217         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15219 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15221         PR target/84039
15222         * config/i386/constraints.md (Bs): Replace
15223         ix86_indirect_branch_register with
15224         TARGET_INDIRECT_BRANCH_REGISTER.
15225         (Bw): Likewise.
15226         * config/i386/i386.md (indirect_jump): Likewise.
15227         (tablejump): Likewise.
15228         (*sibcall_memory): Likewise.
15229         (*sibcall_value_memory): Likewise.
15230         Peepholes of indirect call and jump via memory: Likewise.
15231         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15232         (*sibcall_value_GOT_32): Likewise.
15233         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15234         (GOT_memory_operand): Likewise.
15235         (call_insn_operand): Likewise.
15236         (sibcall_insn_operand): Likewise.
15237         (GOT32_symbol_operand): Likewise.
15238         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15240 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15242         PR rtl-optimization/83496
15243         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15244         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15245         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15246         redundant insn, if any.
15247         (relax_delay_slots): Likewise.
15248         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15250 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15252         PR tree-optimization/83965
15253         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15254         that grouped statements are part of a reduction chain.  Return
15255         true if the statement is not marked as a reduction itself but
15256         is part of a group.
15257         (vect_recog_dot_prod_pattern): Don't check whether the statement
15258         is part of a group here.
15259         (vect_recog_sad_pattern): Likewise.
15260         (vect_recog_widen_sum_pattern): Likewise.
15262 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15264         PR debug/84545
15265         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15267 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15269         PR target/84530
15270         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15271         the bool argument.
15272         (ix86_output_indirect_function_return): New prototype.
15273         (ix86_split_simple_return_pop_internal): Likewise.
15274         * config/i386/i386.c (indirect_return_via_cx): New.
15275         (indirect_return_via_cx_bnd): Likewise.
15276         (indirect_thunk_name): Handle return va CX_REG.
15277         (output_indirect_thunk_function): Create alias for
15278         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15279         (ix86_output_indirect_jmp): Remove the bool argument.
15280         (ix86_output_indirect_function_return): New function.
15281         (ix86_split_simple_return_pop_internal): Likewise.
15282         * config/i386/i386.md (*indirect_jump): Don't pass false
15283         to ix86_output_indirect_jmp.
15284         (*tablejump_1): Likewise.
15285         (simple_return_pop_internal): Change it to define_insn_and_split.
15286         Call ix86_split_simple_return_pop_internal to split it for
15287         -mfunction-return=.
15288         (simple_return_indirect_internal): Call
15289         ix86_output_indirect_function_return instead of
15290         ix86_output_indirect_jmp.
15292 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15294         PR bootstrap/84405
15295         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15296         memset and value initialization afterwards.
15298 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15300         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15302 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15304         PR target/84521
15305         * common/config/aarch64/aarch64-common.c
15306         (aarch_option_optimization_table[]): Switch
15307         off fomit-frame-pointer
15309 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15310             Chung-Ju Wu  <jasonwucj@gmail.com>
15312         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15313         volatile memory.
15314         (store_multiple): Ditto.
15316 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15318         * config.gcc: Add --with-cpu support for nds32 target.
15319         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15320         * config/nds32/nds32.opt: Add -mcpu= option.
15322 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15324         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15325         isel=yes): Warn for these deprecated options.
15327 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15329         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15330         ISA_2_5_MASKS_EMBEDDED.
15332 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15334         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15335         p->max as pointers rather than using iterative_hash_expr.
15337 2018-02-23  Carl Love  <cel@us.ibm.com>
15339         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15340         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15341         BU_P8V_OVERLOAD_2.
15342         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15343         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15344         P8V_BUILTIN_VEC_VUNSIGNED2.
15346 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15348         PR target/81572
15349         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15350         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15351         LRA_UNKNOWN_ALT.
15352         * lra-constraints.c (curr_insn_transform): Set up
15353         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15354         LRA_UNKNOWN_ALT.
15355         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15356         * lra-eliminations.c (spill_pseudos): Ditto.
15357         (process_insn_for_elimination): Ditto.
15358         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15359         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15360         LRA_NON_CLOBBERED_ALT.
15362 2018-02-22  Martin Sebor  <msebor@redhat.com>
15364         PR tree-optimization/84480
15365         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15366         to maybe_diag_stxncpy_trunc.  Call it.
15367         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15368         from gimple_fold_builtin_strcpy.  Print inlining stack.
15369         (handle_builtin_stxncpy): Print inlining stack.
15370         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15372 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15374         PR target/84176
15375         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15376         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15377         and -fcheck-pointer-bounds are used together.
15378         (indirect_thunk_prefix): New enum.
15379         (indirect_thunk_need_prefix): New function.
15380         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15381         "_nt" instead of "_bnd" for NOTRACK prefix.
15382         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15383         (output_indirect_thunk_function): Likewise.
15384         (): Likewise.
15385         (ix86_code_end): Update output_indirect_thunk_function calls.
15386         (ix86_output_indirect_branch_via_reg): Replace
15387         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15388         (ix86_output_indirect_branch_via_push): Likewise.
15389         (ix86_output_function_return): Likewise.
15390         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15391         incompatible with -fcf-protection=branch and
15392         -fcheck-pointer-bounds.
15394 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15396         PR target/83335
15397         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15398         Change gcc_assert call to output_operand_lossage.
15400 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15402         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15404 2018-02-22  DJ Delorie  <dj@redhat.com>
15405             Sebastian Perta  <sebastian.perta@renesas.com>
15406             Oleg Endo  <olegendo@gcc.gnu.org>
15408         * config/rx/rx.c (rx_rtx_costs): New function.
15409         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15411 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15413         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15415 2018-02-22  Martin Liska  <mliska@suse.cz>
15417         PR driver/83193
15418         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15419         Add "native" as a possible value.
15421 2018-02-22  Martin Liska  <mliska@suse.cz>
15423         PR driver/83193
15424         * config/i386/i386.c (ix86_option_override_internal):
15425         Add "native" as a possible value for -march and -mtune.
15427 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15429         PR target/84502
15430         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15431         to all type variants.
15433         PR tree-optimization/84503
15434         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15435         width as info->bitpos + info->bitsize - start.
15436         (merged_store_group::merge_overlapping): Simplify width computation.
15437         (check_no_overlap): New function.
15438         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15439         start + width and last_order of the group, fail if check_no_overlap
15440         fails.
15441         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15442         to group if check_no_overlap fails.
15444 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15446         * config/rs6000/altivec.md: Delete contraint arguments to
15447         define_expand, define_split, and define_peephole2, and in
15448         define_insn_and_split if always unused.
15449         * config/rs6000/darwin.md: Ditto.
15450         * config/rs6000/dfp.md: Ditto.
15451         * config/rs6000/rs6000.md: Ditto.
15452         * config/rs6000/sync.md: Ditto.
15453         * config/rs6000/vector.md: Ditto.
15454         * config/rs6000/vsx.md: Ditto.
15456 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15458         * config/rs6000/altivec.md: Write output control strings as braced
15459         blocks instead of double-quoted strings.
15460         * config/rs6000/darwin.md: Ditto.
15461         * config/rs6000/rs6000.md: Ditto.
15462         * config/rs6000/vector.md: Ditto.
15463         * config/rs6000/vsx.md: Ditto.
15465 2018-02-21  Jason Merrill  <jason@redhat.com>
15467         PR c++/84314 - ICE with templates and fastcall attribute.
15468         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15470 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15472         * ipa-cp.c (determine_versionability): Fix comment typos.
15474 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15476         PR c/84229
15477         * ipa-cp.c (determine_versionability): Do not version functions caling
15478         va_arg_pack.
15480 2018-02-21  Martin Liska  <mliska@suse.cz>
15482         PR driver/83193
15483         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15484         Add "native" as a possible value.
15485         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15486         the macro when native cpu detection is available.
15488 2018-02-21  Martin Liska  <mliska@suse.cz>
15490         PR driver/83193
15491         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15492         Add "native" as a possible value.
15493         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15494         when native cpu detection is available.
15496 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15497             Martin Sebor  <msebor@redhat.com>
15499         PR tree-optimization/84478
15500         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15501         false.
15502         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15503         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15504         support which is conservatively correct, for 2 only stay conservative
15505         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15506         argument to the 2 argument get_range_strlen, adjust 6 arg
15507         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15508         false.
15509         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15510         (gimple_fold_builtin_strlen): Pass true as last argument to
15511         get_range_strlen.
15513 2018-02-20  Martin Sebor  <msebor@redhat.com>
15515         PR middle-end/84095
15516         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15517         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15518         (builtin_memref::builtin_memref): Factor out parts into
15519         set_base_and_offset and call it.
15521 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15523         PR middle-end/84406
15524         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15525         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15526         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15527         search at the associated MODE_INT.
15529 2018-02-20  Jeff Law  <law@redhat.com>
15531         PR middle-end/82123
15532         PR tree-optimization/81592
15533         PR middle-end/79257
15534         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15535         for range data rather than using global data.
15536         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15537         range data rather than using global data.
15538         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15539         pass it to children as needed.
15540         (struct directive::fmtresult): Similarly.
15541         (struct directive::set_width): Similarly.
15542         (struct directive::set_precision): Similarly.
15543         (format_integer, format_directive, parse_directive): Similarly.
15544         (format_none): Accept unnamed vr_values parameter.
15545         (format_percent, format_floating, format_character): Similarly.
15546         (format_string, format_plain): Similarly.
15547         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15548         the EVRP range analyzer for range data rather than using global data.
15549         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15550         gimple-ssa-evrp-analyze.h
15551         (class sprintf_dom_walker): Add after_dom_children member function.
15552         Add evrp_range_analyzer member.
15553         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15554         range analyzer as needed.
15555         (sprintf_dom_walker::after_dom_children): New member function.
15556         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15557         if not optimizing.
15558         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15559         (evrp_range_analyzer::pop_to_marker): Likewise.
15561 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15563         PR tree-optimization/84419
15564         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15565         with the required type if its current type is compatible but
15566         different.
15568 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15570         PR middle-end/82004
15571         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15572         after vectorization.
15574 2018-02-20  Martin Liska  <mliska@suse.cz>
15576         PR driver/83193
15577         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15578         possible values if we don't have a hint.
15580 2018-02-20  Martin Liska  <mliska@suse.cz>
15582         PR c/84310
15583         PR target/79747
15584         * final.c (shorten_branches): Build align_tab array with one
15585         more element.
15586         * opts.c (finish_options): Add alignment option limit check.
15587         (MAX_CODE_ALIGN): Likewise.
15588         (MAX_CODE_ALIGN_VALUE): Likewise.
15589         * doc/invoke.texi: Document maximum allowed option value for
15590         all -falign-* options.
15592 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15594         PR target/84146
15595         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15596         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15597         * var-tracking.c (emit_note_insn_var_location): Remove all references
15598         to NOTE_INSN_CALL_ARG_LOCATION.
15599         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15600         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15601         Use copy_rtx_if_shared.
15602         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15603         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15604         (dwarf2out_var_location): Remove handling of
15605         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15606         on call_insn.
15607         * final.c (final_scan_insn): Remove all references to
15608         NOTE_INSN_CALL_ARG_LOCATION.
15609         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15610         before dumping final insns.
15611         * except.c (emit_note_eh_region_end): Remove all references to
15612         NOTE_INSN_CALL_ARG_LOCATION.
15613         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15614         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15615         * config/arc/arc.c (hwloop_optimize): Likewise.
15616         * config/arm/arm.c (create_fix_barrier): Likewise.
15617         * config/s390/s390.c (s390_chunkify_start): Likewise.
15618         * config/sh/sh.c (find_barrier): Likewise.
15619         * config/i386/i386.c (rest_of_insert_endbranch,
15620         ix86_seh_fixup_eh_fallthru): Likewise.
15621         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15622         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15623         * config/frv/frv.c (frv_function_prologue): Likewise.
15624         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15625         reg note.
15626         (note_outside_basic_block_p): Remove all references to
15627         NOTE_INSN_CALL_ARG_LOCATION.
15628         * gengtype.c (adjust_field_rtx_def): Likewise.
15629         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15630         Likewise.
15631         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15632         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15634         PR c++/84444
15635         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15636         is ADDR_EXPR.
15638         PR tree-optimization/84452
15639         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15640         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15641         is NULL.
15643 2018-02-19  Martin Liska  <mliska@suse.cz>
15645         PR sanitizer/82183
15646         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15648 2018-02-19  Martin Liska  <mliska@suse.cz>
15649             Richard Sandiford  <richard.sandiford@linaro.org>
15651         PR tree-optimization/82491
15652         * gimple-fold.c (get_base_constructor): Make earlier bail out
15653         to prevent ubsan.
15655 2018-02-19  Carl Love  <cel@us.ibm.com>
15657         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15658         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15659         BU_P8V_OVERLOAD_1.
15660         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15661         P8V_BUILTIN_VEC_NEG.
15663 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
15665         * config/rl78/rl78.md (movdf): New define expand.
15667 2018-02-19  Martin Liska  <mliska@suse.cz>
15669         PR other/80589
15670         * doc/invoke.texi: Fix typo.
15671         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15673 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
15675         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15676         handle rs6000_single_float and rs6000_double_float specially for
15677         e500 family CPUs.
15679 2018-02-16  Jeff Law  <law@redhat.com>
15681         * config/rx/rx.c (add_pop_cfi_notes): New function.;
15682         (pop_regs): Use it.
15684 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15686         PR ipa/84425
15687         * ipa-inline.c (inline_small_functions): Fix a typo.
15689 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15691         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15693 2018-02-16  Carl Love  <cel@us.ibm.com>
15695         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15696         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15697         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15698         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15699         expansion to P8V_BUILTIN_VEC_FLOAT2.
15701 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
15703         PR rtl-optimization/70023
15704         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15705         src_regno into account.
15707 2018-02-16  Carl Love  <cel@us.ibm.com>
15709         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15710         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15711         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15712         * config/rs6000/rs6000.c: Remove case statements for
15713         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15714         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15715         and P9V_BUILTIN_VEC_VINSERT4B.
15716         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15717         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15718         * config/rs6000/vsx.md:
15719         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15720         vec_insert4b.
15722 2018-02-16  Carl Love  <cel@us.ibm.com>
15724         * config/rs6000/altivec.h: Add builtin names vec_extract4b
15725         vec_insert4b.
15726         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15727         definitions.
15728         * config/rs6000/rs6000-c.c: Add the definitions for
15729         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15730         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15731         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15732         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
15733         definition for insert4b and define insn *insert3b_internal.
15734         * doc/extend.texi: Add documentation for vec_extract4b.
15736 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15738         * doc/extend.texi (Backwards Compatibility): Mention friend
15739         injection.  Note for-scope is deprecated.
15740         * doc/invoke.texi (-ffriend-injection): Deprecate.
15742 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
15744         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15745         that moved to I2, also allow destinations that are a paradoxical
15746         subreg (instead of a normal reg).
15748 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
15750         PR target/83831
15751         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15752         to QImode.
15754 2018-02-16  Richard Biener  <rguenther@suse.de>
15756         PR tree-optimization/84037
15757         PR tree-optimization/84016
15758         PR target/82862
15759         * config/i386/i386.c (ix86_builtin_vectorization_cost):
15760         Adjust vec_construct for the fact we need additional higher latency
15761         128bit inserts for AVX256 and AVX512 vector builds.
15762         (ix86_add_stmt_cost): Scale vector construction cost for
15763         elementwise loads.
15765 2018-02-16  Richard Biener  <rguenther@suse.de>
15767         PR tree-optimization/84417
15768         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15769         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15770         (non_rewritable_lvalue_p): Likewise, use poly-ints.
15772 2018-02-16  Martin Liska  <mliska@suse.cz>
15774         PR sanitizer/84307
15775         * internal-fn.def (ASAN_CHECK): Set proper flags.
15776         (ASAN_MARK): Likewise.
15778 2018-02-16  Julia Koval  <julia.koval@intel.com>
15780         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15781         from PTA_CANNONLAKE.
15783 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15785         PR target/84272
15786         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15787         Use ++iter rather than iter++ for std::list iterators.
15788         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
15789         defer deleting them until all nodes in the forest are processed.  Do
15790         free even leaf nodes.  Change to_process into auto_vec.
15792         PR bootstrap/84405
15793         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15794         * vec.h (vec_default_construct): Use memset instead of placement new
15795         if BROKEN_VALUE_INITIALIZATION is defined.
15796         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15797         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15798         is defined.
15800         PR rtl-optimization/83723
15801         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15802         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
15803         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
15804         recursive calls.
15805         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15806         callers.
15807         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15809 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
15811         PR rtl-optimization/81443
15812         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15813         from inner REGs to paradoxical SUBREGs.
15815 2018-02-16  Richard Biener  <rguenther@suse.de>
15817         PR tree-optimization/84399
15818         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15819         For operands we can analyze at their definition make sure we can
15820         analyze them at each use as well.
15822 2018-02-16  Richard Biener  <rguenther@suse.de>
15824         PR tree-optimization/84190
15825         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15826         volatile accesses if the decl isn't volatile.
15828 2018-02-15  Jason Merrill  <jason@redhat.com>
15830         PR c++/84314 - ICE with templates and fastcall attribute.
15831         * attribs.c (build_type_attribute_qual_variant): Don't clobber
15832         TYPE_CANONICAL on an existing type.
15834 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15836         PR tree-optimization/84383
15837         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15838         dstoff nor call operand_equal_p if dstbase is NULL.
15840         PR tree-optimization/84334
15841         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15842         also a CONSTANT_CLASS_P, punt.
15844 2018-02-14  Jim Wilson  <jimw@sifive.com>
15846         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15847         first SMALL_OPERAND check.  New local min_second_step.  Move assert
15848         to where locals are set.  Add TARGET_RVC support.
15849         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15851 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
15853         * doc/invoke.texi: Correct -Wformat-overflow code sample.
15855 2018-02-14  Martin Sebor  <msebor@redhat.com>
15857         PR tree-optimization/83698
15858         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15859         arrays constrain the offset range to their bounds.
15860         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15861         (builtin_access::overlap): Avoid setting the size of overlap if it's
15862         already been set.
15863         (maybe_diag_overlap): Also consider arrays when deciding what values
15864         of offsets to include in diagnostics.
15866 2018-02-14  Martin Sebor  <msebor@redhat.com>
15868         PR c/84108
15869         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15870         that correspond to the kind of a declaration.
15872 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
15874         PR target/83984
15875         * config/pa/pa.md: Load address of PIC label using the linkage table
15876         if the label is nonlocal.
15878 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15880         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15881         warning message if user requests -maltivec=be.
15882         * doc/invoke.texi: Document deprecation of -maltivec=be.
15884 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
15886         PR target/84220
15887         * config/rs6000/rs6000-c.c: Update definitions for
15888         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15889         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15891 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15893         PR target/84239
15894         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15895         add _get_ssp intrinsics. Remove argument from
15896         __builtin_ia32_rdssp[d|q].
15897         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15898         * config/i386/i386-builtin.def: Remove argument from
15899         __builtin_ia32_rdssp[d|q].
15900         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15901         ix86_expand_special_args_builtin for _rdssp[d|q].
15902         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15903         Clear register before usage.
15904         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15905         Add documentation for new _get_ssp and _inc_ssp intrinsics.
15907 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
15909         PR tree-optimization/84357
15910         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15911         operand 1 of an ARRAY_REF too.
15913 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
15915         PR target/83831
15916         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15917         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15918         declarations.
15919         (set_of_reg): New struct.
15920         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15921         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15922         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15923         functions.
15924         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15925         Split into bitclr, bitset, bitinvert patterns if appropriate.
15926         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15927         use rx_fuse_in_memory_bitop.
15928         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15929         to named insn, correct maximum insn length.
15931 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
15933         PR target/79242
15934         * machmode.def: Define a complex mode for PARTIAL_INT.
15935         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15936         MODE_PARTIAL_INT.
15937         * doc/rtl.texi: Document CSPImode.
15938         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15939         handling.
15940         (msp430_hard_regno_nregs_with_padding): Likewise.
15942 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
15944         PR target/84279
15945         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15947 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
15949         PR rtl-optimization/84169
15950         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
15951         we generated a parallel as new i3 and we split that to new i2 and i3
15952         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
15953         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
15954         those to i2, not i1.  Partially rewrite this scan code.
15956 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15958         PR c/82210
15959         * stor-layout.c (place_field): For variable length fields, adjust
15960         offset_align afterwards not just based on the field's alignment,
15961         but also on the size.
15963         PR middle-end/84309
15964         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15965         of exps and logs in the use_exp2 case.
15967 2018-02-13  Jeff Law  <law@redhat.com>
15969         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15970         entry for "vector".
15972         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15973         ARGS as unused.
15975 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
15977         PR debug/84342
15978         PR debug/84319
15979         * common.opt (gas-loc-support, gas-locview-support): New.
15980         (ginline-points, ginternal-reset-location-views): New.
15981         * doc/invoke.texi: Document them.  Use @itemx where intended.
15982         (gvariable-location-views): Adjust.
15983         * target.def (reset_location_view): New.
15984         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15985         (TARGET_RESET_LOCATION_VIEW): New.
15986         * doc/tm.texi: Rebuilt.
15987         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15988         (dwarf2out_default_as_locview_support): New.
15989         (output_asm_line_debug_info): Use option variables.
15990         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15991         (output_loc_list): Likewise.
15992         (add_high_low_attributes): Check option variables.
15993         Don't output entry view attribute in strict mode.
15994         (gen_inlined_subroutine_die): Check option variables.
15995         (dwarf2out_inline_entry): Likewise.
15996         (init_sections_and_labels): Likewise.
15997         (dwarf2out_early_finish): Likewise.
15998         (maybe_reset_location_view): New, from...
15999         (dwarf2out_var_location): ... here.  Call it.
16000         * debug.h (dwarf2out_default_as_loc_support): Declare.
16001         (dwarf2out_default_as_locview_support): Declare.
16002         * hooks.c (hook_int_rtx_insn_0): New.
16003         * hooks.h (hook_int_rtx_insn_0): Declare.
16004         * toplev.c (process_options): Take -gas-loc-support and
16005         -gas-locview-support from dwarf2out.  Enable
16006         -gvariable-location-views by default only with locview
16007         assembler support.  Enable -ginternal-reset-location-views by
16008         default only if the target defines the corresponding hook.
16009         Enable -ginline-points by default if location views are
16010         enabled; force it disabled if statement frontiers are
16011         disabled.
16012         * tree-inline.c (expand_call_inline): Check option variables.
16013         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16015 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16017         PR tree-optimization/84321
16018         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16019         handling.  Also check whether the anti-range contains any values
16020         that satisfy the mask; switch to a VR_RANGE if not.
16022 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16024         PR sanitizer/84340
16025         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16027 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16029         PR c++/83990
16030         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16031         of call statements, also set location of a load to a temporary.
16033 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16035         * config/rl78/rl78.c (add_vector_labels): New function.
16036         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16037         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16038         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16039         which checks that no arguments are passed.
16040         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16041         * doc/extend.texi: Documentation for the new attribute.
16043 2018-02-13  Andreas Schwab  <schwab@suse.de>
16045         * config/riscv/linux.h (CPP_SPEC): Define.
16047 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16049         PR target/84335
16050         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16051         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16052         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16053         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16054         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16055         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16056         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16057         temporarily for AES and PCLMUL builtins.
16059         PR tree-optimization/84339
16060         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16061         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16062         Formatting fixes.
16064         PR middle-end/84309
16065         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16066         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16067         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16068         inline function.
16069         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16070         inline function.
16071         * omp-simd-clone.h: New file.
16072         * omp-simd-clone.c: Include omp-simd-clone.h.
16073         (expand_simd_clones): No longer static.
16074         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16075         cgraph.h and omp-simd-clone.h.
16076         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16077         (vect_recog_widen_shift_pattern): Formatting fix.
16078         (vect_pattern_recog_1): Don't check optab for calls.
16080         PR target/84336
16081         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16082         operands[2] into a REG before using gen_lowpart on it.
16084 2018-02-12  Jeff Law  <law@redhat.com>
16086         PR target/83760
16087         * config/sh/sh.c (find_barrier): Consider a sibling call
16088         a barrier as well.
16090         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16091         successfully back substituting a reg.
16093 2018-02-12  Richard Biener  <rguenther@suse.de>
16095         PR tree-optimization/84037
16096         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16097         parameter, move visited init to caller.
16098         (vect_slp_analyze_operations): Separate cost from validity
16099         check, initialize visited once for all instances.
16100         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16101         for all instances.
16102         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16103         out an assert.
16104         (vect_model_promotion_demotion_cost): Likewise.
16105         (vectorizable_bswap): Guard cost modeling with !slp_node
16106         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16107         SLP stmts.
16108         (vectorizable_call): Likewise.
16109         (vectorizable_conversion): Likewise.
16110         (vectorizable_assignment): Likewise.
16111         (vectorizable_shift): Likewise.
16112         (vectorizable_operation): Likewise.
16113         (vectorizable_store): Likewise.
16114         (vectorizable_load): Likewise.
16115         (vectorizable_condition): Likewise.
16116         (vectorizable_comparison): Likewise.
16118 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16120         PR sanitizer/84307
16121         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16122         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16123         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16125 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16127         PR middle-end/83665
16128         * params.def (inline-min-speedup): Increase from 8 to 15.
16129         (max-inline-insns-auto): Decrease from 40 to 30.
16130         * ipa-split.c (consider_split): Add some buffer for function to
16131         be considered inlining candidate.
16132         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16133         default values.
16135 2018-02-12  Richard Biener  <rguenther@suse.de>
16137         PR tree-optimization/84037
16138         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16139         matched stmts if we cannot swap the non-matched ones.
16141 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16143         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16144         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16145         _mm_maskz_scalef_round_ss): New intrinsics.
16146         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16147         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16148         __builtin_ia32_scalefss_round): Remove.
16149         (__builtin_ia32_scalefsd_mask_round,
16150         __builtin_ia32_scalefss_mask_round): New intrinsics.
16151         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16152         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16153         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16154         "<round_constraint>")): Changed to ...
16155         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16156         "<round_scalar_constraint>")): ... this.
16157         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16158         %0, %1, %2<round_op3>}"): Changed to ...
16159         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16160         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16161         %2<round_scalar_mask_op3>}"): ... this.
16162         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16164 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16166         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16167         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16168         (_mm_maskz_sqrt_round_ss): New intrinsics.
16169         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16170         (__builtin_ia32_sqrtsd_mask_round)
16171         (__builtin_ia32_sqrtss_mask_round): New builtins.
16172         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16173         (__builtin_ia32_sqrtss_round): Remove.
16174         (__builtin_ia32_sqrtsd_mask_round)
16175         (__builtin_ia32_sqrtss_mask_round): New builtins.
16176         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16177         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16178         ((match_operand:VF_128 1 "vector_operand"
16179         "xBm,<round_constraint>")): Changed to ...
16180         ((match_operand:VF_128 1 "vector_operand"
16181         "xBm,<round_scalar_constraint>")): ... this.
16182         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16183         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16184         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16185         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16186         %<iptr>1<round_scalar_mask_op3>}): ... this.
16187         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16188         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16190 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16192         PR target/84266
16193         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16194         Cast vec_cmpeq result to correct type.
16195         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16196         Cast vec_cmpgt result to correct type.
16198 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16200         * final.c (final_scan_insn_1): Renamed from...
16201         (final_scan_insn): ... this.  New wrapper, to recover
16202         seen from the outermost call in recursive ones.
16203         * config/sparc/sparc.c (output_return): Drop seen from call.
16204         (output_sibcall): Likewise.
16205         * config/visium/visium.c (output_branch): Likewise.
16207 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16209         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16210         function label.
16212 2018-02-10  Alan Modra  <amodra@gmail.com>
16214         PR target/84300
16215         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16216         Specify LR as an input.
16218 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16220         PR sanitizer/83987
16221         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16222         remove_member_access_dummy_vars): New functions.
16223         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16224         lower_omp_1, execute_lower_omp): Use them.
16226         PR rtl-optimization/84308
16227         * shrink-wrap.c (spread_components): Release todo vector.
16229 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16231         PR rtl-optimization/57193
16232         * ira-color.c (struct allocno_color_data): Add member
16233         conflict_allocno_hard_prefs.
16234         (update_conflict_allocno_hard_prefs): New.
16235         (bucket_allocno_compare_func): Add a preference based on
16236         conflict_allocno_hard_prefs.
16237         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16238         (color_allocnos): Remove a dead code.  Initiate
16239         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16241 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16243         PR target/84226
16244         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16245         constraint from =wa to wa.  Avoid a subreg on the output operand,
16246         instead use a pseudo and subreg it in a move.
16247         (p9_xxbrd_<mode>): Changed to ...
16248         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16249         (p9_xxbrd_v2df): New expander.
16250         (p9_xxbrw_<mode>): Changed to ...
16251         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16252         (p9_xxbrw_v4sf): New expander.
16254 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16256         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16258 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16260         PR target/83926
16261         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16262         multiply in 32-bit mode.
16263         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16264         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16265         mode.
16267 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16269         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16270         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16271         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16272         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16274 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16276         PR lto/84213
16277         * dwarf2out.c (is_trivial_indirect_ref): New function.
16278         (dwarf2out_late_global_decl): Do not generate a location
16279         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16280         and that are not defined in the current unit.
16282 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16284         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16285         instead of a libcall for UNORDERED.
16287 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16289         PR target/82641
16290         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16291         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16293 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16295         PR target/PR84295
16296         * config/s390/s390.c (s390_set_current_function): Invoke
16297         s390_indirect_branch_settings also if fndecl didn't change.
16299 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16301         * config/rs6000/rs6000.md (blockage): Set length to zero.
16303 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16305         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16307 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16309         PR sanitizer/84285
16310         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16311         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16312         -static-lib*san.
16314         PR debug/84252
16315         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16316         PARALLEL incoming that failed vt_get_decl_and_offset check.
16318         PR middle-end/84237
16319         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16320         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16321         TREE_READONLY bit.
16322         (get_variable_section): For decls in named .bss* sections pass true as
16323         second argument to bss_initializer_p.
16325 2018-02-09  Marek Polacek  <polacek@redhat.com>
16326             Jakub Jelinek  <jakub@redhat.com>
16328         PR c++/83659
16329         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16330         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16331         Sync some changes from cxx_fold_indirect_ref.
16333 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16335         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16336         markers.
16337         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16338         (BLOCK_INLINE_ENTRY_LABEL): New.
16339         (dwarf2out_var_location): Disregard inline entry markers.
16340         (inline_entry_data): New struct.
16341         (inline_entry_data_hasher): New hashtable type.
16342         (inline_entry_data_hasher::hash): New.
16343         (inline_entry_data_hasher::equal): New.
16344         (inline_entry_data_table): New variable.
16345         (add_high_low_attributes): Add DW_AT_entry_pc and
16346         DW_AT_GNU_entry_view attributes if a pending entry is found
16347         in inline_entry_data_table.  Add old entry_pc attribute only
16348         if debug nonbinding markers are disabled.
16349         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16350         markers are enabled.
16351         (block_within_block_p, dwarf2out_inline_entry): New.
16352         (dwarf2out_finish): Check that no entries remained in
16353         inline_entry_data_table.
16354         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16355         (final_scan_insn, notice_source_line): Likewise.
16356         (rest_of_clean_state): Skip inline entry markers.
16357         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16358         markers.
16359         * gimple.c (gimple_build_debug_inline_entry): New.
16360         * gimple.h (enum gimple_debug_subcode): Add
16361         GIMPLE_DEBUG_INLINE_ENTRY.
16362         (gimple_build_debug_inline_entry): Declare.
16363         (gimple_debug_inline_entry_p): New.
16364         (gimple_debug_nonbind_marker_p): Adjust.
16365         * insn-notes.def (INLINE_ENTRY): New.
16366         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16367         inline entry marker notes.
16368         (print_insn): Likewise.
16369         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16370         (INSN_DEBUG_MARKER_KIND): Likewise.
16371         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16372         * tree-inline.c (expand_call_inline): Build and insert
16373         debug_inline_entry stmt.
16374         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16375         inline entry blocks early, if nonbind markers are enabled.
16376         (dump_scope_block): Dump fragment info.
16377         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16378         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16379         (gimple_build_debug_inline_entry): New.
16380         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16381         Enable/disable inline entry points too.
16382         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16383         (DEBUG_INSN): Describe inline entry markers.
16385         * common.opt (gvariable-location-views): New.
16386         (gvariable-location-views=incompat5): New.
16387         * config.in: Rebuilt.
16388         * configure: Rebuilt.
16389         * configure.ac: Test assembler for view support.
16390         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16391         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16392         * dwarf2out.c (var_loc_view): New typedef.
16393         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16394         (dwarf2out_locviews_in_attribute): New.
16395         (dwarf2out_locviews_in_loclist): New.
16396         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16397         (enum dw_line_info_opcode): Add LI_adv_address.
16398         (struct dw_line_info_table): Add view.
16399         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16400         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16401         (zero_view_p): New variable.
16402         (ZERO_VIEW_P): New macro.
16403         (output_asm_line_debug_info): New.
16404         (struct var_loc_node): Add view.
16405         (add_AT_view_list, AT_loc_list): New.
16406         (add_var_loc_to_decl): Add view param.  Test it against last.
16407         (new_loc_list): Add view params.  Record them.
16408         (AT_loc_list_ptr): Handle loc and view lists.
16409         (view_list_to_loc_list_val_node): New.
16410         (print_dw_val): Handle dw_val_class_view_list.
16411         (size_of_die): Likewise.
16412         (value_format): Likewise.
16413         (loc_list_has_views): New.
16414         (gen_llsym): Set vl_symbol too.
16415         (maybe_gen_llsym, skip_loc_list_entry): New.
16416         (dwarf2out_maybe_output_loclist_view_pair): New.
16417         (output_loc_list): Output view list or entries too.
16418         (output_view_list_offset): New.
16419         (output_die): Handle dw_val_class_view_list.
16420         (output_dwarf_version): New.
16421         (output_compilation_unit_header): Use it.
16422         (output_skeleton_debug_sections): Likewise.
16423         (output_rnglists, output_line_info): Likewise.
16424         (output_pubnames, output_aranges): Update version comments.
16425         (output_one_line_info_table): Output view numbers in asm comments.
16426         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16427         Call maybe_gen_llsym.
16428         (loc_list_from_tree_1): Adjust.
16429         (add_AT_location_description): Create view list attribute if
16430         needed, check it's absent otherwise.
16431         (convert_cfa_to_fb_loc_list): Adjust.
16432         (maybe_emit_file): Call output_asm_line_debug_info for test.
16433         (dwarf2out_var_location): Reset views as needed.  Precompute
16434         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16435         attribute.  Set view.
16436         (new_line_info_table): Reset next view.
16437         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16438         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16439         the assembler, or select appropriate line info opcodes.
16440         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16441         (optimize_string_length): Catch it.  Adjust.
16442         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16443         dw_val_class_view_list, and remove it if no longer needed.
16444         (hash_loc_list): Hash view numbers.
16445         (loc_list_hasher::equal): Compare them.
16446         (optimize_location_lists): Check whether a view list symbol is
16447         needed, and whether the locview attribute is present, and
16448         whether they match.  Remove the locview attribute if no longer
16449         needed.
16450         (index_location_lists): Call skip_loc_list_entry for test.
16451         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16452         Use output_dwarf_version.
16453         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16454         (struct dw_val_node): Add val_view_list.
16455         * final.c (SEEN_NEXT_VIEW): New.
16456         (set_next_view_needed): New.
16457         (clear_next_view_needed): New.
16458         (maybe_output_next_view): New.
16459         (final_start_function): Rename to...
16460         (final_start_function_1): ... this.  Take pointer to FIRST,
16461         add SEEN parameter.  Emit param bindings in the initial view.
16462         (final_start_function): Reintroduce SEEN-less interface.
16463         (final): Rename to...
16464         (final_1): ... this.  Take SEEN parameter.  Output final pending
16465         next view at the end.
16466         (final): Reintroduce seen-less interface.
16467         (final_scan_insn): Output pending next view before switching
16468         sections or ending a block.  Mark the next view as needed when
16469         outputting variable locations.  Notify debug backend of section
16470         changes, and of location view changes.
16471         (rest_of_handle_final): Adjust.
16472         * toplev.c (process_options): Autodetect value for debug variable
16473         location views option.  Warn on incompat5 without -gdwarf-5.
16474         * doc/invoke.texi (gvariable-location-views): New.
16475         (gvariable-location-views=incompat5): New.
16476         (gno-variable-location-views): New.
16478 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16480         PR tree-optimization/84136
16481         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16482         that the result of find_edge is non-NULL.
16484 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16486         PR target/83008
16487         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16488         storing integer register in SImode.  Fix cost of 256 and 512
16489         byte aligned SSE register store.
16491 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16493         * config/i386/i386.c (ix86_multiplication_cost): Fix
16494         multiplication cost for TARGET_AVX512DQ.
16496 2018-02-08  Marek Polacek  <polacek@redhat.com>
16498         PR tree-optimization/84238
16499         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16500         get_range_strlen.
16502 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16504         PR tree-optimization/84265
16505         * tree-vect-stmts.c (vectorizable_store): Don't treat
16506         VMAT_CONTIGUOUS accesses as grouped.
16507         (vectorizable_load): Likewise.
16509 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16511         PR tree-optimization/81635
16512         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16513         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16514         (test_round_for_mask): New functions.
16515         (wide_int_cc_tests): Call test_round_for_mask.
16516         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16517         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16518         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16519         range returned by get_range_info.
16521 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16523         PR ipa/81360
16524         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16525         * symtab.c: Include builtins.h
16526         (symtab_node::output_to_lto_symbol_table_p): Move here
16527         from lto-streamer-out.c:output_symbol_p.
16528         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16529         (output_symbol_p): Move all logic to symtab.c
16530         (produce_symtab): Update.
16532 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16534         * config/s390/s390-opts.h (enum indirect_branch): Define.
16535         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16536         (s390_indirect_branch_via_thunk)
16537         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16538         (enum s390_indirect_branch_type): Define.
16539         * config/s390/s390.c (struct s390_frame_layout, struct
16540         machine_function): Remove.
16541         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16542         (indirect_branch_table_label_no, indirect_branch_table_name):
16543         Define variables.
16544         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16545         (enum s390_indirect_branch_option): Define.
16546         (s390_return_addr_from_memory): New function.
16547         (s390_handle_string_attribute): New function.
16548         (s390_attribute_table): Add new attribute handler.
16549         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16550         (s390_indirect_branch_via_thunk): New function.
16551         (s390_indirect_branch_via_inline_thunk): New function.
16552         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16553         sibling call optimization for non z10 compiles.
16554         (s390_emit_call): Force indirect branch target to be a single
16555         register.  Add r1 clobber for non-z10 compiles.
16556         (s390_emit_epilogue): Emit return jump via return_use expander.
16557         (s390_reorg): Handle JUMP_INSNs as execute targets.
16558         (s390_option_override_internal): Perform validity checks for the
16559         new command line options.
16560         (s390_indirect_branch_attrvalue): New function.
16561         (s390_indirect_branch_settings): New function.
16562         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16563         (s390_output_indirect_thunk_function):  New function.
16564         (s390_code_end): Implement target hook.
16565         (s390_case_values_threshold): Implement target hook.
16566         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16567         macros.
16568         * config/s390/s390.h (struct s390_frame_layout)
16569         (struct machine_function): Move here from s390.c.
16570         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16571         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16572         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16573         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16574         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16575         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16576         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16577         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16578         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16579         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16580         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16581         (mnemonic attribute): Add values which aren't recognized
16582         automatically.
16583         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16584         pattern for branch conversion.  Fix mnemonic attribute.
16585         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16586         indirect branch via thunk if requested.
16587         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16588         ("*indirect_jump"): Disable for branch conversion using out of
16589         line thunks.
16590         ("indirect_jump_via_thunk<mode>_z10")
16591         ("indirect_jump_via_thunk<mode>")
16592         ("indirect_jump_via_inlinethunk<mode>_z10")
16593         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16594         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16595         ("casesi_jump_via_inlinethunk<mode>_z10")
16596         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16597         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16598         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16599         ("*indirect2_jump"): Disable for branch conversion.
16600         ("casesi_jump"): Turn into expander and expand patterns for branch
16601         conversion.
16602         ("return_use"): New expander.
16603         ("*return"): Emit return via thunk and rename it to ...
16604         ("*return<mode>"): ... this one.
16605         * config/s390/s390.opt: Add new options and and enum for the
16606         option values.
16608 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16610         * lra-constraints.c (match_reload): Unconditionally use
16611         gen_lowpart_SUBREG, rather than selecting between that
16612         and equivalent gen_rtx_SUBREG code.
16614 2018-02-08  Richard Biener  <rguenther@suse.de>
16616         PR tree-optimization/84233
16617         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16618         changed flag instead of boguously re-using phi_inserted.
16620 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16622         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16623         static local variables.
16625 2018-02-08  Richard Biener  <rguenther@suse.de>
16627         PR tree-optimization/84278
16628         * tree-vect-stmts.c (vectorizable_store): When looking for
16629         smaller vector types to perform grouped strided loads/stores
16630         make sure the mode is supported by the target.
16631         (vectorizable_load): Likewise.
16633 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16635         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16636         Increase LDP/STP opportunities by adding adjacent callee-saves.
16638 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16640         PR rtl-optimization/84068
16641         PR rtl-optimization/83459
16642         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16644 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16646         PR tree-optimization/84224
16647         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16648         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16649         non-zero arguments.
16651 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
16653         PR target/84113
16654         * config/rs6000/altivec.md (*restore_world): Remove LR use.
16655         * config/rs6000/predicates.md (restore_world_operation): Adjust op
16656         count, remove one USE.
16658 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16660         * doc/install.texi (Configuration): Document the
16661         --with-long-double-format={ibm,ieee} PowerPC configuration
16662         options.
16664         PR target/84154
16665         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16666         Convert from define_expand to be define_insn_and_split.  Rework
16667         float/double/_Float128 conversions to QI/HI/SImode to work with
16668         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
16669         conversions to QI/HImode types did a store and then a load to
16670         truncate the value.  For conversions to VSX registers, don't split
16671         the insn, instead emit the code directly.  Use the code iterator
16672         any_fix to combine signed and unsigned conversions.
16673         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16674         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16675         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16676         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16677         (fix_<mode>di2_hw): Likewise.
16678         (fixuns_<mode>di2_hw): Likewise.
16679         (fix_<mode>si2_hw): Likewise.
16680         (fixuns_<mode>si2_hw): Likewise.
16681         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16682         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16683         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16684         fix<uns>_trunc<SFDF:mode>si2_p8.
16685         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16686         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16687         (fix<uns>_<mode>_mem): Likewise.
16688         (fctiw<u>z_<mode>_mem): Likewise.
16689         (fix<uns>_<mode>_mem): Likewise.
16690         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16691         the register allocator from doing a direct move to the GPRs to do
16692         a store, and instead use the ISA 3.0 store byte/half-word from
16693         vector register instruction.  For IEEE 128-bit floating point,
16694         also optimize stores of 32-bit ints.
16695         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16697 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
16699         * genextract.c (push_pathstr_operand): New function to support
16700         [a-zA-Z].
16701         (walk_rtx): Call push_pathstr_operand.
16702         (print_path): Support [a-zA-Z].
16704 2018-02-07  Richard Biener  <rguenther@suse.de>
16706         PR tree-optimization/84037
16707         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16708         (cse_and_gimplify_to_preheader): Declare.
16709         (vect_get_place_in_interleaving_chain): Likewise.
16710         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16711         ivexpr_map.
16712         (_loop_vec_info::~_loop_vec_info): Delete it.
16713         (cse_and_gimplify_to_preheader): New function.
16714         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16715         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16716         (vectorizable_load): Likewise.  For grouped stores always base
16717         the IV on the first element.
16718         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16719         condition before gimplifying.
16721 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16723         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16724         *DIV_EXPR and *MOD_EXPR.
16726 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
16728         PR target/84248
16729         * config/i386/i386.c (ix86_option_override_internal): Mask out
16730         the CF_SET bit when checking -fcf-protection.
16732 2018-02-07  Tom de Vries  <tom@codesourcery.com>
16734         PR libgomp/84217
16735         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16736         enough.
16738 2018-02-07  Richard Biener  <rguenther@suse.de>
16740         PR tree-optimization/84204
16741         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16742         this place.
16744         PR tree-optimization/84205
16745         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16746         special-case isl_ast_op_zdiv_r.
16748         PR tree-optimization/84223
16749         * graphite-scop-detection.c (gather_bbs::before_dom_children):
16750         Only add conditions from within the region.
16751         (gather_bbs::after_dom_children): Adjust.
16753 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
16755         PR target/84209
16756         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16757         * config/avr/avr.md: Only post-reload split REG-REG moves if
16758         either register is GENERAL_REG_P.
16760 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16762         PR tree-optimization/84235
16763         * tree-ssa-scopedtables.c
16764         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16765         if the subtraction is performed in floating point type where NaNs are
16766         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16767         build 1.  Formatting fix.
16769 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
16771         PR target/84146
16772         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16773         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16774         and skip it regardless of bb boundaries.  Use CALL_P macro,
16775         don't test INSN_P (insn) together with CALL_P or JUMP_P check
16776         unnecessarily, formatting fix.
16778 2018-02-06  Michael Collison  <michael.collison@arm.com>
16780         * config/arm/thumb2.md:
16781         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16782         (*thumb_mov_notscc): Ditto.
16784 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
16786         PR target/84154
16787         * config/rs6000/rs6000.md (su code attribute): Use "u" for
16788         unsigned_fix, not "s".
16790 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16792         * configure.ac (gcc_fn_eh_frame_ro): New function.
16793         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16794         correct .eh_frame permissions.
16795         * configure: Regenerate.
16797 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
16799         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16800         irrelevant options.
16802 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16804         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16805         Display warning message for -mno-speculate-indirect-jumps.
16807 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
16809         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16810         Undocumented.
16811         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16813 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
16815         PR tree-optimization/84225
16816         * tree-eh.c (find_trapping_overflow): Only call
16817         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16819 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16821         PR target/84145
16822         * config/i386/i386.c: Reimplement the check of possible options
16823         -mibt/-mshstk conbination. Change error messages.
16824         * doc/invoke.texi: Fix a typo: remove extra '='.
16826 2018-02-06  Marek Polacek  <polacek@redhat.com>
16828         PR tree-optimization/84228
16829         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16831 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
16833         PR target/82641
16834         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16835         emitted arch directives.
16836         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16837         __ARM_FEATURE_COPROC before changing architectures.
16839 2018-02-06  Richard Biener  <rguenther@suse.de>
16841         * config/i386/i386.c (print_reg): Fix typo.
16842         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16844 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
16846         * configure: Regenerate.
16848 2018-02-05  Martin Sebor  <msebor@redhat.com>
16850         PR tree-optimization/83369
16851         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16852         inlining context.
16854 2018-02-05  Martin Liska  <mliska@suse.cz>
16856         * doc/invoke.texi: Cherry-pick upstream r323995.
16858 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
16860         * ira.c (ira_init_register_move_cost): Adjust comment.
16862 2018-02-05  Martin Liska  <mliska@suse.cz>
16864         PR gcov-profile/84137
16865         * doc/gcov.texi: Fix typo in documentation.
16867 2018-02-05  Martin Liska  <mliska@suse.cz>
16869         PR gcov-profile/83879
16870         * doc/gcov.texi: Document necessity of --dynamic-list-data when
16871         using dlopen functionality.
16873 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
16875         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16876         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16877         _mm_maskz_range_ss, _mm_mask_range_round_ss,
16878         _mm_maskz_range_round_ss): New intrinsics.
16879         (__builtin_ia32_rangesd128_round)
16880         (__builtin_ia32_rangess128_round): Remove.
16881         (__builtin_ia32_rangesd128_mask_round,
16882         __builtin_ia32_rangess128_mask_round): New builtins.
16883         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16884         __builtin_ia32_rangess128_round): Remove.
16885         (__builtin_ia32_rangesd128_mask_round,
16886         __builtin_ia32_rangess128_mask_round): New builtins.
16887         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16888         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16889         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16890         "<round_saeonly_constraint>")): Changed to ...
16891         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16892         "<round_saeonly_scalar_constraint>")): ... this.
16893         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16894         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16895         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16896         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16897         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16899 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
16901         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16902         options.
16903         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16904         Remove all values except native, 8540 and 8548.
16906 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
16908         * config/i386/i386.c (ix86_output_function_return): Pass
16909         INVALID_REGNUM, instead of -1, as invalid register number to
16910         indirect_thunk_name and output_indirect_thunk.
16912 2018-02-02  Julia Koval  <julia.koval@intel.com>
16914         * config.gcc: Add -march=icelake.
16915         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16916         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16917         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16918         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16919         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16920         (processor_target_table): Add icelake.
16921         (ix86_option_override_internal): Handle new PTAs.
16922         (get_builtin_code_for_version): Handle icelake.
16923         (M_INTEL_COREI7_ICELAKE): New.
16924         (fold_builtin_cpu): Handle icelake.
16925         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16926         * doc/invoke.texi: Add -march=icelake.
16928 2018-02-02  Julia Koval  <julia.koval@intel.com>
16930         * config/i386/i386.c (ix86_option_override_internal): Change flags type
16931         to wide_int_bitmask.
16932         * wide-int-bitmask.h: New.
16934 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16936         PR target/84066
16937         * config/i386/i386.md: Replace Pmode with word_mode in
16938         builtin_setjmp_setup and builtin_longjmp to support x32.
16940 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
16942         PR target/56010
16943         PR target/83743
16944         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16945         #include "opts.h".
16946         (rs6000_supported_cpu_names): New static variable.
16947         (linux_cpu_translation_table): Likewise.
16948         (elf_platform) <cpu>: Define new static variable and use it.
16949         Translate kernel AT_PLATFORM name to canonical name if needed.
16950         Error if platform name is unknown.
16952 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
16954         PR target/84089
16955         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16957 2018-02-01  Jeff Law  <law@redhat.com>
16959         PR target/84128
16960         * config/i386/i386.c (release_scratch_register_on_entry): Add new
16961         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
16962         the scratch if RELEASE_VIA_POP is false.
16963         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16964         If we have to save a temporary register, decrement SIZE appropriately.
16965         Pass new arguments to release_scratch_register_on_entry.
16966         (ix86_adjust_stack_and_probe): Likewise.
16967         (ix86_emit_probe_stack_range): Pass new arguments to
16968         release_scratch_register_on_entry.
16970 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
16972         PR rtl-optimization/84157
16973         * combine.c (change_zero_ext): Use REG_P predicate in
16974         front of HARD_REGISTER_P predicate.
16976 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
16978         * config/avr/avr.c (avr_option_override): Move disabling of
16979         -fdelete-null-pointer-checks to...
16980         * common/config/avr/avr-common.c (avr_option_optimization_table):
16981         ...here.
16983 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16985         PR tree-optimization/81635
16986         * tree-data-ref.c (split_constant_offset_1): For types that
16987         wrap on overflow, try to use range info to prove that wrapping
16988         cannot occur.
16990 2018-02-01  Renlin Li  <renlin.li@arm.com>
16992         PR target/83370
16993         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16994         TAILCALL_ADDR_REGS.
16995         (aarch64_register_move_cost): Likewise.
16996         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16997         TAILCALL_ADDR_REGS.
16998         (REG_CLASS_NAMES): Likewise.
16999         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17000         TAILCALL_ADDR_REGS. Remove IP registers.
17001         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17003 2018-02-01  Richard Biener  <rguenther@suse.de>
17005         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17006         for specifying RPO order and allow NULL for that.
17007         * domwalk.c (dom_walker::dom_walker): Likewise.
17008         (dom_walker::walk): Handle NULL RPO order.
17009         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17010         in RPO order.
17011         (rewrite_update_dom_walker): Likewise.
17012         (mark_def_dom_walker): Likewise.
17014 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17016         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17017         (aarch64_maybe_expand_sve_subreg_move): Declare.
17018         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17019         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17020         predicate.
17021         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17022         that are semantically a reverse operation.
17023         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17024         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17025         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17026         functions.
17027         (aarch64_can_change_mode_class): For big-endian, forbid changes
17028         between two SVE modes if they have different element sizes.
17030 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17032         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17033         the TImode handling for big-endian targets.
17035 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17037         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17038         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17039         not just bytes.
17040         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17041         Remove BSWAP handing for big-endian targets and use the form of
17042         LD1RQ appropariate for the mode.
17044 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17046         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17047         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17048         duplicated element.
17050 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17052         PR tearget/83845
17053         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17054         check for operands that need to go through aarch64_sve_reload_be.
17056 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17058         PR tree-optimization/81661
17059         PR tree-optimization/84117
17060         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17061         * tree-eh.c: Include gimplify.h.
17062         (find_trapping_overflow, replace_trapping_overflow,
17063         rewrite_to_non_trapping_overflow): New functions.
17064         * tree-vect-loop.c: Include tree-eh.h.
17065         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17066         * tree-data-ref.c: Include tree-eh.h.
17067         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17069 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17071         PR rtl-optimization/84123
17072         * combine.c (change_zero_ext): Check if hard register satisfies
17073         can_change_dest_mode before calling gen_lowpart_SUBREG.
17075 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17077         PR target/82444
17078         * ira.c (ira_init_register_move_cost): Remove assert.
17080 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17082         PR rtl-optimization/84071
17083         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17084         * doc/tm.texi: Regenerate.
17086 2018-01-31  Richard Biener  <rguenther@suse.de>
17088         PR tree-optimization/84132
17089         * tree-data-ref.c (analyze_miv_subscript): Properly
17090         check whether evolution_function_is_affine_multivariate_p
17091         before calling gcd_of_steps_may_divide_p.
17093 2018-01-31  Julia Koval  <julia.koval@intel.com>
17095         PR target/83618
17096         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17097         * config/i386/i386.md (rdpid_rex64) New.
17098         (rdpid): Make 32bit only.
17100 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17102         PR lto/84105
17103         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17104         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17106 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17108         Revert
17109         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17111         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17113 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17115         PR rtl-optimization/84071
17116         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17117         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17119 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17121         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17122         (arc_attribute_table): Add 'aux' attribute.
17123         (arc_in_small_data_p): Consider aux like variables.
17124         (arc_is_aux_reg_p): New function.
17125         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17126         (arc_get_aux_arg): New function.
17127         (prepare_move_operands): Handle aux-register access.
17128         (arc_handle_aux_attribute): New function.
17129         * doc/extend.texi (ARC Variable attributes): Add subsection.
17131 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17133         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17134         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17135         (arc_attribute_table): Add 'uncached' attribute.
17136         (arc_print_operand): Print '.di' flag for uncached memory
17137         accesses.
17138         (arc_in_small_data_p): Do not consider for small data the uncached
17139         types.
17140         (arc_is_uncached_mem_p): New function.
17141         * config/arc/predicates.md (compact_store_memory_operand): Check
17142         for uncached memory accesses.
17143         (nonvol_nonimm_operand): Likewise.
17144         * doc/extend.texi (ARC Type Attribute): New subsection.
17146 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17148         PR c/84100
17149         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17150         falign-loops=): Add Optimization flag.
17152 2018-01-30  Jeff Law  <law@redhat.com>
17154         PR target/84064
17155         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17156         INT_REGISTERS_SAVED.  Check it prior to calling
17157         get_scratch_register_on_entry.
17158         (ix86_adjust_stack_and_probe): Similarly.
17159         (ix86_emit_probe_stack_range): Similarly.
17160         (ix86_expand_prologue): Corresponding changes.
17162 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17164         PR target/40411
17165         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17166         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17168 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17170         PR target/84112
17171         * lra-constraints.c (curr_insn_transform): Process AND in the
17172         address.
17174 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17176         PR rtl-optimization/83986
17177         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17178         dependence against last_pending_memory_flush in addition to
17179         pending_jump_insns.
17181 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17183         PR tree-optimization/81611
17184         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17185         copies.
17187 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17189         PR target/83758
17190         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17191         a reg rtx.
17193 2018-01-30  Richard Biener  <rguenther@suse.de>
17194             Jakub Jelinek  <jakub@redhat.com>
17196         PR tree-optimization/84111
17197         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17198         inner loops added during recursion, as they don't have up-to-date
17199         SSA form.
17201 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17203         PR ipa/81360
17204         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17205         (can_inline_edge_by_limits_p): ... here.
17206         (can_early_inline_edge_p, check_callers,
17207         update_caller_keys, update_callee_keys, recursive_inlining,
17208         add_new_edges_to_heap, speculation_useful_p,
17209         inline_small_functions,
17210         inline_small_functions, flatten_function,
17211         inline_to_all_callers_1): Update.
17213 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17215         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17216         zeros correctly.
17218 2018-01-30  Richard Biener  <rguenther@suse.de>
17220         PR tree-optimization/83008
17221         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17222         invariant and constant vector uses in stmts when they need
17223         more than one stmt.
17225 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17227         PR bootstrap/84017
17228         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17229         * configure: Regenerate.
17231 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17233         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17234         pattern.
17235         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17236         Use gen_rtx_REG rather than gen_lowpart.
17238 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17240         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17241         rather than 0 when creating partial subregs.
17243 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17245         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17246         of usage.
17248 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17250         PR target/81550
17251         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17252         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17253         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17254         flags.  This restores the settings used before the 2017-07-24.
17255         Turning off pre increment/decrement/modify allows IVOPTS to
17256         optimize DF/SF loops where the index is an int.
17258 2018-01-29  Richard Biener  <rguenther@suse.de>
17259             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17261         PR bootstrap/80867
17262         * tree-vect-stmts.c (vectorizable_call): Don't call
17263         targetm.vectorize_builtin_md_vectorized_function if callee is
17264         NULL.
17266 2018-01-22  Carl Love  <cel@us.ibm.com>
17268         * doc/extend.tex: Fix typo in second arg in
17269         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17271 2018-01-29  Richard Biener  <rguenther@suse.de>
17273         PR tree-optimization/84086
17274         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17275         (flush_ssaname_freelist): When SSA names were released reset
17276         the SCEV hash table.
17278 2018-01-29  Richard Biener  <rguenther@suse.de>
17280         PR tree-optimization/84057
17281         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17282         removed paths when removing edges.
17284 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17286         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17287         -mfunction-return=@var{choice}.
17289 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17291         PR diagnostic/84034
17292         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17293         Handle CR like TAB.
17294         (layout::print_source_line): Likewise.
17295         (test_get_line_width_without_trailing_whitespace): Add test cases.
17297 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17299         PR middle-end/84040
17300         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17301         debug insns.
17303 2018-01-26  Jim Wilson  <jimw@sifive.com>
17305         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17307         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17308         specified.
17310 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17312         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17313         and CMP + SUB-immediate -> SUBS.
17315 2018-01-26  Martin Sebor  <msebor@redhat.com>
17317         PR tree-optimization/83896
17318         * tree-ssa-strlen.c (get_string_len): Rename...
17319         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17320         Avoid assuming length is constant.
17321         (handle_char_store): Use HOST_WIDE_INT for string length.
17323 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17325         PR target/81763
17326         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17327         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17329 2018-01-26  Richard Biener  <rguenther@suse.de>
17331         PR rtl-optimization/84003
17332         * dse.c (record_store): Only record redundant stores when
17333         the earlier store aliases at least all accesses the later one does.
17335 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17337         PR rtl-optimization/83985
17338         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17339         REG_CFA_RESTORE insns.
17340         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17341         REG_CFA_RESTORE insns here.
17343         PR c/83989
17344         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17345         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17347 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17349         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17350         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17351         (arc_init): Likewise.
17352         (arc_override_options): Likewise.
17353         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17354         value.
17355         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17356         support.
17357         * config/arc/arc.h (TARGET_DBNZ): Define.
17358         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17359         properly set the tune attribute.
17360         (dbnz): Use TARGET_DBNZ guard.
17361         * config/arc/arc.opt (mtune): Add core3 option.
17363 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17365         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17366         recognize new pic like addresses.
17367         (arc_delegitimize_address): Clean up.
17369 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17371         * config/arc/arc-arches.def: Option mrf16 valid for all
17372         architectures.
17373         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17374         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17375         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17376         * config/arc/arc-tables.opt: Regenerate.
17377         * config/arc/arc.c (arc_conditional_register_usage): Handle
17378         reduced register file case.
17379         (arc_file_start): Set must have build attributes.
17380         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17381         mrf16 option value.
17382         * config/arc/arc.opt (mrf16): Add new option.
17383         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17384         * config/arc/genmultilib.awk: Handle new mrf16 option.
17385         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17386         * config/arc/t-multilib: Regenerate.
17387         * doc/invoke.texi (ARC Options): Document mrf16 option.
17389 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17391         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17392         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17393         (arc_attribute_table): Add 'secure_call' attribute.
17394         (arc_print_operand): Print secure call operand.
17395         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17396         secure.
17397         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17398         (call_i): Add support for sjli instruction.
17399         (call_value_i): Likewise.
17400         * config/arc/constraints.md (Csc): New constraint.
17402 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17403             John Eric Martin  <John.Martin@emmicro-us.com>
17405         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17406         * config/arc/arc.c (_arc_jli_section): New struct.
17407         (arc_jli_section): New type.
17408         (rc_jli_sections): New static variable.
17409         (arc_handle_jli_attribute): New function.
17410         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17411         (arc_file_end): New function.
17412         (TARGET_ASM_FILE_END): Define.
17413         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17414         (arc_add_jli_section): New function.
17415         (jli_call_scan): Likewise.
17416         (arc_reorg): Call jli_call_scan.
17417         (arc_output_addsi): Remove 'S' from printing asm operand.
17418         (arc_is_jli_call_p): New function.
17419         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17420         operand.
17421         (movhi_insn): Likewise.
17422         (movsi_insn): Likewise.
17423         (movsi_set_cc_insn): Likewise.
17424         (loadqi_update): Likewise.
17425         (load_zeroextendqisi_update): Likewise.
17426         (load_signextendqisi_update): Likewise.
17427         (loadhi_update): Likewise.
17428         (load_zeroextendhisi_update): Likewise.
17429         (load_signextendhisi_update): Likewise.
17430         (loadsi_update): Likewise.
17431         (loadsf_update): Likewise.
17432         (movsicc_insn): Likewise.
17433         (bset_insn): Likewise.
17434         (bxor_insn): Likewise.
17435         (bclr_insn): Likewise.
17436         (bmsk_insn): Likewise.
17437         (bicsi3_insn): Likewise.
17438         (cmpsi_cc_c_insn): Likewise.
17439         (movsi_ne): Likewise.
17440         (movsi_cond_exec): Likewise.
17441         (clrsbsi2): Likewise.
17442         (norm_f): Likewise.
17443         (normw): Likewise.
17444         (swap): Likewise.
17445         (divaw): Likewise.
17446         (flag): Likewise.
17447         (sr): Likewise.
17448         (kflag): Likewise.
17449         (ffs): Likewise.
17450         (ffs_f): Likewise.
17451         (fls): Likewise.
17452         (call_i): Remove 'S' asm letter, add jli instruction.
17453         (call_value_i): Likewise.
17454         * config/arc/arc.op (mjli-always): New option.
17455         * config/arc/constraints.md (Cji): New constraint.
17456         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17457         operand.
17458         (subsf3_fpx): Likewise.
17459         (mulsf3_fpx): Likewise.
17460         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17461         asm operand.
17462         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17463         function attrbutes.
17464         * doc/invoke.texi (ARC): Document mjli-always option.
17466 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17468         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17469         avoid addition with 0 and use incw and decw where possible.
17471 2018-01-26  Richard Biener  <rguenther@suse.de>
17473         PR tree-optimization/81082
17474         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17475         association if it requires casting to unsigned.
17476         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17477         from fold_plusminus_mult_expr to catch important cases late when
17478         range info is available.
17480 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17482         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17483         * configure.ac (hidden_linkonce): New test.
17484         * configure: Regenerate.
17485         * config.in: Regenerate.
17487 2018-01-26  Julia Koval  <julia.koval@intel.com>
17489         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17490         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17491         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17492         _mm_mask_bitshuffle_epi64_mask): Fix type.
17493         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17494         USI_FTYPE_V4DI_V4DI_USI): Remove.
17495         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17496         __builtin_ia32_vpshufbitqmb256_mask,
17497         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17498         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17499         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17501 2018-01-26  Alan Modra  <amodra@gmail.com>
17503         PR target/84033
17504         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17505         UNSPEC_VBPERMQ.  Sort other unspecs.
17507 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17509         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17511 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17513         PR middle-end/83055
17514         * predict.c (drop_profile): Do not push/pop cfun; update also
17515         node->count.
17516         (handle_missing_profiles): Fix logic looking for zero profiles.
17518 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17520         PR middle-end/83977
17521         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17522         on functions with #pragma omp declare simd or functions with simd
17523         attribute.
17524         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17525         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17526         Remove trailing \n from warning_at calls.
17528 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17530         PR target/84028
17531         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17532         for neutered workers.
17534 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17536         PR target/68467
17537         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17538         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17540 2018-01-24  Jeff Law  <law@redhat.com>
17542         PR target/83994
17543         * i386.c (get_probe_interval): Move to earlier point.
17544         (ix86_compute_frame_layout): If -fstack-clash-protection and
17545         the frame is larger than the probe interval, then use pushes
17546         to save registers rather than reg->mem moves.
17547         (ix86_expand_prologue): Remove conditional for int_registers_saved
17548         assertion.
17550 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17552         PR target/84014
17553         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17554         min/max for never referenced object.
17556 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17558         PR middle-end/83977
17559         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17560         here.
17561         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17562         attributes from DECL_ATTRIBUTES (decl) without affecting
17563         DECL_ATTRIBUTES (current_function_decl).
17564         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17565         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17567 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17569         PR tree-optimization/83979
17570         * fold-const.c (fold_comparison): Use constant_boolean_node
17571         instead of boolean_{true,false}_node.
17573 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17575         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17576         with zero counts.
17578 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17580         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17581         Simplify the clause that sets the length attribute.
17582         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17583         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17584         clause that sets the length attribute.
17585         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17587 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17589         PR target/83589
17590         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17591         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17592         Add strict parameter.
17593         (prevent_branch_around_nothing): Insert dummy insn between branch to
17594         label and label with no ptx insn inbetween.
17595         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17597 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17599         PR target/81352
17600         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17601         for neutered threads in warp.
17602         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17604 2018-01-24  Richard Biener  <rguenther@suse.de>
17606         PR tree-optimization/83176
17607         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17608         operands.
17610 2018-01-24  Richard Biener  <rguenther@suse.de>
17612         PR tree-optimization/82819
17613         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17614         code generating pluses that are no-ops in the target precision.
17616 2018-01-24  Richard Biener  <rguenther@suse.de>
17618         PR middle-end/84000
17619         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17621 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17623         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17624         to merge probabilities.
17625         * predict.c (probably_never_executed): Also mark as cold functions
17626         with global 0 profile and guessed local profile.
17627         * profile-count.c (profile_probability::combine_with_count): New
17628         member function.
17629         * profile-count.h (profile_probability::operator*,
17630         profile_probability::operator*=, profile_probability::operator/,
17631         profile_probability::operator/=): Reduce precision to adjusted
17632         and set value to guessed on contradictory divisions.
17633         (profile_probability::combine_with_freq): Remove.
17634         (profile_probability::combine_wiht_count): Declare.
17635         (profile_count::force_nonzero):: Set to adjusted.
17636         (profile_count::probability_in):: Set quality to adjusted.
17637         * tree-ssa-tail-merge.c (replace_block_by): Use
17638         combine_with_count.
17640 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17641             Jim Wilson  <jimw@sifive.com>
17643         * config/riscv/riscv.c (riscv_stack_boundary): New.
17644         (riscv_option_override): Set riscv_stack_boundary.  Handle
17645         riscv_preferred_stack_boundary_arg.
17646         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17647         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17648         (STACK_BOUNDARY): Set to riscv_stack_boundary.
17649         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17650         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17651         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17653 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
17655         PR target/83905
17656         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17657         of struct ix86_frame.
17658         (ix86_expand_epilogue): Likewise.  Add a local variable for
17659         the reg_save_offset field in struct ix86_frame.
17661 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
17663         PR tree-optimization/82604
17664         * tree-loop-distribution.c (enum partition_kind): New enum item
17665         PKIND_PARTIAL_MEMSET.
17666         (partition_builtin_p): Support above new enum item.
17667         (generate_code_for_partition): Ditto.
17668         (compute_access_range): Differentiate cases that equality can be
17669         proven at all loops, the innermost loops or no loops.
17670         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17671         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
17672         (finalize_partitions, distribute_loop): Don't fuse partition of
17673         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17674         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17675         parloop is enabled.
17677 2018-01-23  Martin Liska  <mliska@suse.cz>
17679         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17680         order to ignore the predictor.
17681         (PRED_POLYMORPHIC_CALL): Likewise.
17682         (PRED_RECURSIVE_CALL): Likewise.
17684 2018-01-23  Martin Liska  <mliska@suse.cz>
17686         * tree-profile.c (tree_profiling): Print function header to
17687         aware reader which function we are working on.
17688         * value-prof.c (gimple_find_values_to_profile): Do not print
17689         not interesting value histograms.
17691 2018-01-23  Martin Liska  <mliska@suse.cz>
17693         * profile-count.h (enum profile_quality): Add
17694         profile_uninitialized as the first value. Do not number values
17695         as they are zero based.
17696         (profile_count::verify): Update sanity check.
17697         (profile_probability::verify): Likewise.
17699 2018-01-23  Nathan Sidwell  <nathan@acm.org>
17701         * doc/invoke.texi (ffor-scope): Deprecate.
17703 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17705         PR tree-optimization/83510
17706         * domwalk.c (set_all_edges_as_executable): New function.
17707         (dom_walker::dom_walker): Convert bool param
17708         "skip_unreachable_blocks" to enum reachability.  Move setup of
17709         edge flags to set_all_edges_as_executable and only do it when
17710         reachability is REACHABLE_BLOCKS.
17711         * domwalk.h (enum dom_walker::reachability): New enum.
17712         (dom_walker::dom_walker): Convert bool param
17713         "skip_unreachable_blocks" to enum reachability.
17714         (set_all_edges_as_executable): New decl.
17715         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
17716         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17717         "reachability".
17718         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17719         but converting true to REACHABLE_BLOCKS.
17720         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17721         * tree-vrp.c
17722         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17723         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17724         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17725         REACHABLE_BLOCKS.
17726         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17727         if check_all_array_refs will be called.
17729 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17731         * tree.c (selftest::test_location_wrappers): Add more test
17732         coverage.
17734 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17736         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17737         (selftest::test_bit_in_range): Likewise.
17739 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17741         PR testsuite/83888
17742         * doc/sourcebuild.texi (vect_float): Say that the selector
17743         only describes the situation when -funsafe-math-optimizations is on.
17744         (vect_float_strict): Document.
17746 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17748         PR tree-optimization/83965
17749         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17750         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17751         instead of checking only for a reduction.
17752         (vect_recog_widen_sum_pattern): Likewise.
17754 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17756         * predict.c (probably_never_executed): Only use precise profile info.
17757         (compute_function_frequency): Skip after inlining hack since we now
17758         have quality checking.
17760 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17762         * profile-count.h (profile_probability::very_unlikely,
17763         profile_probability::unlikely, profile_probability::even): Set
17764         precision to guessed.
17766 2018-01-23  Richard Biener  <rguenther@suse.de>
17768         PR tree-optimization/83963
17769         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17770         Properly terminate dominator walk when crossing the exit edge not
17771         when visiting its source block.
17773 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
17775         PR c++/83918
17776         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17777         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17779 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
17781         PR tree-optimization/83957
17782         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
17783         semicolon after for body surrounded by braces.
17785         PR tree-optimization/83081
17786         * profile-count.h (profile_probability::split): New method.
17787         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17788         Use profile_probability::split.
17789         (do_compare_rtx_and_jump): Fix adjustment of probabilities
17790         when splitting a single conditional jump into 2.
17792 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
17794         PR tree-optimization/69452
17795         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17796         decl.
17798 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17800         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17801         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17802         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17804 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17806         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17807         declaration.
17808         * config/rl78/rl78.md (movdi): New define_expand.
17809         * config/rl78/rl78.c (rl78_split_movdi): New function.
17811 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
17813         PR target/83862
17814         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17815         no longer used.
17816         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17817         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17818         128-bit to produce an UNSPEC move to get the double word with the
17819         signbit and then a shift directly to do signbit.
17820         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17821         implementation with a new version that just does either a direct
17822         move or a regular move.  Move memory interface to separate insns.
17823         Move insns so they are next to the expander.
17824         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17825         with signbit move.  Split big and little endian case.
17826         (signbit<mode>2_dm_mem_le): Likewise.
17827         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17828         (signbit<mode>2_dm2): Likewise.
17830 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17832         * config/rl78/rl78.md (anddi3): New define_expand.
17834 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17836         * config/rl78/rl78.md (umindi3): New define_expand.
17838 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17840         * config/rl78/rl78.md (smindi3): New define_expand.
17842 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17844         * config/rl78/rl78.md (smaxdi3): New define_expand.
17846 2018-01-22  Carl Love  <cel@us.ibm.com>
17848         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17849         LVX_V1TI): Add macro expansion.
17850         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17851         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17852         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17853         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17854         Change check to determine if the instruction is a byte reversing
17855         entry.  Fix typo in comment.
17856         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17857         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17858         Add def_builtin calls for new builtins.
17859         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17860         Add define_insn expansion.
17862 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17864         * config/rl78/rl78.md (umaxdi3): New define_expand.
17866 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17868         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17869         for non-QImode registers.
17871 2018-01-22  Richard Biener  <rguenther@suse.de>
17873         PR tree-optimization/83963
17874         * graphite-scop-detection.c (scop_detection::get_sese): Delay
17875         including the loop exit block.
17876         (scop_detection::merge_sese): Likewise.
17877         (scop_detection::add_scop): Do it here instead.
17879 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17881         * doc/sourcebuild.texi (arm_softfloat): Document.
17883 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
17885         PR gcc/77734
17886         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17887         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17888         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17890 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17891             David Edelsohn  <dje.gcc@gmail.com>
17893         PR target/83946
17894         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17895         Change "crset eq" to "crset 2".
17896         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17897         (*call_indirect_aix<mode>_nospec): Likewise.
17898         (*call_value_indirect_aix<mode>_nospec): Likewise.
17899         (*call_indirect_elfv2<mode>_nospec): Likewise.
17900         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17901         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17902         change assembly output from . to $.
17903         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17904         (indirect_jump<mode>_nospec): Change assembly output from . to $.
17905         (*tablejump<mode>_internal1_nospec): Likewise.
17907 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
17909         PR target/80870
17910         * config/sh/sh_optimize_sett_clrt.cc:
17911         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17913 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
17915         PR tree-optimization/83940
17916         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17917         offset_dt to vect_constant_def rather than vect_unknown_def_type.
17918         (vect_check_load_store_mask): Add a mask_dt_out parameter and
17919         use it to pass back the definition type.
17920         (vect_check_store_rhs): Likewise rhs_dt_out.
17921         (vect_build_gather_load_calls): Add a mask_dt argument and use
17922         it instead of a call to vect_is_simple_use.
17923         (vectorizable_store): Update calls to vect_check_load_store_mask
17924         and vect_check_store_rhs.  Use the dt returned by the latter instead
17925         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
17926         instead of calls to vect_is_simple_use.  Pass the scalar rather
17927         than the vector operand to vect_is_simple_use when handling
17928         second and subsequent copies of an rhs value.
17929         (vectorizable_load): Update calls to vect_check_load_store_mask
17930         and vect_build_gather_load_calls.  Use the cached mask_dt and
17931         gs_info.offset_dt instead of calls to vect_is_simple_use.
17933 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
17935         PR middle-end/83945
17936         * tree-emutls.c: Include gimplify.h.
17937         (lower_emutls_2): New function.
17938         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17939         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17940         it before further processing.
17942         PR target/83930
17943         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17944         UINTVAL (trueop1) instead of INTVAL (op1).
17946 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
17948         PR debug/81570
17949         PR debug/83728
17950         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17951         INCOMING_FRAME_SP_OFFSET if not defined.
17952         (scan_trace): Add ENTRY argument.  If true and
17953         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17954         emit a note to adjust the CFA offset.
17955         (create_cfi_notes): Adjust scan_trace callers.
17956         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17957         INCOMING_FRAME_SP_OFFSET in the CIE.
17958         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17959         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17960         Likewise.
17961         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17962         * doc/tm.texi: Regenerated.
17964 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17966         PR rtl-optimization/83147
17967         * lra-constraints.c (remove_inheritance_pseudos): Use
17968         lra_substitute_pseudo_within_insn.
17970 2018-01-19  Tom de Vries  <tom@codesourcery.com>
17971             Cesar Philippidis  <cesar@codesourcery.com>
17973         PR target/83920
17974         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17976 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
17978         PR target/83790
17979         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17980         spaces for function labels.
17982 2018-01-19  Martin Liska  <mliska@suse.cz>
17984         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17985         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17986         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17987         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17988         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17989         (PRED_CONST_RETURN): Change from 69 to 65.
17990         (PRED_NULL_RETURN): Change from 91 to 71.
17991         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17992         (PRED_LOOP_GUARD): Change from 66 to 73.
17994 2018-01-19  Martin Liska  <mliska@suse.cz>
17996         * predict.c (predict_insn_def): Add new assert.
17997         (struct branch_predictor): Change type to signed integer.
17998         (test_prediction_value_range): Amend test to cover
17999         PROB_UNINITIALIZED.
18000         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18001         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18002         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18003         (PRED_LOOP_IV_COMPARE): Likewise.
18004         * predict.h (PROB_UNINITIALIZED): Define new constant.
18006 2018-01-19  Martin Liska  <mliska@suse.cz>
18008         * predict.c (dump_prediction): Add new format for
18009         analyze_brprob.py script which is enabled with -details
18010         suboption.
18011         * profile-count.h (precise_p): New function.
18013 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18015         PR tree-optimization/83922
18016         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18017         there are no statements that need masking.
18018         (vect_active_double_reduction_p): New function.
18019         (vect_analyze_loop_operations): Use it when handling phis that
18020         are not in the loop header.
18022 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18024         PR tree-optimization/83914
18025         * tree-vect-loop.c (vectorizable_induction): Don't convert
18026         init_expr or apply the peeling adjustment for inductions
18027         that are nested within the vectorized loop.
18029 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18031         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18032         instead of NEG.
18034 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18036         PR sanitizer/81715
18037         PR testsuite/83882
18038         * function.h (gimplify_parameters): Add gimple_seq * argument.
18039         * function.c: Include gimple.h and options.h.
18040         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18041         for the added local temporaries if needed.
18042         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18043         if there are any parameter cleanups, wrap whole body into a
18044         try/finally with the cleanups.
18046 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18048         PR target/82964
18049         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18050         Use GET_MODE_CLASS for scalar floating point.
18052 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18054         PR ipa/82256
18055         patch by PaX Team
18056         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18057         Fix call of call_cgraph_insertion_hooks.
18059 2018-01-18  Martin Sebor  <msebor@redhat.com>
18061         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18063 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18065         PR ipa/83619
18066         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18067         frequencies.
18069 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18071         PR other/70268
18072         * common.opt: (-ffile-prefix-map): New option.
18073         * opts.c (common_handle_option): Defer it.
18074         * opts-global.c (handle_common_deferred_options): Handle it.
18075         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18076         * file-prefix-map.h: New file.
18077         (remap_debug_filename, add_debug_prefix_map): ...here.
18078         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18079         * final.c (debug_prefix_map, add_debug_prefix_map
18080         remap_debug_filename): Move to...
18081         * file-prefix-map.c: New file.
18082         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18083         generalize, get rid of alloca(), use strrchr() instead of strchr().
18084         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18085         Implement in terms of add_prefix_map().
18086         (remap_macro_filename, remap_debug_filename): Implement in term of
18087         remap_filename().
18088         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18089         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18090         * dbxout.c: Include file-prefix-map.h.
18091         * varasm.c: Likewise.
18092         * vmsdbgout.c: Likewise.
18093         * xcoffout.c: Likewise.
18094         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18095         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18096         * doc/invoke.texi (-ffile-prefix-map): Document.
18097         (-fdebug-prefix-map): Update description.
18099 2018-01-18  Martin Liska  <mliska@suse.cz>
18101         * config/i386/i386.c (indirect_thunk_name): Document that also
18102         lfence is emitted.
18103         (output_indirect_thunk): Document why both instructions
18104         (pause and lfence) are generated.
18106 2018-01-18  Richard Biener  <rguenther@suse.de>
18108         PR tree-optimization/83887
18109         * graphite-scop-detection.c
18110         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18111         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18112         (scop_detection::merge_sese): Re-implement with a flood-fill
18113         algorithm that properly finds a SESE region if it exists.
18115 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18117         PR c/61240
18118         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18119         pointer_diff optimizations use view_convert instead of convert.
18121 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18123         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18124         Generate different code for -mno-speculate-indirect-jumps.
18125         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18126         (*call_indirect_aix<mode>): Disable for
18127         -mno-speculate-indirect-jumps.
18128         (*call_indirect_aix<mode>_nospec): New define_insn.
18129         (*call_value_indirect_aix<mode>): Disable for
18130         -mno-speculate-indirect-jumps.
18131         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18132         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18133         -mno-speculate-indirect-jumps.
18134         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18136 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18138         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18139         long double type, set the flags for noting the default long double
18140         type, even if we don't pass or return a long double type.
18142 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18144         PR ipa/83051
18145         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18146         failure.
18148 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18150         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18151         support for merge[hl].
18152         (fold_mergehl_helper): New helper function.
18153         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18154         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18155         (altivec_vmrglw_direct): Add xxmrglw insn.
18157 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18159         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18160         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18162 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18164         PR lto/83121
18165         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18166         call the lto_location_cache before reading the
18167         DECL_SOURCE_LOCATION of the types.
18169 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18170             Richard Sandiford  <richard.sandiford@linaro.org>
18172         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18173         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18174         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18175         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18176         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18177         Add declaration.
18178         * config/aarch64/constraints.md (aarch64_movti_operand):
18179         Limit immediates.
18180         * config/aarch64/predicates.md (Uti): Add new constraint.
18182 2018-01-17 Carl Love  <cel@us.ibm.com>
18184         * config/rs6000/vsx.md (define_expand xl_len_r,
18185         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18186         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18187         lxvll.
18188         (define_expand, define_insn): Move the shift left from  the
18189         define_insn to the define_expand for lxvl and stxvl instructions.
18190         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18191         and XL_LEN_R definitions to PURE.
18193 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18195         * config/i386/i386.c (indirect_thunk_name): Declare regno
18196         as unsigned int.  Compare regno with INVALID_REGNUM.
18197         (output_indirect_thunk): Ditto.
18198         (output_indirect_thunk_function): Ditto.
18199         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18200         in the call to output_indirect_thunk_function.
18202 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18204         PR middle-end/83884
18205         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18206         rather than the size of inner_type to determine the stack slot size
18207         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18209 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18211         PR target/83546
18212         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18213         to PTA_SILVERMONT.
18215 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18217         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18218         endian Linux systems to optionally enable multilibs for selecting
18219         the long double type if the user configured an explicit type.
18220         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18221         have no long double multilibs if not defined.
18222         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18223         warn if the user used -mabi={ieee,ibm}longdouble and we built
18224         multilibs for long double.
18225         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18226         appropriate multilib option.
18227         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18228         multilib options.
18229         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18230         for building long double multilibs.
18231         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18233 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18235         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18236         copies.
18238         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18239         64 bits.
18240         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18241         128 bits.
18243         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18244         variables.
18246         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18247         return value.
18249 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18251         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18252         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18254 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18256         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18257         different rtl trees depending on TARGET_64BIT.
18258         (rs6000_gen_lvx): Likewise.
18260 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18262         * config/visium/visium.md (nop): Tweak comment.
18263         (hazard_nop): Likewise.
18265 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18267         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18268         -mspeculate-indirect-jumps.
18269         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18270         for -mno-speculate-indirect-jumps.
18271         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18272         (*call_value_indirect_elfv2<mode>): Disable for
18273         -mno-speculate-indirect-jumps.
18274         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18275         (indirect_jump): Emit different RTL for
18276         -mno-speculate-indirect-jumps.
18277         (*indirect_jump<mode>): Disable for
18278         -mno-speculate-indirect-jumps.
18279         (*indirect_jump<mode>_nospec): New define_insn.
18280         (tablejump): Emit different RTL for
18281         -mno-speculate-indirect-jumps.
18282         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18283         (tablejumpsi_nospec): New define_expand.
18284         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18285         (tablejumpdi_nospec): New define_expand.
18286         (*tablejump<mode>_internal1): Disable for
18287         -mno-speculate-indirect-jumps.
18288         (*tablejump<mode>_internal1_nospec): New define_insn.
18289         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18290         option.
18292 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18294         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18295         callers updated.
18297 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18298             Richard Biener  <rguenth@suse.de>
18300         PR libgomp/83590
18301         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18302         return early, inline manually is_gimple_sizepos.  Make sure if we
18303         call gimplify_expr we don't end up with a gimple constant.
18304         * tree.c (variably_modified_type_p): Don't return true for
18305         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18306         * gimplify.h (is_gimple_sizepos): Remove.
18308 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18310         PR tree-optimization/83857
18311         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18312         vectorizable_live_operation for pure SLP statements.
18313         (vectorizable_live_operation): Handle PHIs.
18315 2018-01-16  Richard Biener  <rguenther@suse.de>
18317         PR tree-optimization/83867
18318         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18319         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18321 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18323         PR c/83844
18324         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18325         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18326         If off is not INTEGER_CST, issue a may not be aligned warning
18327         rather than isn't aligned.  Use isn%'t rather than isn't.
18328         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18329         into MULT_EXPR.
18330         <case MULT_EXPR>: Improve the case when bottom and one of the
18331         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18332         operand, in that case check if the other operand is multiple of
18333         bottom divided by the INTEGER_CST operand.
18335 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18337         PR target/83858
18338         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18339         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18340         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18341         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18342         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18343         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18344         (pa_function_arg_size): New function.
18346 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18348         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18349         in a separate statement.
18351 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18353         PR tree-optimization/83847
18354         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18355         group gathers and scatters.
18357 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18359         PR rtl-optimization/86620
18360         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18362         PR rtl-optimization/83213
18363         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18364         to last if both are JUMP_INSNs.
18366         PR tree-optimization/83843
18367         * gimple-ssa-store-merging.c
18368         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18369         store_immediate_info for bswap/nop orig_stores.
18371 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18373         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18374         !TARGET_MUL.
18375         <UDIV>: Increase cost if !TARGET_DIV.
18377 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18379         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18380         (define_attr "cr_logical_3op"): New.
18381         (cceq_ior_compare): Adjust.
18382         (cceq_ior_compare_complement): Adjust.
18383         (*cceq_rev_compare): Adjust.
18384         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18385         (is_cracked_insn): Adjust.
18386         (insn_must_be_first_in_group): Adjust.
18387         * config/rs6000/40x.md: Adjust.
18388         * config/rs6000/440.md: Adjust.
18389         * config/rs6000/476.md: Adjust.
18390         * config/rs6000/601.md: Adjust.
18391         * config/rs6000/603.md: Adjust.
18392         * config/rs6000/6xx.md: Adjust.
18393         * config/rs6000/7450.md: Adjust.
18394         * config/rs6000/7xx.md: Adjust.
18395         * config/rs6000/8540.md: Adjust.
18396         * config/rs6000/cell.md: Adjust.
18397         * config/rs6000/e300c2c3.md: Adjust.
18398         * config/rs6000/e500mc.md: Adjust.
18399         * config/rs6000/e500mc64.md: Adjust.
18400         * config/rs6000/e5500.md: Adjust.
18401         * config/rs6000/e6500.md: Adjust.
18402         * config/rs6000/mpc.md: Adjust.
18403         * config/rs6000/power4.md: Adjust.
18404         * config/rs6000/power5.md: Adjust.
18405         * config/rs6000/power6.md: Adjust.
18406         * config/rs6000/power7.md: Adjust.
18407         * config/rs6000/power8.md: Adjust.
18408         * config/rs6000/power9.md: Adjust.
18409         * config/rs6000/rs64.md: Adjust.
18410         * config/rs6000/titan.md: Adjust.
18412 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18414         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18415         ix86_indirect_branch_register logic.
18417 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18419         * config/i386/constraints.md (Bs): Update
18420         ix86_indirect_branch_register check.  Don't check
18421         ix86_indirect_branch_register with GOT_memory_operand.
18422         (Bw): Likewise.
18423         * config/i386/predicates.md (GOT_memory_operand): Don't check
18424         ix86_indirect_branch_register here.
18425         (GOT32_symbol_operand): Likewise.
18427 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18429         * config/i386/predicates.md (constant_call_address_operand):
18430         Rewrite ix86_indirect_branch_register logic.
18431         (sibcall_insn_operand): Likewise.
18433 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18435         * config/i386/constraints.md (Bs): Replace
18436         ix86_indirect_branch_thunk_register with
18437         ix86_indirect_branch_register.
18438         (Bw): Likewise.
18439         * config/i386/i386.md (indirect_jump): Likewise.
18440         (tablejump): Likewise.
18441         (*sibcall_memory): Likewise.
18442         (*sibcall_value_memory): Likewise.
18443         Peepholes of indirect call and jump via memory: Likewise.
18444         * config/i386/i386.opt: Likewise.
18445         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18446         (GOT_memory_operand): Likewise.
18447         (call_insn_operand): Likewise.
18448         (sibcall_insn_operand): Likewise.
18449         (GOT32_symbol_operand): Likewise.
18451 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18453         PR middle-end/83837
18454         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18455         type rather than type addr's type points to.
18456         (expand_omp_atomic_mutex): Likewise.
18457         (expand_omp_atomic): Likewise.
18459 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18461         PR target/83839
18462         * config/i386/i386.c (output_indirect_thunk_function): Use
18463         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18464         for  __x86_return_thunk.
18466 2018-01-15  Richard Biener  <rguenther@suse.de>
18468         PR middle-end/83850
18469         * expmed.c (extract_bit_field_1): Fix typo.
18471 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18473         PR target/83687
18474         * config/arm/iterators.md (VF): New mode iterator.
18475         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18476         Remove integer-related logic from pattern.
18477         (neon_vabd<mode>_3): Likewise.
18479 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18481         PR middle-end/82694
18482         * common.opt (fstrict-overflow): No longer an alias.
18483         (fwrapv-pointer): New option.
18484         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18485         also for pointer types based on flag_wrapv_pointer.
18486         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18487         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18488         opts->x_flag_wrapv got set.
18489         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18490         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18491         POINTER_TYPE_OVERFLOW_UNDEFINED.
18492         * match.pd: Likewise in address comparison pattern.
18493         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18495 2018-01-15  Richard Biener  <rguenther@suse.de>
18497         PR lto/83804
18498         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18499         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18500         Reset type names to their identifier if their TYPE_DECL doesn't
18501         have linkage (and thus is used for ODR and devirt).
18502         (save_debug_info_for_decl): Remove.
18503         (save_debug_info_for_type): Likewise.
18504         (add_tree_to_fld_list): Adjust.
18505         * tree-pretty-print.c (dump_generic_node): Make dumping of
18506         type names more robust.
18508 2018-01-15  Richard Biener  <rguenther@suse.de>
18510         * BASE-VER: Bump to 8.0.1.
18512 2018-01-14  Martin Sebor  <msebor@redhat.com>
18514         PR other/83508
18515         * builtins.c (check_access): Avoid warning when the no-warning bit
18516         is set.
18518 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18520         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18521         * ira-color (allocno_hard_regs_compare): Likewise.
18523 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18525         PR target/83013
18526         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18527         Use .pushsection/.popsection.
18529 2018-01-14  Martin Sebor  <msebor@redhat.com>
18531         PR c++/81327
18532         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18534 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18536         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18537         entry from extra_headers.
18538         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18539         extra_headers, make the list bitwise identical to the i?86-*-* one.
18541 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18543         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18544         -mcmodel=large with -mindirect-branch=thunk,
18545         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18546         -mfunction-return=thunk-extern.
18547         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18548         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18549         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18551 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18553         * config/i386/i386.c (print_reg): Print the name of the full
18554         integer register without '%'.
18555         (ix86_print_operand): Handle 'V'.
18556         * doc/extend.texi: Document 'V' modifier.
18558 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18560         * config/i386/constraints.md (Bs): Disallow memory operand for
18561         -mindirect-branch-register.
18562         (Bw): Likewise.
18563         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18564         (GOT_memory_operand): Likewise.
18565         (call_insn_operand): Likewise.
18566         (sibcall_insn_operand): Likewise.
18567         (GOT32_symbol_operand): Likewise.
18568         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18569         for -mindirect-branch-register.
18570         (tablejump): Likewise.
18571         (*sibcall_memory): Likewise.
18572         (*sibcall_value_memory): Likewise.
18573         Disallow peepholes of indirect call and jump via memory for
18574         -mindirect-branch-register.
18575         (*call_pop): Replace m with Bw.
18576         (*call_value_pop): Likewise.
18577         (*sibcall_pop_memory): Replace m with Bs.
18578         * config/i386/i386.opt (mindirect-branch-register): New option.
18579         * doc/invoke.texi: Document -mindirect-branch-register option.
18581 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18583         * config/i386/i386-protos.h (ix86_output_function_return): New.
18584         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18585         set function_return_type.
18586         (indirect_thunk_name): Add ret_p to indicate thunk for function
18587         return.
18588         (output_indirect_thunk_function): Pass false to
18589         indirect_thunk_name.
18590         (ix86_output_indirect_branch_via_reg): Likewise.
18591         (ix86_output_indirect_branch_via_push): Likewise.
18592         (output_indirect_thunk_function): Create alias for function
18593         return thunk if regno < 0.
18594         (ix86_output_function_return): New function.
18595         (ix86_handle_fndecl_attribute): Handle function_return.
18596         (ix86_attribute_table): Add function_return.
18597         * config/i386/i386.h (machine_function): Add
18598         function_return_type.
18599         * config/i386/i386.md (simple_return_internal): Use
18600         ix86_output_function_return.
18601         (simple_return_internal_long): Likewise.
18602         * config/i386/i386.opt (mfunction-return=): New option.
18603         (indirect_branch): Mention -mfunction-return=.
18604         * doc/extend.texi: Document function_return function attribute.
18605         * doc/invoke.texi: Document -mfunction-return= option.
18607 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18609         * config/i386/i386-opts.h (indirect_branch): New.
18610         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18611         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18612         with local indirect jump when converting indirect call and jump.
18613         (ix86_set_indirect_branch_type): New.
18614         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18615         (indirectlabelno): New.
18616         (indirect_thunk_needed): Likewise.
18617         (indirect_thunk_bnd_needed): Likewise.
18618         (indirect_thunks_used): Likewise.
18619         (indirect_thunks_bnd_used): Likewise.
18620         (INDIRECT_LABEL): Likewise.
18621         (indirect_thunk_name): Likewise.
18622         (output_indirect_thunk): Likewise.
18623         (output_indirect_thunk_function): Likewise.
18624         (ix86_output_indirect_branch_via_reg): Likewise.
18625         (ix86_output_indirect_branch_via_push): Likewise.
18626         (ix86_output_indirect_branch): Likewise.
18627         (ix86_output_indirect_jmp): Likewise.
18628         (ix86_code_end): Call output_indirect_thunk_function if needed.
18629         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18630         needed.
18631         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18632         (ix86_attribute_table): Add indirect_branch.
18633         * config/i386/i386.h (machine_function): Add indirect_branch_type
18634         and has_local_indirect_jump.
18635         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18636         to true.
18637         (tablejump): Likewise.
18638         (*indirect_jump): Use ix86_output_indirect_jmp.
18639         (*tablejump_1): Likewise.
18640         (simple_return_indirect_internal): Likewise.
18641         * config/i386/i386.opt (mindirect-branch=): New option.
18642         (indirect_branch): New.
18643         (keep): Likewise.
18644         (thunk): Likewise.
18645         (thunk-inline): Likewise.
18646         (thunk-extern): Likewise.
18647         * doc/extend.texi: Document indirect_branch function attribute.
18648         * doc/invoke.texi: Document -mindirect-branch= option.
18650 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
18652         PR ipa/83051
18653         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18655 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
18657         * ipa-inline.c (want_inline_small_function_p): Return false if
18658         inlining has already failed with CIF_FINAL_ERROR.
18659         (update_caller_keys): Call want_inline_small_function_p before
18660         can_inline_edge_p.
18661         (update_callee_keys): Likewise.
18663 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18665         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18666         New function.
18667         (rs6000_quadword_masked_address_p): Likewise.
18668         (quad_aligned_load_p): Likewise.
18669         (quad_aligned_store_p): Likewise.
18670         (const_load_sequence_p): Add comment to describe the outer-most loop.
18671         (mimic_memory_attributes_and_flags): New function.
18672         (rs6000_gen_stvx): Likewise.
18673         (replace_swapped_aligned_store): Likewise.
18674         (rs6000_gen_lvx): Likewise.
18675         (replace_swapped_aligned_load): Likewise.
18676         (replace_swapped_load_constant): Capitalize argument name in
18677         comment describing this function.
18678         (rs6000_analyze_swaps): Add a third pass to search for vector loads
18679         and stores that access quad-word aligned addresses and replace
18680         with stvx or lvx instructions when appropriate.
18681         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18682         New function prototype.
18683         (rs6000_quadword_masked_address_p): Likewise.
18684         (rs6000_gen_lvx): Likewise.
18685         (rs6000_gen_stvx): Likewise.
18686         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18687         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18688         when memory address is aligned.
18689         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18690         this split to select lvx instruction when memory address is aligned.
18691         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18692         instruction when memory address is aligned.
18693         (*vsx_le_perm_load_v16qi): Likewise.
18694         (four unnamed splitters): Modify to select the stvx instruction
18695         when memory is aligned.
18697 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
18699         * predict.c (determine_unlikely_bbs): Handle correctly BBs
18700         which appears in the queue multiple times.
18702 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18703             Alan Hayward  <alan.hayward@arm.com>
18704             David Sherwood  <david.sherwood@arm.com>
18706         * tree-vectorizer.h (vec_lower_bound): New structure.
18707         (_loop_vec_info): Add check_nonzero and lower_bounds.
18708         (LOOP_VINFO_CHECK_NONZERO): New macro.
18709         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18710         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18711         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18712         fields.  Make seg_len the distance travelled, not including the
18713         access size.
18714         (dr_direction_indicator): Declare.
18715         (dr_zero_step_indicator): Likewise.
18716         (dr_known_forward_stride_p): Likewise.
18717         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18718         tree-ssanames.h.
18719         (runtime_alias_check_p): Allow runtime alias checks with
18720         variable strides.
18721         (operator ==): Compare access_size and align.
18722         (prune_runtime_alias_test_list): Rework for new distinction between
18723         the access_size and seg_len.
18724         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
18725         segment lengths.
18726         (get_segment_min_max): New function.
18727         (create_intersect_range_checks): Use it.
18728         (dr_step_indicator): New function.
18729         (dr_direction_indicator): Likewise.
18730         (dr_zero_step_indicator): Likewise.
18731         (dr_known_forward_stride_p): Likewise.
18732         * tree-loop-distribution.c (data_ref_segment_size): Return
18733         DR_STEP * (niters - 1).
18734         (compute_alias_check_pairs): Update call to the dr_with_seg_len
18735         constructor.
18736         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18737         (vect_preserves_scalar_order_p): New function, split out from...
18738         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
18739         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18740         (vect_vfa_access_size): New function.
18741         (vect_vfa_align): Likewise.
18742         (vect_compile_time_alias): Take access_size_a and access_b arguments.
18743         (dump_lower_bound): New function.
18744         (vect_check_lower_bound): Likewise.
18745         (vect_small_gap_p): Likewise.
18746         (vectorizable_with_step_bound_p): Likewise.
18747         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18748         depencies if the vectorization factor is 1.  Convert the checks
18749         for nonzero steps into checks on the bounds of DR_STEP.  Try using
18750         a bunds check for variable steps if the minimum required step is
18751         relatively small. Update calls to the dr_with_seg_len
18752         constructor and to vect_compile_time_alias.
18753         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18754         function.
18755         (vect_loop_versioning): Call it.
18756         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18757         when retrying.
18758         (vect_estimate_min_profitable_iters): Account for any bounds checks.
18760 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18761             Alan Hayward  <alan.hayward@arm.com>
18762             David Sherwood  <david.sherwood@arm.com>
18764         * doc/sourcebuild.texi (vect_scatter_store): Document.
18765         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18766         optabs.
18767         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18768         Document.
18769         * genopinit.c (main): Add supports_vec_scatter_store and
18770         supports_vec_scatter_store_cached to target_optabs.
18771         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18772         IFN_MASK_SCATTER_STORE.
18773         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18774         functions.
18775         * internal-fn.h (internal_store_fn_p): Declare.
18776         (internal_fn_stored_value_index): Likewise.
18777         * internal-fn.c (scatter_store_direct): New macro.
18778         (expand_scatter_store_optab_fn): New function.
18779         (direct_scatter_store_optab_supported_p): New macro.
18780         (internal_store_fn_p): New function.
18781         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18782         IFN_MASK_SCATTER_STORE.
18783         (internal_fn_mask_index): Likewise.
18784         (internal_fn_stored_value_index): New function.
18785         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18786         for scatter stores.
18787         * optabs-query.h (supports_vec_scatter_store_p): Declare.
18788         * optabs-query.c (supports_vec_scatter_store_p): New function.
18789         * tree-vectorizer.h (vect_get_store_rhs): Declare.
18790         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18791         true for scatter stores.
18792         (vect_gather_scatter_fn_p): Handle scatter stores too.
18793         (vect_check_gather_scatter): Consider using scatter stores if
18794         supports_vec_scatter_store_p.
18795         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18796         scatter stores too.
18797         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18798         internal_fn_stored_value_index.
18799         (check_load_store_masking): Handle scatter stores too.
18800         (vect_get_store_rhs): Make public.
18801         (vectorizable_call): Use internal_store_fn_p.
18802         (vectorizable_store): Handle scatter store internal functions.
18803         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18804         when deciding whether the end of the group has been reached.
18805         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18806         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18807         (mask_scatter_store<mode>): New insns.
18809 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18810             Alan Hayward  <alan.hayward@arm.com>
18811             David Sherwood  <david.sherwood@arm.com>
18813         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18814         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18815         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18816         function.
18817         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18818         Use vect_truncate_gather_scatter_offset if we can't treat the
18819         operation as a normal gather load or scatter store.
18820         (get_group_load_store_type): Take the gather_scatter_info
18821         as argument.  Try using a gather load or scatter store for
18822         single-element groups.
18823         (get_load_store_type): Update calls to get_group_load_store_type
18824         and vect_use_strided_gather_scatters_p.
18826 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18827             Alan Hayward  <alan.hayward@arm.com>
18828             David Sherwood  <david.sherwood@arm.com>
18830         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18831         optional tree argument.
18832         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18833         null target hooks.
18834         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18835         but continue to use the current value as a fallback.
18836         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18837         to compare the updates.
18838         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18839         (get_load_store_type): Use it when handling a strided access.
18840         (vect_get_strided_load_store_ops): New function.
18841         (vect_get_data_ptr_increment): Likewise.
18842         (vectorizable_load): Handle strided gather loads.  Always pass
18843         a step to vect_create_data_ref_ptr and bump_vector_ptr.
18845 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18846             Alan Hayward  <alan.hayward@arm.com>
18847             David Sherwood  <david.sherwood@arm.com>
18849         * doc/md.texi (gather_load@var{m}): Document.
18850         (mask_gather_load@var{m}): Likewise.
18851         * genopinit.c (main): Add supports_vec_gather_load and
18852         supports_vec_gather_load_cached to target_optabs.
18853         * optabs-tree.c (init_tree_optimization_optabs): Use
18854         ggc_cleared_alloc to allocate target_optabs.
18855         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18856         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18857         functions.
18858         * internal-fn.h (internal_load_fn_p): Declare.
18859         (internal_gather_scatter_fn_p): Likewise.
18860         (internal_fn_mask_index): Likewise.
18861         (internal_gather_scatter_fn_supported_p): Likewise.
18862         * internal-fn.c (gather_load_direct): New macro.
18863         (expand_gather_load_optab_fn): New function.
18864         (direct_gather_load_optab_supported_p): New macro.
18865         (direct_internal_fn_optab): New function.
18866         (internal_load_fn_p): Likewise.
18867         (internal_gather_scatter_fn_p): Likewise.
18868         (internal_fn_mask_index): Likewise.
18869         (internal_gather_scatter_fn_supported_p): Likewise.
18870         * optabs-query.c (supports_at_least_one_mode_p): New function.
18871         (supports_vec_gather_load_p): Likewise.
18872         * optabs-query.h (supports_vec_gather_load_p): Declare.
18873         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18874         and memory_type field.
18875         (NUM_PATTERNS): Bump to 15.
18876         * tree-vect-data-refs.c: Include internal-fn.h.
18877         (vect_gather_scatter_fn_p): New function.
18878         (vect_describe_gather_scatter_call): Likewise.
18879         (vect_check_gather_scatter): Try using internal functions for
18880         gather loads.  Recognize existing calls to a gather load function.
18881         (vect_analyze_data_refs): Consider using gather loads if
18882         supports_vec_gather_load_p.
18883         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18884         (vect_get_gather_scatter_offset_type): Likewise.
18885         (vect_convert_mask_for_vectype): Likewise.
18886         (vect_add_conversion_to_patterm): Likewise.
18887         (vect_try_gather_scatter_pattern): Likewise.
18888         (vect_recog_gather_scatter_pattern): New pattern recognizer.
18889         (vect_vect_recog_func_ptrs): Add it.
18890         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18891         internal_fn_mask_index and internal_gather_scatter_fn_p.
18892         (check_load_store_masking): Take the gather_scatter_info as an
18893         argument and handle gather loads.
18894         (vect_get_gather_scatter_ops): New function.
18895         (vectorizable_call): Check internal_load_fn_p.
18896         (vectorizable_load): Likewise.  Handle gather load internal
18897         functions.
18898         (vectorizable_store): Update call to check_load_store_masking.
18899         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18900         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18901         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18902         (aarch64_gather_scale_operand_d): New predicates.
18903         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18904         (mask_gather_load<mode>): New insns.
18906 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18907             Alan Hayward  <alan.hayward@arm.com>
18908             David Sherwood  <david.sherwood@arm.com>
18910         * optabs.def (fold_left_plus_optab): New optab.
18911         * doc/md.texi (fold_left_plus_@var{m}): Document.
18912         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18913         * internal-fn.c (fold_left_direct): Define.
18914         (expand_fold_left_optab_fn): Likewise.
18915         (direct_fold_left_optab_supported_p): Likewise.
18916         * fold-const-call.c (fold_const_fold_left): New function.
18917         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18918         * tree-parloops.c (valid_reduction_p): New function.
18919         (gather_scalar_reductions): Use it.
18920         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18921         (vect_finish_replace_stmt): Declare.
18922         * tree-vect-loop.c (fold_left_reduction_fn): New function.
18923         (needs_fold_left_reduction_p): New function, split out from...
18924         (vect_is_simple_reduction): ...here.  Accept reductions that
18925         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18926         (vect_force_simple_reduction): Also store the reduction type in
18927         the assignment's STMT_VINFO_REDUC_TYPE.
18928         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18929         (merge_with_identity): New function.
18930         (vect_expand_fold_left): Likewise.
18931         (vectorize_fold_left_reduction): Likewise.
18932         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
18933         scalar phi in place for it.  Check for target support and reject
18934         cases that would reassociate the operation.  Defer the transform
18935         phase to vectorize_fold_left_reduction.
18936         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18937         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18938         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18940 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18942         * tree-if-conv.c (predicate_mem_writes): Remove redundant
18943         call to ifc_temp_var.
18945 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18946             Alan Hayward  <alan.hayward@arm.com>
18947             David Sherwood  <david.sherwood@arm.com>
18949         * target.def (legitimize_address_displacement): Take the original
18950         offset as a poly_int.
18951         * targhooks.h (default_legitimize_address_displacement): Update
18952         accordingly.
18953         * targhooks.c (default_legitimize_address_displacement): Likewise.
18954         * doc/tm.texi: Regenerate.
18955         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18956         as an argument, moving assert of ad->disp == ad->disp_term to...
18957         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
18958         Try calling targetm.legitimize_address_displacement before expanding
18959         the address rather than afterwards, and adjust for the new interface.
18960         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18961         Match the new hook interface.  Handle SVE addresses.
18962         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18963         new hook interface.
18965 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18967         * Makefile.in (OBJS): Add early-remat.o.
18968         * target.def (select_early_remat_modes): New hook.
18969         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18970         * doc/tm.texi: Regenerate.
18971         * targhooks.h (default_select_early_remat_modes): Declare.
18972         * targhooks.c (default_select_early_remat_modes): New function.
18973         * timevar.def (TV_EARLY_REMAT): New timevar.
18974         * passes.def (pass_early_remat): New pass.
18975         * tree-pass.h (make_pass_early_remat): Declare.
18976         * early-remat.c: New file.
18977         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18978         function.
18979         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18982             Alan Hayward  <alan.hayward@arm.com>
18983             David Sherwood  <david.sherwood@arm.com>
18985         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18986         vfm1 with a bound_epilog parameter.
18987         (vect_do_peeling): Update calls accordingly, and move the prologue
18988         call earlier in the function.  Treat the base bound_epilog as 0 for
18989         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
18990         this base when peeling for gaps.
18991         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18992         with fully-masked loops.
18993         (vect_estimate_min_profitable_iters): Handle the single peeled
18994         iteration in that case.
18996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18997             Alan Hayward  <alan.hayward@arm.com>
18998             David Sherwood  <david.sherwood@arm.com>
19000         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19001         single-element interleaving even if the size is not a power of 2.
19002         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19003         accesses for single-element interleaving if the group size is
19004         not a power of 2.
19006 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19007             Alan Hayward  <alan.hayward@arm.com>
19008             David Sherwood  <david.sherwood@arm.com>
19010         * doc/md.texi (fold_extract_last_@var{m}): Document.
19011         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19012         * optabs.def (fold_extract_last_optab): New optab.
19013         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19014         * internal-fn.c (fold_extract_direct): New macro.
19015         (expand_fold_extract_optab_fn): Likewise.
19016         (direct_fold_extract_optab_supported_p): Likewise.
19017         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19018         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19019         EXTRACT_LAST_REDUCTION.
19020         (get_initial_def_for_reduction): Do not create an initial vector
19021         for EXTRACT_LAST_REDUCTION reductions.
19022         (vectorizable_reduction): Leave the scalar phi in place for
19023         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19024         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19025         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19026         transform phase to vectorizable_condition.
19027         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19028         split out from...
19029         (vect_finish_stmt_generation): ...here.
19030         (vect_finish_replace_stmt): New function.
19031         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19032         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19033         pattern.
19034         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19036 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19037             Alan Hayward  <alan.hayward@arm.com>
19038             David Sherwood  <david.sherwood@arm.com>
19040         * doc/md.texi (extract_last_@var{m}): Document.
19041         * optabs.def (extract_last_optab): New optab.
19042         * internal-fn.def (EXTRACT_LAST): New internal function.
19043         * internal-fn.c (cond_unary_direct): New macro.
19044         (expand_cond_unary_optab_fn): Likewise.
19045         (direct_cond_unary_optab_supported_p): Likewise.
19046         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19047         loops using EXTRACT_LAST.
19048         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19049         (extract_last_<mode>): ...this optab.
19050         (vec_extract<mode><Vel>): Update accordingly.
19052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19053             Alan Hayward  <alan.hayward@arm.com>
19054             David Sherwood  <david.sherwood@arm.com>
19056         * target.def (empty_mask_is_expensive): New hook.
19057         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19058         * doc/tm.texi: Regenerate.
19059         * targhooks.h (default_empty_mask_is_expensive): Declare.
19060         * targhooks.c (default_empty_mask_is_expensive): New function.
19061         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19062         if the target says that empty masks are expensive.
19063         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19064         New function.
19065         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19067 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19068             Alan Hayward  <alan.hayward@arm.com>
19069             David Sherwood  <david.sherwood@arm.com>
19071         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19072         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19073         (vect_use_loop_mask_for_alignment_p): New function.
19074         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19075         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19076         niters_skip argument.  Make sure that the first niters_skip elements
19077         of the first iteration are inactive.
19078         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19079         Update call to vect_set_loop_masks_directly.
19080         (get_misalign_in_elems): New function, split out from...
19081         (vect_gen_prolog_loop_niters): ...here.
19082         (vect_update_init_of_dr): Take a code argument that specifies whether
19083         the adjustment should be added or subtracted.
19084         (vect_update_init_of_drs): Likewise.
19085         (vect_prepare_for_masked_peels): New function.
19086         (vect_do_peeling): Skip prologue peeling if we're using a mask
19087         instead.  Update call to vect_update_inits_of_drs.
19088         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19089         mask_skip_niters.
19090         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19091         alignment.  Do not include the number of peeled iterations in
19092         the minimum threshold in that case.
19093         (vectorizable_induction): Adjust the start value down by
19094         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19095         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19096         Take the number of skipped iterations into account when calculating
19097         the loop bounds.
19098         * tree-vect-stmts.c (vect_gen_while_not): New function.
19100 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19101             Alan Hayward  <alan.hayward@arm.com>
19102             David Sherwood  <david.sherwood@arm.com>
19104         * doc/sourcebuild.texi (vect_fully_masked): Document.
19105         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19106         default value to 0.
19107         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19108         split out from...
19109         (vect_analyze_loop_2): ...here. Don't check the vectorization
19110         factor against the number of loop iterations if the loop is
19111         fully-masked.
19113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19114             Alan Hayward  <alan.hayward@arm.com>
19115             David Sherwood  <david.sherwood@arm.com>
19117         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19118         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19119         (dump_groups): Update accordingly.
19120         (iv_use::mem_type): New member variable.
19121         (address_p): New function.
19122         (record_use): Add a mem_type argument and initialize the new
19123         mem_type field.
19124         (record_group_use): Add a mem_type argument.  Use address_p.
19125         Remove obsolete null checks of base_object.  Update call to record_use.
19126         (find_interesting_uses_op): Update call to record_group_use.
19127         (find_interesting_uses_cond): Likewise.
19128         (find_interesting_uses_address): Likewise.
19129         (get_mem_type_for_internal_fn): New function.
19130         (find_address_like_use): Likewise.
19131         (find_interesting_uses_stmt): Try find_address_like_use before
19132         calling find_interesting_uses_op.
19133         (addr_offset_valid_p): Use the iv mem_type field as the type
19134         of the addressed memory.
19135         (add_autoinc_candidates): Likewise.
19136         (get_address_cost): Likewise.
19137         (split_small_address_groups_p): Use address_p.
19138         (split_address_groups): Likewise.
19139         (add_iv_candidate_for_use): Likewise.
19140         (autoinc_possible_for_pair): Likewise.
19141         (rewrite_groups): Likewise.
19142         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19143         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19144         (get_alias_ptr_type_for_ptr_address): New function.
19145         (rewrite_use_address): Rewrite address uses in calls that were
19146         identified by find_address_like_use.
19148 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19149             Alan Hayward  <alan.hayward@arm.com>
19150             David Sherwood  <david.sherwood@arm.com>
19152         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19153         TARGET_MEM_REFs.
19154         * gimple-expr.h (is_gimple_addressable: Likewise.
19155         * gimple-expr.c (is_gimple_address): Likewise.
19156         * internal-fn.c (expand_call_mem_ref): New function.
19157         (expand_mask_load_optab_fn): Use it.
19158         (expand_mask_store_optab_fn): Likewise.
19160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19161             Alan Hayward  <alan.hayward@arm.com>
19162             David Sherwood  <david.sherwood@arm.com>
19164         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19165         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19166         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19167         (cond_umax@var{mode}): Document.
19168         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19169         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19170         (cond_umin_optab, cond_umax_optab): New optabs.
19171         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19172         (COND_IOR, COND_XOR): New internal functions.
19173         * internal-fn.h (get_conditional_internal_fn): Declare.
19174         * internal-fn.c (cond_binary_direct): New macro.
19175         (expand_cond_binary_optab_fn): Likewise.
19176         (direct_cond_binary_optab_supported_p): Likewise.
19177         (get_conditional_internal_fn): New function.
19178         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19179         Cope with reduction statements that are vectorized as calls rather
19180         than assignments.
19181         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19182         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19183         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19184         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19185         (UNSPEC_COND_EOR): New unspecs.
19186         (optab): Add mappings for them.
19187         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19188         (sve_int_op, sve_fp_op): New int attributes.
19190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19191             Alan Hayward  <alan.hayward@arm.com>
19192             David Sherwood  <david.sherwood@arm.com>
19194         * optabs.def (while_ult_optab): New optab.
19195         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19196         * internal-fn.def (WHILE_ULT): New internal function.
19197         * internal-fn.h (direct_internal_fn_supported_p): New override
19198         that takes two types as argument.
19199         * internal-fn.c (while_direct): New macro.
19200         (expand_while_optab_fn): New function.
19201         (convert_optab_supported_p): Likewise.
19202         (direct_while_optab_supported_p): New macro.
19203         * wide-int.h (wi::udiv_ceil): New function.
19204         * tree-vectorizer.h (rgroup_masks): New structure.
19205         (vec_loop_masks): New typedef.
19206         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19207         and fully_masked_p.
19208         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19209         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19210         (vect_max_vf): New function.
19211         (slpeel_make_loop_iterate_ntimes): Delete.
19212         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19213         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19214         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19215         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19216         internal-fn.h, stor-layout.h and optabs-query.h.
19217         (vect_set_loop_mask): New function.
19218         (add_preheader_seq): Likewise.
19219         (add_header_seq): Likewise.
19220         (interleave_supported_p): Likewise.
19221         (vect_maybe_permute_loop_masks): Likewise.
19222         (vect_set_loop_masks_directly): Likewise.
19223         (vect_set_loop_condition_masked): Likewise.
19224         (vect_set_loop_condition_unmasked): New function, split out from
19225         slpeel_make_loop_iterate_ntimes.
19226         (slpeel_make_loop_iterate_ntimes): Rename to..
19227         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19228         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19229         (vect_do_peeling): Update call accordingly.
19230         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19231         loops.
19232         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19233         mask_compare_type, can_fully_mask_p and fully_masked_p.
19234         (release_vec_loop_masks): New function.
19235         (_loop_vec_info): Use it to free the loop masks.
19236         (can_produce_all_loop_masks_p): New function.
19237         (vect_get_max_nscalars_per_iter): Likewise.
19238         (vect_verify_full_masking): Likewise.
19239         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19240         retries, and free the mask rgroups before retrying.  Check loop-wide
19241         reasons for disallowing fully-masked loops.  Make the final decision
19242         about whether use a fully-masked loop or not.
19243         (vect_estimate_min_profitable_iters): Do not assume that peeling
19244         for the number of iterations will be needed for fully-masked loops.
19245         (vectorizable_reduction): Disable fully-masked loops.
19246         (vectorizable_live_operation): Likewise.
19247         (vect_halve_mask_nunits): New function.
19248         (vect_double_mask_nunits): Likewise.
19249         (vect_record_loop_mask): Likewise.
19250         (vect_get_loop_mask): Likewise.
19251         (vect_transform_loop): Handle the case in which the final loop
19252         iteration might handle a partial vector.  Call vect_set_loop_condition
19253         instead of slpeel_make_loop_iterate_ntimes.
19254         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19255         (check_load_store_masking): New function.
19256         (prepare_load_store_mask): Likewise.
19257         (vectorizable_store): Handle fully-masked loops.
19258         (vectorizable_load): Likewise.
19259         (supportable_widening_operation): Use vect_halve_mask_nunits for
19260         booleans.
19261         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19262         (vect_gen_while): New function.
19263         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19264         (aarch64_uqdec<mode>): New insn.
19266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19267             Alan Hayward  <alan.hayward@arm.com>
19268             David Sherwood  <david.sherwood@arm.com>
19270         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19271         (reduc_xor_scal_optab): New optabs.
19272         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19273         (reduc_xor_scal_@var{m}): Document.
19274         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19275         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19276         internal functions.
19277         * fold-const-call.c (fold_const_call): Handle them.
19278         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19279         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19280         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19281         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19282         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19283         (UNSPEC_XORV): New unspecs.
19284         (optab): Add entries for them.
19285         (BITWISEV): New int iterator.
19286         (bit_reduc_op): New int attributes.
19288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19289             Alan Hayward  <alan.hayward@arm.com>
19290             David Sherwood  <david.sherwood@arm.com>
19292         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19293         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19294         * optabs.def (vec_shl_insert_optab): New optab.
19295         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19296         (duplicate_and_interleave): Likewise.
19297         * tree-vect-loop.c: Include internal-fn.h.
19298         (neutral_op_for_slp_reduction): New function, split out from
19299         get_initial_defs_for_reduction.
19300         (get_initial_def_for_reduction): Handle option 2 for variable-length
19301         vectors by loading the neutral value into a vector and then shifting
19302         the initial value into element 0.
19303         (get_initial_defs_for_reduction): Replace the code argument with
19304         the neutral value calculated by neutral_op_for_slp_reduction.
19305         Use gimple_build_vector for constant-length vectors.
19306         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19307         but the first group_size elements have a neutral value.
19308         Use duplicate_and_interleave otherwise.
19309         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19310         Update call to get_initial_defs_for_reduction.  Handle SLP
19311         reductions for variable-length vectors by creating one vector
19312         result for each scalar result, with the elements associated
19313         with other scalar results stubbed out with the neutral value.
19314         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19315         Require IFN_VEC_SHL_INSERT for double reductions on
19316         variable-length vectors, or SLP reductions that have
19317         a neutral value.  Require can_duplicate_and_interleave_p
19318         support for variable-length unchained SLP reductions if there
19319         is no neutral value, such as for MIN/MAX reductions.  Also require
19320         the number of vector elements to be a multiple of the number of
19321         SLP statements when doing variable-length unchained SLP reductions.
19322         Update call to vect_create_epilog_for_reduction.
19323         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19324         and remove initial values.
19325         (duplicate_and_interleave): Make public.
19326         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19327         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19329 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19330             Alan Hayward  <alan.hayward@arm.com>
19331             David Sherwood  <david.sherwood@arm.com>
19333         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19334         (can_duplicate_and_interleave_p): New function.
19335         (vect_get_and_check_slp_defs): Take the vector of statements
19336         rather than just the current one.  Remove excess parentheses.
19337         Restriction rejectinon of vect_constant_def and vect_external_def
19338         for variable-length vectors to boolean types, or types for which
19339         can_duplicate_and_interleave_p is false.
19340         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19341         (duplicate_and_interleave): New function.
19342         (vect_get_constant_vectors): Use gimple_build_vector for
19343         constant-length vectors and suitable variable-length constant
19344         vectors.  Use duplicate_and_interleave for other variable-length
19345         vectors.  Don't defer the update when inserting new statements.
19347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19348             Alan Hayward  <alan.hayward@arm.com>
19349             David Sherwood  <david.sherwood@arm.com>
19351         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19352         min_profitable_iters doesn't go negative.
19354 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19355             Alan Hayward  <alan.hayward@arm.com>
19356             David Sherwood  <david.sherwood@arm.com>
19358         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19359         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19360         * optabs.def (vec_mask_load_lanes_optab): New optab.
19361         (vec_mask_store_lanes_optab): Likewise.
19362         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19363         (MASK_STORE_LANES): Likewise.
19364         * internal-fn.c (mask_load_lanes_direct): New macro.
19365         (mask_store_lanes_direct): Likewise.
19366         (expand_mask_load_optab_fn): Handle masked operations.
19367         (expand_mask_load_lanes_optab_fn): New macro.
19368         (expand_mask_store_optab_fn): Handle masked operations.
19369         (expand_mask_store_lanes_optab_fn): New macro.
19370         (direct_mask_load_lanes_optab_supported_p): Likewise.
19371         (direct_mask_store_lanes_optab_supported_p): Likewise.
19372         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19373         parameter.
19374         (vect_load_lanes_supported): Likewise.
19375         * tree-vect-data-refs.c (strip_conversion): New function.
19376         (can_group_stmts_p): Likewise.
19377         (vect_analyze_data_ref_accesses): Use it instead of checking
19378         for a pair of assignments.
19379         (vect_store_lanes_supported): Take a masked_p parameter.
19380         (vect_load_lanes_supported): Likewise.
19381         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19382         vect_store_lanes_supported and vect_load_lanes_supported.
19383         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19384         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19385         parameter.  Don't allow gaps for masked accesses.
19386         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19387         and vect_load_lanes_supported.
19388         (get_load_store_type): Take a masked_p parameter and update
19389         call to get_group_load_store_type.
19390         (vectorizable_store): Update call to get_load_store_type.
19391         Handle IFN_MASK_STORE_LANES.
19392         (vectorizable_load): Update call to get_load_store_type.
19393         Handle IFN_MASK_LOAD_LANES.
19395 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19396             Alan Hayward  <alan.hayward@arm.com>
19397             David Sherwood  <david.sherwood@arm.com>
19399         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19400         modes for SVE.
19401         * config/aarch64/aarch64-protos.h
19402         (aarch64_sve_struct_memory_operand_p): Declare.
19403         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19404         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19405         (VPRED, vpred): Handle SVE structure modes.
19406         * config/aarch64/constraints.md (Utx): New constraint.
19407         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19408         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19409         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19410         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19411         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19412         structure modes.  Split into pieces after RA.
19413         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19414         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19415         New patterns.
19416         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19417         SVE structure modes.
19418         (aarch64_classify_address): Likewise.
19419         (sizetochar): Move earlier in file.
19420         (aarch64_print_operand): Handle SVE register lists.
19421         (aarch64_array_mode): New function.
19422         (aarch64_sve_struct_memory_operand_p): Likewise.
19423         (TARGET_ARRAY_MODE): Redefine.
19425 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19426             Alan Hayward  <alan.hayward@arm.com>
19427             David Sherwood  <david.sherwood@arm.com>
19429         * target.def (array_mode): New target hook.
19430         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19431         * doc/tm.texi: Regenerate.
19432         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19433         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19434         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19435         targetm.array_mode.
19436         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19437         type sizes.
19439 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19440             Alan Hayward  <alan.hayward@arm.com>
19441             David Sherwood  <david.sherwood@arm.com>
19443         * fold-const.c (fold_binary_loc): Check the argument types
19444         rather than the result type when testing for a vector operation.
19446 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19448         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19449         * doc/tm.texi: Regenerate.
19451 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19452             Alan Hayward  <alan.hayward@arm.com>
19453             David Sherwood  <david.sherwood@arm.com>
19455         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19456         (sve): Document new AArch64 extension.
19457         * doc/md.texi (w): Extend the description of the AArch64
19458         constraint to include SVE vectors.
19459         (Upl, Upa): Document new AArch64 predicate constraints.
19460         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19461         enum.
19462         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19463         (msve-vector-bits=): New option.
19464         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19465         SVE when these are disabled.
19466         (sve): New extension.
19467         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19468         modes.  Adjust their number of units based on aarch64_sve_vg.
19469         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19470         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19471         aarch64_addr_query_type.
19472         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19473         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19474         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19475         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19476         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19477         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19478         (aarch64_simd_imm_zero_p): Delete.
19479         (aarch64_check_zero_based_sve_index_immediate): Declare.
19480         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19481         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19482         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19483         (aarch64_sve_float_mul_immediate_p): Likewise.
19484         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19485         rather than an rtx.
19486         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19487         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19488         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19489         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19490         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19491         (aarch64_regmode_natural_size): Likewise.
19492         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19493         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19494         left one place.
19495         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19496         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19497         for VG and the SVE predicate registers.
19498         (V_ALIASES): Add a "z"-prefixed alias.
19499         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19500         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19501         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19502         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19503         (REG_CLASS_NAMES): Add entries for them.
19504         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19505         and the predicate registers.
19506         (aarch64_sve_vg): Declare.
19507         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19508         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19509         (REGMODE_NATURAL_SIZE): Define.
19510         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19511         SVE macros.
19512         * config/aarch64/aarch64.c: Include cfgrtl.h.
19513         (simd_immediate_info): Add a constructor for series vectors,
19514         and an associated step field.
19515         (aarch64_sve_vg): New variable.
19516         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19517         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19518         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19519         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19520         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19521         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19522         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19523         (aarch64_get_mask_mode): New functions.
19524         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19525         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19526         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19527         predicate modes and predicate registers.  Explicitly restrict
19528         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19529         to store a vector mode if it is recognized by
19530         aarch64_classify_vector_mode.
19531         (aarch64_regmode_natural_size): New function.
19532         (aarch64_hard_regno_caller_save_mode): Return the original mode
19533         for predicates.
19534         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19535         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19536         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19537         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19538         functions.
19539         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19540         does not overlap dest if the function is frame-related.  Handle
19541         SVE constants.
19542         (aarch64_split_add_offset): New function.
19543         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19544         them aarch64_add_offset.
19545         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19546         and update call to aarch64_sub_sp.
19547         (aarch64_add_cfa_expression): New function.
19548         (aarch64_expand_prologue): Pass extra temporary registers to the
19549         functions above.  Handle the case in which we need to emit new
19550         DW_CFA_expressions for registers that were originally saved
19551         relative to the stack pointer, but now have to be expressed
19552         relative to the frame pointer.
19553         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19554         functions above.
19555         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19556         IP0 and IP1 values for SVE frames.
19557         (aarch64_expand_vec_series): New function.
19558         (aarch64_expand_sve_widened_duplicate): Likewise.
19559         (aarch64_expand_sve_const_vector): Likewise.
19560         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19561         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19562         into the register, rather than emitting a SET directly.
19563         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19564         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19565         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19566         (offset_9bit_signed_scaled_p): New functions.
19567         (aarch64_replicate_bitmask_imm): New function.
19568         (aarch64_bitmask_imm): Use it.
19569         (aarch64_cannot_force_const_mem): Reject expressions involving
19570         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19571         (aarch64_classify_index): Handle SVE indices, by requiring
19572         a plain register index with a scale that matches the element size.
19573         (aarch64_classify_address): Handle SVE addresses.  Assert that
19574         the mode of the address is VOIDmode or an integer mode.
19575         Update call to aarch64_classify_symbol.
19576         (aarch64_classify_symbolic_expression): Update call to
19577         aarch64_classify_symbol.
19578         (aarch64_const_vec_all_in_range_p): New function.
19579         (aarch64_print_vector_float_operand): Likewise.
19580         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19581         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19582         and the FP immediates 1.0 and 0.5.
19583         (aarch64_print_address_internal): Handle SVE addresses.
19584         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19585         (aarch64_regno_regclass): Handle predicate registers.
19586         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19587         data modes.
19588         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19589         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19590         (aarch64_convert_sve_vector_bits): New function.
19591         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19592         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19593         rather than an rtx.
19594         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19595         Handle SVE vector and predicate modes.  Accept VL-based constants
19596         that need only one temporary register, and VL offsets that require
19597         no temporary registers.
19598         (aarch64_conditional_register_usage): Mark the predicate registers
19599         as fixed if SVE isn't available.
19600         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19601         Return true for SVE vector and predicate modes.
19602         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19603         rather than an unsigned int.  Handle SVE modes.
19604         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19605         SVE modes.
19606         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19607         if SVE is enabled.
19608         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19609         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19610         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19611         (aarch64_sve_float_mul_immediate_p): New functions.
19612         (aarch64_sve_valid_immediate): New function.
19613         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19614         Explicitly reject structure modes.  Check for INDEX constants.
19615         Handle PTRUE and PFALSE constants.
19616         (aarch64_check_zero_based_sve_index_immediate): New function.
19617         (aarch64_simd_imm_zero_p): Delete.
19618         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19619         vector modes.  Accept constants in the range of CNT[BHWD].
19620         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19621         ask for an Advanced SIMD mode.
19622         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19623         (aarch64_simd_vector_alignment): Handle SVE predicates.
19624         (aarch64_vectorize_preferred_vector_alignment): New function.
19625         (aarch64_simd_vector_alignment_reachable): Use it instead of
19626         the vector size.
19627         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19628         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19629         functions.
19630         (MAX_VECT_LEN): Delete.
19631         (expand_vec_perm_d): Add a vec_flags field.
19632         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19633         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19634         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19635         for SVE modes.
19636         (aarch64_evpc_rev): Rename to...
19637         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19638         (aarch64_evpc_rev_global): New function.
19639         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19640         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19641         MAX_VECT_LEN.
19642         (aarch64_evpc_sve_tbl): New function.
19643         (aarch64_expand_vec_perm_const_1): Update after rename of
19644         aarch64_evpc_rev.  Handle SVE permutes too, trying
19645         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19646         than aarch64_evpc_tbl.
19647         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19648         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19649         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19650         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19651         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19652         (aarch64_expand_sve_vcond): New functions.
19653         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19654         of aarch64_vector_mode_p.
19655         (aarch64_dwarf_poly_indeterminate_value): New function.
19656         (aarch64_compute_pressure_classes): Likewise.
19657         (aarch64_can_change_mode_class): Likewise.
19658         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19659         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19660         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19661         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19662         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19663         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19664         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19665         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19666         constraints.
19667         (Dn, Dl, Dr): Accept const as well as const_vector.
19668         (Dz): Likewise.  Compare against CONST0_RTX.
19669         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19670         of "vector" where appropriate.
19671         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19672         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19673         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19674         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19675         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19676         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19677         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19678         (v_int_equiv): Extend to SVE modes.
19679         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19680         mode attributes.
19681         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19682         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19683         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19684         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19685         (SVE_COND_FP_CMP): New int iterators.
19686         (perm_hilo): Handle the new unpack unspecs.
19687         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19688         attributes.
19689         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19690         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19691         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19692         (aarch64_equality_operator, aarch64_constant_vector_operand)
19693         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19694         (aarch64_sve_nonimmediate_operand): Likewise.
19695         (aarch64_sve_general_operand): Likewise.
19696         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19697         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19698         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19699         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19700         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19701         (aarch64_sve_float_arith_immediate): Likewise.
19702         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19703         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19704         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19705         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19706         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19707         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19708         (aarch64_sve_float_arith_operand): Likewise.
19709         (aarch64_sve_float_arith_with_sub_operand): Likewise.
19710         (aarch64_sve_float_mul_operand): Likewise.
19711         (aarch64_sve_vec_perm_operand): Likewise.
19712         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19713         (aarch64_mov_operand): Accept const_poly_int and const_vector.
19714         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19715         as well as const_vector.
19716         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19717         in file.  Use CONST0_RTX and CONSTM1_RTX.
19718         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
19719         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19720         Use aarch64_simd_imm_zero.
19721         * config/aarch64/aarch64-sve.md: New file.
19722         * config/aarch64/aarch64.md: Include it.
19723         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19724         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19725         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19726         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19727         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19728         (sve): New attribute.
19729         (enabled): Disable instructions with the sve attribute unless
19730         TARGET_SVE.
19731         (movqi, movhi): Pass CONST_POLY_INT operaneds through
19732         aarch64_expand_mov_immediate.
19733         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19734         CNT[BHSD] immediates.
19735         (movti): Split CONST_POLY_INT moves into two halves.
19736         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19737         Split additions that need a temporary here if the destination
19738         is the stack pointer.
19739         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19740         (*add<mode>3_poly_1): New instruction.
19741         (set_clobber_cc): New expander.
19743 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19745         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19746         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
19747         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19748         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19749         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
19750         Change innermode from fixed_mode_size to machine_mode.
19751         (simplify_subreg): Update call accordingly.  Handle a constant-sized
19752         subreg of a variable-length CONST_VECTOR.
19754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19755             Alan Hayward  <alan.hayward@arm.com>
19756             David Sherwood  <david.sherwood@arm.com>
19758         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19759         (add_offset_to_base): New function, split out from...
19760         (create_mem_ref): ...here.  When handling a scale other than 1,
19761         check first whether the address is valid without the offset.
19762         Add it into the base if so, leaving the index and scale as-is.
19764 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19766         PR c++/83778
19767         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19768         fold_for_warn before checking if arg2 is INTEGER_CST.
19770 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
19772         * config/rs6000/predicates.md (load_multiple_operation): Delete.
19773         (store_multiple_operation): Delete.
19774         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19775         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19776         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19777         guarded by TARGET_STRING.
19778         (rs6000_output_load_multiple): Delete.
19779         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19780         OPTION_MASK_STRING / TARGET_STRING handling.
19781         (print_operand) <'N', 'O'>: Add comment that these are unused now.
19782         (const rs6000_opt_masks) <"string">: Change mask to 0.
19783         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19784         (MASK_STRING): Delete.
19785         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19786         parts.  Simplify.
19787         (load_multiple): Delete.
19788         (*ldmsi8): Delete.
19789         (*ldmsi7): Delete.
19790         (*ldmsi6): Delete.
19791         (*ldmsi5): Delete.
19792         (*ldmsi4): Delete.
19793         (*ldmsi3): Delete.
19794         (store_multiple): Delete.
19795         (*stmsi8): Delete.
19796         (*stmsi7): Delete.
19797         (*stmsi6): Delete.
19798         (*stmsi5): Delete.
19799         (*stmsi4): Delete.
19800         (*stmsi3): Delete.
19801         (movmemsi_8reg): Delete.
19802         (corresponding unnamed define_insn): Delete.
19803         (movmemsi_6reg): Delete.
19804         (corresponding unnamed define_insn): Delete.
19805         (movmemsi_4reg): Delete.
19806         (corresponding unnamed define_insn): Delete.
19807         (movmemsi_2reg): Delete.
19808         (corresponding unnamed define_insn): Delete.
19809         (movmemsi_1reg): Delete.
19810         (corresponding unnamed define_insn): Delete.
19811         * config/rs6000/rs6000.opt (mno-string): New.
19812         (mstring): Replace by deprecation warning stub.
19813         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19815 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19817         * regrename.c (regrename_do_replace): If replacing the same
19818         reg multiple times, try to reuse last created gen_raw_REG.
19820         PR debug/81155
19821         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19822         main to workaround a bug in GDB.
19824 2018-01-12  Tom de Vries  <tom@codesourcery.com>
19826         PR target/83737
19827         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19829 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
19831         PR rtl-optimization/80481
19832         * ira-color.c (get_cap_member): New function.
19833         (allocnos_conflict_by_live_ranges_p): Use it.
19834         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19835         (setup_slot_coalesced_allocno_live_ranges): Ditto.
19837 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
19839         PR target/83628
19840         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19841         (*saddl_se_1): Ditto.
19842         (*ssubsi_1): Ditto.
19843         (*ssubl_se_1): Ditto.
19845 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19847         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19848         rather than wi::to_widest for DR_INITs.
19849         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19850         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19851         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19852         INTEGER_CSTs.
19853         (vect_analyze_group_access_1): Note that here.
19855 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19857         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19858         polynomial type sizes.
19860 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19862         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19863         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19864         (gimple_add_tmp_var): Likewise.
19866 2018-01-12  Martin Liska  <mliska@suse.cz>
19868         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19869         (gimple_alloc_sizes): Likewise.
19870         (dump_gimple_statistics): Use PRIu64 in printf format.
19871         * gimple.h: Change uint64_t to int.
19873 2018-01-12  Martin Liska  <mliska@suse.cz>
19875         * tree-core.h: Use uint64_t instead of int.
19876         * tree.c (tree_node_counts): Likewise.
19877         (tree_node_sizes): Likewise.
19878         (dump_tree_statistics): Use PRIu64 in printf format.
19880 2018-01-12  Martin Liska  <mliska@suse.cz>
19882         * Makefile.in: As qsort_chk is implemented in vec.c, add
19883         vec.o to linkage of gencfn-macros.
19884         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19885         passing the info to record_node_allocation_statistics.
19886         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19887         and pass the info.
19888         * ggc-common.c (struct ggc_usage): Add operator== and use
19889         it in operator< and compare function.
19890         * mem-stats.h (struct mem_usage): Likewise.
19891         * vec.c (struct vec_usage): Remove operator< and compare
19892         function. Can be simply inherited.
19894 2018-01-12  Martin Jambor  <mjambor@suse.cz>
19896         PR target/81616
19897         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19898         * tree-ssa-math-opts.c: Include domwalk.h.
19899         (convert_mult_to_fma_1): New function.
19900         (fma_transformation_info): New type.
19901         (fma_deferring_state): Likewise.
19902         (cancel_fma_deferring): New function.
19903         (result_of_phi): Likewise.
19904         (last_fma_candidate_feeds_initial_phi): Likewise.
19905         (convert_mult_to_fma): Added deferring logic, split actual
19906         transformation to convert_mult_to_fma_1.
19907         (math_opts_dom_walker): New type.
19908         (math_opts_dom_walker::after_dom_children): New method, body moved
19909         here from pass_optimize_widening_mul::execute, added deferring logic
19910         bits.
19911         (pass_optimize_widening_mul::execute): Moved most of code to
19912         math_opts_dom_walker::after_dom_children.
19913         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19914         * config/i386/i386.c (ix86_option_override_internal): Added
19915         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19917 2018-01-12  Richard Biener  <rguenther@suse.de>
19919         PR debug/83157
19920         * dwarf2out.c (gen_variable_die): Do not reset old_die for
19921         inline instance vars.
19923 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
19925         PR target/81819
19926         * config/rx/rx.c (rx_is_restricted_memory_address):
19927         Handle SUBREG case.
19929 2018-01-12  Richard Biener  <rguenther@suse.de>
19931         PR tree-optimization/80846
19932         * target.def (split_reduction): New target hook.
19933         * targhooks.c (default_split_reduction): New function.
19934         * targhooks.h (default_split_reduction): Declare.
19935         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19936         target requests first reduce vectors by combining low and high
19937         parts.
19938         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19939         (get_vectype_for_scalar_type_and_size): Export.
19940         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19941         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19942         * doc/tm.texi: Regenerate.
19943         * config/i386/i386.c (ix86_split_reduction): Implement
19944         TARGET_VECTORIZE_SPLIT_REDUCTION.
19946 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19948         PR target/83368
19949         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19950         in PIC mode except for TARGET_VXWORKS_RTP.
19951         * config/sparc/sparc.c: Include cfgrtl.h.
19952         (TARGET_INIT_PIC_REG): Define.
19953         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19954         (sparc_pic_register_p): New predicate.
19955         (sparc_legitimate_address_p): Use it.
19956         (sparc_legitimize_pic_address): Likewise.
19957         (sparc_delegitimize_address): Likewise.
19958         (sparc_mode_dependent_address_p): Likewise.
19959         (gen_load_pcrel_sym): Remove 4th parameter.
19960         (load_got_register): Adjust call to above.  Remove obsolete stuff.
19961         (sparc_expand_prologue): Do not call load_got_register here.
19962         (sparc_flat_expand_prologue): Likewise.
19963         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19964         (sparc_use_pseudo_pic_reg): New function.
19965         (sparc_init_pic_reg): Likewise.
19966         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19967         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19969 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
19971         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19972         Add item for branch_cost.
19974 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19976         PR rtl-optimization/83565
19977         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19978         not extend the result to a larger mode for rotate operations.
19979         (num_sign_bit_copies1): Likewise.
19981 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19983         PR target/40411
19984         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19985         -symbolic.
19986         Use values-Xc.o for -pedantic.
19987         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19989 2018-01-12  Martin Liska  <mliska@suse.cz>
19991         PR ipa/83054
19992         * ipa-devirt.c (final_warning_record::grow_type_warnings):
19993         New function.
19994         (possible_polymorphic_call_targets): Use it.
19995         (ipa_devirt): Likewise.
19997 2018-01-12  Martin Liska  <mliska@suse.cz>
19999         * profile-count.h (enum profile_quality): Use 0 as invalid
20000         enum value of profile_quality.
20002 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20004         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20005         -mext-string options.
20007 2018-01-12  Richard Biener  <rguenther@suse.de>
20009         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20010         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20011         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20012         Likewise.
20013         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20015 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20017         * configure.ac (--with-long-double-format): Add support for the
20018         configuration option to change the default long double format on
20019         PowerPC systems.
20020         * config.gcc (powerpc*-linux*-*): Likewise.
20021         * configure: Regenerate.
20022         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20023         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20024         used without modification.
20026 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20028         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20029         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20030         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20031         MISC_BUILTIN_SPEC_BARRIER.
20032         (rs6000_init_builtins): Likewise.
20033         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20034         enum value.
20035         (speculation_barrier): New define_insn.
20036         * doc/extend.texi: Document __builtin_speculation_barrier.
20038 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20040         PR target/83203
20041         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20042         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20043         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20044         iterators.
20045         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20046         integral modes instead of "ss" and "sd".
20047         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20048         vectors with 32-bit and 64-bit elements.
20049         (vecdupssescalarmodesuffix): New mode attribute.
20050         (vec_dup<mode>): Use it.
20052 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20054         PR target/83330
20055         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20056         frame if argument is passed on stack.
20058 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20060         PR target/82682
20061         * ree.c (combine_reaching_defs): Optimize also
20062         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20063         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20065 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20067         PR middle-end/83189
20068         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20070 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20072         PR middle-end/83718
20073         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20074         after they are computed.
20076 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20078         PR tree-optimization/83695
20079         * gimple-loop-linterchange.cc
20080         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20081         reset cached scev information after interchange.
20082         (pass_linterchange::execute): Remove call to scev_reset_htab.
20084 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20086         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20087         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20088         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20089         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20090         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20091         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20092         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20093         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20094         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20095         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20096         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20097         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20098         (V_lane_reg): Likewise.
20099         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20100         New define_expand.
20101         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20102         (vfmal_lane_low<mode>_intrinsic,
20103         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20104         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20105         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20106         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20107         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20108         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20110 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20112         * config/arm/arm-cpus.in (fp16fml): New feature.
20113         (ALL_SIMD): Add fp16fml.
20114         (armv8.2-a): Add fp16fml as an option.
20115         (armv8.3-a): Likewise.
20116         (armv8.4-a): Add fp16fml as part of fp16.
20117         * config/arm/arm.h (TARGET_FP16FML): Define.
20118         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20119         when appropriate.
20120         * config/arm/arm-modes.def (V2HF): Define.
20121         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20122         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20123         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20124         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20125         vfmsl_low, vfmsl_high): New set of builtins.
20126         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20127         (vfml_op): New code attribute.
20128         (VFMLHALVES): New int iterator.
20129         (VFML, VFMLSEL): New mode attributes.
20130         (V_reg): Define mapping for V2HF.
20131         (V_hi, V_lo): New mode attributes.
20132         (VF_constraint): Likewise.
20133         (vfml_half, vfml_half_selector): New int attributes.
20134         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20135         define_expand.
20136         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20137         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20138         New define_insn.
20139         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20140         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20141         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20142         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20143         documentation.
20144         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20145         Document new effective target and option set.
20147 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20149         * config/arm/arm-cpus.in (armv8_4): New feature.
20150         (ARMv8_4a): New fgroup.
20151         (armv8.4-a): New arch.
20152         * config/arm/arm-tables.opt: Regenerate.
20153         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20154         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20155         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20156         Add matching rules for -march=armv8.4-a and extensions.
20157         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20159 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20161         PR target/81821
20162         * config/rx/rx.md (BW): New mode attribute.
20163         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20165 2018-01-11  Richard Biener  <rguenther@suse.de>
20167         PR tree-optimization/83435
20168         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20169         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20170         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20172 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20173             Alan Hayward  <alan.hayward@arm.com>
20174             David Sherwood  <david.sherwood@arm.com>
20176         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20177         field.
20178         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20179         (aarch64_print_address_internal): Use it to check for a zero offset.
20181 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20182             Alan Hayward  <alan.hayward@arm.com>
20183             David Sherwood  <david.sherwood@arm.com>
20185         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20186         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20187         Return a poly_int64 rather than a HOST_WIDE_INT.
20188         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20189         rather than a HOST_WIDE_INT.
20190         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20191         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20192         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20193         final_offset from HOST_WIDE_INT to poly_int64.
20194         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20195         to_constant when getting the number of units in an Advanced SIMD
20196         mode.
20197         (aarch64_builtin_vectorized_function): Check for a constant number
20198         of units.
20199         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20200         GET_MODE_SIZE.
20201         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20202         attribute instead of GET_MODE_NUNITS.
20203         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20204         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20205         GET_MODE_SIZE for fixed-size registers.
20206         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20207         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20208         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20209         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20210         (aarch64_print_operand, aarch64_print_address_internal)
20211         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20212         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20213         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20214         Handle polynomial GET_MODE_SIZE.
20215         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20216         wider than SImode without modification.
20217         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20218         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20219         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20220         passing and returning SVE modes.
20221         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20222         rather than GEN_INT.
20223         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20224         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20225         (aarch64_allocate_and_probe_stack_space): Likewise.
20226         (aarch64_layout_frame): Cope with polynomial offsets.
20227         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20228         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20229         polynomial offsets.
20230         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20231         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20232         poly_int64 rather than a HOST_WIDE_INT.
20233         (aarch64_get_separate_components, aarch64_process_components)
20234         (aarch64_expand_prologue, aarch64_expand_epilogue)
20235         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20236         (aarch64_anchor_offset): New function, split out from...
20237         (aarch64_legitimize_address): ...here.
20238         (aarch64_builtin_vectorization_cost): Handle polynomial
20239         TYPE_VECTOR_SUBPARTS.
20240         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20241         GET_MODE_NUNITS.
20242         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20243         number of elements from the PARALLEL rather than the mode.
20244         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20245         rather than GET_MODE_BITSIZE.
20246         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20247         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20248         (aarch64_expand_vec_perm_const_1): Handle polynomial
20249         d->perm.length () and d->perm elements.
20250         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20251         Apply to_constant to d->perm elements.
20252         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20253         polynomial CONST_VECTOR_NUNITS.
20254         (aarch64_move_pointer): Take amount as a poly_int64 rather
20255         than an int.
20256         (aarch64_progress_pointer): Avoid temporary variable.
20257         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20258         the mode attribute instead of GET_MODE.
20260 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20261             Alan Hayward  <alan.hayward@arm.com>
20262             David Sherwood  <david.sherwood@arm.com>
20264         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20265         x exists before using it.
20266         (aarch64_add_constant_internal): Rename to...
20267         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20268         src and dest rtxes.  Handle the case in which they're different,
20269         including when the offset is zero.  Replace scratchreg with an rtx.
20270         Use 2 additions if there is no spare register into which we can
20271         move a 16-bit constant.
20272         (aarch64_add_constant): Delete.
20273         (aarch64_add_offset): Replace reg with separate src and dest
20274         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20275         Use aarch64_add_offset_1.
20276         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20277         an rtx rather than an int.  Take the delta as a poly_int64
20278         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20279         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20280         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20281         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20282         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20283         and aarch64_add_sp.
20284         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20285         aarch64_add_constant.
20287 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20289         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20290         Use scalar_float_mode.
20292 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20294         * config/aarch64/aarch64-simd.md
20295         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20296         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20297         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20298         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20299         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20300         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20301         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20302         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20303         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20304         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20306 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20308         PR target/83514
20309         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20310         targ_options->x_arm_arch_string is non NULL.
20312 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20314         * config/aarch64/aarch64.h
20315         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20317 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20319         PR target/82096
20320         * expmed.c (emit_store_flag_force): Swap if const op0
20321         and change VOIDmode to mode of op0.
20323 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20325         PR rtl-optimization/83761
20326         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20327         than bytes to mode_for_size.
20329 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20331         PR middle-end/83189
20332         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20333         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20334         profile.
20336 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20338         PR middle-end/83575
20339         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20340         when in layout mode.
20341         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20342         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20343         partition fixup.
20345 2018-01-10  Michael Collison  <michael.collison@arm.com>
20347         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20348         * config/aarch64/aarch64-option-extension.def: Add
20349         AARCH64_OPT_EXTENSION of 'fp16fml'.
20350         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20351         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20352         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20353         * config/aarch64/constraints.md (Ui7): New constraint.
20354         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20355         (VFMLA_SEL_W): Ditto.
20356         (f16quad): Ditto.
20357         (f16mac1): Ditto.
20358         (VFMLA16_LOW): New int iterator.
20359         (VFMLA16_HIGH): Ditto.
20360         (UNSPEC_FMLAL): New unspec.
20361         (UNSPEC_FMLSL): Ditto.
20362         (UNSPEC_FMLAL2): Ditto.
20363         (UNSPEC_FMLSL2): Ditto.
20364         (f16mac): New code attribute.
20365         * config/aarch64/aarch64-simd-builtins.def
20366         (aarch64_fmlal_lowv2sf): Ditto.
20367         (aarch64_fmlsl_lowv2sf): Ditto.
20368         (aarch64_fmlalq_lowv4sf): Ditto.
20369         (aarch64_fmlslq_lowv4sf): Ditto.
20370         (aarch64_fmlal_highv2sf): Ditto.
20371         (aarch64_fmlsl_highv2sf): Ditto.
20372         (aarch64_fmlalq_highv4sf): Ditto.
20373         (aarch64_fmlslq_highv4sf): Ditto.
20374         (aarch64_fmlal_lane_lowv2sf): Ditto.
20375         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20376         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20377         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20378         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20379         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20380         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20381         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20382         (aarch64_fmlal_lane_highv2sf): Ditto.
20383         (aarch64_fmlsl_lane_highv2sf): Ditto.
20384         (aarch64_fmlal_laneq_highv2sf): Ditto.
20385         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20386         (aarch64_fmlalq_lane_highv4sf): Ditto.
20387         (aarch64_fmlsl_lane_highv4sf): Ditto.
20388         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20389         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20390         * config/aarch64/aarch64-simd.md:
20391         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20392         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20393         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20394         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20395         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20396         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20397         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20398         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20399         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20400         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20401         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20402         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20403         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20404         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20405         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20406         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20407         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20408         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20409         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20410         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20411         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20412         (vfmlsl_low_u32): Ditto.
20413         (vfmlalq_low_u32): Ditto.
20414         (vfmlslq_low_u32): Ditto.
20415         (vfmlal_high_u32): Ditto.
20416         (vfmlsl_high_u32): Ditto.
20417         (vfmlalq_high_u32): Ditto.
20418         (vfmlslq_high_u32): Ditto.
20419         (vfmlal_lane_low_u32): Ditto.
20420         (vfmlsl_lane_low_u32): Ditto.
20421         (vfmlal_laneq_low_u32): Ditto.
20422         (vfmlsl_laneq_low_u32): Ditto.
20423         (vfmlalq_lane_low_u32): Ditto.
20424         (vfmlslq_lane_low_u32): Ditto.
20425         (vfmlalq_laneq_low_u32): Ditto.
20426         (vfmlslq_laneq_low_u32): Ditto.
20427         (vfmlal_lane_high_u32): Ditto.
20428         (vfmlsl_lane_high_u32): Ditto.
20429         (vfmlal_laneq_high_u32): Ditto.
20430         (vfmlsl_laneq_high_u32): Ditto.
20431         (vfmlalq_lane_high_u32): Ditto.
20432         (vfmlslq_lane_high_u32): Ditto.
20433         (vfmlalq_laneq_high_u32): Ditto.
20434         (vfmlslq_laneq_high_u32): Ditto.
20435         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20436         (AARCH64_FL_FOR_ARCH8_4): New.
20437         (AARCH64_ISA_F16FML): New ISA flag.
20438         (TARGET_F16FML): New feature flag for fp16fml.
20439         (doc/invoke.texi): Document new fp16fml option.
20441 2018-01-10  Michael Collison  <michael.collison@arm.com>
20443         * config/aarch64/aarch64-builtins.c:
20444         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20445         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20446         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20447         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20448         (AARCH64_ISA_SHA3): New ISA flag.
20449         (TARGET_SHA3): New feature flag for sha3.
20450         * config/aarch64/iterators.md (sha512_op): New int attribute.
20451         (CRYPTO_SHA512): New int iterator.
20452         (UNSPEC_SHA512H): New unspec.
20453         (UNSPEC_SHA512H2): Ditto.
20454         (UNSPEC_SHA512SU0): Ditto.
20455         (UNSPEC_SHA512SU1): Ditto.
20456         * config/aarch64/aarch64-simd-builtins.def
20457         (aarch64_crypto_sha512hqv2di): New builtin.
20458         (aarch64_crypto_sha512h2qv2di): Ditto.
20459         (aarch64_crypto_sha512su0qv2di): Ditto.
20460         (aarch64_crypto_sha512su1qv2di): Ditto.
20461         (aarch64_eor3qv8hi): Ditto.
20462         (aarch64_rax1qv2di): Ditto.
20463         (aarch64_xarqv2di): Ditto.
20464         (aarch64_bcaxqv8hi): Ditto.
20465         * config/aarch64/aarch64-simd.md:
20466         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20467         (aarch64_crypto_sha512su0qv2di): Ditto.
20468         (aarch64_crypto_sha512su1qv2di): Ditto.
20469         (aarch64_eor3qv8hi): Ditto.
20470         (aarch64_rax1qv2di): Ditto.
20471         (aarch64_xarqv2di): Ditto.
20472         (aarch64_bcaxqv8hi): Ditto.
20473         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20474         (vsha512h2q_u64): Ditto.
20475         (vsha512su0q_u64): Ditto.
20476         (vsha512su1q_u64): Ditto.
20477         (veor3q_u16): Ditto.
20478         (vrax1q_u64): Ditto.
20479         (vxarq_u64): Ditto.
20480         (vbcaxq_u16): Ditto.
20481         * config/arm/types.md (crypto_sha512): New type attribute.
20482         (crypto_sha3): Ditto.
20483         (doc/invoke.texi): Document new sha3 option.
20485 2018-01-10  Michael Collison  <michael.collison@arm.com>
20487         * config/aarch64/aarch64-builtins.c:
20488         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20489         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20490         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20491         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20492         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20493         (AARCH64_ISA_SM4): New ISA flag.
20494         (TARGET_SM4): New feature flag for sm4.
20495         * config/aarch64/aarch64-simd-builtins.def
20496         (aarch64_sm3ss1qv4si): Ditto.
20497         (aarch64_sm3tt1aq4si): Ditto.
20498         (aarch64_sm3tt1bq4si): Ditto.
20499         (aarch64_sm3tt2aq4si): Ditto.
20500         (aarch64_sm3tt2bq4si): Ditto.
20501         (aarch64_sm3partw1qv4si): Ditto.
20502         (aarch64_sm3partw2qv4si): Ditto.
20503         (aarch64_sm4eqv4si): Ditto.
20504         (aarch64_sm4ekeyqv4si): Ditto.
20505         * config/aarch64/aarch64-simd.md:
20506         (aarch64_sm3ss1qv4si): Ditto.
20507         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20508         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20509         (aarch64_sm4eqv4si): Ditto.
20510         (aarch64_sm4ekeyqv4si): Ditto.
20511         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20512         (sm3part_op): Ditto.
20513         (CRYPTO_SM3TT): Ditto.
20514         (CRYPTO_SM3PART): Ditto.
20515         (UNSPEC_SM3SS1): New unspec.
20516         (UNSPEC_SM3TT1A): Ditto.
20517         (UNSPEC_SM3TT1B): Ditto.
20518         (UNSPEC_SM3TT2A): Ditto.
20519         (UNSPEC_SM3TT2B): Ditto.
20520         (UNSPEC_SM3PARTW1): Ditto.
20521         (UNSPEC_SM3PARTW2): Ditto.
20522         (UNSPEC_SM4E): Ditto.
20523         (UNSPEC_SM4EKEY): Ditto.
20524         * config/aarch64/constraints.md (Ui2): New constraint.
20525         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20526         * config/arm/types.md (crypto_sm3): New type attribute.
20527         (crypto_sm4): Ditto.
20528         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20529         (vsm3tt1aq_u32): Ditto.
20530         (vsm3tt1bq_u32): Ditto.
20531         (vsm3tt2aq_u32): Ditto.
20532         (vsm3tt2bq_u32): Ditto.
20533         (vsm3partw1q_u32): Ditto.
20534         (vsm3partw2q_u32): Ditto.
20535         (vsm4eq_u32): Ditto.
20536         (vsm4ekeyq_u32): Ditto.
20537         (doc/invoke.texi): Document new sm4 option.
20539 2018-01-10  Michael Collison  <michael.collison@arm.com>
20541         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20542         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20543         (AARCH64_FL_FOR_ARCH8_4): New.
20544         (AARCH64_FL_V8_4): New flag.
20545         (doc/invoke.texi): Document new armv8.4-a option.
20547 2018-01-10  Michael Collison  <michael.collison@arm.com>
20549         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20550         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20551         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20552         * config/aarch64/aarch64-option-extension.def: Add
20553         AARCH64_OPT_EXTENSION of 'sha2'.
20554         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20555         (crypto): Disable sha2 and aes if crypto disabled.
20556         (crypto): Enable aes and sha2 if enabled.
20557         (simd): Disable sha2 and aes if simd disabled.
20558         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20559         New flags.
20560         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20561         (TARGET_SHA2): New feature flag for sha2.
20562         (TARGET_AES): New feature flag for aes.
20563         * config/aarch64/aarch64-simd.md:
20564         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20565         conditional on TARGET_AES.
20566         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20567         (aarch64_crypto_sha1hsi): Make pattern conditional
20568         on TARGET_SHA2.
20569         (aarch64_crypto_sha1hv4si): Ditto.
20570         (aarch64_be_crypto_sha1hv4si): Ditto.
20571         (aarch64_crypto_sha1su1v4si): Ditto.
20572         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20573         (aarch64_crypto_sha1su0v4si): Ditto.
20574         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20575         (aarch64_crypto_sha256su0v4si): Ditto.
20576         (aarch64_crypto_sha256su1v4si): Ditto.
20577         (doc/invoke.texi): Document new aes and sha2 options.
20579 2018-01-10  Martin Sebor  <msebor@redhat.com>
20581         PR tree-optimization/83781
20582         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20583         as string arrays.
20585 2018-01-11  Martin Sebor  <msebor@gmail.com>
20586             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20588         PR tree-optimization/83501
20589         PR tree-optimization/81703
20591         * tree-ssa-strlen.c (get_string_cst): Rename...
20592         (get_string_len): ...to this.  Handle global constants.
20593         (handle_char_store): Adjust.
20595 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20596             Jim Wilson  <jimw@sifive.com>
20598         * config/riscv/riscv-protos.h (riscv_output_return): New.
20599         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20600         (riscv_attribute_table, riscv_output_return),
20601         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20602         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20603         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20604         function.
20605         (riscv_expand_prologue): Add early return for naked function.
20606         (riscv_expand_epilogue): Likewise.
20607         (riscv_function_ok_for_sibcall): Return false for naked function.
20608         (riscv_set_current_function): New.
20609         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20610         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20611         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20612         * doc/extend.texi (RISC-V Function Attributes): New.
20614 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20616         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20617         check for 128-bit long double before checking TCmode.
20618         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20619         128-bit long doubles before checking TFmode or TCmode.
20620         (FLOAT128_IBM_P): Likewise.
20622 2018-01-10  Martin Sebor  <msebor@redhat.com>
20624         PR tree-optimization/83671
20625         * builtins.c (c_strlen): Unconditionally return zero for the empty
20626         string.
20627         Use -Warray-bounds for warnings.
20628         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20629         for non-constant array indices with COMPONENT_REF, arrays of
20630         arrays, and pointers to arrays.
20631         (gimple_fold_builtin_strlen): Determine and set length range for
20632         non-constant character arrays.
20634 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20636         PR middle-end/81897
20637         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20638         empty blocks.
20640 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20642         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20644 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20646         PR target/83399
20647         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20648         VECTOR_MEM_ALTIVEC_OR_VSX_P.
20649         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20650         indexed_or_indirect_operand predicate.
20651         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20652         (*vsx_le_perm_load_v8hi): Likewise.
20653         (*vsx_le_perm_load_v16qi): Likewise.
20654         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20655         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20656         (*vsx_le_perm_store_v8hi): Likewise.
20657         (*vsx_le_perm_store_v16qi): Likewise.
20658         (eight unnamed splitters): Likewise.
20660 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20662         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20663         * config/rs6000/emmintrin.h: Likewise.
20664         * config/rs6000/mmintrin.h: Likewise.
20665         * config/rs6000/xmmintrin.h: Likewise.
20667 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
20669         PR c++/43486
20670         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20671         "public_flag".
20672         * tree.c (tree_nop_conversion): Return true for location wrapper
20673         nodes.
20674         (maybe_wrap_with_location): New function.
20675         (selftest::check_strip_nops): New function.
20676         (selftest::test_location_wrappers): New function.
20677         (selftest::tree_c_tests): Call it.
20678         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20679         (maybe_wrap_with_location): New decl.
20680         (EXPR_LOCATION_WRAPPER_P): New macro.
20681         (location_wrapper_p): New inline function.
20682         (tree_strip_any_location_wrapper): New inline function.
20684 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
20686         PR target/83735
20687         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20688         stack_realign_offset for the largest alignment of stack slot
20689         actually used.
20690         (ix86_find_max_used_stack_alignment): New function.
20691         (ix86_finalize_stack_frame_flags): Use it.  Set
20692         max_used_stack_alignment if we don't realign stack.
20693         * config/i386/i386.h (machine_function): Add
20694         max_used_stack_alignment.
20696 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
20698         * config/arm/arm.opt (-mbranch-cost): New option.
20699         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20700         account.
20702 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
20704         PR target/83629
20705         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20706         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20708 2018-01-10  Richard Biener  <rguenther@suse.de>
20710         PR debug/83765
20711         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20712         early out so it also covers the case where we have a non-NULL
20713         origin.
20715 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20717         PR tree-optimization/83753
20718         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20719         for non-strided grouped accesses if the number of elements is 1.
20721 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20723         PR target/81616
20724         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20725         * i386.h (TARGET_USE_GATHER): Define.
20726         * x86-tune.def (X86_TUNE_USE_GATHER): New.
20728 2018-01-10  Martin Liska  <mliska@suse.cz>
20730         PR bootstrap/82831
20731         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20732         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20733         partitioning.
20734         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20735         CLEANUP_NO_PARTITIONING is not set.
20737 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20739         * doc/rtl.texi: Remove documentation of (const ...) wrappers
20740         for vectors, as a partial revert of r254296.
20741         * rtl.h (const_vec_p): Delete.
20742         (const_vec_duplicate_p): Don't test for vector CONSTs.
20743         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20744         * expmed.c (make_tree): Likewise.
20746         Revert:
20747         * common.md (E, F): Use CONSTANT_P instead of checking for
20748         CONST_VECTOR.
20749         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20750         checking for CONST_VECTOR.
20752 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20754         PR middle-end/83575
20755         * predict.c (force_edge_cold): Handle in more sane way edges
20756         with no prediction.
20758 2018-01-09  Carl Love  <cel@us.ibm.com>
20760         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20761         V4SI, V4SF types.
20762         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20763         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20764         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20765         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
20766         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20767         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
20768         * config/rs6000/rs6000-protos.h: Add extern defition for
20769         rs6000_generate_float2_double_code.
20770         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20771         function.
20772         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20773         (float2_v2df): Add define_expand.
20775 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
20777         PR target/83628
20778         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20779         op_mode in the force_to_mode call.
20781 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20783         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20784         instead of checking each element individually.
20785         (aarch64_evpc_uzp): Likewise.
20786         (aarch64_evpc_zip): Likewise.
20787         (aarch64_evpc_ext): Likewise.
20788         (aarch64_evpc_rev): Likewise.
20789         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20790         instead of checking each element individually.  Return true without
20791         generating rtl if
20792         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20793         whether all selected elements come from the same input, instead of
20794         checking each element individually.  Remove calls to gen_rtx_REG,
20795         start_sequence and end_sequence and instead assert that no rtl is
20796         generated.
20798 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20800         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20801         order of HIGH and CONST checks.
20803 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20805         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20806         if the destination isn't an SSA_NAME.
20808 2018-01-09  Richard Biener  <rguenther@suse.de>
20810         PR tree-optimization/83668
20811         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20812         move prologue...
20813         (canonicalize_loop_form): ... here, renamed from ...
20814         (canonicalize_loop_closed_ssa_form): ... this and amended to
20815         swap successor edges for loop exit blocks to make us use
20816         the RPO order we need for initial schedule generation.
20818 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
20820         PR tree-optimization/64811
20821         * match.pd: When optimizing comparisons with Inf, avoid
20822         introducing or losing exceptions from comparisons with NaN.
20824 2018-01-09  Martin Liska  <mliska@suse.cz>
20826         PR sanitizer/82517
20827         * asan.c (shadow_mem_size): Add gcc_assert.
20829 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
20831         Don't save registers in main().
20833         PR target/83738
20834         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20835         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20836         * config/avr/avr.c (avr_set_current_function): Don't error if
20837         naked, OS_task or OS_main are specified at the same time.
20838         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20839         OS_main.
20840         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20841         attribute.
20842         * common/config/avr/avr-common.c (avr_option_optimization_table):
20843         Switch on -mmain-is-OS_task for optimizing compilations.
20845 2018-01-09  Richard Biener  <rguenther@suse.de>
20847         PR tree-optimization/83572
20848         * graphite.c: Include cfganal.h.
20849         (graphite_transform_loops): Connect infinite loops to exit
20850         and remove fake edges at the end.
20852 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20854         * ipa-inline.c (edge_badness): Revert accidental checkin.
20856 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20858         PR ipa/80763
20859         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20860         symbols; not inline clones.
20862 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
20864         PR target/83507
20865         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20866         hard registers.  Formatting fixes.
20868         PR preprocessor/83722
20869         * gcc.c (try_generate_repro): Pass
20870         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20871         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20872         do_report_bug.
20874 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
20875             Kito Cheng  <kito.cheng@gmail.com>
20877         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20878         (riscv_leaf_function_p): Delete.
20879         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20881 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20883         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20884         function.
20885         (do_ifelse): New function.
20886         (do_isel): New function.
20887         (do_sub3): New function.
20888         (do_add3): New function.
20889         (do_load_mask_compare): New function.
20890         (do_overlap_load_compare): New function.
20891         (expand_compare_loop): New function.
20892         (expand_block_compare): Call expand_compare_loop() when appropriate.
20893         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20894         option description.
20895         (-mblock-compare-inline-loop-limit): New option.
20897 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20899         PR target/83677
20900         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20901         Reverse order of second and third operands in first alternative.
20902         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20903         of first and second elements in UNSPEC_VPERMR vector.
20904         (altivec_expand_vec_perm_le): Likewise.
20906 2018-01-08  Jeff Law  <law@redhat.com>
20908         PR rtl-optimizatin/81308
20909         * tree-switch-conversion.c (cfg_altered): New file scoped static.
20910         (process_switch): If group_case_labels makes a change, then set
20911         cfg_altered.
20912         (pass_convert_switch::execute): If a switch is converted, then
20913         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
20915         PR rtl-optimization/81308
20916         * recog.c (split_all_insns): Conditionally cleanup the CFG after
20917         splitting insns.
20919 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
20921         PR target/83663 - Revert r255946
20922         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20923         generation for cases where splatting a value is not useful.
20924         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20925         across a vec_duplicate and a paradoxical subreg forming a vector
20926         mode to a vec_concat.
20928 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20930         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20931         -march=armv8.3-a variants.
20932         * config/arm/t-multilib: Likewise.
20933         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
20935 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20937         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20938         to generate rtl.
20939         (cceq_ior_compare_complement): Give it a name so I can use it, and
20940         change boolean_or_operator predicate to boolean_operator so it can
20941         be used to generate a crand.
20942         (eqne): New code iterator.
20943         (bd/bd_neg): New code_attrs.
20944         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20945         a single define_insn.
20946         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20947         decrement (bdnzt/bdnzf/bdzt/bdzf).
20948         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20949         with the new names of the branch decrement patterns, and added the
20950         names of the branch decrement conditional patterns.
20952 2018-01-08  Richard Biener  <rguenther@suse.de>
20954         PR tree-optimization/83563
20955         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20956         cache.
20958 2018-01-08  Richard Biener  <rguenther@suse.de>
20960         PR middle-end/83713
20961         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20963 2018-01-08  Richard Biener  <rguenther@suse.de>
20965         PR tree-optimization/83685
20966         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20967         references to abnormals.
20969 2018-01-08  Richard Biener  <rguenther@suse.de>
20971         PR lto/83719
20972         * dwarf2out.c (output_indirect_strings): Handle empty
20973         skeleton_debug_str_hash.
20974         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20976 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20978         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20979         (emit_store_direct): Likewise.
20980         (arc_trampoline_adjust_address): Likewise.
20981         (arc_asm_trampoline_template): New function.
20982         (arc_initialize_trampoline): Use asm_trampoline_template.
20983         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20984         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20985         * config/arc/arc.md (flush_icache): Delete pattern.
20987 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20989         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20990         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20991         munaligned-access.
20993 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20995         PR target/83681
20996         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20997         by not USED_FOR_TARGET.
20998         (make_pass_resolve_sw_modes): Likewise.
21000 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21002         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21003         USED_FOR_TARGET.
21005 2018-01-08  Richard Biener  <rguenther@suse.de>
21007         PR middle-end/83580
21008         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21010 2018-01-08  Richard Biener  <rguenther@suse.de>
21012         PR middle-end/83517
21013         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21015 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21017         PR middle-end/81897
21018         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21019         basic blocks with a small number of successors.
21020         (convert_control_dep_chain_into_preds): Improve handling of
21021         forwarder blocks.
21022         (dump_predicates): Split apart into...
21023         (dump_pred_chain): ...here...
21024         (dump_pred_info): ...and here.
21025         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21026         (can_chain_union_be_invalidated_p): Improve check for invalidation
21027         of paths.
21028         (uninit_uses_cannot_happen): Avoid unnecessary if
21029         convert_control_dep_chain_into_preds yielded nothing.
21031 2018-01-06  Martin Sebor  <msebor@redhat.com>
21033         PR tree-optimization/83640
21034         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21035         subtracting negative offset from size.
21036         (builtin_access::overlap): Adjust offset bounds of the access to fall
21037         within the size of the object if possible.
21039 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21041         PR rtl-optimization/83699
21042         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21043         extract_bit_field_as_subreg to cases in which the extracted
21044         value is also a vector.
21046         * lra-constraints.c (process_alt_operands): Test for the equivalence
21047         substitutions when detecting a possible reload cycle.
21049 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21051         PR debug/83480
21052         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21053         by default if flag_selective_schedling{,2}.  Formatting fixes.
21055         PR rtl-optimization/83682
21056         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21057         if it has non-VECTOR_MODE element mode.
21058         (vec_duplicate_p): Likewise.
21060         PR middle-end/83694
21061         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21062         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21064 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21066         PR target/83604
21067         * config/i386/i386-builtin.def
21068         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21069         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21070         Require also OPTION_MASK_ISA_AVX512F in addition to
21071         OPTION_MASK_ISA_GFNI.
21072         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21073         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21074         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21075         to OPTION_MASK_ISA_GFNI.
21076         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21077         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21078         OPTION_MASK_ISA_AVX512BW.
21079         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21080         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21081         addition to OPTION_MASK_ISA_GFNI.
21082         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21083         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21084         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21085         to OPTION_MASK_ISA_GFNI.
21086         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21087         a requirement for all ISAs rather than any of them with a few
21088         exceptions.
21089         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21090         processing.
21091         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21092         bitmasks to be enabled with 3 exceptions, instead of requiring any
21093         enabled ISA with lots of exceptions.
21094         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21095         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21096         Change avx512bw in isa attribute to avx512f.
21097         * config/i386/sgxintrin.h: Add license boilerplate.
21098         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21099         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21100         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21101         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21102         defined.
21103         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21104         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21105         temporarily sse2 rather than sse if not enabled already.
21107         PR target/83604
21108         * config/i386/sse.md (VI248_VLBW): Rename to ...
21109         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21110         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21111         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21112         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21113         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21114         mode iterator instead of VI248_VLBW.
21116 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21118         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21119         (record_modified): Skip clobbers; add debug output.
21120         (param_change_prob): Use sreal frequencies.
21122 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21124         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21125         punt for user-aligned variables.
21127 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21129         * tree-chrec.c (chrec_contains_symbols): Return true for
21130         POLY_INT_CST.
21132 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21134         PR target/82439
21135         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21136         of (x|y) == x for BICS pattern.
21138 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21140         PR tree-optimization/83605
21141         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21142         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21143         can throw.
21145 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21147         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21148         * config/epiphany/rtems.h: New file.
21150 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21151             Uros Bizjak  <ubizjak@gmail.com>
21153         PR target/83554
21154         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21155         QIreg_operand instead of register_operand predicate.
21156         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21157         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21158         comments instead of -fmitigate[-_]rop.
21160 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21162         PR bootstrap/81926
21163         * cgraphunit.c (symbol_table::compile): Switch to text_section
21164         before calling assembly_start debug hook.
21165         * run-rtl-passes.c (run_rtl_passes): Likewise.
21166         Include output.h.
21168 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21170         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21171         range_int_cst_p rather than !symbolic_range_p before calling
21172         extract_range_from_multiplicative_op_1.
21174 2018-01-04  Jeff Law  <law@redhat.com>
21176         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21177         redundant test in assertion.
21179 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21181         * doc/rtl.texi: Document machine_mode wrapper classes.
21183 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21185         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21186         using tree_to_uhwi.
21188 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21190         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21191         the VEC_PERM_EXPR fold to fail.
21193 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21195         PR debug/83585
21196         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21197         to switched_sections.
21199 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21201         PR target/83680
21202         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21203         test for d.testing.
21205 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21207         PR target/83387
21208         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21209         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21211 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21213         PR debug/83666
21214         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21215         is BLKmode and bitpos not zero or mode change is needed.
21217 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21219         PR target/83675
21220         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21221         TARGET_VIS2.
21223 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21225         PR target/83628
21226         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21227         instead of MULT rtx.  Update all corresponding splitters.
21228         (*saddl_se): Ditto.
21229         (*ssub<modesuffix>): Ditto.
21230         (*ssubl_se): Ditto.
21231         (*cmp_sadd_di): Update split patterns.
21232         (*cmp_sadd_si): Ditto.
21233         (*cmp_sadd_sidi): Ditto.
21234         (*cmp_ssub_di): Ditto.
21235         (*cmp_ssub_si): Ditto.
21236         (*cmp_ssub_sidi): Ditto.
21237         * config/alpha/predicates.md (const23_operand): New predicate.
21238         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21239         Look for ASHIFT, not MULT inner operand.
21240         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21242 2018-01-04  Martin Liska  <mliska@suse.cz>
21244         PR gcov-profile/83669
21245         * gcov.c (output_intermediate_file): Add version to intermediate
21246         gcov file.
21247         * doc/gcov.texi: Document new field 'version' in intermediate
21248         file format. Fix location of '-k' option of gcov command.
21250 2018-01-04  Martin Liska  <mliska@suse.cz>
21252         PR ipa/82352
21253         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21255 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21257         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21259 2018-01-03  Martin Sebor  <msebor@redhat.com>
21261         PR tree-optimization/83655
21262         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21263         checking calls with invalid arguments.
21265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21267         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21268         (vectorizable_mask_load_store): Delete.
21269         (vectorizable_call): Return false for masked loads and stores.
21270         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21271         instead of gimple_assign_rhs1.
21272         (vectorizable_load): Handle IFN_MASK_LOAD.
21273         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21275 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21277         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21278         split out from..,
21279         (vectorizable_mask_load_store): ...here.
21280         (vectorizable_load): ...and here.
21282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21284         * tree-vect-stmts.c (vect_build_all_ones_mask)
21285         (vect_build_zero_merge_argument): New functions, split out from...
21286         (vectorizable_load): ...here.
21288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21290         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21291         split out from...
21292         (vectorizable_mask_load_store): ...here.
21293         (vectorizable_store): ...and here.
21295 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21297         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21298         split out from...
21299         (vectorizable_mask_load_store): ...here.
21301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21303         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21304         (vect_model_store_cost): Take a vec_load_store_type instead of a
21305         vect_def_type.
21306         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21307         (vect_model_store_cost): Take a vec_load_store_type instead of a
21308         vect_def_type.
21309         (vectorizable_mask_load_store): Update accordingly.
21310         (vectorizable_store): Likewise.
21311         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21315         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21316         IFN_MASK_LOAD calls here rather than...
21317         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21320             Alan Hayward  <alan.hayward@arm.com>
21321             David Sherwood  <david.sherwood@arm.com>
21323         * expmed.c (extract_bit_field_1): For vector extracts,
21324         fall back to extract_bit_field_as_subreg if vec_extract
21325         isn't available.
21327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21328             Alan Hayward  <alan.hayward@arm.com>
21329             David Sherwood  <david.sherwood@arm.com>
21331         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21332         they are variable or constant sized.
21333         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21334         slots for constant-sized data.
21336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21337             Alan Hayward  <alan.hayward@arm.com>
21338             David Sherwood  <david.sherwood@arm.com>
21340         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21341         handling COND_EXPRs with boolean comparisons, try to find a better
21342         basis for the mask type than the boolean itself.
21344 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21346         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21347         is calculated and how it can be overridden.
21348         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21349         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21350         if defined.
21351         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21352         if nonzero.
21354 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21355             Alan Hayward  <alan.hayward@arm.com>
21356             David Sherwood  <david.sherwood@arm.com>
21358         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21359         Remove the mode argument.
21360         (aarch64_simd_valid_immediate): Remove the mode and inverse
21361         arguments.
21362         * config/aarch64/iterators.md (bitsize): New iterator.
21363         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21364         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21365         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21366         aarch64_simd_valid_immediate.
21367         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21368         (aarch64_reg_or_bic_imm): Likewise.
21369         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21370         with an insn_type enum and msl with a modifier_type enum.
21371         Replace element_width with a scalar_mode.  Change the shift
21372         to unsigned int.  Add constructors for scalar_float_mode and
21373         scalar_int_mode elements.
21374         (aarch64_vect_float_const_representable_p): Delete.
21375         (aarch64_can_const_movi_rtx_p)
21376         (aarch64_simd_scalar_immediate_valid_for_move)
21377         (aarch64_simd_make_constant): Update call to
21378         aarch64_simd_valid_immediate.
21379         (aarch64_advsimd_valid_immediate_hs): New function.
21380         (aarch64_advsimd_valid_immediate): Likewise.
21381         (aarch64_simd_valid_immediate): Remove mode and inverse
21382         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21383         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21384         and aarch64_float_const_representable_p on the result.
21385         (aarch64_output_simd_mov_immediate): Remove mode argument.
21386         Update call to aarch64_simd_valid_immediate and use of
21387         simd_immediate_info.
21388         (aarch64_output_scalar_simd_mov_immediate): Update call
21389         accordingly.
21391 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21392             Alan Hayward  <alan.hayward@arm.com>
21393             David Sherwood  <david.sherwood@arm.com>
21395         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21396         (mode_nunits): Likewise CONST_MODE_NUNITS.
21397         * machmode.def (ADJUST_NUNITS): Document.
21398         * genmodes.c (mode_data::need_nunits_adj): New field.
21399         (blank_mode): Update accordingly.
21400         (adj_nunits): New variable.
21401         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21402         parameter.
21403         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21404         listed in adj_nunits.
21405         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21406         listed in adj_nunits.  Don't emit case statements for such modes.
21407         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21408         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21409         nothing if adj_nunits is nonnull.
21410         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21411         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21412         (emit_mode_fbit): Update use of print_maybe_const_decl.
21413         (emit_move_size): Likewise.  Treat the array as non-const
21414         if adj_nunits.
21415         (emit_mode_adjustments): Handle adj_nunits.
21417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21419         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21420         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21421         (VECTOR_MODES): Use it.
21422         (make_vector_modes): Take the prefix as an argument.
21424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21425             Alan Hayward  <alan.hayward@arm.com>
21426             David Sherwood  <david.sherwood@arm.com>
21428         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21429         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21430         for MODE_VECTOR_BOOL.
21431         * machmode.def (VECTOR_BOOL_MODE): Document.
21432         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21433         (make_vector_bool_mode): New function.
21434         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21435         MODE_VECTOR_BOOL.
21436         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21437         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21438         Likewise.
21439         * stor-layout.c (int_mode_for_mode): Likewise.
21440         * tree.c (build_vector_type_for_mode): Likewise.
21441         * varasm.c (output_constant_pool_2): Likewise.
21442         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21443         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21444         for MODE_VECTOR_BOOL.
21445         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21446         of mode class checks.
21447         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21448         instead of a list of mode class checks.
21449         (expand_vector_scalar_condition): Likewise.
21450         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21453             Alan Hayward  <alan.hayward@arm.com>
21454             David Sherwood  <david.sherwood@arm.com>
21456         * machmode.h (mode_size): Change from unsigned short to
21457         poly_uint16_pod.
21458         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21459         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21460         or if measurement_type is not polynomial.
21461         (fixed_size_mode::includes_p): Check for constant-sized modes.
21462         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21463         return a poly_uint16 rather than an unsigned short.
21464         (emit_mode_size): Change the type of mode_size from unsigned short
21465         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21466         (emit_mode_adjustments): Cope with polynomial vector sizes.
21467         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21468         for GET_MODE_SIZE.
21469         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21470         for GET_MODE_SIZE.
21471         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21472         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21473         * caller-save.c (setup_save_areas): Likewise.
21474         (replace_reg_with_saved_mem): Likewise.
21475         * calls.c (emit_library_call_value_1): Likewise.
21476         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21477         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21478         (gen_lowpart_for_combine): Likewise.
21479         * convert.c (convert_to_integer_1): Likewise.
21480         * cse.c (equiv_constant, cse_insn): Likewise.
21481         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21482         (cselib_subst_to_values): Likewise.
21483         * dce.c (word_dce_process_block): Likewise.
21484         * df-problems.c (df_word_lr_mark_ref): Likewise.
21485         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21486         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21487         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21488         (rtl_for_decl_location): Likewise.
21489         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21490         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21491         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21492         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21493         (expand_expr_real_1): Likewise.
21494         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21495         (pad_below): Likewise.
21496         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21497         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21498         * ira.c (get_subreg_tracking_sizes): Likewise.
21499         * ira-build.c (ira_create_allocno_objects): Likewise.
21500         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21501         (ira_sort_regnos_for_alter_reg): Likewise.
21502         * ira-costs.c (record_operand_costs): Likewise.
21503         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21504         (resolve_simple_move): Likewise.
21505         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21506         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21507         (lra_constraints): Likewise.
21508         (CONST_POOL_OK_P): Reject variable-sized modes.
21509         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21510         (add_pseudo_to_slot, lra_spill): Likewise.
21511         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21512         * optabs-query.c (get_best_extraction_insn): Likewise.
21513         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21514         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21515         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21516         * recog.c (offsettable_address_addr_space_p): Likewise.
21517         * regcprop.c (maybe_mode_change): Likewise.
21518         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21519         * regrename.c (build_def_use): Likewise.
21520         * regstat.c (dump_reg_info): Likewise.
21521         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21522         (find_reloads, find_reloads_subreg_address): Likewise.
21523         * reload1.c (eliminate_regs_1): Likewise.
21524         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21525         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21526         (simplify_binary_operation_1, simplify_subreg): Likewise.
21527         * targhooks.c (default_function_arg_padding): Likewise.
21528         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21529         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21530         (verify_gimple_assign_ternary): Likewise.
21531         * tree-inline.c (estimate_move_cost): Likewise.
21532         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21533         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21534         (get_address_cost_ainc): Likewise.
21535         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21536         (vect_supportable_dr_alignment): Likewise.
21537         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21538         (vectorizable_reduction): Likewise.
21539         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21540         (vectorizable_operation, vectorizable_load): Likewise.
21541         * tree.c (build_same_sized_truth_vector_type): Likewise.
21542         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21543         * var-tracking.c (emit_note_insn_var_location): Likewise.
21544         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21545         (ADDR_VEC_ALIGN): Likewise.
21547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21548             Alan Hayward  <alan.hayward@arm.com>
21549             David Sherwood  <david.sherwood@arm.com>
21551         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21552         unsigned short.
21553         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21554         or if measurement_type is polynomial.
21555         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21556         * combine.c (make_extraction): Likewise.
21557         * dse.c (find_shift_sequence): Likewise.
21558         * dwarf2out.c (mem_loc_descriptor): Likewise.
21559         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21560         (extract_bit_field, extract_low_bits): Likewise.
21561         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21562         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21563         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21564         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21565         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21566         * reload.c (find_reloads): Likewise.
21567         * reload1.c (alter_reg): Likewise.
21568         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21569         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21570         * tree-if-conv.c (predicate_mem_writes): Likewise.
21571         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21572         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21573         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21574         * valtrack.c (dead_debug_insert_temp): Likewise.
21575         * varasm.c (mergeable_constant_section): Likewise.
21576         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21578 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21579             Alan Hayward  <alan.hayward@arm.com>
21580             David Sherwood  <david.sherwood@arm.com>
21582         * expr.c (expand_assignment): Cope with polynomial mode sizes
21583         when assigning to a CONCAT.
21585 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21586             Alan Hayward  <alan.hayward@arm.com>
21587             David Sherwood  <david.sherwood@arm.com>
21589         * machmode.h (mode_precision): Change from unsigned short to
21590         poly_uint16_pod.
21591         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21592         short.
21593         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21594         or if measurement_type is not polynomial.
21595         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21596         in which the mode is already known to be a scalar_int_mode.
21597         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21598         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21599         initializer.
21600         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21601         for GET_MODE_PRECISION.
21602         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21603         for GET_MODE_PRECISION.
21604         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21605         as polynomial.
21606         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21607         (expand_field_assignment, make_extraction): Likewise.
21608         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21609         (get_last_value): Likewise.
21610         * convert.c (convert_to_integer_1): Likewise.
21611         * cse.c (cse_insn): Likewise.
21612         * expr.c (expand_expr_real_1): Likewise.
21613         * lra-constraints.c (simplify_operand_subreg): Likewise.
21614         * optabs-query.c (can_atomic_load_p): Likewise.
21615         * optabs.c (expand_atomic_load): Likewise.
21616         (expand_atomic_store): Likewise.
21617         * ree.c (combine_reaching_defs): Likewise.
21618         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21619         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21620         * tree.h (type_has_mode_precision_p): Likewise.
21621         * ubsan.c (instrument_si_overflow): Likewise.
21623 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21624             Alan Hayward  <alan.hayward@arm.com>
21625             David Sherwood  <david.sherwood@arm.com>
21627         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21628         polynomial numbers of units.
21629         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21630         (valid_vector_subparts_p): New function.
21631         (build_vector_type): Remove temporary shim and take the number
21632         of units as a poly_uint64 rather than an int.
21633         (build_opaque_vector_type): Take the number of units as a
21634         poly_uint64 rather than an int.
21635         * tree.c (build_vector_from_ctor): Handle polynomial
21636         TYPE_VECTOR_SUBPARTS.
21637         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21638         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21639         (build_vector_from_val): If the number of units is variable,
21640         use build_vec_duplicate_cst for constant operands and
21641         VEC_DUPLICATE_EXPR otherwise.
21642         (make_vector_type): Remove temporary is_constant ().
21643         (build_vector_type, build_opaque_vector_type): Take the number of
21644         units as a poly_uint64 rather than an int.
21645         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21646         VECTOR_CST_NELTS.
21647         * cfgexpand.c (expand_debug_expr): Likewise.
21648         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21649         (store_constructor, expand_expr_real_1): Likewise.
21650         (const_scalar_mask_from_tree): Likewise.
21651         * fold-const-call.c (fold_const_reduction): Likewise.
21652         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21653         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21654         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21655         (fold_relational_const): Likewise.
21656         (native_interpret_vector): Likewise.  Change the size from an
21657         int to an unsigned int.
21658         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21659         TYPE_VECTOR_SUBPARTS.
21660         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21661         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21662         duplicating a non-constant operand into a variable-length vector.
21663         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21664         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21665         * ipa-icf.c (sem_variable::equals): Likewise.
21666         * match.pd: Likewise.
21667         * omp-simd-clone.c (simd_clone_subparts): Likewise.
21668         * print-tree.c (print_node): Likewise.
21669         * stor-layout.c (layout_type): Likewise.
21670         * targhooks.c (default_builtin_vectorization_cost): Likewise.
21671         * tree-cfg.c (verify_gimple_comparison): Likewise.
21672         (verify_gimple_assign_binary): Likewise.
21673         (verify_gimple_assign_ternary): Likewise.
21674         (verify_gimple_assign_single): Likewise.
21675         * tree-pretty-print.c (dump_generic_node): Likewise.
21676         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21677         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21678         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21679         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21680         (vect_shift_permute_load_chain): Likewise.
21681         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21682         (expand_vector_condition, optimize_vector_constructor): Likewise.
21683         (lower_vec_perm, get_compute_type): Likewise.
21684         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21685         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21686         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21687         (vect_recog_mask_conversion_pattern): Likewise.
21688         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21689         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21690         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21691         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21692         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21693         (vectorizable_shift, vectorizable_operation, vectorizable_store)
21694         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21695         (supportable_widening_operation): Likewise.
21696         (supportable_narrowing_operation): Likewise.
21697         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21698         Likewise.
21699         * varasm.c (output_constant): Likewise.
21701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21702             Alan Hayward  <alan.hayward@arm.com>
21703             David Sherwood  <david.sherwood@arm.com>
21705         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21706         so that both the length == 3 and length != 3 cases set up their
21707         own permute vectors.  Add comments explaining why we know the
21708         number of elements is constant.
21709         (vect_permute_load_chain): Likewise.
21711 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21712             Alan Hayward  <alan.hayward@arm.com>
21713             David Sherwood  <david.sherwood@arm.com>
21715         * machmode.h (mode_nunits): Change from unsigned char to
21716         poly_uint16_pod.
21717         (ONLY_FIXED_SIZE_MODES): New macro.
21718         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21719         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21720         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21721         New typedefs.
21722         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21723         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21724         or if measurement_type is not polynomial.
21725         * genmodes.c (ZERO_COEFFS): New macro.
21726         (emit_mode_nunits_inline): Make mode_nunits_inline return a
21727         poly_uint16.
21728         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21729         Use ZERO_COEFFS when emitting initializers.
21730         * data-streamer.h (bp_pack_poly_value): New function.
21731         (bp_unpack_poly_value): Likewise.
21732         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21733         for GET_MODE_NUNITS.
21734         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21735         for GET_MODE_NUNITS.
21736         * tree.c (make_vector_type): Remove temporary shim and make
21737         the real function take the number of units as a poly_uint64
21738         rather than an int.
21739         (build_vector_type_for_mode): Handle polynomial nunits.
21740         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21741         * emit-rtl.c (const_vec_series_p_1): Likewise.
21742         (gen_rtx_CONST_VECTOR): Likewise.
21743         * fold-const.c (test_vec_duplicate_folding): Likewise.
21744         * genrecog.c (validate_pattern): Likewise.
21745         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21746         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21747         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21748         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21749         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21750         * rtlanal.c (subreg_get_info): Likewise.
21751         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21752         (vect_grouped_load_supported): Likewise.
21753         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21754         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21755         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21756         (simplify_const_unary_operation, simplify_binary_operation_1)
21757         (simplify_const_binary_operation, simplify_ternary_operation)
21758         (test_vector_ops_duplicate, test_vector_ops): Likewise.
21759         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21760         instead of CONST_VECTOR_NUNITS.
21761         * varasm.c (output_constant_pool_2): Likewise.
21762         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21763         explicit-encoded elements in the XVEC for variable-length vectors.
21765 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21767         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21770             Alan Hayward  <alan.hayward@arm.com>
21771             David Sherwood  <david.sherwood@arm.com>
21773         * coretypes.h (fixed_size_mode): Declare.
21774         (fixed_size_mode_pod): New typedef.
21775         * builtins.h (target_builtins::x_apply_args_mode)
21776         (target_builtins::x_apply_result_mode): Change type to
21777         fixed_size_mode_pod.
21778         * builtins.c (apply_args_size, apply_result_size, result_vector)
21779         (expand_builtin_apply_args_1, expand_builtin_apply)
21780         (expand_builtin_return): Update accordingly.
21782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21784         * cse.c (hash_rtx_cb): Hash only the encoded elements.
21785         * cselib.c (cselib_hash_rtx): Likewise.
21786         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21787         CONST_VECTOR encoding.
21789 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21790             Jeff Law  <law@redhat.com>
21792         PR target/83641
21793         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21794         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21795         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21796         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21798         PR target/83641
21799         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21800         explicitly probe *sp in a noreturn function if there were any callee
21801         register saves or frame pointer is needed.
21803 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21805         PR debug/83621
21806         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21807         BLKmode for ternary, binary or unary expressions.
21809         PR debug/83645
21810         * var-tracking.c (delete_vta_debug_insn): New inline function.
21811         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21812         insns from get_insns () to NULL instead of each bb separately.
21813         Use delete_vta_debug_insn.  No longer static.
21814         (vt_debug_insns_local, variable_tracking_main_1): Adjust
21815         delete_vta_debug_insns callers.
21816         * rtl.h (delete_vta_debug_insns): Declare.
21817         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21818         instead of variable_tracking_main.
21820 2018-01-03  Martin Sebor  <msebor@redhat.com>
21822         PR tree-optimization/83603
21823         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21824         arguments past the endof the argument list in functions declared
21825         without a prototype.
21826         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21827         Avoid checking when arguments are null.
21829 2018-01-03  Martin Sebor  <msebor@redhat.com>
21831         PR c/83559
21832         * doc/extend.texi (attribute const): Fix a typo.
21833         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21834         issuing -Wsuggest-attribute for void functions.
21836 2018-01-03  Martin Sebor  <msebor@redhat.com>
21838         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21839         offset_int::from instead of wide_int::to_shwi.
21840         (maybe_diag_overlap): Remove assertion.
21841         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21842         * gimple-ssa-sprintf.c (format_directive): Same.
21843         (parse_directive): Same.
21844         (sprintf_dom_walker::compute_format_length): Same.
21845         (try_substitute_return_value): Same.
21847 2018-01-03  Jeff Law  <law@redhat.com>
21849         PR middle-end/83654
21850         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21851         non-constant residual for zero at runtime and avoid probing in
21852         that case.  Reorganize code for trailing problem to mirror handling
21853         of the residual.
21855 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21857         PR tree-optimization/83501
21858         * tree-ssa-strlen.c (get_string_cst): New.
21859         (handle_char_store): Call get_string_cst.
21861 2018-01-03  Martin Liska  <mliska@suse.cz>
21863         PR tree-optimization/83593
21864         * tree-ssa-strlen.c: Include tree-cfg.h.
21865         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21866         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21867         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21868         to false.
21869         (strlen_dom_walker::before_dom_children): Call
21870         gimple_purge_dead_eh_edges. Dump tranformation with details
21871         dump flags.
21872         (strlen_dom_walker::before_dom_children): Update call by adding
21873         new argument cleanup_eh.
21874         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21876 2018-01-03  Martin Liska  <mliska@suse.cz>
21878         PR ipa/83549
21879         * cif-code.def (VARIADIC_THUNK): New enum value.
21880         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21881         thunks.
21883 2018-01-03  Jan Beulich  <jbeulich@suse.com>
21885         * sse.md (mov<mode>_internal): Tighten condition for when to use
21886         vmovdqu<ssescalarsize> for TI and OI modes.
21888 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21890         Update copyright years.
21892 2018-01-03  Martin Liska  <mliska@suse.cz>
21894         PR ipa/83594
21895         * ipa-visibility.c (function_and_variable_visibility): Skip
21896         functions with noipa attribure.
21898 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21900         * gcc.c (process_command): Update copyright notice dates.
21901         * gcov-dump.c (print_version): Ditto.
21902         * gcov.c (print_version): Ditto.
21903         * gcov-tool.c (print_version): Ditto.
21904         * gengtype.c (create_file): Ditto.
21905         * doc/cpp.texi: Bump @copying's copyright year.
21906         * doc/cppinternals.texi: Ditto.
21907         * doc/gcc.texi: Ditto.
21908         * doc/gccint.texi: Ditto.
21909         * doc/gcov.texi: Ditto.
21910         * doc/install.texi: Ditto.
21911         * doc/invoke.texi: Ditto.
21913 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21915         * vector-builder.h (vector_builder::m_full_nelts): Change from
21916         unsigned int to poly_uint64.
21917         (vector_builder::full_nelts): Update prototype accordingly.
21918         (vector_builder::new_vector): Likewise.
21919         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21920         (vector_builder::operator ==): Likewise.
21921         (vector_builder::finalize): Likewise.
21922         * int-vector-builder.h (int_vector_builder::int_vector_builder):
21923         Take the number of elements as a poly_uint64 rather than an
21924         unsigned int.
21925         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21926         from unsigned int to poly_uint64.
21927         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21928         (vec_perm_indices::new_vector): Likewise.
21929         (vec_perm_indices::length): Likewise.
21930         (vec_perm_indices::nelts_per_input): Likewise.
21931         (vec_perm_indices::input_nelts): Likewise.
21932         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21933         number of elements per input as a poly_uint64 rather than an
21934         unsigned int.  Use the original encoding for variable-length
21935         vectors, rather than clamping each individual element.
21936         For the second and subsequent elements in each pattern,
21937         clamp the step and base before clamping their sum.
21938         (vec_perm_indices::series_p): Handle polynomial element counts.
21939         (vec_perm_indices::all_in_range_p): Likewise.
21940         (vec_perm_indices_to_tree): Likewise.
21941         (vec_perm_indices_to_rtx): Likewise.
21942         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21943         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21944         (tree_vector_builder::new_binary_operation): Handle polynomial
21945         element counts.  Return false if we need to know the number
21946         of elements at compile time.
21947         * fold-const.c (fold_vec_perm): Punt if the number of elements
21948         isn't known at compile time.
21950 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21952         * vec-perm-indices.h (vec_perm_builder): Change element type
21953         from HOST_WIDE_INT to poly_int64.
21954         (vec_perm_indices::element_type): Update accordingly.
21955         (vec_perm_indices::clamp): Handle polynomial element_types.
21956         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21957         (vec_perm_indices::all_in_range_p): Likewise.
21958         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21959         than shwi trees.
21960         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21961         polynomial vec_perm_indices element types.
21962         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21963         * fold-const.c (fold_vec_perm): Likewise.
21964         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21965         * tree-vect-generic.c (lower_vec_perm): Likewise.
21966         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21967         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21968         element type to HOST_WIDE_INT.
21970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21971             Alan Hayward  <alan.hayward@arm.com>
21972             David Sherwood  <david.sherwood@arm.com>
21974         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21975         rather than an int.  Use plus_constant.
21976         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21977         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21980             Alan Hayward  <alan.hayward@arm.com>
21981             David Sherwood  <david.sherwood@arm.com>
21983         * calls.c (emit_call_1, expand_call): Change struct_value_size from
21984         a HOST_WIDE_INT to a poly_int64.
21986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21987             Alan Hayward  <alan.hayward@arm.com>
21988             David Sherwood  <david.sherwood@arm.com>
21990         * calls.c (load_register_parameters): Cope with polynomial
21991         mode sizes.  Require a constant size for BLKmode parameters
21992         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
21993         forces a parameter to be padded at the lsb end in order to
21994         fill a complete number of words, require the parameter size
21995         to be ordered wrt UNITS_PER_WORD.
21997 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21998             Alan Hayward  <alan.hayward@arm.com>
21999             David Sherwood  <david.sherwood@arm.com>
22001         * reload1.c (spill_stack_slot_width): Change element type
22002         from unsigned int to poly_uint64_pod.
22003         (alter_reg): Treat mode sizes as polynomial.
22005 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22006             Alan Hayward  <alan.hayward@arm.com>
22007             David Sherwood  <david.sherwood@arm.com>
22009         * reload.c (complex_word_subreg_p): New function.
22010         (reload_inner_reg_of_subreg, push_reload): Use it.
22012 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22013             Alan Hayward  <alan.hayward@arm.com>
22014             David Sherwood  <david.sherwood@arm.com>
22016         * lra-constraints.c (process_alt_operands): Reject matched
22017         operands whose sizes aren't ordered.
22018         (match_reload): Refer to this check here.
22020 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22021             Alan Hayward  <alan.hayward@arm.com>
22022             David Sherwood  <david.sherwood@arm.com>
22024         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22025         that the mode size is in the set {1, 2, 4, 8, 16}.
22027 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22028             Alan Hayward  <alan.hayward@arm.com>
22029             David Sherwood  <david.sherwood@arm.com>
22031         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22032         Use plus_constant instead of gen_rtx_PLUS.
22034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22035             Alan Hayward  <alan.hayward@arm.com>
22036             David Sherwood  <david.sherwood@arm.com>
22038         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22039         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22040         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22041         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22042         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22043         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22044         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22045         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22046         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22047         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22048         a poly_int64.
22049         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22050         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22051         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22052         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22053         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22054         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22055         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22056         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22057         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22058         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22059         function.
22060         * expr.c (emit_move_resolve_push): Treat the input and result
22061         of PUSH_ROUNDING as a poly_int64.
22062         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22063         (emit_push_insn): Likewise.
22064         * lra-eliminations.c (mark_not_eliminable): Likewise.
22065         * recog.c (push_operand): Likewise.
22066         * reload1.c (elimination_effects): Likewise.
22067         * rtlanal.c (nonzero_bits1): Likewise.
22068         * calls.c (store_one_arg): Likewise.  Require the padding to be
22069         known at compile time.
22071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22072             Alan Hayward  <alan.hayward@arm.com>
22073             David Sherwood  <david.sherwood@arm.com>
22075         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22076         Use plus_constant instead of gen_rtx_PLUS.
22078 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22079             Alan Hayward  <alan.hayward@arm.com>
22080             David Sherwood  <david.sherwood@arm.com>
22082         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22083         rather than an int.
22085 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22086             Alan Hayward  <alan.hayward@arm.com>
22087             David Sherwood  <david.sherwood@arm.com>
22089         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22090         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22091         via stack temporaries.  Treat the mode size as polynomial too.
22093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22094             Alan Hayward  <alan.hayward@arm.com>
22095             David Sherwood  <david.sherwood@arm.com>
22097         * expr.c (expand_expr_real_2): When handling conversions involving
22098         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22099         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22100         as a poly_uint64 too.
22102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22103             Alan Hayward  <alan.hayward@arm.com>
22104             David Sherwood  <david.sherwood@arm.com>
22106         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22109             Alan Hayward  <alan.hayward@arm.com>
22110             David Sherwood  <david.sherwood@arm.com>
22112         * combine.c (can_change_dest_mode): Handle polynomial
22113         REGMODE_NATURAL_SIZE.
22114         * expmed.c (store_bit_field_1): Likewise.
22115         * expr.c (store_constructor): Likewise.
22116         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22117         and polynomial REGMODE_NATURAL_SIZE.
22118         (gen_lowpart_common): Likewise.
22119         * reginfo.c (record_subregs_of_mode): Likewise.
22120         * rtlanal.c (read_modify_subreg_p): Likewise.
22122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22123             Alan Hayward  <alan.hayward@arm.com>
22124             David Sherwood  <david.sherwood@arm.com>
22126         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22127         numbers of elements.
22129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22130             Alan Hayward  <alan.hayward@arm.com>
22131             David Sherwood  <david.sherwood@arm.com>
22133         * match.pd: Cope with polynomial numbers of vector elements.
22135 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22136             Alan Hayward  <alan.hayward@arm.com>
22137             David Sherwood  <david.sherwood@arm.com>
22139         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22140         in a POINTER_PLUS_EXPR.
22142 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22143             Alan Hayward  <alan.hayward@arm.com>
22144             David Sherwood  <david.sherwood@arm.com>
22146         * omp-simd-clone.c (simd_clone_subparts): New function.
22147         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22148         (ipa_simd_modify_function_body): Likewise.
22150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22151             Alan Hayward  <alan.hayward@arm.com>
22152             David Sherwood  <david.sherwood@arm.com>
22154         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22155         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22156         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22157         (expand_vector_condition, vector_element): Likewise.
22158         (subparts_gt): New function.
22159         (get_compute_type): Use subparts_gt.
22160         (count_type_subparts): Delete.
22161         (expand_vector_operations_1): Use subparts_gt instead of
22162         count_type_subparts.
22164 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22165             Alan Hayward  <alan.hayward@arm.com>
22166             David Sherwood  <david.sherwood@arm.com>
22168         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22169         (vect_compile_time_alias): ...this new function.  Do the calculation
22170         on poly_ints rather than trees.
22171         (vect_prune_runtime_alias_test_list): Update call accordingly.
22173 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22174             Alan Hayward  <alan.hayward@arm.com>
22175             David Sherwood  <david.sherwood@arm.com>
22177         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22178         numbers of units.
22179         (vect_schedule_slp_instance): Likewise.
22181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22182             Alan Hayward  <alan.hayward@arm.com>
22183             David Sherwood  <david.sherwood@arm.com>
22185         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22186         constant and extern definitions for variable-length vectors.
22187         (vect_get_constant_vectors): Note that the number of units
22188         is known to be constant.
22190 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22191             Alan Hayward  <alan.hayward@arm.com>
22192             David Sherwood  <david.sherwood@arm.com>
22194         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22195         of units as polynomial.  Choose between WIDE and NARROW based
22196         on multiple_p.
22198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22199             Alan Hayward  <alan.hayward@arm.com>
22200             David Sherwood  <david.sherwood@arm.com>
22202         * tree-vect-stmts.c (simd_clone_subparts): New function.
22203         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22205 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22206             Alan Hayward  <alan.hayward@arm.com>
22207             David Sherwood  <david.sherwood@arm.com>
22209         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22210         vectors as polynomial.  Use build_index_vector for
22211         IFN_GOMP_SIMD_LANE.
22213 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22214             Alan Hayward  <alan.hayward@arm.com>
22215             David Sherwood  <david.sherwood@arm.com>
22217         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22218         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22219         for variable-length vectors.
22220         (vectorizable_mask_load_store): Treat the number of units as
22221         polynomial, asserting that it is constant if the condition has
22222         already been enforced.
22223         (vectorizable_store, vectorizable_load): Likewise.
22225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22226             Alan Hayward  <alan.hayward@arm.com>
22227             David Sherwood  <david.sherwood@arm.com>
22229         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22230         of units as polynomial.  Punt if we can't tell at compile time
22231         which vector contains the final result.
22233 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22234             Alan Hayward  <alan.hayward@arm.com>
22235             David Sherwood  <david.sherwood@arm.com>
22237         * tree-vect-loop.c (vectorizable_induction): Treat the number
22238         of units as polynomial.  Punt on SLP inductions.  Use an integer
22239         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22240         cast of such a series for variable-length floating-point
22241         reductions.
22243 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22244             Alan Hayward  <alan.hayward@arm.com>
22245             David Sherwood  <david.sherwood@arm.com>
22247         * tree.h (build_index_vector): Declare.
22248         * tree.c (build_index_vector): New function.
22249         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22250         of units as polynomial, forcibly converting it to a constant if
22251         vectorizable_reduction has already enforced the condition.
22252         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22253         to create a {1,2,3,...} vector.
22254         (vectorizable_reduction): Treat the number of units as polynomial.
22255         Choose vectype_in based on the largest scalar element size rather
22256         than the smallest number of units.  Enforce the restrictions
22257         relied on above.
22259 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22260             Alan Hayward  <alan.hayward@arm.com>
22261             David Sherwood  <david.sherwood@arm.com>
22263         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22264         number of units as polynomial.
22266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22267             Alan Hayward  <alan.hayward@arm.com>
22268             David Sherwood  <david.sherwood@arm.com>
22270         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22271         * target.def (autovectorize_vector_sizes): Return the vector sizes
22272         by pointer, using vector_sizes rather than a bitmask.
22273         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22274         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22275         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22276         Likewise.
22277         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22278         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22279         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22280         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22281         * omp-general.c (omp_max_vf): Likewise.
22282         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22283         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22284         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22285         * tree-vect-slp.c (vect_slp_bb): Likewise.
22286         * doc/tm.texi: Regenerate.
22287         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22288         to a poly_uint64.
22289         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22290         the vector size as a poly_uint64 rather than an unsigned int.
22291         (current_vector_size): Change from an unsigned int to a poly_uint64.
22292         (get_vectype_for_scalar_type): Update accordingly.
22293         * tree.h (build_truth_vector_type): Take the size and number of
22294         units as a poly_uint64 rather than an unsigned int.
22295         (build_vector_type): Add a temporary overload that takes
22296         the number of units as a poly_uint64 rather than an unsigned int.
22297         * tree.c (make_vector_type): Likewise.
22298         (build_truth_vector_type): Take the number of units as a poly_uint64
22299         rather than an unsigned int.
22301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22302             Alan Hayward  <alan.hayward@arm.com>
22303             David Sherwood  <david.sherwood@arm.com>
22305         * target.def (get_mask_mode): Take the number of units and length
22306         as poly_uint64s rather than unsigned ints.
22307         * targhooks.h (default_get_mask_mode): Update accordingly.
22308         * targhooks.c (default_get_mask_mode): Likewise.
22309         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22310         * doc/tm.texi: Regenerate.
22312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22313             Alan Hayward  <alan.hayward@arm.com>
22314             David Sherwood  <david.sherwood@arm.com>
22316         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22317         * omp-general.c (omp_max_vf): Likewise.
22318         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22319         (expand_omp_simd): Handle polynomial safelen.
22320         * omp-low.c (omplow_simd_context): Add a default constructor.
22321         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22322         (lower_rec_simd_input_clauses): Update accordingly.
22323         (lower_rec_input_clauses): Likewise.
22325 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22326             Alan Hayward  <alan.hayward@arm.com>
22327             David Sherwood  <david.sherwood@arm.com>
22329         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22330         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22331         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22332         (vect_analyze_slp_cost): Likewise.
22333         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22334         (vect_model_load_cost): Likewise.
22336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22337             Alan Hayward  <alan.hayward@arm.com>
22338             David Sherwood  <david.sherwood@arm.com>
22340         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22341         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22342         from an unsigned int * to a poly_uint64_pod *.
22343         (calculate_unrolling_factor): New function.
22344         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22346 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22347             Alan Hayward  <alan.hayward@arm.com>
22348             David Sherwood  <david.sherwood@arm.com>
22350         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22351         from an unsigned int to a poly_uint64.
22352         (_loop_vec_info::slp_unrolling_factor): Likewise.
22353         (_loop_vec_info::vectorization_factor): Change from an int
22354         to a poly_uint64.
22355         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22356         (vect_get_num_vectors): New function.
22357         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22358         (vect_get_num_copies): Use vect_get_num_vectors.
22359         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22360         to an unsigned int *.
22361         (vect_analyze_data_refs): Change min_vf from an int * to a
22362         poly_uint64 *.
22363         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22364         than an unsigned HOST_WIDE_INT.
22365         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22366         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22367         to an unsigned int *.
22368         (vect_analyze_data_ref_dependences): Likewise.
22369         (vect_compute_data_ref_alignment): Handle polynomial vf.
22370         (vect_enhance_data_refs_alignment): Likewise.
22371         (vect_prune_runtime_alias_test_list): Likewise.
22372         (vect_shift_permute_load_chain): Likewise.
22373         (vect_supportable_dr_alignment): Likewise.
22374         (dependence_distance_ge_vf): Take the vectorization factor as a
22375         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22376         (vect_analyze_data_refs): Change min_vf from an int * to a
22377         poly_uint64 *.
22378         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22379         vfm1 as a poly_uint64 rather than an int.  Make the same change
22380         for the returned bound_scalar.
22381         (vect_gen_vector_loop_niters): Handle polynomial vf.
22382         (vect_do_peeling): Likewise.  Update call to
22383         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22384         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22385         be constant.
22386         * tree-vect-loop.c (vect_determine_vectorization_factor)
22387         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22388         (vect_get_known_peeling_cost): Likewise.
22389         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22390         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22391         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22392         updating the upper bounds of the loop.
22393         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22394         rather than an int.
22395         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22396         polynomial unroll factors.
22397         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22398         (vect_make_slp_decision): Likewise.
22399         (vect_supported_load_permutation_p): Likewise, and polynomial
22400         vf too.
22401         (vect_analyze_slp_cost): Handle polynomial vf.
22402         (vect_slp_analyze_node_operations): Likewise.
22403         (vect_slp_analyze_bb_1): Likewise.
22404         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22405         than an unsigned HOST_WIDE_INT.
22406         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22407         (vectorizable_load): Handle polynomial vf.
22408         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22409         a poly_uint64.
22410         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22413             Alan Hayward  <alan.hayward@arm.com>
22414             David Sherwood  <david.sherwood@arm.com>
22416         * match.pd: Handle bit operations involving three constants
22417         and try to fold one pair.
22419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22421         * tree-vect-loop-manip.c: Include gimple-fold.h.
22422         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22423         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22424         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22425         Add a path that uses a step of VF instead of 1, but disable it
22426         for now.
22427         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22428         and niters_no_overflow parameters.  Update calls to
22429         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22430         Create a new SSA name if the latter choses to use a ste other
22431         than zero, and return it via niters_vector_mult_vf_var.
22432         * tree-vect-loop.c (vect_transform_loop): Update calls to
22433         vect_do_peeling, vect_gen_vector_loop_niters and
22434         slpeel_make_loop_iterate_ntimes.
22435         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22436         (vect_gen_vector_loop_niters): Update declarations after above changes.
22438 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22440         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22441         128-bit round to integer instructions.
22442         (ceil<mode>2): Likewise.
22443         (btrunc<mode>2): Likewise.
22444         (round<mode>2): Likewise.
22446 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22448         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22449         unaligned VSX load/store on P8/P9.
22450         (expand_block_clear): Allow the use of unaligned VSX
22451         load/store on P8/P9.
22453 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22455         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22456         New function.
22457         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22458         swap associated with both a load and a store.
22460 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22462         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22463         * config/riscv/riscv.md (clear_cache): Use it.
22465 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22467         * web.c: Remove out-of-date comment.
22469 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22471         * expr.c (fixup_args_size_notes): Check that any existing
22472         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22473         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22474         (emit_single_push_insn): ...here.
22476 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22478         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22479         (const_vector_encoded_nelts): New function.
22480         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22481         (const_vector_int_elt, const_vector_elt): Declare.
22482         * emit-rtl.c (const_vector_int_elt_1): New function.
22483         (const_vector_elt): Likewise.
22484         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22485         of CONST_VECTOR_ELT.
22487 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22489         * expr.c: Include rtx-vector-builder.h.
22490         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22491         directly on the tree encoding.
22492         (const_vector_from_tree): Likewise.
22493         * optabs.c: Include rtx-vector-builder.h.
22494         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22495         sequence of "u" values.
22496         * vec-perm-indices.c: Include rtx-vector-builder.h.
22497         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22498         directly on the vec_perm_indices encoding.
22500 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22502         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22503         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22504         * rtx-vector-builder.h: New file.
22505         * rtx-vector-builder.c: Likewise.
22506         * rtl.h (rtx_def::u2): Add a const_vector field.
22507         (CONST_VECTOR_NPATTERNS): New macro.
22508         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22509         (CONST_VECTOR_DUPLICATE_P): Likewise.
22510         (CONST_VECTOR_STEPPED_P): Likewise.
22511         (CONST_VECTOR_ENCODED_ELT): Likewise.
22512         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22513         (unwrap_const_vec_duplicate): Likewise.
22514         (const_vec_series_p): Check for a non-duplicated vector encoding.
22515         Say that the function only returns true for integer vectors.
22516         * emit-rtl.c: Include rtx-vector-builder.h.
22517         (gen_const_vec_duplicate_1): Delete.
22518         (gen_const_vector): Call gen_const_vec_duplicate instead of
22519         gen_const_vec_duplicate_1.
22520         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22521         (gen_const_vec_duplicate): Use rtx_vector_builder.
22522         (gen_const_vec_series): Likewise.
22523         (gen_rtx_CONST_VECTOR): Likewise.
22524         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22525         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22526         Build a new vector rather than modifying a CONST_VECTOR in-place.
22527         (handle_special_swappables): Update call accordingly.
22528         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22529         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22530         Build a new vector rather than modifying a CONST_VECTOR in-place.
22531         (handle_special_swappables): Update call accordingly.
22533 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22535         * simplify-rtx.c (simplify_const_binary_operation): Use
22536         CONST_VECTOR_ELT instead of XVECEXP.
22538 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22540         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22541         the selector elements to be different from the data elements
22542         if the selector is a VECTOR_CST.
22543         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22544         ssizetype for the selector.
22546 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22548         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22549         before testing each element individually.
22550         * tree-vect-generic.c (lower_vec_perm): Likewise.
22552 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22554         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22555         * selftest-run-tests.c (selftest::run_tests): Call it.
22556         * vector-builder.h (vector_builder::operator ==): New function.
22557         (vector_builder::operator !=): Likewise.
22558         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22559         (vec_perm_indices::all_from_input_p): New function.
22560         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22561         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22562         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22563         instead of reading the VECTOR_CST directly.  Detect whether both
22564         vector inputs are the same before constructing the vec_perm_indices,
22565         and update the number of inputs argument accordingly.  Use the
22566         utility functions added above.  Only construct sel2 if we need to.
22568 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22570         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22571         the broadcast of the low byte.
22572         (expand_mult_highpart): Use an explicit encoding for the permutes.
22573         * optabs-query.c (can_mult_highpart_p): Likewise.
22574         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22575         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22576         (vectorizable_bswap): Likewise.
22577         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22578         explicit encoding for the power-of-2 permutes.
22579         (vect_permute_store_chain): Likewise.
22580         (vect_grouped_load_supported): Likewise.
22581         (vect_permute_load_chain): Likewise.
22583 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22585         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22586         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22587         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22588         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22589         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22590         (vect_gen_perm_mask_any): Likewise.
22592 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22594         * int-vector-builder.h: New file.
22595         * vec-perm-indices.h: Include int-vector-builder.h.
22596         (vec_perm_indices): Redefine as an int_vector_builder.
22597         (auto_vec_perm_indices): Delete.
22598         (vec_perm_builder): Redefine as a stand-alone class.
22599         (vec_perm_indices::vec_perm_indices): New function.
22600         (vec_perm_indices::clamp): Likewise.
22601         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22602         (vec_perm_indices::new_vector): New function.
22603         (vec_perm_indices::new_expanded_vector): Update for new
22604         vec_perm_indices class.
22605         (vec_perm_indices::rotate_inputs): New function.
22606         (vec_perm_indices::all_in_range_p): Operate directly on the
22607         encoded form, without computing elided elements.
22608         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22609         encoding.  Update for new vec_perm_indices class.
22610         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22611         the given vec_perm_builder.
22612         (expand_vec_perm_var): Update vec_perm_builder constructor.
22613         (expand_mult_highpart): Use vec_perm_builder instead of
22614         auto_vec_perm_indices.
22615         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22616         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22617         or double series encoding as appropriate.
22618         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22619         vec_perm_indices instead of auto_vec_perm_indices.
22620         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22621         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22622         (vect_permute_store_chain): Likewise.
22623         (vect_grouped_load_supported): Likewise.
22624         (vect_permute_load_chain): Likewise.
22625         (vect_shift_permute_load_chain): Likewise.
22626         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22627         (vect_transform_slp_perm_load): Likewise.
22628         (vect_schedule_slp_instance): Likewise.
22629         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22630         (vectorizable_mask_load_store): Likewise.
22631         (vectorizable_bswap): Likewise.
22632         (vectorizable_store): Likewise.
22633         (vectorizable_load): Likewise.
22634         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22635         vec_perm_indices instead of auto_vec_perm_indices.  Use
22636         tree_to_vec_perm_builder to read the vector from a tree.
22637         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22638         vec_perm_builder instead of a vec_perm_indices.
22639         (have_whole_vector_shift): Use vec_perm_builder and
22640         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22641         truncation to calc_vec_perm_mask_for_shift.
22642         (vect_create_epilog_for_reduction): Likewise.
22643         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22644         from auto_vec_perm_indices to vec_perm_indices.
22645         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22646         instead of changing individual elements.
22647         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22648         the vector in d.perm.
22649         * config/arm/arm.c (expand_vec_perm_d::perm): Change
22650         from auto_vec_perm_indices to vec_perm_indices.
22651         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22652         instead of changing individual elements.
22653         (arm_vectorize_vec_perm_const): Use new_vector to install
22654         the vector in d.perm.
22655         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22656         Update vec_perm_builder constructor.
22657         (rs6000_expand_interleave): Likewise.
22658         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22659         (rs6000_expand_interleave): Likewise.
22661 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22663         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22664         to qimode could truncate the indices.
22665         * optabs.c (expand_vec_perm_var): Likewise.
22667 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22669         * Makefile.in (OBJS): Add vec-perm-indices.o.
22670         * vec-perm-indices.h: New file.
22671         * vec-perm-indices.c: Likewise.
22672         * target.h (vec_perm_indices): Replace with a forward class
22673         declaration.
22674         (auto_vec_perm_indices): Move to vec-perm-indices.h.
22675         * optabs.h: Include vec-perm-indices.h.
22676         (expand_vec_perm): Delete.
22677         (selector_fits_mode_p, expand_vec_perm_var): Declare.
22678         (expand_vec_perm_const): Declare.
22679         * target.def (vec_perm_const_ok): Replace with...
22680         (vec_perm_const): ...this new hook.
22681         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22682         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22683         * doc/tm.texi: Regenerate.
22684         * optabs.def (vec_perm_const): Delete.
22685         * doc/md.texi (vec_perm_const): Likewise.
22686         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22687         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22688         expand_vec_perm for constant permutation vectors.  Assert that
22689         the mode of variable permutation vectors is the integer equivalent
22690         of the mode that is being permuted.
22691         * optabs-query.h (selector_fits_mode_p): Declare.
22692         * optabs-query.c: Include vec-perm-indices.h.
22693         (selector_fits_mode_p): New function.
22694         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22695         is defined, instead of checking whether the vec_perm_const_optab
22696         exists.  Use targetm.vectorize.vec_perm_const instead of
22697         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
22698         fit in the vector mode before using a variable permute.
22699         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22700         vec_perm_indices instead of an rtx.
22701         (expand_vec_perm): Replace with...
22702         (expand_vec_perm_const): ...this new function.  Take the selector
22703         as a vec_perm_indices rather than an rtx.  Also take the mode of
22704         the selector.  Update call to shift_amt_for_vec_perm_mask.
22705         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22706         Use vec_perm_indices::new_expanded_vector to expand the original
22707         selector into bytes.  Check whether the indices fit in the vector
22708         mode before using a variable permute.
22709         (expand_vec_perm_var): Make global.
22710         (expand_mult_highpart): Use expand_vec_perm_const.
22711         * fold-const.c: Includes vec-perm-indices.h.
22712         * tree-ssa-forwprop.c: Likewise.
22713         * tree-vect-data-refs.c: Likewise.
22714         * tree-vect-generic.c: Likewise.
22715         * tree-vect-loop.c: Likewise.
22716         * tree-vect-slp.c: Likewise.
22717         * tree-vect-stmts.c: Likewise.
22718         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22719         Delete.
22720         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22721         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22722         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22723         (aarch64_vectorize_vec_perm_const): ...this new function.
22724         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22725         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22726         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22727         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22728         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22729         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22730         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22731         into...
22732         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
22733         check for NEON modes.
22734         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22735         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22736         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22737         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22738         into...
22739         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
22740         the old VEC_PERM_CONST conditions.
22741         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22742         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22743         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22744         (ia64_vectorize_vec_perm_const_ok): Merge into...
22745         (ia64_vectorize_vec_perm_const): ...this new function.
22746         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22747         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22748         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22749         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22750         * config/mips/mips.c (mips_expand_vec_perm_const)
22751         (mips_vectorize_vec_perm_const_ok): Merge into...
22752         (mips_vectorize_vec_perm_const): ...this new function.
22753         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22754         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22755         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22756         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22757         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22758         (rs6000_expand_vec_perm_const): Delete.
22759         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22760         Delete.
22761         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22762         (altivec_expand_vec_perm_const_le): Take each operand individually.
22763         Operate on constant selectors rather than rtxes.
22764         (altivec_expand_vec_perm_const): Likewise.  Update call to
22765         altivec_expand_vec_perm_const_le.
22766         (rs6000_expand_vec_perm_const): Delete.
22767         (rs6000_vectorize_vec_perm_const_ok): Delete.
22768         (rs6000_vectorize_vec_perm_const): New function.
22769         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22770         an element count and rtx array.
22771         (rs6000_expand_extract_even): Update call accordingly.
22772         (rs6000_expand_interleave): Likewise.
22773         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22774         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22775         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22776         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22777         (rs6000_expand_vec_perm_const): Delete.
22778         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22779         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22780         (altivec_expand_vec_perm_const_le): Take each operand individually.
22781         Operate on constant selectors rather than rtxes.
22782         (altivec_expand_vec_perm_const): Likewise.  Update call to
22783         altivec_expand_vec_perm_const_le.
22784         (rs6000_expand_vec_perm_const): Delete.
22785         (rs6000_vectorize_vec_perm_const_ok): Delete.
22786         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
22787         reference to the SPE evmerge intructions.
22788         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22789         an element count and rtx array.
22790         (rs6000_expand_extract_even): Update call accordingly.
22791         (rs6000_expand_interleave): Likewise.
22792         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22793         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22794         new function.
22795         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22797 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22799         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22800         vector mode and that that mode matches the mode of the data
22801         being permuted.
22802         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22803         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
22804         directly using expand_vec_perm_1 when forcing selectors into
22805         registers.
22806         (expand_vec_perm_var): New function, split out from expand_vec_perm.
22808 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22810         * optabs-query.h (can_vec_perm_p): Delete.
22811         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22812         * optabs-query.c (can_vec_perm_p): Split into...
22813         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22814         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22815         particular selector is valid.
22816         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22817         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22818         (vect_grouped_load_supported): Likewise.
22819         (vect_shift_permute_load_chain): Likewise.
22820         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22821         (vect_transform_slp_perm_load): Likewise.
22822         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22823         (vectorizable_bswap): Likewise.
22824         (vect_gen_perm_mask_checked): Likewise.
22825         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
22826         implementations of variable permutation vectors into account
22827         when deciding which selector to use.
22828         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22829         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22830         with a false third argument.
22831         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22832         to test whether the constant selector is valid and can_vec_perm_var_p
22833         to test whether a variable selector is valid.
22835 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22837         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22838         * optabs-query.c (can_vec_perm_p): Likewise.
22839         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22840         instead of vec_perm_indices.
22841         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22842         (vect_gen_perm_mask_checked): Likewise,
22843         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22844         (vect_gen_perm_mask_checked): Likewise,
22846 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22848         * optabs-query.h (qimode_for_vec_perm): Declare.
22849         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22850         (qimode_for_vec_perm): ...this new function.
22851         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22853 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22855         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22856         does not have a conditional at the top.
22858 2018-01-02  Richard Biener  <rguenther@suse.de>
22860         * ipa-inline.c (big_speedup_p): Fix expression.
22862 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22864         PR target/81616
22865         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22866         for generic 4->6.
22868 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22870         PR target/81616
22871         Generic tuning.
22872         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22873         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22874         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22875         cond_taken_branch_cost 3->4.
22877 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
22879         PR tree-optimization/83581
22880         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22881         TODO_cleanup_cfg if any changes have been made.
22883         PR middle-end/83608
22884         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22885         convert_modes if target mode has the right side, but different mode
22886         class.
22888         PR middle-end/83609
22889         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22890         last argument when extracting from CONCAT.  If either from_real or
22891         from_imag is NULL, use expansion through memory.  If result is not
22892         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22893         the parts directly to inner mode, if even that fails, use expansion
22894         through memory.
22896         PR middle-end/83623
22897         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22898         check for bswap in mode rather than HImode and use that in expand_unop
22899         too.
22901 Copyright (C) 2018 Free Software Foundation, Inc.
22903 Copying and distribution of this file, with or without modification,
22904 are permitted in any medium without royalty provided the copyright
22905 notice and this notice are preserved.