1 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3 PR tree-optimization/86858
4 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5 flow_bb_inside_loop_p calls.
7 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9 PR tree-optimization/86871
10 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11 instead of gimple_assign_lhs.
13 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
16 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
17 register constraint to operand 0.
18 (add<mode>3_carryinC): Likewise.
19 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
21 2018-08-09 Martin Liska <mliska@suse.cz>
24 * common.opt: Remove extra line.
26 2018-08-09 Martin Liska <mliska@suse.cz>
28 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
29 at the end of a line, make first letter capital and end up
30 a sentence with a dot.
31 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
32 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
33 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
34 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
35 (PARAM_MAX_ISL_OPERATIONS): Likewise.
36 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
37 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
38 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
39 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
40 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
41 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
42 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
43 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
44 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
45 (PARAM_TREE_REASSOC_WIDTH): Likewise.
46 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
47 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
48 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
50 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
53 * config/s390/s390.c (s390_option_override_internal): Reduce the
54 stack-clash-protection-probe-interval param if it would be too big
57 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
60 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
61 * config/m68k/m68k.c (handle_move_double): Don't call
62 m68k_final_prescan_insn.
63 (m68k_adjust_decorated_operand): Renamed from
64 m68k_final_prescan_insn, remove first and third operand and
66 (print_operand): Call it.
67 (print_operand_address): Call it.
69 2018-08-08 Nathan Sidwell <nathan@acm.org>
71 * diagnostic.c (diagnostic_report_current_module): Use
72 linemap_included_from & linemap_included_from_linemap.
74 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
76 * config/aarch64/aarch64-cores.def: Add phecda core.
77 * config/aarch64/aarch64-tune.md: Regenerate.
78 * doc/invoke.texi: Add phecda core.
80 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
83 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
85 * config/s390/s390.md ("movti"): Add more alternatives for
86 constant to GPR copies.
88 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
90 * config/s390/s390.c: Fix whitespace damage throughout the file.
91 * config/s390/s390.h: Likewise.
92 * config/s390/tpf.h: Likewise.
94 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
96 * config/s390/s390.c (s390_loadrelative_operand_p):
97 Remove TARGET_CPU_ZARCH usages.
98 (s390_rtx_costs): Likewise.
99 (s390_legitimate_constant_p): Likewise.
100 (s390_cannot_force_const_mem): Likewise.
101 (legitimate_reload_constant_p): Likewise.
102 (s390_preferred_reload_class): Likewise.
103 (legitimize_pic_address): Likewise.
104 (legitimize_tls_address): Likewise.
105 (s390_split_branches): Removed.
106 (s390_add_execute): Removed.
107 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
108 (s390_mainpool_start): Likewise.
109 (s390_mainpool_finish): Likewise.
110 (s390_mainpool_cancel): Removed.
111 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
112 (s390_chunkify_cancel): Likewise.
113 (s390_return_addr_rtx): Likewise.
114 (s390_register_info): Remove split_branches_pending_p uages.
115 (s390_optimize_register_info): Likewise.
116 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
117 split_branches_pending_p usages.
118 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
119 (s390_load_got): Likewise.
120 (s390_expand_split_stack_prologue): Likewise.
121 (output_asm_nops): Likewise.
122 (s390_function_profiler): Likewise.
123 (s390_emit_call): Likewise.
124 (s390_conditional_register_usage): Likewise.
125 (s390_optimize_prologue): Likewise.
126 (s390_reorg): Remove TARGET_CPU_ZARCH and
127 split_branches_pending_p usages.
128 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
130 (s390_output_indirect_thunk_function): Likewise.
131 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
132 (TARGET_CPU_ZARCH_P): Removed.
133 (struct machine_function): Remove split_branches_pending_p.
134 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
136 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
138 * common/config/s390/s390-common.c (processor_flags_table):
140 * config.gcc: Remove with_arch/with_tune support.
141 * config/s390/2064.md: Remove cpu attribute comparisons.
142 * config/s390/driver-native.c (s390_host_detect_local_cpu):
144 * config/s390/linux.h (ASM_SPEC):
145 Remove -march support.
146 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
147 Use a table to get an arch level.
148 * config/s390/s390-opts.h (enum processor_type):
151 (processor_table): Remove entries, add arch_level values.
152 (s390_issue_rate): Remove cases.
153 (s390_option_override): Adjust
154 s390_option_override_internal() call.
155 (s390_option_override_internal): Remove deprecation warning.
156 (s390_valid_target_attribute_tree): Adjust
157 s390_option_override_internal() call.
158 * config/s390/s390.h (struct s390_processor):
159 Share with s390-c.c, add arch_level field.
160 * config/s390/s390.md:
161 Remove occurrences in cpu attribute.
162 * config/s390/s390.opt: Remove -march/-mtune support.
163 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
164 * doc/invoke.texi: Remove deprecation warning.
166 2018-08-08 Luis Machado <luis.machado@linaro.org>
168 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
170 (qdf24xx_tunings): Set vector cost structure to
173 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
174 <register_sextend>: Set to 3.
176 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
179 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
180 * config/aarch64/aarch64-simd.md
181 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
182 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
183 (aarch64_frecpx<mode>): ...this new pattern.
184 * config/aarch64/aarch64-simd-builtins.def: Remove comment
185 about aarch64_frecp<FRECP:frecp_suffix><mode>.
187 2018-08-07 Martin Liska <mliska@suse.cz>
190 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
191 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
192 * predict.def (PRED_MALLOC_NONNULL): New predictor.
193 * doc/extend.texi: Document that malloc attribute adds
196 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
199 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
200 Define to speculation_safe_value_not_needed.
202 2018-08-06 Jeff Law <law@redhat.com>
204 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
205 the vr_values instance to cprop_into_stmt.
206 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
207 (cprop_operand): Also query EVRP to determine if OP is a constant.
209 2018-08-06 Nathan Sidwell <nathan@acm.org>
211 * diagnostic.c (diagnostic_report_current_module): Reroll
212 included-at loop. Translate text.
214 2018-08-06 David Malcolm <dmalcolm@redhat.com>
216 * function-tests.c (selftest::test_expansion_to_rtl): Call
217 free_after_compilation.
219 2018-08-06 Alan Hayward <alan.hayward@arm.com>
221 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
223 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
225 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
226 loops with memory block operations from getting unrolled.
228 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
231 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
232 Define to speculation_safe_value_not_needed.
234 2018-08-06 Jeff Law <law@redhat.com>
236 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
239 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
242 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
243 with all enabled __intN types.
245 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
247 2018-08-06 Alan Hayward <alan.hayward@arm.com>
249 * alias.c (record_set): Check for clobber high.
250 * cfgexpand.c (expand_gimple_stmt): Likewise.
251 * combine-stack-adj.c (single_set_for_csa): Likewise.
252 * combine.c (find_single_use_1): Likewise.
253 (set_nonzero_bits_and_sign_copies): Likewise.
254 (get_combine_src_dest): Likewise.
255 (is_parallel_of_n_reg_sets): Likewise.
256 (try_combine): Likewise.
257 (record_dead_and_set_regs_1): Likewise.
258 (reg_dead_at_p_1): Likewise.
259 (reg_dead_at_p): Likewise.
260 * dce.c (deletable_insn_p): Likewise.
261 (mark_nonreg_stores_1): Likewise.
262 (mark_nonreg_stores_2): Likewise.
263 * df-scan.c (df_find_hard_reg_defs): Likewise.
264 (df_uses_record): Likewise.
265 (df_get_call_refs): Likewise.
266 * dwarf2out.c (mem_loc_descriptor): Likewise.
267 * haifa-sched.c (haifa_classify_rtx): Likewise.
268 * ira-build.c (create_insn_allocnos): Likewise.
269 * ira-costs.c (scan_one_insn): Likewise.
270 * ira.c (equiv_init_movable_p): Likewise.
271 (rtx_moveable_p): Likewise.
272 (interesting_dest_for_shprep): Likewise.
273 * jump.c (mark_jump_label_1): Likewise.
274 * postreload-gcse.c (record_opr_changes): Likewise.
275 * postreload.c (reload_cse_simplify): Likewise.
276 (struct reg_use): Add source expr.
277 (reload_combine): Check for clobber high.
278 (reload_combine_note_use): Likewise.
279 (reload_cse_move2add): Likewise.
280 (move2add_note_store): Likewise.
281 * print-rtl.c (print_pattern): Likewise.
282 * recog.c (decode_asm_operands): Likewise.
283 (store_data_bypass_p): Likewise.
284 (if_test_bypass_p): Likewise.
285 * regcprop.c (kill_clobbered_value): Likewise.
286 (kill_set_value): Likewise.
287 * reginfo.c (reg_scan_mark_refs): Likewise.
288 * reload1.c (maybe_fix_stack_asms): Likewise.
289 (eliminate_regs_1): Likewise.
290 (elimination_effects): Likewise.
291 (mark_not_eliminable): Likewise.
292 (scan_paradoxical_subregs): Likewise.
293 (forget_old_reloads_1): Likewise.
294 * reorg.c (find_end_label): Likewise.
295 (try_merge_delay_insns): Likewise.
296 (redundant_insn): Likewise.
297 (own_thread_p): Likewise.
298 (fill_simple_delay_slots): Likewise.
299 (fill_slots_from_thread): Likewise.
300 (dbr_schedule): Likewise.
301 * resource.c (update_live_status): Likewise.
302 (mark_referenced_resources): Likewise.
303 (mark_set_resources): Likewise.
304 * rtl.c (copy_rtx): Likewise.
305 * rtlanal.c (reg_referenced_p): Likewise.
306 (single_set_2): Likewise.
307 (noop_move_p): Likewise.
308 (note_stores): Likewise.
309 * sched-deps.c (sched_analyze_reg): Likewise.
310 (sched_analyze_insn): Likewise.
312 2018-08-06 Alan Hayward <alan.hayward@arm.com>
314 * cse.c (invalidate_reg): New function extracted from...
315 (invalidate): ...here.
316 (canonicalize_insn): Check for clobber high.
317 (invalidate_from_clobbers): invalidate clobber highs.
318 (invalidate_from_sets_and_clobbers): Likewise.
319 (count_reg_usage): Check for clobber high.
320 (insn_live_p): Likewise.
321 * cselib.c (cselib_expand_value_rtx_1):Likewise.
322 (cselib_invalidate_regno): Check for clobber in setter.
323 (cselib_invalidate_rtx): Pass through setter.
324 (cselib_invalidate_rtx_note_stores):
325 (cselib_process_insn): Check for clobber high.
326 * cselib.h (cselib_invalidate_rtx): Add operand.
328 2018-08-06 Alan Hayward <alan.hayward@arm.com>
330 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
331 (mark_not_eliminable): Likewise.
332 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
333 * lra-lives.c (process_bb_lives): Check for clobber high.
334 * lra.c (new_insn_reg): Remember clobber highs.
335 (collect_non_operand_hard_regs): Check for clobber high.
336 (lra_set_insn_recog_data): Likewise.
337 (add_regs_to_insn_regno_info): Likewise.
338 (lra_update_insn_regno_info): Likewise.
340 2018-08-06 Alan Hayward <alan.hayward@arm.com>
342 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
343 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
345 2018-08-06 Alan Hayward <alan.hayward@arm.com>
347 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
348 (copy_insn_1): Likewise.
349 (gen_hard_reg_clobber_high): New gen function.
350 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
351 * genemit.c (gen_exp): Likewise.
352 (gen_emit_seq): Pass through info.
353 (gen_insn): Check for CLOBBER_HIGH.
354 (gen_expand): Pass through info.
355 (gen_split): Likewise.
356 (output_add_clobbers): Likewise.
357 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
358 (remove_clobbers): Likewise.
359 * rtl.h (gen_hard_reg_clobber_high): New declaration.
361 2018-08-06 Alan Hayward <alan.hayward@arm.com>
363 * doc/rtl.texi (clobber_high): Add.
364 (parallel): Add in clobber high
365 * rtl.c (rtl_check_failed_code3): Add function.
366 * rtl.def (CLOBBER_HIGH): Add expression.
367 * rtl.h (RTL_CHECKC3): Add macro.
368 (rtl_check_failed_code3): Add declaration.
371 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
374 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
375 cfun->machine->max_used_stack_alignment if needed.
377 2018-08-04 Martin Sebor <msebor@redhat.com>
379 PR tree-optimization/86571
380 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
383 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
385 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
388 2018-08-03 Jeff Law <law@redhat.com>
391 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
392 Define to speculation_safe_value_not_needed.
394 2018-08-03 David Malcolm <dmalcolm@redhat.com>
396 * doc/gcov.texi (-x): Remove duplicate "to".
397 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
398 (-Wif-not-aligned): Remove duplicate "is".
399 (-flto): Remove duplicate "the".
400 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
402 (MSP430 Options): Remove duplicate "and" from the description
403 of "-mgprel-sec=regexp".
404 (x86 Options): Remove duplicate copies of "vmldLog102" and
405 vmlsLog104 from description of "-mveclibabi=type".
407 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
409 * internal-fn.h (first_commutative_argument): Declare.
410 * internal-fn.c (first_commutative_argument): New function.
411 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
412 restrictions for pattern statements. Use first_commutative_argument
413 to look for commutative operands in calls to internal functions.
415 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
417 * Makefile.in (wide-int-range.o): New.
418 * tree-vrp.c: Move all the wide_int_* functions to...
419 * wide-int-range.cc: ...here.
420 * tree-vrp.h: Move all the wide_int_* prototypes to...
421 * wide-int-range.h: ...here.
423 2018-08-03 Tom de Vries <tdevries@suse.de>
425 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
427 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
428 * except.c (output_function_exception_table): Do early exit if
429 targetm_common.except_unwind_info (&global_options) == UI_NONE.
431 2018-08-03 Martin Liska <mliska@suse.cz>
433 * predict.c (dump_prediction): Change to 2 digits
436 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
438 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
440 (falkor_am_1_gtov_gtov): ... a new insn reservation.
442 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
444 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
445 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
446 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
447 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
448 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
450 2018-08-02 David Malcolm <dmalcolm@redhat.com>
452 * diagnostic-show-locus.c (diagnostic_show_locus): Use
453 pp_take_prefix when saving the existing prefix.
454 * diagnostic.c (diagnostic_append_note): Likewise.
455 * langhooks.c (lhd_print_error_function): Likewise.
456 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
457 param's type. Free the existing prefix.
458 (pp_take_prefix): New function.
459 (pretty_printer::pretty_printer): Drop the prefix parameter.
460 Rename the length parameter to match the comment.
461 (pretty_printer::~pretty_printer): Free the prefix.
462 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
464 (struct pretty_printer): Drop the "const" from "prefix" field's
465 type and clarify memory management.
466 (pp_set_prefix): Drop the "const" from the 2nd param.
467 (pp_take_prefix): New decl.
469 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
471 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
472 for word_mode_ok here instead of passing as argument.
473 (expand_block_compare): Change select_block_compare_mode() call.
474 (expand_strncmp_gpr_sequence): New function.
475 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
477 2018-08-02 Jeff Law <law@redhat.com>
480 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
481 Define to speculation_safe_value_not_needed.
484 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
485 Define to speculation_safe_value_not_needed.
487 2018-08-02 Tom de Vries <tdevries@suse.de>
490 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
491 function. Return UI_TARGET unconditionally.
492 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
493 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
495 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
497 * genemit.c (print_overload_test): Fix typo.
499 2018-08-02 Richard Biener <rguenther@suse.de>
501 PR tree-optimization/86816
502 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
503 which checks for value availability before querying it.
504 (gvn_uses_equal): Use it.
505 (same_succ_hash): Likewise.
506 (gimple_equal_p): Likewise.
508 2018-08-02 Nick Clifton <nickc@redhat.com>
511 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
512 Define to speculation_safe_value_not_needed.
515 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
516 Define to speculation_safe_value_not_needed.
519 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
520 Define to speculation_safe_value_not_needed.
523 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
524 Define to speculation_safe_value_not_needed.
527 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
528 Define to speculation_safe_value_not_needed.
531 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
532 Define to speculation_safe_value_not_needed.
535 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
536 Define to speculation_safe_value_not_needed.
539 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
540 Define to speculation_safe_value_not_needed.
543 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
544 speculation_safe_value_not_needed.
547 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
548 to speculation_safe_value_not_needed.
550 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
552 * doc/md.texi: Expand the documentation of instruction names
553 to mention port-local uses. Document '@' in pattern names.
554 * read-md.h (overloaded_instance, overloaded_name): New structs.
556 (md_reader::handle_overloaded_name): New member function.
557 (md_reader::get_overloads): Likewise.
558 (md_reader::m_first_overload): New member variable.
559 (md_reader::m_next_overload_ptr): Likewise.
560 (md_reader::m_overloads_htab): Likewise.
561 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
562 m_next_overload_ptr and m_overloads_htab.
563 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
564 (get_mode_token, get_code_token, get_int_token): New functions.
565 (map_attr_string): Add an optional argument that passes back
566 the associated iterator.
567 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
568 (md_reader::handle_overloaded_name, add_overload_instance): New
570 (apply_iterators): Handle '@' names. Report an error if '@'
571 is used without iterators.
572 (initialize_iterators): Initialize the new iterator_group fields.
573 * genopinit.c (handle_overloaded_code_for)
574 (handle_overloaded_gen): New functions.
575 (main): Use them to print declarations of maybe_code_for_* and
576 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
577 * genemit.c (print_overload_arguments, print_overload_test)
578 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
579 (main): Use it to print definitions of maybe_code_for_* and
580 maybe_gen_* functions.
581 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
582 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
583 instead of explicit mode checks.
584 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
585 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
586 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
587 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
588 (aarch64_expand_compare_and_swap): Likewise
589 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
590 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
591 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
592 (aarch64_constant_pool_reload_icode): Delete.
593 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
594 instead of aarch64_constant_pool_reload_icode. Use
595 code_for_aarch64_reload_mov instead of explicit mode checks.
596 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
597 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
598 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
599 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
600 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
601 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
602 (aarch64_atomic_load_op_code): Delete.
603 (aarch64_emit_atomic_load_op): Likewise.
604 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
605 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
606 instead of aarch64_emit_atomic_load_op.
607 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
608 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
609 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
610 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
611 character before the pattern name.
612 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
613 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
614 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
615 (aarch64_frecps<mode>): Likewise.
616 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
617 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
618 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
619 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
620 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
622 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
624 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
625 Allow HFmode constants if TARGET_FP_F16INST.
627 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
630 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
631 No longer check last store for clobber of address register.
633 2018-08-02 Martin Liska <mliska@suse.cz>
635 PR gcov-profile/86817
636 * gcov.c (process_all_functions): New function.
638 (process_file): Move functions processing to
639 process_all_functions.
641 2018-08-02 David Malcolm <dmalcolm@redhat.com>
643 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
644 "const" to the "gimple *" and "rtx_insn *" parameters.
645 * dumpfile.h (dump_user_location_t::dump_user_location_t):
647 (dump_location_t::dump_location_t): Likewise.
649 2018-08-01 Martin Sebor <msebor@redhat.com>
651 PR tree-optimization/86650
652 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
653 rather than a "gcall *". Directly pass the data of interest
654 to percent_K_format, rather than building a temporary CALL_EXPR
656 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
657 (gimple_fold_builtin_strncat): Adjust.
658 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
659 gcall* argument with gimple*.
660 * gimple-ssa-warn-restrict.c (check_call): Same.
661 (wrestrict_dom_walker::before_dom_children): Same.
662 (builtin_access::builtin_access): Same.
663 (check_bounds_or_overlap): Same
664 (maybe_diag_overlap): Same.
665 (maybe_diag_offset_bounds): Same.
666 * tree-diagnostic.c (default_tree_printer): Move usage of
667 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
669 * tree-pretty-print.c (percent_K_format): Add argument.
670 * tree-pretty-print.h: Add argument.
671 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
672 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
673 (maybe_diag_stxncpy_trunc): Same.
674 (handle_builtin_stxncpy): Same.
675 (handle_builtin_strcat): Same.
677 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
679 * match.pd: Optimise pointer range checks.
681 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
683 PR tree-optimization/86758
684 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
685 to remove pattern statements.
687 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
689 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
690 result of dfs_enumerate_from when constructing stmt_vec_infos,
691 instead of additionally calling get_loop_body.
693 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
695 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
697 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
698 When creating an iv, assert that the step is not known to be zero.
699 (vect_setup_realignment): Update call accordingly.
700 * tree-vect-stmts.c (vectorizable_store): Likewise.
701 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
703 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
705 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
706 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
707 (vectorizable_reduction): Likewise.
708 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
709 (vect_detect_hybrid_slp_stmts): Likewise.
710 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
712 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
714 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
715 (wide_int_set_zero_nonzero_bits): ...this.
716 (zero_nonzero_bits_from_vr): Rename to...
717 (vrp_set_zero_nonzero_bits): ...this.
718 (extract_range_from_multiplicative_op_1): Abstract wide int
720 (wide_int_range_multiplicative_op): ...here.
721 (extract_range_from_binary_expr_1): Extract wide int binary
722 operations into their own functions.
723 (wide_int_range_lshift): New.
724 (wide_int_range_can_optimize_bit_op): New.
725 (wide_int_range_shift_undefined_p): New.
726 (wide_int_range_bit_xor): New.
727 (wide_int_range_bit_ior): New.
728 (wide_int_range_bit_and): New.
729 (wide_int_range_trunc_mod): New.
730 (extract_range_into_wide_ints): New.
731 (vrp_shift_undefined_p): New.
732 (extract_range_from_multiplicative_op): New.
733 (vrp_can_optimize_bit_op): New.
734 * tree-vrp.h (value_range::dump): New.
735 (wide_int_range_multiplicative_op): New.
736 (wide_int_range_lshift):New.
737 (wide_int_range_shift_undefined_p): New.
738 (wide_int_range_bit_xor): New.
739 (wide_int_range_bit_ior): New.
740 (wide_int_range_bit_and): New.
741 (wide_int_range_trunc_mod): New.
742 (zero_nonzero_bits_from_bounds): Rename to...
743 (wide_int_set_zero_nonzero_bits): ...this.
744 (zero_nonzero_bits_from_vr): Rename to...
745 (vrp_set_zero_nonzero_bits): ...this.
746 (range_easy_mask_min_max): Rename to...
747 (wide_int_range_can_optimize_bit_op): this.
748 * vr-values.c (simplify_bit_ops_using_ranges): Rename
749 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
751 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
753 * tree-vectorizer.h (vect_orig_stmt): New function.
754 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
755 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
756 (vect_create_epilog_for_reduction): Likewise.
757 (vectorizable_live_operation): Likewise.
758 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
759 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
760 * tree-vect-stmts.c (vectorizable_call): Likewise.
761 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
763 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
765 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
767 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
768 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
769 (vect_transform_loop): Likewise.
770 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
772 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
774 * tree-vectorizer.h (vect_schedule_slp): Return void.
775 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
776 (vect_schedule_slp): Likewise.
778 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
780 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
782 (vect_transform_loop): Update calls accordingly. Schedule SLP
783 instances before the main loop, if any exist.
785 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
787 PR tree-optimization/86749
788 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
789 If the lhs is used in a COND_EXPR, check that it is being used
790 as the "then" or "else" value.
792 2018-08-01 Tom de Vries <tdevries@suse.de>
795 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
796 speculation_safe_value_not_needed.
798 2018-08-01 Richard Biener <rguenther@suse.de>
800 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
803 2018-08-01 Martin Liska <mliska@suse.cz>
805 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
806 format how successful transformation is dumped.
807 (gimple_mod_pow2_value_transform): Likewise.
808 (gimple_mod_subtract_transform): Likewise.
809 (gimple_stringops_transform): Likewise.
811 2018-08-01 Martin Liska <mliska@suse.cz>
814 * value-prof.c (interesting_stringop_to_profile_p):
815 Simplify the code and add BUILT_IN_MEMMOVE.
816 (gimple_stringops_transform): Likewise.
818 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
820 * config/aarch64/aarch64-simd.md
821 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
822 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
823 use GPI iterator instead of SI mode.
825 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
827 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
828 rs6000_speculation_barrier.
829 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
830 new barrier pattern name.
832 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
834 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
835 (speculation_barrier): New insn.
837 2018-08-01 Richard Biener <rguenther@suse.de>
840 * graphite.h: Include isl/id.h and isl/space.h to allow build
843 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
846 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
847 mode for COFF targets.
848 * defaults.h (TARGET_COFF): Define.
849 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
850 TARGET_COFF): Define.
851 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
852 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
853 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
855 2018-07-31 Alexandre Oliva <oliva@adacore.com>
857 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
858 * gimple-streamer-out.c (output_bb): Save it.
859 * lto-streamer-in.c (input_struct_function_base): Restore
860 instance discriminator if available. Create map on demand.
861 * lto-streamer-out.c (output_struct_function_base): Save it if
863 * final.c (decl_to_instance_map): Document LTO strategy.
865 2018-07-31 Alexandre Oliva <oliva@adacore.com>
866 Olivier Hainque <hainque@adacore.com>
868 * debug.h (decl_to_instance_map_t): New type.
869 (decl_to_instance_map): Declare.
870 (maybe_create_decl_to_instance_map): New inline function.
871 * final.c (bb_discriminator, last_bb_discriminator): New statics,
872 to track basic block discriminators.
873 (final_start_function_1): Initialize them.
874 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
876 (decl_to_instance_map): New variable.
877 (map_decl_to_instance, maybe_set_discriminator): New functions.
878 (notice_source_line): Set discriminator.
880 2018-07-31 Ian Lance Taylor <iant@golang.org>
882 * targhooks.c (default_have_speculation_safe_value): Add
885 2018-07-31 David Malcolm <dmalcolm@redhat.com>
887 * dump-context.h: Include "pretty-print.h".
888 (dump_context::refresh_dumps_are_enabled): New decl.
889 (dump_context::emit_item): New decl.
890 (class dump_context): Add fields "m_test_pp" and
892 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
893 (temp_dump_context::get_dumped_text): New decl.
894 (class temp_dump_context): Add field "m_pp".
895 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
896 (dump_context::refresh_dumps_are_enabled): ...and add a test for
898 (set_dump_file): Update for above change.
899 (set_alt_dump_file): Likewise.
900 (dump_loc): New overload, taking a pretty_printer *.
901 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
902 to any test pretty-printer.
903 (make_item_for_dump_gimple_stmt): New function, adapted from
904 optinfo::add_gimple_stmt.
905 (dump_context::dump_gimple_stmt): Call it, and use the result,
906 eliminating the direct usage of dump_file and alt_dump_file in
907 favor of indirectly using them via emit_item.
908 (make_item_for_dump_gimple_expr): New function, adapted from
909 optinfo::add_gimple_expr.
910 (dump_context::dump_gimple_expr): Call it, and use the result,
911 eliminating the direct usage of dump_file and alt_dump_file in
912 favor of indirectly using them via emit_item.
913 (make_item_for_dump_generic_expr): New function, adapted from
915 (dump_context::dump_generic_expr): Call it, and use the result,
916 eliminating the direct usage of dump_file and alt_dump_file in
917 favor of indirectly using them via emit_item.
918 (make_item_for_dump_printf_va): New function, adapted from
919 optinfo::add_printf_va.
920 (make_item_for_dump_printf): New function.
921 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
922 and use the result, eliminating the direct usage of dump_file and
923 alt_dump_file in favor of indirectly using them via emit_item.
924 (make_item_for_dump_dec): New function.
925 (dump_context::dump_dec): Call it, and use the result,
926 eliminating the direct usage of dump_file and alt_dump_file in
927 favor of indirectly using them via emit_item.
928 (make_item_for_dump_symtab_node): New function, adapted from
929 optinfo::add_symtab_node.
930 (dump_context::dump_symtab_node): Call it, and use the result,
931 eliminating the direct usage of dump_file and alt_dump_file in
932 favor of indirectly using them via emit_item.
933 (dump_context::begin_scope): Reimplement, avoiding direct usage
934 of dump_file and alt_dump_file in favor of indirectly using them
936 (dump_context::emit_item): New member function.
937 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
938 Set up test pretty-printer on the underlying context. Call
939 refresh_dumps_are_enabled.
940 (temp_dump_context::~temp_dump_context): Call
941 refresh_dumps_are_enabled.
942 (temp_dump_context::get_dumped_text): New member function.
943 (selftest::verify_dumped_text): New function.
944 (ASSERT_DUMPED_TEXT_EQ): New macro.
945 (selftest::test_capture_of_dump_calls): Run all tests twice, with
946 and then without optinfo enabled. Add uses of
947 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
948 * dumpfile.h: Update comment for the dump_* API.
949 * optinfo-emit-json.cc
950 (selftest::test_building_json_from_dump_calls): Update for new
951 param for temp_dump_context ctor.
952 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
954 (optinfo_item::~optinfo_item): Likewise.
955 (optinfo::add_item): New member function.
956 (optinfo::emit): Update comment.
957 (optinfo::add_string): Delete.
958 (optinfo::add_printf): Delete.
959 (optinfo::add_printf_va): Delete.
960 (optinfo::add_gimple_stmt): Delete.
961 (optinfo::add_gimple_expr): Delete.
962 (optinfo::add_tree): Delete.
963 (optinfo::add_symtab_node): Delete.
964 (optinfo::add_dec): Delete.
965 * optinfo.h (class dump_context): New forward decl.
966 (optinfo::add_item): New decl.
967 (optinfo::add_string): Delete.
968 (optinfo::add_printf): Delete.
969 (optinfo::add_printf_va): Delete.
970 (optinfo::add_gimple_stmt): Delete.
971 (optinfo::add_gimple_expr): Delete.
972 (optinfo::add_tree): Delete.
973 (optinfo::add_symtab_node): Delete.
974 (optinfo::add_dec): Delete.
975 (optinfo::add_poly_int): Delete.
976 (optinfo_item::optinfo_item): Remove "owned" param.
977 (class optinfo_item): Remove field "m_owned".
979 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
982 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
983 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
984 requested variable alignment.
985 (expand_one_ssa_partition): Likewise.
986 (expand_one_var): Likewise.
988 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
990 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
991 to speculation_safe_value_not_needed.
993 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
995 * targhooks.h (speculation_safe_value_not_needed): New prototype.
996 * targhooks.c (speculation_safe_value_not_needed): New function.
997 * target.def (have_speculation_safe_value): Update documentation.
998 * doc/tm.texi: Regenerated.
1000 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1002 * config/aarch64/iterators.md (ALLI_TI): New iterator.
1003 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1005 (despeculate_copy<ALLI:mode>_insn): New insn.
1006 (despeculate_copyti_insn): New insn.
1007 (despeculate_simple<ALLI:mode>): New insn
1008 (despeculate_simpleti): New insn.
1009 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1011 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1012 aarch64_speculation_safe_value.
1013 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1015 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1017 * config/aarch64/aarch64-speculation.cc: New file.
1018 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1019 before pass_reorder_blocks.
1020 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1022 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1023 X14 and X15 when tracking speculation.
1024 * config/aarch64/aarch64.md (register name constants): Add
1025 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1026 (unspec): Add UNSPEC_SPECULATION_TRACKER.
1027 (speculation_barrier): New insn attribute.
1028 (cmp<mode>): Allow SP in comparisons.
1029 (speculation_tracker): New insn.
1030 (speculation_barrier): Add speculation_barrier attribute.
1031 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1032 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1033 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1035 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1037 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1038 aarch64_track_speculation is true.
1039 (tb<optab><mode>1): Likewise.
1040 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1041 generate CB[N]Z when tracking speculation.
1042 (aarch64_split_compare_and_swap): Likewise.
1043 (aarch64_split_atomic_op): Likewise.
1045 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1047 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1049 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1051 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1052 (speculation_barrier): New insn.
1054 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1056 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1057 * config/arm/arm.md (speculation_barrier): New expand.
1058 (speculation_barrier_insn): New pattern.
1060 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1062 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1063 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1064 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1065 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1067 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1068 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1069 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1070 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1071 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1072 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1073 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1074 * builtins.c (expand_speculation_safe_value): New function.
1075 (expand_builtin): Call it.
1076 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1077 * doc/extend.texi: Document __builtin_speculation_safe_value.
1078 * doc/md.texi: Document "speculation_barrier" pattern.
1079 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1080 TARGET_HAVE_SPECULATION_SAFE_VALUE.
1081 * doc/tm.texi: Regenerated.
1082 * target.def (have_speculation_safe_value, speculation_safe_value): New
1084 * targhooks.c (default_have_speculation_safe_value): New function.
1085 (default_speculation_safe_value): New function.
1086 * targhooks.h (default_have_speculation_safe_value): Add prototype.
1087 (default_speculation_safe_value): Add prototype.
1089 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1091 * dump-context.h (dump_context::dump_loc): New decl.
1092 * dumpfile.c (dump_context::dump_loc): New member function.
1093 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1094 and dump_gimple_stmt.
1095 (dump_context::dump_gimple_expr_loc): Likewise, using
1097 (dump_context::dump_generic_expr_loc): Likewise, using
1099 (dump_context::dump_printf_loc_va): Likewise, using
1101 (dump_context::begin_scope): Explicitly using the global function
1102 "dump_loc", rather than the member function.
1104 2018-07-31 Martin Sebor <msebor@redhat.com>
1106 PR tree-optimization/86741
1107 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1109 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
1111 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1112 depend on whether prefetch instructions will be emitted or not.
1113 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1114 will be emitted or not.
1115 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1116 (TARGET_SETMEM_PFD): New macros.
1118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1120 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1121 (NULL_STMT_VEC_INFO): Delete.
1122 (stmt_vec_info::operator*): Likewise.
1123 (stmt_vec_info::operator gimple *): Likewise.
1124 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1125 of NULL_STMT_VEC_INFO.
1126 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1127 (vect_reassociating_reduction_p): Likewise.
1128 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1129 (vectorizable_store): Likewise.
1130 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1131 (vec_info::free_stmt_vec_infos): Likewise.
1133 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1135 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1136 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1140 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1141 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1142 (vec_info::free_stmt_vec_info): New private member functions.
1143 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1144 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1145 * tree-parloops.c (gather_scalar_reductions): Remove calls to
1146 set_stmt_vec_info_vec and free_stmt_vec_infos.
1147 * tree-vect-loop.c (_loop_vec_info): Remove call to
1148 set_stmt_vec_info_vec.
1149 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1150 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1151 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1152 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1153 (vec_info::free_stmt_vec_info): ...these new functions. Remove
1154 assignments in {vec_info::,}new_stmt_vec_info that are redundant
1155 with the clearing in the xcalloc.
1156 (stmt_vec_info_vec): Delete.
1157 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1158 (vectorize_loops): Likewise.
1159 (vec_info::~vec_info): Remove argument from call to
1160 free_stmt_vec_infos.
1161 (vec_info::add_stmt): Remove vinfo argument from call to
1164 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1166 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1167 rather than a gimple stmt.
1168 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
1169 information for pattern statements when passed the original
1170 statement; instead wait to be passed the pattern statement itself.
1171 Don't call set_vinfo_for_stmt here.
1172 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1173 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1174 stmt_vec_infos here.
1175 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1176 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1177 stmt_vec_infos entry.
1179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1181 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1182 * tree-vectorizer.c (vec_info::replace_stmt): New function.
1183 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1184 * tree-vect-stmts.c (vectorizable_call): Likewise.
1185 (vectorizable_simd_clone_call): Likewise.
1187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1189 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1190 * tree-vectorizer.c (vec_info::remove_stmt): New function.
1191 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1192 * tree-vect-loop.c (vect_transform_loop): Likewise.
1193 * tree-vect-slp.c (vect_schedule_slp): Likewise.
1194 * tree-vect-stmts.c (vect_remove_stores): Likewise.
1196 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1198 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1199 (vect_dr_stmt): Delete.
1200 * tree-vectorizer.c (vec_info::lookup_dr): New function.
1201 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1203 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1204 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1205 (vect_verify_datarefs_alignment, vect_peeling_supportable)
1206 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1207 (vect_analyze_data_refs): Likewise.
1208 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
1210 (vect_find_same_alignment_drs): Likewise.
1211 (vect_slp_analyze_node_dependences): Update calls accordingly.
1212 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1213 instead of DR_VECT_AUX.
1214 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1215 of a vector data references. Use vec_info::lookup_dr instead of
1217 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1218 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1219 instead of DR_VECT_AUX.
1221 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1223 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1225 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1227 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1228 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1229 (vect_gen_prolog_loop_niters): Likewise.
1231 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1233 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1234 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1235 (vect_known_alignment_in_bytes, vect_dr_behavior)
1236 (vect_get_scalar_dr_size): Take references as dr_vec_infos
1237 instead of data_references. Update calls to other routines for
1238 which the same change has been made.
1239 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1240 dr_vec_infos instead of stmt_vec_infos.
1241 (vect_analyze_data_ref_dependence): Update call accordingly.
1242 (vect_slp_analyze_data_ref_dependence)
1243 (vect_record_base_alignments): Use DR_VECT_AUX.
1244 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1245 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1246 (vector_alignment_reachable_p, vect_get_data_access_cost)
1247 (vect_peeling_supportable, vect_analyze_group_access_1)
1248 (vect_analyze_group_access, vect_analyze_data_ref_access)
1249 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1250 (vect_compile_time_alias, vect_small_gap_p)
1251 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1252 (vect_supportable_dr_alignment): Take references as dr_vec_infos
1253 instead of data_references. Update calls to other routines for
1254 which the same change has been made.
1255 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1256 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1257 (vect_slp_analyze_and_verify_node_alignment)
1258 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1259 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1260 (vect_setup_realignment): Use dr_vec_infos. Update calls after
1262 (_vect_peel_info::dr): Replace with...
1263 (_vect_peel_info::dr_info): ...this new field.
1264 (vect_peeling_hash_get_most_frequent)
1265 (vect_peeling_hash_choose_best_peeling): Update accordingly.
1266 (vect_peeling_hash_get_lowest_cost):
1267 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
1268 routines for which the same change has been made.
1269 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
1271 * tree-vect-loop-manip.c (get_misalign_in_elems)
1272 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
1274 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1275 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1276 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1277 (get_group_load_store_type, get_negative_load_store_type)
1278 (vect_get_data_ptr_increment, vectorizable_store)
1279 (vectorizable_load): Likewise.
1280 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1281 Update calls to other routines for which the same change has been made.
1283 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1285 * tree-vectorizer.h (vec_info::move_dr): New member function.
1286 (dataref_aux): Rename to...
1287 (dr_vec_info): ...this and add "dr" and "stmt" fields.
1288 (_stmt_vec_info::dr_aux): Update accordingly.
1289 (_stmt_vec_info::data_ref_info): Delete.
1290 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1291 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1292 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1293 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1295 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
1296 (STMT_VINFO_DR_INFO): New macro.
1297 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1298 (set_dr_misalignment): Update after rename of dataref_aux.
1299 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
1300 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1301 initialization of STMT_VINFO_DATA_REF.
1302 * tree-vectorizer.c (vec_info::move_dr): New function.
1303 * tree-vect-patterns.c (vect_recog_bool_pattern)
1304 (vect_recog_mask_conversion_pattern)
1305 (vect_recog_gather_scatter_pattern): Use it.
1306 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1307 the "dr" and "stmt" fields of dr_vec_info instead of
1308 STMT_VINFO_DATA_REF.
1310 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1312 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1313 (is_pattern_stmt_p): Use it.
1314 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1315 on pattern statements.
1317 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1319 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1320 original stmt as a stmt_vec_info rather than a gimple stmt.
1321 (vect_pattern_recog_1): Take the statement directly as a
1322 stmt_vec_info, rather than via a gimple_stmt_iterator.
1323 Update call to vect_mark_pattern_stmts.
1324 (vect_pattern_recog): Update calls accordingly.
1326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1328 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1329 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1330 a vect_def_type for the first argument.
1331 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1332 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
1333 operand if it isn't defined by a vectorized statement.
1334 (vect_build_gather_load_calls): Remove the mask_dt argument and
1335 update calls to vect_get_vec_def_for_stmt_copy.
1336 (vectorizable_bswap): Likewise the dt argument.
1337 (vectorizable_call): Update calls to vectorizable_bswap and
1338 vect_get_vec_def_for_stmt_copy.
1339 (vectorizable_simd_clone_call, vectorizable_assignment)
1340 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1341 (vectorizable_comparison): Update calls to
1342 vect_get_vec_def_for_stmt_copy.
1343 (vectorizable_store): Likewise. Remove now-unnecessary calls to
1345 (vect_get_loop_based_defs): Remove dt argument and update call
1346 to vect_get_vec_def_for_stmt_copy.
1347 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1348 and vect_get_vec_def_for_stmt_copy.
1349 (vectorizable_load): Update calls to vect_build_gather_load_calls
1350 and vect_get_vec_def_for_stmt_copy.
1351 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1352 (vectorizable_reduction, vectorizable_live_operation): Update calls
1353 to vect_get_vec_def_for_stmt_copy.
1355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1357 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1358 and gimple stmt arguments with a stmt_vec_info.
1359 (vect_record_base_alignments): Update calls accordingly.
1360 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1361 and gimple stmt arguments with a stmt_vec_info.
1362 (vect_build_slp_tree_1): Remove vinfo argument and update call
1363 to vect_record_max_nunits.
1364 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1365 and vect_record_max_nunits.
1367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1369 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1370 file and take a stmt_vec_info instead of a gimple stmt.
1371 (supportable_widening_operation, vect_finish_replace_stmt)
1372 (vect_finish_stmt_generation, vect_get_store_rhs)
1373 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1374 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1375 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1376 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1377 (vect_create_data_ref_ptr, bump_vector_ptr)
1378 (vect_permute_store_chain, vect_setup_realignment)
1379 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1380 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1381 (vectorizable_reduction, vectorizable_induction)
1382 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1383 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1384 than gimple stmts as arguments.
1385 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1386 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1387 (can_group_stmts_p, vect_check_gather_scatter)
1388 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1389 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1390 (vect_permute_load_chain, vect_shift_permute_load_chain)
1391 (vect_transform_grouped_load)
1392 (vect_record_grouped_load_vectors): Likewise.
1393 * tree-vect-loop.c (vect_fixup_reduc_chain)
1394 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1395 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1396 (vectorizable_reduction, vectorizable_induction)
1397 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1398 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1399 (vect_get_load_store_mask): Likewise.
1400 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1401 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1402 * tree-vect-stmts.c (vect_mark_relevant)
1403 (is_simple_and_all_uses_invariant)
1404 (exist_non_indexing_operands_for_use_p, process_use)
1405 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1406 (vect_get_vec_def_for_operand, vect_get_vec_defs)
1407 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1408 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1409 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1410 (get_negative_load_store_type, get_load_store_type)
1411 (vect_check_load_store_mask, vect_check_store_rhs)
1412 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1413 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1414 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1415 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1416 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1417 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1418 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1419 (supportable_widening_operation): Likewise.
1421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1423 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1424 a stmt_vec_info instead of a gcall.
1425 (vect_check_gather_scatter): Update call accordingly.
1426 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1428 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1429 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1430 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1431 instead of a gimple stmt.
1432 (vect_transform_loop): Update calls accordingly.
1433 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1434 stmt_vec_infos instead of gimple stmts.
1435 (vect_analyze_slp_instance): Update use accordingly.
1436 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1437 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1438 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1439 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1440 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1441 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1442 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1443 down to subroutines.
1445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1447 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1448 of the worklist from a vector of gimple stmts to a vector of
1450 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1451 (vect_mark_stmts_to_be_vectorized): Likewise
1453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1455 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1456 statement before passing it to vect_analyze_stmt.
1457 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1458 the chain of phi vector definitions. Track the exit phi via its
1460 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1461 STMT_VINFO_REDUC_DEF.
1462 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1463 stmt_vec_infos to handle the statement chains.
1464 (vect_get_slp_defs): Record the first statement in the node
1465 using a stmt_vec_info.
1466 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1467 statements here and pass their stmt_vec_info down to subroutines.
1468 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1469 down to vect_finish_stmt_generation.
1470 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1471 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1472 stmt_vec_infos to subroutines.
1473 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1476 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1478 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1479 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1480 (vect_permute_store_chain, vect_setup_realignment)
1481 (vect_permute_load_chain, vect_shift_permute_load_chain)
1482 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1483 stmts internally, and when passing values to other vectorizer routines.
1484 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1485 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1486 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1487 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1488 (vectorizable_reduction, vectorizable_induction)
1489 (vectorizable_live_operation, vect_transform_loop_stmt)
1490 (vect_transform_loop): Likewise.
1491 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1492 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1493 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1494 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1495 (vect_slp_analyze_node_operations_1): Likewise.
1496 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1497 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1498 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1499 (vect_finish_stmt_generation_1, get_group_load_store_type)
1500 (get_load_store_type, vect_build_gather_load_calls)
1501 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1502 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1503 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1504 (vectorizable_store, vectorizable_load, vectorizable_condition)
1505 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1506 (supportable_widening_operation): Likewise.
1507 (vect_get_vector_types_for_stmt): Likewise.
1508 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1510 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1512 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1513 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1514 (vect_permute_store_chain, vect_permute_load_chain)
1515 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1516 repeated stmt_vec_info lookups.
1517 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1518 (vect_update_ivs_after_vectorizer): Likewise.
1519 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1520 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1521 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1522 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1523 (vect_bb_slp_scalar_cost): Likewise.
1524 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1526 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1528 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1529 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1530 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1531 to get gassigns and gcalls, rather than operating on generc gimple
1533 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1534 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1535 (vectorizable_load, vect_analyze_stmt): Likewise.
1536 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1538 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1540 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1541 return stmt_vec_infos rather than gimple stmts. Do not accept
1543 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1545 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1546 Update use of get_later_stmt.
1547 (vect_get_constant_vectors): Update call accordingly.
1548 (vect_schedule_slp_instance): Likewise
1549 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1550 (vect_slp_analyze_instance_dependence): Likewise.
1551 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1553 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1555 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1556 (stmt_info_for_cost::stmt_info): ...this new field.
1557 (add_stmt_costs): Update accordingly.
1558 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1559 (vect_get_known_peeling_cost): Likewise.
1560 (vect_estimate_min_profitable_iters): Likewise.
1561 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1565 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1566 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1567 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1569 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1571 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1573 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1574 a gimple stmt to a stmt_vec_info.
1575 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1577 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1579 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1580 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1581 (_loop_vec_info::reduction_chains): Likewise.
1582 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1584 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1586 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1588 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1589 a gimple stmt to a stmt_vec_info.
1590 (_stmt_vec_info::next_element): Likewise.
1591 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1592 (vect_slp_analyze_and_verify_node_alignment)
1593 (vect_analyze_group_access_1, vect_analyze_group_access)
1594 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1595 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1596 (vect_supportable_dr_alignment): Update accordingly.
1597 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1598 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1599 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1600 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1601 * tree-vect-slp.c (vect_build_slp_tree_1)
1602 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1603 (vect_split_slp_store_group, vect_analyze_slp_instance)
1604 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1605 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1606 (get_group_load_store_type, get_load_store_type)
1607 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1608 (vect_transform_stmt, vect_remove_stores): Likewise.
1610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1612 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1614 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1615 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1616 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1617 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1618 (vector_alignment_reachable_p, vect_get_data_access_cost)
1619 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1620 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1621 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1622 (vect_analyze_group_access_1, vect_analyze_group_access)
1623 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1624 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1625 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1626 result of vect_dr_stmt and use the stmt_vec_info instead of
1627 the associated gimple stmt.
1628 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1629 (vect_gen_prolog_loop_niters): Likewise.
1630 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1634 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1635 to a vec<stmt_vec_info>.
1636 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1637 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1639 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1640 to a vec<stmt_vec_info>.
1641 (bst_traits::value_type, bst_traits::value_type): Likewise.
1642 (bst_traits::hash): Update accordingly.
1643 (vect_get_and_check_slp_defs): Change the stmts parameter from
1644 a vec<gimple *> to a vec<stmt_vec_info>.
1645 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1646 (vect_build_slp_tree): Likewise.
1647 (vect_build_slp_tree_2): Likewise. Update uses of
1648 SLP_TREE_SCALAR_STMTS.
1649 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1650 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1651 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1652 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1653 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1654 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1655 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1656 (vect_get_constant_vectors, vect_get_slp_defs)
1657 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1658 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1659 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1660 instead of gimple stmts.
1661 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1662 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1663 (vect_slp_analyze_instance_dependence): Update uses of
1664 SLP_TREE_SCALAR_STMTS.
1665 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1666 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1667 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1668 (get_initial_defs_for_reduction): Likewise.
1669 (vect_create_epilog_for_reduction): Likewise.
1670 (vectorize_fold_left_reduction): Likewise.
1671 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1672 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1673 (can_vectorize_live_stmts): Likewise.
1675 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1677 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1678 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1679 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1681 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1683 (gather_scalar_reductions): Update after above interface changes.
1684 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1685 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1687 (vect_force_simple_reduction): Likewise.
1688 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1689 LOOP_VINFO_REDUCTIONS.
1690 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1692 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1694 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1695 a gimple stmt to a stmt_vec_info.
1696 * tree-vect-loop.c (vect_active_double_reduction_p)
1697 (vect_force_simple_reduction, vectorizable_reduction): Update
1700 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1702 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1703 vec<gimple *> to a vec<stmt_vec_info>.
1704 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1705 the reduction_phis argument from a vec<gimple *> to a
1707 (vectorizable_reduction): Likewise the phis local variable that
1708 is passed to vect_create_epilog_for_reduction. Update for new type
1709 of SLP_TREE_VEC_STMTS.
1710 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1711 (vectorizable_live_operation): Likewise.
1712 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1713 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1715 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1717 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1718 a gimple stmt to a stmt_vec_info.
1719 (vectorizable_condition, vectorizable_live_operation)
1720 (vectorizable_reduction, vectorizable_induction): Pass back the
1721 vectorized statement as a stmt_vec_info.
1722 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1723 use of STMT_VINFO_VEC_STMT.
1724 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1725 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1726 as stmt_vec_infos rather than gimple stmts.
1727 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1729 (vectorizable_live_operation): Likewise.
1730 (vectorizable_reduction, vectorizable_induction): Likewise,
1731 updating use of STMT_VINFO_VEC_STMT.
1732 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1733 of STMT_VINFO_VEC_STMT.
1734 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1735 (vectorizable_simd_clone_call, vectorizable_conversion)
1736 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1737 (vectorizable_store, vectorizable_load, vectorizable_condition)
1738 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1739 from a gimple stmt to a stmt_vec_info.
1740 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1741 pointer to a stmt_vec_info to the vectorizable_* routines.
1743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1745 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1746 a gimple stmt to a stmt_vec_info.
1747 (is_pattern_stmt_p): Update accordingly.
1748 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1749 (vect_record_grouped_load_vectors): Likewise.
1750 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1751 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1752 (vect_model_reduction_cost): Likewise.
1753 (vect_create_epilog_for_reduction): Likewise.
1754 (vectorizable_reduction, vectorizable_induction): Likewise.
1755 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1756 Return the stmt_vec_info for the pattern statement.
1757 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1758 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1759 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1760 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1761 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1762 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1763 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1764 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1768 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1769 (vect_finish_stmt_generation): Likewise.
1770 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1771 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1772 (vect_build_gather_load_calls): Use the return value of the above
1773 functions instead of a separate call to vinfo_for_stmt. Use narrow
1774 scopes for the input gimple stmt and wider scopes for the associated
1775 stmt_vec_info. Use vec_info::lookup_def when setting these
1776 stmt_vec_infos from an SSA_NAME definition.
1777 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1778 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1779 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1780 (vectorizable_store, vectorizable_load, vectorizable_condition)
1781 (vectorizable_comparison): Likewise.
1782 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1783 (vectorizable_reduction): Likewise.
1785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1787 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1788 stmt_vec_info * parameter before the optional gimple **.
1789 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1790 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1791 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1792 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1793 (vectorizable_live_operation): Likewise.
1794 * tree-vect-patterns.c (type_conversion_p): Likewise.
1795 (vect_look_through_possible_promotion): Likewise.
1796 (vect_recog_rotate_pattern): Likewise.
1797 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1799 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1801 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1802 a typedef to a wrapper class.
1803 (NULL_STMT_VEC_INFO): New macro.
1804 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1805 (stmt_vec_info::operator*): New function.
1806 (stmt_vec_info::operator gimple *): Likewise.
1807 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1808 (add_stmt_costs): Likewise.
1809 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1810 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1811 (vect_get_known_peeling_cost): Likewise.
1812 (vect_estimate_min_profitable_iters): Likewise.
1813 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1814 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1815 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1816 (vectorizable_store, free_stmt_vec_infos): Likewise.
1817 (new_stmt_vec_info): Change return type of xcalloc to
1820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1822 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1823 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1824 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1825 a single_imm_use-based sequence.
1826 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1828 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1830 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1831 * tree-vectorizer.c (vec_info::lookup_def): New function.
1832 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1833 (vect_widened_op_tree): Likewise.
1834 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1835 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1836 (vectorizable_reduction): Likewise.
1837 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1839 (vect_is_slp_reduction): Update calls accordingly. Use
1840 vec_info::lookup_def.
1841 (vect_is_simple_reduction): Likewise
1842 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1844 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1846 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1847 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1848 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1850 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1851 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1852 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1853 (vect_is_slp_reduction, vectorizable_induction)
1854 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1855 * tree-vect-patterns.c (vect_init_pattern_stmt):
1856 (vect_determine_min_output_precision_1, vect_determine_precisions)
1857 (vect_pattern_recog): Likewise.
1858 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1859 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1860 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1861 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1862 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1863 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1864 info field from a loop to a loop_vec_info.
1866 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1868 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1869 (vec_info::add_stmt): Declare.
1870 * tree-vectorizer.c (vec_info::add_stmt): New function.
1871 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1872 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1873 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1874 (vectorizable_induction): Likewise.
1875 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1876 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1877 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1878 (vectorizable_load): Likewise.
1879 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1880 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1881 (vect_recog_gather_scatter_pattern): Likewise.
1882 (append_pattern_def_seq): Likewise. Remove a check that is
1883 performed by add_stmt itself.
1885 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1887 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1888 which make_ssa_name was called with new_stmt before new_stmt
1891 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1893 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1895 (vect_is_slp_reduction): ...here...
1896 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1897 that are already known to be false.
1899 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1901 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1902 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1903 STMT_VINFO_NUM_SLP_USES when it's true.
1904 (vect_free_slp_instance): Add a final_p parameter and pass it to
1906 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1907 (vect_analyze_slp_instance): Likewise.
1908 (vect_slp_analyze_operations): Likewise.
1909 (vect_slp_analyze_bb_1): Likewise.
1910 * tree-vectorizer.c (vec_info): Likewise.
1911 * tree-vect-loop.c (vect_transform_loop): Likewise.
1913 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1915 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1916 function is not called for second and subsequent members of
1919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1921 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1922 cases for nested loops from here to ...
1923 (vect_create_epilog_for_reduction): ...here. Only call
1924 vect_is_simple_use for inner-loop reductions.
1926 2018-07-31 Martin Liska <mliska@suse.cz>
1928 PR gcov-profile/85338
1929 PR gcov-profile/85350
1930 PR gcov-profile/85372
1931 * profile.c (struct location_triplet): New.
1932 (struct location_triplet_hash): Likewise.
1933 (output_location): Do not output a BB that
1934 is already recorded for a line.
1935 (branch_prob): Use streamed_locations.
1937 2018-07-31 Martin Liska <mliska@suse.cz>
1939 PR gcov-profile/85370
1940 * coverage.c (coverage_begin_function): Do not mark target
1941 clones as artificial functions.
1943 2018-07-31 Martin Liska <mliska@suse.cz>
1945 PR gcov-profile/83813
1946 PR gcov-profile/84758
1947 PR gcov-profile/85217
1948 PR gcov-profile/85332
1949 * profile.c (branch_prob): Do not record GOTO expressions
1950 for GIMPLE statements which locations are already streamed.
1952 2018-07-31 Olivier Hainque <hainque@adacore.com>
1954 * gcc.c (handle_spec_function): Accept a soft_matched_part
1955 argument, as do_spec_1. Pass it down to ...
1956 (eval_spec_function): Accept a soft_matched_part argument,
1957 and pass it down to ...
1958 (do_spec_2): Accept a soft_matched_part argument, and pass
1959 it down to do_spec_1.
1960 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1961 (handle_braces): Update call to handle_spec_function.
1962 (driver::set_up_specs): Update calls to do_spec_2.
1963 (compare_debug_dump_opt_spec_function): Likewise.
1964 (compare_debug_self_opt_spec_function): Likewise.
1966 2018-07-31 Olivier Hainque <hainque@adacore.com>
1968 * common.opt (nolibc): New option.
1969 * doc/invoke.texi (Link Options): Document it.
1970 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1971 * config/alpha/linux.h: Likewise.
1972 * config/arc/elf.h: Likewise.
1973 * config/arm/uclinux-elf.h: Likewise.
1974 * config/arm/unknown-elf.h: Likewise.
1975 * config/avr/avrlibc.h: Likewise.
1976 * config/bfin/bfin.h: Likewise.
1977 * config/bfin/linux.h: Likewise.
1978 * config/bfin/uclinux.h: Likewise.
1979 * config/darwin.h: Likewise.
1980 * config/darwin10.h: Likewise.
1981 * config/darwin12.h: Likewise.
1982 * config/gnu-user.h: Likewise.
1983 * config/lm32/uclinux-elf.h: Likewise.
1984 * config/pa/pa-hpux11.h: Likewise.
1985 * config/pa/pa64-hpux.h: Likewise.
1986 * config/sparc/sparc.h: Likewise.
1988 2018-07-31 Olivier Hainque <hainque@adacore.com>
1990 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1991 undefined variables.
1993 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1996 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1999 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2001 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2002 terminated string literal.
2004 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
2006 PR rtl-optimization/85160
2007 * combine.c (is_just_move): New function.
2008 (try_combine): Allow combining two instructions into two if neither of
2009 the original instructions was a move.
2011 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
2014 * doc/extend.texi (Global Register Variables): Discourage use of type
2016 (Local Register Variables): Likewise.
2018 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
2020 PR tree-optimization/86506
2021 * hwint.h (ceil_log2): Resync with hwint.c implementation.
2023 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
2026 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2027 hard_regno, make sure no insn between `from` and `to` clobbers it.
2029 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
2030 Tom de Vries <tdevries@suse.de>
2032 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2033 (PTX_DEFAULT_RUNTIME_DIM): ... this.
2034 (nvptx_goacc_validate_dims): Set default worker and gang dims to
2035 PTX_DEFAULT_RUNTIME_DIM.
2036 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2038 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
2040 * config/pa/pa.c (pa_output_addr_vec): Align address table.
2041 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2042 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2044 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
2046 * config/rs6000/constraints.md (wG constraint): Delete, no longer
2048 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2049 predicate to reflect toc fusion has been deleted.
2050 (toc_fusion_mem_raw): Delete, no longer used.
2051 (toc_fusion_mem_wrapped): Likewise.
2052 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2054 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2055 Delete, no longer used.
2056 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2057 meant to be used for toc fusion.
2058 (rs6000_debug_print_mode): Delete toc fusion debugging.
2059 (rs6000_debug_reg_global): Likewise.
2060 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2061 fusion and secondary reload support that were never used.
2062 (rs6000_option_override_internal): Delete TOC fusion, that was only
2063 partially defined, and it did not work unless you also used the
2065 (rs6000_legitimate_address_p): Delete TOC fusion support.
2066 (rs6000_opt_masks): Likewise.
2067 (fusion_wrap_memory_address): Delete function, no longer used.
2068 (fusion_split_address); Delete TOC fusion support.
2069 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2070 longer used with toc fusion being deleted.
2071 (TARGET_TOC_FUSION_FP): Likewise.
2072 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2074 (toc fusion spliter): Delete TOC fusion support.
2075 (toc_fusionload_<mode>): Likewise.
2076 (toc_fusionload_di): Likewise.
2077 (fusion_gpr_load_<mode>): Delete generator function, this insn no
2078 longer needs to be named. Rename predicate to delete TOC fusion.
2079 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2080 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2081 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2082 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2083 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2085 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
2087 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2088 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
2089 __int128 in built-in function prototypes.
2090 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2091 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2093 2018-07-27 Martin Sebor <msebor@redhat.com>
2095 PR tree-optimization/86696
2096 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2097 types, including enums.
2098 (handle_char_store): Be prepared for the above function to fail.
2100 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
2102 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2103 when optimization level is lower than 2 or optimize for size.
2105 2018-07-26 Martin Sebor <msebor@redhat.com>
2107 PR tree-optimization/86043
2108 PR tree-optimization/86042
2109 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2110 (get_string_cst_length): Rename...
2111 (get_min_string_length): ...to this. Add argument.
2112 (handle_char_store): Extend to handle multi-character stores by
2114 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
2115 * tree.h (initializer_zerop): Add argument.
2117 2018-07-26 Jakub Jelinek <jakub@redhat.com>
2120 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2121 declare target to variables if they have always,{to,from,tofrom} map
2124 2018-07-26 Martin Liska <mliska@suse.cz>
2127 * lto-wrapper.c: Add linker_output as prefix
2128 for ltrans_output_file.
2130 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
2132 PR rtl-optimization/85805
2133 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2134 value for hard registers if that was written in the same mode.
2136 2018-07-26 Martin Liska <mliska@suse.cz>
2138 PR gcov-profile/86536
2139 * gcov.c (format_gcov): Use printf format %.*f directly
2140 and do not handle special values.
2142 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2144 * common/config/arc/arc-common.c (arc_option_optimization_table):
2145 Update default optimizations for size.
2147 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2149 * config/arc/arc.md (movsf_insn): Add short instruction selection.
2150 * config/arc/constraints.md (CfZ): New constraint.
2151 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2152 (subsf3_fpu): Likewise.
2153 (cmpsf_fpu): Likewise.
2154 (cmpsf_fpu_uneq): Likewise.
2156 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2158 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2160 (arc_is_uncached_mem_p): uncached applies to both the variable and
2163 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2165 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2168 2018-07-25 David Malcolm <dmalcolm@redhat.com>
2170 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2171 field "m_scopes" from vec to auto_vec.
2173 2018-07-25 Martin Liska <mliska@suse.cz>
2175 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2178 2018-07-25 Richard Biener <rguenther@suse.de>
2181 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2182 special wrt context_die late.
2183 (gen_subprogram_die): Re-use DIEs in local scope.
2185 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
2187 PR tree-optimization/86644
2188 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
2190 2018-07-25 Martin Liska <mliska@suse.cz>
2193 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2194 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2196 2018-07-25 Martin Liska <mliska@suse.cz>
2199 * params.def: Explain ASan abbreviation and provide
2200 a documentation link.
2202 2018-07-24 Martin Sebor <msebor@redhat.com>
2204 PR tree-optimization/86622
2205 PR tree-optimization/86532
2206 * builtins.h (string_length): Declare.
2207 * builtins.c (c_strlen): Correct handling of non-constant offsets.
2208 (check_access): Be prepared for non-constant length ranges.
2209 (string_length): Make extern.
2210 * expr.c (string_constant): Only handle the minor non-constant
2211 array index. Use string_constant to compute the length of
2212 a generic string constant.
2214 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
2216 PR tree-optimization/86618
2217 * tree-vect-stmts.c (vectorizable_call): Don't take the address
2218 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2220 2018-07-24 David Malcolm <dmalcolm@redhat.com>
2222 PR tree-optimization/86636
2223 * json.cc (json::object::set): Fix comment. Add assertions.
2224 (json::array::append): Move here from json.h. Add comment and an
2226 (json::string::string): Likewise.
2227 * json.h (json::array::append): Move to json.cc.
2228 (json::string::string): Likewise.
2229 * optinfo-emit-json.cc
2230 (optrecord_json_writer::impl_location_to_json): Assert that we
2231 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2232 wrapper around it. Expand the location once, rather than three
2234 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2235 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2237 (optrecord_json_writer::optinfo_to_json): Likewise, in four
2238 places. Fix some overlong lines.
2240 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
2242 * config/aarch64/aarch64-simd.md
2243 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2244 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2245 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2246 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2247 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2248 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2249 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2250 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2251 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2253 2018-07-24 Jakub Jelinek <jakub@redhat.com>
2256 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2257 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
2258 and abs_d == d, do the power of two handling if profitable.
2260 2018-07-24 Richard Biener <rguenther@suse.de>
2262 * match.pd: Add BIT_FIELD_REF canonicalizations.
2264 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2267 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2269 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2271 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2272 terminated STRING_CST object.
2274 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2276 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2278 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2280 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2281 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2282 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2283 the elements into a register.
2284 (rs6000_split_v4si_init_di_reg): Delete.
2285 (rs6000_split_v4si_init): Delete.
2286 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2287 (vsx_init_v4si): Rewrite as a define_expand.
2289 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2291 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2292 zero_extend argument from memory): New.
2294 2018-07-22 Martin Sebor <msebor@redhat.com>
2297 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2298 diagnosing calls with unknown arguments unless -Walloca-larger-than
2299 is restricted to less than PTRDIFF_MAX bytes.
2301 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
2303 * doc/gcov.texi (Invoking Gcov): Editorial changes.
2305 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2307 * pretty-print.c (text_info::set_location): Remove redundant
2308 "line_table" parameter from call to rich_location::set_range.
2310 2018-07-20 Martin Sebor <msebor@redhat.com>
2313 * builtins.c (expand_builtin_alloca): Adjust.
2314 * calls.c (alloc_max_size): Simplify.
2315 * cgraphunit.c (cgraph_node::expand): Adjust.
2316 * common.opt (larger_than_size, warn_frame_larger_than): Remove
2318 (frame_larger_than_size): Same.
2319 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2320 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2322 * doc/invoke.texi (GCC Command Options): Document option arguments.
2323 Explain byte-size arguments and suffixes.
2324 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2325 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2326 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2327 * doc/options.texi (UInteger): Expand.
2328 (Host_Wide_Int, ByteSize): Document new properties.
2329 * final.c (final_start_function_1): Include sizes in an error message.
2330 * function.c (frame_offset_overflow): Same.
2331 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2332 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2333 Diagnose unbounded alloca calls only for limits of less than
2335 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
2336 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
2338 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
2339 only for limits of less than PTRDIFF_MAX.
2340 * langhooks-def.h (lhd_handle_option): Change function argument
2342 * langhooks.c (lhd_handle_option): Same.
2343 * langhooks.h (handle_option): Same.
2344 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2346 (var_type, var_type_struct): Same.
2347 (var_set): Handle ByteSize flag.
2348 * optc-gen.awk: Add comments to output to ease debugging. Make
2349 use of HOST_WIDE_INT where appropriate.
2350 * opts-gen-save.awk: Use %lx to format unsigned long.
2351 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2352 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2353 arguments. Parse bytes-size suffixes.
2354 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2355 (enum_value_to_arg): Same.
2356 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
2357 (handle_option): Adjust.
2358 (generate_option): Change function argument to HOST_WIDE_INT.
2359 (cmdline_handle_error): Adjust.
2360 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2361 (set_option): Change function argument to HOST_WIDE_INT.
2362 (option_enabled): Handle cl_host_wide_int.
2363 (get_option_state): Handle CLVC_SIZE.
2364 (control_warning_option): Same.
2365 * opts.c (common_handle_option): Change function argument to
2366 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
2367 OPT_Wvla_larger_than_.
2368 * opts.h (enum cl_var_type): Add an enumerator.
2369 * stor-layout.c (layout_decl): Print a more meaningful warning.
2370 * toplev.c (output_stack_usage): Adjust.
2372 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
2374 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2375 call to inline_expand_builtin_string_cmp.
2376 (expand_builtin_strcmp): Likewise.
2377 (expand_builtin_strncmp): Likewise.
2378 (inline_string_cmp): Delete the last parameter, change char_type_node
2379 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2381 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2382 the inlining expansion on target where the type of the call has same or
2383 narrower precision than unsigned char.
2385 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2387 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2388 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2389 * common.opt (fsave-optimization-record): New option.
2390 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2391 * doc/invoke.texi (-fsave-optimization-record): New option.
2392 * dumpfile.c: Include "optinfo-emit-json.h".
2393 (struct kv_pair): Move to coretypes.h.
2394 (optgroup_options): Make non-static.
2395 (dump_context::end_scope): Call
2396 optimization_records_maybe_pop_dump_scope.
2397 * dumpfile.h (optgroup_options): New decl.
2398 * json.cc: New file.
2400 * optinfo-emit-json.cc: New file.
2401 * optinfo-emit-json.h: New file.
2402 * optinfo.cc: Include "optinfo-emit-json.h".
2403 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2404 (optinfo_enabled_p): Check optimization_records_enabled_p.
2405 (optinfo_wants_inlining_info_p): Likewise.
2406 * optinfo.h: Update comment.
2407 * profile-count.c (profile_quality_as_string): New function.
2408 * profile-count.h (profile_quality_as_string): New decl.
2409 (profile_count::quality): New accessor.
2410 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2411 and optinfo_emit_json_cc_tests.
2412 * selftest.h (selftest::json_cc_tests): New decl.
2413 (selftest::optinfo_emit_json_cc_tests): New decl.
2414 * toplev.c: Include "optinfo-emit-json.h".
2415 (compile_file): Call optimization_records_finish.
2416 (do_compile): Call optimization_records_start.
2417 * tree-ssa-live.c: Include optinfo.h.
2418 (remove_unused_scope_block_p): Retain inlining information if
2419 optinfo_wants_inlining_info_p returns true.
2421 2018-07-20 Richard Biener <rguenther@suse.de>
2424 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2425 to cover -flto-partition=none.
2427 2018-07-20 Martin Liska <mliska@suse.cz>
2429 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2430 (get_decl_source_range): Remove unused function.
2432 2018-07-20 Richard Biener <rguenther@suse.de>
2434 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2435 (struct vn_phi_s): Likewise.
2436 (struct vn_reference_s): Likewise.
2437 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2438 for searching the slot of an entry known to be in the hash itself.
2439 (vn_phi_hasher::equal): Likewise.
2440 (vn_reference_hasher::equal): Likewise.
2441 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2443 (optimistic_info, current_info): Remove, keeping only valid_info.
2444 (vn_reference_lookup_1): Remove fallback lookup.
2445 (vn_reference_lookup_2): Likewise.
2446 (vn_nary_op_lookup_1): Likewise.
2447 (vn_phi_lookup): Likewise.
2448 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2450 (vn_reference_insert): Adjust, chain the inserted hash element
2451 at last_inserted_ref.
2452 (vn_reference_insert_pieces): Likewise.
2453 (visit_reference_op_call): Likewise.
2454 (vn_nary_op_insert_into): Chain the inserted hash element at
2456 (vn_nary_op_insert_pieces): Adjust.
2457 (vn_nary_op_insert): Likewise.
2458 (vn_nary_op_insert_stmt): Likewise.
2459 (vn_phi_insert): Adjust, chain the inserted hash element at
2461 (process_scc): Remove clearing and copying the optimistic
2462 table. Instead remove elements inserted during an optimistic
2463 iteration from the single table we maintain.
2464 (init_scc_vn): Adjust.
2465 (free_scc_vn): Likewise.
2466 (sccvn_dom_walker::record_cond): Likewise.
2467 (sccvn_dom_walker::after_dom_children): Likewise.
2469 2018-07-19 Martin Sebor <msebor@redhat.com>
2471 PR tree-optimization/84047
2472 PR tree-optimization/83776
2473 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2474 (check_array_bounds): Call it.
2476 2018-07-19 Martin Sebor <msebor@redhat.com>
2478 * align.h (align_flags): Use member initialization.
2480 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2482 * Makefile.in (OBJS): Add optinfo.o.
2483 * coretypes.h (class symtab_node): New forward decl.
2484 (struct cgraph_node): New forward decl.
2485 (class varpool_node): New forward decl.
2486 * dump-context.h: New file.
2487 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2489 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2490 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2491 (set_alt_dump_file): Likewise.
2492 (dump_context::~dump_context): New dtor.
2493 (dump_gimple_stmt): Move implementation to...
2494 (dump_context::dump_gimple_stmt): ...this new member function.
2495 Add the stmt to any pending optinfo, creating one if need be.
2496 (dump_gimple_stmt_loc): Move implementation to...
2497 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2498 Start a new optinfo and add the stmt to it.
2499 (dump_gimple_expr): Move implementation to...
2500 (dump_context::dump_gimple_expr): ...this new member function.
2501 Add the stmt to any pending optinfo, creating one if need be.
2502 (dump_gimple_expr_loc): Move implementation to...
2503 (dump_context::dump_gimple_expr_loc): ...this new member function.
2504 Start a new optinfo and add the stmt to it.
2505 (dump_generic_expr): Move implementation to...
2506 (dump_context::dump_generic_expr): ...this new member function.
2507 Add the tree to any pending optinfo, creating one if need be.
2508 (dump_generic_expr_loc): Move implementation to...
2509 (dump_context::dump_generic_expr_loc): ...this new member
2510 function. Add the tree to any pending optinfo, creating one if
2512 (dump_printf): Move implementation to...
2513 (dump_context::dump_printf_va): ...this new member function. Add
2514 the text to any pending optinfo, creating one if need be.
2515 (dump_printf_loc): Move implementation to...
2516 (dump_context::dump_printf_loc_va): ...this new member function.
2517 Start a new optinfo and add the stmt to it.
2518 (dump_dec): Move implementation to...
2519 (dump_context::dump_dec): ...this new member function. Add the
2520 value to any pending optinfo, creating one if need be.
2521 (dump_context::dump_symtab_node): New member function.
2522 (dump_context::get_scope_depth): New member function.
2523 (dump_context::begin_scope): New member function.
2524 (dump_context::end_scope): New member function.
2525 (dump_context::ensure_pending_optinfo): New member function.
2526 (dump_context::begin_next_optinfo): New member function.
2527 (dump_context::end_any_optinfo): New member function.
2528 (dump_context::s_current): New global.
2529 (dump_context::s_default): New global.
2530 (dump_scope_depth): Delete global.
2531 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2532 (dump_symtab_node): New function.
2533 (get_dump_scope_depth): Reimplement in terms of dump_context.
2534 (dump_begin_scope): Likewise.
2535 (dump_end_scope): Likewise.
2536 (selftest::temp_dump_context::temp_dump_context): New ctor.
2537 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2538 (selftest::verify_item): New function.
2539 (ASSERT_IS_TEXT): New macro.
2540 (ASSERT_IS_TREE): New macro.
2541 (ASSERT_IS_GIMPLE): New macro.
2542 (selftest::test_capture_of_dump_calls): New test.
2543 (selftest::dumpfile_c_tests): Call it.
2544 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2545 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2546 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2547 descriptive comment.
2548 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2549 (dump_node, dump_bb): Move these unrelated decls.
2550 (class dump_manager): Add leading comment.
2551 * optinfo.cc: New file.
2552 * optinfo.h: New file.
2554 2018-07-19 Michael Collison <michael.collison@arm.com>
2555 Richard Henderson <rth@redhat.com>
2557 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2558 (subti): Handle op1 zero.
2559 (subvti4, usub4ti4): New.
2560 (*sub<GPI>3_compare1_imm): New.
2561 (sub<GPI>3_carryinCV): New.
2562 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2563 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2565 2018-07-19 Michael Collison <michael.collison@arm.com>
2566 Richard Henderson <rth@redhat.com>
2568 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2569 (addti3): Create simpler code if low part is already known to be 0.
2570 (addvti4, uaddvti4): New.
2571 (*add<GPI>3_compareC_cconly_imm): New.
2572 (*add<GPI>3_compareC_cconly): New.
2573 (*add<GPI>3_compareC_imm): New.
2574 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2575 handle constants within this pattern..
2576 (*add<GPI>3_compareV_cconly_imm): New.
2577 (*add<GPI>3_compareV_cconly): New.
2578 (*add<GPI>3_compareV_imm): New.
2579 (add<GPI>3_compareV): New.
2580 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2581 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2582 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2583 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2584 with 'comparison' operator.
2585 (*add<GPI>3_compareV_cconly_imm): Ditto.
2586 (*add<GPI>3_compareV_cconly): Ditto.
2587 (*add<GPI>3_compareV_imm): Ditto.
2588 (add<GPI>3_compareV): Ditto.
2589 (add<mode>3_carryinC): Ditto.
2590 (*add<mode>3_carryinC_zero): Ditto.
2591 (*add<mode>3_carryinC): Ditto.
2592 (add<mode>3_carryinV): Ditto.
2593 (*add<mode>3_carryinV_zero): Ditto.
2594 (*add<mode>3_carryinV): Ditto.
2596 2018-07-19 Michael Collison <michael.collison@arm.com>
2597 Richard Henderson <rth@redhat.com>
2599 * config/aarch64/aarch64-modes.def (CC_V): New.
2600 * config/aarch64/aarch64-protos.h
2601 (aarch64_addti_scratch_regs): Declare
2602 (aarch64_subvti_scratch_regs): Declare.
2603 (aarch64_expand_subvti): Declare.
2604 (aarch64_gen_unlikely_cbranch): Declare
2605 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2606 for signed overflow using CC_Vmode.
2607 (aarch64_get_condition_code_1): Handle CC_Vmode.
2608 (aarch64_gen_unlikely_cbranch): New function.
2609 (aarch64_addti_scratch_regs): New function.
2610 (aarch64_subvti_scratch_regs): New function.
2611 (aarch64_expand_subvti): New function.
2613 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2615 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2617 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2618 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2621 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2624 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2625 address check not strict.
2627 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2629 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2631 (store_pair_lanes<mode>): Likewise.
2632 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2633 enum value 'ADDR_QUERY_LDP_STP_N'.
2634 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2635 (aarch64_print_address_internal): Add declaration.
2636 (aarch64_print_ldpstp_address): Remove.
2637 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2638 (aarch64_print_operand): Change printing of 'y'.
2639 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2640 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2641 'true' rather than '1'.
2642 * config/aarch64/constraints.md (Uml): Likewise.
2643 (Uml): Rename to Umn.
2646 2018-07-19 Richard Biener <rguenther@suse.de>
2648 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2650 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2651 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2652 (vn_reference_hasher): Likewise.
2653 (struct vn_tables_s): Remove obstack and alloc-pool members.
2654 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2655 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2656 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2657 (vn_reference_insert_pieces): Likewise.
2658 (alloc_vn_nary_op_noinit): Adjust.
2659 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2660 (vn_phi_eq): Adjust.
2661 (shared_lookup_phiargs): Remove.
2662 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2663 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2664 (visit_reference_op_call): Likewise.
2665 (copy_nary, copy_phi, copy_reference): Remove.
2666 (process_scc): Rewind the obstack when iterating. Do not
2667 copy the elements to valid_info but just move them from one
2668 hashtable to the other.
2669 (allocate_vn_table): Adjust.
2670 (free_vn_table): Likewise.
2671 (init_scc_vn): Likewise.
2672 (free_scc_vn): Likewise.
2674 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2677 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2678 indirect_return as function type attribute.
2679 (ix86_attribute_table): Change indirect_return to function
2681 * doc/extend.texi: Update indirect_return attribute.
2683 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2685 * wide-int.h (widest2_int): New.
2686 * gimple-fold.c (arith_overflowed_p): Use it.
2687 * tree.h (widest2_int_cst): New.
2688 * tree-vrp.c (wide_int_binop_overflow): Rename from
2689 vrp_int_const_binop.
2690 Rewrite to work on trees.
2691 (extract_range_from_multiplicative_op_1): Abstract code to...
2692 (wide_int_range_min_max): ...here.
2693 (wide_int_range_cross_product): ...and here.
2694 (extract_range_from_binary_expr_1): Abstract overflow code to...
2695 (wide_int_range_mult_wrapping): ...here.
2696 * tree-vrp.h (wide_int_range_cross_product): New.
2697 (wide_int_range_mult_wrapping): New.
2699 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2700 Julia Koval <julia.koval@intel.com>
2702 * config/i386/x86-tune-costs.h (skylake_memcpy,
2703 skylake_memset): Replace rep_prefix with unrolling for size 512.
2705 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2708 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2711 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2713 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2714 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2715 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2716 previously known as "PowerPC AltiVec Built-in Functions". Move
2717 some material to new subsubsections "PowerPC AltiVec Built-in
2718 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2720 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2721 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2722 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2723 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2725 2018-07-18 Richard Biener <rguenther@suse.de>
2727 PR tree-optimization/86557
2728 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2731 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2733 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2735 2018-07-17 Jeff Law <law@redhat.com>
2737 * config/arm/arm.c (get_label_padding): Update for recent
2738 changes to label_to_alignment.
2740 PR tree-optimization/86010
2741 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2743 * config/mips/mips.c (vr4130_align_insns): Update for recent
2744 changes to label_to_alignment.
2746 * config/frv/frv.c (frv_label_align): Update for recent changes
2747 to label_to_alignment.
2749 * config/nios2/nios2.c (nios2_label_align): Update for recent
2750 changes which dropped ALIGN_LABELS_LOG.
2752 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2754 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2755 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2757 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2759 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2760 deprecated align_labels_log.
2762 2018-07-17 Richard Biener <rguenther@suse.de>
2765 * dwarf2out.c (init_sections_and_labels): Always generate
2766 a debug_line_str_section for early LTO debug.
2767 (dwarf2out_finish): Reset debug_line_str_hash output early.
2768 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2770 (dwarf2out_early_finish): Output debug_line_str.
2772 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2774 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2775 index register on z196 or later.
2777 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2779 * config/s390/s390.c (s390_default_align): Set default function
2781 (s390_override_options_after_change): Call s390_default align.
2782 (s390_option_override_internal): Call s390_default_align.
2783 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2785 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2788 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2789 to _looptemp_ clauses, other than the first two.
2791 2018-07-17 Martin Liska <mliska@suse.cz>
2793 * opts.c: Do not enable OPT_falign_* for -Os.
2795 2018-07-17 Martin Liska <mliska@suse.cz>
2797 * align.h (MAX_CODE_ALIGN): New.
2798 (MAX_CODE_ALIGN_VALUE): New.
2799 * common/config/i386/i386-common.c (ix86_handle_option):
2800 (MAX_CODE_ALIGN): Moved to align.h.
2801 * final.c (MAX_CODE_ALIGN): Likewise.
2802 * opts.c (parse_and_check_align_values):
2803 (MAX_CODE_ALIGN): Likewise.
2804 (MAX_CODE_ALIGN_VALUE): Likewise.
2806 2018-07-17 Martin Liska <mliska@suse.cz>
2808 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2809 in order to fulfil coding style.
2810 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2811 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2812 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2813 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2814 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2815 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2816 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2817 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2818 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2820 2018-07-17 Martin Liska <mliska@suse.cz>
2822 * align.h: New file.
2823 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2824 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2825 align_flags of label_to_alignment.
2826 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2828 * config/m68k/m68k.c: Do not use removed align_labels_value and
2830 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2831 (LOOP_ALIGN): Likewise.
2832 (LABEL_ALIGN): Likewise.
2833 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2834 Remove not used macro.
2835 (rs6000_loop_align): Change return type to align_flags.
2836 (rs6000_loop_align_max_skip): Remove.
2837 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2838 Change return type to align_flags.
2839 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2840 Remove not used macro.
2841 (rs6000_loop_align): Change return type to align_flags.
2842 (rs6000_loop_align_max_skip): Remove.
2843 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2844 * config/rx/rx-protos.h (rx_align_for_label): Make it
2846 * config/rx/rx.c (rx_align_for_label): Change return type
2848 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2850 into align_flags class.
2851 (LABEL_ALIGN): Likewise.
2852 (LOOP_ALIGN): Likewise.
2853 * config/s390/s390.c (s390_label_align): Use align_flags
2855 (s390_asm_output_function_label): Likewise.
2856 * config/sh/sh.c (sh_override_options_after_change):
2857 Use align_flags class directly without macros.
2858 (find_barrier): Likewise.
2859 (barrier_align): Likewise.
2860 (sh_loop_align): Likewise.
2861 * config/spu/spu.c (spu_option_override):
2862 Use align_flags_tuple::get_value instead of removed macros.
2863 (spu_sched_init): Likewise.
2864 * config/spu/spu.h (GTY): Likewise.
2865 * config/visium/visium.c (visium_option_override):
2866 Set "8" as default secondary alignment.
2867 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2868 in order to guarantee secondary alignment of 8.
2869 * coretypes.h: Include align.h header file.
2870 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2871 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2872 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2873 * doc/tm.texi.in: Likewise.
2874 * final.c (struct label_alignment): Remove not used structure.
2875 (LABEL_ALIGN): Change type to align_flags.
2876 (LOOP_ALIGN): Likewise.
2877 (JUMP_ALIGN): Likewise.
2878 (default_loop_align_max_skip): Remove.
2879 (default_label_align_max_skip): Likewise.
2880 (default_jump_align_max_skip): Likewise.
2881 (default_label_align_after_barrier_max_skip):
2882 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2883 (LABEL_TO_MAX_SKIP): Remove.
2884 (label_to_alignment): Return align_flags type instead of integer.
2885 (label_to_max_skip): Remove.
2886 (align_fuzz): Use align_flags type.
2887 (compute_alignments): Use align_flags type and use align_flags::max
2888 to combine multiple alignments.
2889 (grow_label_align): Grow vec instead of C array.
2890 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2891 (shorten_branches): Use align_flags type and use align_flags::max
2892 to combine multiple alignments.
2893 (final_scan_insn_1): Remove usage of secondary alignment that comes
2894 from label alignment, but instead use proper secondary alignment
2895 which is computed in grow_label_align.
2896 * flags.h (struct align_flags_tuple): Move to align.h.
2897 (struct align_flags): Likewise.
2898 (state_align_loops): Rename to align_loops.
2899 (state_align_jumps): Rename to align_jumps.
2900 (state_align_labels): Rename to align_labels.
2901 (state_align_functions): Rename to align_functions.
2902 (align_loops_log): Remove.
2903 (align_jumps_log): Remove.
2904 (align_labels_log): Remove.
2905 (align_functions_log): Remove.
2906 (align_loops_max_skip): Remove.
2907 (align_jumps_max_skip): Remove.
2908 (align_labels_max_skip): Remove.
2909 (align_functions_max_skip): Remove.
2910 (align_loops_value): Remove.
2911 (align_jumps_value): Remove.
2912 (align_labels_value): Remove.
2913 (align_functions_value): Remove.
2914 * output.h (label_to_alignment): Change return type to align_flags.
2915 (label_to_max_skip): Remove.
2916 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2917 jump_align_max_skip macros.
2918 * targhooks.h (default_loop_align_max_skip): Remove.
2919 (default_label_align_max_skip): Likewise.
2920 (default_jump_align_max_skip): Likewise.
2921 (default_label_align_after_barrier_max_skip): Remove.
2922 * toplev.c (read_log_maxskip): Use ::normalize function.
2923 (parse_N_M): Remove not used argument and also call ::normalize.
2924 (parse_alignment_opts): Do not pass unused arguments.
2925 * varasm.c (assemble_start_function): Use directly align_functions
2926 instead of removed macros.
2927 * system.h: Do not poison removed macros.
2929 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2932 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2933 and cond temporaries don't have reference type if iterator has
2934 pointer type. For init use &for_pre_body instead of pre_p if
2935 for_pre_body is non-empty.
2937 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2939 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2940 double-double modes to SFmode directly directly.
2941 (trunc<mode>sf2_fprs): Delete.
2943 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2945 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2946 for conversions between IFmode and the decimal floating point modes.
2947 (init_float128_ieee): Use the correct names for conversions between
2948 KFmode and the decimal floating point modes.
2950 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2952 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2953 for the conversions between TDmode and IFmode.
2954 (init_float128_ieee): Use more correct names for the conversions
2955 between TDmode and KFmode.
2957 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2959 PR tree-optimization/86526
2960 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2961 (inline_expand_builtin_string_cmp): Likewise.
2962 (inline_string_cmp): Likewise. Use c_readstr instead of
2963 builtin_memcpy_read_str. Add unit_mode temporary.
2965 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2968 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2969 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2971 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2973 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2974 Alphabetize prototypes of built-in functions, separating out
2975 built-in functions that are listed in this section but should be
2976 described elsewhere.
2978 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2981 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2982 conditional move when trapping comparison was split to a
2983 non-trapping one (and vice versa).
2985 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2987 * config/s390/s390.c (s390_function_profiler): Generate nops
2988 instead of profiler call sequences.
2989 * config/s390/s390.opt: Add the new option.
2991 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2993 * config/s390/s390.c (s390_function_profiler): Generate
2994 __mcount_loc section.
2995 * config/s390/s390.opt: Add the new option.
2997 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2999 * common.opt: Add the new warning.
3000 * config/s390/s390.c (s390_function_profiler): Emit "brasl
3001 %r0,__fentry__" when -mfentry is specified.
3002 (s390_option_override_internal): Disallow -mfentry for 31-bit
3004 * config/s390/s390.opt: Add the new option.
3006 2018-07-16 Richard Biener <rguenther@suse.de>
3009 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3010 for function-local FUNCTION_DECL and RESULT_DECL immediately.
3012 2018-07-16 Martin Liska <mliska@suse.cz>
3015 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3018 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3020 * config/arc/arcHS.md: Update ARCHS scheduling rules.
3022 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3024 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3026 * config/arc/arc-cpus.def (hs4x): New cpu.
3028 * config/arc/arc-tables.opt: Regenerate.
3029 * config/arc/arc.c (arc_sched_issue_rate): New function.
3030 (TARGET_SCHED_ISSUE_RATE): Define.
3031 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3032 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3034 (attr tune): Add ARCHS4x tune values.
3035 (attr tune_dspmpy): Define.
3036 (*tst): Correct instruction type.
3037 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3038 * config/arc/arcHS4x.md: New file.
3039 * config/arc/fpu.md: Update instruction type attributes.
3040 * config/arc/t-multilib: Regenerate.
3042 2018-07-16 Tom de Vries <tdevries@suse.de>
3045 * var-tracking.c (vt_initialize): Fix pre_dec handling.
3047 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3049 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3052 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3054 PR tree-optimization/86514
3055 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3056 conversion to a boolean type from a type with greater precision.
3058 2018-07-16 Tom de Vries <tdevries@suse.de>
3060 * var-tracking.c (vt_initialize): Print adjusted insn slim if
3061 dump_flags request TDF_SLIM.
3063 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
3065 * fold-const.c (int_const_binop_1): Abstract...
3066 (wide_int_binop): ...wide int code here.
3067 (poly_int_binop): ...poly int code here.
3068 Abstract the rest of int_const_binop_1 into int_const_binop.
3069 * fold-const.h (wide_int_binop): New.
3070 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3071 Remove useless PLUS/MINUS_EXPR case.
3072 (zero_nonzero_bits_from_vr): Move wide int code...
3073 (zero_nonzero_bits_from_bounds): ...here.
3074 (extract_range_from_binary_expr_1): Move mask optimization code...
3075 (range_easy_mask_min_max): ...here.
3076 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3077 (range_easy_mask_min_max): New.
3079 2018-07-15 Jeff Law <law@redhat.com>
3082 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3085 2018-07-14 Jim Wilson <jimw@sifive.com>
3087 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3089 2018-07-14 Paul Koning <ni1d@arrl.net>
3091 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3093 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
3095 * lto-streamer-out.c (copy_function_or_variable): Dump info about
3098 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3099 Steve Munroe <munroesj52@gmail.com>
3101 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3102 (_mm_andnot_si128): Likewise.
3103 (_mm_or_si128): Likewise.
3104 (_mm_xor_si128): Likewise.
3106 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
3109 * builtins.c (expand_builtin_memcmp): Inline the calls first
3110 when result_eq is false.
3111 (expand_builtin_strcmp): Inline the calls first.
3112 (expand_builtin_strncmp): Likewise.
3113 (inline_string_cmp): New routine. Expand a string compare
3114 call by using a sequence of char comparison.
3115 (inline_expand_builtin_string_cmp): New routine. Inline expansion
3116 a call to str(n)cmp/memcmp.
3117 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3119 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3121 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
3123 * config/arm/driver-arm.c: Include arm-native.h.
3124 (host_detect_local_cpu): Use auto-generated data tables.
3125 (vendors, arm_cpu_table): Delete. Move part information to ...
3126 * config/arm/arm-cpus.in: ... here.
3127 * config/arm/parsecpu.awk (gen_native): New function.
3128 (vendor, part): New CPU fields.
3129 (END): Add support for building the native CPU detection tables.
3130 * config/arm/t-arm (arm-native.h): Add build rule.
3131 (driver-arm.o): Add dependency on arm-native.h.
3133 2018-07-13 Richard Biener <rguenther@suse.de>
3136 * match.pd (addr1 - addr2): Allow either of the operand to
3139 2018-07-13 Tom de Vries <tdevries@suse.de>
3141 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3144 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
3146 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3147 arrays instead of numbered variables.
3149 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
3151 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3152 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3154 2018-07-13 Richard Biener <rguenther@suse.de>
3157 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3158 instead of get_context_die.
3160 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3161 Richard Biener <rguenther@suse.de>
3164 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3165 that the loop latch destination where phi is defined.
3167 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
3169 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3170 (riscv_expand_epilogue): Add assertion to check interrupt mode.
3171 (riscv_set_current_function): Extract getting interrupt type to new
3173 (riscv_get_interrupt_type): New function.
3174 (riscv_merge_decl_attributes): New function, checking interrupt type is
3176 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3178 2018-07-12 Paul Koning <ni1d@arrl.net>
3180 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3183 2018-07-12 Paul Koning <ni1d@arrl.net>
3185 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3186 zero reference, add doloop_end instead.
3187 * doc/md.texi (decrement_and_branch_until_zero): Remove.
3188 (Looping patterns): Remove decrement_and_branch_until_zero. Add
3189 detail for doloop_end.
3191 2018-07-12 Martin Sebor <msebor@redhat.com>
3194 * attribs.c (decl_attributes): Reject conflicting attributes before
3195 calling attribute handlers.
3197 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3199 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3201 (gcc::dump_manager::get_dump_file_name): likewise.
3202 (dump_begin): Likewise.
3203 * dumpfile.h (dump_begin): Update prototype.
3204 (gcc::dump_manager::get_dump_file_name,
3205 gcc::dump_manager::get_dump_file_name): Update prototype.
3207 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3209 * internal-fn.h (vectorizable_internal_fn_p): New function.
3210 * tree-vect-slp.c (compatible_calls_p): Likewise.
3211 (vect_build_slp_tree_1): Remove nops argument. Handle calls
3212 to internal functions.
3213 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3215 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3217 * fold-const.h (inverse_conditions_p): Declare.
3218 * fold-const.c (inverse_conditions_p): New function.
3219 * match.pd: Use inverse_conditions_p. Add folds of view_converts
3220 that test the inverse condition of a conditional internal function.
3221 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3222 * internal-fn.c (internal_fn_mask_index): Handle conditional
3224 (vectorized_internal_fn_supported_p): New function.
3225 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3226 (any_pred_load_store): Replace with...
3227 (need_to_predicate): ...this new variable.
3228 (redundant_ssa_names): New variable.
3229 (ifcvt_can_use_mask_load_store): Move initial checks to...
3230 (ifcvt_can_predicate): ...this new function. Handle tree codes
3231 for which a conditional internal function exists.
3232 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3233 instead of ifcvt_can_use_mask_load_store. Update after variable
3235 (predicate_load_or_store): New function, split out from
3236 predicate_mem_writes.
3237 (check_redundant_cond_expr): New function.
3238 (value_available_p): Likewise.
3239 (predicate_rhs_code): Likewise.
3240 (predicate_mem_writes): Rename to...
3241 (predicate_statements): ...this. Use predicate_load_or_store
3242 and predicate_rhs_code.
3243 (combine_blocks, tree_if_conversion): Update after above name changes.
3244 (ifcvt_local_dce): Handle redundant_ssa_names.
3245 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3246 general conditional functions.
3247 * tree-vect-stmts.c (vectorizable_call): Likewise.
3249 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3250 Alan Hayward <alan.hayward@arm.com>
3251 David Sherwood <david.sherwood@arm.com>
3253 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3254 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3255 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3256 plus and minus and convert them into IFN_COND_FMA-based sequences.
3257 (convert_mult_to_fma): Handle conditional plus and minus.
3259 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3261 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3262 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3263 (cond_fnms_optab): New optabs.
3264 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3266 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3267 * internal-fn.h (get_conditional_internal_fn): Declare.
3268 (get_unconditional_internal_fn): Likewise.
3269 * internal-fn.c (cond_ternary_direct): New macro.
3270 (expand_cond_ternary_optab_fn): Likewise.
3271 (direct_cond_ternary_optab_supported_p): Likewise.
3272 (FOR_EACH_COND_FN_PAIR): Likewise.
3273 (get_conditional_internal_fn): New function.
3274 (get_unconditional_internal_fn): Likewise.
3275 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3276 (gimple_match_op::gimple_match_op): Add a new overload for 5
3278 (gimple_match_op::set_op): Likewise.
3279 (gimple_resimplify5): Declare.
3280 * genmatch.c (decision_tree::gen): Generate simplifications for
3282 * gimple-match-head.c (gimple_simplify): Define an overload for
3283 5 operands. Handle calls with 5 arguments in the top-level overload.
3284 (convert_conditional_op): Handle conversions from unconditional
3285 internal functions to conditional ones.
3286 (gimple_resimplify5): New function.
3287 (build_call_internal): Pass a fifth operand.
3288 (maybe_push_res_to_seq): Likewise.
3289 (try_conditional_simplification): Try converting conditional
3290 internal functions to unconditional internal functions.
3291 Handle 3-operand unconditional forms.
3292 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3293 Define ternary equivalents of the current rules for binary conditional
3295 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3297 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3298 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3299 (optab): Handle them.
3300 (SVE_COND_FP_TERNARY): New int iterator.
3301 (sve_fmla_op, sve_fmad_op): New int attributes.
3302 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3303 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3304 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3306 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3308 * target.def (preferred_else_value): New target hook.
3309 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3310 * doc/tm.texi: Regenerate.
3311 * targhooks.h (default_preferred_else_value): Declare.
3312 * targhooks.c (default_preferred_else_value): New function.
3313 * internal-fn.h (conditional_internal_fn_code): Declare.
3314 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3315 (get_conditional_internal_fn): Use it.
3316 (conditional_internal_fn_code): New function.
3317 * gimple-match.h (gimple_match_cond): New struct.
3318 (gimple_match_op): Add a cond member function.
3319 (gimple_match_op::gimple_match_op): Update all forms to take a
3321 * genmatch.c (expr::gen_transform): Use the same condition as res_op
3322 for the suboperation, but don't specify a particular else_value.
3323 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3324 (visit_nary_op, visit_reference_op_load): Pass
3325 gimple_match_cond::UNCOND to the gimple_match_op constructor.
3326 * gimple-match-head.c: Include tree-eh.h
3327 (convert_conditional_op): New function.
3328 (maybe_resimplify_conditional_op): Likewise.
3329 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3330 (gimple_resimplify2): Likewise.
3331 (gimple_resimplify3): Likewise.
3332 (gimple_resimplify4): Likewise.
3333 (maybe_push_res_to_seq): Return null for conditional operations.
3334 (try_conditional_simplification): New function.
3335 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
3337 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3339 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3341 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3343 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3345 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3347 (hash_tree): Do not hash DECL_FCONTEXT
3348 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3349 Do not stream DECL_FCONTEXT.
3350 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3351 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3353 2018-07-12 Richard Biener <rguenther@suse.de>
3356 * dwarf2out.c (gen_block_die): Only output blocks when they have
3357 at least one !DECL_IGNORED_P variable.
3359 2018-07-12 Richard Biener <rguenther@suse.de>
3362 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3363 Remove -mieee-fp handling.
3365 2018-07-12 Richard Biener <rguenther@suse.de>
3367 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3368 left-over from last patch.
3370 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3372 PR tree-optimization/86492
3373 * gimple-ssa-store-merging.c
3374 (imm_store_chain_info::coalesce_immediate_stores): Call
3375 check_no_overlap even for the merge_overlapping case. Formatting fix.
3377 2018-07-12 Richard Biener <rguenther@suse.de>
3380 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3381 move possibly trapping operations into the conditional.
3383 2018-07-12 Richard Biener <rguenther@suse.de>
3385 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3386 (vn_lookup_simplify_result): Remove recursion limit applied
3388 (vn_nary_build_or_lookup_1): Adjust.
3389 (try_to_simplify): Likewise.
3390 * gimple-match-head.c (gimple_resimplify1): Instead apply one
3392 (gimple_resimplify2): Likewise.
3393 (gimple_resimplify3): Likewise.
3394 (gimple_resimplify4): Likewise.
3396 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3398 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3399 Use __mmask64 type instead of __mmask8 for __M argument.
3400 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3401 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3403 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3404 __mmask16 for __M argument.
3405 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3406 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3407 to __mmask16 instead of __mmask8.
3408 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3409 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3410 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3411 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3412 instead of __mmask16 for __U argument.
3413 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3414 __mmask16 instead of __mmask8 for __U argument.
3415 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3417 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3419 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3421 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3423 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3425 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3427 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3429 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3431 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3433 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3435 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3436 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3437 return type as well as __M argument type and all casts from __mmask8
3439 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3440 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3441 return type as well as __M argument type and all casts from __mmask8
3443 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3444 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3445 return type as well as __M argument type and all casts from __mmask8
3447 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3448 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3449 return type as well as __M argument type and all casts from __mmask8
3451 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3452 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3455 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3457 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3458 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3461 2018-07-11 Paul Koning <ni1d@arrl.net>
3463 * doc/md.texi (define_subst): Document how multiple occurrences of
3464 the same argument in the replacement pattern are handled.
3466 2018-07-11 Paul Koning <ni1d@arrl.net>
3468 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3470 (Common Type Attributes): Add "mode" attribute.
3472 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3474 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3475 stream DECL_ORIGINAL_TYPE.
3476 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3477 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3478 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3479 Do not walk original type.
3480 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3482 (write_ts_decl_non_common_tree_pointers): Do not stream
3484 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3485 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3487 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3489 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3490 thread twice from the same starting edge.
3492 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3494 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3495 * gimple.c (gimple_call_nonnull_result_p): ...here...
3496 (gimple_call_nonnull_arg): ...and here.
3497 * gimple.h (gimple_call_nonnull_result_p): New.
3498 (gimple_call_nonnull_arg): New.
3500 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3502 * config/arm/arm-cpus.in: Move information from fpu field of each
3503 cpu definition to the isa field.
3504 * config/arm/parsecpu.awk (fpu): Delete match rule.
3505 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3507 2018-07-11 Richard Biener <rguenther@suse.de>
3510 * dwarf2out.c (init_sections_and_labels): Use
3511 output_asm_line_debug_info consistently.
3512 (dwarf2out_early_finish): Likewise.
3513 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3516 2018-07-11 Richard Biener <rguenther@suse.de>
3518 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3519 Rework father_bb setting in a way to avoid propagating constants
3520 multiple times on a loop body.
3522 2018-07-10 Mark Wielaard <mark@klomp.org>
3525 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3527 2018-07-10 Richard Biener <rguenther@suse.de>
3529 * hash-map.h (hash_map::iterator::operator*): Return
3530 references to key and value.
3532 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3535 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3536 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3537 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3538 (gimplify_omp_for): For composite loops, move outer
3539 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3540 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3541 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3542 TREE_LIST for both the original class iterator and the "last" helper
3543 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3544 loop, remember has_decl_expr from outer composite loops for the
3545 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3547 2018-07-09 Martin Sebor <msebor@redhat.com>
3551 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3552 accessing implicitly initialized array elements.
3553 * expr.c (string_constant): Handle string initializers of
3554 character arrays within aggregates.
3555 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3556 Store element offset. As a special case, handle zero size.
3557 (fold_nonarray_ctor_reference): Same.
3558 (fold_ctor_reference): Add argument. Store subobject offset.
3559 * gimple-fold.h (fold_ctor_reference): Add argument.
3561 2018-07-09 Paul Koning <ni1d@arrl.net>
3563 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3564 (pdp11_insn_cost): New function.
3565 (pdp11_md_asm_adjust): New function.
3566 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3567 (pdp11_rtx_costs): Update to match machine better.
3568 (output_addr_const_pdp11): Correct format mismatch warnings.
3569 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3570 * config/pdp11/pdp11.md: General change to add base_cost and/or
3571 length attributes for use by new pdp11_insn_cost function.
3572 (MIN_BRANCH): Correct definition.
3574 (doloop_end): Use standard pattern name for looping pattern.
3575 (doloop_end_nocc): New.
3576 (movsf): Add another constraint alternative.
3577 (zero_extendqihi2): Add constraint alternatives for not in place
3579 (zero_extendhisi2): Remove.
3580 (shift patterns): Add CC handling variants.
3584 (define_peephole2): New peephole to recognize mov that sets CC for
3587 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3589 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3590 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3593 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3596 * real.c (real_nextafter): Return true if result is denormal.
3598 2018-07-09 Martin Liska <mliska@suse.cz>
3600 * common.opt: Add back wrongly removed attribute.
3602 2018-07-09 Richard Biener <rguenther@suse.de>
3605 * dwarf2out.c (gen_block_die): For an early generated DIE
3606 always output high/low PC attributes.
3608 2018-07-09 Tom de Vries <tdevries@suse.de>
3610 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3611 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3612 onto VAR_DECL with abstract origin.
3614 2018-07-07 Jim Wilson <jimw@sifive.com>
3616 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3618 2018-07-07 Tom de Vries <tdevries@suse.de>
3620 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3622 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3624 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3626 (combine_bound): Use wide-int overflow calculation instead of
3628 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3630 * fold-const.c (int_const_binop_2): Same.
3631 (extract_muldiv_1): Same.
3632 (fold_div_compare): Same.
3633 (fold_abs_const): Same.
3635 * poly-int.h (add): Same.
3639 * predict.c (predict_iv_comparison): Same.
3640 * profile-count.c (slow_safe_scale_64bit): Same.
3641 * simplify-rtx.c (simplify_const_binary_operation): Same.
3642 * tree-chrec.c (tree_fold_binomial): Same.
3643 * tree-data-ref.c (split_constant_offset_1): Same.
3644 * tree-if-conv.c (idx_within_array_bound): Same.
3645 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3646 * tree-ssa-phiopt.c (minmax_replacement): Same.
3647 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3648 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3649 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3650 * wide-int.cc (wi::add_large): Same.
3651 (wi::mul_internal): Same.
3652 (wi::sub_large): Same.
3653 (wi::divmod_internal): Same.
3654 * wide-int.h: Change overflow type to overflow_type for neg, add,
3655 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3656 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3657 mul_internal, divmod_internal.
3658 (overflow_type): New enum.
3659 (accumulate_overflow): New.
3661 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3663 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3664 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3666 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3668 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3669 argument is checked for zero before entering loop, avoid checking again.
3671 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3673 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3674 * gimplify.h (generic_expr_could_trap_p): Likwise.
3675 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3677 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3679 PR tree-optimization/86401
3680 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3681 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3682 (fold_bit_and_mask): ... here. New helper function for match.pd.
3683 * fold-const.h (fold_bit_and_mask): Declare.
3684 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3686 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3689 * target.def (translate_mode_attribute): New hook.
3690 * targhooks.h (default_translate_mode_attribute): Declare.
3691 * targhooks.c (default_translate_mode_attribute): New function.
3692 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3693 * doc/tm.texi: Regenerate.
3694 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3695 (rs6000_translate_mode_attribute): New function.
3697 2018-07-06 Paul Koning <ni1d@arrl.net>
3699 * doc/md.texi (define_split): Document DONE and FAIL.
3700 (define_peephole2): Ditto.
3702 2018-07-05 Jeff Law <law@redhat.com>
3704 PR tree-optimization/86010
3705 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3706 both the head and tail of mem* and str* calls.
3708 2018-07-05 Jim Wilson <jimw@sifive.com>
3710 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3712 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3714 * config/aarch64/aarch64-simd.md: correct flags text for
3715 MIN_EXPR replacement.
3717 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3719 * configure: Regenerated.
3721 2018-07-05 Carl Love <cel@us.ibm.com>
3723 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3724 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3725 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3726 VSX_BUILTIN_DOUBLEL_V4SF.
3728 2018-07-05 Martin Sebor <msebor@redhat.com>
3731 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3732 than its domain to compute its the upper bound of a char array.
3734 2018-07-05 Nathan Sidwell <nathan@acm.org>
3736 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3737 * doc/cpp.texi: Update comment.
3738 * doc/tm.texi: Rebuilt.
3739 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3740 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3741 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3742 headers affected by extern "C".
3743 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3744 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3745 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3746 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3747 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3748 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3749 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3750 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3751 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3752 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3753 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3754 config/sparc/sp64-elf.h, config/spu/spu.h,
3755 config/stormy16/stormy16.h, config/v850/v850.h,
3756 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3757 define NO_IMPLICIT_EXTERN_C.
3758 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3760 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3763 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3764 instead of GET_MODE_SIZE when comparing Units.
3766 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3769 * rtlanal.c (set_noop_p): Constrain on mode change,
3770 include hard-reg-set.h
3772 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3774 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3776 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3779 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3782 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3784 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3786 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3789 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3791 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3793 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3796 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3798 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3800 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3801 neg_*_op* variables.
3803 2018-07-04 Martin Liska <mliska@suse.cz>
3805 * tree-switch-conversion.c: Define
3806 max_ratio_for_speed and max_ratio_for_size constants.
3808 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3809 Martin Liska <mliska@suse.cz>
3814 * common.opt: Rename align options with 'str_' prefix.
3815 * common/config/i386/i386-common.c (set_malign_value): New
3817 (ix86_handle_option): Use it to set -falign-* options/
3818 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3819 type from int to string.
3820 * config/aarch64/aarch64.c: Update default values from int
3822 * config/alpha/alpha.c (alpha_override_options_after_change):
3824 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3825 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3826 max skip conditionally.
3827 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3828 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3829 max skip conditionally.
3830 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3831 max skip conditionally.
3832 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3833 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3834 max skip conditionally.
3835 * config/i386/i386.c (struct ptt): Change type from int to
3837 (ix86_default_align): Set default values.
3838 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3839 max skip conditionally.
3840 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3841 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3842 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3843 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3844 max skip conditionally.
3845 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3846 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3847 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3848 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3849 max skip conditionally.
3850 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3851 * config/ia64/ia64.c (ia64_option_override): Set default values
3852 for alignment options.
3853 * config/m68k/m68k.c: Handle new str_align_* options.
3854 * config/mips/mips.c (mips_set_compression_mode): Change
3856 (mips_option_override): Set default values for options.
3857 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3859 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3861 * config/rx/rx.c (rx_option_override): Likewise.
3862 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3863 (LABEL_ALIGN): Use align_labels_log.
3864 (LOOP_ALIGN): Use align_loops_align.
3865 * config/s390/s390.c (s390_asm_output_function_label): Use new
3867 * config/sh/sh.c (sh_override_options_after_change):
3868 Change type of constants.
3869 * config/spu/spu.c (spu_sched_init): Likewise.
3870 * config/sparc/sparc.c (sparc_option_override): Set default
3872 * config/visium/visium.c (visium_option_override): Likewise.
3873 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3874 emit p2align format with last argument if it's not needed.
3875 * doc/invoke.texi: Document extended format of -falign-*.
3876 * final.c: Use align_labels alignment.
3877 * flags.h (struct target_flag_state): Change type to use
3879 (struct align_flags_tuple): New.
3880 (struct align_flags): Likewise.
3881 (align_loops_log): Redefine macro to use new types.
3882 (align_loops_max_skip): Redefine macro to use new types.
3883 (align_jumps_log): Redefine macro to use new types.
3884 (align_jumps_max_skip): Redefine macro to use new types.
3885 (align_labels_log): Redefine macro to use new types.
3886 (align_labels_max_skip): Redefine macro to use new types.
3887 (align_functions_log): Redefine macro to use new types.
3888 (align_loops): Redefine macro to use new types.
3889 (align_jumps): Redefine macro to use new types.
3890 (align_labels): Redefine macro to use new types.
3891 (align_functions): Redefine macro to use new types.
3892 (align_functions_max_skip): Redefine macro to use new types.
3893 (align_loops_value): New macro.
3894 (align_jumps_value): New macro.
3895 (align_labels_value): New macro.
3896 (align_functions_value): New macro.
3897 * function.c (invoke_set_current_function_hook): Propagate
3898 alignment values from flags to global variables default in
3900 * ipa-icf.c (sem_function::equals_wpa): Use
3901 cl_optimization_option_eq instead of memcmp.
3902 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3904 (cl_optimization_stream_in): Likewise.
3905 * optc-save-gen.awk: Support strings in cl_optimization.
3906 * opth-gen.awk: Likewise.
3907 * opts.c (finish_options): Remove error checking of invalid
3909 (MAX_CODE_ALIGN): Remove.
3910 (MAX_CODE_ALIGN_VALUE): Likewise.
3911 (parse_and_check_align_values): New function.
3912 (check_alignment_argument): Likewise.
3913 (common_handle_option): Use check_alignment_argument.
3914 * opts.h (parse_and_check_align_values): Declare.
3915 * toplev.c (init_alignments): Remove.
3916 (read_log_maxskip): New.
3917 (parse_N_M): Likewise.
3918 (parse_alignment_opts): Likewise.
3919 (backend_init_target): Remove usage of init_alignments.
3920 * toplev.h (parse_alignment_opts): Declare.
3921 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3923 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3924 * tree.c (cl_option_hasher::equal): New.
3925 * varasm.c: Use new global macros.
3927 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3929 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3930 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3931 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3932 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3933 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3934 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3935 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3936 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3937 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3938 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3939 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3940 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3941 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3943 2018-07-04 Martin Liska <mliska@suse.cz>
3944 Jonathan Wakely <jwakely@redhat.com>
3946 * coverage.c: Use correct type.
3947 * doc/invoke.texi: Language correction.
3949 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3952 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3953 ENDBRANCH for non-tail call which may return via indirect branch.
3954 * doc/extend.texi: Document indirect_return attribute.
3956 2018-07-03 Martin Sebor <msebor@redhat.com>
3958 PR tree-optimization/86274
3959 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3961 (format_floating): Correct handling of infinities and NaNs.
3963 2018-07-03 Martin Sebor <msebor@redhat.com>
3965 * print-tree.c (print_real_cst): New function.
3966 (print_node_brief): Call it.
3967 (print_node): Ditto.
3969 2018-07-03 Jeff Law <law@redhat.com>
3971 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3972 into a single pattern.
3974 * config/h8300/h8300.md (ors code_iterator): New.
3975 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3976 a single pattern and single splitter.
3977 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3978 (iorqi3_1, xorqi3_1): Likewise.
3979 (iorqi3, xorqi3 expanders): Similarly.
3981 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3982 (movmd_internal) into a single pattern using the P mode iterator.
3983 (movmd splitters): Similarly.
3984 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3985 (movsd splitters): Similarly.
3987 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3988 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3989 right table based on the size of the operand.
3990 * config/h8300/h8300.md (length_table): Corresponding changes. All
3991 references to "addb", "addw" and "addl" changed to "add".
3992 (btst patterns): Merge two variants into a single pattern.
3993 (tstqi, tsthi): Likewise.
3994 (addhi3_incdec, addsi3_incdec): Likewise.
3995 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3996 (mulhi3, mulsi3): Likewise.
3997 (udivhi3, udivsi3): Likewise.
3998 (divhi3, divsi3): Likewise.
3999 (andorqi3, andorhi3, andorsi3): Likewise.
4001 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
4004 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4005 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4007 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4009 PR tree-optimization/85694
4010 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4011 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4013 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4014 (<u>avg<mode>3_ceil): New patterns.
4016 2018-07-03 David Malcolm <dmalcolm@redhat.com>
4018 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4019 scan-tree-dump directive.
4020 * gcc.dg/vect/slp-perm-2.c: Likewise.
4021 * gcc.dg/vect/slp-perm-3.c: Likewise.
4022 * gcc.dg/vect/slp-perm-5.c: Likewise.
4023 * gcc.dg/vect/slp-perm-6.c: Likewise.
4024 * gcc.dg/vect/slp-perm-7.c: Likewise.
4025 * gcc.dg/vect/slp-perm-8.c: Likewise.
4027 2018-07-03 Marek Polacek <polacek@redhat.com>
4030 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4032 2018-07-03 Richard Biener <rguenther@suse.de>
4035 * tree-ssa-structalias.c (find_func_clobbers): Properly
4036 handle indirect calls.
4038 2018-07-03 Jeff Law <law@redhat.com>
4040 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4041 (shifts): New code iterator.
4042 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4043 expander. Fix HImode handling on H8/SX.
4044 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4045 (subqi3, subhi3, subsi3 expanders): Likewise.
4046 (andqi3, andhi3, andsi3 expanders): Likewise.
4047 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4048 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4049 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4050 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4051 (zero_extendqihi2, zero_extendqisi2): Likewise.
4052 (extendqihi2, extendqisi2): Likewise.
4053 (rotlqi3, rotlhi3, rotlsi3): Likewise.
4054 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4055 (rotlqi3_1, rotlhi3_1): Likewise.
4056 (logicalhi3_sn, logicalsi3_sn): Likewise.
4057 (logicalhi3, logicalsi3): Likewise.
4059 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4061 * tree-vect-patterns.c (vect_recog_rotate_pattern)
4062 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4063 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4064 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4065 type to append_pattern_def_seq instead of creating a stmt_vec_info
4067 (build_mask_conversion): Likewise. Remove vinfo argument.
4068 (vect_add_conversion_to_patterm): Likewise, renaming to...
4069 (vect_add_conversion_to_pattern): ...this.
4070 (vect_recog_mask_conversion_pattern): Update call to
4071 build_mask_conversion. Pass the vector type to
4072 append_pattern_def_seq here too.
4073 (vect_recog_gather_scatter_pattern): Update call to
4074 vect_add_conversion_to_pattern.
4076 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4078 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4079 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4080 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4081 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4082 STMT_VINFO_PATTERN_DEF_SEQ to null here.
4083 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4084 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4085 append_pattern_def_seq instead of new_pattern_def_seq.
4086 (vect_recog_divmod_pattern): Do both of the above.
4087 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4090 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4092 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4093 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4094 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4095 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4096 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4097 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4098 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4099 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4100 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4101 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4102 parameter with a single stmt_vec_info.
4103 (vect_recog_func_ptr): Likewise.
4104 (vect_recog_gather_scatter_pattern): Likewise, folding in...
4105 (vect_try_gather_scatter_pattern): ...this.
4106 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4107 the stmt_vec_info of the statement to be matched. Don't clear
4108 STMT_VINFO_RELATED_STMT.
4109 (vect_pattern_recog): Update call accordingly.
4111 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4113 PR tree-optimization/85694
4114 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4115 (uavgM3_ceil): Document new optabs.
4116 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4117 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4119 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4120 (savg_ceil_optab): New optabs.
4121 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4122 (vect_vect_recog_func_ptrs): Add it.
4123 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4124 constant directly from the associated lhs.
4126 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4128 * tree-vect-patterns.c (vect_split_statement): New function.
4129 (vect_convert_input): Use it to try to split an existing cast.
4131 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4133 * poly-int.h (print_hex): New function.
4134 * dumpfile.h (dump_dec, dump_hex): Declare.
4135 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4136 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4137 min_input_precision, operation_precision and operation_sign.
4138 * tree-vect-patterns.c (vect_get_range_info): New function.
4139 (vect_same_loop_or_bb_p, vect_single_imm_use)
4140 (vect_operation_fits_smaller_type): Delete.
4141 (vect_look_through_possible_promotion): Add an optional
4142 single_use_p parameter.
4143 (vect_recog_over_widening_pattern): Rewrite to use new
4144 stmt_vec_info infomration. Handle one operation at a time.
4145 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4146 (vect_truncatable_operation_p, vect_set_operation_type)
4147 (vect_set_min_input_precision): New functions.
4148 (vect_determine_min_output_precision_1): Likewise.
4149 (vect_determine_min_output_precision): Likewise.
4150 (vect_determine_precisions_from_range): Likewise.
4151 (vect_determine_precisions_from_users): Likewise.
4152 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4153 (vect_vect_recog_func_ptrs): Put over_widening first.
4155 (vect_pattern_recog): Call vect_determine_precisions.
4157 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4159 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4160 statements that have been replaced by further pattern statements.
4161 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4163 2018-07-03 Richard Biener <rguenther@suse.de>
4165 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4166 always set *dt. Dump vectype in vectype overload.
4167 * dumpfile.h (dump_gimple_expr): New function.
4168 (dump_gimple_expr_loc): Likewise.
4169 * dumpfile.c (dump_gimple_expr): New function.
4170 (dump_gimple_expr_loc): Likewise.
4172 2018-07-02 Jeff Law <law@redhat.com>
4174 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4175 the H8/300, H8/300H and H8/S variants into a single pattern.
4176 (movhi_h8300, movqi_h8300hs): Similarly.
4177 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4178 (QHI mode iterator): New.
4180 * config/h8300/h8300.md: Remove trailing whitespace.
4182 2018-07-02 Jim Wilson <jimw@sifive.com>
4184 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4185 instead of emit_insn for interrupt returns.
4186 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4187 (riscv_sret, riscv_uret): Likewise.
4189 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4191 * pretty-print.c (selftest::test_pp_format): Move save and restore
4192 of quotes to class auto_fix_quotes, and add an instance.
4193 * selftest.c: Include "intl.h".
4194 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4195 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4196 * selftest.h (selftest::auto_fix_quotes): New class.
4198 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
4200 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4201 (aarch64_sve_prepare_conditional_op): Remove.
4202 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4203 Allow aarch64_simd_reg_or_zero as select operand; remove
4204 the aarch64_sve_prepare_conditional_op call.
4205 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4206 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4207 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4208 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4209 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4210 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4211 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4212 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4213 and a splitters to match all of the *_any patterns.
4214 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4216 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4217 (SVE_COND_FP_BINARY_REV): Remove.
4218 (sve_int_op_rev, sve_fp_op_rev): New.
4219 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4220 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4221 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4222 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4223 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4224 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4225 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4226 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4227 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4229 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4230 Remove match_dup 1 from the inner unspec.
4231 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4233 * config/aarch64/aarch64.md (movprfx): New attr.
4234 (length): Default movprfx to 8.
4235 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4236 (*madd<SVE_I>, *msub<SVE_I): Likewise.
4237 (*<su>mul<SVE_I>3_highpart): Likewise.
4238 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4239 (*v<ASHIFT><SVE_I>3): Likewise.
4240 (*<su><MAXMIN><SVE_I>3): Likewise.
4241 (*<su><MAXMIN><SVE_F>3): Likewise.
4242 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4243 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4244 (*div<SVE_F>4): Likewise.
4246 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
4248 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4251 2018-07-02 Richard Biener <rguenther@suse.de>
4253 PR tree-optimization/86363
4254 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4255 memset argument refers to a non-variable address.
4257 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4259 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4260 {PLUS,MINUS}_EXPR code to...
4261 (adjust_symbolic_bound): ...here,
4262 (combine_bound): ...here,
4263 (set_value_range_with_overflow): ...and here.
4265 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4267 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4269 (extract_range_from_abs_expr): ...here.
4271 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
4273 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4274 -fno-omit-frame-pointer when not optimizing.
4276 2018-07-02 Martin Liska <mliska@suse.cz>
4279 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4280 (propagate_nothrow): Likewise.
4282 2018-07-02 Martin Liska <mliska@suse.cz>
4285 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4287 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4289 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4290 function in r262149, changing "loc" param from source_location to
4291 const dump_location_t &.
4292 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4293 declaration, as above.
4295 2018-07-01 Paul Koning <ni1d@arrl.net>
4297 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4298 -munit-asm, -mgnu-asm, -mdec-asm.
4299 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4300 (pdp11_output_labelref): New.
4301 (pdp11_output_def): New.
4302 (pdp11_output_addr_vec_elt): New.
4303 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
4304 %# and %@ format codes.
4305 (pdp11_option_override): New.
4306 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4307 (pdp11_output_ident): New.
4308 (pdp11_asm_named_section): New.
4309 (pdp11_asm_init_sections): New.
4310 (pdp11_file_start): New.
4311 (pdp11_file_end): New.
4312 (output_ascii): Use .ascii/.asciz for -mdec-asm.
4313 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
4314 %o, like %c but octal.
4315 (pdp11_option_override): New.
4316 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4318 (DATA_SECTION_ASM_OP): Ditto.
4319 (READONLY_DATA_SECTION_ASM_OP): New.
4320 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4321 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4322 (ASM_OUTPUT_LABELREF): Ditto.
4323 (ASM_OUTPUT_DEF): Ditto.
4324 (ASM_OUTPUT_EXTERNAL): New.
4325 (ASM_OUTPUT_SOURCE_FILENAME): New.
4326 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4327 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4328 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
4329 %# and %@ format codes.
4330 * config/pdp11/pdp11.opt (mgnu-asm): New.
4331 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4332 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4333 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4335 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
4337 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4338 dereferencing path[] beyond its length.
4340 (debug_all_paths): New.
4341 (rewire_first_differing_edge): New.
4342 (adjust_paths_after_duplication): New.
4343 (duplicate_thread_path): Call adjust_paths_after_duplication.
4345 (thread_through_all_blocks): Add new argument to
4346 duplicate_thread_path.
4348 2018-06-30 Jim Wilson <jimw@sifive.com>
4350 * config/riscv/predicates.md (p2m1_shift_operand): New.
4351 (high_mask_shift_operand): New.
4352 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4353 pattern using p2m1_shift_operand.
4354 (lshsi3_zero_extend_3+2): New combiner pattern using
4355 high_mask_shift_operand.
4357 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4359 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4361 (vect_recog_rotate_pattern): ...here.
4362 (vect_convert_input): Try to insert casts of invariants in the
4364 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4365 preheader to be empty.
4367 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4369 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4370 vector type. If given, install it in the new statement's
4372 (vect_element_precision): New function.
4373 (vect_unpromoted_value): New struct.
4374 (vect_unpromoted_value::vect_unpromoted_value): New function.
4375 (vect_unpromoted_value::set_op): Likewise.
4376 (vect_look_through_possible_promotion): Likewise.
4377 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4378 (vect_widened_op_tree, vect_convert_input): Likewise.
4379 (vect_convert_inputs, vect_convert_output): Likewise.
4380 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4381 to handle the optional cast of the multiplication result and
4382 vect_widened_op_tree to detect the widened multiplication itself.
4383 Do not require the input and output of promotion casts to have
4384 the same sign, but base the signedness of the operation on the
4385 input rather than the result. If the pattern includes two
4386 promotions, check that those promotions have the same sign.
4387 Do not restrict the MULT_EXPR handling to a double-width result;
4388 handle quadruple-width results and wider. Use vect_convert_inputs
4389 to convert the inputs to the common type.
4390 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
4391 to handle the optional cast of the ABS result. Also allow a sign
4392 change or a sign extension between the ABS and MINUS.
4393 Use vect_widened_op_tree to detect the widened subtraction and use
4394 vect_convert_inputs to convert the inputs to the common type.
4395 (vect_handle_widen_op_by_const): Delete.
4396 (vect_recog_widen_op_pattern): New function.
4397 (vect_recog_widen_mult_pattern): Use it.
4398 (vect_recog_widen_shift_pattern): Likewise.
4399 (vect_recog_widen_sum_pattern): Use
4400 vect_look_through_possible_promotion to handle the promoted
4403 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4405 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4406 the containing gimple_seq *.
4407 * gimple-iterator.h (gsi_for_stmt): Declare it.
4408 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4409 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4410 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4411 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4412 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4414 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4416 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4417 statement being replaced is part of an existing pattern
4418 definition sequence, inserting the new pattern statements before
4420 (vect_pattern_recog_1): Don't return a bool. If the statement
4421 is already part of a pattern, instead apply pattern matching
4422 to the pattern definition statements. Don't clear the
4423 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4424 (vect_pattern_recog): Don't break after the first match;
4425 continue processing the pattern definition statements instead.
4426 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4428 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4430 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4431 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4432 (vect_recog_widen_sum_pattern): Use it.
4434 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4436 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4437 phi is not a pattern statement and has not been replaced by
4438 a pattern statement.
4439 * tree-vect-patterns.c (type_conversion_p): Don't check
4440 STMT_VINFO_IN_PATTERN_P.
4441 (vect_recog_vector_vector_shift_pattern): Likewise.
4442 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4443 the pattern statement rather than the original statement; check
4444 directly for a WIDEN_MULT_EXPR here.
4445 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4446 vect_is_simple_use to return the pattern statement rather
4447 than the original statement; use is_pattern_stmt_p to check
4448 for such a pattern statement.
4449 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4450 to return the pattern statement rather than the original statement;
4451 don't do the same transformation here.
4452 (vect_is_simple_use): If the defining statement has been replaced
4453 by a pattern statement, return the pattern statement instead.
4454 Remove the corresponding (local) transformation from the vectype
4457 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4459 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4460 end and default to null.
4461 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4462 (vectorizable_reduction): Update calls accordingly, dropping the
4463 gimple ** argument if the passed-back statement isn't needed.
4464 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4465 (vect_recog_rotate_pattern): Likewise.
4466 (vect_recog_mask_conversion_pattern): Likewise.
4467 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4468 (vect_mask_constant_operand_p): Likewise.
4469 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4470 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4471 (get_group_load_store_type, get_load_store_type): Likewise.
4472 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4473 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4474 (vectorizable_conversion, vectorizable_assignment): Likewise.
4475 (vectorizable_shift, vectorizable_operation): Likewise.
4476 (vectorizable_store, vect_is_simple_cond): Likewise.
4477 (vectorizable_condition, vectorizable_comparison): Likewise.
4478 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4479 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4480 and move it to the end. Cope with null def_stmt_outs.
4482 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4484 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4486 2018-06-29 Jeff Law <law@redhat.com>
4488 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4489 displacements for TARGET_V850E2V3 and newer.
4490 (TARGET_LRA_P): Remove. Defaults to LRA now.
4491 * config/v850/v850.md (sign23byte_load): Remove.
4492 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4493 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4495 2018-06-29 Martin Liska <mliska@suse.cz>
4498 * coverage.c (coverage_init): Mangle full path name.
4499 * doc/invoke.texi: Document the change.
4500 * gcov-io.c (mangle_path): New.
4501 * gcov-io.h (mangle_path): Likewise.
4502 * gcov.c (mangle_name): Use mangle_path for path mangling.
4504 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4506 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4507 if starting source register is not even.
4509 2018-06-29 Martin Liska <mliska@suse.cz>
4511 PR tree-optimization/86263
4512 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4513 Make edge redirection.
4515 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4517 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4518 (dump_scope_depth): New variable.
4519 (get_dump_scope_depth): New function.
4520 (dump_begin_scope): New function.
4521 (dump_end_scope): New function.
4522 * dumpfile.h (get_dump_scope_depth): New declaration.
4523 (dump_begin_scope): New declaration.
4524 (dump_end_scope): New declaration.
4525 (class auto_dump_scope): New class.
4526 (AUTO_DUMP_SCOPE): New macro.
4527 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4530 2018-06-29 Richard Biener <rguenther@suse.de>
4532 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4533 compute_all_dependences succeeds.
4534 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4535 exceed --param loop-max-datarefs-for-datadeps.
4537 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4539 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4541 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4544 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4545 alternative 0 in preferred_for_speed attribute.
4547 2018-06-28 Paul Koning <ni1d@arrl.net>
4549 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4550 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4551 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4552 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4553 for shift insn patterns.
4555 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4557 * cgraph.c (cgraph_node::get_body): Replace assignments to
4558 "dump_file" with calls to set_dump_file.
4559 * dumpfile.c (alt_dump_file): Make static, and group with...
4560 (alt_flags): ...this definition.
4561 (dumps_are_enabled): New variable.
4562 (refresh_dumps_are_enabled): New function.
4563 (set_dump_file): New function.
4564 (set_alt_dump_file): New function.
4565 (gcc::dump_manager::dump_start): Replace assignments to
4566 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4568 (gcc::dump_manager::dump_finish): Likewise.
4569 * dumpfile.h (alt_dump_file): Delete decl.
4570 (dumps_are_enabled): New variable decl.
4571 (set_dump_file): New function decl.
4572 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4574 * tree-nested.c (lower_nested_functions): Replace assignments to
4575 "dump_file" with calls to set_dump_file.
4577 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4579 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4580 goto_locus of each outgoing edge of each basic block.
4582 2018-06-28 Richard Biener <rguenther@suse.de>
4584 * dwarf2out.c (decl_scope_table): Remove.
4585 (push_decl_scope): Likewise.
4586 (pop_decl_scope): Likewise.
4587 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4588 (gen_struct_or_union_type_die): Likewise.
4589 (gen_tagged_type_die): Likewise.
4590 (dwarf2out_init): Do not initialize decl_scope_table.
4591 (dwarf2out_c_finalize): Do not free it.
4593 2018-06-28 Richard Biener <rguenther@suse.de>
4595 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4596 deciding whether to not re-use a DIE.
4598 2018-06-28 Richard Biener <rguenther@suse.de>
4600 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4601 DW_AT_abstract_origin attribute.
4603 2018-06-28 Martin Liska <mliska@suse.cz>
4605 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4606 Use newly introduced constants.
4607 * tree-switch-conversion.h (struct jump_table_cluster):
4608 Define max_ratio_for_size and max_ratio_for_speed.
4610 2018-06-28 Martin Liska <mliska@suse.cz>
4612 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4613 Add new checking assert to catch invalid state.
4614 (jump_table_cluster::can_be_handled): Handle single case
4616 (jump_table_cluster::is_beneficial): Bail out for such case.
4617 (bit_test_cluster::find_bit_tests):
4618 Add new checking assert to catch invalid state.
4619 (bit_test_cluster::can_be_handled): Handle single case
4621 (bit_test_cluster::is_beneficial): Bail out for such case.
4622 (switch_decision_tree::analyze_switch_statement):
4625 2018-06-28 Martin Liska <mliska@suse.cz>
4627 * common.opt: Introduce -completion option.
4628 * gcc.c (driver_handle_option): Handle it.
4629 (driver::main): Print completions if completion
4631 * opt-suggestions.c (option_proposer::get_completions):
4633 (option_proposer::suggest_completion): Likewise.
4634 (option_proposer::find_param_completions): Likewise.
4635 (verify_autocompletions): Likewise.
4636 (test_completion_valid_options): Likewise.
4637 (test_completion_valid_params): Likewise.
4638 (in_completion_p): Likewise.
4639 (empty_completion_p): Likewise.
4640 (test_completion_partial_match): Likewise.
4641 (test_completion_garbage): Likewise.
4642 (opt_proposer_c_tests): Likewise.
4643 * opt-suggestions.h: Declare new functions.
4644 * opts.c (common_handle_option): Handle OPT__completion_.
4645 * selftest-run-tests.c (selftest::run_tests): Add
4646 opt_proposer_c_tests.
4647 * selftest.c (assert_str_startswith): New.
4648 * selftest.h (assert_str_startswith): Likewise.
4649 (opt_proposer_c_tests): New.
4650 (ASSERT_STR_STARTSWITH): Likewise.
4652 2018-06-28 Martin Liska <mliska@suse.cz>
4654 * Makefile.in: Add opt-suggestions.o.
4655 * gcc-main.c: Include opt-suggestions.h.
4656 * gcc.c (driver::driver): Likewise.
4657 (driver::~driver): Remove m_option_suggestions.
4658 (driver::build_option_suggestions): Moved to option_proposer.
4659 (driver::suggest_option): Likewise.
4660 (driver::handle_unrecognized_options): Use option_proposer.
4661 * gcc.h (class driver): Add new memver m_option_proposer.
4662 * opt-suggestions.c: New file.
4663 * opt-suggestions.h: New file.
4665 2018-06-28 Martin Liska <mliska@suse.cz>
4667 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4668 (auto_string_vec::~auto_string_vec): Likewise.
4670 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4672 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4673 prevent_decl_creation_for_types fields up and add reset_location field.
4674 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4675 statement if id->reset_location is true.
4676 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4677 id->reset_location is true.
4678 (copy_phis_for_bb): Force input_location on the arguments if
4679 id->reset_location is true.
4680 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4681 is set on the function to be inlined.
4683 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4685 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4687 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4689 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4690 registers for Pmode.
4691 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4692 hard registers for the clobbered pseudo.
4694 2018-06-27 Paul Koning <ni1d@arrl.net>
4696 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4697 mutually exclusive options.
4698 * config/pdp11/constraints.md (h): New constraint.
4699 (O): Update definition to match shift code generation.
4700 (D): New constraint.
4701 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4703 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4705 (output_jump): Change arguments.
4706 (pdp11_fixed_cc_regs): New function.
4707 (pdp11_cc_mode): Ditto.
4708 (pdp11_expand_shift): Ditto.
4709 (pdp11_assemble_shift): Ditto.
4710 (pdp11_small_shift): Ditto.
4711 (pdp11_branch_cost): Remove.
4712 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4714 (pdp11_register_move_cost): Update for CC registers.
4715 (pdp11_rtx_costs): Add case for LSHIFTRT.
4716 (pdp11_output_jump): Add CCNZ mode conditional branches.
4717 (notice_update_cc_on_set): Remove.
4718 (pdp11_cc_mode): New function.
4719 (simple_memory_operand): Correct pre/post decrement case.
4720 (no_side_effect_operand): New function.
4721 (pdp11_regno_reg_class): Add CC_REGS class.
4722 (pdp11_fixed_cc_regs): New function.
4723 (pdp11_small_shift): New function.
4724 (pdp11_expand_shift): New function to expand shift insns.
4725 (pdp11_assemble_shift): New function to output shifts.
4726 (pdp11_branch_cost): Remove.
4727 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4728 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4729 (WCHAR_TYPE): Ditto.
4730 (PTRDIFF_TYPE): Ditto.
4731 (ADJUST_INSN_LENGTH): New macro.
4732 (FIXED_REGISTERS): Add CC registers.
4733 (CALL_USED_REGISTERS): Ditto.
4735 (REG_CLASS_NAMES): Ditto.
4736 (REG_CLASS_CONTENTS): Ditto.
4737 (SELECT_CC_MODE): Use new function.
4738 (TARGET_FLAGS_REGNUM): New macro.
4739 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4740 (cc0_reg_rtx): Remove.
4741 (CC_STATUS_MDEP): Remove.
4742 (CC_STATUS_MDEFP_INIT): Remove.
4743 (CC_IN_FPU): Remove.
4744 (NOTICE_UPDATE_CC): Remove.
4745 (REGISTER_NAMES): Add CC registers.
4746 (BRANCH_COST): Change to constant 1.
4747 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4749 * config/pdp11/pdp11.opt (mbcopy): Remove.
4750 (mbcopy-builtin): Remove.
4751 (mbranch-cheap): Remove.
4752 (mbranch-expensive): Remove.
4753 * config/pdp11/predicates.md (expand_shift_operand): Update to
4754 match shift code generation.
4755 (ccnz_operator): New predicate.
4756 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4757 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4758 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4760 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4761 description of O constraint.
4763 2018-06-27 Jeff Law <law@redhat.com>
4764 Austin Law <austinklaw@gmail.com>
4766 * config/v850/v850.md (addsi3_set_flags): New pattern.
4767 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4768 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4769 (zero_extendhisi2_v850_set_flags): Likewise.
4770 (zero_extendqisi2_v850_set_flags): Likewise.
4771 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4772 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4773 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4775 * config/v850/v850-protos.h (notice_update_cc): Remove.
4776 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4777 (v850_print_operand): Handle 'D' and "d".
4778 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4779 Add handling of arithmetic/logical operations compared against zero.
4780 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4781 Do not look at v850_compare_op, instead get mode from last argument.
4782 (v850_gen_compare): Remove
4783 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4784 after reload for prologue insns.
4785 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4787 (construct_save_jarl): Likewise.
4788 (TARGET_FLAGS_REGNUM): Define.
4789 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4790 (NOTICE_UPDATE_CC): Remove.
4791 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4792 than cc0. Conditionalize on reload_completed.
4793 (cmpsi_insn, setfcc_insn): Likewise.
4794 (tst1 splitter): Turn into define_and_split which sets the flags
4796 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4797 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4798 (cstoresf4, cstoredf4): Clobber the flags.
4799 (cmpsi, cmpsf, cmpdf): Remove expanders.
4800 (setf_insn): Remove pattern.
4801 (addsi3): Turn into define_and_split which clobbers the flags after
4802 reload and a suitable pattern (addsi3_clobber_flags) for use after
4804 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4805 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4806 (ashrsi3, ashrsi3_v850e2): Likewise.
4807 (bins): Clobber the flags.
4808 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4809 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4810 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4811 (call_value_internal_short, call_value_internal_long): Likewise.
4812 (callt_save_interrupt, callt_return_interrupt): Likewise.
4813 (save_interrupt, return_interrupt): Likewise.
4814 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4815 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4816 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4817 (All FP comparisons): Only allow after reload has completed.
4819 (divh, divhu): Tweak output template.
4820 (branch_z_normal, branch_z_invert): Remove
4821 (branch_nz_normal, branch_nz_invert): Likewise.
4822 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4824 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4825 * config/v850/v850.c (notice_update_cc): Remove.
4826 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4827 (CC_NO_CARRY): Likewise.
4828 (NOTICE_UPDATE_CC): Define to nothing.
4829 * config/v850/v850.md: Remove block comment on cc0 handling
4830 Remove "cc" attribute from all patterns. Remove cc_status handling
4831 from all patterns. Minor formatting fixes.
4833 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4835 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4836 (cortex-a76.cortex-a55): Likewise.
4837 * config/aarch64/aarch64-tune.md: Regenerate.
4838 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4839 cortex-a76.cortex-a55.
4841 2018-06-27 Jeff Law <law@redhat.com>
4843 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4844 (MULTILIB_DIRNAMES): Similarly.
4846 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4848 * gimple.h (gimple_return_retbnd): Delete.
4849 (gimple_return_set_retbnd): Likewise.
4850 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4851 gimple_return_set_retbnd.
4852 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4853 gimple_return_retbnd and adjust.
4854 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4855 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4856 Explicitly return NULL in a couple more cases. Move assertion
4857 on debug statements and remove unreachable code.
4858 (reset_debug_binding): Do not test id->retbnd.
4859 (expand_call_inline): Do not set it.
4861 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4863 * configure.ac: Add --disable-gcov option.
4864 * configure: Regenerate.
4865 * Makefile.in: Honour @enable_gcov@.
4866 * doc/install.texi: Document --disable-gcov.
4868 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4870 * config/arm/arm-cpus.in (cortex-a76): New entry.
4871 (cortex-a76.cortex-a55): Likewise.
4872 * config/arm/arm-tables.opt: Regenerate.
4873 * config/arm/arm-tune.md: Likewise.
4874 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4875 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4876 cortex-a76.cortex-a55.
4878 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4881 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4883 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4885 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4887 (EPILOGUE_USES): Likewise.
4889 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4891 * tree-inline.c (remap_location): New function extracted from...
4892 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4893 (copy_phis_for_bb): ...here. Call remap_location.
4894 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4896 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4898 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4899 unaligned vsx for 16B memset.
4901 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4904 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4905 ieee128_float_type_node to long_double_type_node unless
4906 TARGET_LONG_DOUBLE_128 is set.
4908 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4910 * cfgloop.c (get_loop_location): Convert return type from
4911 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4912 by implicit construction from rtx_insn *, and using
4913 dump_user_location_t::from_function_decl for the fallback case.
4914 * cfgloop.h (get_loop_location): Convert return type from
4915 location_t to dump_user_location_t.
4916 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4917 dump_printf_loc to pass in a dump_location_t rather than a
4918 location_t, via the gimple stmt.
4919 * coverage.c (get_coverage_counts): Update calls to
4920 dump_printf_loc to pass in dump_location_t rather than a
4922 * doc/optinfo.texi (Dump types): Convert example of
4923 dump_printf_loc from taking "locus" to taking "insn". Update
4924 description of the "_loc" calls to cover dump_location_t.
4925 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4927 (dump_user_location_t::dump_user_location_t): New constructors,
4928 from gimple *stmt and rtx_insn *.
4929 (dump_user_location_t::from_function_decl): New function.
4930 (dump_loc): Make static.
4931 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4932 const dump_location_t &.
4933 (dump_generic_expr_loc): Delete.
4934 (dump_printf_loc): Convert param "loc" from location_t to
4935 const dump_location_t &.
4936 (selftest::test_impl_location): New function.
4937 (selftest::dumpfile_c_tests): New function.
4938 * dumpfile.h: Include "profile-count.h".
4939 (class dump_user_location_t): New class.
4940 (struct dump_impl_location_t): New struct.
4941 (class dump_location_t): New class.
4942 (dump_printf_loc): Convert 2nd param from source_location to
4943 const dump_location_t &.
4944 (dump_generic_expr_loc): Delete.
4945 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4946 const dump_location_t &.
4947 * gimple-fold.c (fold_gimple_assign): Update call to
4948 dump_printf_loc to pass in a dump_location_t rather than a
4949 location_t, via the gimple stmt.
4950 (gimple_fold_call): Likewise.
4951 * gimple-loop-interchange.cc
4952 (loop_cand::analyze_iloop_reduction_var): Update for change to
4953 check_reduction_path.
4954 (tree_loop_interchange::interchange): Update for change to
4956 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4957 change in return-type of find_loop_location.
4958 (graphite_regenerate_ast_isl): Likewise.
4959 * graphite-optimize-isl.c (optimize_isl): Likewise.
4960 * graphite.c (graphite_transform_loops): Likewise.
4961 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4962 pass in a dump_location_t rather than a location_t, via the
4964 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4965 * ipa.c (walk_polymorphic_call_targets): Likewise.
4966 * loop-unroll.c (report_unroll): Convert "locus" param from
4967 location_t to dump_location_t.
4968 (decide_unrolling): Update for change to get_loop_location's
4970 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4971 location_t to dump_user_location_t.
4972 (grid_find_single_omp_among_assignments_1): Updates calls to
4973 dump_printf_loc to pass in a dump_location_t rather than a
4974 location_t, via the gimple stmt.
4975 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4976 location_t to dump_location_t. Updates calls to dump_printf_loc
4977 to pass in a dump_location_t rather than a location_t, via the
4979 (grid_inner_loop_gridifiable_p): Likewise.
4980 (grid_dist_follows_simple_pattern): Likewise.
4981 (grid_gfor_follows_tiling_pattern): Likewise.
4982 (grid_target_follows_gridifiable_pattern): Likewise.
4983 (grid_attempt_target_gridification): Convert initialization
4984 of local "grid" from memset to zero-initialization; FIXME: does
4985 this require C++11? Update call to dump_printf_loc to pass in a
4986 optinfo_location rather than a location_t, via the gimple stmt.
4987 * profile.c (read_profile_edge_counts): Updates call to
4988 dump_printf_loc to pass in a dump_location_t rather than a
4990 (compute_branch_probabilities): Likewise.
4991 * selftest-run-tests.c (selftest::run_tests): Call
4993 * selftest.h (dumpfile_c_tests): New decl.
4994 * tree-loop-distribution.c (pass_loop_distribution::execute):
4995 Update for change in return type of find_loop_location.
4996 * tree-parloops.c (parallelize_loops): Likewise.
4997 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4998 "locus" from location_t to dump_user_location_t.
4999 (canonicalize_loop_induction_variables): Likewise.
5000 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5001 for change in return type of find_loop_location.
5002 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5003 to dump_printf_loc to pass in a dump_location_t rather than a
5004 location_t, via the stmt.
5005 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5007 * tree-vect-loop-manip.c (find_loop_location): Convert return
5008 type from source_location to dump_user_location_t.
5009 (vect_do_peeling): Update for above change.
5010 (vect_loop_versioning): Update for change in type of
5012 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5013 from location_t to dump_user_location_t.
5014 (vect_estimate_min_profitable_iters): Update for change in type
5016 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5017 location_t to dump_location_t.
5018 (vect_slp_bb): Update for change in type of vect_location.
5019 * tree-vectorizer.c (vect_location): Convert from source_location
5020 to dump_user_location_t.
5021 (try_vectorize_loop_1): Update for change in vect_location's type.
5022 (vectorize_loops): Likewise.
5023 (increase_alignment): Likewise.
5024 * tree-vectorizer.h (vect_location): Convert from source_location
5025 to dump_user_location_t.
5026 (find_loop_location): Convert return type from source_location to
5027 dump_user_location_t.
5028 (check_reduction_path): Convert 1st param from location_t to
5029 dump_user_location_t.
5030 * value-prof.c (check_counter): Update call to dump_printf_loc to
5031 pass in a dump_user_location_t rather than a location_t; update
5032 call to error_at for change in type of "locus".
5033 (check_ic_target): Update call to dump_printf_loc to
5034 pass in a dump_user_location_t rather than a location_t, via the
5037 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
5039 * config/s390/s390.h (enum processor_flags): Do not use
5040 default tune parameter when -march was specified.
5042 2018-06-26 Jakub Jelinek <jakub@redhat.com>
5045 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5046 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5049 2018-06-26 Richard Biener <rguenther@suse.de>
5051 PR tree-optimization/86287
5053 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5054 (vect_analyze_loop): Initialize n_stmts.
5056 2018-06-26 Richard Biener <rguenther@suse.de>
5059 * fold-const.c (fold_convertible_p): Pointer extension
5062 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
5065 * dwarf2out.c (loc_list_has_views): Adjust comments.
5066 (dw_loc_list): Split single cross-partition range with
5069 2018-06-25 Jeff Law <law@redhat.com>
5071 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5072 on -mbig-switch by default.
5074 * config/v850/predicates.md (const_float_1_operand): Fix match_code
5076 (const_float_0_operand): Remove unused predicate.
5077 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5078 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5079 (recipsf2): New expander. Original pattern now called
5081 (recipdf2, recipdf2_insn): Similarly.
5082 (rsqrtsf2, rsqrtsf2_insn): Similarly
5083 (rsqrtdf2, rsqrtdf2_insn): Similarly
5085 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
5087 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5088 Simplify logic for FreeBSD (twice).
5090 2018-06-25 Martin Sebor <msebor@redhat.com>
5092 PR tree-optimization/86204
5093 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5094 a strnlen result if it's less than the length of the string.
5096 2018-06-25 Martin Sebor <msebor@redhat.com>
5098 PR tree-optimization/85700
5099 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5100 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5101 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5103 2018-06-25 Martin Sebor <msebor@redhat.com>
5105 * doc/extend.texi (Zero-length arrays): Update and clarify.
5107 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
5109 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5110 added IEEE/IBM long double multilib support on PowerPC little
5111 endian Linux systems.
5112 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5113 (MULTILIB_DEFAULTS): Likewise.
5114 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5116 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5117 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5118 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5120 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
5123 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5124 (REORDER_45): Likewise.
5126 2018-06-25 Jeff Law <law@redhat.com>
5128 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5129 dividend to 32 bits. Adjust length.
5130 (udivmodhi4): Cleanup output template. Fix length.
5132 2018-06-25 Carl Love <cel@us.ibm.com>
5134 * config/rs6000/vsx.md: Change word selector to prefered location.
5136 2018-06-25 Richard Biener <rguenther@suse.de>
5138 PR tree-optimization/86304
5139 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5140 epilogue-if-converted loops as well.
5142 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
5144 * lto-section-out.c (lto_begin_section): Do not print section
5145 name for noaddr and unnumbered dumps.
5147 2018-06-25 Richard Biener <rguenther@suse.de>
5149 * tree-vectorizer.h (struct vec_info_shared): New structure
5150 with parts split out from struct vec_info and loop_nest from
5151 struct _loop_vec_info.
5152 (struct vec_info): Adjust accordingly.
5153 (struct _loop_vec_info): Likewise.
5154 (LOOP_VINFO_LOOP_NEST): Adjust.
5155 (LOOP_VINFO_DATAREFS): Likewise.
5156 (LOOP_VINFO_DDRS): Likewise.
5157 (struct _bb_vec_info): Likewise.
5158 (BB_VINFO_DATAREFS): Likewise.
5159 (BB_VINFO_DDRS): Likewise.
5160 (struct _stmt_vec_info): Add dr_aux member.
5161 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5162 (DR_MISALIGNMENT_UNINITIALIZED): New.
5163 (set_dr_misalignment): Adjust.
5164 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5165 (vect_analyze_loop): Adjust prototype.
5166 (vect_analyze_loop_form): Likewise.
5167 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5168 Compute dependences lazily.
5169 (vect_record_base_alignments): Use shared datarefs/ddrs.
5170 (vect_verify_datarefs_alignment): Likewise.
5171 (vect_analyze_data_refs_alignment): Likewise.
5172 (vect_analyze_data_ref_accesses): Likewise.
5173 (vect_analyze_data_refs): Likewise.
5174 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5175 constructor parameter for shared part.
5176 (vect_analyze_loop_form): Pass in shared part and adjust.
5177 (vect_analyze_loop_2): Pass in storage for the number of
5178 stmts. Move loop nest finding to the caller. Compute
5180 (vect_analyze_loop): Pass in shared part.
5181 (vect_transform_loop): Verify shared datarefs are unchanged.
5182 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5183 constructor parameter for shared part.
5184 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5185 (vect_slp_bb): Verify shared datarefs are unchanged before
5187 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5189 (new_stmt_vec_info): Initialize DR_AUX misalignment to
5190 DR_MISALIGNMENT_UNINITIALIZED.
5191 * tree-vectorizer.c (vec_info::vec_info): Add constructor
5192 parameter for shared part.
5193 (vec_info::~vec_info): Adjust.
5194 (vec_info_shared::vec_info_shared): New.
5195 (vec_info_shared::~vec_info_shared): Likewise.
5196 (vec_info_shared::save_datarefs): Likewise.
5197 (vec_info_shared::check_datarefs): Likewise.
5198 (try_vectorize_loop_1): Construct shared part live for analyses
5199 of a single loop for multiple vector sizes.
5200 * tree-parloops.c (gather_scalar_reductions): Adjust.
5202 2018-06-25 Richard Biener <rguenther@suse.de>
5204 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5205 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5206 (vect_analyze_data_refs): Remove similar code from here and
5207 simplify accordingly.
5209 2018-06-25 Richard Biener <rguenther@suse.de>
5211 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5212 for reverse storage order accesses rather than asserting
5213 they cannot happen here.
5215 2018-06-25 Tom de Vries <tdevries@suse.de>
5218 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5219 Use data16 instead of .byte for insn prefix.
5221 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
5224 * parser.c (make_char_string_pack): Pass this literal chars
5225 through cpp_interpret_string.
5226 (cp_parser_userdef_numeric_literal): Check the result of
5227 make_char_string_pack.
5229 2018-06-24 Maya Rashish <coypu@sdf.org>
5231 * ginclude/stddef.h: Simplify conditions around avoiding
5232 re-definition of __size_t.
5234 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5236 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5237 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5239 2018-06-22 Maya Rashish <coypu@sdf.org>
5241 * doc/invoke.texi (mno-fancy-math-387): Update for changes
5242 made to OpenBSD and NetBSD through the years.
5244 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5246 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5247 behavior of vec_pack (vector double, vector double) to match
5248 behavior of vec_float2 (vector double, vector double).
5250 2018-06-22 Olivier Hainque <hainque@adacore.com>
5252 * gimplify.c (gimplify_function_tree): Prevent creation
5253 of a trampoline for the address of the current function
5254 passed to entry/exit instrumentation hooks.
5256 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
5259 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5262 2018-06-22 Martin Liska <mliska@suse.cz>
5264 PR tree-optimization/86263
5265 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5266 Bail out if is_enabled is false.
5267 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5269 (jump_table_cluster::is_enabled): New function.
5271 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5273 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5274 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5275 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5276 (lto_input_ts_binfo_tree_pointers): Likewise.
5277 * tree-streamer-out.c (streamer_write_tree_bitfields,
5278 write_ts_binfo_tree_pointers): Likewise.
5279 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5281 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5283 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5285 2018-06-22 Martin Liska <mliska@suse.cz>
5287 * symbol-summary.h (get): Make it pure and inline move
5288 functionality from ::get function.
5289 (get): Remove and inline into ::get and ::get_create.
5290 (get_create): Move code from ::get function.
5292 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5295 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5296 -x assembler-with-cpp.
5298 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5300 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5301 _FILE_OFFSET_BITS=64 for C++.
5303 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
5305 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5306 conversion insn that shows up when pr85657-3.c is compiled using
5307 IEEE 128-bit long double.
5308 (neg<mode>2_internal): Use the correct mode to check whether the
5309 mode is IBM extended.
5310 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5311 multiply and divide external functions from being created more
5314 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5316 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5318 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
5319 the edge can be forwarded.
5320 (cfg_layout_merge_blocks): Likewise.
5322 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5324 * except.c (finish_eh_generation): Commit edge insertions only after
5325 the EH edges have been redirected from post-landing to landing pads.
5327 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5329 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5330 create_tmp_var_for to create the FRAME decl.
5331 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5333 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5335 * tree-inline.c (copy_edges_for_bb): Minor tweak.
5336 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5337 debug statement when resetting its value.
5338 (expand_call_inline): Copy the locus of the call onto the assignment
5339 of the return value, if any. Use local variable in more cases.
5341 2018-06-21 Martin Liska <mliska@suse.cz>
5343 * ipa-pure-const.c (propagate_nothrow): Use
5344 funct_state_summaries->get.
5345 (dump_malloc_lattice): Likewise.
5346 (propagate_malloc): Likewise.
5348 2018-06-21 Richard Biener <rguenther@suse.de>
5350 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5351 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5352 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5354 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5355 BLOCK_ABSTRACT_ORIGIN unconditionally.
5357 2018-06-21 David Malcolm <dmalcolm@redhat.com>
5359 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5361 * ipa-reference.c (ipa_reference_c_finalize): Delete
5362 ipa_ref_opt_sum_summaries and set it to NULL.
5364 2018-06-21 Tom de Vries <tdevries@suse.de>
5366 PR tree-optimization/85859
5367 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5368 test with comment from bb_no_side_effects_p.
5370 2018-06-21 Richard Biener <rguenther@suse.de>
5372 PR tree-optimization/86232
5373 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5374 max for constant niter.
5376 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5378 * config/aarch64/aarch64-simd.md
5379 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5381 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5383 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5384 Make opernads of the unspec commutative.
5386 2018-06-21 Richard Biener <rguenther@suse.de>
5388 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5389 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5390 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5391 (vect_analyze_data_ref_dependence): Re-order checks to deal with
5393 (vect_record_base_alignments): Do not record base alignment
5394 for gathers or scatters.
5395 (vect_compute_data_ref_alignment): Drop return value that is always
5396 true. Bail out early for gathers or scatters.
5397 (vect_enhance_data_refs_alignment): Bail out early for gathers
5399 (vect_find_same_alignment_drs): Likewise.
5400 (vect_analyze_data_refs_alignment): Remove dead code.
5401 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5402 (vect_analyze_data_refs): For possible gathers or scatters do
5403 not create an alternate DR, just check their possible validity
5404 and mark them. Adjust DECL_NONALIASED handling to not rely
5406 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5407 update inits of gathers or scatters.
5408 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5409 Also copy gather/scatter flag to pattern vinfo.
5411 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
5413 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5414 behavior of vec_packsu (vector unsigned long long, vector unsigned
5415 long long) to match behavior of vec_packs with same signature.
5417 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5418 Thomas Schwinge <thomas@codesourcery.com>
5419 Cesar Philippidis <cesar@codesourcery.com>
5421 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5422 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5423 (gimplify_adjust_omp_clauses): Likewise.
5424 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5425 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5426 (gimplify_omp_target_update): Update handling of acc update and
5428 * omp-low.c (install_var_field): Remove unused parameter
5429 base_pointers_restrict.
5430 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5431 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5433 (omp_target_base_pointers_restrict_p): Delete.
5434 (scan_omp_target): Update call to scan_sharing_clauses.
5435 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5437 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5438 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5439 (convert_local_omp_clauses): Likewise.
5440 * tree-pretty-print.c (dump_omp_clause): Likewise.
5441 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5443 (omp_clause_code_name): Likewise.
5445 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5448 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5451 PR tree-optimization/86231
5452 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5453 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5455 2018-06-20 Tom de Vries <tdevries@suse.de>
5457 PR tree-optimization/86097
5458 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5459 iv type if signedness of iv type is not the same as that of *nit.
5461 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5463 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5464 EDGE_EH edges, verify they are all EDGE_EH.
5466 2018-06-20 Maya Rashish <coypu@sdf.org>
5468 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5470 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5472 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5473 * config/aarch64/aarch64.c (xgene1_tunings): Add
5474 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5475 (aarch64_mode_valid_for_sched_fusion_p):
5476 Allow 16-byte modes.
5477 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5478 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5480 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5482 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5483 * config/aarch64/iterators.md (VQ2): New mode iterator.
5485 2018-06-20 Martin Liska <mliska@suse.cz>
5487 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5488 Change default ratio from 10 to 8.
5490 2018-06-20 Martin Liska <mliska@suse.cz>
5492 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5494 (bit_test_cluster::find_bit_tests): Likewise.
5495 (switch_decision_tree::analyze_switch_statement): Find clusters.
5496 * tree-switch-conversion.h (struct jump_table_cluster): Document
5499 2018-06-20 Martin Liska <mliska@suse.cz>
5501 * tree-switch-conversion.c (switch_conversion::collect):
5502 Record m_uniq property.
5503 (switch_conversion::expand): Bail out for special conditions.
5504 (group_cluster::~group_cluster): New.
5505 (group_cluster::group_cluster): Likewise.
5506 (group_cluster::dump): Likewise.
5507 (jump_table_cluster::emit): New.
5508 (switch_decision_tree::fix_phi_operands_for_edges): New.
5509 (struct case_node): Remove struct.
5510 (jump_table_cluster::can_be_handled): New.
5511 (case_values_threshold): Moved to header.
5512 (reset_out_edges_aux): Likewise.
5513 (jump_table_cluster::is_beneficial): New.
5514 (bit_test_cluster::can_be_handled): Likewise.
5515 (add_case_node): Remove.
5516 (bit_test_cluster::is_beneficial): New.
5517 (case_bit_test::cmp): New.
5518 (bit_test_cluster::emit): New.
5519 (expand_switch_as_decision_tree_p): Remove.
5520 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5521 (fix_phi_operands_for_edge): Likewise.
5522 (switch_decision_tree::analyze_switch_statement): New.
5523 (compute_cases_per_edge): Move ...
5524 (switch_decision_tree::compute_cases_per_edge): ... here.
5525 (try_switch_expansion): Likewise.
5526 (switch_decision_tree::try_switch_expansion): Likewise.
5527 (record_phi_operand_mapping): Likewise.
5528 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5529 (emit_case_decision_tree): Likewise.
5530 (switch_decision_tree::emit): Likewise.
5531 (balance_case_nodes): Likewise.
5532 (switch_decision_tree::balance_case_nodes): Likewise.
5533 (dump_case_nodes): Likewise.
5534 (switch_decision_tree::dump_case_nodes): Likewise.
5535 (emit_jump): Likewise.
5536 (switch_decision_tree::emit_jump): Likewise.
5537 (emit_cmp_and_jump_insns): Likewise.
5538 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5539 (emit_case_nodes): Likewise.
5540 (switch_decision_tree::emit_case_nodes): Likewise.
5541 (conditional_probability): Remove.
5542 * tree-switch-conversion.h (enum cluster_type): New.
5544 (struct cluster): Likewise.
5545 (cluster::cluster): Likewise.
5546 (struct simple_cluster): Likewise.
5547 (simple_cluster::simple_cluster): Likewise.
5548 (struct group_cluster): Likewise.
5549 (struct jump_table_cluster): Likewise.
5550 (struct bit_test_cluster): Likewise.
5551 (struct min_cluster_item): Likewise.
5552 (struct case_tree_node): Likewise.
5553 (case_tree_node::case_tree_node): Likewise.
5554 (jump_table_cluster::case_values_threshold): Likewise.
5555 (struct case_bit_test): Likewise.
5556 (struct switch_decision_tree): Likewise.
5557 (struct switch_conversion): Likewise.
5558 (switch_decision_tree::reset_out_edges_aux): Likewise.
5560 2018-06-20 Martin Liska <mliska@suse.cz>
5562 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5563 (hoist_edge_and_branch_if_true): Likewise.
5564 (expand_switch_using_bit_tests_p): Likewise.
5565 (struct case_bit_test): Likewise.
5566 (case_bit_test_cmp): Likewise.
5567 (emit_case_bit_tests): Likewise.
5568 (switch_conversion::switch_conversion): New class.
5569 (struct switch_conv_info): Remove old struct.
5570 (collect_switch_conv_info): More to ...
5571 (switch_conversion::collect): ... this.
5572 (check_range): Likewise.
5573 (switch_conversion::check_range): Likewise.
5574 (check_all_empty_except_final): Likewise.
5575 (switch_conversion::check_all_empty_except_final): Likewise.
5576 (check_final_bb): Likewise.
5577 (switch_conversion::check_final_bb): Likewise.
5578 (create_temp_arrays): Likewise.
5579 (switch_conversion::create_temp_arrays): Likewise.
5580 (free_temp_arrays): Likewise.
5581 (gather_default_values): Likewise.
5582 (switch_conversion::gather_default_values): Likewise.
5583 (build_constructors): Likewise.
5584 (switch_conversion::build_constructors): Likewise.
5585 (constructor_contains_same_values_p): Likewise.
5586 (switch_conversion::contains_same_values_p): Likewise.
5587 (array_value_type): Likewise.
5588 (switch_conversion::array_value_type): Likewise.
5589 (build_one_array): Likewise.
5590 (switch_conversion::build_one_array): Likewise.
5591 (build_arrays): Likewise.
5592 (switch_conversion::build_arrays): Likewise.
5593 (gen_def_assigns): Likewise.
5594 (switch_conversion::gen_def_assigns): Likewise.
5595 (prune_bbs): Likewise.
5596 (switch_conversion::prune_bbs): Likewise.
5597 (fix_phi_nodes): Likewise.
5598 (switch_conversion::fix_phi_nodes): Likewise.
5599 (gen_inbound_check): Likewise.
5600 (switch_conversion::gen_inbound_check): Likewise.
5601 (process_switch): Use the newly created class.
5602 (switch_conversion::expand): New.
5603 (switch_conversion::~switch_conversion): New.
5604 * tree-switch-conversion.h: New file.
5606 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5608 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5609 tree-vect-patterns.c.
5610 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5611 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5612 (vect_recog_sad_pattern): Likewise.
5613 (vect_recog_widen_sum_pattern): Likewise.
5614 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5615 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5616 (vect_recog_rotate_pattern): Likewise.
5617 (vect_recog_mult_pattern): Likewise.
5618 (vect_recog_vector_vector_shift_pattern): Likewise.
5619 (vect_recog_divmod_pattern): Likewise.
5620 (vect_recog_mixed_size_cond_pattern): Likewise.
5621 (vect_recog_bool_pattern): Likewise.
5622 (vect_recog_mask_conversion_pattern): Likewise.
5623 (vect_try_gather_scatter_pattern): Likewise.
5624 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5625 (vect_recog_over_widening_pattern): Likewise.
5626 (vect_recog_gather_scatter_pattern): Likewise.
5627 (vect_recog_func_ptr): Move from tree-vectorizer.h
5628 (vect_vect_recog_func_ptrs): Move further down the file.
5629 (vect_recog_func): Likewise. Remove the third argument.
5630 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5631 (vect_pattern_recog_1): Expect the pattern function to do any
5632 necessary target tests. Also expect it to provide a vector type.
5633 Remove the type_in handling.
5635 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5637 * tree-vect-patterns.c (vect_pattern_detected): New function.
5638 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5639 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5640 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5641 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5642 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5643 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5644 (vect_recog_mask_conversion_pattern)
5645 (vect_try_gather_scatter_pattern): Likewise.
5647 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5649 * tree-vect-patterns.c (vect_get_internal_def): New function.
5650 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5651 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5652 (search_type_for_mask_1): Use it.
5654 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5656 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5657 redundant WIDEN_SUM_EXPR handling.
5658 (vect_recog_sad_pattern): Likewise.
5660 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5662 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5663 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5664 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5665 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5666 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5668 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5670 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5671 use the stmt_vec_info of the original bb statement for the
5672 new zero assignment, even if the call is part of a pattern.
5674 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5676 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5677 that the sequence is attached to the original statement rather
5678 than the pattern statement.
5679 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5680 PATTERN_DEF_SEQ from the original statement rather than
5681 the main pattern statement.
5682 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5683 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5684 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5686 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5688 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5689 definition statements before the early exit for statements that aren't
5691 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5693 (vect_transform_loop): ...here. Process pattern definition
5694 statements without first checking whether the main pattern
5695 statement is live or relevant.
5697 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5699 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5700 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5702 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5704 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5705 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5706 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5707 (expand_block_compare): Change select_block_compare_mode call.
5708 (expand_strncmp_align_check): Use new functions, fix comment.
5709 (emit_final_str_compare_gpr): New function.
5710 (expand_strn_compare): Refactor and clean up code.
5711 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5713 2018-06-19 Tony Reix <tony.reix@atos.com>
5714 Damien Bergamini <damien.bergamini@atos.com>
5715 David Edelsohn <dje.gcc@gmail.com>
5717 * collect2.c (static_obj): New variable.
5718 (static_libs): New variable.
5719 (is_in_list): Uncomment declaration.
5720 (main): Track AIX libraries linked statically.
5721 (is_in_list): Uncomment definition.
5722 (scan_prog_file): Don't add AIX shared libraries initializer
5723 to constructor list if linking statically.
5725 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5727 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5729 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5731 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5733 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5736 2018-06-19 Martin Liska <mliska@suse.cz>
5738 * config/i386/i386.c (ix86_can_inline_p): Do not use
5739 ipa_fn_summaries::get_create.
5740 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5742 (devirtualization_time_bonus): Likewise.
5743 (ipcp_propagate_stage): Likewise.
5744 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5745 (edge_set_predicate): Likewise.
5746 (evaluate_conditions_for_known_args): Likewise.
5747 (evaluate_properties_for_edge): Likewise.
5748 (ipa_call_summary::reset): Tranform to ...
5749 (ipa_call_summary::~ipa_call_summary): ... this.
5750 (ipa_fn_summary::reset): Transform to ...
5751 (ipa_fn_summary::~ipa_fn_summary): ... this.
5752 (ipa_fn_summary_t::remove): Rename to ...
5753 (ipa_fn_summary_t::remove_callees): ... this.
5754 (ipa_fn_summary_t::duplicate): Use placement new
5755 instead of memory copy.
5756 (ipa_call_summary_t::duplicate): Likewise.
5757 (ipa_call_summary_t::remove): Remove.
5758 (dump_ipa_call_summary): Change get_create to get.
5759 (ipa_dump_fn_summary): Dump only when summary exists.
5760 (analyze_function_body): Use symbol_summary::get instead
5762 (compute_fn_summary): Likewise.
5763 (estimate_edge_devirt_benefit): Likewise.
5764 (estimate_edge_size_and_time): Likewise.
5765 (inline_update_callee_summaries): Likewise.
5766 (remap_edge_change_prob): Likewise.
5767 (remap_edge_summaries): Likewise.
5768 (ipa_merge_fn_summary_after_inlining): Likewise.
5769 (write_ipa_call_summary): Likewise.
5770 (ipa_fn_summary_write): Likewise.
5771 (ipa_free_fn_summary): Likewise.
5772 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5773 (struct ipa_call_summary): Likewise.
5774 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5776 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5777 (estimate_size_after_inlining): Likewise.
5778 (estimate_growth): Likewise.
5779 (growth_likely_positive): Likewise.
5780 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5781 (inline_call): Likewise.
5782 * ipa-inline.c (caller_growth_limits): Likewise.
5783 (can_inline_edge_p): Likewise.
5784 (can_inline_edge_by_limits_p): Likewise.
5785 (compute_uninlined_call_time): Likewise.
5786 (compute_inlined_call_time): Likewise.
5787 (want_inline_small_function_p): Likewise.
5788 (edge_badness): Likewise.
5789 (update_caller_keys): Likewise.
5790 (update_callee_keys): Likewise.
5791 (inline_small_functions): Likewise.
5792 (inline_to_all_callers_1): Likewise.
5793 (dump_overall_stats): Likewise.
5794 (early_inline_small_functions): Likewise.
5795 (early_inliner): Likewise.
5796 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5797 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5798 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5799 * ipa-split.c (execute_split_functions): Likewise.
5800 * symbol-summary.h: Likewise.
5801 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5803 2018-06-19 Richard Biener <rguenther@suse.de>
5805 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5806 (vectorize_loops): ... here. Fix dbgcnt handling.
5807 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5809 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5812 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5813 ieee128 argument takes up only one (vector) register, not two (floating
5816 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5818 * gimplify.c (gimplify_init_constructor): Really never clear for an
5819 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5821 2018-06-19 Richard Biener <rguenther@suse.de>
5823 PR tree-optimization/86179
5824 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5825 after failed recognition.
5827 2018-06-18 Martin Sebor <msebor@redhat.com>
5830 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5831 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5832 Handle integer subtraction.
5833 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5834 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5836 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5838 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5839 param from rtx to rtx_insn *.
5840 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5842 (frv_ifcvt_modify_insn): Likwise.
5843 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5844 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5845 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5846 as_a <rtx_insn *> cast to local "unprotected_region" once
5847 it's been established that it's not NULL or pc_rtx.
5848 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5849 param "sethi" from rtx to rtx_insn *.
5850 (nds32_group_float_insns): Likewise for param "insn".
5851 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5853 (vax_output_int_subtract): Likewise.
5854 * config/vax/vax.c (vax_output_int_add): Likewise for param
5856 (vax_output_int_subtract): Likewise.
5857 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5858 (emit_pattern_after): Likewise for param "after".
5859 (emit_insn_after): Likewise.
5860 (emit_jump_insn_after): Likewise.
5861 (emit_call_insn_after): Likewise.
5862 (emit_debug_insn_after): Likewise.
5863 (emit_pattern_before): Likewise for param "before".
5864 (emit_insn_before): Likewise.
5865 (emit_jump_insn_before): Likewise.
5866 * final.c (get_insn_template): Likewise for param "insn", removing
5868 * output.h (get_insn_template): Likewise for 2nd param.
5869 * rtl.h (emit_insn_before): Likewise.
5870 (emit_jump_insn_before): Likewise.
5871 (emit_debug_insn_before_noloc): Likewise.
5872 (emit_insn_after): Likewise.
5873 (emit_jump_insn_after): Likewise.
5874 (emit_call_insn_after): Likewise.
5875 (emit_debug_insn_after): Likewise.
5876 (set_insn_deleted): Likewise for param.
5878 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5881 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5882 floating point modes, so that IFmode is numerically greater than
5883 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5884 to declare the ordering. This prevents IFmode from being
5885 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5886 machine. Include rs6000-modes.h to share the fractional values
5887 between genmodes* and the rest of the compiler.
5891 * config/rs6000/rs6000-modes.h: New file.
5892 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5893 meaning of rs6000_long_double_size so that 126..128 selects an
5894 appropriate 128-bit floating point type.
5895 (rs6000_option_override_internal): Likewise.
5896 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5897 (TARGET_LONG_DOUBLE_128): Change the meaning of
5898 rs6000_long_double_size so that 126..128 selects an appropriate
5899 128-bit floating point type.
5900 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5901 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5902 source and destination to match the standard usage.
5903 (truncifkf2): Likewise.
5904 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5905 ISA 2.07 to use an explicit clobber, instead of passing in a
5907 (copysign<mode>3_soft): Likewise.
5909 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5911 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5912 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5913 (vect_slp_analyze_instance_dependence): Likewise.
5914 (vect_enhance_data_refs_alignment): Likewise.
5915 (vect_analyze_data_refs_alignment): Likewise.
5916 (vect_slp_analyze_and_verify_instance_alignment
5917 (vect_analyze_data_ref_accesses): Likewise.
5918 (vect_prune_runtime_alias_test_list): Likewise.
5919 (vect_analyze_data_refs): Likewise.
5920 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5921 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5922 (vect_analyze_scalar_cycles_1): Likewise.
5923 (vect_get_loop_niters): Likewise.
5924 (vect_analyze_loop_form_1): Likewise.
5925 (vect_update_vf_for_slp): Likewise.
5926 (vect_analyze_loop_operations): Likewise.
5927 (vect_analyze_loop): Likewise.
5928 (vectorizable_induction): Likewise.
5929 (vect_transform_loop): Likewise.
5930 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5931 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5932 (vect_make_slp_decision): Likewise.
5933 (vect_detect_hybrid_slp): Likewise.
5934 (vect_slp_analyze_operations): Likewise.
5935 (vect_slp_bb): Likewise.
5936 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5937 (vectorizable_bswap): Likewise.
5938 (vectorizable_call): Likewise.
5939 (vectorizable_simd_clone_call): Likewise.
5940 (vectorizable_conversion): Likewise.
5941 (vectorizable_assignment): Likewise.
5942 (vectorizable_shift): Likewise.
5943 (vectorizable_operation): Likewise.
5944 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5946 2018-06-18 Martin Sebor <msebor@redhat.com>
5948 PR tree-optimization/81384
5949 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5950 * builtins.c (expand_builtin_strnlen): New function.
5951 (expand_builtin): Call it.
5952 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5953 * builtins.def (BUILT_IN_STRNLEN): New.
5954 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5955 Warn for bounds in excess of maximum object size.
5956 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5957 single-value ranges. Handle strnlen.
5958 (handle_builtin_strlen): Handle strnlen.
5959 (strlen_check_and_optimize_stmt): Same.
5960 * doc/extend.texi (Other Builtins): Document strnlen.
5962 2018-06-18 Maya Rashish <coypu@sdf.org>
5964 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5965 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5966 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5968 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5970 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5972 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5974 * tree.c (escaped_string::escape): Replace cast to char * by
5975 const_cast<char *> (unescaped).
5977 2018-06-18 Nick Clifton <nickc@redhat.com>
5980 * tree.c (escaped_string): New class. Converts an unescaped
5981 string into its escaped equivalent.
5982 (warn_deprecated_use): Use the new class to convert the
5983 deprecation message, if present.
5984 (test_escaped_strings): New self test.
5985 (test_c_tests): Add test_escaped_strings.
5986 * doc/extend.texi (deprecated): Add a note that the
5987 deprecation message is affected by the -fmessage-length
5988 option, and that control characters will be escaped.
5989 (#pragma GCC error): Document this pragma.
5990 (#pragma GCC warning): Likewise.
5991 * doc/invoke.texi (-fmessage-length): Document this option's
5992 effect on the #warning and #error preprocessor directives and
5993 the deprecated attribute.
5995 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5997 * tree.c (decl_value_expr_lookup): Revert latest change.
5998 (decl_value_expr_insert): Likewise.
6000 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
6002 * gimplify.c (nonlocal_vlas): Delete.
6003 (nonlocal_vla_vars): Likewise.
6004 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6006 (gimplify_body): Do not create and destroy nonlocal_vlas.
6007 * tree-nested.c: Include diagnostic.h.
6008 (use_pointer_in_frame): Tweak.
6009 (lookup_field_for_decl): Add assertion and declare the transformation.
6010 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6011 internal error when the reference is in a wrong context. Do not
6012 create a debug decl by default.
6013 (note_nonlocal_block_vlas): Delete.
6014 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6015 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
6016 create a debug decl by default.
6017 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6018 call is in a wrong context.
6019 (fixup_vla_decls): New function.
6020 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
6021 debug variables were created.
6022 * tree.c (decl_value_expr_lookup): Add checking assertion.
6023 (decl_value_expr_insert): Likewise.
6025 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6028 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6029 * tree-scalar-evolution.c (interpret_expr): Likewise.
6030 (expression_expensive_p): Likewise.
6031 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6032 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6033 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6034 (ssa_defined_by_minus_one_stmt_p): New.
6036 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6039 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6040 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6041 * dojump.c (do_jump): Likewise.
6042 * expr.c (expand_expr_real_2): Check operand type's sign.
6043 * fold-const.c (const_unop): Handle ABSU_EXPR.
6044 (fold_abs_const): Likewise.
6045 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6046 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6047 (strip_sign_op_1): Likesise.
6048 * match.pd: Add new pattern to generate ABSU_EXPR.
6049 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6050 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6051 * tree-eh.c (operation_could_trap_helper_p): Likewise.
6052 * tree-inline.c (estimate_operator_cost): Likewise.
6053 * tree-pretty-print.c (dump_generic_node): Likewise.
6054 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6055 * tree.def (ABSU_EXPR): New.
6057 2018-06-16 Jakub Jelinek <jakub@redhat.com>
6060 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6061 documented as preserved for backward compatibility only.
6062 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6064 PR rtl-optimization/86108
6065 * bb-reorder.c (create_forwarder_block): Renamed to ...
6066 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
6067 jump from new landing pad to the second part.
6068 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6071 2018-06-15 Jakub Jelinek <jakub@redhat.com>
6074 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6075 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6076 Only call store_expr for halves if the mode is the same.
6079 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6080 Fix up comment formatting.
6082 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
6084 * typed-splay-tree.h (typed_splay_tree::remove): New function.
6085 (typed_splay_tree::closure,
6086 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6087 (typed_splay_tree::typed_splay_tree,
6088 typed_splay_tree::operator =): Declared private.
6089 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6090 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6091 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6092 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6093 typed_splay_tree::splay_tree_splay,
6094 typed_splay_tree::splay_tree_foreach_helper,
6095 typed_splay_tree::splay_tree_insert,
6096 typed_splay_tree::splay_tree_remove,
6097 typed_splay_tree::splay_tree_lookup,
6098 typed_splay_tree::splay_tree_predecessor,
6099 typed_splay_tree::splay_tree_successor,
6100 typed_splay_tree::splay_tree_min,
6101 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6102 (typed_splay_tree::root, typed_splay_tree::comp,
6103 typed_splay_tree::delete_key,
6104 typed_splay_tree::delete_value): New data members.
6105 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6106 typed_splay_tree::remove.
6108 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
6110 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6111 -mginv and -mno-ginv to the assembler.
6112 * config/mips/mips.opt (-mcrc): New option.
6114 * doc/invoke.text (-mcrc): Document.
6117 2018-06-15 Nick Clifton <nickc@redhat.com>
6120 * tree.c (escaped_string): New class. Converts an unescaped
6121 string into its escaped equivalent.
6122 (warn_deprecated_use): Use the new class to convert the
6123 deprecation message, if present.
6124 (test_escaped_strings): New self test.
6125 (test_c_tests): Add test_escaped_strings.
6126 * doc/extend.texi (deprecated): Add a note that the
6127 deprecation message is affected by the -fmessage-length
6128 option, and that control characters will be escaped.
6129 (#pragma GCC error): Document this pragma.
6130 (#pragma GCC warning): Likewise.
6131 * doc/invoke.texi (-fmessage-length): Document this option's
6132 effect on the #warning and #error preprocessor directives and
6133 the deprecated attribute.
6135 2018-06-15 Richard Biener <rguenther@suse.de>
6137 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6138 here, also noting vector size used.
6139 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
6140 size used in MSG_OPTIMIZED_LOCATIONS dump.
6141 (pass_slp_vectorize::execute): Adjust.
6143 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
6146 * config/arc/arc.c (arc_return_address_register): Fix
6149 2018-06-15 Richard Biener <rguenther@suse.de>
6152 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6153 leave useless conversion stripping to force_gimple_operand_gsi.
6154 (gimplify_build2): Likewise.
6155 (gimplify_build1): Likewise.
6157 2018-06-15 Richard Biener <rguenther@suse.de>
6160 * tree-cfg.c (move_stmt_op): unshare invariant addresses
6161 before adjusting their block.
6163 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
6165 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6166 multilibs for *-*-rtems*.
6167 * config/riscv/t-rtems: New file.
6169 2018-06-14 Jakub Jelinek <jakub@redhat.com>
6172 * match.pd ((A +- CST1) +- CST2): Punt if last resort
6173 unsigned_type_for returns NULL.
6176 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6177 subregs of multi-word pseudos unless the float mode has word size.
6179 2018-06-14 Richard Biener <rguenther@suse.de>
6182 * tree-vect-generic.c (build_word_mode_vector_type): Remove
6183 duplicate and harmful type_hash_canon.
6184 * tree.c (type_hash_canon): Assert we didn't find ourselves.
6186 2018-06-14 Richard Biener <rguenther@suse.de>
6189 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6192 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
6194 * config/rtems.h (STDINT_LONG32): Define.
6196 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
6197 Prachi Godbole <prachi.godbole@imgtec.com>
6199 * config/mips/mips-cpus.def: Define P6600.
6200 * config/mips/mips-tables.opt: Regenerate.
6201 * config/mips/mips.c (mips_ucbranch_type): New enum.
6202 (mips_rtx_cost_data): Add support for P6600.
6203 (mips_issue_rate): Likewise.
6204 (mips_multipass_dfa_lookahead): Likewise.
6205 (mips_avoid_hazard): Likewise.
6206 (mips_reorg_process_insns): Likewise.
6207 (mips_classify_branch_p6600): New function.
6208 * config/mips/mips.h (TUNE_P6600): New define.
6209 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6210 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6211 * config/mips/mips.md: Include p6600.md.
6212 (processor): Add p6600.
6213 * config/mips/p6600.md: New file.
6214 * doc/invoke.texi: Add p6600 to supported architectures.
6216 2018-06-13 Martin Sebor <msebor@redhat.com>
6218 PR tree-optimization/86114
6219 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6221 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6223 2018-06-13 Richard Biener <rguenther@suse.de>
6225 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6226 Properly set vector type of the intermediate stmt.
6227 * tree-vect-stmts.c (vectorizable_operation): The destination
6228 var always has vectype_out type.
6230 2018-06-13 Jeff Law <law@redhat.com>
6232 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6233 integer 0 for argument to print_rtl_with_bb.
6234 (rl78_reorg): Likewise.
6236 2018-06-13 David Malcolm <dmalcolm@redhat.com>
6238 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6239 from rtx to rtx_insn *.
6240 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6242 (add_sched_insns_for_speculation): Likewise for local "target",
6243 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6244 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6245 from rtx_insn ** to rtx_code_label **.
6246 (reorg_emit_nops): Likewise.
6247 (c6x_reorg): Likewise for local "call_labels".
6248 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6250 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6251 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6252 the loops over LABEL_REFS.
6253 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6255 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6256 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6257 (split_branches): Strengthen local "olabel" from rtx to
6258 rtx_insn *, adding a safe_as_a cast.
6259 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6261 (add_insn_after): Likewise for first two params.
6262 (add_insn_before): Likewise.
6263 (remove_insn): Likewise for param.
6264 (emit_pattern_before_noloc): Likewise for second and third params.
6265 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6266 (emit_call_insn_before_noloc): Likewise.
6267 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6269 (emit_barrier_before): Likewise.
6270 (emit_label_before): Strengthen "label" param from "rtx" to
6271 "rtx_code_label *". Strengthen "before" param from "rtx" to
6273 (emit_insn_after_1): Strengthen "after" param from "rtx" to
6275 (emit_pattern_after_noloc): Likewise.
6276 (emit_insn_after_noloc): Likewise.
6277 (emit_jump_insn_after_noloc): Likewise.
6278 (emit_call_insn_after_noloc): Likewise.
6279 (emit_debug_insn_after_noloc): Likewise.
6280 (emit_barrier_after): Likewise.
6281 (emit_label_after): Likewise for both params.
6282 (emit_pattern_after_setloc): Likewise for "after" param. Convert
6283 "loc" param from "int" to "location_t".
6284 (emit_insn_after_setloc): Likewise.
6285 (emit_jump_insn_after_setloc): Likewise.
6286 (emit_call_insn_after_setloc): Likewise.
6287 (emit_debug_insn_after_setloc): Likewise.
6288 (emit_pattern_before_setloc): Likewise for "before" param. Convert
6289 "loc" param from "int" to "location_t".
6290 (emit_pattern_before): Convert NULL_RTX to NULL.
6291 (emit_insn_before_setloc): Convert "loc" param from "int" to
6293 (emit_jump_insn_before_setloc): Likewise.
6294 (emit_call_insn_before_setloc): Likewise.
6295 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6296 rtx_insn *. Convert "loc" param from "int" to "location_t".
6297 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6298 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6299 Convert 3rd param from "int" to "location_t".
6300 (emit_barrier_before, emit_barrier_after, next_real_insn):
6301 Strengthen param from rtx to rtx_insn *.
6302 (emit_label_before): Strengthen 1st param from "rtx" to
6303 "rtx_code_label *". Strengthen 2nd param from "rtx" to
6305 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6306 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6307 Strengthen 2nd param from "rtx" to "rtx_insn *".
6308 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6309 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6310 Likewise. Convert 3rd param from "int" to "location_t".
6311 (emit_label_after): Strengthen 1st param from "rtx" to
6313 (next_real_insn, remove_insn): Strengthen param from "rtx" to
6315 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6316 from "rtx" to "rtx_insn *".
6318 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
6320 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6321 bodies streamed in with -Q.
6322 * dumpfile.c (dump_files): Add lto-stream-out dump file.
6323 * dumpfile.h (tree_dump_index): Add lto_stream_out.
6324 * gimple-streamer-out.c: Include gimple-pretty-print.h
6325 (output_bb): Dump stmts streamed.
6326 * lto-section-out.c: Include print-tree.h
6327 (lto_begin_section): Dump sections created.
6328 (lto_output_decl_index): Dump decl encoded.
6329 * lto-streamer-out.c: Include print-tree.h
6330 (create_output_block): Dump output block created.
6331 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6332 (output_function): Dump function output.
6333 (output_constructor): Dump constructor streamed.
6334 (write_global_stream): Output indexes encoded.
6335 (produce_asm_for_decls): Dump streams encoded.
6336 * lto-streamer.c (streamer_dump_file): New global var.
6337 * lto-streamer.h (streamer_dump_file): Declare.
6338 * passes.c (ipa_write_summaries): Initialize streamer dump.
6339 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6342 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
6345 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6346 offsets for register save directives. Emit a second batch of save
6347 directives, if need be, when the function accesses prior frames.
6349 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6351 * config/arc/fpu.md (fmasf4): Force operand to register.
6352 (fnmasf4): Likewise.
6354 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6356 * config/arc/arc-protos.h (arc_pad_return): Remove.
6357 * config/arc/arc.c (machine_function): Remove force_short_suffix
6359 (arc_print_operand): Adjust printing of '&'.
6360 (arc_verify_short): Remove conditional printing of short suffix.
6361 (arc_final_prescan_insn): Remove reference to size_reason.
6362 (pad_return): New function.
6363 (arc_reorg): Call pad_return.
6364 (arc_pad_return): Remove.
6365 (arc_init_machine_status): Remove reference to force_short_suffix.
6366 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6367 (attr length): When attribute iscompact is true force to 2
6368 regardless; in the case of maybe check if we want to force the
6369 instruction to have 4 bytes length.
6370 (nopv): Change it to generate 4 byte long nop as well.
6371 (blockage): New pattern.
6372 (simple_return): Remove call to arc_pad_return.
6373 (p_return_i): Likewise.
6375 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6377 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6379 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6381 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6384 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6386 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6387 for ARC700 and ARCv2.
6389 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
6392 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6393 operands[2] instead of operands[1].
6396 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6398 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6399 case, check whether the outer register overlaps an unallocatable
6400 register, not just whether it fits the required class.
6402 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6404 * poly-int.h (can_div_trunc_p): Add new overload in which all values
6406 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6407 (memrefs_conflict_p): Likewise.
6408 (init_alias_analysis): Likewise.
6409 * cfgexpand.c (expand_debug_expr): Likewise.
6410 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6411 * cse.c (fold_rtx): Likewise.
6412 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6413 * expr.c (emit_block_move_hints): Likewise.
6414 (clear_storage_hints, push_block, emit_push_insn): Likewise.
6415 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6416 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6417 (emit_group_store): Likewise.
6418 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6419 to read the PRE/POST_MODIFY increment.
6420 * calls.c (store_one_arg): Use strip_offset.
6421 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6423 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6425 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6426 (simplify_binary_operation_1): Extend CONST_INT handling to
6428 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6429 than a HOST_WIDE_INT.
6430 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6432 (adjust_mems, add_stores): Update accodingly.
6433 (vt_canonicalize_addr): Track polynomial offsets.
6434 (emit_note_insn_var_location): Likewise.
6435 (vt_add_function_parameter): Likewise.
6436 (vt_initialize): Likewise.
6438 2018-06-12 Jeff Law <law@redhat.com>
6440 * config.gcc (alpha*-*-freebsd*): Remove.
6441 * config/alpha/freebsd.h: Remove.
6443 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6446 * spellcheck-tree.c (levenshtein_distance): Rename to...
6447 (get_edit_distance): ...this, and update for underlying renaming.
6448 * spellcheck-tree.h (levenshtein_distance): Rename to...
6449 (get_edit_distance): ...this.
6450 * spellcheck.c (levenshtein_distance): Rename to...
6451 (get_edit_distance): ...this. Convert from Levenshtein distance
6452 to Damerau-Levenshtein distance by supporting transpositions of
6453 adjacent characters. Rename "v1" to "v_next" and "v0" to
6455 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6456 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6457 update for underlying renaming.
6458 (selftest::levenshtein_distance_unit_test): Rename to...
6459 (selftest::test_get_edit_distance_unit): ...this, and update for
6460 underlying renaming.
6461 (selftest::test_find_closest_string): Add example from PR 69968
6462 where transposition helps
6463 (selftest::test_metric_conditions): Update for renaming.
6464 (selftest::test_metric_conditions): Likewise.
6465 (selftest::spellcheck_c_tests): Likewise.
6466 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6467 (get_edit_distance): ...this.
6468 (best_match::consider): Update for renaming.
6470 2018-06-12 Martin Sebor <msebor@redhat.com>
6472 PR tree-optimization/85259
6473 * builtins.c (compute_objsize): Handle constant offsets.
6474 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6475 true iff a warning has been issued.
6476 * gimple.h (gimple_nonartificial_location): New function.
6477 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6478 gimple_nonartificial_location and handle -Wno-system-headers.
6479 (handle_builtin_stxncpy): Same.
6481 2018-06-12 Martin Sebor <msebor@redhat.com>
6484 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6486 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6488 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6489 BUILTIN_VEC_XST entries for pointer to double and long long.
6491 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6494 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6496 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6499 2018-06-12 Martin Liska <mliska@suse.cz>
6501 * doc/options.texi: Document IntegerRange.
6503 2018-06-12 Martin Liska <mliska@suse.cz>
6505 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6506 * opt-functions.awk: Handle Deprecated flag.
6507 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6509 (read_cmdline_option): Report warning for a deprecated option.
6510 * opts.h (struct cl_option): Add new field cl_deprecated.
6511 (CL_ERR_DEPRECATED): New.
6513 2018-06-12 Martin Liska <mliska@suse.cz>
6515 * doc/options.texi: Document Deprecated option flag.
6517 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6519 * config/arc/arc-arch.h (arc_extras): New enum.
6520 (arc_cpu_t):Add field extra.
6521 (arc_cpu_types): Consider the extras.
6522 * config/arc/arc-cpus.def: Add extras info.
6523 * config/arc/arc-opts.h (processor_type): Consider extra field.
6524 * config/arc/arc.c (arc_override_options): Handle extra field.
6526 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6528 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6529 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6531 * config/arc/arc.c (arc_init): Update pic warning.
6532 (irq_range): Update irq range parsing warnings.
6533 (arc_override_options): Update various warning messages.
6534 (arc_handle_aux_attribute): Likewise.
6536 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6538 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6540 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6542 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6543 compiler messages directives.
6545 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6547 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6548 * config/mips/mips-tables.opt: Regenerate.
6549 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6551 * doc/invoke.texi: Document -march=i6500.
6553 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6555 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6556 (i6400_gpmul): Add cpu_unit.
6557 (i6400_gpdiv): Likewise.
6558 (i6400_msa_add_d): Update reservations.
6559 (i6400_msa_int_add) Likewise.
6560 (i6400_msa_short_logic3) Likewise.
6561 (i6400_msa_short_logic2) Likewise.
6562 (i6400_msa_short_logic) Likewise.
6563 (i6400_msa_move) Likewise.
6564 (i6400_msa_cmp) Likewise.
6565 (i6400_msa_short_float2) Likewise.
6566 (i6400_msa_div_d) Likewise.
6567 (i6400_msa_long_logic1) Likewise.
6568 (i6400_msa_long_logic2) Likewise.
6569 (i6400_msa_mult) Likewise.
6570 (i6400_msa_long_float2) Likewise.
6571 (i6400_msa_long_float4) Likewise.
6572 (i6400_msa_long_float5) Likewise.
6573 (i6400_msa_long_float8) Likewise.
6574 (i6400_fpu_fadd): Include frint type.
6575 (i6400_fpu_store): New define_insn_reservation.
6576 (i6400_fpu_load): Likewise.
6577 (i6400_fpu_move): Likewise.
6578 (i6400_fpu_fcmp): Likewise.
6579 (i6400_fpu_fmadd): Likewise.
6580 (i6400_int_mult): Include imul3nc type and update reservation.
6581 (i6400_int_div): Include idiv3 type and update reservation.
6582 (i6400_int_load): Update to check type not move_type.
6583 (i6400_int_store): Likewise.
6584 (i6400_int_prefetch): Set zero latency.
6586 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6588 * gcc.c: Document new %@{...} sequence.
6589 (LINK_COMMAND_SPEC): Use it for the -L switches.
6590 (cpp_unique_options): Use it for the -I switches.
6591 (at_file_argbuf): New global variable.
6592 (in_at_file): Likewise.
6593 (alloc_args): Create at_file_argbuf.
6594 (clear_args): Truncate at_file_argbuf.
6595 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6596 (open_at_file): New function.
6597 (close_at_file): Likewise.
6598 (create_at_file): Delete.
6599 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6602 (validate_switches_from_spec): Deal with %@{...} sequence.
6603 (validate_switches): Likewise.
6604 (driver::finalize): Call clear_args.
6606 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6608 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6610 2018-06-11 Martin Sebor <msebor@redhat.com>
6612 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6613 (Wno-class-memaccess): Add @opindex.
6614 (Wno-templates, Wno-multiple-inheritance): Same.
6615 (Wno-virtual-inheritance, Wno-namespaces): Same.
6616 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6617 (Wno-format-overflow, Wno-format-truncation): Same.
6618 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6619 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6620 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6621 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6622 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6623 (Wno-misspelled-isr): Same.
6625 2018-06-11 Martin Sebor <msebor@redhat.com>
6627 * PR tree-optimization/86083
6628 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6630 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6632 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6634 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6637 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6638 on the correct operand.
6639 (*movdi_internal64): Ditto.
6641 2018-06-11 Martin Liska <mliska@suse.cz>
6643 PR tree-optimization/86089
6644 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6646 2018-06-11 Julia Koval <julia.koval@intel.com>
6648 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6649 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6650 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6652 2018-06-11 Olivier Hainque <hainque@adacore.com>
6654 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6655 for Ada with strict dwarf2.
6657 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6660 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6663 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6665 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6667 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6669 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6672 2018-06-08 Martin Liska <mliska@suse.cz>
6674 * tree-cfg.h (debug_function): Fix argument type to match
6677 2018-06-08 Martin Liska <mliska@suse.cz>
6679 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6680 Remove usage of MPX-related (and removed) fields.
6681 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6683 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6685 * cfg.c (debug): Use TDF_NONE rather than 0.
6686 * cfghooks.c (debug): Likewise.
6687 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6688 (struct dump_option_value_info): Convert to...
6689 (struct kv_pair): ...this template type.
6690 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6692 (optinfo_verbosity_options): Likewise.
6693 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6695 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6696 than int for "optgroup_flags" param.
6697 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6699 (dump_dec): Likewise.
6700 (dump_finish): Use TDF_NONE rather than 0.
6701 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6702 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6703 than 0. Update for change to option_ptr.
6704 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6705 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6706 0. Update for changes to optinfo_verbosity_options and
6708 (opt_info_switch_p): Convert optgroup_flags from int to
6710 (dump_basic_block): Use dump_flags_t rather than int
6711 for "dump_kind" param.
6712 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6713 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6714 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6715 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6716 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6717 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6718 TDF_NONE): Convert from macros to...
6719 (enum dump_flag): ...this new enum.
6720 (dump_flags_t): Update to use enum.
6721 (operator|, operator&, operator~, operator|=, operator&=):
6722 Implement for dump_flags_t.
6723 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6724 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6725 Convert from macros to...
6726 (enum optgroup_flag): ...this new enum.
6727 (optgroup_flags_t): New typedef.
6728 (operator|, operator|=): Implement for optgroup_flags_t.
6729 (struct dump_file_info): Convert field "alt_flags" to
6730 dump_flags_t. Convert field "optgroup_flags" to
6732 (dump_basic_block): Use dump_flags_t rather than int for param.
6733 (dump_generic_expr_loc): Likewise.
6734 (dump_dec): Likewise.
6735 (dump_register): Convert param "optgroup_flags" to
6737 (opt_info_enable_passes): Likewise.
6738 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6740 * gimple-pretty-print.c (debug): Likewise.
6741 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6742 (merged_store_group::apply_stores): Likewise.
6743 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6744 * gimple.c (verify_gimple_pp): Likewise.
6745 * graphite-poly.c (print_pbb_body): Likewise.
6746 * passes.c (pass_manager::register_one_dump_file): Convert
6747 local "optgroup_flags" to optgroup_flags_t.
6748 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6750 (debug_body): Likewise.
6751 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6752 to optgroup_flags_t.
6753 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6755 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6756 (convert_mult_to_fma): Likewise.
6757 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6758 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6759 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6760 "dump_kind" to dump_flags_t.
6762 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6764 * config/rs6000/rs6000.c (min, max): Delete.
6766 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6768 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6769 -mabi=spe and -mabi=no-spe.
6771 2018-06-08 Martin Liska <mliska@suse.cz>
6773 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6774 where we expect an existing summary.
6776 2018-06-08 Martin Liska <mliska@suse.cz>
6778 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6779 * ipa-inline.h (estimate_edge_growth): Likewise.
6781 2018-06-08 Martin Liska <mliska@suse.cz>
6783 * cgraph.c (function_version_hasher::hash): Use
6784 cgraph_node::get_uid ().
6785 (function_version_hasher::equal):
6786 * cgraph.h (cgraph_node::get_uid): New method.
6787 * ipa-inline.c (update_caller_keys): Use
6788 cgraph_node::get_uid ().
6789 (update_callee_keys): Likewise.
6790 * ipa-utils.c (searchc): Likewise.
6791 (ipa_reduced_postorder): Likewise.
6792 * lto-cgraph.c (input_node): Likewise.
6793 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6794 * symbol-summary.h (symtab_insertion): Likewise.
6795 (symtab_removal): Likewise.
6796 (symtab_duplication): Likewise.
6797 * tree-pretty-print.c (dump_function_header): Likewise.
6798 * tree-sra.c (convert_callers_for_node): Likewise.
6800 2018-06-08 Martin Liska <mliska@suse.cz>
6802 * cgraph.c (symbol_table::create_edge): Always assign a new
6804 (symbol_table::free_edge): Do not recycle numbers.
6805 * cgraph.h (cgraph_edge::get): New method.
6806 * symbol-summary.h (symtab_removal): Use it.
6807 (symtab_duplication): Likewise.
6808 (call_summary::hashable_uid): Remove.
6810 2018-06-08 Martin Liska <mliska@suse.cz>
6812 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6813 (initialize_growth_caches): Remove.
6814 (free_growth_caches): Likewise.
6815 (do_estimate_edge_time): Use edge_growth_cache.
6816 (do_estimate_edge_size): Likewise.
6817 (do_estimate_edge_hints): Likewise.
6818 * ipa-inline.c (reset_edge_caches): Likewise.
6819 (recursive_inlining): Likewise.
6820 (inline_small_functions): Likewise.
6821 * ipa-inline.h (initialize_growth_caches): Remove.
6822 (estimate_edge_size): Likewise.
6823 (estimate_edge_time): Likewise.
6824 (estimate_edge_hints): Likewise.
6825 (reset_edge_growth_cache): Likewise.
6826 * symbol-summary.h (call_summary::remove): New method.
6828 2018-06-08 Martin Liska <mliska@suse.cz>
6830 * ipa-cp.c (class edge_clone_summary): New summary.
6831 (grow_edge_clone_vectors): Remove.
6832 (ipcp_edge_duplication_hook): Remove.
6833 (class edge_clone_summary_t): New call_summary class.
6834 (ipcp_edge_removal_hook): Remove.
6835 (edge_clone_summary_t::duplicate): New function.
6836 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6837 (create_specialized_node): Likewise.
6838 (ipcp_driver): Initialize edge_clone_summaries and do not
6841 2018-06-08 Martin Liska <mliska@suse.cz>
6843 * symbol-summary.h (get): New function.
6844 (call_summary::m_initialize_when_cloning): New class member.
6846 2018-06-08 Martin Liska <mliska@suse.cz>
6848 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6849 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6850 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6851 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6852 (remove_cgraph_node_from_order): Use the removed_nodes set.
6853 (do_per_function_toporder): Likwise.
6854 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6855 instead of summary_uid.
6856 (symtab_removal): Likewise.
6857 (symtab_duplication): Likewise.
6859 2018-06-08 Martin Liska <mliska@suse.cz>
6861 * ipa-cp.c (ipcp_store_bits_results): Use
6862 ipcp_transformation_sum.
6863 (ipcp_store_vr_results): Likewise.
6864 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6866 (ipcp_transformation_initialize): ... this.
6867 (ipa_set_node_agg_value_chain):
6868 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6869 (write_ipcp_transformation_info): Likewise.
6870 (read_ipcp_transformation_info): Likewise.
6871 (ipcp_update_bits): Likewise.
6872 (ipcp_update_vr): Likewise.
6873 (ipcp_transform_function): Likewise.
6874 * ipa-prop.h: Rename ipcp_transformation_summary to
6875 ipcp_transformation.
6876 (class ipcp_transformation_t): New function summary.
6877 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6878 (ipa_get_agg_replacements_for_node): Likewise.
6880 2018-06-08 Martin Liska <mliska@suse.cz>
6882 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6884 (class funct_state_summary_t): New function_summary class.
6885 (has_function_state): Remove.
6886 (get_function_state): Likewise.
6887 (set_function_state): Likewise.
6888 (add_new_function): Likewise.
6889 (funct_state_summary_t::insert): New function.
6890 (duplicate_node_data): Remove.
6891 (remove_node_data): Remove.
6892 (funct_state_summary_t::duplicate): New function.
6893 (register_hooks): Create new funct_state_summaries.
6894 (pure_const_generate_summary): Use it.
6895 (pure_const_write_summary): Likewise.
6896 (pure_const_read_summary): Likewise.
6897 (propagate_pure_const): Likewise.
6898 (propagate_nothrow): Likewise.
6899 (dump_malloc_lattice): Likewise.
6900 (propagate_malloc): Likewise.
6901 (execute): Do not register hooks, just remove summary
6903 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6906 2018-06-08 Martin Liska <mliska@suse.cz>
6908 * ipa-reference.c (remove_node_data): Remove.
6909 (duplicate_node_data): Likewise.
6910 (class ipa_ref_var_info_summary_t): New class.
6911 (class ipa_ref_opt_summary_t): Likewise.
6912 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6913 (get_reference_optimization_summary): Use
6914 ipa_ref_opt_sum_summaries.
6915 (set_reference_vars_info): Remove.
6916 (set_reference_optimization_summary): Likewise.
6917 (ipa_init): Create summaries.
6918 (init_function_info): Use function summary.
6919 (ipa_ref_opt_summary_t::duplicate): New function.
6920 (ipa_ref_opt_summary_t::remove): New function.
6921 (get_read_write_all_from_node): Fix GNU coding style.
6922 (propagate): Use function summary.
6923 (write_node_summary_p): Fix GNU coding style.
6924 (stream_out_bitmap): Likewise.
6925 (ipa_reference_read_optimization_summary): Use function summary.
6926 (ipa_reference_c_finalize): Do not release hooks.
6928 2018-06-08 Martin Liska <mliska@suse.cz>
6930 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6931 (analyze_function_body): Extract multiple calls of get_create.
6932 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6933 * ipa-inline.c (recursive_inlining): Use ::get method.
6934 * ipa-inline.h (estimate_edge_growth): Likewise.
6936 2018-06-08 Martin Liska <mliska@suse.cz>
6938 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6940 (hsa_function_summary::hsa_function_summary): Use the new enum
6942 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6943 * hsa-gen.c (hsa_get_host_function): Likewise.
6944 (get_brig_function_name): Likewise.
6945 * ipa-hsa.c (process_hsa_functions): Likewise.
6946 (ipa_hsa_write_summary): Likewise.
6947 * symbol-summary.h (symtab_duplication): Use ::get function/
6948 (get): New function.
6950 2018-06-08 Martin Liska <mliska@suse.cz>
6952 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6954 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6955 (hsa_register_kernel): Likewise.
6956 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6957 * hsa-gen.c (hsa_get_host_function): Likewise.
6958 (get_brig_function_name): Likewise.
6959 (generate_hsa): Likewise.
6960 (pass_gen_hsail::execute): Likewise.
6961 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6962 (devirtualization_time_bonus): Likewise.
6963 (ipcp_propagate_stage): Likewise.
6964 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6965 (edge_set_predicate): Likewise.
6966 (evaluate_conditions_for_known_args): Likewise.
6967 (evaluate_properties_for_edge): Likewise.
6968 (ipa_fn_summary::reset): Likewise.
6969 (ipa_fn_summary_t::duplicate): Likewise.
6970 (dump_ipa_call_summary): Likewise.
6971 (ipa_dump_fn_summary): Likewise.
6972 (analyze_function_body): Likewise.
6973 (compute_fn_summary): Likewise.
6974 (estimate_edge_devirt_benefit): Likewise.
6975 (estimate_edge_size_and_time): Likewise.
6976 (estimate_calls_size_and_time): Likewise.
6977 (estimate_node_size_and_time): Likewise.
6978 (inline_update_callee_summaries): Likewise.
6979 (remap_edge_change_prob): Likewise.
6980 (remap_edge_summaries): Likewise.
6981 (ipa_merge_fn_summary_after_inlining): Likewise.
6982 (ipa_update_overall_fn_summary): Likewise.
6983 (read_ipa_call_summary): Likewise.
6984 (inline_read_section): Likewise.
6985 (write_ipa_call_summary): Likewise.
6986 (ipa_fn_summary_write): Likewise.
6987 (ipa_free_fn_summary): Likewise.
6988 * ipa-hsa.c (process_hsa_functions): Likewise.
6989 (ipa_hsa_write_summary): Likewise.
6990 (ipa_hsa_read_section): Likewise.
6991 * ipa-icf.c (sem_function::merge): Likewise.
6992 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6993 (do_estimate_edge_time): Likewise.
6994 (estimate_size_after_inlining): Likewise.
6995 (estimate_growth): Likewise.
6996 (growth_likely_positive): Likewise.
6997 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6998 (inline_call): Likewise.
6999 * ipa-inline.c (caller_growth_limits): Likewise.
7000 (can_inline_edge_p): Likewise.
7001 (can_inline_edge_by_limits_p): Likewise.
7002 (compute_uninlined_call_time): Likewise.
7003 (compute_inlined_call_time): Likewise.
7004 (want_inline_small_function_p): Likewise.
7005 (edge_badness): Likewise.
7006 (update_caller_keys): Likewise.
7007 (update_callee_keys): Likewise.
7008 (recursive_inlining): Likewise.
7009 (inline_small_functions): Likewise.
7010 (inline_to_all_callers_1): Likewise.
7011 (dump_overall_stats): Likewise.
7012 (early_inline_small_functions): Likewise.
7013 (early_inliner): Likewise.
7014 * ipa-inline.h (estimate_edge_growth): Likewise.
7015 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7016 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7017 * ipa-prop.h (IPA_NODE_REF): Likewise.
7018 (IPA_EDGE_REF): Likewise.
7019 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7020 (propagate_malloc): Likewise.
7021 * ipa-split.c (execute_split_functions): Likewise.
7022 * symbol-summary.h: Rename get to get_create.
7024 (get_create): Likewise.
7025 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7027 2018-06-08 Martin Liska <mliska@suse.cz>
7029 * symbol-summary.h (release): Move definition out of class
7031 (symtab_removal): Likewise.
7032 (symtab_duplication): Likewise.
7034 2018-06-08 Martin Liska <mliska@suse.cz>
7036 * symbol-summary.h (function_summary): Move constructor
7037 implementation out of class declaration.
7038 (release): Likewise.
7039 (symtab_insertion): Likewise.
7040 (symtab_removal): Likewise.
7041 (symtab_duplication): Likewise.
7044 2018-06-08 Martin Liska <mliska@suse.cz>
7046 * Makefile.in: Remove support for MPX (macros, related functions,
7047 fields in cgraph_node, ...).
7048 * builtin-types.def (BT_BND): Likewise.
7049 (BT_FN_BND_CONST_PTR): Likewise.
7050 (BT_FN_CONST_PTR_BND): Likewise.
7051 (BT_FN_VOID_PTR_BND): Likewise.
7052 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7053 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7054 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7055 (expand_builtin_mempcpy_with_bounds): Likewise.
7056 (expand_builtin_memset_with_bounds): Likewise.
7057 (expand_builtin_memset_args): Likewise.
7058 (std_expand_builtin_va_start): Likewise.
7059 (expand_builtin): Likewise.
7060 (expand_builtin_with_bounds): Likewise.
7061 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7062 (DEF_LIB_BUILTIN_CHKP): Likewise.
7063 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7064 (DEF_CHKP_BUILTIN): Likewise.
7065 (BUILT_IN_MEMCPY): Likewise.
7066 (BUILT_IN_MEMMOVE): Likewise.
7067 (BUILT_IN_MEMPCPY): Likewise.
7068 (BUILT_IN_MEMSET): Likewise.
7069 (BUILT_IN_STPCPY): Likewise.
7070 (BUILT_IN_STRCAT): Likewise.
7071 (BUILT_IN_STRCHR): Likewise.
7072 (BUILT_IN_STRCPY): Likewise.
7073 (BUILT_IN_STRLEN): Likewise.
7074 (BUILT_IN_MEMCPY_CHK): Likewise.
7075 (BUILT_IN_MEMMOVE_CHK): Likewise.
7076 (BUILT_IN_MEMPCPY_CHK): Likewise.
7077 (BUILT_IN_MEMSET_CHK): Likewise.
7078 (BUILT_IN_STPCPY_CHK): Likewise.
7079 (BUILT_IN_STRCAT_CHK): Likewise.
7080 (BUILT_IN_STRCPY_CHK): Likewise.
7081 * calls.c (store_bounds): Likewise.
7082 (emit_call_1): Likewise.
7083 (special_function_p): Likewise.
7084 (maybe_warn_nonstring_arg): Likewise.
7085 (initialize_argument_information): Likewise.
7086 (finalize_must_preallocate): Likewise.
7087 (compute_argument_addresses): Likewise.
7088 (expand_call): Likewise.
7089 * cfgexpand.c (expand_call_stmt): Likewise.
7090 (expand_return): Likewise.
7091 (expand_gimple_stmt_1): Likewise.
7092 (pass_expand::execute): Likewise.
7093 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7094 (cgraph_node::remove): Likewise.
7095 (cgraph_node::dump): Likewise.
7096 (cgraph_node::verify_node): Likewise.
7097 * cgraph.h (chkp_function_instrumented_p): Likewise.
7098 (symtab_node::get_alias_target): Likewise.
7099 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7100 (cgraph_local_p): Likewise.
7101 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7102 (cgraph_edge::rebuild_references): Likewise.
7103 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7104 (walk_polymorphic_call_targets): Likewise.
7105 (cgraph_node::expand_thunk): Likewise.
7106 (symbol_table::output_weakrefs): Likewise.
7107 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7108 (ix86_handle_option): Likewise.
7109 * config/i386/constraints.md: Likewise.
7110 * config/i386/i386-builtin-types.def (BND): Likewise.
7114 * config/i386/i386-builtin.def (BDESC_END): Likewise.
7115 (BDESC_FIRST): Likewise.
7117 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7118 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7119 * config/i386/i386.c (enum reg_class): Likewise.
7120 (ix86_target_string): Likewise.
7121 (ix86_option_override_internal): Likewise.
7122 (ix86_conditional_register_usage): Likewise.
7123 (ix86_valid_target_attribute_inner_p): Likewise.
7124 (ix86_set_indirect_branch_type): Likewise.
7125 (ix86_set_current_function): Likewise.
7126 (ix86_function_arg_regno_p): Likewise.
7127 (init_cumulative_args): Likewise.
7128 (ix86_function_arg_advance): Likewise.
7129 (ix86_function_arg): Likewise.
7130 (ix86_pass_by_reference): Likewise.
7131 (ix86_function_value_regno_p): Likewise.
7132 (ix86_function_value_1): Likewise.
7133 (ix86_function_value_bounds): Likewise.
7134 (ix86_return_in_memory): Likewise.
7135 (ix86_setup_incoming_vararg_bounds): Likewise.
7136 (ix86_va_start): Likewise.
7137 (indirect_thunk_need_prefix): Likewise.
7138 (print_reg): Likewise.
7139 (ix86_print_operand): Likewise.
7140 (ix86_expand_call): Likewise.
7141 (ix86_output_function_return): Likewise.
7142 (reg_encoded_number): Likewise.
7143 (BDESC_VERIFYS): Likewise.
7144 (ix86_init_mpx_builtins): Likewise.
7145 (ix86_init_builtins): Likewise.
7146 (ix86_emit_cmove): Likewise.
7147 (ix86_emit_move_max): Likewise.
7148 (ix86_expand_builtin): Likewise.
7149 (ix86_builtin_mpx_function): Likewise.
7150 (ix86_get_arg_address_for_bt): Likewise.
7151 (ix86_load_bounds): Likewise.
7152 (ix86_store_bounds): Likewise.
7153 (ix86_load_returned_bounds): Likewise.
7154 (ix86_store_returned_bounds): Likewise.
7155 (ix86_class_likely_spilled_p): Likewise.
7156 (ix86_hard_regno_mode_ok): Likewise.
7157 (x86_order_regs_for_local_alloc): Likewise.
7158 (ix86_mitigate_rop): Likewise.
7159 (ix86_bnd_prefixed_insn_p): Likewise.
7160 (ix86_mpx_bound_mode): Likewise.
7161 (ix86_make_bounds_constant): Likewise.
7162 (ix86_initialize_bounds): Likewise.
7163 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7164 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7165 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7166 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7167 (TARGET_CHKP_BOUND_MODE): Likewise.
7168 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7169 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7170 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7171 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7172 * config/i386/i386.h (TARGET_MPX): Likewise.
7173 (TARGET_MPX_P): Likewise.
7174 (VALID_BND_REG_MODE): Likewise.
7175 (FIRST_BND_REG): Likewise.
7176 (LAST_BND_REG): Likewise.
7177 (enum reg_class): Likewise.
7178 (BND_REG_P): Likewise.
7179 (BND_REGNO_P): Likewise.
7180 (BNDmode): Likewise.
7181 (ADJUST_INSN_LENGTH): Likewise.
7182 * config/i386/i386.md: Likewise.
7183 * config/i386/i386.opt: Likewise.
7184 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7185 (defined): Likewise.
7186 (LINK_MPX): Likewise.
7187 (MPX_SPEC): Likewise.
7188 (LIBMPX_SPEC): Likewise.
7189 (LIBMPXWRAPPERS_SPEC): Likewise.
7190 (CHKP_SPEC): Likewise.
7191 * config/i386/predicates.md: Likewise.
7192 * dbxout.c (dbxout_type): Likewise.
7193 * doc/extend.texi: Likewise.
7194 * doc/invoke.texi: Likewise.
7195 * doc/md.texi: Likewise.
7196 * doc/tm.texi: Likewise.
7197 * doc/tm.texi.in: Likewise.
7198 * dwarf2out.c (is_base_type): Likewise.
7199 (gen_formal_types_die): Likewise.
7200 (gen_subprogram_die): Likewise.
7201 (gen_type_die_with_usage): Likewise.
7202 (gen_decl_die): Likewise.
7203 (dwarf2out_late_global_decl): Likewise.
7204 * expr.c (expand_assignment): Likewise.
7205 (emit_storent_insn): Likewise.
7206 (store_expr_with_bounds): Likewise.
7207 (store_expr): Likewise.
7208 (expand_expr_real_1): Likewise.
7209 * expr.h (store_expr_with_bounds): Likewise.
7210 * function.c (use_register_for_decl): Likewise.
7211 (struct bounds_parm_data): Likewise.
7212 (assign_parms_augmented_arg_list): Likewise.
7213 (assign_parm_find_entry_rtl): Likewise.
7214 (assign_parm_is_stack_parm): Likewise.
7215 (assign_parm_load_bounds): Likewise.
7216 (assign_bounds): Likewise.
7217 (assign_parms): Likewise.
7218 (expand_function_start): Likewise.
7219 * gcc.c (CHKP_SPEC): Likewise.
7220 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7221 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7222 (wrestrict_dom_walker::check_call): Likewise.
7223 * gimple.c (gimple_build_call_from_tree): Likewise.
7224 * gimple.h (enum gf_mask): Likewise.
7225 (gimple_call_with_bounds_p): Likewise.
7226 (gimple_call_set_with_bounds): Likewise.
7227 * gimplify.c (gimplify_init_constructor): Likewise.
7228 * ipa-cp.c (initialize_node_lattices): Likewise.
7229 (propagate_constants_across_call): Likewise.
7230 (find_more_scalar_values_for_callers_subset): Likewise.
7231 * ipa-hsa.c (process_hsa_functions): Likewise.
7232 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7233 * ipa-icf.c (sem_function::merge): Likewise.
7234 * ipa-inline.c (early_inliner): Likewise.
7235 * ipa-pure-const.c (warn_function_noreturn): Likewise.
7236 (warn_function_cold): Likewise.
7237 (propagate_pure_const): Likewise.
7238 * ipa-ref.h (enum GTY): Likewise.
7239 * ipa-split.c (find_retbnd): Likewise.
7240 (consider_split): Likewise.
7241 (split_function): Likewise.
7242 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7243 * ipa.c (walk_polymorphic_call_targets): Likewise.
7244 (symbol_table::remove_unreachable_nodes): Likewise.
7245 (process_references): Likewise.
7246 (cgraph_build_static_cdtor_1): Likewise.
7247 * lto-cgraph.c (lto_output_node): Likewise.
7248 (output_refs): Likewise.
7249 (compute_ltrans_boundary): Likewise.
7250 (input_overwrite_node): Likewise.
7251 (input_node): Likewise.
7252 (input_cgraph_1): Likewise.
7253 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7254 * passes.c (pass_manager::execute_early_local_passes): Likewise.
7255 (class pass_chkp_instrumentation_passes): Likewise.
7256 (make_pass_chkp_instrumentation_passes): Likewise.
7257 * passes.def: Likewise.
7258 * rtl.h (struct GTY): Likewise.
7259 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7260 * stor-layout.c (layout_type): Likewise.
7261 * symtab.c: Likewise.
7262 * target.def: Likewise.
7263 * targhooks.c (default_chkp_bound_type): Likewise.
7264 (default_chkp_bound_mode): Likewise.
7265 (default_builtin_chkp_function): Likewise.
7266 (default_chkp_function_value_bounds): Likewise.
7267 (default_chkp_make_bounds_constant): Likewise.
7268 (default_chkp_initialize_bounds): Likewise.
7269 * targhooks.h (default_chkp_bound_type): Likewise.
7270 (default_chkp_bound_mode): Likewise.
7271 (default_builtin_chkp_function): Likewise.
7272 (default_chkp_function_value_bounds): Likewise.
7273 (default_chkp_make_bounds_constant): Likewise.
7274 (default_chkp_initialize_bounds): Likewise.
7275 * toplev.c (compile_file): Likewise.
7276 (process_options): Likewise.
7277 * tree-core.h (DEF_BUILTIN): Likewise.
7278 (DEF_BUILTIN_CHKP): Likewise.
7279 * tree-inline.c (declare_return_variable): Likewise.
7280 (remap_gimple_stmt): Likewise.
7281 (copy_bb): Likewise.
7282 (initialize_inlined_parameters): Likewise.
7283 (expand_call_inline): Likewise.
7284 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7285 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7286 (make_pass_ipa_chkp_produce_thunks): Likewise.
7287 (make_pass_chkp): Likewise.
7288 (make_pass_chkp_opt): Likewise.
7289 (make_pass_chkp_instrumentation_passes): Likewise.
7290 * tree-pretty-print.c (dump_generic_node): Likewise.
7291 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7292 * tree-ssa-dce.c (propagate_necessity): Likewise.
7293 (eliminate_unnecessary_stmts): Likewise.
7294 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7295 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7296 * tree-ssa-sccvn.h: Likewise.
7297 * tree-ssa-strlen.c (get_string_length): Likewise.
7298 (valid_builtin_call): Likewise.
7299 (adjust_last_stmt): Likewise.
7300 (handle_builtin_strchr): Likewise.
7301 (handle_builtin_strcpy): Likewise.
7302 (handle_builtin_stxncpy): Likewise.
7303 (handle_builtin_memcpy): Likewise.
7304 (handle_builtin_strcat): Likewise.
7305 (strlen_check_and_optimize_stmt): Likewise.
7306 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7307 * tree-streamer-in.c: Likewise.
7308 * tree-streamer.c (record_common_node): Likewise.
7309 * tree.c (tree_code_size): Likewise.
7310 (wide_int_to_tree_1): Likewise.
7311 (type_contains_placeholder_1): Likewise.
7312 (build_common_tree_nodes): Likewise.
7313 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7314 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7315 (POINTER_BOUNDS_P): Likewise.
7316 (BOUNDED_TYPE_P): Likewise.
7317 (BOUNDED_P): Likewise.
7318 (CALL_WITH_BOUNDS_P): Likewise.
7319 (pointer_bounds_type_node): Likewise.
7320 * value-prof.c (gimple_ic): Likewise.
7321 * var-tracking.c (vt_add_function_parameters): Likewise.
7322 * varasm.c (make_decl_rtl): Likewise.
7323 (assemble_start_function): Likewise.
7324 (output_constant): Likewise.
7325 (maybe_assemble_visibility): Likewise.
7326 * varpool.c (ctor_for_folding): Likewise.
7327 * chkp-builtins.def: Remove.
7328 * ipa-chkp.c: Remove.
7329 * ipa-chkp.h: Remove.
7330 * rtl-chkp.c: Remove.
7331 * rtl-chkp.h: Remove.
7332 * tree-chkp-opt.c: Remove.
7333 * tree-chkp.c: Remove.
7334 * tree-chkp.h: Remove.
7336 2018-06-07 Carl Love <cel@us.ibm.com>
7338 * config/rs6000/vsx.md (vextract_fp_from_shorth,
7339 vextract_fp_from_shortl): Add BE support.
7341 2018-06-07 Paul Koning <ni1d@arrl.net>
7343 * compare-elim.c (try_merge_compare): Don't merge compare if
7344 address contains a side effect.
7345 (try_eliminate_compare): Likewise.
7347 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
7349 * config.gcc: Support "tremont".
7350 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7351 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7353 * config/i386/i386.c (m_TREMONT): Define.
7354 (processor_target_table): Add "tremont".
7355 (PTA_TREMONT): Define.
7356 (ix86_lea_outperforms): Add TARGET_TREMONT.
7357 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7358 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7359 and M_INTEL_GOLDMONT_PLUS.
7360 (fold_builtin_cpu): Add "tremont".
7361 (ix86_add_stmt_cost): Add TARGET_TREMONT.
7362 (ix86_option_override_internal): Add "tremont".
7363 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7364 (processor_type): Add PROCESSOR_TREMONT.
7365 * config/i386/x86-tune.def: Add m_TREMONT.
7366 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7368 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7370 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7371 symbol defined for msp430i* devices to be lower case.
7373 2018-06-07 Richard Biener <rguenther@suse.de>
7375 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7376 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
7377 Properly wrap signed arithmetic if overflow wraps.
7379 2018-06-07 Jakub Jelinek <jakub@redhat.com>
7381 PR tree-optimization/69615
7382 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7383 of a cast from a same precision integral SSA_NAME in a bb dominated
7384 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
7385 cast to utype if rhs2 has already a compatible type.
7387 2018-06-07 Richard Biener <rguenther@suse.de>
7389 PR tree-optimization/85935
7390 * graphite-scop-detection.c (find_params_in_bb): Analyze
7391 condition operands with respect to the correct loop. Assert
7392 the analysis doesn't fail.
7394 2018-06-04 Carl Love <cel@us.ibm.com>
7396 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7397 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
7398 as it is slightly cheaper.
7399 (first_match_or_eos_index_<mode>):
7400 Calculate index using natural element order.
7401 (first_match_index_<mode>):
7402 Calculate index using natural element order.
7403 (first_match_or_eos_index_<mode>):
7404 Calculate index using natural order.
7405 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7406 for BE and LE modes.
7407 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7408 P9V_BUILTIN_VCLZLSBB_V16QI.
7409 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7412 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7414 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7415 indentation and line wrap for many prototypes. Add missing
7416 @smallexample directives around block of prototypes for vec_xl and
7419 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7421 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7422 track if we pass or return IEEE 128-bit floating point.
7423 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7424 C++ mangling that is compatible with GCC 8.1.
7425 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7426 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7427 floating point types.
7428 (rs6000_function_arg_advance_1): Likewise.
7429 (rs6000_mangle_type): Optionally generate mangled names that match
7430 what GCC 8.1 generated for IEEE 128-bit floating point types.
7431 (rs6000_globalize_decl_name): If we have an external function that
7432 passes or returns IEEE 128-bit types, generate a weak reference
7433 from the mangled name used in GCC 8.1 to the current mangled
7435 (rs6000_init_builtins): Make __ibm128 use the long double type if
7436 long double is IBM extended double. Make __float128 use the long
7437 double type if long double is IEEE 128-bit.
7440 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7441 macro for __ibm128 built-in functions.
7442 (PACK_IF): Add __ibm128 pack/unpack functions.
7443 (UNPACK_IF): Likewise.
7444 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7445 enable long double built-in functions if long double is IEEE
7446 128-bit floating point.
7447 (rs6000_invalid_builtin): Update long double built-in function
7449 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7450 functions, adjust the built-in function to use the long double
7451 built-in function if __ibm128 and long double are the same type.
7452 * doc/extend.texi (PowerPC builtins): Update documention for
7453 __builtin_{,un}pack_longdouble. Add documentation for
7454 __builtin_{,un}pack_ibm128.
7456 2018-06-06 Jim Wilson <jimw@sifive.com>
7458 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7459 (struct machine_function): New field interrupt_mode.
7460 (riscv_handle_type_attribute): New function. Add forward declaration.
7461 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7462 (riscv_expand_epilogue): Check interrupt_mode field.
7463 (riscv_set_current_function): Check interrupt attribute args and
7464 set interrupt_mode field.
7465 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7466 (riscv_sret, riscv_uret): New.
7467 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7468 new arguments to interrupt attribute.
7470 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7473 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7474 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7476 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7478 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7479 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7480 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7481 several redundant entries.
7483 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7485 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7486 type from "rtx" to "rtx_insn *".
7487 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7488 for local "call_insn", removing cast.
7489 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7491 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7493 PR tree-optimization/86066
7494 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7495 for BIT_INSERT_EXPR stores.
7497 2018-06-06 Richard Biener <rguenther@suse.de>
7499 PR tree-optimization/86062
7500 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7501 component refs ontop
7502 of to be offsetted base.
7504 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7506 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7507 to be static and remove check on interrupt attribute name.
7509 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7511 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7512 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7514 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7517 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7519 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7520 Remove second argument, change how error is called.
7521 (aarch64_layout_arg): Remove second argument from
7522 aarch64_err_no_fpadvsimd call.
7523 (aarch64_init_cumulative_args): Ditto.
7524 (aarch64_gimplify_va_arg_expr): Ditto.
7525 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7527 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7529 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7530 (*simple_return_indirect_internal<mode>): Rename from
7531 simple_return_indirect_internal. Use W mode iterator.
7532 (rstorssp): New expander.
7533 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7534 (clrssbsy): New expander.
7535 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7537 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7539 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7541 (cmse_check_pointed_object): Likewise.
7543 2018-06-05 Martin Liska <mliska@suse.cz>
7545 PR gcov-profile/47618
7546 * doc/invoke.texi: Document how -fprofile-dir format
7549 2018-06-05 Richard Biener <rguenther@suse.de>
7551 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7552 removal pretend DOM info isn't available so we do not update
7553 it and only remove edges, not dominated blocks. Actually free
7554 DOM info in case we removed something. Remove unreachable blocks.
7555 (mfb_keep_latches): Work with either DOM info or marked backedges.
7556 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7557 first. Mark backedges if DOM info isn't available.
7558 (Re-)compute DOM info after cleanup_control_flow_pre.
7560 2018-06-05 Richard Biener <rguenther@suse.de>
7562 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7563 (locus_discrim_hasher::hash): Adjust.
7564 (locus_discrim_hasher::equal): Likewise.
7565 (next_discriminator_for_locus): Work on line directly.
7566 (same_line_p): Pass in expanded locus1 as well.
7567 (assign_discriminators): Avoid redundant location expansions.
7569 2018-06-05 Richard Biener <rguenther@suse.de>
7571 PR tree-optimization/86046
7572 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7573 if required after clearing TREE_ADDRESSABLE.
7575 2018-06-05 Richard Biener <rguenther@suse.de>
7577 PR tree-optimization/86047
7578 * tree-ssa-loop.c (for_each_index): Glob handling of all
7579 decls and constants and really handle all of them.
7581 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7584 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7585 qualifier_void_pointer and qualifier_const_void_pointer.
7586 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7587 (arm_init_builtins): Handle the above.
7588 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7589 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7590 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7593 2018-06-05 Martin Liska <mliska@suse.cz>
7595 * auto-profile.c (read_autofdo_file): Do not use
7596 gcov_ctr_summary struct.
7597 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7598 * coverage.c (struct counts_entry): Likewise.
7599 (read_counts_file): Read just single summary entry.
7600 (get_coverage_counts): Use gcov_summary struct.
7601 * coverage.h (get_coverage_counts): Likewise.
7602 * gcov-dump.c (dump_working_sets): Likewise.
7603 (tag_summary): Dump just single summary.
7604 * gcov-io.c (gcov_write_summary): Write just histogram
7606 (gcov_read_summary): Read just single summary.
7607 (compute_working_sets): Use gcov_summary struct.
7608 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7609 of GCOV_COUNTERS_SUMMABLE.
7610 (GCOV_COUNTERS_SUMMABLE): Remove.
7611 (GCOV_FIRST_VALUE_COUNTER): Replace with
7612 GCOV_COUNTER_V_INTERVAL.
7613 (struct gcov_ctr_summary): Remove.
7614 (struct gcov_summary): Directly use fields of former
7616 (compute_working_sets): Use gcov_summary struct.
7617 * gcov.c (read_count_file): Do not use ctrs fields.
7618 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7620 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7622 * profile.c: Likewise.
7623 * profile.h: Likewise.
7625 2018-06-05 Martin Liska <mliska@suse.cz>
7627 PR gcov-profile/84846
7628 * gcov.c (output_lines): Print working directory only
7629 in intermediate format.
7631 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7633 * config/s390/s390-builtin-types.def: Add void function type.
7634 * config/s390/s390-builtins.def: Use the function type for the
7637 2018-06-04 Jim Wilson <jimw@sifive.com>
7639 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7641 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7642 and maybe_eh_return. Change regno to unsigned int. Use new args to
7643 handle EH_RETURN_DATA_REGNO registers properly.
7644 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7645 (riscv_expand_epilogue): Update comment. Change argument name and
7646 type. Update code to use new name and type. Pass new args to
7647 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7649 * config/riscv/riscv.md (NORMAL_RETURN): New.
7650 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7651 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7652 (eh_return): Call gen_eh_return_internal and emit barrier.
7653 (eh_return_internal): Call riscv_expand_epilogue.
7655 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7657 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7658 bit_insertion field and declare can_be_merged_into method.
7659 (merged_store_group::can_be_merged_into): New method.
7660 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7661 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7662 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7664 2018-06-04 Richard Biener <rguenther@suse.de>
7666 PR tree-optimization/85955
7667 * builtins.c (fold_builtin_sincos): Convert pointers to
7668 destination to appropriate type before dereferencing.
7670 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7672 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7674 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7676 * expr.c (expand_expr_real_1): Force the operand into memory if
7677 its TYPE_MODE is BLKmode and if there is no integer mode for
7678 the number of bits being extracted.
7680 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7684 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7685 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7687 2018-06-04 Richard Biener <rguenther@suse.de>
7689 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7690 (cleanup_tree_cfg_noloop): ... single caller. Do
7691 start_recording_case_labels later.
7693 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7695 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7696 to _IMMINTRIN_H_INCLUDED.
7697 * config/i386/pconfigintrin.h: Ditto.
7698 * config/i386/waitpkgintrin.h: Ditto.
7699 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7700 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7701 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7702 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7703 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7704 waitpkgintrin.h and cldemoteintrin.h.
7706 2018-06-04 Richard Biener <rguenther@suse.de>
7708 PR tree-optimization/86038
7709 * tracer.c (find_best_successor): Check probability for
7710 being initialized, bail out if not.
7712 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7715 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7716 of bits to ignore when comparing architectures.
7718 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7720 PR tree-optimization/69615
7721 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7722 maximum or minimum of the type, try to merge it also as if
7723 range1 is + [-, x - 1] or + [x + 1, -].
7726 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7728 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7730 PR tree-optimization/86034
7731 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7732 the unsigned bitfield type in a bit insertion sequence if it does not
7733 have a larger precision than the bitfield size.
7734 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7736 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7738 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7740 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7742 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7743 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7744 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7745 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7747 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7749 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7750 Disable -fdelete-null-pointer-checks for ELF toolchain.
7752 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7753 Kito Cheng <kito.cheng@gmail.com>
7755 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7756 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7757 (nds32*-*-*): Add glibc and uclibc conditions.
7758 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7759 (TARGET_EXCEPT_UNWIND_INFO): Define.
7760 * config/nds32/elf.h: New file.
7761 * config/nds32/linux.h: New file.
7762 * config/nds32/nds32-elf.opt: New file.
7763 * config/nds32/nds32-linux.opt: New file.
7764 * config/nds32/nds32-fp-as-gp.c
7765 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7766 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7768 (nds32_asm_file_end): Ditto.
7769 (nds32_print_operand): Ditto.
7770 (nds32_insert_attributes): Ditto.
7771 (nds32_init_libfuncs): New function.
7772 (TARGET_HAVE_TLS): Define.
7773 (TARGET_INIT_LIBFUNCS): Define.
7774 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7776 (TARGET_ELF): Apply different mcmodel setting.
7777 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7778 been migrated into elf.h and linux.h files.
7779 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7780 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7781 (mcmodel): The content has been migrated into nds32-elf.opt and
7782 nds32-linux.opt files.
7783 * config/nds32/t-elf: New file.
7784 * config/nds32/t-linux: New file.
7786 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7787 Shiva Chen <shiva0217@gmail.com>
7789 * config/nds32/constants.md (unspec_volatile_element): Add
7790 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7791 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7793 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7794 (make_pass_nds32_fp_as_gp): Declare.
7795 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7797 (nds32_asm_function_end_prologue): Remove unused asm output.
7798 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7799 (nds32_asm_file_start): Output necessary fp_as_gp information.
7800 (nds32_option_override): Adjust register usage.
7801 (nds32_expand_prologue): Consider fp_as_gp situation.
7802 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7803 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7806 (simple_return): Ditto.
7807 (omit_fp_begin): Output special directive for fp_as_gp.
7808 (omit_fp_end): Output special directive for fp_as_gp.
7809 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7810 mforbid-fp-as-gp): New options.
7812 2018-06-01 Mark Wielaard <mark@klomp.org>
7814 * dwarf2out.c (dwarf2out_finish): Remove generation of
7815 DW_AT_loclists_base.
7817 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7819 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7820 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7821 (struct merged_store_group): Add bit_insertion field.
7822 (dump_char_array): Use standard hexadecimal format.
7823 (merged_store_group::merged_store_group): Set bit_insertion to false.
7824 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7825 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7826 also print the mask in the dump file.
7827 (pass_store_merging::gate): Minor tweak.
7828 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7829 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7830 stores with INTEGER_CST stores.
7831 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7832 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7833 and use it throughout. Generate bit insertion sequences if need be.
7834 (pass_store_merging::process_store): Remove redundant condition.
7835 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7837 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7839 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7840 the 128-bit floating point types. Fix function comment.
7842 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7844 * config/aarch64/aarch64-simd.md
7845 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7847 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7850 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7852 PR tree-optimization/85989
7853 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7855 (backprop::intersect_uses): Check it when deciding whether this
7856 is a backedge reference.
7857 (backprop::process_block): Add each phi to m_visited_phis
7858 after visiting it, then clear it at the end.
7860 2018-06-01 Richard Biener <rguenther@suse.de>
7862 * tree-vectorizer.h (vect_dr_stmt): New function.
7863 (vect_get_load_cost): Adjust.
7864 (vect_get_store_cost): Likewise.
7865 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7866 Use vect_dr_stmt instead of DR_SMTT.
7867 (vect_record_base_alignments): Likewise.
7868 (vect_calculate_target_alignment): Likewise.
7869 (vect_compute_data_ref_alignment): Likewise and make static.
7870 (vect_update_misalignment_for_peel): Likewise.
7871 (vect_verify_datarefs_alignment): Likewise.
7872 (vector_alignment_reachable_p): Likewise.
7873 (vect_get_data_access_cost): Likewise. Pass down
7874 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7875 (vect_get_peeling_costs_all_drs): Likewise.
7876 (vect_peeling_hash_get_lowest_cost): Likewise.
7877 (vect_enhance_data_refs_alignment): Likewise.
7878 (vect_find_same_alignment_drs): Likewise.
7879 (vect_analyze_data_refs_alignment): Likewise.
7880 (vect_analyze_group_access_1): Likewise.
7881 (vect_analyze_group_access): Likewise.
7882 (vect_analyze_data_ref_access): Likewise.
7883 (vect_analyze_data_ref_accesses): Likewise.
7884 (vect_vfa_segment_size): Likewise.
7885 (vect_small_gap_p): Likewise.
7886 (vectorizable_with_step_bound_p): Likewise.
7887 (vect_prune_runtime_alias_test_list): Likewise.
7888 (vect_analyze_data_refs): Likewise.
7889 (vect_supportable_dr_alignment): Likewise.
7890 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7891 (vect_gen_prolog_loop_niters): Likewise.
7892 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7893 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7895 (vect_recog_mask_conversion_pattern): Likewise.
7896 (vect_try_gather_scatter_pattern): Likewise.
7897 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7898 to vect_get_store_cost.
7899 (vect_get_store_cost): Get stmt_info instead of DR.
7900 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7901 (vect_get_load_cost): Get stmt_info instead of DR.
7903 2018-06-01 Richard Biener <rguenther@suse.de>
7906 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7907 vars wrapped in MEM_REFs.
7909 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7911 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7912 Fix subreg tests so that we only return a choice between
7913 GENERAL_REGS and FP_REGS if the original classes included both.
7915 2018-06-01 Richard Biener <rguenther@suse.de>
7918 * tree-ssa-structalias.c (get_function_part_constraint):
7919 Handle NULL fi->decl.
7920 (find_func_aliases_for_call): Properly handle indirect
7921 fi from direct call.
7922 (find_func_clobbers): Likewise.
7923 (ipa_pta_execute): Likewise.
7924 (create_variable_info_for): For functions that are ifunc_resolver
7925 resolve to a varinfo that contains the result of the resolver call.
7926 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7929 2018-05-31 Michael Collison <michael.collison@arm.com>
7931 * config/aarch64/aarch64.md:
7932 (*fix_to_zero_extenddfdi2): New pattern.
7933 * gcc.target/aarch64/fix_extend1.c: New testcase.
7935 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7939 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7940 and BUILT_IN_STRNCMP_EQ.
7941 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7942 BUILT_IN_STRNCMP_EQ.
7943 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7944 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7945 (gimple_fold_builtin): Likewise.
7946 * tree-ssa-strlen.c (compute_string_length): New function.
7947 (determine_min_obsize): New function.
7948 (handle_builtin_string_cmp): New function to handle calls to
7949 string compare functions.
7950 (strlen_optimize_stmt): Add handling to builtin string compare
7952 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7953 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7954 * tree.c (build_common_builtin_nodes): Add new defines of
7955 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7957 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7960 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7961 functions with naked attribute.
7963 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7965 * config/i386/sse.md (avx_vec_concat<mode>):
7966 Substitute concat_tg_mode mode attribute with xtg_mode.
7967 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7968 (concat_tg_mode): Remove mode attribute.
7970 2018-05-31 Martin Sebor <msebor@redhat.com>
7973 * calls.c (alloc_max_size): Correct a logic error/typo.
7974 Treat excessive arguments as infinite. Warn for invalid arguments.
7975 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7977 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7980 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7981 and movx for Haswell.
7983 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7984 Cesar Philippidis <cesar@codesourcery.com>
7987 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7988 when emitting error on private/firstprivate reductions.
7989 * omp-low.c (lower_omp_target): Avoid reference-type processing
7990 on pointers for firstprivate clause.
7992 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7994 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7997 * config/aarch64/aarch64-simd.md
7998 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7999 (aarch64_ld1_x3_<mode>): Likewise
8000 (aarch64_st1x2<VALLDIF:mode>): Likewise
8001 (aarch64_st1_x2_<mode>): Likewise
8002 (aarch64_st1x3<VALLDIF:mode>): Likewise
8003 (aarch64_st1_x3_<mode>): Likewise
8004 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8005 (vld1_s8_x3): Likewise.
8006 (vld1_u16_x3): Likewise.
8007 (vld1_s16_x3): Likewise.
8008 (vld1_u32_x3): Likewise.
8009 (vld1_s32_x3): Likewise.
8010 (vld1_u64_x3): Likewise.
8011 (vld1_s64_x3): Likewise.
8012 (vld1_f16_x3): Likewise.
8013 (vld1_f32_x3): Likewise.
8014 (vld1_f64_x3): Likewise.
8015 (vld1_p8_x3): Likewise.
8016 (vld1_p16_x3): Likewise.
8017 (vld1_p64_x3): Likewise.
8018 (vld1q_u8_x3): Likewise.
8019 (vld1q_s8_x3): Likewise.
8020 (vld1q_u16_x3): Likewise.
8021 (vld1q_s16_x3): Likewise.
8022 (vld1q_u32_x3): Likewise.
8023 (vld1q_s32_x3): Likewise.
8024 (vld1q_u64_x3): Likewise.
8025 (vld1q_s64_x3): Likewise.
8026 (vld1q_f16_x3): Likewise.
8027 (vld1q_f32_x3): Likewise.
8028 (vld1q_f64_x3): Likewise.
8029 (vld1q_p8_x3): Likewise.
8030 (vld1q_p16_x3): Likewise.
8031 (vld1q_p64_x3): Likewise.
8032 (vst1_s64_x2): Likewise.
8033 (vst1_u64_x2): Likewise.
8034 (vst1_f64_x2): Likewise.
8035 (vst1_s8_x2): Likewise.
8036 (vst1_p8_x2): Likewise.
8037 (vst1_s16_x2): Likewise.
8038 (vst1_p16_x2): Likewise.
8039 (vst1_s32_x2): Likewise.
8040 (vst1_u8_x2): Likewise.
8041 (vst1_u16_x2): Likewise.
8042 (vst1_u32_x2): Likewise.
8043 (vst1_f16_x2): Likewise.
8044 (vst1_f32_x2): Likewise.
8045 (vst1_p64_x2): Likewise.
8046 (vst1q_s8_x2): Likewise.
8047 (vst1q_p8_x2): Likewise.
8048 (vst1q_s16_x2): Likewise.
8049 (vst1q_p16_x2): Likewise.
8050 (vst1q_s32_x2): Likewise.
8051 (vst1q_s64_x2): Likewise.
8052 (vst1q_u8_x2): Likewise.
8053 (vst1q_u16_x2): Likewise.
8054 (vst1q_u32_x2): Likewise.
8055 (vst1q_u64_x2): Likewise.
8056 (vst1q_f16_x2): Likewise.
8057 (vst1q_f32_x2): Likewise.
8058 (vst1q_f64_x2): Likewise.
8059 (vst1q_p64_x2): Likewise.
8060 (vst1_s64_x3): Likewise.
8061 (vst1_u64_x3): Likewise.
8062 (vst1_f64_x3): Likewise.
8063 (vst1_s8_x3): Likewise.
8064 (vst1_p8_x3): Likewise.
8065 (vst1_s16_x3): Likewise.
8066 (vst1_p16_x3): Likewise.
8067 (vst1_s32_x3): Likewise.
8068 (vst1_u8_x3): Likewise.
8069 (vst1_u16_x3): Likewise.
8070 (vst1_u32_x3): Likewise.
8071 (vst1_f16_x3): Likewise.
8072 (vst1_f32_x3): Likewise.
8073 (vst1_p64_x3): Likewise.
8074 (vst1q_s8_x3): Likewise.
8075 (vst1q_p8_x3): Likewise.
8076 (vst1q_s16_x3): Likewise.
8077 (vst1q_p16_x3): Likewise.
8078 (vst1q_s32_x3): Likewise.
8079 (vst1q_s64_x3): Likewise.
8080 (vst1q_u8_x3): Likewise.
8081 (vst1q_u16_x3): Likewise.
8082 (vst1q_u32_x3): Likewise.
8083 (vst1q_u64_x3): Likewise.
8084 (vst1q_f16_x3): Likewise.
8085 (vst1q_f32_x3): Likewise.
8086 (vst1q_f64_x3): Likewise.
8087 (vst1q_p64_x3): Likewise.
8089 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8091 * config/msp430/msp430.c (msp430_output_labelref): Prepend
8092 user_label_prefix to name.
8094 * tree-core.h: Update comment about the format of NAME string
8095 passed to handler in attribute_spec.
8097 * config/msp430/msp430.md: Remove erroneous subreg expression from
8098 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8099 zero_extend{q,h}isi2.
8101 2018-05-30 Borislav Petkov <bp@suse.de>
8103 * doc/extend.texi: Document some architecture specific
8104 constraints and sort entries.
8106 2018-05-30 Martin Sebor <msebor@redhat.com>
8109 * builtins.c (expand_builtin_stpcpy_1): New function.
8110 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8111 only if the former succeeds.
8113 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8115 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8118 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8120 * doc/invoke.texi (-flinker-output): Document
8122 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8124 * passes.c (ipa_write_summaries): Only modify statements if body
8126 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8127 incrementally linking.
8128 (ipa_passes): Likewise.
8129 * lto-cgraph.c (lto_output_node): When incrementally linking do not
8130 pass down resolution info.
8131 * common.opt (flag_incremental_link): Update info.
8132 * gcc.c (plugin specs): Turn flinker-output=* to
8133 -plugin-opt=-linker-output-known
8134 * toplev.c (compile_file): Also cut compilation when doing incremental
8136 * flag-types. (enum lto_partition_model): Add
8137 LTO_LINKER_OUTPUT_NOLTOREL.
8138 (invoke.texi): Add -flinker-output docs.
8139 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8140 link same way as WPA; do not stream in dead initializers.
8142 * dwarf2out.c (dwarf2out_die_ref_for_decl,
8143 darf2out_register_external_decl): Support incremental link.
8145 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8147 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8149 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8151 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8152 it down to simple_object_copy_lto_debug_sections.
8153 (run_gcc): Determine incremental LTO link time and configure
8154 lto1 into non-wpa mode, disable renaming of debug sections.
8156 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
8158 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8159 descriptions of various incorrectly documented functions.
8161 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
8164 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8165 address check not strict.
8167 2018-05-30 Richard Biener <rguenther@suse.de>
8169 PR tree-optimization/85964
8170 * tracer.c (better_p): Drop initialized count check, we only
8171 call the function with initialized counts now.
8172 (find_best_successor): Do find a best edge if one
8173 has uninitialized count.
8174 (find_best_predecessor): Likewise. Do BB frequency check only
8175 if count is initialized.
8177 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
8179 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8180 (aarch64_ldrstr_offset_compare): New.
8181 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8182 load/store orderings.
8183 (aarch64_gen_adjusted_ldpstp): Likewise.
8185 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
8187 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8188 Check for subset of GENERAL_REGS and FP_REGS.
8189 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8192 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
8194 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8195 and wi::to_poly_offset. Add the current offset and then check
8196 whether the sum fits, rather than using an unchecked addition of
8197 a checked term. Check for a shwi rather than a uhwi.
8198 * expr.c (get_bit_range): Use tree_to_poly_uint64.
8199 (store_constructor): Use poly_int_tree_p.
8200 (expand_expr_real_1): Likewise.
8201 * function.c (assign_temp): Likewise.
8202 * fold-const.c (const_binop): Use poly_int_tree_p and
8204 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
8206 * ipa-icf-gimple.c (func_checker::compare_operand): Use
8207 to_poly_offset for MEM offsets.
8208 * ipa-icf.c (sem_variable::equals): Likewise.
8209 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8210 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8211 wi::to_poly_offset for BIT_FIELD_REF offsets.
8212 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8214 * var-tracking.c (emit_note_insn_var_location): Use
8215 tree_to_poly_uint64.
8217 2018-05-29 Jim Wilson <jimw@sifive.com>
8219 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8221 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
8224 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8225 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8227 (sse4_1_round<mode>2): Use nonimmediate_operand
8228 for operand 1 predicate.
8230 2018-05-29 Martin Sebor <msebor@redhat.com>
8231 Richard Biener <rguenther@suse.de>
8234 * calls.c (get_size_range): Call determine_value_range instead
8235 of get_value_range..
8236 * tree-vrp.h (determine_value_range): Declared new function.
8237 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8239 2018-05-29 Richard Biener <rguenther@suse.de>
8241 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8242 sure to use non-pattern stmts for get_earlier_stmt arguments.
8243 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8244 called on pattern stmts.
8245 (get_later_stmt): Likewise.
8247 2018-05-29 Martin Liska <mliska@suse.cz>
8249 PR gcov-profile/85759
8250 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8253 2018-05-29 Jakub Jelinek <jakub@redhat.com>
8255 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8257 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8261 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8262 VEC_PACK_FLOAT_EXPR): New tree codes.
8263 * tree-pretty-print.c (op_code_prio): Handle
8264 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8265 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8266 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8267 * tree-inline.c (estimate_operator_cost): Likewise.
8268 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8269 * fold-const.c (const_binop): Likewise.
8270 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8271 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8272 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8273 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8274 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8275 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8276 * expr.c (expand_expr_real_2): Likewise.
8277 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8278 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8279 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8281 * optabs.c (expand_widen_pattern_expr): For
8282 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8283 sign from result type rather than operand's type.
8284 (expand_binop_directly): For vec_packu_float_optab and
8285 vec_packs_float_optab allow result type to be different from operand's
8287 * optabs-tree.c (optab_for_tree_code): Handle
8288 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8289 VEC_PACK_FLOAT_EXPR. Formatting fixes.
8290 * tree-vect-generic.c (expand_vector_operations_1): Handle
8291 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8292 VEC_PACK_FLOAT_EXPR.
8293 * tree-vect-stmts.c (supportable_widening_operation): Handle
8295 (supportable_narrowing_operation): Handle FLOAT_EXPR.
8296 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8297 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8298 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
8299 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8301 (vec_pack<floatprefix>_float_<mode>): New expander.
8302 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8304 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8305 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8306 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8307 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8308 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8310 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8311 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8312 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8313 VEC_PACK_FLOAT_EXPR): Document.
8315 2018-05-29 Richard Biener <rguenther@suse.de>
8317 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8319 (stmt_vec_info_vec): Make pointer.
8320 (init_stmt_vec_info_vec): Remove.
8321 (free_stmt_vec_info_vec): Likewise.
8322 (set_stmt_vec_info_vec): New function.
8323 (free_stmt_vec_infos): Likewise.
8324 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8325 (set_vinfo_for_stmt): Likewise.
8326 (get_earlier_stmt): Likewise.
8327 (get_later_stmt): Likewise.
8328 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8329 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8330 (vec_info::~vec_info): Free stmt_vec_infos.
8331 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8332 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8333 (pass_slp_vectorize::execute): Likewise.
8334 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8335 (free_stmt_vec_info_vec): Likewise.
8336 (set_stmt_vec_info_vec): New function.
8337 (free_stmt_vec_infos): Likewise.
8338 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8339 the global stmt_vec_info_vec.
8340 * tree-parloops.c (gather_scalar_reductions): Use
8341 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8344 2018-05-29 Richard Biener <rguenther@suse.de>
8346 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8348 2018-05-29 Martin Liska <mliska@suse.cz>
8349 David Malcolm <dmalcolm@redhat.com>
8351 * vec.c (test_reverse): New.
8352 (vec_c_tests): Add new test.
8353 * vec.h (vl_ptr>::reverse): New function.
8355 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
8357 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8359 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8362 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
8364 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8366 2018-05-28 Richard Biener <rguenther@suse.de>
8368 PR tree-optimization/85933
8369 * tree-vect-data-refs.c (vect_record_base_alignments): Only
8370 look at stmts marked as vectorizable.
8372 2018-05-28 Richard Biener <rguenther@suse.de>
8374 PR tree-optimization/85934
8375 * tree-vect-generic.c (expand_vector_operations_1): Hoist
8376 vector boolean check before scalar optimization.
8378 2018-05-28 Jakub Jelinek <jakub@redhat.com>
8380 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8383 2018-05-28 Mark Wielaard <mark@klomp.org>
8385 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8386 if it is an expression containing a minus sign.
8388 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
8390 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8392 2018-05-27 Paul Koning <ni1d@arrl.net>
8394 * config/pdp11/pdp11.md (truncsihi2): Remove.
8396 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
8397 Chung-Ju Wu <jasonwucj@gmail.com>
8399 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8401 (unaligned_store_dw): Ditto.
8402 * config/nds32/nds32-memory-manipulation.c
8403 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8404 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8405 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8406 (emit_setmem_word_loop): Rename to ...
8407 (emit_setmem_doubleword_loop): ... this.
8408 (nds32_gen_dup_4_byte_to_word_value): New function.
8409 (nds32_gen_dup_8_byte_to_double_word_value): New function.
8410 (nds32_expand_setmem_loop): Refine implementation.
8411 (nds32_expand_setmem_loop_v3m): Ditto.
8412 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8415 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8417 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8419 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8421 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8422 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8423 machine->attr_no_prologue_p.
8424 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8425 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8426 (nds32_expand_epilogue): Consider attr_naked_p.
8427 (nds32_expand_epilogue_v3pop): Likewise.
8428 (nds32_can_use_return_insn): Likewise.
8429 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8430 attr_no_prologue_p fields.
8431 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8433 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8436 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8438 * config/i386/sse.md
8439 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8441 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8443 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8445 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8447 (*<floatsuffix>floatv2div2sf2): Rename to ...
8448 (*float<floatunssuffix>v2div2sf2): ... this.
8449 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8450 (float<floatunssuffix>v2div2sf2_mask): ... this.
8451 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8452 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8453 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8455 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8457 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8459 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8461 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8463 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8465 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8466 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8467 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8468 gen_ufix_truncv8dfv8si2.
8469 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8470 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8471 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8472 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8473 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8474 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8475 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8476 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8478 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8482 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8484 2018-05-25 Jim Wilson <jimw@sifive.com>
8486 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8487 * config/riscv/riscv.c (struct machine_function): Add
8488 interrupt_handler_p and attribute_checked_p fields.
8489 (riscv_attribute_table): Add interrupt.
8490 (riscv_interrupt_type_p): New.
8491 (riscv_save_reg_p): Save extra regs for interrupt handler.
8492 (riscv_use_save_libcall): Return false for interrupt handler.
8493 (riscv_first_stack_step): Add forward declaration.
8494 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8495 for interrupt handler with large frame. Use it for saved reg list.
8496 (riscv_expand_prologue): Move flag_stack_usage_info support to
8497 eliminate duplication.
8498 (riscv_expand_epilogue): Generate mret for interrupt handler.
8499 (riscv_epilogue_uses): New.
8500 (riscv_can_use_return_insn): Return false for interrupt handler.
8501 (riscv_function_ok_for_sibcall): Likewise.
8502 (riscv_set_current_function): Add interrupt handler support.
8503 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8504 * config/riscv/riscv.md (UNSPECV_MRET): New.
8506 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8508 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8510 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8512 PR tree-optimization/85712
8513 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8514 this candidate has already been replaced in-situ by a copy.
8516 2018-05-25 Jason Merrill <jason@redhat.com>
8518 PR c++/80485 - inline function non-zero address.
8519 * symtab.c (nonzero_address): Check DECL_COMDAT.
8521 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8524 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8525 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8526 extension of SImode operation. Use const123_operand predicate.
8527 (*saddsi_1): Remove.
8528 (*saddl_se_1): Ditto.
8530 (*ssubl_se_1): Ditto.
8531 * config/alpha/predicates.md (const123_operand): New predicate.
8532 * config/alpha/constraints.md (P): Use IN_RANGE.
8534 2018-05-25 Richard Biener <rguenther@suse.de>
8536 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8538 (ref_maybe_used_by_stmt_p): Likewise.
8539 (stmt_may_clobber_ref_p): Likewise.
8540 (stmt_may_clobber_ref_p_1): Likewise.
8541 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8543 (ref_maybe_used_by_stmt_p): Likewise.
8544 (stmt_may_clobber_ref_p): Likewise.
8545 (stmt_may_clobber_ref_p_1): Likewise.
8546 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8547 the alias oracle to disambiguate DRs with stmts DR analysis
8549 (vect_analyze_data_refs): Do not give up on not analyzable
8550 DRs for BB vectorization. Remove code truncating the dataref
8553 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8556 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8557 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8558 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8560 2018-05-25 Richard Biener <rguenther@suse.de>
8562 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8563 function, combining stmt data ref gathering and fatal analysis
8565 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8566 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8567 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8568 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8569 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8571 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8573 PR tree-optimization/85720
8574 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8575 SCC if all partitions are builtins.
8576 (version_loop_by_alias_check): New parameter. Generate cancelable
8577 runtime alias check if all partitions are builtins.
8578 (distribute_loop): Update call to above function.
8580 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8582 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8583 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8584 (parm_default_def_partition_arg): Ditto.
8585 (set_parm_default_def_partition): Ditto.
8586 (get_parm_default_def_partitions): Ditto and make it static.
8587 (get_undefined_value_partitions): Ditto and make it static.
8588 (remove_ssa_form): Refactor call to init_var_map here.
8589 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8590 computation for loop region.
8591 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8592 (register_default_def): Delete.
8593 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8594 (parm_default_def_partition_arg): Ditto.
8595 (set_parm_default_def_partition): Ditto.
8596 (get_parm_default_def_partitions): Ditto and make it static.
8597 (get_undefined_value_partitions): Ditto and make it static.
8598 (coalesce_with_default, coalesce_with_default): Update comment.
8599 (create_coalesce_list_for_region): New func factored out from
8600 create_outofssa_var_map.
8601 (populate_coalesce_list_for_outofssa): New func factored out from
8602 create_outofssa_var_map and coalesce_ssa_name.
8603 (create_outofssa_var_map): Delete.
8604 (coalesce_ssa_name): Refactor to support live range computation.
8605 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8606 (get_parm_default_def_partitions): Delete.
8607 (get_undefined_value_partitions): Ditto.
8608 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8609 computation for loop region.
8610 (new_tree_live_info, loe_visit_block): Ditto.
8611 (live_worklist, set_var_live_on_entry): Ditto.
8612 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8613 * tree-ssa-live.h (struct _var_map): New fields.
8614 (init_var_map): Change decl.
8615 (region_contains_p): New.
8617 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8619 * tree-ssa-live.h (live_merge_and_clear): Delete.
8621 2018-05-25 Richard Biener <rguenther@suse.de>
8624 * tree-dump.c (dequeue_and_dump): Remove access to removed
8625 operand 2 of a SWITCH_EXPR.
8627 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8629 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8630 multiplication and division.
8631 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8632 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8633 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8634 (cond_udiv_optab, cond_umod_optab): New optabs.
8635 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8636 (IFN_COND_RDIV): New internal functions.
8637 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8638 TRUNC_MOD_EXPR and RDIV_EXPR.
8639 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8640 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8642 (SVE_INT_BINARY): Include mult.
8643 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8644 (optab, sve_int_op): Handle mult.
8645 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8647 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8648 for SVE_INT_BINARY_SD.
8650 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8652 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8653 (optab, sve_int_op): Handle div and udiv.
8654 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8655 for SVE_INT_BINARY_SD.
8656 (*<optab><mode>3): New insn for the same.
8658 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8660 * tree-vect-patterns.c: Include predict.h.
8661 (vect_recog_divmod_pattern): Restrict check for division support
8662 to when optimizing for size.
8664 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8666 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8667 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8668 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8669 (gimple_match_op::set_op): Likewise.
8670 (gimple_resimplify4): Declare.
8671 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8672 (expr::gen_transform): Likewise.
8673 (decision_tree::gen): Generate a simplification routine for 4 operands.
8674 * gimple-match-head.c (gimple_simplify): Add an overload for
8675 4 operands. In the top-level function, handle up to 4 call
8676 arguments and call gimple_resimplify4.
8677 (gimple_resimplify4): New function.
8678 (build_call_internal): Pass a fourth operand.
8679 (maybe_push_to_seq): Likewise.
8680 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8681 Fold VEC_COND_EXPRs of an operation and a default value into
8682 an IFN_COND_* function if possible.
8683 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8685 (SVE_COND_FP_BINARY): Include them.
8686 (optab, sve_fp_op): Handle them.
8687 (SVE_INT_BINARY_REV): New code iterator.
8688 (SVE_COND_FP_BINARY_REV): New int iterator.
8689 (commutative): New int attribute.
8690 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8692 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8694 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8695 (*cond_<optab><mode>): New patterns for reversed operands.
8697 2018-05-25 Richard Biener <rguenther@suse.de>
8699 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8700 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8701 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8702 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8703 * tree-vect-data-refs.c (everywhere): Adjust users.
8704 * tree-vect-loop.c (everywhere): Likewise.
8705 * tree-vect-slp.c (everywhere): Likewise.
8706 * tree-vect-stmts.c (everywhere): Likewise.
8707 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8709 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8711 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8713 (gcc_cv_as_section_exclude): ... this.
8714 Try Solaris as #exclude syntax.
8715 * configure: Regenerate.
8716 * config.in: Regenerate.
8717 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8719 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8720 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8722 * varasm.c (default_elf_asm_named_section): Don't check if
8723 HAVE_GAS_SECTION_EXCLUDE is defined.
8725 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8727 * doc/md.texi: Update the documentation of the cond_* optabs
8728 to mention the new final operand. Fix GET_MODE_NUNITS call.
8729 Describe the scalar case too.
8730 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8731 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8733 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8734 (get_conditional_internal_fn): Update comment.
8735 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8736 accumulator value as a final argument to conditional functions.
8737 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8738 a define_expand and add an "else" operand. Assert for now that
8739 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8740 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8741 (*cond_<optab><mode>): New patterns.
8742 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8743 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8744 (UNSPEC_COND_EOR): Delete.
8745 (optab): Remove associated mappings.
8746 (SVE_INT_BINARY): New code iterator.
8747 (sve_int_op): Remove int attribute and add "minus" to the code
8749 (SVE_COND_INT_OP): Delete.
8750 (SVE_COND_FP_OP): Rename to...
8751 (SVE_COND_FP_BINARY): ...this.
8753 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8755 * optabs.c (can_reuse_operands_p): New function.
8756 (maybe_legitimize_operands): Try to reuse the results for
8759 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8761 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8762 Add {q} suffix to insn mnemonic.
8764 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8766 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8767 (msp430_warn_func_return): New.
8769 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8771 * fold-const.c (tree_nonzero_bits): New function.
8772 * fold-const.h (tree_nonzero_bits): Likewise.
8773 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8774 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8776 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8780 * varasm.c (assemble_alias): Check ifunc_resolver only on
8783 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8786 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8787 when memory input operand is handled.
8789 2018-05-24 Luis Machado <luis.machado@linaro.org>
8791 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8793 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8795 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8797 * match.pd: Delay FMA folds until after vectorization.
8799 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8802 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8803 address check not strict.
8805 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8807 * gimple-match.h (gimple_match_op): New class.
8808 (mprts_hook): Replace parameters with a gimple_match_op *.
8809 (maybe_build_generic_op): Likewise.
8810 (gimple_simplified_result_is_gimple_val): Replace parameters with
8811 a const gimple_match_op *.
8812 (gimple_simplify): Replace code_helper * and tree * parameters with
8813 a gimple_match_op * parameter.
8814 (gimple_resimplify1): Replace code_helper *, tree and tree *
8815 parameters with a gimple_match_op * parameter.
8816 (gimple_resimplify2): Likewise.
8817 (gimple_resimplify3): Likewise.
8818 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8819 parameters with a gimple_match_op * parameter.
8820 * gimple-match-head.c (gimple_simplify): Change prototypes of
8821 auto-generated functions to take a gimple_match_op * instead of
8822 separate code_helper * and tree * parameters. Make the same
8823 change in the top-level overload and update calls to the
8824 gimple_resimplify routines. Update calls to the auto-generated
8825 functions and to maybe_push_res_to_seq in the publicly-facing
8826 operation-specific gimple_simplify overloads.
8827 (gimple_match_op::MAX_NUM_OPS): Define.
8828 (gimple_resimplify1): Replace rcode and ops with a single res_op
8829 parameter. Update call to gimple_simplify.
8830 (gimple_resimplify2): Likewise.
8831 (gimple_resimplify3): Likewise.
8832 (mprts_hook): Replace parameters with a gimple_match_op *.
8833 (maybe_build_generic_op): Likewise.
8834 (build_call_internal): Replace type, nargs and ops with
8835 a gimple_match_op *.
8836 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8837 with a single gimple_match_op *. Update calls to mprts_hook,
8838 build_call_internal and gimple_simplified_result_is_gimple_val.
8839 Factor out code that is common to the tree_code and combined_fn cases.
8840 * genmatch.c (expr::gen_transform): Replace tem_code and
8841 tem_ops with a gimple_match_op called tem_op. Update calls
8842 to the gimple_resimplify functions and maybe_push_res_to_seq.
8843 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8844 res_ops. Update call to the gimple_resimplify functions.
8845 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8846 (decision_tree::gen): Make the functions take a gimple_match_op *
8847 called res_op instead of separate res_code and res_ops parameters.
8848 Update call accordingly.
8849 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8850 and ops with a single res_op parameter. Update calls to
8851 maybe_build_generic_op and maybe_push_res_to_seq.
8852 (fold_stmt_1): Update calls to gimple_simplify and
8853 replace_stmt_with_simplification.
8854 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8855 and gimple_simplified_result_is_gimple_val.
8856 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8858 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8859 with a gimple_match_op *.
8860 (vn_nary_build_or_lookup): Likewise. Update call to
8861 vn_nary_build_or_lookup_1.
8862 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8863 gimple_match_op *. Update calls to the gimple_resimplify routines
8864 and to gimple_simplified_result_is_gimple_val.
8865 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8866 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8867 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8868 (visit_nary_op): Likewise.
8869 (visit_reference_op_load): Likewise.
8871 2018-05-23 Luis Machado <luis.machado@linaro.org>
8873 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8874 modifier for printing the step amount.
8876 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8879 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8882 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8884 * doc/sourcebuild.texi (Endianness): New subsubsection.
8886 2018-05-23 Luis Machado <luis.machado@linaro.org>
8888 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8889 <prefetch_dynamic_strides>: New const bool field.
8890 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8891 prefetch_dynamic_strides.
8892 (exynosm1_prefetch_tune): Likewise.
8893 (thunderxt88_prefetch_tune): Likewise.
8894 (thunderx_prefetch_tune): Likewise.
8895 (thunderx2t99_prefetch_tune): Likewise.
8896 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8898 (aarch64_override_options_internal): Update to set
8899 PARAM_PREFETCH_DYNAMIC_STRIDES.
8900 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8901 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8902 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8903 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8904 prefetch-dynamic-strides setting.
8906 2018-05-23 Luis Machado <luis.machado@linaro.org>
8908 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8909 <minimum_stride>: New const int field.
8910 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8911 minimum_stride field defaulting to -1.
8912 (exynosm1_prefetch_tune): Likewise.
8913 (thunderxt88_prefetch_tune): Likewise.
8914 (thunderx_prefetch_tune): Likewise.
8915 (thunderx2t99_prefetch_tune): Likewise.
8916 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8917 <default_opt_level>: Set to 3.
8918 (aarch64_override_options_internal): Update to set
8919 PARAM_PREFETCH_MINIMUM_STRIDE.
8920 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8921 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8922 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8923 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8924 stride is constant and is below the minimum stride threshold.
8926 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8928 * config/arm/arm-cpus.in (mode26): Delete.
8929 (armv4): Delete mode26 reference.
8930 * config/arm/arm.c (arm_configure_build_target): Delete use of
8933 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8935 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8937 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8938 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8940 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8941 (floatunsdidf2): Ditto.
8943 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8945 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8946 (fixuns_trunc<mode>si2_avx512f): Ditto.
8947 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8948 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8949 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8951 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8953 PR rtl-optimization/79985
8954 * df-scan.c (df_insn_refs_collect): Remove special case for
8955 global registers and asm statements.
8957 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8959 * extend.texi (Global Register Variables): Rewrite the bullet list.
8960 Note that the register is available for allocation. Note that access
8961 via inline asm must use constraints. Add note about async-signal
8962 handlers. Remove paragraph about automagic register selection.
8964 2018-05-23 Richard Biener <rguenther@suse.de>
8966 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8967 of fixed offset from memset VN.
8969 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8971 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8973 (alloc_cand_and_find_basis): Initialize first_interp field.
8974 (slsr_process_mul): Modify first_interp field.
8975 (slsr_process_add): Likewise.
8976 (slsr_process_cast): Modify first_interp field for each new
8978 (slsr_process_copy): Likewise.
8979 (dump_candidate): Dump first_interp field.
8980 (replace_mult_candidate): Process all interpretations, not just
8982 (replace_rhs_if_not_dup): Likewise.
8983 (replace_one_candidate): Likewise.
8985 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8987 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8989 (aarch64_needs_frame_chain): New function.
8990 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8992 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8995 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8996 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8997 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8998 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8999 as true for strict-align.
9000 (aarch64_can_inline_p): Perform checks even when callee has no
9001 attributes to check for strict alignment.
9002 * doc/extend.texi (AArch64 Function Attributes): Document
9004 * doc/invoke.texi: (AArch64 Options): Likewise.
9006 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
9008 PR tree-optimization/85853
9009 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9010 the handling of the root of the node to...
9011 (vect_slp_analyze_node_operations_1): ...this new function,
9012 and run the whole thing with the child nodes' def types
9013 set according to their SLP node's def type.
9015 2018-05-23 Richard Biener <rguenther@suse.de>
9018 * tree-data-ref.c (create_runtime_alias_checks): Defer
9019 and ignore overflow warnings.
9021 2018-05-23 Yury Gribov <tetra2005@gmail.com>
9023 PR tree-optimization/85822
9024 * tree-vrp.c (is_masked_range_test): Fix handling of negative
9027 2018-05-23 Richard Biener <rguenther@suse.de>
9029 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9030 memset constants via native_interpret_expr.
9032 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
9035 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9037 (cgraph_node::create_alias): Likewise.
9038 (cgraph_node::get_availability): Check ifunc_resolver instead
9039 of looking up ifunc attribute.
9040 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9041 * varasm.c (do_assemble_alias): Likewise.
9042 (assemble_alias): Likewise.
9043 (default_binds_local_p_3): Likewise.
9044 * cgraph.h (cgraph_node): Add ifunc_resolver.
9045 (cgraph_node::only_called_directly_or_aliased_p): Return false
9047 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9049 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9050 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9051 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9052 instead of looking up ifunc attribute.
9054 2018-05-22 Luis Machado <luis.machado@linaro.org>
9056 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9058 2018-05-22 Martin Sebor <msebor@redhat.com>
9061 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9062 only when expasion succeeds.
9063 (expand_builtin_strcmp): Same.
9064 (expand_builtin_strncmp): Same.
9066 2018-05-22 Martin Sebor <msebor@redhat.com>
9068 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9070 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9071 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9073 * config/aarch64/aarch64-ldpstp.md: Replace uses of
9074 aarch64_mem_pair_operand with memory_operand and delete operand swapping
9076 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9077 Add check for legitimate_address.
9078 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9079 (aarch64_swap_ldrstr_operands): New.
9080 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9083 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9084 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9086 * config/aarch64/aarch64.md: New patterns to generate stp
9088 (store_pair_sw, store_pair_dw): New patterns to generate stp for
9089 single words and double words.
9090 (load_pair_sw, load_pair_dw): Likewise.
9091 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9093 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9095 * config/aarch64/aarch64-ldpstp.md: Modify peephole
9096 for different mode ldpstp and add peephole for merged zero stores.
9098 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9100 (aarch64_gen_store_pair): Rename calls to match new patterns.
9101 (aarch64_gen_load_pair): Rename calls to match new patterns.
9102 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9103 (load_pair<DREG:mode><DREG2:mode>): ... This.
9104 (store_pair<mode>): Rename to...
9105 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9106 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9108 (V_INT_EQUIV): Handle SImode.
9109 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9112 2018-05-22 Martin Sebor <msebor@redhat.com>
9115 * calls.c (maybe_warn_nonstring_arg): Use string length to set
9116 or ajust the presumed bound on an operation to avoid unnecessary
9119 2018-05-22 Martin Sebor <msebor@redhat.com>
9121 PR tree-optimization/85826
9122 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9123 assuming that a DECL necesarily has a constant size.
9125 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
9128 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9130 2018-05-22 Richard Biener <rguenther@suse.de>
9132 PR tree-optimization/85834
9133 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9134 non-constant and non-zero memset arguments.
9136 2018-05-22 Martin Liska <mliska@suse.cz>
9139 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9141 2018-05-22 Richard Biener <rguenther@suse.de>
9143 PR tree-optimization/85863
9144 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9145 comparisons when vectype is specified.
9146 (vectorizable_condition): Do not specify vectype for
9147 vect_is_simple_cond when SLP vectorizing.
9149 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
9152 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9153 define __ibm128 as long double.
9154 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9155 as a distinct type when IEEE 128-bit support is enabled.
9156 (init_float128_ieee): Fix up conversions between IFmode and IEEE
9157 128-bit types to use the correct functions.
9158 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9159 convert between 128-bit floating point types that have different
9160 modes but the same representation, instead of using gen_lowpart to
9162 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9164 (IFKF_reg): New attributes to give the register constraints for
9166 (extend<mode>tf2_internal): New insns to mark an explicit
9167 conversion between 128-bit floating point types that have a
9168 different mode but share the same representation.
9170 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
9172 PR tree-optimization/85814
9173 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9174 a null return from get_strinfo when unsharing the next
9175 strinfo in the chain.
9177 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9180 * varasm.c (weak_finish): Clean up weak_decls.
9182 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9184 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9185 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9186 UNSPEC_UADALP values.
9187 * config/aarch64/iterators.md (ABAL): New int iterator.
9190 (sur): Add mappings for the above.
9191 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9193 (aarch64_<sur>abal<mode>_4): Likewise.
9194 (aarch64_<sur>adalp<mode>_3): Likewise.
9195 (<sur>sadv16qi): New define_expand.
9197 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
9199 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9200 (*movdf_internal): Ditto.
9201 (*rcpsf2_sse): Ditto.
9202 (*rsqrtsf2_sse): Ditto.
9203 (*sqrt<mode>2_sse): Ditto.
9205 2018-05-21 Tamar Christina <tamar.christina@arm.com>
9207 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9209 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9210 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9211 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9212 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9214 * config/aarch64/arm_neon.h: Likewise.
9215 * config/aarch64/iterators.md (VQ_I): New.
9217 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
9219 * config.gcc: Add arc/t-multilib-linux to tmake_file for
9221 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9224 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9226 * config/nds32/constraints.md (S): New constraint.
9227 * config/nds32/nds32.md (call_internal): Use constraint S.
9228 (call_value_internal): Likewise.
9229 (sibcall_internal): Likewise.
9230 (sibcall_value_internal): Likewise.
9232 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9233 Chung-Ju Wu <jasonwucj@gmail.com>
9235 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9238 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9239 Chung-Ju Wu <jasonwucj@gmail.com>
9241 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9242 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9243 (nds32_rtx_costs_impl): Simplify.
9244 (nds32_address_cost_impl): Simplify.
9245 (nds32_init_rtx_costs): New function.
9246 (nds32_rtx_costs_speed_prefer): Likewise.
9247 (nds32_rtx_costs_size_prefer): Likewise.
9248 (nds32_address_cost_speed_prefer): Likewise.
9249 (nds32_address_cost_speed_fwprop): Likewise.
9250 (nds32_address_cost_size_prefer): Likewise.
9251 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9252 * config/nds32/nds32.c (nds32_option_override): Use
9253 nds32_init_rtx_costs function.
9255 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9257 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9258 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9259 (TARGET_PIPELINE_N8): Likewise.
9260 (TARGET_PIPELINE_N10): Likewise.
9261 (TARGET_PIPELINE_N13): Likewise.
9262 (TARGET_PIPELINE_GRAYWOLF): Likewise.
9264 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
9266 * config/nds32/nds32-fpu.md: Update copyright year.
9268 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9270 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9272 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9274 * config/nds32/nds32.c
9275 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9276 * config/nds32/nds32.opt (minline-asm-r15): New option.
9278 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9280 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9282 * config/nds32/nds32.md (abssi2): New pattern.
9284 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
9286 * config/i386/i386.md (rex64namesuffix): New mode attribute.
9287 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9288 Merge insn pattern from sse_cvtsi2ss<round_name> and
9289 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9290 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9291 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9292 using SWI48 mode iterator.
9293 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9294 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9295 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9296 pattern from sse_cvttss2si<round_saeonly_name>
9297 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9298 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9299 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9300 using SWI48 mode iterator.
9301 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9302 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9303 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9304 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9305 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9306 using SWI48 mode iterator.
9307 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9308 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9309 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9310 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9311 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9312 SWI48 mode iterator.
9313 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9314 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9315 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9316 pattern from sse_cvttsd2si<round_saeonly_name>
9317 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9319 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9321 * config/nds32/nds32-md-auxiliary.c
9322 (nds32_valid_smw_lwm_base_p): Refine.
9323 (nds32_output_smw_single_word): Refine.
9324 (nds32_output_smw_double_word): New.
9325 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9327 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9329 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9330 (nds32_output_stack_pop): Refine.
9331 (nds32_expand_unaligned_load): Refine.
9332 (nds32_expand_unaligned_store): Refine.
9334 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9335 Chung-Ju Wu <jasonwucj@gmail.com>
9337 * config/nds32/constants.md: Add TP_REGNUM constant.
9338 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9339 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9341 * config/nds32/nds32-doubleword.md: Consider flag_pic.
9342 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9343 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9344 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9345 and PIC code generation.
9346 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9348 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9350 * config/nds32/nds32.md: Support TLS and PIC.
9351 * config/nds32/nds32.c: Support TLS and PIC.
9352 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9353 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9356 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9358 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9359 mode with E_ prefix.
9361 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9362 Chung-Ju Wu <jasonwucj@gmail.com>
9364 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9365 * config/nds32/nds32-md-auxiliary.c
9366 (symbolic_reference_mentioned_p): New.
9367 (nds32_legitimize_ict_address): New.
9368 (nds32_expand_ict_move): New.
9369 (nds32_indirect_call_referenced_p): New.
9370 (nds32_symbol_binds_local_p): Delete.
9371 (nds32_long_call_p): Modify.
9372 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9373 * config/nds32/nds32-protos.h
9374 (symbolic_reference_mentioned_p): Declare.
9375 (nds32_legitimize_ict_address): Declare.
9376 (nds32_expand_ict_move): Declare.
9377 (nds32_indirect_call_referenced_p): Declare.
9378 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9379 (nds32_relax_group): Use nds32_ict_const_p as condition.
9380 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9381 (nds32_asm_file_start): Output ict_model directive in asm code.
9382 (nds32_legitimate_address_p): Consider indirect call.
9383 (nds32_print_operand): Consider indirect call.
9384 (nds32_print_operand_address): Consider indirect call.
9385 (nds32_insert_attributes): Handle "indirect_call" attribute.
9386 (TARGET_LEGITIMATE_ADDRESS_P): Define.
9387 (TARGET_LEGITIMATE_CONSTANT_P): Define.
9388 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9389 (TARGET_DELEGITIMIZE_ADDRESS): Define.
9390 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9391 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9392 (TARGET_ICT_MODEL_SMALL): Define.
9393 (TARGET_ICT_MODEL_LARGE): Define.
9394 * config/nds32/nds32.md (movsi): Consider ict model.
9395 (call, call_value): Consider ict model.
9396 (sibcall, sibcall_value): Consider ict model.
9397 * config/nds32/nds32.opt (mict-model): New option.
9398 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9401 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
9402 Monk Chiang <sh.chiang04@gmail.com>
9403 Jim Wilson <jimw@sifive.com>
9405 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9406 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
9407 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9408 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9409 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
9410 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9411 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9412 compute save_libcall_adjustment properly.
9413 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9414 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9415 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9416 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9417 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9418 (ABI_SPEC): Handle mabi=ilp32e.
9419 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9420 (RVE): Add RVE mask.
9421 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9422 <-march>: Add rv32e as an example.
9424 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9427 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9428 (intra_create_variable_infos): Handle C++ constructors.
9430 2018-05-18 Martin Liska <mliska@suse.cz>
9432 * passes.def: Remove a redundant pass.
9434 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9437 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9439 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9441 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9443 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9445 (armv2, armv2a, armv3, armv3m): Delete architectures.
9446 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9447 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9448 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9450 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9451 (*mulsidi3adddi): Likewise.
9452 (mulsidi3): Likewise.
9453 (*mulsidi3_nov6): Likewise.
9454 (umulsidi3): Likewise.
9455 (umulsidi3_nov6): Likewise.
9456 (umaddsidi4): Likewise.
9457 (*umulsidi3adddi): Likewise.
9458 (smulsi3_highpart): Likewise.
9459 (*smulsi3_highpart_nov6): Likewise.
9460 (umulsi3_highpart): Likewise.
9461 (*umulsi3_highpart_nov6): Likewise.
9462 * config/arm/arm.h (arm_arch3m): Delete.
9463 * config/arm/arm.c (arm_arch3m): Delete.
9464 (arm_option_override_internal): Update armv3-related comment.
9465 (arm_configure_build_target): Delete use of isa_bit_mode32.
9466 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9467 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9468 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9470 (mulusa3): Likewise.
9471 * config/arm/arm-protos.h (arm_arch3m): Delete.
9472 * config/arm/arm-tables.opt: Regenerate.
9473 * config/arm/arm-tune.md: Likewise.
9474 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9475 deleted architectures.
9477 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9479 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9480 (armv5t, armv5te): New features.
9481 (ARMv5, ARMv5e): Delete fgroups.
9482 (ARMv5t, ARMv5te): Adjust for above changes.
9484 (armv5, armv5e): Delete arches.
9485 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9487 (*call_reg_arm): Likewise.
9488 (*call_value_reg_armv5): Likewise.
9489 (*call_value_reg_arm): Likewise.
9490 (*call_symbol): Likewise.
9491 (*call_value_symbol): Likewise.
9492 (*sibcall_insn): Likewise.
9493 (*sibcall_value_insn): Likewise.
9495 (prefetch): Likewise.
9496 (define_split and define_peephole2 dependent on arm_arch5):
9498 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9500 (TARGET_ARM_QBIT): Likewise.
9501 (TARGET_DSP_MULTIPLY): Likewise.
9502 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9503 (arm_arch5, arm_arch5e): Delete.
9504 (arm_arch5t, arm_arch5te): Declare.
9505 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9506 (arm_arch5t): Declare.
9507 (arm_option_reconfigure_globals): Update for the above.
9508 (arm_options_perform_arch_sanity_checks): Update comment, replace
9509 use of arm_arch5 with arm_arch5t.
9510 (use_return_insn): Likewise.
9511 (arm_emit_call_insn): Likewise.
9512 (output_return_instruction): Likewise.
9513 (arm_final_prescan_insn): Likewise.
9514 (arm_coproc_builtin_available): Likewise.
9515 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9516 arm_arch5e with arm_arch5t and arm_arch5te.
9517 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9518 (arm_arch5t, arm_arch5te): Declare.
9519 * config/arm/arm-tables.opt: Regenerate.
9520 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9521 * config/arm/t-multilib: Likewise.
9522 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9523 instead of arm_arch5.
9524 (*call_reg_thumb1): Likewise.
9525 (*call_value_reg_thumb1_v5): Likewise.
9526 (*call_value_reg_thumb1): Likewise.
9527 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9529 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9531 2018-05-18 Martin Liska <mliska@suse.cz>
9533 PR gcov-profile/84846
9534 * doc/gcov.texi: Document -t option of gcov tool.
9536 2018-05-18 Martin Liska <mliska@suse.cz>
9538 PR gcov-profile/84846
9539 * gcov.c (print_usage): Add new -t option.
9540 (process_args): Handle the option.
9541 (generate_results): Use stdout as output when requested by
9544 2018-05-18 Martin Liska <mliska@suse.cz>
9546 PR gcov-profile/84846
9547 * coverage.c (coverage_init): Write PWD to .gcno file.
9548 * doc/gcov.texi: Document how working directory is printed.
9549 * gcov-dump.c (dump_gcov_file): Print PWD.
9550 * gcov.c (output_intermediate_file): Likewise.
9551 (read_graph_file): Read PWD string.
9552 (output_lines): Print PWD.
9554 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9557 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9558 for retval and return false if all args to phi are zero.
9560 2018-05-18 Richard Biener <rguenther@suse.de>
9562 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9564 (evrp_dom_walker::before_dom_children): Call it.
9566 2018-05-18 Richard Biener <rguenther@suse.de>
9568 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9569 results when processing array refs with variable index.
9571 2018-05-18 Toon Moene <toon@moene.org>
9573 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9574 directly after that of -floop-interchange. Indicate that both
9575 options are enabled by default when specifying -O3.
9577 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9579 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9580 iterator. Delete separate integer-mode vec_set<mode> expander.
9581 (aarch64_simd_vec_setv2di): Delete.
9582 (vec_setv2di): Delete.
9583 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9584 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9585 the "w, r" alternative.
9587 2018-05-18 Martin Liska <mliska@suse.cz>
9589 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9590 * tree-pass.h (make_pass_lower_switch_O0): New function.
9591 * tree-switch-conversion.c (node_has_low_bound): Remove.
9592 (node_has_high_bound): Likewise.
9593 (node_is_bounded): Likewise.
9594 (class pass_lower_switch): Make it a template type and create
9596 (pass_lower_switch::execute): Add template argument.
9597 (make_pass_lower_switch): New function.
9598 (make_pass_lower_switch_O0): New function.
9599 (do_jump_if_equal): Remove.
9600 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9601 all the hard work to tree optimization passes.
9603 2018-05-18 Martin Liska <mliska@suse.cz>
9605 * dbgcnt.c (limit_low): Renamed from limit.
9606 (limit_high): New variable.
9607 (dbg_cnt_is_enabled): Check for upper limit.
9608 (dbg_cnt): Adjust dumping.
9609 (dbg_cnt_set_limit_by_index): Add new argument for high
9611 (dbg_cnt_set_limit_by_name): Likewise.
9612 (dbg_cnt_process_single_pair): Parse new format.
9613 (dbg_cnt_process_opt): Use strtok.
9614 (dbg_cnt_list_all_counters): Remove 'value' and add
9616 * doc/invoke.texi: Document changes.
9618 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9620 * doc/sourcebuild.texi (scalar_all_fma): Document.
9621 * tree.def (FMA_EXPR): Delete.
9622 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9623 * internal-fn.c (ternary_direct): New macro.
9624 (expand_ternary_optab_fn): Likewise.
9625 (direct_ternary_optab_supported_p): Likewise.
9626 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9627 * builtins.c (fold_builtin_fma): Delete.
9628 (fold_builtin_3): Don't call it.
9629 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9630 * expr.c (expand_expr_real_2): Likewise.
9631 * fold-const.c (operand_equal_p): Likewise.
9632 (fold_ternary_loc): Likewise.
9633 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9634 * gimple.c (DEFTREECODE): Likewise.
9635 * gimplify.c (gimplify_expr): Likewise.
9636 * optabs-tree.c (optab_for_tree_code): Likewise.
9637 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9638 * tree-eh.c (operation_could_trap_p): Likewise.
9639 (stmt_could_throw_1_p): Likewise.
9640 * tree-inline.c (estimate_operator_cost): Likewise.
9641 * tree-pretty-print.c (dump_generic_node): Likewise.
9642 (op_code_prio): Likewise.
9643 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9644 * tree-ssa-operands.c (get_expr_operands): Likewise.
9645 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9646 * fold-const-call.h (fold_fma): Delete.
9647 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9648 CFN_FNMA and CFN_FNMS.
9650 * genmatch.c (combined_fn): New enum.
9651 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9652 (commutative_op): New function.
9653 (commutate): Use it. Handle more than 2 operands.
9654 (dt_operand::gen_gimple_expr): Use commutative_op.
9655 (parser::parse_expr): Allow :c to be used with non-binary
9656 operators if the commutative operand is known.
9657 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9658 CFN_FMS, CFN_FNMA and CFN_FNMS.
9659 (backprop::process_assign_use): Remove FMA_EXPR handling.
9660 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9661 (gen_hsa_fma): New function.
9662 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9663 IFN_FNMA and IFN_FNMS.
9664 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9665 * gimple-fold.h (follow_all_ssa_edges): Declare.
9666 * gimple-fold.c (follow_all_ssa_edges): New function.
9667 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9668 gimple_build interface and use follow_all_ssa_edges to fold the result.
9669 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9670 instead of checking for optabs directly.
9671 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9672 rather than FMA_EXPRs.
9673 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9674 call to IFN_FMA instead of an FMA_EXPR.
9676 2018-05-17 Jim Wilson <jimw@sifive.com>
9678 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9679 sign extended promoted subreg, and the range does not have the sign bit
9680 set, then do a sign extend.
9682 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9683 test, check for sign extended subreg and/or constant operands, and
9684 do a sign extend in that case.
9686 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9688 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9689 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9691 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9692 Change logics_shift_reg to logics_shift_imm.
9693 (thunderx2t99_fp_loadpair_basic): Delete.
9694 (thunderx2t99_fp_storepair_basic): Delete.
9695 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9696 (thunderx2t99_asimd_polynomial): Delete.
9697 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9698 and neon_fp_mul_d_scalar_q.
9699 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9700 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9701 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9702 (thunderx2t99_asimd_lut): Add missing tbl types.
9703 (thunderx2t99_asimd_ext): Delete.
9704 (thunderx2t99_asimd_load1_1_mult): Delete.
9705 (thunderx2t99_asimd_load1_2_mult): Delete.
9706 (thunderx2t99_asimd_load1_ldp): New.
9707 (thunderx2t99_asimd_load1): New.
9708 (thunderx2t99_asimd_load2): Add missing *load2* types.
9709 (thunderx2t99_asimd_load3): New.
9710 (thunderx2t99_asimd_load4): New.
9711 (thunderx2t99_asimd_store1_1_mult): Delete.
9712 (thunderx2t99_asimd_store1_2_mult): Delete.
9713 (thunderx2t99_asimd_store2_mult): Delete.
9714 (thunderx2t99_asimd_store2_onelane): Delete.
9715 (thunderx2t99_asimd_store_stp): New.
9716 (thunderx2t99_asimd_store1): New.
9717 (thunderx2t99_asimd_store2): New.
9718 (thunderx2t99_asimd_store3): New.
9719 (thunderx2t99_asimd_store4): New.
9721 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9723 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9724 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9726 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9727 Segher Boessenkool <segher@kernel.crashing.org>
9730 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9733 2018-05-17 Richard Biener <rguenther@suse.de>
9735 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9736 for pruning loop and prune defs feeding only already visited PHIs.
9738 2018-05-17 Richard Biener <rguenther@suse.de>
9740 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9742 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9743 Richard Biener <rguenther@suse.de>
9745 PR tree-optimization/85793
9746 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9747 for VMAT_ELEMENTWISE.
9749 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9751 * internal-fn.h (lookup_internal_fn): Declare
9752 * internal-fn.c (lookup_internal_fn): New function.
9753 * gimple.c (gimple_build_call_from_tree): Handle calls to
9755 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9756 internal function names.
9757 * tree-pretty-print.c (dump_generic_node): Likewise.
9758 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9760 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9762 * gimple-fold.h (gimple_build): Make the function forms take
9763 combined_fn rather than built_in_function.
9764 (gimple_simplify): Likewise.
9765 * gimple-match-head.c (gimple_simplify): Likewise.
9766 * gimple-fold.c (gimple_build): Likewise.
9767 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9768 rather than gimple_build_call_internal.
9769 (get_initial_defs_for_reduction): Likewise.
9770 (vect_create_epilog_for_reduction): Likewise.
9771 (vectorizable_live_operation): Likewise.
9773 2018-05-17 Martin Liska <mliska@suse.cz>
9775 * gimple-ssa-sprintf.c (format_directive): Do not use
9776 space in between 'G_' and '('.
9778 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9781 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9782 even if the mask is not all ones.
9785 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9787 (ix86_gimple_fold_builtin): Likewise.
9790 * config/i386/i386.c: Include tree-vector-builder.h.
9791 (ix86_vector_shift_count): New function.
9792 (ix86_fold_builtin): Fold shift builtins by scalar count.
9793 (ix86_gimple_fold_builtin): Likewise.
9795 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9796 _mm512_setzero): New intrinsics.
9798 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9799 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9801 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9802 code generation for cases where splatting a value is not useful.
9803 * simplify-rtx.c (simplify_ternary_operation): Simplify
9804 vec_merge across a vec_duplicate and a paradoxical subreg forming
9805 a vector mode to a vec_concat.
9807 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9809 * config.gcc: Support "goldmont-plus".
9810 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9812 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9813 PROCESSOR_GOLDMONT_PLUS.
9814 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9815 (processor_target_table): Add "goldmont-plus".
9816 (PTA_GOLDMONT_PLUS): Define.
9817 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9818 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9819 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9820 (fold_builtin_cpu): Add "goldmont-plus".
9821 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9822 (ix86_option_override_internal): Add "goldmont-plus".
9823 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9824 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9825 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9826 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9828 2018-05-17 Richard Biener <rguenther@suse.de>
9830 PR tree-optimization/85757
9831 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9832 remove defs that only feed that PHI from further processing.
9834 2018-05-16 Jim Wilson <jimw@sifive.com>
9836 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9838 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9840 2018-05-16 Mark Wielaard <mark@klomp.org>
9842 * dwarf2out.c (count_index_strings): New function.
9843 (output_indirect_strings): Call count_index_strings and generate
9844 header for dwarf_version >= 5.
9846 2018-05-16 Mark Wielaard <mark@klomp.org>
9848 * dwarf2out.c (dwarf_FORM): New function.
9849 (set_indirect_string): Use dwarf_FORM.
9850 (reset_indirect_string): Likewise.
9851 (size_of_die): Likewise.
9852 (value_format): Likewise.
9853 (output_die): Likewise.
9854 (add_skeleton_AT_string): Likewise.
9855 (output_macinfo_op): Likewise.
9856 (index_string): Likewise.
9857 (output_index_string_offset): Likewise.
9858 (output_index_string): Likewise.
9859 (count_index_strings): Likewise.
9861 2018-05-16 Carl Love <cel@us.ibm.com>
9863 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9864 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9866 2018-05-16 Martin Jambor <mjambor@suse.cz>
9868 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9869 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9871 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9873 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9874 (fnma<mode>4): Likewise.
9875 (fms<mode>4): Likewise.
9876 (fnms<mode>4): Likewise.
9877 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9878 (aarch64_fnma<mode>4): Likewise.
9879 (aarch64_fms<mode>4): Likewise.
9880 (aarch64_fnms<mode>4): Likewise.
9881 (aarch64_fnmadd<mode>4): Likewise.
9883 2018-05-16 Jason Merrill <jason@redhat.com>
9885 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9887 2018-05-16 Richard Biener <rguenther@suse.de>
9889 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9890 (dump_stmt_cost): Declare.
9891 (add_stmt_cost): Dump cost we add.
9892 (add_stmt_costs): New function.
9893 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9895 (vect_analyze_stmt): Adjust prototype.
9896 (vectorizable_condition): Likewise.
9897 (vectorizable_live_operation): Likewise.
9898 (vectorizable_reduction): Likewise.
9899 (vectorizable_induction): Likewise.
9900 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9901 cost vector to pass to vectorizable_ and record afterwards.
9902 (vect_model_reduction_cost): Take cost vector argument and adjust.
9903 (vect_model_induction_cost): Likewise.
9904 (vectorizable_reduction): Likewise.
9905 (vectorizable_induction): Likewise.
9906 (vectorizable_live_operation): Likewise.
9907 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9908 SLP_TREE_NUMBER_OF_VEC_STMTS.
9909 (vect_analyze_slp_cost_1): Remove.
9910 (vect_analyze_slp_cost): Likewise.
9911 (vect_slp_analyze_node_operations): Take visited args and
9912 a target cost vector. Avoid processing already visited stmt sets.
9913 (vect_slp_analyze_operations): Use a local cost vector to gather
9914 costs and register those of non-discarded instances.
9915 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9916 (vect_schedule_slp_instance): Remove copying of
9917 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9919 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9920 adding cost. Record cost entry location.
9921 (vect_prologue_cost_for_slp_op): Function to compute cost of
9922 a constant or invariant generated for SLP vect in the prologue,
9923 split out from vect_analyze_slp_cost_1.
9924 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9925 (vect_model_promotion_demotion_cost): Likewise.
9926 (vect_model_store_cost): Likewise, make static.
9927 (vect_model_load_cost): Likewise.
9928 (vectorizable_bswap): Add cost vector arg and adjust.
9929 (vectorizable_call): Likewise.
9930 (vectorizable_simd_clone_call): Likewise.
9931 (vectorizable_conversion): Likewise.
9932 (vectorizable_assignment): Likewise.
9933 (vectorizable_shift): Likewise.
9934 (vectorizable_operation): Likewise.
9935 (vectorizable_store): Likewise.
9936 (vectorizable_load): Likewise.
9937 (vectorizable_condition): Likewise.
9938 (vectorizable_comparison): Likewise.
9939 (can_vectorize_live_stmts): Likewise.
9940 (vect_analyze_stmt): Likewise.
9941 (vect_transform_stmt): Adjust calls to vectorizable_*.
9942 * tree-vectorizer.c: Include gimple-pretty-print.h.
9943 (dump_stmt_cost): New function.
9945 2018-05-16 Richard Biener <rguenther@suse.de>
9947 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9948 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9949 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9950 (check_name): New callback.
9951 (dse_classify_store): Track cycles via a visited bitmap of PHI
9952 defs and simplify handling of in-loop and across loop dead stores
9953 and properly fail for loop-variant refs. Handle byte-tracking with
9954 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9957 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9959 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9960 (vect_get_mask_type_for_stmt): Likewise.
9961 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9963 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9964 to determine the statement's vector type and the vector type that
9965 should be used for calculating nunits. Deal with cases in which
9966 the type has to be deferred.
9967 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9968 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9969 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9970 (vect_determine_vf_for_stmt): New functions, split out from...
9971 (vect_determine_vectorization_factor): ...here.
9972 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9973 (vect_get_mask_type_for_stmt): New functions, split out from
9974 vect_determine_vectorization_factor.
9976 2018-05-16 Richard Biener <rguenther@suse.de>
9978 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9979 verify the [VEC_]COND_EXPR embedded comparison.
9981 2018-05-15 Martin Sebor <msebor@redhat.com>
9983 PR tree-optimization/85753
9984 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9985 RECORD_TYPE in addition to ARRAY_TYPE.
9987 2018-05-15 Martin Sebor <msebor@redhat.com>
9990 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9992 2018-05-15 Richard Biener <rguenther@suse.de>
9994 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9995 add by_clobber_p one. Change algorithm to collect all defs
9996 representing uses we need to walk and try reducing them to
9997 a single one before failing.
9998 (dse_dom_walker::dse_optimize_stmt): Adjust.
10000 2018-05-13 Mark Wielaard <mark@klomp.org>
10002 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10003 (size_of_loc_descr): Likewise.
10004 (output_loc_operands): Likewise.
10005 (output_loc_operands_raw): Likewise.
10006 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10007 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10008 (hash_loc_operands): Likewise.
10009 (compare_loc_operands): Likewise.
10011 2018-05-14 Mark Wielaard <mark@klomp.org>
10013 * dwarf2out.c (count_index_addrs): New function.
10014 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10016 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10018 PR tree-optimization/83648
10019 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10020 return value as malloc candidate.
10022 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10025 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10026 param as true in call to suggest_attribute.
10028 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
10030 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10031 -mreadonly-in-sdata.
10033 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10035 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10037 (aarch64_crypto_aesd_fused): Likewise.
10039 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
10041 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10042 (movsi_aarch64): Likewise.
10043 (load_pairsi): Likewise.
10044 (load_pairdi): Likewise.
10045 (store_pairsi): Likewise.
10046 (store_pairdi): Likewise.
10047 (load_pairsf): Likewise.
10048 (load_pairdf): Likewise.
10049 (store_pairsf): Likewise.
10050 (store_pairdf): Likewise.
10051 (zero_extend): Likewise.
10052 (trunc): Swap alternatives.
10053 (fcvt_target): Add '?' to prefer w over r.
10055 2018-05-14 Jakub Jelinek <jakub@redhat.com>
10058 * config/i386/i386.md: Disallow non-commutative arithmetics in
10059 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10060 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
10061 in the peephole2 before it.
10063 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
10065 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10066 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10067 (ix86_handle_option): Handle -mcldemote.
10068 * config.gcc: New header.
10069 * config/i386/cldemoteintrin.h: New file.
10070 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10071 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10073 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10074 OPTION_MASK_ISA_CLDEMOTE.
10075 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10076 (ix86_valid_target_attribute_inner_p): Ditto.
10077 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10078 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10079 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10080 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10081 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10083 * config/i386/i386.opt: Add -mcldemote.
10084 * config/i386/x86intrin.h: New header.
10085 * doc/invoke.texi: Add -mcldemote.
10087 2018-05-14 Richard Biener <rguenther@suse.de>
10089 * doc/match-and-simplify.texi: Adjust :s documentation.
10091 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
10093 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10094 intended memcpy size.
10095 (REORDER_45): Likewise.
10097 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
10099 * sort.cc: New file.
10100 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10101 * vec.c (qsort_chk): Use gcc_qsort.
10102 * Makefile.in (OBJS-libcommon): Add sort.o.
10103 (build/sort.o): New target. Use it...
10104 (BUILD_RTL): ... here, and...
10105 (build/gencfn-macros): ... here, and...
10106 (build/genmatch): ... here.
10108 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10109 Chung-Ju Wu <jasonwucj@gmail.com>
10111 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10112 * config/nds32/nds32-graywolf.md: New file.
10113 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10114 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10116 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10117 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10118 * config/nds32/nds32.md (pipeline_model): Add graywolf.
10119 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10120 * config/nds32/pipelines.md: Include n15 settings.
10122 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10123 Chung-Ju Wu <jasonwucj@gmail.com>
10125 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10126 * config/nds32/nds32-n13.md: New file.
10127 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10128 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10130 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10131 * config/nds32/nds32.md (pipeline_model): Add n13.
10132 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10133 * config/nds32/pipelines.md: Include n13 settings.
10135 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10136 Chung-Ju Wu <jasonwucj@gmail.com>
10138 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10139 * config/nds32/nds32-n10.md: New file.
10140 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10141 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10143 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10144 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10145 * config/nds32/nds32.md (pipeline_model): Add n10.
10146 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10147 * config/nds32/pipelines.md: Include n10 settings.
10149 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
10150 Kito Cheng <kito.cheng@gmail.com>
10151 Chung-Ju Wu <jasonwucj@gmail.com>
10153 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10154 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10155 Add enum values for DSP extension instructions.
10156 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10158 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10159 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10160 New code iterators.
10161 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10162 * config/nds32/nds32-dspext.md: New file for DSP implementation.
10163 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10164 * config/nds32/nds32-intrinsic.md: Likewise.
10165 * config/nds32/nds32_intrinsic.h: Likewise.
10166 * config/nds32/nds32-md-auxiliary.c: Likewise.
10167 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10168 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10169 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10170 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10171 * config/nds32/nds32-protos.h: New declarations for DSP extension.
10172 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10173 TYPE_DMAC in switch statement.
10174 * config/nds32/nds32.c: New checking and implementation for DSP
10175 extension instructions.
10176 * config/nds32/nds32.h: Likewise.
10177 * config/nds32/nds32.md: Likewise.
10178 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10179 * config/nds32/predicates.md: Implement new predicates for DSP
10182 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10184 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10185 Reformat alternatives and attributes so it is easier to identify
10186 which constraints/attributes go with which instruction.
10187 (mov<mode>_hardfloat32, FMOVE64): Likewise.
10188 (mov<mode>_softfloat32, FMOVE64): Likewise.
10189 (mov<mode>_hardfloat64, FMOVE64): Likewise.
10190 (mov<mode>_softfloat64, FMOVE64): Likewise.
10192 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
10194 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10196 (Basic PowerPC Built-in Functions): The new name of the
10197 subsection previously known as "PowerPC Built-in Functions".
10198 (Basic PowerPC Built-in Functions Available on all Configurations):
10200 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10201 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10202 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10203 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10205 2018-05-11 Martin Jambor <mjambor@suse.cz>
10208 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10211 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10214 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10216 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
10218 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10219 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10220 (ix86_handle_option): Handle -mwaitpkg.
10221 * config.gcc: New header.
10222 * config/i386/cpuid.h (bit_WAITPKG): New bit.
10223 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10224 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10226 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10227 OPTION_MASK_ISA_WAITPKG.
10228 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10229 (ix86_option_override_internal): Add PTA_WAITPKG.
10230 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10231 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10232 IX86_BUILTIN_TPAUSE.
10233 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10234 __builtin_ia32_umwait and __builtin_ia32_tpause.
10235 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10236 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10237 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10238 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10239 UNSPECV_TPAUSE): New.
10240 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10241 * config/i386/i386.opt: Add -mwaitpkg.
10242 * config/i386/waitpkgintrin.h: New file.
10243 * config/i386/x86intrin.h: New header.
10244 * doc/invoke.texi: Add -mwaitpkg.
10246 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10249 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10251 (cortex-m0): Use armv6s-m isa.
10252 (cortex-m0plus): Likewise.
10253 (cortex-m1): Likewise.
10254 (cortex-m0.small-multiply): Likewise.
10255 (cortex-m0plus.small-multiply): Likewise.
10256 (cortex-m1.small-multiply): Likewise.
10258 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
10259 Jakub Jelinek <jakub@redhat.com>
10261 PR tree-optimization/85692
10262 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10263 source permute as well.
10265 2018-05-11 Martin Liska <mliska@suse.cz>
10268 * doc/extend.texi: Document LLVM style format for no_sanitize
10271 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
10273 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10274 mode_supports_vsx_dform_quad to mode_supports_dq_form.
10275 (mode_supports_vsx_dform_quad): Likewise.
10276 (mode_supports_vmx_dform): Move these functions to be next to the
10277 other mode_supports functions.
10278 (mode_supports_dq_form): Likewise.
10279 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10280 mode_supports_dq_form.
10281 (reg_offset_addressing_ok_p): Likewise.
10282 (offsettable_ok_by_alignment): Likewise.
10283 (rs6000_legitimate_offset_address_p): Likewise.
10284 (legitimate_lo_sum_address_p): Likewise.
10285 (rs6000_legitimize_address): Likewise.
10286 (rs6000_legitimize_reload_address): Likewise.
10287 (rs6000_secondary_reload_inner): Likewise.
10288 (rs6000_preferred_reload_class): Likewise.
10289 (rs6000_output_move_128bit): Likewise.
10291 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10293 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10294 Generate SImode target register for null target.
10295 <case IX86_BUILTIN_XGETBV>: Ditto.
10296 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10297 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10299 2018-05-10 Carl Love <cel@us.ibm.com>
10301 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10302 dcbtt and dcbtstt if operands[2] is 0.
10304 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10307 * config/i386/sse.md (usadv64qi): New expander.
10309 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
10311 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10312 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10313 -maltivec=be support.
10314 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10315 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10316 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10317 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10318 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10319 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10320 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10321 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10322 altivec_vsumsws): Adjust.
10323 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10324 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10325 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10327 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10328 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10329 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10330 (altivec_lve<VI_char>x): Delete expand.
10331 (*altivec_lve<VI_char>x_internal): Rename to...
10332 (altivec_lve<VI_char>x): ... this.
10333 (altivec_lvxl_<mode>): Delete expand.
10334 (*altivec_lvxl_<mode>_internal): Rename to ...
10335 (altivec_lvxl_<mode>): ... this.
10336 (altivec_stvxl_<mode>): Delete expand.
10337 (*altivec_stvxl_<mode>_internal): Rename to ...
10338 (altivec_stvxl_<mode>): ... this.
10339 (altivec_stve<VI_char>x): Delete expand.
10340 (*altivec_stve<VI_char>x_internal): Rename to ...
10341 (altivec_stve<VI_char>x): ... this.
10342 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10343 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10344 reduc_plus_scal_<mode>): Adjust.
10345 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10347 (rs6000_cpu_cpp_builtins): Adjust.
10348 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10349 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10350 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10351 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10352 -maltivec=be support.
10353 (rs6000_split_vec_extract_var): Adjust.
10354 (rs6000_split_v4si_init): Adjust.
10355 (swap_selector_for_mode): Delete.
10356 (altivec_expand_lvx_be, altivec_expand_stvx_be,
10357 altivec_expand_stvex_be): Delete.
10358 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10359 -maltivec=be support.
10360 (rs6000_gimple_fold_builtin): Ditto.
10361 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10363 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10364 (TARGET_DIRECT_MOVE_64BIT): Adjust.
10365 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10366 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10367 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10368 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10369 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10370 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10371 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10372 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10373 anonymous split): Adjust.
10374 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10375 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10377 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
10379 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10380 when --with-gxx-include-dir is also specified.
10381 * configure: Regenerate.
10383 2018-05-09 Jim Wilson <jimw@sifive.com>
10386 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10387 * config/riscv/t-withmultilib: New.
10388 * config/riscv/withmultilib.h: New.
10389 * doc/install.texi: Document RISC-V --with-multilib-list support.
10391 2018-05-09 Richard Biener <rguenther@suse.de>
10393 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10395 (vect_bb_vectorization_profitable_p): Adjust. Compute
10396 actual scalar cost using the cost vector and the add_stmt_cost
10399 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10401 PR rtl-optimization/85645
10402 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10403 in the REG_CFA_REGISTER note for LR, don't leave it empty.
10405 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10407 PR rtl-optimization/85645
10408 * shrink-wrap.c (spread_components): Return a boolean saying if
10409 anything was changed.
10410 (try_shrink_wrapping_separate): Iterate spread_components until
10411 nothing changes anymore.
10413 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10415 PR rtl-optimization/85645
10416 * regrename.c (build_def_use): Also kill the chains that include the
10417 destination of a REG_CFA_REGISTER note.
10419 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10421 PR rtl-optimization/85645
10422 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10423 insn that has a REG_CFA_REGISTER note.
10425 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10427 * cfgexpand.c (expand_clobber): New function.
10428 (expand_gimple_stmt_1): Use it.
10429 * tree-vect-stmts.c (vect_clobber_variable): New function,
10431 (vectorizable_simd_clone_call): ...here.
10432 (vectorizable_store): Emit a clobber either side of an
10433 IFN_STORE_LANES sequence.
10434 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10436 2018-05-09 Tom de Vries <tom@codesourcery.com>
10439 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10440 (define_insn "trap_if_false"): Add exit after trap.
10442 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10444 PR rtl-optimization/85638
10445 * bb-reorder.c: Include common/common-target.h.
10446 (create_forwarder_block): New function extracted from...
10447 (fix_up_crossing_landing_pad): ...here. Rename into...
10448 (dw2_fix_up_crossing_landing_pad): ...this.
10449 (sjlj_fix_up_crossing_landing_pad): New function.
10450 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10451 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10452 from both partitions and exit the loop after one iteration.
10454 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10457 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10459 (Basic PowerPC Built-in Functions): The new name of the
10460 subsection previously known as "PowerPC Built-in Functions".
10461 (Basic PowerPC Built-in Functions Available on all Configurations):
10463 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10465 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10467 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10469 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10472 2018-05-08 Jim Wilson <jimw@sifive.com>
10474 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10475 (LD_EMUL_SUFFIX): New.
10476 (LINK_SPEC): Use it.
10478 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10480 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10482 (Basic PowerPC Built-in Functions): The new name of the
10483 subsection previously known as "PowerPC Built-in Functions".
10484 (Basic PowerPC Built-in Functions Available on all Configurations):
10486 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10488 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10490 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10492 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10495 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10498 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10499 after cmpelim optimization.
10501 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10503 * config.gcc: Support "goldmont".
10504 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10505 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10506 PROCESSOR_GOLDMONT.
10507 * config/i386/i386.c (m_GOLDMONT): Define.
10508 (processor_target_table): Add "goldmont".
10509 (PTA_GOLDMONT): Define.
10510 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10511 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10512 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10513 (fold_builtin_cpu): Add "goldmont".
10514 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10515 (ix86_option_override_internal): Add "goldmont".
10516 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10517 (processor_type): Add PROCESSOR_GOLDMONT.
10518 * config/i386/i386.md: Add CPU "glm".
10519 * config/i386/glm.md: New file.
10520 * config/i386/x86-tune.def: Add m_GOLDMONT.
10521 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10523 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10526 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10528 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10529 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10530 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10533 * config/i386/i386.c (ix86_fold_builtin): Handle
10534 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10537 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10538 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10540 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10543 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10544 (check_arch): Likewise.
10545 (check_fpu): Return the result rather than printing it.
10546 (end arch): Fix operator precedence.
10547 (end cpu): Likewise.
10548 (END): Print the result from check_fpu.
10550 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10551 Alan Hayward <alan.hayward@arm.com>
10552 David Sherwood <david.sherwood@arm.com>
10554 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10555 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10556 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10557 (*fcmuo<mode>_and): New patterns.
10559 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10561 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10562 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10563 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10564 (cmp_op, sve_imm_con): New code attributes.
10565 (SVE_COND_INT_CMP, imm_con): Delete.
10566 (cmp_op): Remove above unspecs from int attribute.
10567 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10569 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10570 comparison-specific unspecs.
10571 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10572 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10573 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10574 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10575 (*vec_fcm<cmp_op><mode>): Rename to...
10576 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10577 (*vec_fcmuo<mode>): Rename to...
10578 (*fcmuo<mode>): ...this and adjust likewise.
10579 (*pred_fcm<cmp_op><mode>): New pattern.
10580 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10581 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10583 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10585 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10586 (aarch64_emit_sve_predicated_cond): New function.
10587 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10588 (aarch64_emit_unspec_cond_or): Replace with...
10589 (aarch64_emit_sve_or_conds): ...this new function. Use
10590 aarch64_emit_sve_ptrue_op for the individual comparisons and
10591 aarch64_emit_binop to OR them together.
10592 (aarch64_emit_inverted_unspec_cond): Replace with...
10593 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10594 aarch64_emit_sve_ptrue_op for the comparison and
10595 aarch64_emit_unop to invert the result.
10596 (aarch64_expand_sve_vec_cmp_float): Update after the above
10597 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10599 2018-05-07 Nathan Sidwell <nathan@acm.org>
10601 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10602 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10603 (Backwards Compatibility): Likewise.
10605 2018-05-07 Luis Machado <luis.machado@linaro.org>
10609 2018-05-07 Luis Machado <luis.machado@linaro.org>
10611 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10612 <prefetch_dynamic_strides>: New const bool field.
10613 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10614 prefetch_dynamic_strides.
10615 (exynosm1_prefetch_tune): Likewise.
10616 (thunderxt88_prefetch_tune): Likewise.
10617 (thunderx_prefetch_tune): Likewise.
10618 (thunderx2t99_prefetch_tune): Likewise.
10619 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10621 (aarch64_override_options_internal): Update to set
10622 PARAM_PREFETCH_DYNAMIC_STRIDES.
10623 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10624 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10625 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10626 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10627 prefetch-dynamic-strides setting.
10629 2018-05-07 Luis Machado <luis.machado@linaro.org>
10631 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10632 <minimum_stride>: New const int field.
10633 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10634 minimum_stride field.
10635 (exynosm1_prefetch_tune): Likewise.
10636 (thunderxt88_prefetch_tune): Likewise.
10637 (thunderx_prefetch_tune): Likewise.
10638 (thunderx2t99_prefetch_tune): Likewise.
10639 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10640 (aarch64_override_options_internal): Update to set
10641 PARAM_PREFETCH_MINIMUM_STRIDE.
10642 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10643 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10644 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10645 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10646 stride is constant and is below the minimum stride threshold.
10648 2018-05-07 Luis Machado <luis.machado@linaro.org>
10650 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10653 2018-05-07 Luis Machado <luis.machado@linaro.org>
10655 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10656 <prefetch_dynamic_strides>: New const bool field.
10657 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10658 prefetch_dynamic_strides.
10659 (exynosm1_prefetch_tune): Likewise.
10660 (thunderxt88_prefetch_tune): Likewise.
10661 (thunderx_prefetch_tune): Likewise.
10662 (thunderx2t99_prefetch_tune): Likewise.
10663 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10665 (aarch64_override_options_internal): Update to set
10666 PARAM_PREFETCH_DYNAMIC_STRIDES.
10667 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10668 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10669 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10670 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10671 prefetch-dynamic-strides setting.
10673 2018-05-07 Luis Machado <luis.machado@linaro.org>
10675 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10676 <minimum_stride>: New const int field.
10677 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10678 minimum_stride field.
10679 (exynosm1_prefetch_tune): Likewise.
10680 (thunderxt88_prefetch_tune): Likewise.
10681 (thunderx_prefetch_tune): Likewise.
10682 (thunderx2t99_prefetch_tune): Likewise.
10683 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10684 (aarch64_override_options_internal): Update to set
10685 PARAM_PREFETCH_MINIMUM_STRIDE.
10686 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10687 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10688 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10689 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10690 stride is constant and is below the minimum stride threshold.
10692 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10695 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10696 the type is addressable. Don't force op into register if it has
10699 2018-05-05 Roland McGrath <mcgrathr@google.com>
10702 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10703 any section for which we don't know a specific type it should have,
10704 regardless of name. Previously this was done only for the exact
10705 names ".init_array", ".fini_array", and ".preinit_array".
10706 (default_elf_asm_named_section): Add comment about
10707 relationship with default_section_type_flags and SECTION_NOTYPE.
10708 (get_section): Don't consider it a type conflict if one side has
10709 SECTION_NOTYPE and the other doesn't, as long as neither has the
10710 SECTION_BSS et al used in the default_section_type_flags logic.
10712 2018-05-05 Tom de Vries <tom@codesourcery.com>
10715 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10716 (workaround_barsyncs): New function.
10717 (nvptx_reorg): Use workaround_barsyncs.
10718 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10719 (define_expand "nvptx_membar_cta"): New define_expand.
10720 (define_insn "*nvptx_membar_cta"): New insn.
10722 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10724 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10725 To improve optimization opportunities.
10726 * builtin-types.def: The new needed builtin types for the above.
10728 2018-05-04 Richard Biener <rguenther@suse.de>
10730 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10731 * gimple-ssa-store-merging.c
10732 (imm_store_chain_info::output_merged_store): Remove redundant create,
10733 release split_store vector contents on failure.
10734 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10735 scalar stmt vector on cache hit.
10737 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10739 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10741 * config.gcc (powerpc-xilinx-eabi*): Remove.
10742 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10744 (fusion_addis_mem_combo_load): Ditto.
10745 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10747 (rs6000_cpu_cpp_builtins): Ditto.
10748 * config/rs6000/rs6000-linux.c
10749 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10750 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10751 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10753 (rs6000_setup_reg_addr_masks): Ditto.
10754 (rs6000_init_hard_regno_mode_ok): Ditto.
10755 (rs6000_option_override_internal): Ditto.
10756 (legitimate_lo_sum_address_p): Ditto.
10757 (rs6000_legitimize_address): Ditto.
10758 (rs6000_legitimize_reload_address): Ditto.
10759 (rs6000_legitimate_address_p): Ditto.
10760 (abi_v4_pass_in_fpr): Ditto.
10761 (setup_incoming_varargs): Ditto.
10762 (rs6000_gimplify_va_arg): Ditto.
10763 (rs6000_split_multireg_move): Ditto.
10764 (rs6000_savres_strategy): Ditto.
10765 (rs6000_emit_prologue_components): Ditto.
10766 (rs6000_emit_epilogue_components): Ditto.
10767 (rs6000_emit_prologue): Ditto.
10768 (rs6000_emit_epilogue): Ditto.
10769 (rs6000_elf_file_end): Ditto.
10770 (rs6000_function_value): Ditto.
10771 (rs6000_libcall_value): Ditto.
10772 * config/rs6000/rs6000.h: Ditto.
10773 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10774 (TARGET_MINMAX): ... this. New.
10775 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10776 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10777 (*movsi_internal1_single): Delete.
10778 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10779 mfpu=, mxilinx-fpu): Delete.
10780 * config/rs6000/singlefp.h: Delete.
10781 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10782 * config/rs6000/t-rs6000: Ditto.
10783 * config/rs6000/t-xilinx: Delete.
10784 * config/rs6000/titan.md: Adjust for fp_type removal.
10785 * config/rs6000/vsx.md: Remove Xilinx FP support.
10786 (VStype_simple): Delete.
10787 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10788 * config/rs6000/xfpu.h: Delete.
10789 * config/rs6000/xfpu.md: Delete.
10790 * config/rs6000/xilinx.h: Delete.
10791 * config/rs6000/xilinx.opt: Delete.
10792 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10793 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10795 2018-05-04 Tom de Vries <tom@codesourcery.com>
10798 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10801 2018-05-04 Richard Biener <rguenther@suse.de>
10803 PR middle-end/85627
10804 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10805 (expand_complex_div_wide): Likewise.
10806 (expand_complex_operations_1): Likewise.
10807 (expand_complex_libcall): Preserve EH info of the original stmt.
10808 (tree_lower_complex): Handle removed blocks.
10809 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10810 on complex multiplication and division libcall builtins.
10812 2018-05-04 Richard Biener <rguenther@suse.de>
10814 PR middle-end/85574
10815 * fold-const.c (negate_expr_p): Restrict negation of operand
10816 zero of a division to when we know that can happen without
10818 (fold_negate_expr_1): Likewise.
10820 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10823 * real.h (real_nextafter): Declare.
10824 * real.c (real_nextafter): New function.
10825 * fold-const-call.c (fold_const_nextafter): New function.
10826 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10827 CASE_CFN_NEXTTOWARD.
10828 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10829 even when arg1_mode is different from arg0_mode.
10831 2018-05-03 Nathan Sidwell <nathan@acm.org>
10833 * doc/extend.texi (Deprecated Features): Remove
10834 -ffriend-injection.
10835 (Backwards Compatibility): Likewise.
10836 * doc/invoke.texi (C++ Language Options): Likewise.
10837 (C++ Dialect Options): Likewise.
10839 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10842 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10843 _mm512_mask_mullox_epi64): New intrinsics.
10845 2018-05-03 Tom de Vries <tom@codesourcery.com>
10848 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10849 dump files): Add offload-tree.
10851 2018-05-03 Richard Biener <rguenther@suse.de>
10853 PR tree-optimization/85615
10854 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10855 to loops not nested in BBs loop father to avoid creating multi-entry
10858 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10860 PR tree-optimization/70291
10861 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10862 arguments. Change return type to tree. Emit libcall as a new
10863 statement rather than replacing existing one when inplace_p is true.
10864 (expand_complex_multiplication_components): New function.
10865 (expand_complex_multiplication): Expand floating-point complex
10866 multiplication using the above.
10867 (expand_complex_division): Rename inner_type parameter to type.
10868 Update expand_complex_libcall call-site.
10869 (expand_complex_operations_1): Update expand_complex_multiplication
10870 and expand_complex_division call-sites.
10872 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10875 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10876 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10877 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10878 the highest significant bit of the shift count mask is clear. In
10879 check whether and[sq]i3 is needed verify that all significant bits
10880 of the shift count other than the highest are set.
10882 2018-05-02 Tom de Vries <tom@codesourcery.com>
10885 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10886 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10887 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10888 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10889 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10890 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10891 __builtin_goacc_parlevel_size.
10893 2018-05-02 Richard Biener <rguenther@suse.de>
10895 PR tree-optimization/85597
10896 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10897 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10900 2018-05-02 Tom de Vries <tom@codesourcery.com>
10903 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10904 dump files): Add ltrans-tree.
10906 2018-05-02 Tom de Vries <tom@codesourcery.com>
10909 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10910 dump files): Add wpa-ipa.
10912 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10914 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10915 powerpc*-*-linux*paired* target.
10916 * config/rs6000/750cl.h: Delete.
10917 * config/rs6000/paired.h: Delete.
10918 * config/rs6000/paired.md: Delete.
10919 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10921 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10922 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10923 comment. Remove paired float support.
10924 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10925 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10927 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10928 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10930 * config/rs6000/rs6000.c: Remove paired float support.
10931 (paired_expand_vector_init, paired_expand_vector_move,
10932 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10933 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10934 paired_expand_builtin, paired_expand_predicate_builtin,
10935 paired_init_builtins): Delete.
10936 * config/rs6000/rs6000.h: Remove paired float support.
10937 * config/rs6000/rs6000.md: Remove paired float support.
10938 (move_from_CR_ov_bit): Delete.
10939 * config/rs6000/rs6000.opt (mpaired): Delete.
10940 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10941 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10943 2018-05-02 Richard Biener <rguenther@suse.de>
10945 PR middle-end/85567
10946 * gimplify.c (gimplify_save_expr): When in SSA form allow
10947 SAVE_EXPRs to compute to SSA vars.
10949 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10952 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10953 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10954 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10955 clobber operands[2], instead use a new pseudo. Formatting fixes.
10957 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10959 PR tree-optimization/85586
10960 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10961 exit early for statements in the same group if the accesses are
10964 2018-05-02 Tom de Vries <tom@codesourcery.com>
10967 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10970 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10972 PR tree-optimization/85143
10973 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10975 2018-05-01 Tom de Vries <tom@codesourcery.com>
10978 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10979 not found" error message.
10981 2018-05-01 Tom de Vries <tom@codesourcery.com>
10984 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10985 * vec.c (test_ordered_remove_if): New function.
10986 (vec_c_tests): Call test_ordered_remove_if.
10987 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10988 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10989 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10990 VEC_ORDERED_REMOVE_IF.
10992 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10994 PR tree-optimization/82665
10995 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10996 pointer subtraction where arguments come from a memchr call.
10998 2018-05-01 Jakub Jelinek <jakub@redhat.com>
11000 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11001 --push-state --as-needed and --pop-state instead of --as-needed and
11002 --no-as-needed if ld supports it.
11003 * configure: Regenerated.
11006 * doc/install.texi2html: Replace _002d with - and _002a with * in
11007 generated html files using sed.
11009 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11012 * gcc-rich-location.c (blank_line_before_p): New function.
11013 (use_new_line): New function.
11014 (gcc_rich_location::add_fixit_insert_formatted): New function.
11015 * gcc-rich-location.h
11016 (gcc_rich_location::add_fixit_insert_formatted): New function.
11018 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11020 * selftest.c (assert_streq): Rename "expected" and "actual" to
11021 "val1" and "val2". Extend NULL-handling to cover both inputs
11022 symmetrically, while still requiring both to be non-NULL for a pass.
11023 * selftest.h (assert_streq): Rename "expected" and "actual" to
11025 (ASSERT_EQ): Likewise.
11026 (ASSERT_EQ_AT): Likewise.
11027 (ASSERT_KNOWN_EQ): Likewise.
11028 (ASSERT_KNOWN_EQ_AT): Likewise.
11029 (ASSERT_NE): Likewise.
11030 (ASSERT_MAYBE_NE): Likewise.
11031 (ASSERT_MAYBE_NE_AT): Likewise.
11032 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
11033 the assertion to pass.
11034 (ASSERT_STREQ_AT): Likewise.
11036 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11038 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11039 interaction with -pie.
11041 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11043 * selftest.h: Fix alphabetization of per-source-file selftest
11046 2018-04-30 Jason Merrill <jason@redhat.com>
11048 PR c++/61982 - dead stores to destroyed objects.
11049 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11052 2018-04-30 Jason Merrill <jason@redhat.com>
11054 * tree.c (build_clobber): New.
11055 * tree.h: Declare it.
11056 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11058 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11060 * diagnostic-show-locus.c (layout::layout): Update for
11061 location_get_source_line returning a char_span.
11062 (struct char_span): Move to input.h.
11063 (struct correction): Update for fields in char_span becoming
11065 (struct source_line): Update for location_get_source_line
11066 returning a char_span.
11067 (layout::print_line): Likewise.
11068 * edit-context.c (edited_file::print_content): Likewise.
11069 (edited_file::print_diff_hunk): Likewise.
11070 (edited_file::print_run_of_changed_lines): Likewise.
11071 (edited_file::get_num_lines): Likewise.
11072 (edited_line::edited_line): Likewise.
11073 * final.c (asm_show_source): Likewise.
11074 * input.c (location_get_source_line): Convert return type
11075 from const char * to char_span, losing the final "line_len"
11077 (dump_location_info): Update for the above.
11078 (get_substring_ranges_for_loc): Likewise. Use a char_span
11079 when handling the literal within the line.
11080 (test_reading_source_line): Update for location_get_source_line
11081 returning a char_span.
11082 * input.h (class char_span): Move here from
11083 diagnostic-show-locus.c, converting from a struct to a class.
11084 Make data members private.
11085 (char_span::operator bool): New.
11086 (char_span::length): New.
11087 (char_span::get_buffer): New.
11088 (char_span::operator[]): New.
11089 (char_span::subspan): Make const.
11090 (char_span::xstrdup): New.
11091 (location_get_source_line): Convert return type from const char *
11092 to char_span, losing the final "line_size" param.
11094 2018-04-30 Jan Hubicka <jh@suse.cz>
11096 * lto-wrapper.c (ltrans_priorities): New static var.
11097 (cmp_priority): New.
11098 (run_gcc): Read priorities and if doing parallel build order
11099 the Makefile by them.
11101 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11103 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11105 2018-04-30 Richard Biener <rguenther@suse.de>
11107 * tree-cfg.c (verify_address): Remove base argument, add
11108 flag whether to check TREE_ADDRESSABLE and do that.
11109 (verify_expr): Remove.
11110 (verify_types_in_gimple_reference): Add pieces from verify_expr.
11111 (verify_gimple_assign_single): Likewise.
11112 (verify_gimple_switch): Likewise.
11113 (verify_expr_location_1): Dereference tp once. Add (disabled)
11114 piece from verify_expr.
11115 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11117 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11119 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11121 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11123 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11124 (small_data_pattern): Likewise.
11125 (arc_rewrite_small_data): Likewise.
11126 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11127 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11128 (get_symbol_alignment): New function.
11129 (legitimate_small_data_address_p): Likewise.
11130 (legitimate_scaled_address): Update, call
11131 legitimate_small_data_address_p.
11132 (output_sdata): New static variable.
11133 (arc_print_operand): Update how we handle small data operands.
11134 (arc_print_operand_address): Likewise.
11135 (arc_legitimate_address_p): Update, use
11136 legitimate_small_data_address_p.
11137 (arc_rewrite_small_data_p): Remove.
11138 (arc_rewrite_small_data_1): Likewise.
11139 (arc_rewrite_small_data): Likewise.
11140 (small_data_pattern): Likewise.
11141 (compact_sda_memory_operand): Update to use
11142 legitimate_small_data_address_p and get_symbol_alignment.
11143 (prepare_move_operands): Don't rewite sdata pattern.
11144 (prepare_extend_operands): Remove.
11145 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11147 (zero_extendqisi2): Likewise.
11148 (zero_extendhisi2): Likewise.
11149 (extendqihi2): Likewise.
11150 (extendqisi2): Likewise.
11151 (extendhisi2): Likewise.
11152 (addsi3): Likewise.
11153 (subsi3): Likewise.
11154 (andsi3): Likewise.
11155 * config/arc/constraints.md (Usd): Change it to memory constraint.
11157 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11159 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11160 as source of std instructions.
11161 * config/arc/arc.md (movsi_insn): Update pattern predicate to
11162 allow 6-bit constants as source for store instructions.
11163 (movdi_insn): Update instruction pattern to allow 6-bit constants
11164 as source for store instructions.
11166 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11168 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11170 2018-04-30 Nathan Sidwell <nathan@acm.org>
11171 Sandra Loosemore <sandra@codesourcery.com>
11173 * dumpfile.c (dump_open): Allow '-' for stdout.
11174 * doc/invoke.texi (Developer Options): Document dump filename
11175 determination early. Document stdin/stdout selection.
11177 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
11179 Microblaze Target: PIC data text relative
11181 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11182 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11184 * config/microblaze/microblaze.h (microblaze_constant_address_p):
11185 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11186 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11187 New addressing mode for data-text relative position indepenedent code.
11188 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11189 'ADDRESS_SYMBOLIC_TXT_REL'.
11190 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11191 (microblaze_legitimate_pic_operand): Exclude function calls from
11192 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11193 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11195 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11196 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11197 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11198 for 'address + offset'.
11199 (microblaze_expand_prologue): Add new function prologue call for
11201 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11202 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11203 table in case of TARGET_PIC_DATA_TEXT_REL.
11204 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11205 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11206 Add new macros 'UNSPEC_TEXT',
11207 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11208 + exclude function calls from 'UNSPEC_PLT' in case of data text
11210 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11211 new target hook for generating address diff vector tables in case of
11213 * doc/tm.texi : Regenerate.
11214 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11215 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11216 of addr diff vector generation.
11217 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11218 target hook definition.
11219 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11220 Add default function for generate_pic_addr_diff_vec -> flag_pic.
11221 * doc/invoke.texi (Add new pic option): Add new microblaze pic
11222 option for data text relative.
11224 2018-04-30 Richard Biener <rguenther@suse.de>
11226 * tree-chrec.h (evolution_function_is_constant_p): Remove
11228 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11230 2018-04-30 Richard Biener <rguenther@suse.de>
11233 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11235 2018-04-30 Richard Biener <rguenther@suse.de>
11237 PR tree-optimization/28364
11238 PR tree-optimization/85275
11239 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11240 copying first exit test.
11242 2018-04-28 Mark Wielaard <mark@klomp.org>
11244 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11245 dwarf_version >= 5.
11246 (dwarf_AT): Handle DW_AT_addr_base.
11247 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11249 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
11252 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11253 (*ashl<dwi>3_doubleword_mask_1): Ditto.
11254 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11255 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11257 2018-04-28 Richard Biener <rguenther@suse.de>
11259 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11260 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11261 to reflect use. Only add interesting stmts.
11263 2018-04-27 Martin Jambor <mjambor@suse.cz>
11266 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11267 the jump function allows for passing through aggregate values.
11269 2018-04-27 David Malcolm <dmalcolm@redhat.com>
11271 * input.h (in_system_header_at): Convert from macro to inline
11273 (from_macro_expansion_at): Likewise.
11274 (from_macro_definition_at): Likewise.
11276 2018-04-27 Jeff Law <law@redhat.com>
11278 * config.gcc: Mark tile* targets as deprecated/obsolete.
11280 2018-04-27 Richard Biener <rguenther@suse.de>
11282 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11285 2018-04-27 Richard Biener <rguenther@suse.de>
11287 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11289 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
11291 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11292 with Yd constraint. Set "preferred_for_speed" attribute from
11293 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11294 with Yd constraint.
11295 (*movdi_internal): Ditto.
11296 (movti_interunit splitters): Remove
11297 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11298 (movdi_interunit splitters): Ditto.
11299 * config/i386/constraints.md (Ye): Remove.
11300 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11302 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11305 * config/aarch64/constraints.md (Usg): Limit to 31.
11306 (Usj): Limit to 63.
11308 2018-04-27 Jakub Jelinek <jakub@redhat.com>
11310 PR tree-optimization/85529
11311 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11312 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11313 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11314 zero extension or masking of the MSB bit.
11315 (optimize_range_tests): Add FIRST_BB argument, pass it through
11316 to optimize_range_tests_var_bound.
11317 (maybe_optimize_range_tests, reassociate_bb): Adjust
11318 optimize_range_tests callers.
11320 2018-04-26 Richard Biener <rguenther@suse.de>
11321 Jakub Jelinek <jakub@redhat.com>
11323 * cgraph.h (symbol_table): Just declare debug method here.
11324 * symtab.c (symbol_table::debug): Define.
11326 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
11328 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11330 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
11332 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11333 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11334 (*movdi_internal): Substitute Yi and Yj constraint with x
11335 and Ym and Yn constraint with y constraint. Update "isa"
11336 attribute and set "preferred_for_speed" attribute from
11337 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11338 (*movsi_internal): Ditto.
11339 (*movdf_internal): Ditto.
11340 (*movsf_internal): Ditto.
11341 (*zero_extendsidi2): Ditto.
11342 * config/i386/sse.md (vec_set<mode>_0): Ditto.
11343 (sse2_loadld): Ditto.
11344 (*vec_extract<ssevecmodelower>_0): Ditto.
11345 (*vec_extractv4si_0_zext_sse4): Ditto.
11346 (vec_concatv2di): Ditto.
11347 (*vec_dup<mode>): Ditto.
11348 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11349 * config/i386/constraints.md (Yi): Remove.
11354 2018-04-26 Nathan Sidwell <nathan@acm.org>
11356 * dumpfile.c (dump_open): New.
11357 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11358 (dump_finish): Detect stdio/stderr by value not name.
11360 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
11362 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11364 2018-04-26 Tom de Vries <tom@codesourcery.com>
11367 * config/nvptx/nvptx.c (verify_neutering_jumps)
11368 (verify_neutering_labels): New function
11369 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11371 2018-04-26 Tom de Vries <tom@codesourcery.com>
11374 * config/nvptx/nvptx.c (needs_neutering_p): New function.
11375 (nvptx_single): Use needs_neutering_p to skip over insns that do not
11378 2018-04-26 Richard Biener <rguenther@suse.de>
11379 Tom de Vries <tom@codesourcery.com>
11382 * lto-streamer-out.c (output_function): Fixup loops if required to match
11383 discovery done in the reader.
11385 2018-04-26 Richard Biener <rguenther@suse.de>
11387 PR tree-optimization/85116
11388 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11389 have a loop exit from the single latch predecessor. Remove
11390 case of header with just condition.
11391 (ch_base::copy_headers): Exclude infinite loops from any
11393 (pass_ch::execute): Record exits.
11395 2018-04-26 Richard Biener <rguenther@suse.de>
11397 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11398 prologue cost vector and pass it to vect_get_load_cost.
11399 (vect_get_peeling_costs_all_drs): Likewise.
11400 (vect_peeling_hash_get_lowest_cost): Likewise.
11401 (vect_enhance_data_refs_alignment): Likewise.
11403 2018-04-26 Richard Biener <rguenther@suse.de>
11405 PR middle-end/85450
11406 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11407 checking of integer<->pointer conversions.
11408 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11409 sign-/zero-extending pointer types.
11410 (expand_omp_for_static_chunk): Likewise.
11412 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
11413 Jean Lee <xiaoyur347@gmail.com>
11415 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11416 (TARGET_ASAN_SHADOW_OFFSET): Define.
11417 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11418 true for -fsanitize=address.
11420 2018-04-25 Mark Wielaard <mark@klomp.org>
11422 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11425 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11427 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11428 than "alu", remove explicit "memory" and "imm_disp" attributes.
11429 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11431 PR middle-end/85414
11432 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11433 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11434 gen_lowpart_no_emit.
11436 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11439 * config/i386/i386.c (ix86_expand_builtin): Change memory
11440 operand to XI, extend p0 to Pmode.
11441 * config/i386/i386.md: Change unspec volatile and operand
11442 1 mode to XI, change operand 0 mode to P.
11444 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11446 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11447 GET_MODE_MASK before any checking.
11448 (nds32_can_use_bset_p): Likewise.
11449 (nds32_can_use_btgl_p): Likewise.
11451 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11453 * config/nds32/nds32-doubleword.md: New define_split pattern for
11454 illegal register number.
11456 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11458 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11460 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11462 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11464 2018-04-25 Richard Biener <rguenther@suse.de>
11466 * lto-streamer.h (LTO_major_version): Bump to 8.
11468 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11470 * BASE-VER: Set to 9.0.0.
11472 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11474 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11475 in __abskf2 and __powikf2.
11477 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11480 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11481 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11482 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11483 Use the above on operand 2. Reindent.
11484 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11486 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11489 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11491 * config/i386/i386.opt (mcet): Removed.
11492 * doc/install.texi: Remove -mcet documentation.
11493 * doc/invoke.texi: Likewise.
11495 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11498 * doc/install.texi: Remove -mcet from bootstrap-cet.
11500 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11503 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11504 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11508 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11509 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11510 containing a CONST_VECTOR.
11512 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11514 * doc/install.texi: Update newlib dependency for nvptx.
11516 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11519 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11520 instead of INTVAL when shifting x left.
11522 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11524 PR tree-optimization/85478
11525 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11526 vect_grouped_store_supported for single element vectors.
11528 2018-04-24 Richard Biener <rguenther@suse.de>
11531 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11532 load cost increase to the case of non-constant step.
11534 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11537 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11538 destination if any_malformed_asm.
11540 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11542 PR middle-end/85496
11543 * expr.c (store_field): In the bitfield case, if the value comes from
11544 a function call and is returned in registers by means of a PARALLEL,
11545 do not change the mode of the temporary unless BLKmode and VOIDmode.
11547 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11549 PR rtl-optimization/85423
11550 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11551 dependencies to debug insns when the previous insn is non-debug.
11553 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11555 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11556 enums into a single definition.
11557 (fls): Fix predicates and printing.
11560 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11562 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11563 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11564 and short u6 immediate.
11565 (check_if_valid_sleep_operand): Remove.
11566 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11568 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11570 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11571 flag_always_save_lp condition.
11572 * config/nds32/nds32.opt (malways-save-lp): New option.
11574 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11576 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11577 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11578 * config/nds32/nds32.h
11579 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11580 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11582 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11584 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11585 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11587 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11588 Chung-Ju Wu <jasonwucj@gmail.com>
11590 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11592 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11593 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11595 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11597 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11599 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11601 * config/nds32/nds32-protos.h (nds32_data_alignment,
11602 nds32_local_alignment): Declare.
11603 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11604 nds32_local_alignment): New functions.
11605 (TARGET_CONSTANT_ALIGNMENT): Define.
11606 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11608 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11610 * config/nds32/nds32.c
11611 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11612 (TARGET_MODES_TIEABLE_P): Likewise.
11614 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11616 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11617 level Ofast and Og.
11619 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11620 Chung-Ju Wu <jasonwucj@gmail.com>
11622 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11623 for unaligned access.
11624 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11626 * config/nds32/nds32-intrinsic.md: Likewise.
11627 * config/nds32/nds32_intrinsic.h: Likewise.
11628 * config/nds32/nds32.h (nds32_builtins): Likewise.
11629 * config/nds32/nds32.opt (munaligned-access): New option.
11630 * config/nds32/nds32.c (nds32_asm_file_start): Display
11631 flag_unaligned_access status.
11633 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11635 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11636 -mno-relax is present.
11637 * config/riscv/linux.h (LINK_SPEC): Ditto.
11639 2018-04-20 Martin Sebor <msebor@redhat.com>
11642 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11644 (gimple_fold_builtin_stxcpy_chk): Same.
11645 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11647 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11650 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11651 __powikf2 when long double is IEEE 128-bit.
11653 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11655 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11656 step to make sure stack always aligned.
11658 2018-04-20 Carl Love <cel@us.ibm.com>
11661 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11662 size check for arg0.
11664 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11665 Tom de Vries <tom@codesourcery.com>
11668 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11669 Emit insns for calls too.
11670 (nvptx_find_par): Always look for worker-level predecessor insn.
11671 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11673 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11674 (nvptx_process_pars): Propagate frames for calls.
11676 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11679 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11681 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11682 (ix86_handle_option): Don't handle OPT_mibt.
11683 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11685 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11687 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11688 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11689 (ix86_target_macros): Define __CET__ with flag_cf_protection
11690 for -fcf-protection.
11691 * config/i386/i386.c (isa2_opts): Remove -mibt.
11692 * config/i386/i386.h (TARGET_IBT): Removed.
11693 (TARGET_IBT_P): Likewise.
11694 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11695 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11696 * config/i386/i386.opt (mcet): Update help message.
11697 (mshstk): Likewise.
11699 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11700 -mcet as an alias for -mshstk.
11702 2018-04-20 Richard Biener <rguenther@suse.de>
11704 PR middle-end/85475
11705 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11706 complexity by forcing a single use of the multiply operand.
11708 2018-04-20 Martin Jambor <mjambor@suse.cz>
11711 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11712 recursion dependency to only apply to non-clones.
11714 2018-04-20 Martin Jambor <mjambor@suse.cz>
11717 * ipa-cp.c (create_specialized_node): Check that clones of
11718 self-recursive edges exist during IPA-CP.
11720 2018-04-19 Toon Moene <toon@moene.org>
11722 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11725 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11727 PR tree-optimization/85467
11728 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11729 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11730 VECTOR_CST element to type.
11732 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11735 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11736 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11737 (builtin_longjmp): Likewise.
11738 (save_stack_nonlocal): New pattern.
11739 (restore_stack_nonlocal): Likewise.
11741 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11744 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11745 Replace ASM_OUTPUT_LABEL with fprintf.
11747 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11750 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11751 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11752 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11753 define __IBT__ and __SHSTK__ for -fcf-protection.
11754 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11756 (ix86_trampoline_init): Likewise.
11757 (x86_output_mi_thunk): Likewise.
11758 (ix86_notrack_prefixed_insn_p): Likewise.
11759 (ix86_option_override_internal): Don't disallow -fcf-protection.
11760 * config/i386/i386.md (rdssp<mode>): Also enable for
11762 (incssp<mode>): Likewise.
11763 (nop_endbr): Likewise.
11764 * config/i386/i386.opt (mcet): Change help message to built-in
11767 (mshstk): Likewise.
11768 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11769 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11770 enable CET built-in functions.
11772 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11774 * common/config/i386/i386-common.c
11775 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11776 OPTION_MASK_ISA_MOVDIRI_UNSET,
11777 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11778 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11779 * config.gcc (movdirintrin.h): New header.
11780 * config/i386/cpuid.h (bit_MOVDIRI,
11781 bit_MOVDIR64B): New bits.
11782 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11784 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11785 (VOID, PVOID, PCVOID)): New function types.
11786 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11787 __builtin_ia32_directstoreu_u64,
11788 __builtin_ia32_movdir64b): New builtins.
11789 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11790 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11792 (ix86_valid_target_attribute_inner_p): Ditto.
11793 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11794 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11795 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11796 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11797 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11798 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11799 (movdiri<mode>, movdir64b_<mode>): New.
11800 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11801 * config/i386/immintrin.h: Include movdirintrin.h.
11802 * config/i386/movdirintrin.h: New file.
11803 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11805 2018-04-19 Richard Biener <rguenther@suse.de>
11807 PR middle-end/85455
11808 * cfg.c (clear_bb_flags): When loop state says we have
11809 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11811 2018-04-19 Richard Biener <rguenther@suse.de>
11813 PR tree-optimization/84737
11814 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11815 copying restrict info.
11816 (vect_setup_realignment): Use it.
11817 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11818 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11819 the first DR to all generated stores.
11820 (vectorizable_load): Likewise for loads.
11822 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11824 PR tree-optimization/85446
11825 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11826 the integral and pointer types to have the same precision.
11828 * doc/install.texi: Document --disable-cet being the default and
11831 2018-04-18 Martin Liska <mliska@suse.cz>
11833 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11836 2018-04-18 Martin Liska <mliska@suse.cz>
11839 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11842 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11843 arguments if they are comparable.
11845 2018-04-18 Martin Liska <mliska@suse.cz>
11848 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11851 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11854 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11857 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11858 ENDBR after calling __morestack.
11860 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11863 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11864 by using gcc_base_ver to generate a gcc_driver_version, and use
11865 it when generating GCC_DRIVER_NAME.
11866 * configure: Regenerate.
11868 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11871 * config.gcc: Obsolete powerpc*-*-*spe*.
11873 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11876 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11877 (stabstr_D): Change type of unum from unsigned int to
11878 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11881 2018-04-17 Jim Wilson <jimw@sifive.com>
11884 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11885 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11886 Set arg_pointer_offset after using pretend_args_size.
11888 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11890 PR rtl-optimization/85431
11891 * dse.c (record_store): Ignore zero width stores.
11894 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11895 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11896 __builtin_stack_restore rather than after it.
11897 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11898 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11899 argument instead of virtual_dynamic_stack_rtx.
11901 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11903 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11905 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11906 Add note to error message to explain internal mapping of overloaded
11907 built-in function name to non-overloaded built-in function name.
11908 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11911 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11914 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11915 where the inputs overlap with the output.
11917 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11919 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11920 (=v, v) alternative and explicit "memory" attribute.
11921 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11922 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11924 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11925 "sselog1" type instead of "sselog".
11926 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11927 "sselog". Remove explicit "memory" attribute.
11928 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11929 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11931 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11932 "sselog1" type instead of "sselog". Remove explicit "memory"
11934 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11935 use "sselog1" type instead of "sselog". Remove explicit "memory"
11937 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11938 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11940 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11941 "sselog1" type instead of "sselog". Remove explicit "memory"
11943 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11944 use "sselog1" type instead of "sselog". Remove explicit "memory"
11948 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11950 PR middle-end/85414
11951 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11954 2018-04-17 Martin Jambor <mjambor@suse.cz>
11957 * ipa-cp.c (create_specialized_node): Call
11958 expand_all_artificial_thunks if necessary.
11960 2018-04-17 Martin Liska <mliska@suse.cz>
11963 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11964 in message, remote space in between '_G' and '('.
11966 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11969 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11970 avx512f_vmcmp<mode>3<round_saeonly_name>,
11971 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11972 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11973 avx512f_rndscale<mode><round_saeonly_name>,
11974 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11975 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11976 Use %<iptr>2 instead of %2 for -masm=intel.
11977 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11978 avx512f_vcvttss2usi<round_saeonly_name>,
11979 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11981 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11982 avx512f_vcvttsd2usi<round_saeonly_name>,
11983 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11984 Use %q1 instead of %1 for -masm=intel.
11985 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11986 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11987 of %3 for -masm=intel.
11988 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11990 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11992 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11994 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11995 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11997 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11999 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12000 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12001 %g1 and one with %0 and %1.
12002 (avx512er_vmrcp28<mode><round_saeonly_name>,
12003 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12004 %1 for -masm=intel.
12005 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12006 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12007 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12008 of %0 and %{%4%} for -masm=intel.
12009 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12010 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12011 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12012 order of %0 and %{%5%}%{z%} for -masm=intel.
12014 2018-04-17 Jan Hubicka <jh@suse.cz>
12017 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12019 2018-04-17 Martin Liska <mliska@suse.cz>
12022 * multiple_target.c (create_dispatcher_calls): Set apostrophes
12023 for target_clone error message. Make default implementation
12024 clone to be a local declaration.
12025 (separate_attrs): Add new argument and check for an empty
12027 (expand_target_clones): Handle it.
12028 (ipa_target_clone): Make redirection just for target_clones
12031 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
12032 Tom de Vries <tom@codesourcery.com>
12034 PR middle-end/84955
12035 * omp-expand.c (expand_oacc_for): Add dummy false branch for
12036 tiled basic blocks without omp continue statements.
12038 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
12041 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12042 vec_extract expression as having side effects to make sure it gets
12045 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
12048 * config/i386/i386.c (get_builtin_code_for_version): Check
12051 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
12054 * config.gcc: Support "skylake".
12055 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12057 * config/i386/i386.c (m_SKYLAKE): Define.
12058 (processor_target_table): Add "skylake".
12059 (ix86_option_override_internal): Add "skylake".
12060 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12061 PROCESSOR_CANNONLAKE.
12062 (get_builtin_code_for_version): Fix priority for
12063 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12064 PROCESSOR_SKYLAKE-AVX512.
12065 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12066 (processor_type): Add PROCESSOR_SKYLAKE.
12068 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
12069 Jason Merrill <jason@redhat.com>
12072 * convert.c (convert_to_integer_1): Use direct recursion for
12073 enumeral types and types with a precision less than the number
12074 of bits in their mode.
12076 2018-04-16 Julia Koval <julia.koval@intel.com>
12079 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12080 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12082 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
12085 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12086 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12087 and -mno-direct-move.
12089 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
12092 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12093 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12094 Ensure negative shifts result in {0}.
12096 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
12098 PR rtl-optimization/79916
12099 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12100 regs (if any) to define how to gnerate SD moves when LRA is in
12103 2018-04-13 Jakub Jelinek <jakub@redhat.com>
12105 PR rtl-optimization/85393
12106 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12107 * except.c (expand_dw2_landing_pad_for_region): Make static.
12108 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12109 a label and unconditional jump to old_bb, rather than
12110 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12113 PR rtl-optimization/85376
12114 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12115 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12116 instead of a specific value.
12118 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12119 Bin Cheng <bin.cheng@arm.com>
12121 PR tree-optimization/82965
12122 PR tree-optimization/83991
12123 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12124 by_profile_only parameter.
12125 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12126 information if the loop was predicted to iterate too many times.
12127 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12129 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12132 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12135 2018-04-13 Martin Liska <mliska@suse.cz>
12136 Jakub Jelinek <jakub@redhat.com>
12138 PR middle-end/81657
12139 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12140 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12141 * builtins.c (expand_builtin_memory_copy_args): Use
12142 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12143 handle dest_addr == pc_rtx.
12145 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
12148 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12149 asked to not generate direct moves.
12150 (fix_trunc<mode>si2_stfiwx): Similar.
12151 (fix_trunc<mode>si2_internal): Similar.
12153 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12156 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12157 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12158 lookup if dest in some wider mode is known to be const0_rtx and
12159 if so, record permanent equivalence for it to be ZERO_EXTEND of
12160 the narrower mode destination.
12162 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12164 * lto-streamer-out.c (output_function): Revert 259346.
12165 * omp-expand.c (expand_oacc_for): Likewise.
12167 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
12169 PR rtl-optimization/85354
12170 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12171 * sel-sched.c (sel_global_init): ... here.
12173 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
12176 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12177 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12178 mode for PE-COFF targets.
12179 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12180 (i386_pe_asm_lto_end): Likewise.
12181 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12182 (TARGET_ASM_LTO_END): Likewise.
12183 * config/i386/winnt.c (saved_debug_info_level): New static variable.
12184 (i386_pe_asm_lto_start): New function.
12185 (i386_pe_asm_lto_end): Likewise.
12187 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12188 Richard Biener <rguenther@suse.de>
12190 PR middle-end/84955
12191 * lto-streamer-out.c (output_function): Fix CFG loop state before
12193 * omp-expand.c (expand_oacc_for): Handle calls to internal
12194 functions like regular functions.
12196 2018-04-12 Richard Biener <rguenther@suse.de>
12199 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12200 for the early LTO debug to properly generate references to it
12201 during DIE emission. Do not re-use that for the skeleton for
12203 (dwarf2out_early_finish): Likewise.
12205 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12208 * config/i386/sse.md
12209 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12210 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12211 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12212 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12213 and output is a reg, avoid creating invalid lowpart subreg, but
12214 instead split into a 512-bit move. Don't split if not AVX512VL,
12215 input is xmm16+ reg and output is a mem.
12216 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12217 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12218 xmm16+ reg and output is a mem.
12220 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12222 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12223 also for flag_dwarf2_cfi_asm.
12225 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12227 PR rtl-optimization/85342
12228 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12229 a bool scalar var inside of the loop instead. Don't try to update
12230 recog_data.operand after failed apply_change_group.
12232 2018-04-12 Tom de Vries <tom@codesourcery.com>
12235 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12236 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
12237 array with flexible array member as array without given dimension.
12238 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12239 argument for undefined param to true.
12241 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
12244 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12245 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12246 from PowerPC section.
12247 * config/rs6000/sysv4.opt (mcall-): Improve help text.
12248 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12249 help text that is too long.
12250 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12251 help text that is too long.
12252 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12253 help text that is too long.
12255 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
12257 * config/alpha/alpha.md (stack_probe_internal): Rename
12258 from "probe_stack". Update all callers.
12260 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12262 PR rtl-optimization/84566
12263 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12264 sched_macro_fuse_insns.
12266 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12269 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12270 (compute_block_dependences): ... from here.
12272 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12274 PR tree-optimization/85331
12275 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12276 from int to HOST_WIDE_INT.
12278 2018-04-11 Martin Jambor <mjambor@suse.cz>
12281 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12282 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12283 not the same as the source val.
12284 (cgraph_edge_brings_value_p): New parameter.
12285 (gather_edges_for_value): Pass destination value to
12286 cgraph_edge_brings_value_p.
12287 (perhaps_add_new_callers): Likewise.
12288 (get_info_about_necessary_edges): Likewise and exclude values brought
12289 only by self-recursive edges.
12290 (create_specialized_node): Redirect only clones of self-calling edges.
12291 (+self_recursive_pass_through_p): New function.
12292 (find_more_scalar_values_for_callers_subset): Use it.
12293 (find_aggregate_values_for_callers_subset): Likewise.
12294 (known_aggs_to_agg_replacement_list): Removed.
12295 (decide_whether_version_node): Re-calculate known constants for all
12296 remaining context clones.
12298 2018-04-11 Richard Biener <rguenther@suse.de>
12301 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12302 from early DWARF output.
12303 (dwarf2out_early_finish): Output line info unconditionally into
12304 early DWARF and add reference to it.
12306 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12309 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12310 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12311 other than V2DFmode using iptr mode attribute.
12312 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12314 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12316 PR rtl-optimization/84659
12317 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12319 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12322 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12324 (output_loc_list): Pass address of a dummy size variable even in the
12325 locview handling loop.
12326 (index_location_lists): Add comment on why skip_loc_list_entry can't
12329 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
12332 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12335 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
12338 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12339 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12340 and -mstring-compare-inline-limit.
12342 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12345 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12346 for stack clash protection in a register whenever we need it to be in
12349 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12351 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12352 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12354 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12357 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12359 (mlong-double-): Ditto.
12360 * config/rs6000/sysv4.opt (msdata=): Ditto.
12361 (mtls-size=): Ditto.
12363 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
12365 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12366 erroneous entries for
12367 "vector int vec_ldl (int, long int *)", and
12368 "vector unsigned int vec_ldl (int, unsigned long int *)".
12369 Add comments and entries for
12370 "vector bool char vec_ldl (int, bool char *)",
12371 "vector bool short vec_ldl (int, bool short *)",
12372 "vector bool int vec_ldl (int, bool int *)",
12373 "vector bool long long vec_ldl (int, bool long long *)",
12374 "vector pixel vec_ldl (int, pixel *)",
12375 "vector long long vec_ldl (int, long long *)",
12376 "vector unsigned long long vec_ldl (int, unsigned long long *)".
12377 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12378 type tree bool_long_long_type_node and correct definition of
12379 bool_V2DI_type_node to make reference to this new type tree.
12380 (rs6000_mangle_type): Replace erroneous reference to
12381 bool_long_type_node with bool_long_long_type_node.
12382 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12383 comments to emphasize sign distinctions for char and int types and
12384 replace RS6000_BTI_bool_long constant with
12385 RS6000_BTI_bool_long_long constant. Also add comment to restrict
12386 use of RS6000_BTI_pixel.
12387 (bool_long_type_node): Remove this macro definition.
12388 (bool_long_long_type_node): New macro definition
12390 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12392 PR rtl-optimization/85300
12393 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12394 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12395 simplify_unary_operation fails.
12397 2018-04-10 Martin Liska <mliska@suse.cz>
12399 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12400 cgraph_edge and ipa_ref.
12402 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12406 * config/i386/sse.md
12407 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12408 computation of the VEC_MERGE selector from mask.
12409 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12410 Fix decoding of the VEC_MERGE selector into mask.
12412 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12414 PR tree-optimization/85286
12415 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12417 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12419 * final.c (final_1): Set insn_last_address as well as
12420 insn_current_address.
12422 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12425 * explow.c (emit_stack_probe): Call validize_mem on memory location
12426 before passing it to gen_probe_stack. Create address operand and
12427 legitimize it for the probe_stack_address case.
12429 2018-04-09 Jan Hubicka <jh@suse.cz>
12432 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12433 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12434 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12436 (free_lang_data): Rebuild type inheritance graph.
12438 2018-04-09 Martin Sebor <msebor@redhat.com>
12440 * invoke.texi (-finline-small-functions): Mention other optimization
12442 (-findirect-inlining, -fpartial-inlining): Same.
12443 (-finline-functions-called-once): Same.
12444 (-freorder-blocks-and-partition): Same.
12446 2018-04-09 Jan Hubicka <jh@suse.cz>
12449 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12450 jumps; choose last target that matches the criteria (i.e.
12451 no partition changes for non-crossing jumps).
12452 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12453 support for redirecting crossing jumps to non-crossing.
12455 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12457 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12458 also for naked functions.
12460 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12462 * config/arc/arc.md (add_shift): New pattern.
12463 (add_shift2): Likewise.
12464 (sub_shift): Likewise.
12465 (sub_shift_cmp0_noout): Likewise.
12466 (compare_si_ashiftsi): Likewise.
12467 (xbfu_cmp0_noout): New combine pattern.
12468 (xbfu_cmp0"): Likewise.
12469 (movsi_set_cc_insn): Place the predicable variant first.
12470 (commutative_binary_cmp0_noout): Remove clobber.
12471 (commutative_binary_cmp0): New pattern.
12472 (noncommutative_binary_cmp0): Likewise.
12473 (noncommutative_binary_cmp0_noout): Likewise.
12474 (noncommutative_binary_comparison_result_used): Removed.
12475 (rsub_cmp0): New pattern.
12476 (rsub_cmp0_noout): Likewise.
12477 (extzvsi): Changed, keep only meaningful variants.
12478 (SQH, SEZ): New iterators.
12479 (SQH_postfix): New mode attribute.
12480 (SEZ_prefix): New code attribute.
12481 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12482 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12483 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12484 of numerical value.
12485 (noncommutative_operator): Check the availability of barrel
12488 2018-04-09 Richard Biener <rguenther@suse.de>
12490 PR tree-optimization/85284
12491 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12492 Only use the niter constraining form of simple_iv when the exit
12493 is always executed.
12495 2018-04-09 Tom de Vries <tom@codesourcery.com>
12498 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12499 (define_expand "*memory_barrier"): New define_expand.
12500 (define_insn "memory_barrier"): New insn.
12502 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12504 PR rtl-optimization/80463
12505 PR rtl-optimization/83972
12506 PR rtl-optimization/83480
12508 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12509 correct producer for the insn.
12510 (tidy_control_flow): Fixup seqnos in case of debug insns.
12512 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12514 PR rtl-optimization/83913
12516 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12517 different sched-times when merging exprs.
12519 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12521 PR rtl-optimization/83962
12523 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12524 tidy_fallthru_edge and tidy_control_flow.
12526 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12528 PR rtl-optimization/83530
12530 * sel-sched.c (force_next_insn): New global variable.
12531 (remove_insn_for_debug): When force_next_insn is true, also leave only
12532 next insn in the ready list.
12533 (sel_sched_region): When the region wasn't scheduled, make another pass
12534 over it with force_next_insn set to 1.
12536 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12538 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12540 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12541 for interrupt control.
12542 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12543 functions for interrupt control.
12544 * config/nds32/nds32-intrinsic.md: Likewise.
12545 * config/nds32/nds32_intrinsic.h: Likewise.
12546 * config/nds32/nds32.h (nds32_builtins): Likewise.
12548 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12550 * config/nds32/nds32.c (nds32_init_machine_status,
12551 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12552 strict_aligned_p field.
12553 (nds32_expand_to_rtl_hook): New function.
12554 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12555 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12557 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12558 Chung-Ju Wu <jasonwucj@gmail.com>
12560 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12561 * config/nds32/nds32-n7.md: New file.
12562 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12563 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12565 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12566 * config/nds32/nds32.md (pipeline_model): Add n7.
12567 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12568 * config/nds32/pipelines.md: Include n7 settings.
12570 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12571 Chung-Ju Wu <jasonwucj@gmail.com>
12573 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12574 * config/nds32/nds32-e8.md: New file.
12575 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12576 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12578 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12579 * config/nds32/nds32.md (pipeline_model): Add e8.
12580 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12581 * config/nds32/pipelines.md: Include e8 settings.
12583 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12584 Chung-Ju Wu <jasonwucj@gmail.com>
12586 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12587 * config/nds32/nds32-n8.md: New file.
12588 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12589 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12591 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12592 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12593 * config/nds32/nds32.md (pipeline_model): Add n8.
12594 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12595 * config/nds32/pipelines.md: Include n8 settings.
12597 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12598 Chung-Ju Wu <jasonwucj@gmail.com>
12600 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12601 * config/nds32/nds32-n9-2r1w.md: New file.
12602 * config/nds32/nds32-n9-3r2w.md: New file.
12603 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12604 nds32_register_ports): New or modify for cpu n9.
12605 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12607 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12608 * config/nds32/nds32-utils.c: New file.
12609 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12610 TARGET_MUL_SLOW): Define.
12611 * config/nds32/nds32.md (pipeline_model): New attribute.
12612 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12613 New options that support cpu n9.
12614 * config/nds32/pipelines.md: Include n9 settings.
12615 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12617 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12619 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12620 information if necessary.
12621 (output_cond_branch_compare_zero): Likewise.
12622 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12623 (nds32_target_alignment): Refine for alignment.
12624 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12625 (FUNCTION_BOUNDARY): Modify.
12626 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12628 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12630 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12632 * config/nds32/constants.md (unspec_volatile_element): Add values for
12633 TLB operation and data prefetch.
12634 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12635 functions for TLB operation and data prefetch.
12636 * config/nds32/nds32-intrinsic.md: Likewise.
12637 * config/nds32/nds32_intrinsic.h: Likewise.
12638 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12639 (nds32_print_operand): Likewise.
12640 * config/nds32/nds32.h (nds32_builtins): Likewise.
12642 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12643 Andrew Pinski <pinsika@gcc.gnu.org>
12645 PR middle-end/82976
12646 * match.pd: Use constant_boolean_node of correct type instead of
12647 boolean_true_node or boolean_false_node for simplifying
12648 pointer comparisons to zero.
12650 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12652 PR tree-optimization/80021
12653 * tree.c (verify_type_variant): Make error call in verify_variant_match
12654 translatable and remove final full stop.
12656 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12658 * config/nds32/constants.md (unspec_volatile_element): Add
12659 UNSPEC_VOLATILE_EH_RETURN.
12660 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12661 nds32_output_stack_pop): Support dwarf exception handling process.
12662 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12663 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12664 exception handling process.
12665 (nds32_compute_stack_frame): Likewise.
12666 (nds32_return_addr_rtx): Likewise.
12667 (nds32_initial_elimination_offset): Likewise.
12668 (nds32_expand_prologue): Likewise.
12669 (nds32_expand_epilogue): Likewise.
12670 (nds32_dynamic_chain_address): New function.
12671 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12672 exception handling.
12673 (DYNAMIC_CHAIN_ADDRESS): Define.
12674 (EH_RETURN_DATA_REGNO): Define.
12675 (EH_RETURN_STACKADJ_RTX): Define.
12676 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12677 patterns for dwarf exception handling.
12679 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12681 * config/nds32/nds32.h: Clean up obsolete macros.
12683 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12685 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12686 Add enum values for particular instructions.
12687 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12688 particular intrinsic functions.
12689 * config/nds32/nds32-intrinsic.md: Likewise.
12690 * config/nds32/nds32_intrinsic.h: Likewise.
12691 * config/nds32/nds32.h (nds32_builtins): Likewise.
12692 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12693 (btst, ave): New patterns for particular instructions.
12695 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12697 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12698 Add enum values for atomic load/store and memory sync.
12699 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12701 * config/nds32/nds32-intrinsic.md: Likewise.
12702 * config/nds32/nds32_intrinsic.h: Likewise.
12703 * config/nds32/nds32.h (nds32_builtins): Likewise.
12705 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12707 PR tree-optimization/85257
12708 * fold-const.c (native_encode_vector): If not all elts could fit
12709 and off is -1, return 0 rather than offset.
12710 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12711 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12712 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12713 adjust buffer in native_interpret_expr call.
12715 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12717 * config/nds32/constants.md (unspec_volatile_element): Add cache
12718 control enum values.
12719 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12720 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12721 * config/nds32/nds32.c (nds32_cctl_names): New.
12722 (nds32_print_operand): Handle cache control register names.
12723 * config/nds32/nds32.h (nds32_builtins): New enum values.
12724 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12726 * config/nds32/nds32.md (type): Add mmu.
12727 * config/nds32/pipelines.md (simple_insn): Add mmu.
12729 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12731 * config/nds32/nds32.md (type): Remove call.
12732 * config/nds32/pipelines.md (simple_insn): Likewise.
12734 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12736 * config/nds32/constants.md (unspec_volatile_element): Add
12737 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12738 UNSPEC_VOLATILE_FMFCFG.
12739 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12740 description for fmfcfg and fmfcsr.
12741 (bdesc_1arg): Add fmtcsr.
12742 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12743 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12744 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12745 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12746 unspec_fmfcfg): New patterns.
12747 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12748 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12749 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12750 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12751 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12752 __nds32__fmfcfg): Define.
12754 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12756 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12757 intrinsic register names.
12758 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12759 intrinsic register enum values and macros.
12761 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12763 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12764 for load/store addressing form.
12765 (nds32_print_operand_address): Likewise.
12767 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12770 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12771 based on LABEL_REF. Remove useless assertion.
12772 (pic_address_needs_scratch): Fix formatting.
12773 (sparc_legitimize_pic_address): Minor tweaks.
12774 (sparc_delegitimize_address): Adjust assertion accordingly.
12775 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12776 into symbolic_operand.
12777 (movsi_high_pic_label_ref): Likewise.
12778 (movsi_lo_sum_pic_label_ref): Likewise.
12779 (movdi_pic_label_ref): Likewise.
12780 (movdi_high_pic_label_ref): Likewise.
12781 (movdi_lo_sum_pic_label_ref): Likewise.
12783 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12785 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12786 custom LIB_SPEC setup.
12788 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12789 Kito Cheng <kito.cheng@gmail.com>
12791 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12792 * config/riscv/freebsd.h: New.
12794 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12796 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12797 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12800 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12801 Kito Cheng <kito.cheng@gmail.com>
12803 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12804 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12805 * config/nds32/nds32-protos.h (nds32_output_call,
12806 nds32_output_return): Declare.
12807 * config/nds32/nds32.md: Refine all the call and return patterns.
12809 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12812 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12813 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12815 PR rtl-optimization/84872
12816 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12817 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12818 EDGE_CROSSING edge.
12820 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12822 * expr.c (copy_blkmode_to_reg): Revert 254862.
12823 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12825 2018-04-06 Richard Biener <rguenther@suse.de>
12827 PR middle-end/85244
12828 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12829 after seeing a component reference with an adjacent field. Treat
12830 refs to arrays at struct end of external decls similar to
12831 refs to unconstrained commons.
12833 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12836 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12837 look through SAVE_EXPRs with non-side-effects argument. Adjust
12839 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12842 2018-04-06 Richard Biener <rguenther@suse.de>
12844 PR middle-end/85180
12845 * alias.c (find_base_term): New wrapper around find_base_term
12846 unwinding CSELIB_VAL_PTR changes.
12847 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12850 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12852 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12854 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12855 constant definitions.
12856 ("nop"): lr 0,0 -> nopr r0
12857 ("nop_lr0", "nop_lr1"): New insn definitions.
12859 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12861 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12862 NDS32_V3PUSH_AVAILABLE_P macro.
12864 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12865 Chung-Ju Wu <jasonwucj@gmail.com>
12867 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12868 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12869 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12870 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12871 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12872 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12873 * config/nds32/constraints.md: New constraints and checking for hard
12874 float configuration.
12875 * config/nds32/iterators.md: New mode iterator and attribute for hard
12876 float configuration.
12877 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12879 * config/nds32/nds32-fpu.md: New file.
12880 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12881 deal with hard float code generation.
12882 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12884 (abi_type, float_reg_number): New enum type.
12885 * config/nds32/nds32-predicates.c: New predicates for hard float.
12886 * config/nds32/nds32-protos.h: Declare functions for hard float.
12887 * config/nds32/nds32.c: Implementation for hard float configuration.
12888 * config/nds32/nds32.h: Definitions for hard float configuration.
12889 * config/nds32/nds32.md: Include hard float machine description and
12890 modify patterns for hard float configuration.
12891 * config/nds32/nds32.opt: New options for hard float configuration.
12892 * config/nds32/predicates.md: New predicates for hard float
12895 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12897 * common/config/nds32/nds32-common.c
12898 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12900 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12902 PR middle-end/85195
12903 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12904 CONSTRUCTOR_ELT (ctor, ...)->value.
12906 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12909 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12911 2018-04-05 Tom de Vries <tom@codesourcery.com>
12914 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12917 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12918 Kito Cheng <kito.cheng@gmail.com>
12920 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12921 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12922 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12923 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12925 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12926 Kito Cheng <kito.cheng@gmail.com>
12928 * config/nds32/constraints.md (Ufe): New memory constraint.
12929 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12930 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12931 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12933 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12934 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12936 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12938 * config/nds32/nds32.md: Use optimize_size in the condition for
12939 alu-shift instructions.
12941 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12943 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12945 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12947 * config/nds32/nds32.md (negsi2): Refine pattern.
12949 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12950 Chung-Ju Wu <jasonwucj@gmail.com>
12952 * config/nds32/iterators.md (shift_rotate): New code iterator.
12953 (shift): New code attribute.
12954 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12955 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12956 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12957 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12958 bit-wise operations.
12959 (andsi3, *andsi3): Ditto.
12960 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12961 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12962 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12963 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12964 nds32_ior_operand, nds32_xor_operand): New predicates.
12966 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12968 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12969 (addsi3, subsi3): ... this.
12971 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12973 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12975 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12977 * config/nds32/nds32.md: Adjust indention.
12979 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12981 * config/nds32/nds32.md (feature): New attribute.
12983 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12985 * config/nds32/nds32.md (subtype): New attribute.
12987 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12990 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12991 expansion to perform a bitwise AND of the argument followed by a
12992 boolean negation of the result.
12994 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12996 PR rtl-optimization/84878
12997 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12998 the basic block. Assert the use reference is not artificial and that
12999 it has an associated insn.
13001 2018-04-04 Michael Matz <matz@suse.de>
13003 * builtins.c (compute_objsize): Pass correct operand
13004 to array_at_struct_end_p.
13006 2018-04-04 Richard Biener <rguenther@suse.de>
13009 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13010 from contexts for DINFO_LEVEL_TERSE and below.
13012 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13014 * config/nds32/nds32-doubleword.md (move_<mode>): Require
13015 resiter_operand condition.
13016 * config/nds32/nds32.md (*move<mode>): Ditto.
13018 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13019 Monk Chiang <sh.chiang04@gmail.com>
13021 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13023 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13025 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13027 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13028 Kito Cheng <kito.cheng@gmail.com>
13030 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13031 nds32_cond_code_str, output_cond_branch,
13032 output_cond_branch_compare_zero, nds32_expand_cbranch,
13033 nds32_expand_cstore, nds32_expand_movcc,
13034 nds32_output_cbranchsi4_equality_zero,
13035 nds32_output_cbranchsi4_equality_reg,
13036 nds32_output_cbranchsi4_equality_reg_or_const_int,
13037 nds32_output_cbranchsi4_greater_less_zero: New functions.
13038 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13039 nds32_expand_cstore, nds32_expand_movcc,
13040 nds32_output_cbranchsi4_equality_zero,
13041 nds32_output_cbranchsi4_equality_reg,
13042 nds32_output_cbranchsi4_equality_reg_or_const_int,
13043 nds32_output_cbranchsi4_greater_less_zero): Declare.
13044 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13045 nds32_rimm11s_operand): New predicates.
13046 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13047 * config/nds32/nds32.md: Rewrite all the branch and conditional move
13050 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13052 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13053 * config/nds32/nds32.md: Ditto.
13054 * config/nds32/pipelines.md: Ditto.
13056 2018-04-04 Richard Biener <rguenther@suse.de>
13058 PR tree-optimization/85168
13059 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13060 propagating abnormals.
13062 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13064 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13066 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13067 Kito Cheng <kito.cheng@gmail.com>
13069 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13070 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13071 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13072 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13073 * config/nds32/nds32.md (sibcall_internal): New.
13074 (sibcall_register): Remove.
13075 (sibcall_immediate): Remove.
13076 (sibcall_value_internal): New.
13077 (sibcall_value_register): Remove.
13078 (sibcall_value_immediate): Remove.
13079 * config/nds32/predicates.md (nds32_general_register_operand): New.
13080 (nds32_call_address_operand): New.
13082 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13084 PR rtl-optimization/85167
13085 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13086 bb_defs if *split_p, instead preinitialize it to NULL.
13088 PR tree-optimization/85156
13089 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13090 evaluating the argument multiple times.
13092 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
13094 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13096 (_mm_cvtpd_ps): Likewise.
13097 (_mm_cvttpd_epi32): Likewise.
13098 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13099 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13100 vector, pixel, and bool following altivec.h include.
13102 2018-04-03 Martin Sebor <msebor@redhat.com>
13104 * doc/extend.texi (Common Function Attributes): Clarify.
13105 (const attribute): Likewise.
13106 (pure attribute): Likewise.
13108 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13111 * config/i386/i386.c (ix86_expand_vector_set): Use
13112 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
13114 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
13116 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13117 instructions when changing rounding bits to preserve precision bits
13118 in the x87 control word.
13120 2018-04-03 Martin Liska <mliska@suse.cz>
13122 PR tree-optimization/82491
13123 * rtl.h (strip_offset_and_add): Replace += suboffset with
13124 poly_uint64 () + suboffset.
13126 2018-03-29 Martin Liska <mliska@suse.cz>
13127 Martin Jambor <mjambor@suse.cz>
13130 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13131 param_type is not an integral or pointer type.
13133 2018-04-03 Richard Biener <rguenther@suse.de>
13135 * sese.h (recompute_all_dominators): Remove.
13137 2018-04-02 Martin Sebor <msebor@redhat.com>
13139 * doc/invoke.texi (-Wrestrict): Fix typos.
13141 2018-04-02 Jim Wilson <jimw@sifive.com>
13143 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13144 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13145 (<optab>di3, <optab>si3_extend): Likewise.
13146 (<optab>si3_mask, <optab>si3_mask_1): New.
13147 (<optab>di3_mask, <optab>di3_mask_1): New.
13148 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13149 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13150 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13152 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
13154 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13157 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
13159 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13160 (nds32_canonicalize_comparison): New function.
13162 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13163 Kito Cheng <kito.cheng@gmail.com>
13164 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13166 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13167 * config/nds32/constants.md (unspec_volatile_element): Add
13168 UNSPEC_VOLATILE_RELAX_GROUP.
13169 * config/nds32/nds32-relax-opt.c: New file.
13170 * config/nds32/nds32-predicates.c
13171 (nds32_symbol_load_store_p): New function.
13172 * config/nds32/nds32-protos.h
13173 (nds32_symbol_load_store_p): Declare function.
13174 (make_pass_nds32_relax_opt): Declare new rtl pass function.
13175 * config/nds32/nds32.c
13176 (nds32_register_pass): New function to register pass.
13177 (nds32_register_passes): New function to register passes.
13178 * config/nds32/nds32.md (relax_group): New pattern.
13179 * config/nds32/nds32.opt (mrelax-hint): New option.
13180 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13182 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
13184 * config/nds32/t-nds32: Modify files dependency.
13186 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13188 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13189 (PROFILE_HOOK): Define its implementation.
13191 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13193 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13194 type and 32-bit size.
13196 2018-04-01 Jakub Jelinek <jakub@redhat.com>
13198 PR middle-end/85090
13199 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13200 (V_128_256): New mode iterator.
13201 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13202 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13203 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13205 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13206 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13208 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
13211 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13212 NaN inputs correctly.
13214 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
13217 * config/rs6000/vsx.md (??r): New mode attribute.
13218 (*vsx_mov<mode>_64bit): Use it.
13219 (*vsx_mov<mode>_32bit): Likewise.
13221 2018-03-30 Martin Sebor <msebor@redhat.com>
13223 PR tree-optimization/84818
13224 * builtins.c (check_access): Use warning_n.
13226 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13229 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13231 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13234 2018-03-30 Julia Koval <julia.koval@intel.com>
13237 * x86-tune.def (movx, partial_reg_dependency): Enable for
13240 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
13242 PR inline-asm/84985
13243 * lra-constraints.c (process_alt_operands): Move setting
13244 this_alternative_matches below.
13246 2018-03-29 Martin Liska <mliska@suse.cz>
13249 * doc/invoke.texi: Document how LTO works with debug info.
13250 Describe auto-load support of binutils. Mention 'x86-64'
13251 as valid option value of -march option.
13253 2018-03-29 Jakub Jelinek <jakub@redhat.com>
13255 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13258 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13259 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13260 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13263 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13266 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13267 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13268 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13269 for RS6000_BTM_POWERPC64.
13270 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13271 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13272 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13275 (DIVDEU): Likewise.
13277 2018-03-28 Carl Love <cel@us.ibm.com>
13280 2017-09-27 Carl Love <cel@us.ibm.com>
13282 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13283 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13284 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13287 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13289 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13290 instead of __vector bool.
13291 (_mm_max_pu8): Likewise.
13292 (_mm_min_pi16): Likewise.
13294 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13297 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13298 (DIVWEUO): Likewise.
13299 (DIVDEO): Likewise.
13300 (DIVDEUO): Likewise.
13301 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13302 DIVWEUO and DIVDEUO.
13303 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13304 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13305 (div_extend): Likewise.
13306 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13308 (__builtin_divweuo): Likewise.
13309 (__builtin_divdeo): Likewise.
13310 (__builtin_divdeuo): Likewise.
13312 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13315 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13316 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13318 PR tree-optimization/82004
13319 * gimple-match-head.c (optimize_pow_to_exp): New function.
13320 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13321 Don't fold to exp if optimize_pow_to_exp is false.
13323 2018-03-28 Martin Liska <mliska@suse.cz>
13326 * calls.c (initialize_argument_information): Fix trailing space.
13327 * common.opt: Fix typo and provide better explanation for
13328 -fsanitize-coverage option.
13329 * config/i386/i386.opt: Fix typo.
13331 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13332 Martin Liska <mliska@suse.cz>
13335 * gimplify.c (asan_poison_variable): Don't do the check for
13336 gimplify_omp_ctxp here.
13337 (gimplify_decl_expr): Do it here.
13338 (gimplify_target_expr): Likewise.
13340 2018-03-28 Martin Liska <mliska@suse.cz>
13343 * config/i386/i386.c (ix86_function_arg_advance): Do not call
13344 chkp_type_bounds_count if MPX is not enabled.
13346 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
13348 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13350 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
13353 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13354 function to create the function decl for complex long double
13355 multiply and divide for -mabi=ieeelongdouble.
13356 (init_float128_ieee): Call it.
13358 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
13361 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13362 -fcf-protection=branch -mibt.
13363 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13365 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13368 * config/arm/arm.c (arm_valid_symbolic_address): Handle
13369 arm_word_relocations.
13371 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
13374 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13375 extern array declarations.
13377 2018-03-27 Richard Biener <rguenther@suse.de>
13379 PR middle-end/84067
13380 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13381 explicit single_use checks.
13383 2018-03-27 Richard Biener <rguenther@suse.de>
13385 PR tree-optimization/85082
13386 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13389 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13391 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13392 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13393 Turn on fasynchronous-unwind-tables and funwind-tables.
13395 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
13398 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13399 (*bmi_blsr_<mode>_ccz): Ditto.
13401 2018-03-26 Tom de Vries <tom@codesourcery.com>
13403 PR tree-optimization/85063
13404 * omp-general.c (offloading_function_p): New function. Factor out
13406 * omp-offload.c (pass_omp_target_link::gate): ... here.
13407 * omp-general.h (offloading_function_p): Declare.
13408 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13409 with attribute omp declare target for offloading functions.
13411 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
13413 PR tree-optimization/84005
13414 * tree-data-ref.h (get_base_for_alignment): Declare.
13415 * tree-data-ref.c (get_base_for_alignment_1): New function.
13416 (get_base_for_alignment): Likewise.
13417 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13418 get_base_for_alignment to find a suitable base object, instead
13419 of always using drb->base_address.
13421 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13423 PR inline-asm/85022
13424 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13425 known size by default.
13427 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13429 PR inline-asm/85030
13430 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13431 and non BLKmode operands.
13433 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13436 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13437 Clean up attributes.
13439 2018-03-23 Richard Biener <rguenther@suse.de>
13442 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13443 we are going to emit early debug for LTO.
13445 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13447 PR inline-asm/85034
13448 * function.c (match_asm_constraints_1): Don't optimize if input
13449 doesn't satisfy general_operand predicate for output's mode.
13451 PR inline-asm/85022
13452 * alias.c (write_dependence_p): Don't require for x_canonicalized
13453 non-VOIDmode if x has VOIDmode.
13456 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13457 just don't try to optimize it rather than assert it never happens.
13459 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13461 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13462 macro expansions for definition of ST_INTERNAL_<mode> and
13463 LD_INTERNAL_<mode> builtins.
13464 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13466 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13468 (altivec_expand_st_builtin): Likewise.
13469 (altivec_expand_builtin): Remove calls to deleted functions.
13470 (rs6000_address_for_altivec): Delete this function.
13471 * config/rs6000/vector.md: Remove expands for
13472 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13474 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13477 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13478 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13479 re-computing once computed.
13480 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13481 (arm_init_machine_status): Initialize
13482 machine->static_chain_stack_bytes.
13484 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13487 * doc/extend.texi: Add four new prototypes for vec_ld.
13488 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13489 definitions for more logical presentation.
13490 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13491 entries for V1TI variants of __builtin_altivec_ld builtin.
13492 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13493 handling of V1TI variant of LVX icode pattern.
13494 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13495 (rs6000_gimple_fold_builtin): Likewise.
13496 (altivec_init_builtins): Add code to define
13497 __builtin_altivec_lvx_v1ti function.
13499 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13501 PR inline-asm/84941
13502 * function.c (match_asm_constraints_1): Don't do the optimization
13503 if input isn't a REG, SUBREG, MEM or constant.
13505 2018-03-22 Tom de Vries <tom@codesourcery.com>
13507 PR tree-optimization/84956
13508 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13509 bb_has_abnormal_pred.
13511 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13514 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13515 DECL_INITIAL (decl) to decl at the end.
13516 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13517 adjust the comment.
13519 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13521 * doc/extend.texi (__builtin_tgmath): Document when complex
13522 integer types are treated as _Complex _Float64.
13524 2018-03-21 Tom de Vries <tom@codesourcery.com>
13526 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13528 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13530 PR tree-optimization/84960
13531 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13532 if it is ENTRY block, move them into single succ of ENTRY in that case.
13534 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13536 PR tree-optimization/84811
13537 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13538 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13539 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13540 (known_subrange_p): Update accordingly. Cast each value involved
13541 in the size comparison, rather than casting the result of the
13544 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13546 PR tree-optimization/84982
13547 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13548 by flipping the least significant bit rather than all bits from
13549 bitpos to bitpos + bitsize - 1.
13551 2018-03-21 Nathan Sidwell <nathan@acm.org>
13553 * doc/extend.texi (Deprecated Features): Remove mention of
13554 long-deleted deprecations.
13556 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13559 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13560 * configure: Regenerate.
13562 2018-03-21 Tom de Vries <tom@codesourcery.com>
13564 PR tree-optimization/83126
13565 * tree-parloops.c (num_phis): New function.
13566 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13568 2018-03-21 Nathan Sidwell <nathan@acm.org>
13570 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13571 mention anon-struct/union members and trailing attributes.
13573 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13575 PR tree-optimization/84969
13576 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13577 builtin memset partitions if they set different rhs values.
13579 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13581 PR rtl-optimization/84989
13582 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13583 VEC_DUPLICATE with scalar result mode.
13585 2018-03-21 Martin Liska <mliska@suse.cz>
13588 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13589 not intended return statement.
13591 2018-03-21 Martin Liska <mliska@suse.cz>
13594 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13595 (chkp_find_bound_slots_1): Limit number of iterations.
13597 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13600 * Minor grammar fixes for x86 options.
13602 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13605 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13606 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13608 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13611 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13612 (altivec_lvx_<mode>_1op): Likewise.
13613 (altivec_stvx_<mode>_2op): Likewise.
13614 (altivec_stvx_<mode>_1op): Likewise.
13615 (altivec_lvx_<VM2:mode>): New define_expand.
13616 (altivec_stvx_<VM2:mode>): Likewise.
13617 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13618 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13619 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13620 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13621 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13622 (rs6000_gen_lvx): Likewise.
13623 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13624 (altivec_expand_stv_builtin): Likewise.
13625 (altivec_expand_builtin): Likewise.
13626 * config/rs6000/vector.md: Likewise.
13628 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13631 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13634 2018-03-20 Richard Biener <rguenther@suse.de>
13637 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13638 sign-conversions as zero, fall back to standard scalar_stmt
13641 2018-03-20 Martin Liska <mliska@suse.cz>
13644 * predict.c (rebuild_frequencies): Handle case when we have
13645 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13647 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13650 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13651 flag_section_anchors.
13652 * varasm.c (use_blocks_for_decl_p): Remove hack for
13653 dw2_force_const_mem.
13656 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13658 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13659 be created, use lowpart_subreg of operands[0] rather than operands[0]
13661 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13662 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13663 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13664 and n constraint instead of aarch64_shift_imm_di and Usd.
13665 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13666 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13668 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13671 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13672 to favor GPR over NEON registers.
13673 (<shift>di3_neon): Likewise.
13675 2018-03-20 Tom de Vries <tom@codesourcery.com>
13678 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13679 (nvptx_process_pars): Emit bar.sync asap and alap.
13681 2018-03-20 Tom de Vries <tom@codesourcery.com>
13684 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13685 seen_label if seen_label is already set.
13687 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13690 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13691 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13692 Use 1U instead of 1. Formatting fixes.
13695 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13696 instead of TREE_TYPE (s1) for the return value.
13698 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13700 PR tree-optimization/84946
13701 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13702 bitsize + bitsize in poly_uint64 rather than poly_int64.
13705 * dwarf2asm.c: Include fold-const.c.
13706 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13707 of decl rather than decl itself.
13709 PR rtl-optimization/84643
13710 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13712 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13715 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13716 calling assemble_variable.
13718 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13721 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13722 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13724 2018-03-19 Jim Wilson <jimw@sifive.com>
13727 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13728 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13729 (riscv_first_stack_step): Likewise.
13730 (riscv_option_override): Use STACK_BOUNDARY instead of
13731 MIN_STACK_BOUNDARY.
13732 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13733 MIN_STACK_BOUNDARY.
13734 (BIGGEST_ALIGNMENT): Set to 128.
13735 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13736 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13739 2018-03-19 Richard Biener <rguenther@suse.de>
13741 PR tree-optimization/84933
13742 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13743 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13745 2018-03-19 Richard Biener <rguenther@suse.de>
13747 PR tree-optimization/84859
13748 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13749 (cond_if_else_store_replacement): Perform sinking operation on
13750 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13751 Generalize what a BB with a single eligible store is.
13753 2018-03-19 Richard Biener <rguenther@suse.de>
13755 PR tree-optimization/84929
13756 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13757 chrec_is_positive against non-chrec arg.
13759 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13762 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13764 2018-03-18 Martin Liska <mliska@suse.cz>
13766 PR rtl-optimization/84635
13767 * regrename.c (build_def_use): Use matches_mode only when
13770 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13772 PR tree-optimization/84913
13773 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13774 vectorize chains of COND_EXPRs.
13776 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13778 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13780 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13782 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13784 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13786 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13788 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13789 Kito Cheng <kito.cheng@gmail.com>
13791 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13792 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13793 (nds32_adjust_reg_alloc_order): New function.
13794 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13796 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13798 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13799 nds32_print_operand, nds32_print_operand_address): Use
13800 HOST_WIDE_INT_PRINT_DEC instead.
13802 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13804 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13806 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13809 * config/i386/i386.c (initial_ix86_tune_features,
13810 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13811 unsigned long long.
13812 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13813 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13814 rather than 1u << ix86_tune. Formatting fix.
13815 (ix86_option_override_internal): Change ix86_arch_mask from
13816 unsigned int to unsigned HOST_WIDE_INT, initialize to
13817 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13818 (ix86_function_specific_restore): Likewise.
13820 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13823 * postreload.c (reload_combine_recognize_pattern): Perform
13824 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13825 truncate_int_for_mode the result for the destination's mode.
13828 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13829 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13831 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13834 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13837 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13838 regno_allocno_class_array and sorted_pseudos.
13839 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13840 insns where regno is used.
13842 2018-03-16 Martin Liska <mliska@suse.cz>
13845 * multiple_target.c (create_dispatcher_calls): Redirect
13846 reference in the symbol table.
13848 2018-03-16 Martin Liska <mliska@suse.cz>
13851 * multiple_target.c (create_dispatcher_calls): Redirect also
13854 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13858 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13859 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13860 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13862 2018-03-16 Julia Koval <julia.koval@intel.com>
13864 * doc/invoke.texi (Skylake Server): Add CLWB.
13865 Cannonlake): Remove CLWB.
13867 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13869 PR tree-optimization/84841
13870 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13872 (FLOAT_ONE_CONST_TYPE): Define.
13873 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13874 (sort_by_operand_rank): Put entries with higher constant_type last
13875 rather than first to match comments.
13877 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13879 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13882 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13885 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13886 check and use address of target always.
13888 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13891 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13892 (indirect_thunk_bnd_needed): Likewise.
13893 (indirect_thunks_used): Likewise.
13894 (indirect_thunks_bnd_used): Likewise.
13895 (indirect_return_needed): New.
13896 (indirect_return_bnd_needed): Likewise.
13897 (output_indirect_thunk_function): Add a bool argument for
13899 (output_indirect_thunk_function): Don't generate alias for
13900 function return thunk.
13901 (ix86_code_end): Call output_indirect_thunk_function to generate
13902 function return thunks.
13903 (ix86_output_function_return): Set indirect_return_bnd_needed
13904 and indirect_return_needed instead of indirect_thunk_bnd_needed
13905 and indirect_thunk_needed.
13907 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13909 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13910 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13911 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13913 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13914 Paul Hua <paul.hua.gm@gmail.com>
13917 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13919 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13921 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13922 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13923 resp. SFmode cases.
13925 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13928 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13929 instead of GET_MODE_SIZE when comparing Units.
13931 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13934 * varasm.c (hash_section): Return an unchangeble hash value
13935 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13936 Return !aarch64_can_use_per_function_literal_pools_p ().
13938 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13941 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13942 rather than address of cmode as last argument to prepare_cmp_insn.
13944 2018-03-15 Julia Koval <julia.koval@intel.com>
13946 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13947 F_AVX512VNNI, F_AVX512BITALG): New.
13949 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13952 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13953 insn for floating-point loads and stores.
13955 2018-03-14 Carl Love <cel@us.ibm.com>
13957 * config/rs6000/rs6000-c.c: Add macro definitions for
13958 ALTIVEC_BUILTIN_VEC_PERMXOR.
13959 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13960 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13961 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13962 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13964 * config/doc/extend.texi: Add prototypes for vec_permxor.
13966 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13969 * diagnostic-show-locus.c (class layout_point): Convert m_line
13970 from int to linenum_type.
13971 (line_span::comparator): Use linenum "compare" function when
13972 comparing line numbers.
13973 (test_line_span): New function.
13974 (layout_range::contains_point): Convert param "row" from int to
13976 (layout_range::intersects_line_p): Likewise.
13977 (layout::will_show_line_p): Likewise.
13978 (layout::print_source_line): Likewise.
13979 (layout::should_print_annotation_line_p): Likewise.
13980 (layout::print_annotation_line): Likewise.
13981 (layout::print_leading_fixits): Likewise.
13982 (layout::annotation_line_showed_range_p): Likewise.
13983 (struct line_corrections): Likewise for field m_row.
13984 (line_corrections::line_corrections): Likewise for param "row".
13985 (layout::print_trailing_fixits): Likewise.
13986 (layout::get_state_at_point): Likewise.
13987 (layout::get_x_bound_for_row): Likewise.
13988 (layout::print_line): Likewise.
13989 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13990 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13991 * input.c (selftest::test_linenum_comparisons): New function.
13992 (selftest::input_c_tests): Call it.
13993 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13994 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13995 * selftest.h (ASSERT_GT): New macro.
13996 (ASSERT_GT_AT): New macro.
13997 (ASSERT_LT): New macro.
13998 (ASSERT_LT_AT): New macro.
14000 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
14002 PR rtl-optimization/84780
14003 * combine.c (distribute_links): Don't make a link based on pc_rtx.
14005 2018-03-14 Martin Liska <mliska@suse.cz>
14007 * tree.c (record_node_allocation_statistics): Use
14008 get_stats_node_kind.
14009 (get_stats_node_kind): New function extracted from
14010 record_node_allocation_statistics.
14011 (free_node): Use get_stats_node_kind.
14013 2018-03-14 Richard Biener <rguenther@suse.de>
14015 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14016 that the value-set of ANTIC_IN doesn't grow.
14019 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14021 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14022 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14024 2018-03-14 Julia Koval <julia.koval@intel.com>
14026 * config.gcc (icelake-client, icelake-server): New.
14028 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14029 (initial_ix86_arch_features): Ditto.
14030 (PTA_SKYLAKE): Add SGX.
14031 (PTA_ICELAKE): Remove.
14032 (PTA_ICELAKE_CLIENT): New.
14033 (PTA_ICELAKE_SERVER): New.
14034 (ix86_option_override_internal): Split up icelake on icelake client and
14036 (get_builtin_code_for_version): Ditto.
14037 (fold_builtin_cpu): Ditto.
14038 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14039 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14040 * config/i386/i386.h (processor_type): Ditto.
14041 * doc/invoke.texi: Ditto.
14043 2018-03-14 Jakub Jelinek <jakub@redhat.com>
14046 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14047 INTEGER_CST offset, add it together with bitpos / 8 and
14048 sign extend based on POINTER_SIZE.
14052 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
14055 * config/i386/constraints.md (Yc): New register constraint.
14056 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14057 Use Yc constraint for alternative 2 of operand 0. Remove
14058 preferred_for_speed attribute.
14060 2018-03-14 Richard Biener <rguenther@suse.de>
14062 PR tree-optimization/84830
14063 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14064 with the old one to avoid oscillations.
14066 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
14069 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14071 (assign_by_spills): Return a flag of reload assignment failure.
14072 Do not process the reload assignment failures. Do not spill other
14073 reload pseudos if they has the same reg class. Update n if
14075 (lra_assign): Add a return arg. Set up from the result of
14076 assign_by_spills call.
14077 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14078 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14079 usage_insns if it is not NULL.
14080 (spill_hard_reg_in_range): New function.
14081 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14082 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14083 function prototypes.
14084 (lra_assign): Change prototype.
14085 * lra.c (lra): Add code to deal with fails by splitting hard reg
14088 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
14090 * config/riscv/riscv.opt (mrelax): New option.
14091 * config/riscv/riscv.c (riscv_file_start): Emit ".option
14092 "norelax" when riscv_mrelax is disabled.
14093 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14095 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14098 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14099 reassociation for int modes.
14101 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14103 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14104 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14106 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14107 * config/aarch64/aarch64-sve.md
14108 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14109 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14110 (*extend<mode><Vwide>2): Rename to...
14111 (aarch64_sve_extend<mode><Vwide>2): ...this.
14112 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14113 renaming the old pattern to...
14114 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
14116 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14117 define_expand, renaming the old pattern to...
14118 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14119 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14120 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14121 account when deciding which SVE instruction the optab should use.
14122 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14124 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14126 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14127 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14128 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14129 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14130 (tlsdesc_small_<mode>): Turn a define_expand and use
14131 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
14132 (tlsdesc_small_advsimd_<mode>): ...this.
14133 (tlsdesc_small_sve_<mode>): New pattern.
14135 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14137 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14138 (UNSPEC_UMUL_HIGHPART): New constants.
14139 (MUL_HIGHPART): New int iteraor.
14140 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14141 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14143 (*<su>mul<mode>3_highpart): New define_insn.
14145 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14148 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14151 2018-03-13 Martin Liska <mliska@suse.cz>
14154 * (sem_item_optimizer::sem_item_optimizer): Initialize new
14156 (sem_item_optimizer::~sem_item_optimizer): Release it.
14157 (sem_item_optimizer::merge_classes): Register variable aliases.
14158 (sem_item_optimizer::fixup_pt_set): New function.
14159 (sem_item_optimizer::fixup_points_to_sets): Likewise.
14160 * ipa-icf.h: Declare new variables and functions.
14162 2018-03-13 Jakub Jelinek <jakub@redhat.com>
14164 PR middle-end/84834
14165 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14166 integer_pow2p@2 and test integer_pow2p in condition.
14167 (A < 0 ? C : 0): Similarly for @1.
14169 PR middle-end/84831
14170 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14171 characters starting at p contain '\0' character, don't look beyond
14175 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14176 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14179 * reg-stack.c (change_stack): Change update_end var from int to
14180 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14181 also call set_block_for_insn on the newly added insns and rescan.
14184 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14185 on the last operand.
14188 * tree.c (stabilize_reference_1): Return save_expr (e) for
14189 STATEMENT_LIST even if it doesn't have side-effects.
14191 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
14193 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14195 2018-03-12 Renlin Li <renlin.li@arm.com>
14197 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14198 aarch64_output_scalar_simd_mov_immediate.
14200 2018-03-12 Martin Sebor <msebor@redhat.com>
14202 PR tree-optimization/83456
14203 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14204 for perfectly overlapping calls to memcpy.
14205 (gimple_fold_builtin_memory_chk): Same.
14206 (gimple_fold_builtin_strcpy): Handle no-warning.
14207 (gimple_fold_builtin_stxcpy_chk): Same.
14208 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14210 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14212 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14213 parameter. Use it for SFmode.
14214 (rs6000_function_arg_advance_1): Adjust.
14215 (rs6000_function_arg): Adjust.
14216 (rs6000_gimplify_va_arg): Pass false for that new parameter.
14218 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14220 PR rtl-optimization/84169
14221 PR rtl-optimization/84780
14222 * combine.c (can_combine_p): Check for a 2-insn combination whether
14223 the destination register is used between the two insns, too.
14225 2018-03-12 Richard Biener <rguenther@suse.de>
14227 PR tree-optimization/84803
14228 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14229 for refs DR analysis didn't process.
14231 2018-03-12 Richard Biener <rguenther@suse.de>
14233 PR tree-optimization/84777
14234 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14235 force-vectorize loops ignore whether we are optimizing for size.
14237 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
14239 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14240 (TARGET_MD_ASM_ADJUST): Define.
14242 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
14243 Kito Cheng <kito.cheng@gmail.com>
14244 Chung-Ju Wu <jasonwucj@gmail.com>
14246 * config/nds32/nds32.c (nds32_compute_stack_frame,
14247 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14248 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14249 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14250 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14251 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14252 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14253 * config/nds32/nds32.md (prologue, epilogue): Use macro
14254 NDS32_V3PUSH_AVAILABLE_P to do checking.
14256 2018-03-11 Jakub Jelinek <jakub@redhat.com>
14259 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14260 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14261 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
14262 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
14263 addition of most attributes on !orig_type_die or the attribute not
14264 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14266 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14267 Chung-Ju Wu <jasonwucj@gmail.com>
14269 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14270 __NDS32_VH__ macro.
14271 * config/nds32/nds32.opt (mvh): New option.
14273 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14274 Chung-Ju Wu <jasonwucj@gmail.com>
14276 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14278 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14279 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14282 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14283 Chung-Ju Wu <jasonwucj@gmail.com>
14285 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14287 * config/nds32/nds32-multiple.md (strlensi): New pattern.
14288 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14290 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
14291 Kito Cheng <kito.cheng@gmail.com>
14292 Chung-Ju Wu <jasonwucj@gmail.com>
14294 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14295 UNSPEC_FFMISM and UNSPEC_FLMISM.
14296 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14297 for ffb, ffmism and flmism.
14298 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14299 (unspec_ffmism): Ditto.
14300 (unspec_flmism): Ditto.
14301 (nds32_expand_builtin_impl): Check if string extension is available.
14302 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14303 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14305 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
14308 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14311 * lra-assigns.c (assign_by_spills): Return a flag of reload
14312 assignment failure. Do not process the reload assignment
14313 failures. Do not spill other reload pseudos if they has the same
14315 (lra_assign): Add a return arg. Set up from the result of
14316 assign_by_spills call.
14317 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14318 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14319 usage_insns if it is not NULL.
14320 (spill_hard_reg_in_range): New function.
14321 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14322 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14323 function prototypes.
14324 (lra_assign): Change prototype.
14325 * lra.c (lra): Add code to deal with fails by splitting hard reg
14328 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
14331 * config/i386/i386.opt: Replace Enforcment with Enforcement.
14333 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
14336 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14337 (dw_val_node): Add val_symbolic_view.
14338 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14339 (symview_upper_bound): New.
14340 (new_line_info_table): Initialize symviews_since_reset.
14341 (dwarf2out_source_line): Count symviews_since_reset and set
14342 symview_upper_bound.
14343 (dw_val_equal_p): Handle symview.
14344 (add_AT_symview): New.
14345 (print_dw_val): Handle symview.
14346 (attr_checksum, attr_checksum_ordered): Likewise.
14347 (same_dw_val_p, size_of_die): Likewise.
14348 (value_format, output_die): Likewise.
14349 (add_high_low_attributes): Use add_AT_symview for entry_view.
14350 (dwarf2out_finish): Reset symview_upper_bound, clear
14353 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
14356 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14357 Add strict argument and use it.
14358 (rs6000_split_multireg_move): Update for new strict argument.
14359 (mem_operand_gpr): Disallow all non-offsettable addresses.
14360 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14362 2018-03-09 Jakub Jelinek <jakub@redhat.com>
14365 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14366 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14367 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14370 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14371 decl, use remap_type if we want to use the type.
14373 2018-03-09 Martin Sebor <msebor@redhat.com>
14375 PR tree-optimization/84526
14376 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14378 (builtin_access::generic_overlap): Be prepared to handle non-array
14381 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
14383 PR rtl-optimization/84682
14384 * lra-constraints.c (process_address_1): Check is_address flag
14385 for address constraints.
14386 (process_alt_operands): Likewise.
14387 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14388 preprocess_constraints.
14389 * recog.h (preprocess_constraints): Add oploc parameter.
14391 * recog.c (preprocess_constraints): Test address_operand for
14392 CT_ADDRESS constraints.
14394 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14397 * lra-assigns.c (assign_by_spills): Return a flag of reload
14398 assignment failure. Do not process the reload assignment
14399 failures. Do not spill other reload pseudos if they has the same
14401 (lra_assign): Add a return arg. Set up from the result of
14402 assign_by_spills call.
14403 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14404 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14405 usage_insns if it is not NULL.
14406 (spill_hard_reg_in_range): New function.
14407 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14408 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14409 function prototypes.
14410 (lra_assign): Change prototype.
14411 * lra.c (lra): Add code to deal with fails by splitting hard reg
14414 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14417 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14418 Accept complain bool parameter. Only emit errors if it is true.
14419 (arm_parse_cpu_option_name): Likewise.
14420 (arm_target_thumb_only): Adjust callers of the above.
14421 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14422 prototype to take a default true bool parameter.
14423 (arm_parse_arch_option_name): Likewise.
14425 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14426 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14430 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14431 * configure: Regenerate.
14432 * configure.ac ("linker --version-script option"): New.
14433 ("linker soname option"): New.
14435 2018-03-09 Richard Biener <rguenther@suse.de>
14437 PR tree-optimization/84775
14438 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14439 immediate uses of predicate stmts and mark them modified.
14442 PR tree-optimization/84178
14443 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14445 (version_loop_for_if_conversion): Delay update_ssa call.
14446 (tree_if_conversion): Delay update_ssa until after predicate
14449 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14452 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14453 when the function accesses prior frames.
14455 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14458 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14459 gen_llsym, otherwise call maybe_gen_llsym.
14461 PR inline-asm/84742
14462 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14463 has ',' character inside of it.
14465 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14468 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14469 as clobbering CC_REGNUM.
14471 2018-03-08 Richard Biener <rguenther@suse.de>
14473 PR middle-end/84552
14474 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14475 (follow_copies_to_constant): Do not follow SSA names registered
14478 2018-03-08 Richard Biener <rguenther@suse.de>
14480 PR tree-optimization/84178
14481 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14483 (version_loop_for_if_conversion): Delay update_ssa call.
14484 (tree_if_conversion): Delay update_ssa until after predicate
14487 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14489 PR tree-optimization/84178
14490 * tree-if-conv.c (release_bb_predicate): Remove the
14491 the assertion that the stmts have NULL use_ops.
14492 Discard the statements, asserting that they haven't
14493 yet been added to a BB.
14495 2018-03-08 Richard Biener <rguenther@suse.de>
14497 PR tree-optimization/84746
14498 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14499 (phi_translate): Pass in destination ANTIC_OUT set.
14500 (phi_translate_1): Likewise. For a simplified result lookup
14501 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14502 (phi_translate_set): Adjust.
14503 (do_pre_regular_insertion): Likewise.
14504 (do_pre_partial_partial_insertion): Likewise.
14506 2018-03-08 Martin Liska <mliska@suse.cz>
14508 PR gcov-profile/84735
14509 * doc/gcov.texi: Document usage of profile files.
14510 * gcov-io.h: Document changes in the format.
14512 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14516 * dwarf2out.c (struct dw_line_info_table): Update comments for
14518 (FORCE_RESET_NEXT_VIEW): New.
14519 (FORCE_RESETTING_VIEW_P): New.
14520 (RESETTING_VIEW_P): Check for -1 too.
14521 (ZERO_VIEW_P): Likewise.
14522 (new_line_info_table): Force-reset next view.
14523 (dwarf2out_begin_function): Likewise.
14524 (dwarf2out_source_line): Simplify zero_view_p initialization.
14525 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14526 view directly. Omit view when omitting .loc at line 0.
14528 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14530 PR tree-optimization/84740
14531 * tree-switch-conversion.c (process_switch): Call build_constructors
14532 only if info.phi_count is non-zero.
14534 PR tree-optimization/84739
14535 * tree-tailcall.c (find_tail_calls): Check call arguments against
14536 DECL_ARGUMENTS (current_function_decl) rather than
14537 DECL_ARGUMENTS (func) when checking for tail recursion.
14539 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14541 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14542 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14543 Volker Reichelt's entry and add entries for people that perform
14544 GCC fuzzy testing and report numerous bugs.
14546 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14549 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14550 readonly data in sdata, if that is disabled.
14551 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14552 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14553 -mreadonly-in-sdata option.
14555 2018-03-07 Martin Sebor <msebor@redhat.com>
14557 PR tree-optimization/84468
14558 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14559 basic block when looking for nul assignment.
14561 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14564 * except.h (output_function_exception_table): Adjust prototype.
14565 * except.c (output_function_exception_table): Remove FNNAME parameter
14566 and add SECTION parameter. Ouput one part of the table at a time.
14567 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14568 the first part of the exception table and emit unwind directives.
14569 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14570 (i386_pe_seh_cold_init): Likewise.
14571 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14572 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14573 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14574 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14575 * config/i386/winnt.c: Include except.h.
14576 (struct seh_frame_state): Add reg_offset, after_prologue and
14577 in_cold_section fields.
14578 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14579 (i386_pe_seh_cold_init): New function.
14580 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14581 to seh->in_cold_section.
14582 (seh_emit_push): Record the offset of the push.
14583 (seh_emit_save): Record the offet of the save.
14584 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14585 Test seh->after_prologue to disregard the epilogue.
14586 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14587 (i386_pe_end_cold_function): New function.
14589 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14592 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14593 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14596 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14598 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14599 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14601 PR middle-end/84723
14602 * multiple_target.c: Include tree-inline.h and intl.h.
14603 (expand_target_clones): Diagnose and fail if node->definition and
14604 !tree_versionable_function_p (node->decl).
14606 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14608 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14610 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14611 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14612 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14614 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14617 * combine.c (try_combine): Use reg_or_subregno instead of handling
14618 just paradoxical SUBREGs and REGs.
14620 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14622 * config/arc/arc.c (arc_finalize_pic): Remove function.
14623 (arc_must_save_register): We use single base PIC register, remove
14624 checks to save/restore the PIC register.
14625 (arc_expand_prologue): Likewise.
14626 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14628 (arc_verify_short): Likewise.
14629 (arc_attr_type): Likewise.
14630 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14631 (walk_stores): Likewise.
14632 (arc_address_cost): Make it static.
14633 (arc_verify_short): Likewise.
14634 (branch_dest): Likewise.
14635 (arc_attr_type): Likewise.
14636 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14637 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14638 (arc_final_prescan_insn): Remove inserting the nops due to
14639 hardware hazards. It is done in reorg step.
14640 (insn_length_variant_t): Remove.
14641 (insn_length_parameters_t): Likewise.
14642 (arc_insn_length_parameters): Likewise.
14643 (arc_get_insn_variants): Likewise.
14644 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14646 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14648 PR inline-asm/84683
14649 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14652 PR tree-optimization/84687
14653 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14655 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14657 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14659 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14660 Rename to ppc_speculation_barrier.
14661 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14662 __builtin_ppc_speculation_barrier.
14664 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14667 * combine.c (combine_simplify_rtx): Don't try to simplify if
14668 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14671 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14673 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14674 to 32 bytes when compiling for POWER9.
14676 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14679 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14680 regparm >= 3 with no arg reg available also for calls with
14681 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14684 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14686 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14688 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14691 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14693 2018-03-05 Richard Biener <rguenther@suse.de>
14695 PR tree-optimization/84486
14696 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14697 When inserting a __builtin_assume_aligned call set the LHS
14698 SSA name alignment info accordingly.
14700 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14702 PR tree-optimization/84114
14703 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14704 Avoid reassociation of FLOAT_MODE addition.
14706 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14708 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14709 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14710 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14711 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14712 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14713 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14714 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14716 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14717 __builtin_ia32_wbinvd): New builtins.
14718 (SPECIAL_ARGS2): New.
14719 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14720 (SPECIAL_ARGS2): New.
14721 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14722 (ix86_valid_target_attribute_inner_p): Ditto.
14723 (ix86_init_mmx_sse_builtins): Add special_args2.
14724 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14725 TARGET_WBNOINVD_P): New.
14726 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14727 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14728 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14729 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14730 * config/i386/pconfigintrin.h: New file.
14731 * config/i386/wbnoinvdintrin.h: Ditto.
14732 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14734 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14736 2018-03-05 Richard Biener <rguenther@suse.de>
14738 PR tree-optimization/84670
14739 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14741 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14742 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14743 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14744 doesn't grow if all successors (recursively) were visited at least
14747 2018-03-05 Richard Biener <rguenther@suse.de>
14749 PR tree-optimization/84650
14750 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14751 if executed in the loop pipeline.
14753 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14755 * doc/configfiles.texi (Configuration Files): Move info about
14756 conditionalizing $target-protos.h to...
14757 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14758 differs from $target-protos.h.
14760 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14761 Chung-Ju Wu <jasonwucj@gmail.com>
14763 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14764 * config/nds32/nds32-multiple.md (setmemsi): Define.
14765 * config/nds32/nds32-memory-manipulation.c
14766 (nds32_gen_dup_4_byte_to_word_value): New.
14767 (emit_setmem_word_loop): New.
14768 (emit_setmem_byte_loop): New.
14769 (nds32_expand_setmem_loop): New.
14770 (nds32_expand_setmem_loop_v3m): New.
14771 (nds32_expand_setmem_unroll): New.
14772 (nds32_expand_setmem): New.
14774 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14775 Chung-Ju Wu <jasonwucj@gmail.com>
14777 * config/nds32/nds32-memory-manipulation.c
14778 (nds32_emit_load_store): New.
14779 (nds32_emit_post_inc_load_store): New.
14780 (nds32_emit_mem_move): New.
14781 (nds32_emit_mem_move_block): New.
14782 (nds32_expand_movmemsi_loop_unknown_size): New.
14783 (nds32_expand_movmemsi_loop_known_size): New.
14784 (nds32_expand_movmemsi_loop): New.
14785 (nds32_expand_movmemsi_unroll): New.
14786 (nds32_expand_movmemqi): Rename ...
14787 (nds32_expand_movmemsi): ... to this.
14788 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14789 (movmemsi): ... to this.
14790 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14791 (nds32_expand_movmemsi): ... to this.
14793 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14794 Monk Chiang <sh.chiang04@gmail.com>
14795 Chung-Ju Wu <jasonwucj@gmail.com>
14797 * config/nds32/nds32-protos.h
14798 (nds32_expand_load_multiple): New arguments.
14799 (nds32_expand_store_multiple): Ditto.
14800 (nds32_valid_multiple_load_store): Rename ...
14801 (nds32_valid_multiple_load_store_p): ... to this.
14802 * config/nds32/nds32-memory-manipulation.c
14803 (nds32_expand_load_multiple): Refine implementation.
14804 (nds32_expand_store_multiple): Ditto.
14805 * config/nds32/nds32-multiple.md
14806 (load_multiple): Update nds32_expand_load_multiple interface.
14807 (store_multiple): Update nds32_expand_store_multiple interface.
14808 * config/nds32/nds32-predicates.c
14809 (nds32_valid_multiple_load_store): Rename ...
14810 (nds32_valid_multiple_load_store_p): ... to this and refine
14812 * config/nds32/predicates.md
14813 (nds32_load_multiple_and_update_address_operation): New predicate.
14814 (nds32_store_multiple_and_update_address_operation): New predicate.
14816 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14817 Chung-Ju Wu <jasonwucj@gmail.com>
14819 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14820 (combo): New attribute.
14821 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14823 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14825 * config/nds32/nds32.opt: Change -mcmodel= default value.
14827 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14828 Monk Chiang <sh.chiang04@gmail.com>
14829 Chung-Ju Wu <jasonwucj@gmail.com>
14831 * config/nds32/constants.md (unspec_element): New enum.
14832 * config/nds32/constraints.md (Umw): New constraint.
14833 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14834 * config/nds32/nds32-intrinsic.md: Likewise.
14835 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14836 (nds32_valid_smw_lwm_base_p): New.
14837 (nds32_output_smw_single_word): New.
14838 (nds32_output_lmw_single_word): New.
14839 (nds32_expand_unaligned_load): New.
14840 (nds32_expand_unaligned_store): New.
14841 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14842 (nds32_output_smw_single_word): Declare.
14843 (nds32_output_lmw_single_word): Declare.
14844 (nds32_expand_unaligned_load): Declare.
14845 (nds32_expand_unaligned_store): Declare.
14846 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14847 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14848 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14849 NDS32_BUILTIN_UASTORE_DW.
14850 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14853 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14854 Kito Cheng <kito.cheng@gmail.com>
14855 Chung-Ju Wu <jasonwucj@gmail.com>
14857 * config/nds32/nds32-intrinsic.c
14858 (nds32_expand_builtin_null_ftype_reg): Delete.
14859 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14860 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14861 (nds32_read_argument): New.
14862 (nds32_legitimize_target): Ditto.
14863 (nds32_legitimize_argument): Ditto.
14864 (nds32_check_constant_argument): Ditto.
14865 (nds32_expand_unop_builtin): Ditto.
14866 (nds32_expand_unopimm_builtin): Ditto.
14867 (nds32_expand_binop_builtin): Ditto.
14868 (nds32_builtin_decl_impl): Ditto.
14869 (builtin_description): Ditto.
14870 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14871 (nds32_init_builtins_impl): Ditto.
14872 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14873 (nds32_builtin_decl): New.
14874 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14875 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14877 2018-03-02 Jeff Law <law@redhat.com>
14879 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14880 (redundant_insn, fill_simple_delay_slots): Likewise.
14881 (fill_slots_from_thread): Likewise.
14882 * resource.c (mark_referenced_resources): Likewise.
14883 (mark_set_resources, find_dead_or_set_registers): Likewise.
14885 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14887 * substring-locations.h (format_warning_va): Formatting fix for
14888 ATTRIBUTE_GCC_DIAG.
14889 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14891 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14892 * substring-locations.c: Include intl.h.
14893 (format_warning_va): Turned into small wrapper around
14894 format_warning_n_va, renamed to ...
14895 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14896 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14898 (format_warning_at_substring_n): New function.
14899 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14900 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14901 format_warning_at_substring with just a shorter name instead of
14902 const function pointer.
14903 (fmtwarn_n): New function.
14904 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14905 appropriate, get rid of all the fmtstr temporaries, move conditionals
14906 with G_() wrapped string literals directly into fmtwarn arguments,
14907 cast dir.len to (int), formatting fixes.
14909 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14911 * doc/invoke.texi: Remove "Cilk Plus" references.
14913 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14914 Richard Biener <rguenther@suse.de>
14917 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14918 for error or warning attributes if CALL_FROM_THUNK_P is set.
14921 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14924 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14925 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14928 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14929 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14931 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14932 instead of -1U in last predictors element's probability member.
14934 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14937 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14938 arguments if they are comparable.
14940 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14942 PR tree-optimization/84634
14943 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14944 masks and masked_loop_p with a single loop_masks, making sure it's
14945 null for bb vectorization.
14947 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14949 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14950 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14951 loop->force_vectorize to check whether there is no alias.
14953 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14956 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14958 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14960 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14961 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14962 instead of a loop around prev_real_insn.
14963 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14966 PR inline-asm/84625
14967 * config/i386/i386.c (ix86_print_operand): Use conditional
14968 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14971 2018-03-02 Richard Biener <rguenther@suse.de>
14973 PR tree-optimization/84427
14974 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14975 (bitmap_set_subtract_values): Rewrite to handle multiple
14978 (prune_clobbered_mems): Likewise.
14979 (phi_translate): Take edge instead of pred/phiblock.
14980 (phi_translate_1): Likewise.
14981 (phi_translate_set): Likewise. Insert all translated
14982 exprs for a value into the set, keeping possibly multiple
14983 expressions per value.
14984 (compute_antic_aux): Adjust for phi_translate changes.
14985 When intersecting union the expressions and prune those
14986 not in the final value set, keeping possibly multiple
14987 expressions per value. Do not use value-insertion
14988 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14989 all expressions. Add verification that the value-sets
14990 only shrink during iteration.
14991 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14992 (do_pre_regular_insertion): Likewise.
14993 (do_pre_partial_partial_insertion): Likewise.
14995 2018-03-02 Richard Biener <rguenther@suse.de>
14998 * config/darwin.c (saved_debug_info_level): New static global.
14999 (darwin_asm_lto_start): Disable debug info generation for LTO out.
15000 (darwin_asm_lto_end): Restore debug info generation settings.
15002 2018-03-01 Martin Liska <mliska@suse.cz>
15005 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15006 volatile arguments.
15008 2018-03-01 Richard Biener <rguenther@suse.de>
15011 * dwarf2out.c (gen_variable_die): Properly handle late VLA
15012 type annotation with LTO when debug was disabled at compile-time.
15014 2018-03-01 Matthew Fortune <mfortune@gmail.com>
15016 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15018 (mips_final_postscan_insn): Likewise.
15020 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
15022 PR rtl-optimization/84528
15023 * alias.c (init_alias_target): Add commentary.
15024 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15025 a unique base value if the frame pointer is not eliminated
15026 to the stack pointer.
15028 2018-03-01 Tom de Vries <tom@codesourcery.com>
15030 PR rtl-optimization/83327
15031 * lra-int.h (hard_regs_spilled_into): Declare.
15032 * lra.c (hard_regs_spilled_into): Define.
15033 (init_reg_info): Init hard_regs_spilled_into.
15034 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15035 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15036 (process_bb_lives): Handle hard_regs_spilled_into.
15037 (lra_create_live_ranges_1): Before doing liveness propagation, clear
15038 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15040 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
15042 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15043 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15044 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15045 * config/rs6000/aix72.h: New file.
15047 2018-02-28 Jakub Jelinek <jakub@redhat.com>
15049 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15050 instead of warning_at with conditional singular and plural messages
15054 * stor-layout.c (update_alignment_for_field): For
15055 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15056 && !DECL_PACKED (field), do the alignment update, just use
15057 only desired_align instead of MAX (type_align, desired_align)
15059 (place_field): Don't do known_align < desired_align handling
15060 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15061 is non-NULL, instead do it after rli->prev_field handling and
15062 only if not within a bitfield word. For DECL_PACKED (field)
15063 use type_align of BITS_PER_UNIT.
15065 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
15067 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15068 superfluous parentheses and trailing spaces.
15070 2018-02-28 Richard Biener <rguenther@suse.de>
15072 PR tree-optimization/84584
15073 * graphite-scop-detection.c (scop_detection::add_scop): Discard
15074 SCoPs with fake exit edge.
15076 2018-02-28 Martin Liska <mliska@suse.cz>
15079 * timevar.c (timer::print): Fix format to properly print 100%
15082 2018-02-28 Richard Biener <rguenther@suse.de>
15084 PR middle-end/84607
15085 * genmatch.c (capture_info::walk_match): Do not mark
15086 captured expressions without operands as expr_p given
15087 they act more like predicates and should be subject to
15088 "lost tail" side-effect preserving.
15090 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
15092 PR rtl-optimization/81611
15093 * auto-inc-dec.c (attempt_change): Move dead note from
15094 mem_insn if it's the next use of regno
15095 (find_address): Take address use of reg holding
15096 non-incremented value. Add parm to limit search to the named
15098 (merge_in_block): Attempt to use a mem insn that is the next
15099 use of the original regno.
15101 2018-02-27 Martin Sebor <msebor@redhat.com>
15104 * doc/invoke.texi (-Wmissing-attributes): New option.
15105 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15107 2018-02-27 Martin Sebor <msebor@redhat.com>
15109 PR translation/84207
15110 * diagnostic-core.h (warning_n, error_n, inform_n): Change
15111 n argument to unsigned HOST_WIDE_INT.
15112 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15113 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
15114 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15115 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15117 2018-02-27 Richard Biener <rguenther@suse.de>
15119 PR tree-optimization/84512
15120 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15121 Do not use the estimate returned from record_stmt_cost for
15122 the scalar iteration cost but sum properly using add_stmt_cost.
15124 2018-02-27 Richard Biener <rguenther@suse.de>
15126 PR tree-optimization/84466
15127 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15128 Adjust last change to less strictly validate use operands.
15130 2018-02-27 Martin Liska <mliska@suse.cz>
15132 PR gcov-profile/84548
15133 * gcov.c (process_file): Allow partial overlap and consider it
15134 also as group functions.
15135 (output_lines): Properly calculate range of lines for a group.
15137 2018-02-27 Martin Liska <mliska@suse.cz>
15139 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15140 'ggc' suffixes. Change first column width.
15141 (timer::print): Fix formatting of the column.
15143 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
15145 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15146 preserve inline entry blocks for the sake of debug inline
15147 entry point markers alone.
15148 (remove_unused_locals): Suggest in comments a better place to
15149 force the preservation of inline entry blocks that are
15150 otherwise unused, but do not preserve them.
15152 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15154 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15156 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15159 * config/i386/constraints.md (Bs): Replace
15160 ix86_indirect_branch_register with
15161 TARGET_INDIRECT_BRANCH_REGISTER.
15163 * config/i386/i386.md (indirect_jump): Likewise.
15164 (tablejump): Likewise.
15165 (*sibcall_memory): Likewise.
15166 (*sibcall_value_memory): Likewise.
15167 Peepholes of indirect call and jump via memory: Likewise.
15168 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15169 (*sibcall_value_GOT_32): Likewise.
15170 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15171 (GOT_memory_operand): Likewise.
15172 (call_insn_operand): Likewise.
15173 (sibcall_insn_operand): Likewise.
15174 (GOT32_symbol_operand): Likewise.
15175 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15177 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15179 PR rtl-optimization/83496
15180 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15181 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
15182 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15183 redundant insn, if any.
15184 (relax_delay_slots): Likewise.
15185 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15187 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
15189 PR tree-optimization/83965
15190 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15191 that grouped statements are part of a reduction chain. Return
15192 true if the statement is not marked as a reduction itself but
15193 is part of a group.
15194 (vect_recog_dot_prod_pattern): Don't check whether the statement
15195 is part of a group here.
15196 (vect_recog_sad_pattern): Likewise.
15197 (vect_recog_widen_sum_pattern): Likewise.
15199 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15202 * final.c (rest_of_clean_state): Also look for calls inside sequences.
15204 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15207 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15209 (ix86_output_indirect_function_return): New prototype.
15210 (ix86_split_simple_return_pop_internal): Likewise.
15211 * config/i386/i386.c (indirect_return_via_cx): New.
15212 (indirect_return_via_cx_bnd): Likewise.
15213 (indirect_thunk_name): Handle return va CX_REG.
15214 (output_indirect_thunk_function): Create alias for
15215 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15216 (ix86_output_indirect_jmp): Remove the bool argument.
15217 (ix86_output_indirect_function_return): New function.
15218 (ix86_split_simple_return_pop_internal): Likewise.
15219 * config/i386/i386.md (*indirect_jump): Don't pass false
15220 to ix86_output_indirect_jmp.
15221 (*tablejump_1): Likewise.
15222 (simple_return_pop_internal): Change it to define_insn_and_split.
15223 Call ix86_split_simple_return_pop_internal to split it for
15224 -mfunction-return=.
15225 (simple_return_indirect_internal): Call
15226 ix86_output_indirect_function_return instead of
15227 ix86_output_indirect_jmp.
15229 2018-02-26 Jakub Jelinek <jakub@redhat.com>
15232 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15233 memset and value initialization afterwards.
15235 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
15237 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15239 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15242 * common/config/aarch64/aarch64-common.c
15243 (aarch_option_optimization_table[]): Switch
15244 off fomit-frame-pointer
15246 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15247 Chung-Ju Wu <jasonwucj@gmail.com>
15249 * config/nds32/nds32-multiple.md (load_multiple): Disallow
15251 (store_multiple): Ditto.
15253 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15255 * config.gcc: Add --with-cpu support for nds32 target.
15256 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15257 * config/nds32/nds32.opt: Add -mcpu= option.
15259 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
15261 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15262 isel=yes): Warn for these deprecated options.
15264 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
15266 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15267 ISA_2_5_MASKS_EMBEDDED.
15269 2018-02-23 Jakub Jelinek <jakub@redhat.com>
15271 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15272 p->max as pointers rather than using iterative_hash_expr.
15274 2018-02-23 Carl Love <cel@us.ibm.com>
15276 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15277 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15279 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15280 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15281 P8V_BUILTIN_VEC_VUNSIGNED2.
15283 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
15286 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15287 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15289 * lra-constraints.c (curr_insn_transform): Set up
15290 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
15292 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15293 * lra-eliminations.c (spill_pseudos): Ditto.
15294 (process_insn_for_elimination): Ditto.
15295 * lra-lives.c (reg_early_clobber_p): Use the new macros.
15296 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15297 LRA_NON_CLOBBERED_ALT.
15299 2018-02-22 Martin Sebor <msebor@redhat.com>
15301 PR tree-optimization/84480
15302 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15303 to maybe_diag_stxncpy_trunc. Call it.
15304 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15305 from gimple_fold_builtin_strcpy. Print inlining stack.
15306 (handle_builtin_stxncpy): Print inlining stack.
15307 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15309 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
15312 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15313 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15314 and -fcheck-pointer-bounds are used together.
15315 (indirect_thunk_prefix): New enum.
15316 (indirect_thunk_need_prefix): New function.
15317 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
15318 "_nt" instead of "_bnd" for NOTRACK prefix.
15319 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15320 (output_indirect_thunk_function): Likewise.
15322 (ix86_code_end): Update output_indirect_thunk_function calls.
15323 (ix86_output_indirect_branch_via_reg): Replace
15324 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15325 (ix86_output_indirect_branch_via_push): Likewise.
15326 (ix86_output_function_return): Likewise.
15327 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15328 incompatible with -fcf-protection=branch and
15329 -fcheck-pointer-bounds.
15331 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15334 * config/aarch64/aarch64.c (aarch64_print_address_internal):
15335 Change gcc_assert call to output_operand_lossage.
15337 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15339 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15341 2018-02-22 DJ Delorie <dj@redhat.com>
15342 Sebastian Perta <sebastian.perta@renesas.com>
15343 Oleg Endo <olegendo@gcc.gnu.org>
15345 * config/rx/rx.c (rx_rtx_costs): New function.
15346 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15348 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
15350 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15352 2018-02-22 Martin Liska <mliska@suse.cz>
15355 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15356 Add "native" as a possible value.
15358 2018-02-22 Martin Liska <mliska@suse.cz>
15361 * config/i386/i386.c (ix86_option_override_internal):
15362 Add "native" as a possible value for -march and -mtune.
15364 2018-02-22 Jakub Jelinek <jakub@redhat.com>
15367 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15368 to all type variants.
15370 PR tree-optimization/84503
15371 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15372 width as info->bitpos + info->bitsize - start.
15373 (merged_store_group::merge_overlapping): Simplify width computation.
15374 (check_no_overlap): New function.
15375 (imm_store_chain_info::try_coalesce_bswap): Compute expected
15376 start + width and last_order of the group, fail if check_no_overlap
15378 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15379 to group if check_no_overlap fails.
15381 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15383 * config/rs6000/altivec.md: Delete contraint arguments to
15384 define_expand, define_split, and define_peephole2, and in
15385 define_insn_and_split if always unused.
15386 * config/rs6000/darwin.md: Ditto.
15387 * config/rs6000/dfp.md: Ditto.
15388 * config/rs6000/rs6000.md: Ditto.
15389 * config/rs6000/sync.md: Ditto.
15390 * config/rs6000/vector.md: Ditto.
15391 * config/rs6000/vsx.md: Ditto.
15393 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15395 * config/rs6000/altivec.md: Write output control strings as braced
15396 blocks instead of double-quoted strings.
15397 * config/rs6000/darwin.md: Ditto.
15398 * config/rs6000/rs6000.md: Ditto.
15399 * config/rs6000/vector.md: Ditto.
15400 * config/rs6000/vsx.md: Ditto.
15402 2018-02-21 Jason Merrill <jason@redhat.com>
15404 PR c++/84314 - ICE with templates and fastcall attribute.
15405 * attribs.c (build_type_attribute_qual_variant): Remove assert.
15407 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15409 * ipa-cp.c (determine_versionability): Fix comment typos.
15411 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15414 * ipa-cp.c (determine_versionability): Do not version functions caling
15417 2018-02-21 Martin Liska <mliska@suse.cz>
15420 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15421 Add "native" as a possible value.
15422 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15423 the macro when native cpu detection is available.
15425 2018-02-21 Martin Liska <mliska@suse.cz>
15428 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15429 Add "native" as a possible value.
15430 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15431 when native cpu detection is available.
15433 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15434 Martin Sebor <msebor@redhat.com>
15436 PR tree-optimization/84478
15437 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15439 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15440 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15441 support which is conservatively correct, for 2 only stay conservative
15442 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15443 argument to the 2 argument get_range_strlen, adjust 6 arg
15444 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15446 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15447 (gimple_fold_builtin_strlen): Pass true as last argument to
15450 2018-02-20 Martin Sebor <msebor@redhat.com>
15452 PR middle-end/84095
15453 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15454 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15455 (builtin_memref::builtin_memref): Factor out parts into
15456 set_base_and_offset and call it.
15458 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15460 PR middle-end/84406
15461 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15462 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15463 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15464 search at the associated MODE_INT.
15466 2018-02-20 Jeff Law <law@redhat.com>
15468 PR middle-end/82123
15469 PR tree-optimization/81592
15470 PR middle-end/79257
15471 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15472 for range data rather than using global data.
15473 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15474 range data rather than using global data.
15475 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15476 pass it to children as needed.
15477 (struct directive::fmtresult): Similarly.
15478 (struct directive::set_width): Similarly.
15479 (struct directive::set_precision): Similarly.
15480 (format_integer, format_directive, parse_directive): Similarly.
15481 (format_none): Accept unnamed vr_values parameter.
15482 (format_percent, format_floating, format_character): Similarly.
15483 (format_string, format_plain): Similarly.
15484 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15485 the EVRP range analyzer for range data rather than using global data.
15486 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15487 gimple-ssa-evrp-analyze.h
15488 (class sprintf_dom_walker): Add after_dom_children member function.
15489 Add evrp_range_analyzer member.
15490 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15491 range analyzer as needed.
15492 (sprintf_dom_walker::after_dom_children): New member function.
15493 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15495 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15496 (evrp_range_analyzer::pop_to_marker): Likewise.
15498 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15500 PR tree-optimization/84419
15501 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15502 with the required type if its current type is compatible but
15505 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15507 PR middle-end/82004
15508 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15509 after vectorization.
15511 2018-02-20 Martin Liska <mliska@suse.cz>
15514 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15515 possible values if we don't have a hint.
15517 2018-02-20 Martin Liska <mliska@suse.cz>
15521 * final.c (shorten_branches): Build align_tab array with one
15523 * opts.c (finish_options): Add alignment option limit check.
15524 (MAX_CODE_ALIGN): Likewise.
15525 (MAX_CODE_ALIGN_VALUE): Likewise.
15526 * doc/invoke.texi: Document maximum allowed option value for
15527 all -falign-* options.
15529 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15532 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15533 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15534 * var-tracking.c (emit_note_insn_var_location): Remove all references
15535 to NOTE_INSN_CALL_ARG_LOCATION.
15536 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15537 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15538 Use copy_rtx_if_shared.
15539 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15540 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15541 (dwarf2out_var_location): Remove handling of
15542 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15544 * final.c (final_scan_insn): Remove all references to
15545 NOTE_INSN_CALL_ARG_LOCATION.
15546 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15547 before dumping final insns.
15548 * except.c (emit_note_eh_region_end): Remove all references to
15549 NOTE_INSN_CALL_ARG_LOCATION.
15550 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15551 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15552 * config/arc/arc.c (hwloop_optimize): Likewise.
15553 * config/arm/arm.c (create_fix_barrier): Likewise.
15554 * config/s390/s390.c (s390_chunkify_start): Likewise.
15555 * config/sh/sh.c (find_barrier): Likewise.
15556 * config/i386/i386.c (rest_of_insert_endbranch,
15557 ix86_seh_fixup_eh_fallthru): Likewise.
15558 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15559 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15560 * config/frv/frv.c (frv_function_prologue): Likewise.
15561 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15563 (note_outside_basic_block_p): Remove all references to
15564 NOTE_INSN_CALL_ARG_LOCATION.
15565 * gengtype.c (adjust_field_rtx_def): Likewise.
15566 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15568 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15569 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15572 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15575 PR tree-optimization/84452
15576 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15577 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15580 2018-02-19 Martin Liska <mliska@suse.cz>
15583 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15585 2018-02-19 Martin Liska <mliska@suse.cz>
15586 Richard Sandiford <richard.sandiford@linaro.org>
15588 PR tree-optimization/82491
15589 * gimple-fold.c (get_base_constructor): Make earlier bail out
15592 2018-02-19 Carl Love <cel@us.ibm.com>
15594 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15595 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15597 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15598 P8V_BUILTIN_VEC_NEG.
15600 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15602 * config/rl78/rl78.md (movdf): New define expand.
15604 2018-02-19 Martin Liska <mliska@suse.cz>
15607 * doc/invoke.texi: Fix typo.
15608 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15610 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15612 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15613 handle rs6000_single_float and rs6000_double_float specially for
15616 2018-02-16 Jeff Law <law@redhat.com>
15618 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15619 (pop_regs): Use it.
15621 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15624 * ipa-inline.c (inline_small_functions): Fix a typo.
15626 2018-02-16 Nathan Sidwell <nathan@acm.org>
15628 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15630 2018-02-16 Carl Love <cel@us.ibm.com>
15632 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15633 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15634 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15635 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15636 expansion to P8V_BUILTIN_VEC_FLOAT2.
15638 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15640 PR rtl-optimization/70023
15641 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15642 src_regno into account.
15644 2018-02-16 Carl Love <cel@us.ibm.com>
15646 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15647 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15648 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15649 * config/rs6000/rs6000.c: Remove case statements for
15650 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15651 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15652 and P9V_BUILTIN_VEC_VINSERT4B.
15653 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15654 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15655 * config/rs6000/vsx.md:
15656 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15659 2018-02-16 Carl Love <cel@us.ibm.com>
15661 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15663 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15665 * config/rs6000/rs6000-c.c: Add the definitions for
15666 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15667 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15668 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15669 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15670 definition for insert4b and define insn *insert3b_internal.
15671 * doc/extend.texi: Add documentation for vec_extract4b.
15673 2018-02-16 Nathan Sidwell <nathan@acm.org>
15675 * doc/extend.texi (Backwards Compatibility): Mention friend
15676 injection. Note for-scope is deprecated.
15677 * doc/invoke.texi (-ffriend-injection): Deprecate.
15679 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15681 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15682 that moved to I2, also allow destinations that are a paradoxical
15683 subreg (instead of a normal reg).
15685 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15688 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15691 2018-02-16 Richard Biener <rguenther@suse.de>
15693 PR tree-optimization/84037
15694 PR tree-optimization/84016
15696 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15697 Adjust vec_construct for the fact we need additional higher latency
15698 128bit inserts for AVX256 and AVX512 vector builds.
15699 (ix86_add_stmt_cost): Scale vector construction cost for
15702 2018-02-16 Richard Biener <rguenther@suse.de>
15704 PR tree-optimization/84417
15705 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15706 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15707 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15709 2018-02-16 Martin Liska <mliska@suse.cz>
15712 * internal-fn.def (ASAN_CHECK): Set proper flags.
15713 (ASAN_MARK): Likewise.
15715 2018-02-16 Julia Koval <julia.koval@intel.com>
15717 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15718 from PTA_CANNONLAKE.
15720 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15723 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15724 Use ++iter rather than iter++ for std::list iterators.
15725 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15726 defer deleting them until all nodes in the forest are processed. Do
15727 free even leaf nodes. Change to_process into auto_vec.
15730 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15731 * vec.h (vec_default_construct): Use memset instead of placement new
15732 if BROKEN_VALUE_INITIALIZATION is defined.
15733 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15734 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15737 PR rtl-optimization/83723
15738 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15739 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15740 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15742 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15744 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15746 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15748 PR rtl-optimization/81443
15749 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15750 from inner REGs to paradoxical SUBREGs.
15752 2018-02-16 Richard Biener <rguenther@suse.de>
15754 PR tree-optimization/84399
15755 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15756 For operands we can analyze at their definition make sure we can
15757 analyze them at each use as well.
15759 2018-02-16 Richard Biener <rguenther@suse.de>
15761 PR tree-optimization/84190
15762 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15763 volatile accesses if the decl isn't volatile.
15765 2018-02-15 Jason Merrill <jason@redhat.com>
15767 PR c++/84314 - ICE with templates and fastcall attribute.
15768 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15769 TYPE_CANONICAL on an existing type.
15771 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15773 PR tree-optimization/84383
15774 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15775 dstoff nor call operand_equal_p if dstbase is NULL.
15777 PR tree-optimization/84334
15778 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15779 also a CONSTANT_CLASS_P, punt.
15781 2018-02-14 Jim Wilson <jimw@sifive.com>
15783 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15784 first SMALL_OPERAND check. New local min_second_step. Move assert
15785 to where locals are set. Add TARGET_RVC support.
15786 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15788 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15790 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15792 2018-02-14 Martin Sebor <msebor@redhat.com>
15794 PR tree-optimization/83698
15795 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15796 arrays constrain the offset range to their bounds.
15797 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15798 (builtin_access::overlap): Avoid setting the size of overlap if it's
15800 (maybe_diag_overlap): Also consider arrays when deciding what values
15801 of offsets to include in diagnostics.
15803 2018-02-14 Martin Sebor <msebor@redhat.com>
15806 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15807 that correspond to the kind of a declaration.
15809 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15812 * config/pa/pa.md: Load address of PIC label using the linkage table
15813 if the label is nonlocal.
15815 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15817 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15818 warning message if user requests -maltivec=be.
15819 * doc/invoke.texi: Document deprecation of -maltivec=be.
15821 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15824 * config/rs6000/rs6000-c.c: Update definitions for
15825 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15826 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15828 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15831 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15832 add _get_ssp intrinsics. Remove argument from
15833 __builtin_ia32_rdssp[d|q].
15834 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15835 * config/i386/i386-builtin.def: Remove argument from
15836 __builtin_ia32_rdssp[d|q].
15837 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15838 ix86_expand_special_args_builtin for _rdssp[d|q].
15839 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15840 Clear register before usage.
15841 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15842 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15844 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15846 PR tree-optimization/84357
15847 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15848 operand 1 of an ARRAY_REF too.
15850 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15853 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15854 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15856 (set_of_reg): New struct.
15857 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15858 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15859 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15861 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15862 Split into bitclr, bitset, bitinvert patterns if appropriate.
15863 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15864 use rx_fuse_in_memory_bitop.
15865 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15866 to named insn, correct maximum insn length.
15868 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15871 * machmode.def: Define a complex mode for PARTIAL_INT.
15872 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15874 * doc/rtl.texi: Document CSPImode.
15875 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15877 (msp430_hard_regno_nregs_with_padding): Likewise.
15879 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15882 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15884 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15886 PR rtl-optimization/84169
15887 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15888 we generated a parallel as new i3 and we split that to new i2 and i3
15889 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15890 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15891 those to i2, not i1. Partially rewrite this scan code.
15893 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15896 * stor-layout.c (place_field): For variable length fields, adjust
15897 offset_align afterwards not just based on the field's alignment,
15898 but also on the size.
15900 PR middle-end/84309
15901 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15902 of exps and logs in the use_exp2 case.
15904 2018-02-13 Jeff Law <law@redhat.com>
15906 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15907 entry for "vector".
15909 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15912 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15916 * common.opt (gas-loc-support, gas-locview-support): New.
15917 (ginline-points, ginternal-reset-location-views): New.
15918 * doc/invoke.texi: Document them. Use @itemx where intended.
15919 (gvariable-location-views): Adjust.
15920 * target.def (reset_location_view): New.
15921 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15922 (TARGET_RESET_LOCATION_VIEW): New.
15923 * doc/tm.texi: Rebuilt.
15924 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15925 (dwarf2out_default_as_locview_support): New.
15926 (output_asm_line_debug_info): Use option variables.
15927 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15928 (output_loc_list): Likewise.
15929 (add_high_low_attributes): Check option variables.
15930 Don't output entry view attribute in strict mode.
15931 (gen_inlined_subroutine_die): Check option variables.
15932 (dwarf2out_inline_entry): Likewise.
15933 (init_sections_and_labels): Likewise.
15934 (dwarf2out_early_finish): Likewise.
15935 (maybe_reset_location_view): New, from...
15936 (dwarf2out_var_location): ... here. Call it.
15937 * debug.h (dwarf2out_default_as_loc_support): Declare.
15938 (dwarf2out_default_as_locview_support): Declare.
15939 * hooks.c (hook_int_rtx_insn_0): New.
15940 * hooks.h (hook_int_rtx_insn_0): Declare.
15941 * toplev.c (process_options): Take -gas-loc-support and
15942 -gas-locview-support from dwarf2out. Enable
15943 -gvariable-location-views by default only with locview
15944 assembler support. Enable -ginternal-reset-location-views by
15945 default only if the target defines the corresponding hook.
15946 Enable -ginline-points by default if location views are
15947 enabled; force it disabled if statement frontiers are
15949 * tree-inline.c (expand_call_inline): Check option variables.
15950 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15952 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15954 PR tree-optimization/84321
15955 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15956 handling. Also check whether the anti-range contains any values
15957 that satisfy the mask; switch to a VR_RANGE if not.
15959 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15962 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15964 2018-02-13 Martin Jambor <mjambor@suse.cz>
15967 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15968 of call statements, also set location of a load to a temporary.
15970 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15972 * config/rl78/rl78.c (add_vector_labels): New function.
15973 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15974 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15975 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15976 which checks that no arguments are passed.
15977 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15978 * doc/extend.texi: Documentation for the new attribute.
15980 2018-02-13 Andreas Schwab <schwab@suse.de>
15982 * config/riscv/linux.h (CPP_SPEC): Define.
15984 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15987 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15988 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15989 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15990 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15991 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15992 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15993 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15994 temporarily for AES and PCLMUL builtins.
15996 PR tree-optimization/84339
15997 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15998 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16001 PR middle-end/84309
16002 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16003 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16004 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16006 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16008 * omp-simd-clone.h: New file.
16009 * omp-simd-clone.c: Include omp-simd-clone.h.
16010 (expand_simd_clones): No longer static.
16011 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16012 cgraph.h and omp-simd-clone.h.
16013 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16014 (vect_recog_widen_shift_pattern): Formatting fix.
16015 (vect_pattern_recog_1): Don't check optab for calls.
16018 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16019 operands[2] into a REG before using gen_lowpart on it.
16021 2018-02-12 Jeff Law <law@redhat.com>
16024 * config/sh/sh.c (find_barrier): Consider a sibling call
16027 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16028 successfully back substituting a reg.
16030 2018-02-12 Richard Biener <rguenther@suse.de>
16032 PR tree-optimization/84037
16033 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16034 parameter, move visited init to caller.
16035 (vect_slp_analyze_operations): Separate cost from validity
16036 check, initialize visited once for all instances.
16037 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16039 * tree-vect-stmts.c (vect_model_simple_cost): Make early
16041 (vect_model_promotion_demotion_cost): Likewise.
16042 (vectorizable_bswap): Guard cost modeling with !slp_node
16043 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16045 (vectorizable_call): Likewise.
16046 (vectorizable_conversion): Likewise.
16047 (vectorizable_assignment): Likewise.
16048 (vectorizable_shift): Likewise.
16049 (vectorizable_operation): Likewise.
16050 (vectorizable_store): Likewise.
16051 (vectorizable_load): Likewise.
16052 (vectorizable_condition): Likewise.
16053 (vectorizable_comparison): Likewise.
16055 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
16058 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16059 (ASAN_MARK): Fix fnspec to account for return value, change pointer
16060 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16062 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16064 PR middle-end/83665
16065 * params.def (inline-min-speedup): Increase from 8 to 15.
16066 (max-inline-insns-auto): Decrease from 40 to 30.
16067 * ipa-split.c (consider_split): Add some buffer for function to
16068 be considered inlining candidate.
16069 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16072 2018-02-12 Richard Biener <rguenther@suse.de>
16074 PR tree-optimization/84037
16075 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16076 matched stmts if we cannot swap the non-matched ones.
16078 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16080 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16081 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16082 _mm_maskz_scalef_round_ss): New intrinsics.
16083 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16084 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16085 __builtin_ia32_scalefss_round): Remove.
16086 (__builtin_ia32_scalefsd_mask_round,
16087 __builtin_ia32_scalefss_mask_round): New intrinsics.
16088 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16089 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16090 ((match_operand:VF_128 2 "<round_nimm_predicate>"
16091 "<round_constraint>")): Changed to ...
16092 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16093 "<round_scalar_constraint>")): ... this.
16094 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16095 %0, %1, %2<round_op3>}"): Changed to ...
16096 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16097 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16098 %2<round_scalar_mask_op3>}"): ... this.
16099 * config/i386/subst.md (round_scalar_nimm_predicate): New.
16101 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16103 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16104 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16105 (_mm_maskz_sqrt_round_ss): New intrinsics.
16106 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16107 (__builtin_ia32_sqrtsd_mask_round)
16108 (__builtin_ia32_sqrtss_mask_round): New builtins.
16109 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16110 (__builtin_ia32_sqrtss_round): Remove.
16111 (__builtin_ia32_sqrtsd_mask_round)
16112 (__builtin_ia32_sqrtss_mask_round): New builtins.
16113 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16114 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16115 ((match_operand:VF_128 1 "vector_operand"
16116 "xBm,<round_constraint>")): Changed to ...
16117 ((match_operand:VF_128 1 "vector_operand"
16118 "xBm,<round_scalar_constraint>")): ... this.
16119 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16120 %0, %2, %<iptr>1<round_op3>}): Changed to ...
16121 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16122 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16123 %<iptr>1<round_scalar_mask_op3>}): ... this.
16124 ((set_attr "prefix" "<round_prefix>")): Changed to ...
16125 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16127 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
16130 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16131 Cast vec_cmpeq result to correct type.
16132 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16133 Cast vec_cmpgt result to correct type.
16135 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
16137 * final.c (final_scan_insn_1): Renamed from...
16138 (final_scan_insn): ... this. New wrapper, to recover
16139 seen from the outermost call in recursive ones.
16140 * config/sparc/sparc.c (output_return): Drop seen from call.
16141 (output_sibcall): Likewise.
16142 * config/visium/visium.c (output_branch): Likewise.
16144 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
16146 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16149 2018-02-10 Alan Modra <amodra@gmail.com>
16152 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16153 Specify LR as an input.
16155 2018-02-10 Jakub Jelinek <jakub@redhat.com>
16158 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16159 remove_member_access_dummy_vars): New functions.
16160 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16161 lower_omp_1, execute_lower_omp): Use them.
16163 PR rtl-optimization/84308
16164 * shrink-wrap.c (spread_components): Release todo vector.
16166 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
16168 PR rtl-optimization/57193
16169 * ira-color.c (struct allocno_color_data): Add member
16170 conflict_allocno_hard_prefs.
16171 (update_conflict_allocno_hard_prefs): New.
16172 (bucket_allocno_compare_func): Add a preference based on
16173 conflict_allocno_hard_prefs.
16174 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16175 (color_allocnos): Remove a dead code. Initiate
16176 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
16178 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16181 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16182 constraint from =wa to wa. Avoid a subreg on the output operand,
16183 instead use a pseudo and subreg it in a move.
16184 (p9_xxbrd_<mode>): Changed to ...
16185 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16186 (p9_xxbrd_v2df): New expander.
16187 (p9_xxbrw_<mode>): Changed to ...
16188 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16189 (p9_xxbrw_v4sf): New expander.
16191 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16193 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16195 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
16198 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16199 multiply in 32-bit mode.
16200 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16201 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16204 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16206 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16207 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16208 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16209 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16211 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
16214 * dwarf2out.c (is_trivial_indirect_ref): New function.
16215 (dwarf2out_late_global_decl): Do not generate a location
16216 attribute for variables that have a non-trivial DECL_VALUE_EXPR
16217 and that are not defined in the current unit.
16219 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16221 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16222 instead of a libcall for UNORDERED.
16224 2018-02-09 Tamar Christina <tamar.christina@arm.com>
16227 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16228 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16230 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16233 * config/s390/s390.c (s390_set_current_function): Invoke
16234 s390_indirect_branch_settings also if fndecl didn't change.
16236 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16238 * config/rs6000/rs6000.md (blockage): Set length to zero.
16240 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16242 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16244 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16247 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16248 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16252 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16253 PARALLEL incoming that failed vt_get_decl_and_offset check.
16255 PR middle-end/84237
16256 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16257 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16259 (get_variable_section): For decls in named .bss* sections pass true as
16260 second argument to bss_initializer_p.
16262 2018-02-09 Marek Polacek <polacek@redhat.com>
16263 Jakub Jelinek <jakub@redhat.com>
16266 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16267 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
16268 Sync some changes from cxx_fold_indirect_ref.
16270 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16272 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16274 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16275 (BLOCK_INLINE_ENTRY_LABEL): New.
16276 (dwarf2out_var_location): Disregard inline entry markers.
16277 (inline_entry_data): New struct.
16278 (inline_entry_data_hasher): New hashtable type.
16279 (inline_entry_data_hasher::hash): New.
16280 (inline_entry_data_hasher::equal): New.
16281 (inline_entry_data_table): New variable.
16282 (add_high_low_attributes): Add DW_AT_entry_pc and
16283 DW_AT_GNU_entry_view attributes if a pending entry is found
16284 in inline_entry_data_table. Add old entry_pc attribute only
16285 if debug nonbinding markers are disabled.
16286 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16287 markers are enabled.
16288 (block_within_block_p, dwarf2out_inline_entry): New.
16289 (dwarf2out_finish): Check that no entries remained in
16290 inline_entry_data_table.
16291 * final.c (reemit_insn_block_notes): Handle inline entry notes.
16292 (final_scan_insn, notice_source_line): Likewise.
16293 (rest_of_clean_state): Skip inline entry markers.
16294 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16296 * gimple.c (gimple_build_debug_inline_entry): New.
16297 * gimple.h (enum gimple_debug_subcode): Add
16298 GIMPLE_DEBUG_INLINE_ENTRY.
16299 (gimple_build_debug_inline_entry): Declare.
16300 (gimple_debug_inline_entry_p): New.
16301 (gimple_debug_nonbind_marker_p): Adjust.
16302 * insn-notes.def (INLINE_ENTRY): New.
16303 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16304 inline entry marker notes.
16305 (print_insn): Likewise.
16306 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16307 (INSN_DEBUG_MARKER_KIND): Likewise.
16308 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16309 * tree-inline.c (expand_call_inline): Build and insert
16310 debug_inline_entry stmt.
16311 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16312 inline entry blocks early, if nonbind markers are enabled.
16313 (dump_scope_block): Dump fragment info.
16314 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16315 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16316 (gimple_build_debug_inline_entry): New.
16317 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16318 Enable/disable inline entry points too.
16319 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16320 (DEBUG_INSN): Describe inline entry markers.
16322 * common.opt (gvariable-location-views): New.
16323 (gvariable-location-views=incompat5): New.
16324 * config.in: Rebuilt.
16325 * configure: Rebuilt.
16326 * configure.ac: Test assembler for view support.
16327 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16328 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16329 * dwarf2out.c (var_loc_view): New typedef.
16330 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16331 (dwarf2out_locviews_in_attribute): New.
16332 (dwarf2out_locviews_in_loclist): New.
16333 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16334 (enum dw_line_info_opcode): Add LI_adv_address.
16335 (struct dw_line_info_table): Add view.
16336 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16337 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16338 (zero_view_p): New variable.
16339 (ZERO_VIEW_P): New macro.
16340 (output_asm_line_debug_info): New.
16341 (struct var_loc_node): Add view.
16342 (add_AT_view_list, AT_loc_list): New.
16343 (add_var_loc_to_decl): Add view param. Test it against last.
16344 (new_loc_list): Add view params. Record them.
16345 (AT_loc_list_ptr): Handle loc and view lists.
16346 (view_list_to_loc_list_val_node): New.
16347 (print_dw_val): Handle dw_val_class_view_list.
16348 (size_of_die): Likewise.
16349 (value_format): Likewise.
16350 (loc_list_has_views): New.
16351 (gen_llsym): Set vl_symbol too.
16352 (maybe_gen_llsym, skip_loc_list_entry): New.
16353 (dwarf2out_maybe_output_loclist_view_pair): New.
16354 (output_loc_list): Output view list or entries too.
16355 (output_view_list_offset): New.
16356 (output_die): Handle dw_val_class_view_list.
16357 (output_dwarf_version): New.
16358 (output_compilation_unit_header): Use it.
16359 (output_skeleton_debug_sections): Likewise.
16360 (output_rnglists, output_line_info): Likewise.
16361 (output_pubnames, output_aranges): Update version comments.
16362 (output_one_line_info_table): Output view numbers in asm comments.
16363 (dw_loc_list): Determine current endview, pass it to new_loc_list.
16364 Call maybe_gen_llsym.
16365 (loc_list_from_tree_1): Adjust.
16366 (add_AT_location_description): Create view list attribute if
16367 needed, check it's absent otherwise.
16368 (convert_cfa_to_fb_loc_list): Adjust.
16369 (maybe_emit_file): Call output_asm_line_debug_info for test.
16370 (dwarf2out_var_location): Reset views as needed. Precompute
16371 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
16372 attribute. Set view.
16373 (new_line_info_table): Reset next view.
16374 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16375 (dwarf2out_source_line): Likewise. Output view resets and labels to
16376 the assembler, or select appropriate line info opcodes.
16377 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16378 (optimize_string_length): Catch it. Adjust.
16379 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
16380 dw_val_class_view_list, and remove it if no longer needed.
16381 (hash_loc_list): Hash view numbers.
16382 (loc_list_hasher::equal): Compare them.
16383 (optimize_location_lists): Check whether a view list symbol is
16384 needed, and whether the locview attribute is present, and
16385 whether they match. Remove the locview attribute if no longer
16387 (index_location_lists): Call skip_loc_list_entry for test.
16388 (dwarf2out_finish): Call output_asm_line_debug_info for test.
16389 Use output_dwarf_version.
16390 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16391 (struct dw_val_node): Add val_view_list.
16392 * final.c (SEEN_NEXT_VIEW): New.
16393 (set_next_view_needed): New.
16394 (clear_next_view_needed): New.
16395 (maybe_output_next_view): New.
16396 (final_start_function): Rename to...
16397 (final_start_function_1): ... this. Take pointer to FIRST,
16398 add SEEN parameter. Emit param bindings in the initial view.
16399 (final_start_function): Reintroduce SEEN-less interface.
16400 (final): Rename to...
16401 (final_1): ... this. Take SEEN parameter. Output final pending
16402 next view at the end.
16403 (final): Reintroduce seen-less interface.
16404 (final_scan_insn): Output pending next view before switching
16405 sections or ending a block. Mark the next view as needed when
16406 outputting variable locations. Notify debug backend of section
16407 changes, and of location view changes.
16408 (rest_of_handle_final): Adjust.
16409 * toplev.c (process_options): Autodetect value for debug variable
16410 location views option. Warn on incompat5 without -gdwarf-5.
16411 * doc/invoke.texi (gvariable-location-views): New.
16412 (gvariable-location-views=incompat5): New.
16413 (gno-variable-location-views): New.
16415 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16417 PR tree-optimization/84136
16418 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16419 that the result of find_edge is non-NULL.
16421 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16424 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16425 storing integer register in SImode. Fix cost of 256 and 512
16426 byte aligned SSE register store.
16428 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16430 * config/i386/i386.c (ix86_multiplication_cost): Fix
16431 multiplication cost for TARGET_AVX512DQ.
16433 2018-02-08 Marek Polacek <polacek@redhat.com>
16435 PR tree-optimization/84238
16436 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16439 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16441 PR tree-optimization/84265
16442 * tree-vect-stmts.c (vectorizable_store): Don't treat
16443 VMAT_CONTIGUOUS accesses as grouped.
16444 (vectorizable_load): Likewise.
16446 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16448 PR tree-optimization/81635
16449 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16450 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16451 (test_round_for_mask): New functions.
16452 (wide_int_cc_tests): Call test_round_for_mask.
16453 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16454 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16455 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16456 range returned by get_range_info.
16458 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16461 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16462 * symtab.c: Include builtins.h
16463 (symtab_node::output_to_lto_symbol_table_p): Move here
16464 from lto-streamer-out.c:output_symbol_p.
16465 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16466 (output_symbol_p): Move all logic to symtab.c
16467 (produce_symtab): Update.
16469 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16471 * config/s390/s390-opts.h (enum indirect_branch): Define.
16472 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16473 (s390_indirect_branch_via_thunk)
16474 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16475 (enum s390_indirect_branch_type): Define.
16476 * config/s390/s390.c (struct s390_frame_layout, struct
16477 machine_function): Remove.
16478 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16479 (indirect_branch_table_label_no, indirect_branch_table_name):
16481 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16482 (enum s390_indirect_branch_option): Define.
16483 (s390_return_addr_from_memory): New function.
16484 (s390_handle_string_attribute): New function.
16485 (s390_attribute_table): Add new attribute handler.
16486 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16487 (s390_indirect_branch_via_thunk): New function.
16488 (s390_indirect_branch_via_inline_thunk): New function.
16489 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16490 sibling call optimization for non z10 compiles.
16491 (s390_emit_call): Force indirect branch target to be a single
16492 register. Add r1 clobber for non-z10 compiles.
16493 (s390_emit_epilogue): Emit return jump via return_use expander.
16494 (s390_reorg): Handle JUMP_INSNs as execute targets.
16495 (s390_option_override_internal): Perform validity checks for the
16496 new command line options.
16497 (s390_indirect_branch_attrvalue): New function.
16498 (s390_indirect_branch_settings): New function.
16499 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16500 (s390_output_indirect_thunk_function): New function.
16501 (s390_code_end): Implement target hook.
16502 (s390_case_values_threshold): Implement target hook.
16503 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16505 * config/s390/s390.h (struct s390_frame_layout)
16506 (struct machine_function): Move here from s390.c.
16507 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16508 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16509 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16510 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16511 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16512 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16513 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16514 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16515 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16516 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16517 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16518 (mnemonic attribute): Add values which aren't recognized
16520 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16521 pattern for branch conversion. Fix mnemonic attribute.
16522 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16523 indirect branch via thunk if requested.
16524 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16525 ("*indirect_jump"): Disable for branch conversion using out of
16527 ("indirect_jump_via_thunk<mode>_z10")
16528 ("indirect_jump_via_thunk<mode>")
16529 ("indirect_jump_via_inlinethunk<mode>_z10")
16530 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16531 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16532 ("casesi_jump_via_inlinethunk<mode>_z10")
16533 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16534 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16535 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16536 ("*indirect2_jump"): Disable for branch conversion.
16537 ("casesi_jump"): Turn into expander and expand patterns for branch
16539 ("return_use"): New expander.
16540 ("*return"): Emit return via thunk and rename it to ...
16541 ("*return<mode>"): ... this one.
16542 * config/s390/s390.opt: Add new options and and enum for the
16545 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16547 * lra-constraints.c (match_reload): Unconditionally use
16548 gen_lowpart_SUBREG, rather than selecting between that
16549 and equivalent gen_rtx_SUBREG code.
16551 2018-02-08 Richard Biener <rguenther@suse.de>
16553 PR tree-optimization/84233
16554 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16555 changed flag instead of boguously re-using phi_inserted.
16557 2018-02-08 Martin Jambor <mjambor@suse.cz>
16559 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16560 static local variables.
16562 2018-02-08 Richard Biener <rguenther@suse.de>
16564 PR tree-optimization/84278
16565 * tree-vect-stmts.c (vectorizable_store): When looking for
16566 smaller vector types to perform grouped strided loads/stores
16567 make sure the mode is supported by the target.
16568 (vectorizable_load): Likewise.
16570 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16572 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16573 Increase LDP/STP opportunities by adding adjacent callee-saves.
16575 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16577 PR rtl-optimization/84068
16578 PR rtl-optimization/83459
16579 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16581 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16583 PR tree-optimization/84224
16584 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16585 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16586 non-zero arguments.
16588 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16591 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16592 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16593 count, remove one USE.
16595 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16597 * doc/install.texi (Configuration): Document the
16598 --with-long-double-format={ibm,ieee} PowerPC configuration
16602 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16603 Convert from define_expand to be define_insn_and_split. Rework
16604 float/double/_Float128 conversions to QI/HI/SImode to work with
16605 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16606 conversions to QI/HImode types did a store and then a load to
16607 truncate the value. For conversions to VSX registers, don't split
16608 the insn, instead emit the code directly. Use the code iterator
16609 any_fix to combine signed and unsigned conversions.
16610 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16611 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16612 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16613 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16614 (fix_<mode>di2_hw): Likewise.
16615 (fixuns_<mode>di2_hw): Likewise.
16616 (fix_<mode>si2_hw): Likewise.
16617 (fixuns_<mode>si2_hw): Likewise.
16618 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16619 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16620 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16621 fix<uns>_trunc<SFDF:mode>si2_p8.
16622 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16623 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16624 (fix<uns>_<mode>_mem): Likewise.
16625 (fctiw<u>z_<mode>_mem): Likewise.
16626 (fix<uns>_<mode>_mem): Likewise.
16627 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16628 the register allocator from doing a direct move to the GPRs to do
16629 a store, and instead use the ISA 3.0 store byte/half-word from
16630 vector register instruction. For IEEE 128-bit floating point,
16631 also optimize stores of 32-bit ints.
16632 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16634 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16636 * genextract.c (push_pathstr_operand): New function to support
16638 (walk_rtx): Call push_pathstr_operand.
16639 (print_path): Support [a-zA-Z].
16641 2018-02-07 Richard Biener <rguenther@suse.de>
16643 PR tree-optimization/84037
16644 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16645 (cse_and_gimplify_to_preheader): Declare.
16646 (vect_get_place_in_interleaving_chain): Likewise.
16647 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16649 (_loop_vec_info::~_loop_vec_info): Delete it.
16650 (cse_and_gimplify_to_preheader): New function.
16651 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16652 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16653 (vectorizable_load): Likewise. For grouped stores always base
16654 the IV on the first element.
16655 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16656 condition before gimplifying.
16658 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16660 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16661 *DIV_EXPR and *MOD_EXPR.
16663 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16666 * config/i386/i386.c (ix86_option_override_internal): Mask out
16667 the CF_SET bit when checking -fcf-protection.
16669 2018-02-07 Tom de Vries <tom@codesourcery.com>
16672 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16675 2018-02-07 Richard Biener <rguenther@suse.de>
16677 PR tree-optimization/84204
16678 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16681 PR tree-optimization/84205
16682 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16683 special-case isl_ast_op_zdiv_r.
16685 PR tree-optimization/84223
16686 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16687 Only add conditions from within the region.
16688 (gather_bbs::after_dom_children): Adjust.
16690 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16693 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16694 * config/avr/avr.md: Only post-reload split REG-REG moves if
16695 either register is GENERAL_REG_P.
16697 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16699 PR tree-optimization/84235
16700 * tree-ssa-scopedtables.c
16701 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16702 if the subtraction is performed in floating point type where NaNs are
16703 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16704 build 1. Formatting fix.
16706 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16709 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16710 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16711 and skip it regardless of bb boundaries. Use CALL_P macro,
16712 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16713 unnecessarily, formatting fix.
16715 2018-02-06 Michael Collison <michael.collison@arm.com>
16717 * config/arm/thumb2.md:
16718 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16719 (*thumb_mov_notscc): Ditto.
16721 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16724 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16725 unsigned_fix, not "s".
16727 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16729 * configure.ac (gcc_fn_eh_frame_ro): New function.
16730 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16731 correct .eh_frame permissions.
16732 * configure: Regenerate.
16734 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16736 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16737 irrelevant options.
16739 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16741 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16742 Display warning message for -mno-speculate-indirect-jumps.
16744 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16746 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16748 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16750 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16752 PR tree-optimization/84225
16753 * tree-eh.c (find_trapping_overflow): Only call
16754 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16756 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16759 * config/i386/i386.c: Reimplement the check of possible options
16760 -mibt/-mshstk conbination. Change error messages.
16761 * doc/invoke.texi: Fix a typo: remove extra '='.
16763 2018-02-06 Marek Polacek <polacek@redhat.com>
16765 PR tree-optimization/84228
16766 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16768 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16771 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16772 emitted arch directives.
16773 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16774 __ARM_FEATURE_COPROC before changing architectures.
16776 2018-02-06 Richard Biener <rguenther@suse.de>
16778 * config/i386/i386.c (print_reg): Fix typo.
16779 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16781 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16783 * configure: Regenerate.
16785 2018-02-05 Martin Sebor <msebor@redhat.com>
16787 PR tree-optimization/83369
16788 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16791 2018-02-05 Martin Liska <mliska@suse.cz>
16793 * doc/invoke.texi: Cherry-pick upstream r323995.
16795 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16797 * ira.c (ira_init_register_move_cost): Adjust comment.
16799 2018-02-05 Martin Liska <mliska@suse.cz>
16801 PR gcov-profile/84137
16802 * doc/gcov.texi: Fix typo in documentation.
16804 2018-02-05 Martin Liska <mliska@suse.cz>
16806 PR gcov-profile/83879
16807 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16808 using dlopen functionality.
16810 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16812 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16813 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16814 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16815 _mm_maskz_range_round_ss): New intrinsics.
16816 (__builtin_ia32_rangesd128_round)
16817 (__builtin_ia32_rangess128_round): Remove.
16818 (__builtin_ia32_rangesd128_mask_round,
16819 __builtin_ia32_rangess128_mask_round): New builtins.
16820 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16821 __builtin_ia32_rangess128_round): Remove.
16822 (__builtin_ia32_rangesd128_mask_round,
16823 __builtin_ia32_rangess128_mask_round): New builtins.
16824 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16825 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16826 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16827 "<round_saeonly_constraint>")): Changed to ...
16828 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16829 "<round_saeonly_scalar_constraint>")): ... this.
16830 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16831 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16832 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16833 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16834 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16836 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16838 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16840 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16841 Remove all values except native, 8540 and 8548.
16843 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16845 * config/i386/i386.c (ix86_output_function_return): Pass
16846 INVALID_REGNUM, instead of -1, as invalid register number to
16847 indirect_thunk_name and output_indirect_thunk.
16849 2018-02-02 Julia Koval <julia.koval@intel.com>
16851 * config.gcc: Add -march=icelake.
16852 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16853 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16854 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16855 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16856 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16857 (processor_target_table): Add icelake.
16858 (ix86_option_override_internal): Handle new PTAs.
16859 (get_builtin_code_for_version): Handle icelake.
16860 (M_INTEL_COREI7_ICELAKE): New.
16861 (fold_builtin_cpu): Handle icelake.
16862 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16863 * doc/invoke.texi: Add -march=icelake.
16865 2018-02-02 Julia Koval <julia.koval@intel.com>
16867 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16868 to wide_int_bitmask.
16869 * wide-int-bitmask.h: New.
16871 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16874 * config/i386/i386.md: Replace Pmode with word_mode in
16875 builtin_setjmp_setup and builtin_longjmp to support x32.
16877 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16881 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16883 (rs6000_supported_cpu_names): New static variable.
16884 (linux_cpu_translation_table): Likewise.
16885 (elf_platform) <cpu>: Define new static variable and use it.
16886 Translate kernel AT_PLATFORM name to canonical name if needed.
16887 Error if platform name is unknown.
16889 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16892 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16894 2018-02-01 Jeff Law <law@redhat.com>
16897 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16898 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16899 the scratch if RELEASE_VIA_POP is false.
16900 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16901 If we have to save a temporary register, decrement SIZE appropriately.
16902 Pass new arguments to release_scratch_register_on_entry.
16903 (ix86_adjust_stack_and_probe): Likewise.
16904 (ix86_emit_probe_stack_range): Pass new arguments to
16905 release_scratch_register_on_entry.
16907 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16909 PR rtl-optimization/84157
16910 * combine.c (change_zero_ext): Use REG_P predicate in
16911 front of HARD_REGISTER_P predicate.
16913 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16915 * config/avr/avr.c (avr_option_override): Move disabling of
16916 -fdelete-null-pointer-checks to...
16917 * common/config/avr/avr-common.c (avr_option_optimization_table):
16920 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16922 PR tree-optimization/81635
16923 * tree-data-ref.c (split_constant_offset_1): For types that
16924 wrap on overflow, try to use range info to prove that wrapping
16927 2018-02-01 Renlin Li <renlin.li@arm.com>
16930 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16931 TAILCALL_ADDR_REGS.
16932 (aarch64_register_move_cost): Likewise.
16933 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16934 TAILCALL_ADDR_REGS.
16935 (REG_CLASS_NAMES): Likewise.
16936 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16937 TAILCALL_ADDR_REGS. Remove IP registers.
16938 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16940 2018-02-01 Richard Biener <rguenther@suse.de>
16942 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16943 for specifying RPO order and allow NULL for that.
16944 * domwalk.c (dom_walker::dom_walker): Likewise.
16945 (dom_walker::walk): Handle NULL RPO order.
16946 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16948 (rewrite_update_dom_walker): Likewise.
16949 (mark_def_dom_walker): Likewise.
16951 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16953 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16954 (aarch64_maybe_expand_sve_subreg_move): Declare.
16955 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16956 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16958 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16959 that are semantically a reverse operation.
16960 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16961 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16962 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16964 (aarch64_can_change_mode_class): For big-endian, forbid changes
16965 between two SVE modes if they have different element sizes.
16967 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16969 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16970 the TImode handling for big-endian targets.
16972 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16974 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16975 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16977 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16978 Remove BSWAP handing for big-endian targets and use the form of
16979 LD1RQ appropariate for the mode.
16981 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16983 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16984 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16985 duplicated element.
16987 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16990 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16991 check for operands that need to go through aarch64_sve_reload_be.
16993 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16995 PR tree-optimization/81661
16996 PR tree-optimization/84117
16997 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16998 * tree-eh.c: Include gimplify.h.
16999 (find_trapping_overflow, replace_trapping_overflow,
17000 rewrite_to_non_trapping_overflow): New functions.
17001 * tree-vect-loop.c: Include tree-eh.h.
17002 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17003 * tree-data-ref.c: Include tree-eh.h.
17004 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17006 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
17008 PR rtl-optimization/84123
17009 * combine.c (change_zero_ext): Check if hard register satisfies
17010 can_change_dest_mode before calling gen_lowpart_SUBREG.
17012 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
17015 * ira.c (ira_init_register_move_cost): Remove assert.
17017 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17019 PR rtl-optimization/84071
17020 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17021 * doc/tm.texi: Regenerate.
17023 2018-01-31 Richard Biener <rguenther@suse.de>
17025 PR tree-optimization/84132
17026 * tree-data-ref.c (analyze_miv_subscript): Properly
17027 check whether evolution_function_is_affine_multivariate_p
17028 before calling gcd_of_steps_may_divide_p.
17030 2018-01-31 Julia Koval <julia.koval@intel.com>
17033 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17034 * config/i386/i386.md (rdpid_rex64) New.
17035 (rdpid): Make 32bit only.
17037 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
17040 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17041 an IDENTIFIER_NODE for FUNCTION_TYPE's.
17043 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17046 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17048 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17050 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17052 PR rtl-optimization/84071
17053 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17054 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17056 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17058 * config/arc/arc.c (arc_handle_aux_attribute): New function.
17059 (arc_attribute_table): Add 'aux' attribute.
17060 (arc_in_small_data_p): Consider aux like variables.
17061 (arc_is_aux_reg_p): New function.
17062 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17063 (arc_get_aux_arg): New function.
17064 (prepare_move_operands): Handle aux-register access.
17065 (arc_handle_aux_attribute): New function.
17066 * doc/extend.texi (ARC Variable attributes): Add subsection.
17068 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17070 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17071 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17072 (arc_attribute_table): Add 'uncached' attribute.
17073 (arc_print_operand): Print '.di' flag for uncached memory
17075 (arc_in_small_data_p): Do not consider for small data the uncached
17077 (arc_is_uncached_mem_p): New function.
17078 * config/arc/predicates.md (compact_store_memory_operand): Check
17079 for uncached memory accesses.
17080 (nonvol_nonimm_operand): Likewise.
17081 * doc/extend.texi (ARC Type Attribute): New subsection.
17083 2018-01-31 Jakub Jelinek <jakub@redhat.com>
17086 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17087 falign-loops=): Add Optimization flag.
17089 2018-01-30 Jeff Law <law@redhat.com>
17092 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17093 INT_REGISTERS_SAVED. Check it prior to calling
17094 get_scratch_register_on_entry.
17095 (ix86_adjust_stack_and_probe): Similarly.
17096 (ix86_emit_probe_stack_range): Similarly.
17097 (ix86_expand_prologue): Corresponding changes.
17099 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17102 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17103 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17105 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
17108 * lra-constraints.c (curr_insn_transform): Process AND in the
17111 2018-01-30 Jakub Jelinek <jakub@redhat.com>
17113 PR rtl-optimization/83986
17114 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17115 dependence against last_pending_memory_flush in addition to
17116 pending_jump_insns.
17118 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
17120 PR tree-optimization/81611
17121 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17124 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17127 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17130 2018-01-30 Richard Biener <rguenther@suse.de>
17131 Jakub Jelinek <jakub@redhat.com>
17133 PR tree-optimization/84111
17134 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17135 inner loops added during recursion, as they don't have up-to-date
17138 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17141 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17142 (can_inline_edge_by_limits_p): ... here.
17143 (can_early_inline_edge_p, check_callers,
17144 update_caller_keys, update_callee_keys, recursive_inlining,
17145 add_new_edges_to_heap, speculation_useful_p,
17146 inline_small_functions,
17147 inline_small_functions, flatten_function,
17148 inline_to_all_callers_1): Update.
17150 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17152 * profile-count.c (profile_count::combine_with_ipa_count): Handle
17155 2018-01-30 Richard Biener <rguenther@suse.de>
17157 PR tree-optimization/83008
17158 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17159 invariant and constant vector uses in stmts when they need
17160 more than one stmt.
17162 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17165 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17166 * configure: Regenerate.
17168 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17170 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17172 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17173 Use gen_rtx_REG rather than gen_lowpart.
17175 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17177 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17178 rather than 0 when creating partial subregs.
17180 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17182 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17185 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
17188 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17189 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17190 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17191 flags. This restores the settings used before the 2017-07-24.
17192 Turning off pre increment/decrement/modify allows IVOPTS to
17193 optimize DF/SF loops where the index is an int.
17195 2018-01-29 Richard Biener <rguenther@suse.de>
17196 Kelvin Nilsen <kelvin@gcc.gnu.org>
17199 * tree-vect-stmts.c (vectorizable_call): Don't call
17200 targetm.vectorize_builtin_md_vectorized_function if callee is
17203 2018-01-22 Carl Love <cel@us.ibm.com>
17205 * doc/extend.tex: Fix typo in second arg in
17206 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17208 2018-01-29 Richard Biener <rguenther@suse.de>
17210 PR tree-optimization/84086
17211 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17212 (flush_ssaname_freelist): When SSA names were released reset
17213 the SCEV hash table.
17215 2018-01-29 Richard Biener <rguenther@suse.de>
17217 PR tree-optimization/84057
17218 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17219 removed paths when removing edges.
17221 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
17223 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17224 -mfunction-return=@var{choice}.
17226 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
17228 PR diagnostic/84034
17229 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17230 Handle CR like TAB.
17231 (layout::print_source_line): Likewise.
17232 (test_get_line_width_without_trailing_whitespace): Add test cases.
17234 2018-01-27 Jakub Jelinek <jakub@redhat.com>
17236 PR middle-end/84040
17237 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17240 2018-01-26 Jim Wilson <jimw@sifive.com>
17242 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17244 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17247 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17249 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17250 and CMP + SUB-immediate -> SUBS.
17252 2018-01-26 Martin Sebor <msebor@redhat.com>
17254 PR tree-optimization/83896
17255 * tree-ssa-strlen.c (get_string_len): Rename...
17256 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
17257 Avoid assuming length is constant.
17258 (handle_char_store): Use HOST_WIDE_INT for string length.
17260 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
17263 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17264 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17266 2018-01-26 Richard Biener <rguenther@suse.de>
17268 PR rtl-optimization/84003
17269 * dse.c (record_store): Only record redundant stores when
17270 the earlier store aliases at least all accesses the later one does.
17272 2018-01-26 Jakub Jelinek <jakub@redhat.com>
17274 PR rtl-optimization/83985
17275 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17276 REG_CFA_RESTORE insns.
17277 (delete_unmarked_insns): Don't ignore separate shrink wrapping
17278 REG_CFA_RESTORE insns here.
17281 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17282 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17284 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17286 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17287 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17288 (arc_init): Likewise.
17289 (arc_override_options): Likewise.
17290 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17292 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17294 * config/arc/arc.h (TARGET_DBNZ): Define.
17295 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17296 properly set the tune attribute.
17297 (dbnz): Use TARGET_DBNZ guard.
17298 * config/arc/arc.opt (mtune): Add core3 option.
17300 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17302 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17303 recognize new pic like addresses.
17304 (arc_delegitimize_address): Clean up.
17306 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17308 * config/arc/arc-arches.def: Option mrf16 valid for all
17310 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17311 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17312 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17313 * config/arc/arc-tables.opt: Regenerate.
17314 * config/arc/arc.c (arc_conditional_register_usage): Handle
17315 reduced register file case.
17316 (arc_file_start): Set must have build attributes.
17317 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17318 mrf16 option value.
17319 * config/arc/arc.opt (mrf16): Add new option.
17320 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17321 * config/arc/genmultilib.awk: Handle new mrf16 option.
17322 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17323 * config/arc/t-multilib: Regenerate.
17324 * doc/invoke.texi (ARC Options): Document mrf16 option.
17326 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17328 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17329 * config/arc/arc.c (arc_handle_secure_attribute): New function.
17330 (arc_attribute_table): Add 'secure_call' attribute.
17331 (arc_print_operand): Print secure call operand.
17332 (arc_function_ok_for_sibcall): Don't optimize tail calls when
17334 (arc_is_secure_call_p): New function. * config/arc/arc.md
17335 (call_i): Add support for sjli instruction.
17336 (call_value_i): Likewise.
17337 * config/arc/constraints.md (Csc): New constraint.
17339 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17340 John Eric Martin <John.Martin@emmicro-us.com>
17342 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17343 * config/arc/arc.c (_arc_jli_section): New struct.
17344 (arc_jli_section): New type.
17345 (rc_jli_sections): New static variable.
17346 (arc_handle_jli_attribute): New function.
17347 (arc_attribute_table): Add jli_always and jli_fixed attribute.
17348 (arc_file_end): New function.
17349 (TARGET_ASM_FILE_END): Define.
17350 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17351 (arc_add_jli_section): New function.
17352 (jli_call_scan): Likewise.
17353 (arc_reorg): Call jli_call_scan.
17354 (arc_output_addsi): Remove 'S' from printing asm operand.
17355 (arc_is_jli_call_p): New function.
17356 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17358 (movhi_insn): Likewise.
17359 (movsi_insn): Likewise.
17360 (movsi_set_cc_insn): Likewise.
17361 (loadqi_update): Likewise.
17362 (load_zeroextendqisi_update): Likewise.
17363 (load_signextendqisi_update): Likewise.
17364 (loadhi_update): Likewise.
17365 (load_zeroextendhisi_update): Likewise.
17366 (load_signextendhisi_update): Likewise.
17367 (loadsi_update): Likewise.
17368 (loadsf_update): Likewise.
17369 (movsicc_insn): Likewise.
17370 (bset_insn): Likewise.
17371 (bxor_insn): Likewise.
17372 (bclr_insn): Likewise.
17373 (bmsk_insn): Likewise.
17374 (bicsi3_insn): Likewise.
17375 (cmpsi_cc_c_insn): Likewise.
17376 (movsi_ne): Likewise.
17377 (movsi_cond_exec): Likewise.
17378 (clrsbsi2): Likewise.
17379 (norm_f): Likewise.
17389 (call_i): Remove 'S' asm letter, add jli instruction.
17390 (call_value_i): Likewise.
17391 * config/arc/arc.op (mjli-always): New option.
17392 * config/arc/constraints.md (Cji): New constraint.
17393 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17395 (subsf3_fpx): Likewise.
17396 (mulsf3_fpx): Likewise.
17397 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17399 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17400 function attrbutes.
17401 * doc/invoke.texi (ARC): Document mjli-always option.
17403 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
17405 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17406 avoid addition with 0 and use incw and decw where possible.
17408 2018-01-26 Richard Biener <rguenther@suse.de>
17410 PR tree-optimization/81082
17411 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17412 association if it requires casting to unsigned.
17413 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17414 from fold_plusminus_mult_expr to catch important cases late when
17415 range info is available.
17417 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17419 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17420 * configure.ac (hidden_linkonce): New test.
17421 * configure: Regenerate.
17422 * config.in: Regenerate.
17424 2018-01-26 Julia Koval <julia.koval@intel.com>
17426 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17427 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17428 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17429 _mm_mask_bitshuffle_epi64_mask): Fix type.
17430 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17431 USI_FTYPE_V4DI_V4DI_USI): Remove.
17432 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17433 __builtin_ia32_vpshufbitqmb256_mask,
17434 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17435 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17436 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17438 2018-01-26 Alan Modra <amodra@gmail.com>
17441 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17442 UNSPEC_VBPERMQ. Sort other unspecs.
17444 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17446 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17448 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17450 PR middle-end/83055
17451 * predict.c (drop_profile): Do not push/pop cfun; update also
17453 (handle_missing_profiles): Fix logic looking for zero profiles.
17455 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17457 PR middle-end/83977
17458 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17459 on functions with #pragma omp declare simd or functions with simd
17461 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17462 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17463 Remove trailing \n from warning_at calls.
17465 2018-01-25 Tom de Vries <tom@codesourcery.com>
17468 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17469 for neutered workers.
17471 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17474 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17475 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17477 2018-01-24 Jeff Law <law@redhat.com>
17480 * i386.c (get_probe_interval): Move to earlier point.
17481 (ix86_compute_frame_layout): If -fstack-clash-protection and
17482 the frame is larger than the probe interval, then use pushes
17483 to save registers rather than reg->mem moves.
17484 (ix86_expand_prologue): Remove conditional for int_registers_saved
17487 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17490 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17491 min/max for never referenced object.
17493 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17495 PR middle-end/83977
17496 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17498 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17499 attributes from DECL_ATTRIBUTES (decl) without affecting
17500 DECL_ATTRIBUTES (current_function_decl).
17501 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17502 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17504 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17506 PR tree-optimization/83979
17507 * fold-const.c (fold_comparison): Use constant_boolean_node
17508 instead of boolean_{true,false}_node.
17510 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17512 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17515 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17517 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17518 Simplify the clause that sets the length attribute.
17519 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17520 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17521 clause that sets the length attribute.
17522 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17524 2018-01-24 Tom de Vries <tom@codesourcery.com>
17527 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17528 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17529 Add strict parameter.
17530 (prevent_branch_around_nothing): Insert dummy insn between branch to
17531 label and label with no ptx insn inbetween.
17532 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17534 2018-01-24 Tom de Vries <tom@codesourcery.com>
17537 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17538 for neutered threads in warp.
17539 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17541 2018-01-24 Richard Biener <rguenther@suse.de>
17543 PR tree-optimization/83176
17544 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17547 2018-01-24 Richard Biener <rguenther@suse.de>
17549 PR tree-optimization/82819
17550 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17551 code generating pluses that are no-ops in the target precision.
17553 2018-01-24 Richard Biener <rguenther@suse.de>
17555 PR middle-end/84000
17556 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17558 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17560 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17561 to merge probabilities.
17562 * predict.c (probably_never_executed): Also mark as cold functions
17563 with global 0 profile and guessed local profile.
17564 * profile-count.c (profile_probability::combine_with_count): New
17566 * profile-count.h (profile_probability::operator*,
17567 profile_probability::operator*=, profile_probability::operator/,
17568 profile_probability::operator/=): Reduce precision to adjusted
17569 and set value to guessed on contradictory divisions.
17570 (profile_probability::combine_with_freq): Remove.
17571 (profile_probability::combine_wiht_count): Declare.
17572 (profile_count::force_nonzero):: Set to adjusted.
17573 (profile_count::probability_in):: Set quality to adjusted.
17574 * tree-ssa-tail-merge.c (replace_block_by): Use
17575 combine_with_count.
17577 2018-01-23 Andrew Waterman <andrew@sifive.com>
17578 Jim Wilson <jimw@sifive.com>
17580 * config/riscv/riscv.c (riscv_stack_boundary): New.
17581 (riscv_option_override): Set riscv_stack_boundary. Handle
17582 riscv_preferred_stack_boundary_arg.
17583 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17584 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17585 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17586 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17587 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17588 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17590 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17593 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17594 of struct ix86_frame.
17595 (ix86_expand_epilogue): Likewise. Add a local variable for
17596 the reg_save_offset field in struct ix86_frame.
17598 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17600 PR tree-optimization/82604
17601 * tree-loop-distribution.c (enum partition_kind): New enum item
17602 PKIND_PARTIAL_MEMSET.
17603 (partition_builtin_p): Support above new enum item.
17604 (generate_code_for_partition): Ditto.
17605 (compute_access_range): Differentiate cases that equality can be
17606 proven at all loops, the innermost loops or no loops.
17607 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17608 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17609 (finalize_partitions, distribute_loop): Don't fuse partition of
17610 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17611 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17612 parloop is enabled.
17614 2018-01-23 Martin Liska <mliska@suse.cz>
17616 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17617 order to ignore the predictor.
17618 (PRED_POLYMORPHIC_CALL): Likewise.
17619 (PRED_RECURSIVE_CALL): Likewise.
17621 2018-01-23 Martin Liska <mliska@suse.cz>
17623 * tree-profile.c (tree_profiling): Print function header to
17624 aware reader which function we are working on.
17625 * value-prof.c (gimple_find_values_to_profile): Do not print
17626 not interesting value histograms.
17628 2018-01-23 Martin Liska <mliska@suse.cz>
17630 * profile-count.h (enum profile_quality): Add
17631 profile_uninitialized as the first value. Do not number values
17632 as they are zero based.
17633 (profile_count::verify): Update sanity check.
17634 (profile_probability::verify): Likewise.
17636 2018-01-23 Nathan Sidwell <nathan@acm.org>
17638 * doc/invoke.texi (ffor-scope): Deprecate.
17640 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17642 PR tree-optimization/83510
17643 * domwalk.c (set_all_edges_as_executable): New function.
17644 (dom_walker::dom_walker): Convert bool param
17645 "skip_unreachable_blocks" to enum reachability. Move setup of
17646 edge flags to set_all_edges_as_executable and only do it when
17647 reachability is REACHABLE_BLOCKS.
17648 * domwalk.h (enum dom_walker::reachability): New enum.
17649 (dom_walker::dom_walker): Convert bool param
17650 "skip_unreachable_blocks" to enum reachability.
17651 (set_all_edges_as_executable): New decl.
17652 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17653 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17655 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17656 but converting true to REACHABLE_BLOCKS.
17657 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17659 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17660 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17661 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17663 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17664 if check_all_array_refs will be called.
17666 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17668 * tree.c (selftest::test_location_wrappers): Add more test
17671 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17673 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17674 (selftest::test_bit_in_range): Likewise.
17676 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17679 * doc/sourcebuild.texi (vect_float): Say that the selector
17680 only describes the situation when -funsafe-math-optimizations is on.
17681 (vect_float_strict): Document.
17683 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17685 PR tree-optimization/83965
17686 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17687 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17688 instead of checking only for a reduction.
17689 (vect_recog_widen_sum_pattern): Likewise.
17691 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17693 * predict.c (probably_never_executed): Only use precise profile info.
17694 (compute_function_frequency): Skip after inlining hack since we now
17695 have quality checking.
17697 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17699 * profile-count.h (profile_probability::very_unlikely,
17700 profile_probability::unlikely, profile_probability::even): Set
17701 precision to guessed.
17703 2018-01-23 Richard Biener <rguenther@suse.de>
17705 PR tree-optimization/83963
17706 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17707 Properly terminate dominator walk when crossing the exit edge not
17708 when visiting its source block.
17710 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17713 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17714 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17716 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17718 PR tree-optimization/83957
17719 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17720 semicolon after for body surrounded by braces.
17722 PR tree-optimization/83081
17723 * profile-count.h (profile_probability::split): New method.
17724 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17725 Use profile_probability::split.
17726 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17727 when splitting a single conditional jump into 2.
17729 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17731 PR tree-optimization/69452
17732 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17735 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17737 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17738 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17739 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17741 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17743 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17745 * config/rl78/rl78.md (movdi): New define_expand.
17746 * config/rl78/rl78.c (rl78_split_movdi): New function.
17748 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17751 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17753 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17754 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17755 128-bit to produce an UNSPEC move to get the double word with the
17756 signbit and then a shift directly to do signbit.
17757 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17758 implementation with a new version that just does either a direct
17759 move or a regular move. Move memory interface to separate insns.
17760 Move insns so they are next to the expander.
17761 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17762 with signbit move. Split big and little endian case.
17763 (signbit<mode>2_dm_mem_le): Likewise.
17764 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17765 (signbit<mode>2_dm2): Likewise.
17767 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17769 * config/rl78/rl78.md (anddi3): New define_expand.
17771 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17773 * config/rl78/rl78.md (umindi3): New define_expand.
17775 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17777 * config/rl78/rl78.md (smindi3): New define_expand.
17779 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17781 * config/rl78/rl78.md (smaxdi3): New define_expand.
17783 2018-01-22 Carl Love <cel@us.ibm.com>
17785 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17786 LVX_V1TI): Add macro expansion.
17787 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17788 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17789 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17790 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17791 Change check to determine if the instruction is a byte reversing
17792 entry. Fix typo in comment.
17793 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17794 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17795 Add def_builtin calls for new builtins.
17796 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17797 Add define_insn expansion.
17799 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17801 * config/rl78/rl78.md (umaxdi3): New define_expand.
17803 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17805 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17806 for non-QImode registers.
17808 2018-01-22 Richard Biener <rguenther@suse.de>
17810 PR tree-optimization/83963
17811 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17812 including the loop exit block.
17813 (scop_detection::merge_sese): Likewise.
17814 (scop_detection::add_scop): Do it here instead.
17816 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17818 * doc/sourcebuild.texi (arm_softfloat): Document.
17820 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17823 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17824 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17825 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17827 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17828 David Edelsohn <dje.gcc@gmail.com>
17831 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17832 Change "crset eq" to "crset 2".
17833 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17834 (*call_indirect_aix<mode>_nospec): Likewise.
17835 (*call_value_indirect_aix<mode>_nospec): Likewise.
17836 (*call_indirect_elfv2<mode>_nospec): Likewise.
17837 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17838 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17839 change assembly output from . to $.
17840 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17841 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17842 (*tablejump<mode>_internal1_nospec): Likewise.
17844 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17847 * config/sh/sh_optimize_sett_clrt.cc:
17848 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17850 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17852 PR tree-optimization/83940
17853 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17854 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17855 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17856 use it to pass back the definition type.
17857 (vect_check_store_rhs): Likewise rhs_dt_out.
17858 (vect_build_gather_load_calls): Add a mask_dt argument and use
17859 it instead of a call to vect_is_simple_use.
17860 (vectorizable_store): Update calls to vect_check_load_store_mask
17861 and vect_check_store_rhs. Use the dt returned by the latter instead
17862 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17863 instead of calls to vect_is_simple_use. Pass the scalar rather
17864 than the vector operand to vect_is_simple_use when handling
17865 second and subsequent copies of an rhs value.
17866 (vectorizable_load): Update calls to vect_check_load_store_mask
17867 and vect_build_gather_load_calls. Use the cached mask_dt and
17868 gs_info.offset_dt instead of calls to vect_is_simple_use.
17870 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17872 PR middle-end/83945
17873 * tree-emutls.c: Include gimplify.h.
17874 (lower_emutls_2): New function.
17875 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17876 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17877 it before further processing.
17880 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17881 UINTVAL (trueop1) instead of INTVAL (op1).
17883 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17887 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17888 INCOMING_FRAME_SP_OFFSET if not defined.
17889 (scan_trace): Add ENTRY argument. If true and
17890 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17891 emit a note to adjust the CFA offset.
17892 (create_cfi_notes): Adjust scan_trace callers.
17893 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17894 INCOMING_FRAME_SP_OFFSET in the CIE.
17895 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17896 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17898 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17899 * doc/tm.texi: Regenerated.
17901 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17903 PR rtl-optimization/83147
17904 * lra-constraints.c (remove_inheritance_pseudos): Use
17905 lra_substitute_pseudo_within_insn.
17907 2018-01-19 Tom de Vries <tom@codesourcery.com>
17908 Cesar Philippidis <cesar@codesourcery.com>
17911 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17913 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17916 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17917 spaces for function labels.
17919 2018-01-19 Martin Liska <mliska@suse.cz>
17921 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17922 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17923 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17924 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17925 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17926 (PRED_CONST_RETURN): Change from 69 to 65.
17927 (PRED_NULL_RETURN): Change from 91 to 71.
17928 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17929 (PRED_LOOP_GUARD): Change from 66 to 73.
17931 2018-01-19 Martin Liska <mliska@suse.cz>
17933 * predict.c (predict_insn_def): Add new assert.
17934 (struct branch_predictor): Change type to signed integer.
17935 (test_prediction_value_range): Amend test to cover
17936 PROB_UNINITIALIZED.
17937 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17938 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17939 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17940 (PRED_LOOP_IV_COMPARE): Likewise.
17941 * predict.h (PROB_UNINITIALIZED): Define new constant.
17943 2018-01-19 Martin Liska <mliska@suse.cz>
17945 * predict.c (dump_prediction): Add new format for
17946 analyze_brprob.py script which is enabled with -details
17948 * profile-count.h (precise_p): New function.
17950 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17952 PR tree-optimization/83922
17953 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17954 there are no statements that need masking.
17955 (vect_active_double_reduction_p): New function.
17956 (vect_analyze_loop_operations): Use it when handling phis that
17957 are not in the loop header.
17959 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17961 PR tree-optimization/83914
17962 * tree-vect-loop.c (vectorizable_induction): Don't convert
17963 init_expr or apply the peeling adjustment for inductions
17964 that are nested within the vectorized loop.
17966 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17968 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17971 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17975 * function.h (gimplify_parameters): Add gimple_seq * argument.
17976 * function.c: Include gimple.h and options.h.
17977 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17978 for the added local temporaries if needed.
17979 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17980 if there are any parameter cleanups, wrap whole body into a
17981 try/finally with the cleanups.
17983 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17986 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17987 Use GET_MODE_CLASS for scalar floating point.
17989 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17993 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17994 Fix call of call_cgraph_insertion_hooks.
17996 2018-01-18 Martin Sebor <msebor@redhat.com>
17998 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18000 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18003 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18006 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
18009 * common.opt: (-ffile-prefix-map): New option.
18010 * opts.c (common_handle_option): Defer it.
18011 * opts-global.c (handle_common_deferred_options): Handle it.
18012 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18013 * file-prefix-map.h: New file.
18014 (remap_debug_filename, add_debug_prefix_map): ...here.
18015 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18016 * final.c (debug_prefix_map, add_debug_prefix_map
18017 remap_debug_filename): Move to...
18018 * file-prefix-map.c: New file.
18019 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18020 generalize, get rid of alloca(), use strrchr() instead of strchr().
18021 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18022 Implement in terms of add_prefix_map().
18023 (remap_macro_filename, remap_debug_filename): Implement in term of
18025 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18026 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18027 * dbxout.c: Include file-prefix-map.h.
18028 * varasm.c: Likewise.
18029 * vmsdbgout.c: Likewise.
18030 * xcoffout.c: Likewise.
18031 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18032 * doc/cppopts.texi (-fmacro-prefix-map): Document.
18033 * doc/invoke.texi (-ffile-prefix-map): Document.
18034 (-fdebug-prefix-map): Update description.
18036 2018-01-18 Martin Liska <mliska@suse.cz>
18038 * config/i386/i386.c (indirect_thunk_name): Document that also
18040 (output_indirect_thunk): Document why both instructions
18041 (pause and lfence) are generated.
18043 2018-01-18 Richard Biener <rguenther@suse.de>
18045 PR tree-optimization/83887
18046 * graphite-scop-detection.c
18047 (scop_detection::get_nearest_dom_with_single_entry): Remove.
18048 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18049 (scop_detection::merge_sese): Re-implement with a flood-fill
18050 algorithm that properly finds a SESE region if it exists.
18052 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18055 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18056 pointer_diff optimizations use view_convert instead of convert.
18058 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18060 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18061 Generate different code for -mno-speculate-indirect-jumps.
18062 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18063 (*call_indirect_aix<mode>): Disable for
18064 -mno-speculate-indirect-jumps.
18065 (*call_indirect_aix<mode>_nospec): New define_insn.
18066 (*call_value_indirect_aix<mode>): Disable for
18067 -mno-speculate-indirect-jumps.
18068 (*call_value_indirect_aix<mode>_nospec): New define_insn.
18069 (*sibcall_nonlocal_sysv<mode>): Generate different code for
18070 -mno-speculate-indirect-jumps.
18071 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18073 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18075 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18076 long double type, set the flags for noting the default long double
18077 type, even if we don't pass or return a long double type.
18079 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
18082 * ipa-inline.c (flatten_function): Do not overwrite final inlining
18085 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
18087 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18088 support for merge[hl].
18089 (fold_mergehl_helper): New helper function.
18090 (tree-vector-builder.h): New #include for tree_vector_builder usage.
18091 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18092 (altivec_vmrglw_direct): Add xxmrglw insn.
18094 2018-01-17 Andrew Waterman <andrew@sifive.com>
18096 * config/riscv/riscv.c (riscv_conditional_register_usage): If
18097 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18099 2018-01-17 David Malcolm <dmalcolm@redhat.com>
18102 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18103 call the lto_location_cache before reading the
18104 DECL_SOURCE_LOCATION of the types.
18106 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
18107 Richard Sandiford <richard.sandiford@linaro.org>
18109 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18110 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18111 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18112 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18113 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18115 * config/aarch64/constraints.md (aarch64_movti_operand):
18117 * config/aarch64/predicates.md (Uti): Add new constraint.
18119 2018-01-17 Carl Love <cel@us.ibm.com>
18121 * config/rs6000/vsx.md (define_expand xl_len_r,
18122 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18123 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18125 (define_expand, define_insn): Move the shift left from the
18126 define_insn to the define_expand for lxvl and stxvl instructions.
18127 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18128 and XL_LEN_R definitions to PURE.
18130 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
18132 * config/i386/i386.c (indirect_thunk_name): Declare regno
18133 as unsigned int. Compare regno with INVALID_REGNUM.
18134 (output_indirect_thunk): Ditto.
18135 (output_indirect_thunk_function): Ditto.
18136 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
18137 in the call to output_indirect_thunk_function.
18139 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
18141 PR middle-end/83884
18142 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18143 rather than the size of inner_type to determine the stack slot size
18144 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18146 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
18149 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18152 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
18154 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18155 endian Linux systems to optionally enable multilibs for selecting
18156 the long double type if the user configured an explicit type.
18157 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18158 have no long double multilibs if not defined.
18159 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18160 warn if the user used -mabi={ieee,ibm}longdouble and we built
18161 multilibs for long double.
18162 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18163 appropriate multilib option.
18164 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18166 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18167 for building long double multilibs.
18168 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18170 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
18172 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18175 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18177 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18180 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18183 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18186 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18188 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18189 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18191 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
18193 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18194 different rtl trees depending on TARGET_64BIT.
18195 (rs6000_gen_lvx): Likewise.
18197 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18199 * config/visium/visium.md (nop): Tweak comment.
18200 (hazard_nop): Likewise.
18202 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18204 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18205 -mspeculate-indirect-jumps.
18206 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18207 for -mno-speculate-indirect-jumps.
18208 (*call_indirect_elfv2<mode>_nospec): New define_insn.
18209 (*call_value_indirect_elfv2<mode>): Disable for
18210 -mno-speculate-indirect-jumps.
18211 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18212 (indirect_jump): Emit different RTL for
18213 -mno-speculate-indirect-jumps.
18214 (*indirect_jump<mode>): Disable for
18215 -mno-speculate-indirect-jumps.
18216 (*indirect_jump<mode>_nospec): New define_insn.
18217 (tablejump): Emit different RTL for
18218 -mno-speculate-indirect-jumps.
18219 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18220 (tablejumpsi_nospec): New define_expand.
18221 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18222 (tablejumpdi_nospec): New define_expand.
18223 (*tablejump<mode>_internal1): Disable for
18224 -mno-speculate-indirect-jumps.
18225 (*tablejump<mode>_internal1_nospec): New define_insn.
18226 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18229 2018-01-16 Artyom Skrobov tyomitch@gmail.com
18231 * caller-save.c (insert_save): Drop unnecessary parameter. All
18234 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18235 Richard Biener <rguenth@suse.de>
18238 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18239 return early, inline manually is_gimple_sizepos. Make sure if we
18240 call gimplify_expr we don't end up with a gimple constant.
18241 * tree.c (variably_modified_type_p): Don't return true for
18242 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
18243 * gimplify.h (is_gimple_sizepos): Remove.
18245 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18247 PR tree-optimization/83857
18248 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18249 vectorizable_live_operation for pure SLP statements.
18250 (vectorizable_live_operation): Handle PHIs.
18252 2018-01-16 Richard Biener <rguenther@suse.de>
18254 PR tree-optimization/83867
18255 * tree-vect-stmts.c (vect_transform_stmt): Precompute
18256 nested_in_vect_loop_p since the scalar stmt may get invalidated.
18258 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18261 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18262 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18263 If off is not INTEGER_CST, issue a may not be aligned warning
18264 rather than isn't aligned. Use isn%'t rather than isn't.
18265 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18267 <case MULT_EXPR>: Improve the case when bottom and one of the
18268 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18269 operand, in that case check if the other operand is multiple of
18270 bottom divided by the INTEGER_CST operand.
18272 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18275 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18276 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18277 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18278 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18279 * config/pa/pa.c (pa_function_arg_advance): Likewise.
18280 (pa_function_arg, pa_arg_partial_bytes): Likewise.
18281 (pa_function_arg_size): New function.
18283 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18285 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18286 in a separate statement.
18288 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18290 PR tree-optimization/83847
18291 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18292 group gathers and scatters.
18294 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18296 PR rtl-optimization/86620
18297 * params.def (max-sched-ready-insns): Bump minimum value to 1.
18299 PR rtl-optimization/83213
18300 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18301 to last if both are JUMP_INSNs.
18303 PR tree-optimization/83843
18304 * gimple-ssa-store-merging.c
18305 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18306 store_immediate_info for bswap/nop orig_stores.
18308 2018-01-15 Andrew Waterman <andrew@sifive.com>
18310 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18312 <UDIV>: Increase cost if !TARGET_DIV.
18314 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
18316 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18317 (define_attr "cr_logical_3op"): New.
18318 (cceq_ior_compare): Adjust.
18319 (cceq_ior_compare_complement): Adjust.
18320 (*cceq_rev_compare): Adjust.
18321 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18322 (is_cracked_insn): Adjust.
18323 (insn_must_be_first_in_group): Adjust.
18324 * config/rs6000/40x.md: Adjust.
18325 * config/rs6000/440.md: Adjust.
18326 * config/rs6000/476.md: Adjust.
18327 * config/rs6000/601.md: Adjust.
18328 * config/rs6000/603.md: Adjust.
18329 * config/rs6000/6xx.md: Adjust.
18330 * config/rs6000/7450.md: Adjust.
18331 * config/rs6000/7xx.md: Adjust.
18332 * config/rs6000/8540.md: Adjust.
18333 * config/rs6000/cell.md: Adjust.
18334 * config/rs6000/e300c2c3.md: Adjust.
18335 * config/rs6000/e500mc.md: Adjust.
18336 * config/rs6000/e500mc64.md: Adjust.
18337 * config/rs6000/e5500.md: Adjust.
18338 * config/rs6000/e6500.md: Adjust.
18339 * config/rs6000/mpc.md: Adjust.
18340 * config/rs6000/power4.md: Adjust.
18341 * config/rs6000/power5.md: Adjust.
18342 * config/rs6000/power6.md: Adjust.
18343 * config/rs6000/power7.md: Adjust.
18344 * config/rs6000/power8.md: Adjust.
18345 * config/rs6000/power9.md: Adjust.
18346 * config/rs6000/rs64.md: Adjust.
18347 * config/rs6000/titan.md: Adjust.
18349 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18351 * config/i386/predicates.md (indirect_branch_operand): Rewrite
18352 ix86_indirect_branch_register logic.
18354 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18356 * config/i386/constraints.md (Bs): Update
18357 ix86_indirect_branch_register check. Don't check
18358 ix86_indirect_branch_register with GOT_memory_operand.
18360 * config/i386/predicates.md (GOT_memory_operand): Don't check
18361 ix86_indirect_branch_register here.
18362 (GOT32_symbol_operand): Likewise.
18364 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18366 * config/i386/predicates.md (constant_call_address_operand):
18367 Rewrite ix86_indirect_branch_register logic.
18368 (sibcall_insn_operand): Likewise.
18370 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18372 * config/i386/constraints.md (Bs): Replace
18373 ix86_indirect_branch_thunk_register with
18374 ix86_indirect_branch_register.
18376 * config/i386/i386.md (indirect_jump): Likewise.
18377 (tablejump): Likewise.
18378 (*sibcall_memory): Likewise.
18379 (*sibcall_value_memory): Likewise.
18380 Peepholes of indirect call and jump via memory: Likewise.
18381 * config/i386/i386.opt: Likewise.
18382 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18383 (GOT_memory_operand): Likewise.
18384 (call_insn_operand): Likewise.
18385 (sibcall_insn_operand): Likewise.
18386 (GOT32_symbol_operand): Likewise.
18388 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18390 PR middle-end/83837
18391 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18392 type rather than type addr's type points to.
18393 (expand_omp_atomic_mutex): Likewise.
18394 (expand_omp_atomic): Likewise.
18396 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18399 * config/i386/i386.c (output_indirect_thunk_function): Use
18400 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18401 for __x86_return_thunk.
18403 2018-01-15 Richard Biener <rguenther@suse.de>
18405 PR middle-end/83850
18406 * expmed.c (extract_bit_field_1): Fix typo.
18408 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18411 * config/arm/iterators.md (VF): New mode iterator.
18412 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18413 Remove integer-related logic from pattern.
18414 (neon_vabd<mode>_3): Likewise.
18416 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18418 PR middle-end/82694
18419 * common.opt (fstrict-overflow): No longer an alias.
18420 (fwrapv-pointer): New option.
18421 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18422 also for pointer types based on flag_wrapv_pointer.
18423 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18424 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18425 opts->x_flag_wrapv got set.
18426 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18427 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18428 POINTER_TYPE_OVERFLOW_UNDEFINED.
18429 * match.pd: Likewise in address comparison pattern.
18430 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18432 2018-01-15 Richard Biener <rguenther@suse.de>
18435 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18436 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18437 Reset type names to their identifier if their TYPE_DECL doesn't
18438 have linkage (and thus is used for ODR and devirt).
18439 (save_debug_info_for_decl): Remove.
18440 (save_debug_info_for_type): Likewise.
18441 (add_tree_to_fld_list): Adjust.
18442 * tree-pretty-print.c (dump_generic_node): Make dumping of
18443 type names more robust.
18445 2018-01-15 Richard Biener <rguenther@suse.de>
18447 * BASE-VER: Bump to 8.0.1.
18449 2018-01-14 Martin Sebor <msebor@redhat.com>
18452 * builtins.c (check_access): Avoid warning when the no-warning bit
18455 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18457 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18458 * ira-color (allocno_hard_regs_compare): Likewise.
18460 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18463 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18464 Use .pushsection/.popsection.
18466 2018-01-14 Martin Sebor <msebor@redhat.com>
18469 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18471 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18473 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18474 entry from extra_headers.
18475 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18476 extra_headers, make the list bitwise identical to the i?86-*-* one.
18478 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18480 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18481 -mcmodel=large with -mindirect-branch=thunk,
18482 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18483 -mfunction-return=thunk-extern.
18484 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18485 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18486 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18488 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18490 * config/i386/i386.c (print_reg): Print the name of the full
18491 integer register without '%'.
18492 (ix86_print_operand): Handle 'V'.
18493 * doc/extend.texi: Document 'V' modifier.
18495 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18497 * config/i386/constraints.md (Bs): Disallow memory operand for
18498 -mindirect-branch-register.
18500 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18501 (GOT_memory_operand): Likewise.
18502 (call_insn_operand): Likewise.
18503 (sibcall_insn_operand): Likewise.
18504 (GOT32_symbol_operand): Likewise.
18505 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18506 for -mindirect-branch-register.
18507 (tablejump): Likewise.
18508 (*sibcall_memory): Likewise.
18509 (*sibcall_value_memory): Likewise.
18510 Disallow peepholes of indirect call and jump via memory for
18511 -mindirect-branch-register.
18512 (*call_pop): Replace m with Bw.
18513 (*call_value_pop): Likewise.
18514 (*sibcall_pop_memory): Replace m with Bs.
18515 * config/i386/i386.opt (mindirect-branch-register): New option.
18516 * doc/invoke.texi: Document -mindirect-branch-register option.
18518 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18520 * config/i386/i386-protos.h (ix86_output_function_return): New.
18521 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18522 set function_return_type.
18523 (indirect_thunk_name): Add ret_p to indicate thunk for function
18525 (output_indirect_thunk_function): Pass false to
18526 indirect_thunk_name.
18527 (ix86_output_indirect_branch_via_reg): Likewise.
18528 (ix86_output_indirect_branch_via_push): Likewise.
18529 (output_indirect_thunk_function): Create alias for function
18530 return thunk if regno < 0.
18531 (ix86_output_function_return): New function.
18532 (ix86_handle_fndecl_attribute): Handle function_return.
18533 (ix86_attribute_table): Add function_return.
18534 * config/i386/i386.h (machine_function): Add
18535 function_return_type.
18536 * config/i386/i386.md (simple_return_internal): Use
18537 ix86_output_function_return.
18538 (simple_return_internal_long): Likewise.
18539 * config/i386/i386.opt (mfunction-return=): New option.
18540 (indirect_branch): Mention -mfunction-return=.
18541 * doc/extend.texi: Document function_return function attribute.
18542 * doc/invoke.texi: Document -mfunction-return= option.
18544 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18546 * config/i386/i386-opts.h (indirect_branch): New.
18547 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18548 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18549 with local indirect jump when converting indirect call and jump.
18550 (ix86_set_indirect_branch_type): New.
18551 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18552 (indirectlabelno): New.
18553 (indirect_thunk_needed): Likewise.
18554 (indirect_thunk_bnd_needed): Likewise.
18555 (indirect_thunks_used): Likewise.
18556 (indirect_thunks_bnd_used): Likewise.
18557 (INDIRECT_LABEL): Likewise.
18558 (indirect_thunk_name): Likewise.
18559 (output_indirect_thunk): Likewise.
18560 (output_indirect_thunk_function): Likewise.
18561 (ix86_output_indirect_branch_via_reg): Likewise.
18562 (ix86_output_indirect_branch_via_push): Likewise.
18563 (ix86_output_indirect_branch): Likewise.
18564 (ix86_output_indirect_jmp): Likewise.
18565 (ix86_code_end): Call output_indirect_thunk_function if needed.
18566 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18568 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18569 (ix86_attribute_table): Add indirect_branch.
18570 * config/i386/i386.h (machine_function): Add indirect_branch_type
18571 and has_local_indirect_jump.
18572 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18574 (tablejump): Likewise.
18575 (*indirect_jump): Use ix86_output_indirect_jmp.
18576 (*tablejump_1): Likewise.
18577 (simple_return_indirect_internal): Likewise.
18578 * config/i386/i386.opt (mindirect-branch=): New option.
18579 (indirect_branch): New.
18582 (thunk-inline): Likewise.
18583 (thunk-extern): Likewise.
18584 * doc/extend.texi: Document indirect_branch function attribute.
18585 * doc/invoke.texi: Document -mindirect-branch= option.
18587 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18590 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18592 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18594 * ipa-inline.c (want_inline_small_function_p): Return false if
18595 inlining has already failed with CIF_FINAL_ERROR.
18596 (update_caller_keys): Call want_inline_small_function_p before
18598 (update_callee_keys): Likewise.
18600 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18602 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18604 (rs6000_quadword_masked_address_p): Likewise.
18605 (quad_aligned_load_p): Likewise.
18606 (quad_aligned_store_p): Likewise.
18607 (const_load_sequence_p): Add comment to describe the outer-most loop.
18608 (mimic_memory_attributes_and_flags): New function.
18609 (rs6000_gen_stvx): Likewise.
18610 (replace_swapped_aligned_store): Likewise.
18611 (rs6000_gen_lvx): Likewise.
18612 (replace_swapped_aligned_load): Likewise.
18613 (replace_swapped_load_constant): Capitalize argument name in
18614 comment describing this function.
18615 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18616 and stores that access quad-word aligned addresses and replace
18617 with stvx or lvx instructions when appropriate.
18618 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18619 New function prototype.
18620 (rs6000_quadword_masked_address_p): Likewise.
18621 (rs6000_gen_lvx): Likewise.
18622 (rs6000_gen_stvx): Likewise.
18623 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18624 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18625 when memory address is aligned.
18626 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18627 this split to select lvx instruction when memory address is aligned.
18628 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18629 instruction when memory address is aligned.
18630 (*vsx_le_perm_load_v16qi): Likewise.
18631 (four unnamed splitters): Modify to select the stvx instruction
18632 when memory is aligned.
18634 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18636 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18637 which appears in the queue multiple times.
18639 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18640 Alan Hayward <alan.hayward@arm.com>
18641 David Sherwood <david.sherwood@arm.com>
18643 * tree-vectorizer.h (vec_lower_bound): New structure.
18644 (_loop_vec_info): Add check_nonzero and lower_bounds.
18645 (LOOP_VINFO_CHECK_NONZERO): New macro.
18646 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18647 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18648 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18649 fields. Make seg_len the distance travelled, not including the
18651 (dr_direction_indicator): Declare.
18652 (dr_zero_step_indicator): Likewise.
18653 (dr_known_forward_stride_p): Likewise.
18654 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18656 (runtime_alias_check_p): Allow runtime alias checks with
18658 (operator ==): Compare access_size and align.
18659 (prune_runtime_alias_test_list): Rework for new distinction between
18660 the access_size and seg_len.
18661 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18663 (get_segment_min_max): New function.
18664 (create_intersect_range_checks): Use it.
18665 (dr_step_indicator): New function.
18666 (dr_direction_indicator): Likewise.
18667 (dr_zero_step_indicator): Likewise.
18668 (dr_known_forward_stride_p): Likewise.
18669 * tree-loop-distribution.c (data_ref_segment_size): Return
18670 DR_STEP * (niters - 1).
18671 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18673 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18674 (vect_preserves_scalar_order_p): New function, split out from...
18675 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18676 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18677 (vect_vfa_access_size): New function.
18678 (vect_vfa_align): Likewise.
18679 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18680 (dump_lower_bound): New function.
18681 (vect_check_lower_bound): Likewise.
18682 (vect_small_gap_p): Likewise.
18683 (vectorizable_with_step_bound_p): Likewise.
18684 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18685 depencies if the vectorization factor is 1. Convert the checks
18686 for nonzero steps into checks on the bounds of DR_STEP. Try using
18687 a bunds check for variable steps if the minimum required step is
18688 relatively small. Update calls to the dr_with_seg_len
18689 constructor and to vect_compile_time_alias.
18690 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18692 (vect_loop_versioning): Call it.
18693 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18695 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18698 Alan Hayward <alan.hayward@arm.com>
18699 David Sherwood <david.sherwood@arm.com>
18701 * doc/sourcebuild.texi (vect_scatter_store): Document.
18702 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18704 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18706 * genopinit.c (main): Add supports_vec_scatter_store and
18707 supports_vec_scatter_store_cached to target_optabs.
18708 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18709 IFN_MASK_SCATTER_STORE.
18710 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18712 * internal-fn.h (internal_store_fn_p): Declare.
18713 (internal_fn_stored_value_index): Likewise.
18714 * internal-fn.c (scatter_store_direct): New macro.
18715 (expand_scatter_store_optab_fn): New function.
18716 (direct_scatter_store_optab_supported_p): New macro.
18717 (internal_store_fn_p): New function.
18718 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18719 IFN_MASK_SCATTER_STORE.
18720 (internal_fn_mask_index): Likewise.
18721 (internal_fn_stored_value_index): New function.
18722 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18723 for scatter stores.
18724 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18725 * optabs-query.c (supports_vec_scatter_store_p): New function.
18726 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18727 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18728 true for scatter stores.
18729 (vect_gather_scatter_fn_p): Handle scatter stores too.
18730 (vect_check_gather_scatter): Consider using scatter stores if
18731 supports_vec_scatter_store_p.
18732 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18733 scatter stores too.
18734 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18735 internal_fn_stored_value_index.
18736 (check_load_store_masking): Handle scatter stores too.
18737 (vect_get_store_rhs): Make public.
18738 (vectorizable_call): Use internal_store_fn_p.
18739 (vectorizable_store): Handle scatter store internal functions.
18740 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18741 when deciding whether the end of the group has been reached.
18742 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18743 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18744 (mask_scatter_store<mode>): New insns.
18746 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18747 Alan Hayward <alan.hayward@arm.com>
18748 David Sherwood <david.sherwood@arm.com>
18750 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18751 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18752 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18754 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18755 Use vect_truncate_gather_scatter_offset if we can't treat the
18756 operation as a normal gather load or scatter store.
18757 (get_group_load_store_type): Take the gather_scatter_info
18758 as argument. Try using a gather load or scatter store for
18759 single-element groups.
18760 (get_load_store_type): Update calls to get_group_load_store_type
18761 and vect_use_strided_gather_scatters_p.
18763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18764 Alan Hayward <alan.hayward@arm.com>
18765 David Sherwood <david.sherwood@arm.com>
18767 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18768 optional tree argument.
18769 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18771 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18772 but continue to use the current value as a fallback.
18773 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18774 to compare the updates.
18775 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18776 (get_load_store_type): Use it when handling a strided access.
18777 (vect_get_strided_load_store_ops): New function.
18778 (vect_get_data_ptr_increment): Likewise.
18779 (vectorizable_load): Handle strided gather loads. Always pass
18780 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18782 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18783 Alan Hayward <alan.hayward@arm.com>
18784 David Sherwood <david.sherwood@arm.com>
18786 * doc/md.texi (gather_load@var{m}): Document.
18787 (mask_gather_load@var{m}): Likewise.
18788 * genopinit.c (main): Add supports_vec_gather_load and
18789 supports_vec_gather_load_cached to target_optabs.
18790 * optabs-tree.c (init_tree_optimization_optabs): Use
18791 ggc_cleared_alloc to allocate target_optabs.
18792 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18793 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18795 * internal-fn.h (internal_load_fn_p): Declare.
18796 (internal_gather_scatter_fn_p): Likewise.
18797 (internal_fn_mask_index): Likewise.
18798 (internal_gather_scatter_fn_supported_p): Likewise.
18799 * internal-fn.c (gather_load_direct): New macro.
18800 (expand_gather_load_optab_fn): New function.
18801 (direct_gather_load_optab_supported_p): New macro.
18802 (direct_internal_fn_optab): New function.
18803 (internal_load_fn_p): Likewise.
18804 (internal_gather_scatter_fn_p): Likewise.
18805 (internal_fn_mask_index): Likewise.
18806 (internal_gather_scatter_fn_supported_p): Likewise.
18807 * optabs-query.c (supports_at_least_one_mode_p): New function.
18808 (supports_vec_gather_load_p): Likewise.
18809 * optabs-query.h (supports_vec_gather_load_p): Declare.
18810 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18811 and memory_type field.
18812 (NUM_PATTERNS): Bump to 15.
18813 * tree-vect-data-refs.c: Include internal-fn.h.
18814 (vect_gather_scatter_fn_p): New function.
18815 (vect_describe_gather_scatter_call): Likewise.
18816 (vect_check_gather_scatter): Try using internal functions for
18817 gather loads. Recognize existing calls to a gather load function.
18818 (vect_analyze_data_refs): Consider using gather loads if
18819 supports_vec_gather_load_p.
18820 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18821 (vect_get_gather_scatter_offset_type): Likewise.
18822 (vect_convert_mask_for_vectype): Likewise.
18823 (vect_add_conversion_to_patterm): Likewise.
18824 (vect_try_gather_scatter_pattern): Likewise.
18825 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18826 (vect_vect_recog_func_ptrs): Add it.
18827 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18828 internal_fn_mask_index and internal_gather_scatter_fn_p.
18829 (check_load_store_masking): Take the gather_scatter_info as an
18830 argument and handle gather loads.
18831 (vect_get_gather_scatter_ops): New function.
18832 (vectorizable_call): Check internal_load_fn_p.
18833 (vectorizable_load): Likewise. Handle gather load internal
18835 (vectorizable_store): Update call to check_load_store_masking.
18836 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18837 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18838 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18839 (aarch64_gather_scale_operand_d): New predicates.
18840 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18841 (mask_gather_load<mode>): New insns.
18843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18844 Alan Hayward <alan.hayward@arm.com>
18845 David Sherwood <david.sherwood@arm.com>
18847 * optabs.def (fold_left_plus_optab): New optab.
18848 * doc/md.texi (fold_left_plus_@var{m}): Document.
18849 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18850 * internal-fn.c (fold_left_direct): Define.
18851 (expand_fold_left_optab_fn): Likewise.
18852 (direct_fold_left_optab_supported_p): Likewise.
18853 * fold-const-call.c (fold_const_fold_left): New function.
18854 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18855 * tree-parloops.c (valid_reduction_p): New function.
18856 (gather_scalar_reductions): Use it.
18857 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18858 (vect_finish_replace_stmt): Declare.
18859 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18860 (needs_fold_left_reduction_p): New function, split out from...
18861 (vect_is_simple_reduction): ...here. Accept reductions that
18862 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18863 (vect_force_simple_reduction): Also store the reduction type in
18864 the assignment's STMT_VINFO_REDUC_TYPE.
18865 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18866 (merge_with_identity): New function.
18867 (vect_expand_fold_left): Likewise.
18868 (vectorize_fold_left_reduction): Likewise.
18869 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18870 scalar phi in place for it. Check for target support and reject
18871 cases that would reassociate the operation. Defer the transform
18872 phase to vectorize_fold_left_reduction.
18873 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18874 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18875 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18877 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18879 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18880 call to ifc_temp_var.
18882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18883 Alan Hayward <alan.hayward@arm.com>
18884 David Sherwood <david.sherwood@arm.com>
18886 * target.def (legitimize_address_displacement): Take the original
18887 offset as a poly_int.
18888 * targhooks.h (default_legitimize_address_displacement): Update
18890 * targhooks.c (default_legitimize_address_displacement): Likewise.
18891 * doc/tm.texi: Regenerate.
18892 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18893 as an argument, moving assert of ad->disp == ad->disp_term to...
18894 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18895 Try calling targetm.legitimize_address_displacement before expanding
18896 the address rather than afterwards, and adjust for the new interface.
18897 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18898 Match the new hook interface. Handle SVE addresses.
18899 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18900 new hook interface.
18902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18904 * Makefile.in (OBJS): Add early-remat.o.
18905 * target.def (select_early_remat_modes): New hook.
18906 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18907 * doc/tm.texi: Regenerate.
18908 * targhooks.h (default_select_early_remat_modes): Declare.
18909 * targhooks.c (default_select_early_remat_modes): New function.
18910 * timevar.def (TV_EARLY_REMAT): New timevar.
18911 * passes.def (pass_early_remat): New pass.
18912 * tree-pass.h (make_pass_early_remat): Declare.
18913 * early-remat.c: New file.
18914 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18916 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18919 Alan Hayward <alan.hayward@arm.com>
18920 David Sherwood <david.sherwood@arm.com>
18922 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18923 vfm1 with a bound_epilog parameter.
18924 (vect_do_peeling): Update calls accordingly, and move the prologue
18925 call earlier in the function. Treat the base bound_epilog as 0 for
18926 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18927 this base when peeling for gaps.
18928 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18929 with fully-masked loops.
18930 (vect_estimate_min_profitable_iters): Handle the single peeled
18931 iteration in that case.
18933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18934 Alan Hayward <alan.hayward@arm.com>
18935 David Sherwood <david.sherwood@arm.com>
18937 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18938 single-element interleaving even if the size is not a power of 2.
18939 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18940 accesses for single-element interleaving if the group size is
18943 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18944 Alan Hayward <alan.hayward@arm.com>
18945 David Sherwood <david.sherwood@arm.com>
18947 * doc/md.texi (fold_extract_last_@var{m}): Document.
18948 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18949 * optabs.def (fold_extract_last_optab): New optab.
18950 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18951 * internal-fn.c (fold_extract_direct): New macro.
18952 (expand_fold_extract_optab_fn): Likewise.
18953 (direct_fold_extract_optab_supported_p): Likewise.
18954 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18955 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18956 EXTRACT_LAST_REDUCTION.
18957 (get_initial_def_for_reduction): Do not create an initial vector
18958 for EXTRACT_LAST_REDUCTION reductions.
18959 (vectorizable_reduction): Leave the scalar phi in place for
18960 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18961 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18962 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18963 transform phase to vectorizable_condition.
18964 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18966 (vect_finish_stmt_generation): ...here.
18967 (vect_finish_replace_stmt): New function.
18968 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18969 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18971 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18974 Alan Hayward <alan.hayward@arm.com>
18975 David Sherwood <david.sherwood@arm.com>
18977 * doc/md.texi (extract_last_@var{m}): Document.
18978 * optabs.def (extract_last_optab): New optab.
18979 * internal-fn.def (EXTRACT_LAST): New internal function.
18980 * internal-fn.c (cond_unary_direct): New macro.
18981 (expand_cond_unary_optab_fn): Likewise.
18982 (direct_cond_unary_optab_supported_p): Likewise.
18983 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18984 loops using EXTRACT_LAST.
18985 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18986 (extract_last_<mode>): ...this optab.
18987 (vec_extract<mode><Vel>): Update accordingly.
18989 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18990 Alan Hayward <alan.hayward@arm.com>
18991 David Sherwood <david.sherwood@arm.com>
18993 * target.def (empty_mask_is_expensive): New hook.
18994 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18995 * doc/tm.texi: Regenerate.
18996 * targhooks.h (default_empty_mask_is_expensive): Declare.
18997 * targhooks.c (default_empty_mask_is_expensive): New function.
18998 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18999 if the target says that empty masks are expensive.
19000 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19002 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19005 Alan Hayward <alan.hayward@arm.com>
19006 David Sherwood <david.sherwood@arm.com>
19008 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19009 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19010 (vect_use_loop_mask_for_alignment_p): New function.
19011 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19012 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19013 niters_skip argument. Make sure that the first niters_skip elements
19014 of the first iteration are inactive.
19015 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19016 Update call to vect_set_loop_masks_directly.
19017 (get_misalign_in_elems): New function, split out from...
19018 (vect_gen_prolog_loop_niters): ...here.
19019 (vect_update_init_of_dr): Take a code argument that specifies whether
19020 the adjustment should be added or subtracted.
19021 (vect_update_init_of_drs): Likewise.
19022 (vect_prepare_for_masked_peels): New function.
19023 (vect_do_peeling): Skip prologue peeling if we're using a mask
19024 instead. Update call to vect_update_inits_of_drs.
19025 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19027 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19028 alignment. Do not include the number of peeled iterations in
19029 the minimum threshold in that case.
19030 (vectorizable_induction): Adjust the start value down by
19031 LOOP_VINFO_MASK_SKIP_NITERS iterations.
19032 (vect_transform_loop): Call vect_prepare_for_masked_peels.
19033 Take the number of skipped iterations into account when calculating
19035 * tree-vect-stmts.c (vect_gen_while_not): New function.
19037 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19038 Alan Hayward <alan.hayward@arm.com>
19039 David Sherwood <david.sherwood@arm.com>
19041 * doc/sourcebuild.texi (vect_fully_masked): Document.
19042 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19043 default value to 0.
19044 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19046 (vect_analyze_loop_2): ...here. Don't check the vectorization
19047 factor against the number of loop iterations if the loop is
19050 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19051 Alan Hayward <alan.hayward@arm.com>
19052 David Sherwood <david.sherwood@arm.com>
19054 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19055 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19056 (dump_groups): Update accordingly.
19057 (iv_use::mem_type): New member variable.
19058 (address_p): New function.
19059 (record_use): Add a mem_type argument and initialize the new
19061 (record_group_use): Add a mem_type argument. Use address_p.
19062 Remove obsolete null checks of base_object. Update call to record_use.
19063 (find_interesting_uses_op): Update call to record_group_use.
19064 (find_interesting_uses_cond): Likewise.
19065 (find_interesting_uses_address): Likewise.
19066 (get_mem_type_for_internal_fn): New function.
19067 (find_address_like_use): Likewise.
19068 (find_interesting_uses_stmt): Try find_address_like_use before
19069 calling find_interesting_uses_op.
19070 (addr_offset_valid_p): Use the iv mem_type field as the type
19071 of the addressed memory.
19072 (add_autoinc_candidates): Likewise.
19073 (get_address_cost): Likewise.
19074 (split_small_address_groups_p): Use address_p.
19075 (split_address_groups): Likewise.
19076 (add_iv_candidate_for_use): Likewise.
19077 (autoinc_possible_for_pair): Likewise.
19078 (rewrite_groups): Likewise.
19079 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19080 (determine_group_iv_cost): Update after split of USE_ADDRESS.
19081 (get_alias_ptr_type_for_ptr_address): New function.
19082 (rewrite_use_address): Rewrite address uses in calls that were
19083 identified by find_address_like_use.
19085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19086 Alan Hayward <alan.hayward@arm.com>
19087 David Sherwood <david.sherwood@arm.com>
19089 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19091 * gimple-expr.h (is_gimple_addressable: Likewise.
19092 * gimple-expr.c (is_gimple_address): Likewise.
19093 * internal-fn.c (expand_call_mem_ref): New function.
19094 (expand_mask_load_optab_fn): Use it.
19095 (expand_mask_store_optab_fn): Likewise.
19097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19098 Alan Hayward <alan.hayward@arm.com>
19099 David Sherwood <david.sherwood@arm.com>
19101 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19102 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19103 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19104 (cond_umax@var{mode}): Document.
19105 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19106 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19107 (cond_umin_optab, cond_umax_optab): New optabs.
19108 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19109 (COND_IOR, COND_XOR): New internal functions.
19110 * internal-fn.h (get_conditional_internal_fn): Declare.
19111 * internal-fn.c (cond_binary_direct): New macro.
19112 (expand_cond_binary_optab_fn): Likewise.
19113 (direct_cond_binary_optab_supported_p): Likewise.
19114 (get_conditional_internal_fn): New function.
19115 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19116 Cope with reduction statements that are vectorized as calls rather
19118 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19119 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19120 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19121 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19122 (UNSPEC_COND_EOR): New unspecs.
19123 (optab): Add mappings for them.
19124 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19125 (sve_int_op, sve_fp_op): New int attributes.
19127 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19128 Alan Hayward <alan.hayward@arm.com>
19129 David Sherwood <david.sherwood@arm.com>
19131 * optabs.def (while_ult_optab): New optab.
19132 * doc/md.texi (while_ult@var{m}@var{n}): Document.
19133 * internal-fn.def (WHILE_ULT): New internal function.
19134 * internal-fn.h (direct_internal_fn_supported_p): New override
19135 that takes two types as argument.
19136 * internal-fn.c (while_direct): New macro.
19137 (expand_while_optab_fn): New function.
19138 (convert_optab_supported_p): Likewise.
19139 (direct_while_optab_supported_p): New macro.
19140 * wide-int.h (wi::udiv_ceil): New function.
19141 * tree-vectorizer.h (rgroup_masks): New structure.
19142 (vec_loop_masks): New typedef.
19143 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19144 and fully_masked_p.
19145 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19146 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19147 (vect_max_vf): New function.
19148 (slpeel_make_loop_iterate_ntimes): Delete.
19149 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19150 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19151 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19152 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19153 internal-fn.h, stor-layout.h and optabs-query.h.
19154 (vect_set_loop_mask): New function.
19155 (add_preheader_seq): Likewise.
19156 (add_header_seq): Likewise.
19157 (interleave_supported_p): Likewise.
19158 (vect_maybe_permute_loop_masks): Likewise.
19159 (vect_set_loop_masks_directly): Likewise.
19160 (vect_set_loop_condition_masked): Likewise.
19161 (vect_set_loop_condition_unmasked): New function, split out from
19162 slpeel_make_loop_iterate_ntimes.
19163 (slpeel_make_loop_iterate_ntimes): Rename to..
19164 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
19165 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19166 (vect_do_peeling): Update call accordingly.
19167 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19169 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19170 mask_compare_type, can_fully_mask_p and fully_masked_p.
19171 (release_vec_loop_masks): New function.
19172 (_loop_vec_info): Use it to free the loop masks.
19173 (can_produce_all_loop_masks_p): New function.
19174 (vect_get_max_nscalars_per_iter): Likewise.
19175 (vect_verify_full_masking): Likewise.
19176 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19177 retries, and free the mask rgroups before retrying. Check loop-wide
19178 reasons for disallowing fully-masked loops. Make the final decision
19179 about whether use a fully-masked loop or not.
19180 (vect_estimate_min_profitable_iters): Do not assume that peeling
19181 for the number of iterations will be needed for fully-masked loops.
19182 (vectorizable_reduction): Disable fully-masked loops.
19183 (vectorizable_live_operation): Likewise.
19184 (vect_halve_mask_nunits): New function.
19185 (vect_double_mask_nunits): Likewise.
19186 (vect_record_loop_mask): Likewise.
19187 (vect_get_loop_mask): Likewise.
19188 (vect_transform_loop): Handle the case in which the final loop
19189 iteration might handle a partial vector. Call vect_set_loop_condition
19190 instead of slpeel_make_loop_iterate_ntimes.
19191 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19192 (check_load_store_masking): New function.
19193 (prepare_load_store_mask): Likewise.
19194 (vectorizable_store): Handle fully-masked loops.
19195 (vectorizable_load): Likewise.
19196 (supportable_widening_operation): Use vect_halve_mask_nunits for
19198 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19199 (vect_gen_while): New function.
19200 * config/aarch64/aarch64.md (umax<mode>3): New expander.
19201 (aarch64_uqdec<mode>): New insn.
19203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19204 Alan Hayward <alan.hayward@arm.com>
19205 David Sherwood <david.sherwood@arm.com>
19207 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19208 (reduc_xor_scal_optab): New optabs.
19209 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19210 (reduc_xor_scal_@var{m}): Document.
19211 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19212 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19213 internal functions.
19214 * fold-const-call.c (fold_const_call): Handle them.
19215 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19216 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19217 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19218 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19219 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19220 (UNSPEC_XORV): New unspecs.
19221 (optab): Add entries for them.
19222 (BITWISEV): New int iterator.
19223 (bit_reduc_op): New int attributes.
19225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19226 Alan Hayward <alan.hayward@arm.com>
19227 David Sherwood <david.sherwood@arm.com>
19229 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19230 * internal-fn.def (VEC_SHL_INSERT): New internal function.
19231 * optabs.def (vec_shl_insert_optab): New optab.
19232 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19233 (duplicate_and_interleave): Likewise.
19234 * tree-vect-loop.c: Include internal-fn.h.
19235 (neutral_op_for_slp_reduction): New function, split out from
19236 get_initial_defs_for_reduction.
19237 (get_initial_def_for_reduction): Handle option 2 for variable-length
19238 vectors by loading the neutral value into a vector and then shifting
19239 the initial value into element 0.
19240 (get_initial_defs_for_reduction): Replace the code argument with
19241 the neutral value calculated by neutral_op_for_slp_reduction.
19242 Use gimple_build_vector for constant-length vectors.
19243 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19244 but the first group_size elements have a neutral value.
19245 Use duplicate_and_interleave otherwise.
19246 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19247 Update call to get_initial_defs_for_reduction. Handle SLP
19248 reductions for variable-length vectors by creating one vector
19249 result for each scalar result, with the elements associated
19250 with other scalar results stubbed out with the neutral value.
19251 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19252 Require IFN_VEC_SHL_INSERT for double reductions on
19253 variable-length vectors, or SLP reductions that have
19254 a neutral value. Require can_duplicate_and_interleave_p
19255 support for variable-length unchained SLP reductions if there
19256 is no neutral value, such as for MIN/MAX reductions. Also require
19257 the number of vector elements to be a multiple of the number of
19258 SLP statements when doing variable-length unchained SLP reductions.
19259 Update call to vect_create_epilog_for_reduction.
19260 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19261 and remove initial values.
19262 (duplicate_and_interleave): Make public.
19263 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19264 * config/aarch64/aarch64-sve.md (vec_shl_insert_<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 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19271 (can_duplicate_and_interleave_p): New function.
19272 (vect_get_and_check_slp_defs): Take the vector of statements
19273 rather than just the current one. Remove excess parentheses.
19274 Restriction rejectinon of vect_constant_def and vect_external_def
19275 for variable-length vectors to boolean types, or types for which
19276 can_duplicate_and_interleave_p is false.
19277 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19278 (duplicate_and_interleave): New function.
19279 (vect_get_constant_vectors): Use gimple_build_vector for
19280 constant-length vectors and suitable variable-length constant
19281 vectors. Use duplicate_and_interleave for other variable-length
19282 vectors. Don't defer the update when inserting new statements.
19284 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19285 Alan Hayward <alan.hayward@arm.com>
19286 David Sherwood <david.sherwood@arm.com>
19288 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19289 min_profitable_iters doesn't go negative.
19291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19292 Alan Hayward <alan.hayward@arm.com>
19293 David Sherwood <david.sherwood@arm.com>
19295 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19296 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19297 * optabs.def (vec_mask_load_lanes_optab): New optab.
19298 (vec_mask_store_lanes_optab): Likewise.
19299 * internal-fn.def (MASK_LOAD_LANES): New internal function.
19300 (MASK_STORE_LANES): Likewise.
19301 * internal-fn.c (mask_load_lanes_direct): New macro.
19302 (mask_store_lanes_direct): Likewise.
19303 (expand_mask_load_optab_fn): Handle masked operations.
19304 (expand_mask_load_lanes_optab_fn): New macro.
19305 (expand_mask_store_optab_fn): Handle masked operations.
19306 (expand_mask_store_lanes_optab_fn): New macro.
19307 (direct_mask_load_lanes_optab_supported_p): Likewise.
19308 (direct_mask_store_lanes_optab_supported_p): Likewise.
19309 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19311 (vect_load_lanes_supported): Likewise.
19312 * tree-vect-data-refs.c (strip_conversion): New function.
19313 (can_group_stmts_p): Likewise.
19314 (vect_analyze_data_ref_accesses): Use it instead of checking
19315 for a pair of assignments.
19316 (vect_store_lanes_supported): Take a masked_p parameter.
19317 (vect_load_lanes_supported): Likewise.
19318 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19319 vect_store_lanes_supported and vect_load_lanes_supported.
19320 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19321 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19322 parameter. Don't allow gaps for masked accesses.
19323 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
19324 and vect_load_lanes_supported.
19325 (get_load_store_type): Take a masked_p parameter and update
19326 call to get_group_load_store_type.
19327 (vectorizable_store): Update call to get_load_store_type.
19328 Handle IFN_MASK_STORE_LANES.
19329 (vectorizable_load): Update call to get_load_store_type.
19330 Handle IFN_MASK_LOAD_LANES.
19332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19333 Alan Hayward <alan.hayward@arm.com>
19334 David Sherwood <david.sherwood@arm.com>
19336 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19338 * config/aarch64/aarch64-protos.h
19339 (aarch64_sve_struct_memory_operand_p): Declare.
19340 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19341 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19342 (VPRED, vpred): Handle SVE structure modes.
19343 * config/aarch64/constraints.md (Utx): New constraint.
19344 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19345 (aarch64_sve_struct_nonimmediate_operand): New predicates.
19346 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19347 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19348 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19349 structure modes. Split into pieces after RA.
19350 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19351 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19353 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19354 SVE structure modes.
19355 (aarch64_classify_address): Likewise.
19356 (sizetochar): Move earlier in file.
19357 (aarch64_print_operand): Handle SVE register lists.
19358 (aarch64_array_mode): New function.
19359 (aarch64_sve_struct_memory_operand_p): Likewise.
19360 (TARGET_ARRAY_MODE): Redefine.
19362 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19363 Alan Hayward <alan.hayward@arm.com>
19364 David Sherwood <david.sherwood@arm.com>
19366 * target.def (array_mode): New target hook.
19367 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19368 * doc/tm.texi: Regenerate.
19369 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19370 * hooks.c (hook_optmode_mode_uhwi_none): New function.
19371 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19372 targetm.array_mode.
19373 * stor-layout.c (mode_for_array): Likewise. Support polynomial
19376 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19377 Alan Hayward <alan.hayward@arm.com>
19378 David Sherwood <david.sherwood@arm.com>
19380 * fold-const.c (fold_binary_loc): Check the argument types
19381 rather than the result type when testing for a vector operation.
19383 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19385 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19386 * doc/tm.texi: Regenerate.
19388 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19389 Alan Hayward <alan.hayward@arm.com>
19390 David Sherwood <david.sherwood@arm.com>
19392 * doc/invoke.texi (-msve-vector-bits=): Document new option.
19393 (sve): Document new AArch64 extension.
19394 * doc/md.texi (w): Extend the description of the AArch64
19395 constraint to include SVE vectors.
19396 (Upl, Upa): Document new AArch64 predicate constraints.
19397 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19399 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19400 (msve-vector-bits=): New option.
19401 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19402 SVE when these are disabled.
19403 (sve): New extension.
19404 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19405 modes. Adjust their number of units based on aarch64_sve_vg.
19406 (MAX_BITSIZE_MODE_ANY_MODE): Define.
19407 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19408 aarch64_addr_query_type.
19409 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19410 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19411 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19412 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19413 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19414 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19415 (aarch64_simd_imm_zero_p): Delete.
19416 (aarch64_check_zero_based_sve_index_immediate): Declare.
19417 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19418 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19419 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19420 (aarch64_sve_float_mul_immediate_p): Likewise.
19421 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19422 rather than an rtx.
19423 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19424 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19425 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19426 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19427 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19428 (aarch64_regmode_natural_size): Likewise.
19429 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19430 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19432 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19433 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19434 for VG and the SVE predicate registers.
19435 (V_ALIASES): Add a "z"-prefixed alias.
19436 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19437 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19438 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19439 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19440 (REG_CLASS_NAMES): Add entries for them.
19441 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19442 and the predicate registers.
19443 (aarch64_sve_vg): Declare.
19444 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19445 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19446 (REGMODE_NATURAL_SIZE): Define.
19447 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19449 * config/aarch64/aarch64.c: Include cfgrtl.h.
19450 (simd_immediate_info): Add a constructor for series vectors,
19451 and an associated step field.
19452 (aarch64_sve_vg): New variable.
19453 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19454 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19455 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19456 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19457 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19458 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19459 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19460 (aarch64_get_mask_mode): New functions.
19461 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19462 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19463 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19464 predicate modes and predicate registers. Explicitly restrict
19465 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19466 to store a vector mode if it is recognized by
19467 aarch64_classify_vector_mode.
19468 (aarch64_regmode_natural_size): New function.
19469 (aarch64_hard_regno_caller_save_mode): Return the original mode
19471 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19472 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19473 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19474 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19476 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19477 does not overlap dest if the function is frame-related. Handle
19479 (aarch64_split_add_offset): New function.
19480 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19481 them aarch64_add_offset.
19482 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19483 and update call to aarch64_sub_sp.
19484 (aarch64_add_cfa_expression): New function.
19485 (aarch64_expand_prologue): Pass extra temporary registers to the
19486 functions above. Handle the case in which we need to emit new
19487 DW_CFA_expressions for registers that were originally saved
19488 relative to the stack pointer, but now have to be expressed
19489 relative to the frame pointer.
19490 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19492 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19493 IP0 and IP1 values for SVE frames.
19494 (aarch64_expand_vec_series): New function.
19495 (aarch64_expand_sve_widened_duplicate): Likewise.
19496 (aarch64_expand_sve_const_vector): Likewise.
19497 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19498 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19499 into the register, rather than emitting a SET directly.
19500 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19501 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19502 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19503 (offset_9bit_signed_scaled_p): New functions.
19504 (aarch64_replicate_bitmask_imm): New function.
19505 (aarch64_bitmask_imm): Use it.
19506 (aarch64_cannot_force_const_mem): Reject expressions involving
19507 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19508 (aarch64_classify_index): Handle SVE indices, by requiring
19509 a plain register index with a scale that matches the element size.
19510 (aarch64_classify_address): Handle SVE addresses. Assert that
19511 the mode of the address is VOIDmode or an integer mode.
19512 Update call to aarch64_classify_symbol.
19513 (aarch64_classify_symbolic_expression): Update call to
19514 aarch64_classify_symbol.
19515 (aarch64_const_vec_all_in_range_p): New function.
19516 (aarch64_print_vector_float_operand): Likewise.
19517 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19518 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19519 and the FP immediates 1.0 and 0.5.
19520 (aarch64_print_address_internal): Handle SVE addresses.
19521 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19522 (aarch64_regno_regclass): Handle predicate registers.
19523 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19525 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19526 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19527 (aarch64_convert_sve_vector_bits): New function.
19528 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19529 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19530 rather than an rtx.
19531 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19532 Handle SVE vector and predicate modes. Accept VL-based constants
19533 that need only one temporary register, and VL offsets that require
19534 no temporary registers.
19535 (aarch64_conditional_register_usage): Mark the predicate registers
19536 as fixed if SVE isn't available.
19537 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19538 Return true for SVE vector and predicate modes.
19539 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19540 rather than an unsigned int. Handle SVE modes.
19541 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19543 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19545 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19546 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19547 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19548 (aarch64_sve_float_mul_immediate_p): New functions.
19549 (aarch64_sve_valid_immediate): New function.
19550 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19551 Explicitly reject structure modes. Check for INDEX constants.
19552 Handle PTRUE and PFALSE constants.
19553 (aarch64_check_zero_based_sve_index_immediate): New function.
19554 (aarch64_simd_imm_zero_p): Delete.
19555 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19556 vector modes. Accept constants in the range of CNT[BHWD].
19557 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19558 ask for an Advanced SIMD mode.
19559 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19560 (aarch64_simd_vector_alignment): Handle SVE predicates.
19561 (aarch64_vectorize_preferred_vector_alignment): New function.
19562 (aarch64_simd_vector_alignment_reachable): Use it instead of
19564 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19565 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19567 (MAX_VECT_LEN): Delete.
19568 (expand_vec_perm_d): Add a vec_flags field.
19569 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19570 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19571 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19573 (aarch64_evpc_rev): Rename to...
19574 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19575 (aarch64_evpc_rev_global): New function.
19576 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19577 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19579 (aarch64_evpc_sve_tbl): New function.
19580 (aarch64_expand_vec_perm_const_1): Update after rename of
19581 aarch64_evpc_rev. Handle SVE permutes too, trying
19582 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19583 than aarch64_evpc_tbl.
19584 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19585 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19586 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19587 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19588 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19589 (aarch64_expand_sve_vcond): New functions.
19590 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19591 of aarch64_vector_mode_p.
19592 (aarch64_dwarf_poly_indeterminate_value): New function.
19593 (aarch64_compute_pressure_classes): Likewise.
19594 (aarch64_can_change_mode_class): Likewise.
19595 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19596 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19597 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19598 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19599 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19600 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19601 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19602 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19604 (Dn, Dl, Dr): Accept const as well as const_vector.
19605 (Dz): Likewise. Compare against CONST0_RTX.
19606 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19607 of "vector" where appropriate.
19608 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19609 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19610 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19611 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19612 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19613 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19614 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19615 (v_int_equiv): Extend to SVE modes.
19616 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19618 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19619 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19620 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19621 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19622 (SVE_COND_FP_CMP): New int iterators.
19623 (perm_hilo): Handle the new unpack unspecs.
19624 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19626 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19627 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19628 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19629 (aarch64_equality_operator, aarch64_constant_vector_operand)
19630 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19631 (aarch64_sve_nonimmediate_operand): Likewise.
19632 (aarch64_sve_general_operand): Likewise.
19633 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19634 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19635 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19636 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19637 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19638 (aarch64_sve_float_arith_immediate): Likewise.
19639 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19640 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19641 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19642 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19643 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19644 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19645 (aarch64_sve_float_arith_operand): Likewise.
19646 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19647 (aarch64_sve_float_mul_operand): Likewise.
19648 (aarch64_sve_vec_perm_operand): Likewise.
19649 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19650 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19651 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19652 as well as const_vector.
19653 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19654 in file. Use CONST0_RTX and CONSTM1_RTX.
19655 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19656 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19657 Use aarch64_simd_imm_zero.
19658 * config/aarch64/aarch64-sve.md: New file.
19659 * config/aarch64/aarch64.md: Include it.
19660 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19661 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19662 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19663 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19664 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19665 (sve): New attribute.
19666 (enabled): Disable instructions with the sve attribute unless
19668 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19669 aarch64_expand_mov_immediate.
19670 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19671 CNT[BHSD] immediates.
19672 (movti): Split CONST_POLY_INT moves into two halves.
19673 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19674 Split additions that need a temporary here if the destination
19675 is the stack pointer.
19676 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19677 (*add<mode>3_poly_1): New instruction.
19678 (set_clobber_cc): New expander.
19680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19682 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19683 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19684 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19685 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19686 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19687 Change innermode from fixed_mode_size to machine_mode.
19688 (simplify_subreg): Update call accordingly. Handle a constant-sized
19689 subreg of a variable-length CONST_VECTOR.
19691 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19692 Alan Hayward <alan.hayward@arm.com>
19693 David Sherwood <david.sherwood@arm.com>
19695 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19696 (add_offset_to_base): New function, split out from...
19697 (create_mem_ref): ...here. When handling a scale other than 1,
19698 check first whether the address is valid without the offset.
19699 Add it into the base if so, leaving the index and scale as-is.
19701 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19704 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19705 fold_for_warn before checking if arg2 is INTEGER_CST.
19707 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19709 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19710 (store_multiple_operation): Delete.
19711 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19712 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19713 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19714 guarded by TARGET_STRING.
19715 (rs6000_output_load_multiple): Delete.
19716 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19717 OPTION_MASK_STRING / TARGET_STRING handling.
19718 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19719 (const rs6000_opt_masks) <"string">: Change mask to 0.
19720 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19721 (MASK_STRING): Delete.
19722 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19724 (load_multiple): Delete.
19731 (store_multiple): Delete.
19738 (movmemsi_8reg): Delete.
19739 (corresponding unnamed define_insn): Delete.
19740 (movmemsi_6reg): Delete.
19741 (corresponding unnamed define_insn): Delete.
19742 (movmemsi_4reg): Delete.
19743 (corresponding unnamed define_insn): Delete.
19744 (movmemsi_2reg): Delete.
19745 (corresponding unnamed define_insn): Delete.
19746 (movmemsi_1reg): Delete.
19747 (corresponding unnamed define_insn): Delete.
19748 * config/rs6000/rs6000.opt (mno-string): New.
19749 (mstring): Replace by deprecation warning stub.
19750 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19752 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19754 * regrename.c (regrename_do_replace): If replacing the same
19755 reg multiple times, try to reuse last created gen_raw_REG.
19758 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19759 main to workaround a bug in GDB.
19761 2018-01-12 Tom de Vries <tom@codesourcery.com>
19764 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19766 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19768 PR rtl-optimization/80481
19769 * ira-color.c (get_cap_member): New function.
19770 (allocnos_conflict_by_live_ranges_p): Use it.
19771 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19772 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19774 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19777 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19778 (*saddl_se_1): Ditto.
19779 (*ssubsi_1): Ditto.
19780 (*ssubl_se_1): Ditto.
19782 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19784 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19785 rather than wi::to_widest for DR_INITs.
19786 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19787 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19788 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19790 (vect_analyze_group_access_1): Note that here.
19792 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19794 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19795 polynomial type sizes.
19797 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19799 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19800 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19801 (gimple_add_tmp_var): Likewise.
19803 2018-01-12 Martin Liska <mliska@suse.cz>
19805 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19806 (gimple_alloc_sizes): Likewise.
19807 (dump_gimple_statistics): Use PRIu64 in printf format.
19808 * gimple.h: Change uint64_t to int.
19810 2018-01-12 Martin Liska <mliska@suse.cz>
19812 * tree-core.h: Use uint64_t instead of int.
19813 * tree.c (tree_node_counts): Likewise.
19814 (tree_node_sizes): Likewise.
19815 (dump_tree_statistics): Use PRIu64 in printf format.
19817 2018-01-12 Martin Liska <mliska@suse.cz>
19819 * Makefile.in: As qsort_chk is implemented in vec.c, add
19820 vec.o to linkage of gencfn-macros.
19821 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19822 passing the info to record_node_allocation_statistics.
19823 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19825 * ggc-common.c (struct ggc_usage): Add operator== and use
19826 it in operator< and compare function.
19827 * mem-stats.h (struct mem_usage): Likewise.
19828 * vec.c (struct vec_usage): Remove operator< and compare
19829 function. Can be simply inherited.
19831 2018-01-12 Martin Jambor <mjambor@suse.cz>
19834 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19835 * tree-ssa-math-opts.c: Include domwalk.h.
19836 (convert_mult_to_fma_1): New function.
19837 (fma_transformation_info): New type.
19838 (fma_deferring_state): Likewise.
19839 (cancel_fma_deferring): New function.
19840 (result_of_phi): Likewise.
19841 (last_fma_candidate_feeds_initial_phi): Likewise.
19842 (convert_mult_to_fma): Added deferring logic, split actual
19843 transformation to convert_mult_to_fma_1.
19844 (math_opts_dom_walker): New type.
19845 (math_opts_dom_walker::after_dom_children): New method, body moved
19846 here from pass_optimize_widening_mul::execute, added deferring logic
19848 (pass_optimize_widening_mul::execute): Moved most of code to
19849 math_opts_dom_walker::after_dom_children.
19850 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19851 * config/i386/i386.c (ix86_option_override_internal): Added
19852 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19854 2018-01-12 Richard Biener <rguenther@suse.de>
19857 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19858 inline instance vars.
19860 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19863 * config/rx/rx.c (rx_is_restricted_memory_address):
19864 Handle SUBREG case.
19866 2018-01-12 Richard Biener <rguenther@suse.de>
19868 PR tree-optimization/80846
19869 * target.def (split_reduction): New target hook.
19870 * targhooks.c (default_split_reduction): New function.
19871 * targhooks.h (default_split_reduction): Declare.
19872 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19873 target requests first reduce vectors by combining low and high
19875 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19876 (get_vectype_for_scalar_type_and_size): Export.
19877 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19878 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19879 * doc/tm.texi: Regenerate.
19880 * config/i386/i386.c (ix86_split_reduction): Implement
19881 TARGET_VECTORIZE_SPLIT_REDUCTION.
19883 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19886 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19887 in PIC mode except for TARGET_VXWORKS_RTP.
19888 * config/sparc/sparc.c: Include cfgrtl.h.
19889 (TARGET_INIT_PIC_REG): Define.
19890 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19891 (sparc_pic_register_p): New predicate.
19892 (sparc_legitimate_address_p): Use it.
19893 (sparc_legitimize_pic_address): Likewise.
19894 (sparc_delegitimize_address): Likewise.
19895 (sparc_mode_dependent_address_p): Likewise.
19896 (gen_load_pcrel_sym): Remove 4th parameter.
19897 (load_got_register): Adjust call to above. Remove obsolete stuff.
19898 (sparc_expand_prologue): Do not call load_got_register here.
19899 (sparc_flat_expand_prologue): Likewise.
19900 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19901 (sparc_use_pseudo_pic_reg): New function.
19902 (sparc_init_pic_reg): Likewise.
19903 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19904 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19906 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19908 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19909 Add item for branch_cost.
19911 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19913 PR rtl-optimization/83565
19914 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19915 not extend the result to a larger mode for rotate operations.
19916 (num_sign_bit_copies1): Likewise.
19918 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19921 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19923 Use values-Xc.o for -pedantic.
19924 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19926 2018-01-12 Martin Liska <mliska@suse.cz>
19929 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19931 (possible_polymorphic_call_targets): Use it.
19932 (ipa_devirt): Likewise.
19934 2018-01-12 Martin Liska <mliska@suse.cz>
19936 * profile-count.h (enum profile_quality): Use 0 as invalid
19937 enum value of profile_quality.
19939 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19941 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19942 -mext-string options.
19944 2018-01-12 Richard Biener <rguenther@suse.de>
19946 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19947 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19948 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19950 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19952 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19954 * configure.ac (--with-long-double-format): Add support for the
19955 configuration option to change the default long double format on
19957 * config.gcc (powerpc*-linux*-*): Likewise.
19958 * configure: Regenerate.
19959 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19960 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19961 used without modification.
19963 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19965 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19966 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19967 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19968 MISC_BUILTIN_SPEC_BARRIER.
19969 (rs6000_init_builtins): Likewise.
19970 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19972 (speculation_barrier): New define_insn.
19973 * doc/extend.texi: Document __builtin_speculation_barrier.
19975 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19978 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19979 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19980 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19982 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19983 integral modes instead of "ss" and "sd".
19984 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19985 vectors with 32-bit and 64-bit elements.
19986 (vecdupssescalarmodesuffix): New mode attribute.
19987 (vec_dup<mode>): Use it.
19989 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19992 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19993 frame if argument is passed on stack.
19995 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19998 * ree.c (combine_reaching_defs): Optimize also
19999 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20000 reg2=any_extend(exp); reg1=reg2;, formatting fix.
20002 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20004 PR middle-end/83189
20005 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20007 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20009 PR middle-end/83718
20010 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20011 after they are computed.
20013 2018-01-11 Bin Cheng <bin.cheng@arm.com>
20015 PR tree-optimization/83695
20016 * gimple-loop-linterchange.cc
20017 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20018 reset cached scev information after interchange.
20019 (pass_linterchange::execute): Remove call to scev_reset_htab.
20021 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20023 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20024 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20025 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20026 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20027 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20028 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20029 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20030 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20031 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20032 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20033 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20034 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20035 (V_lane_reg): Likewise.
20036 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20038 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20039 (vfmal_lane_low<mode>_intrinsic,
20040 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20041 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20042 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20043 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20044 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20045 vfmsl_lane_high<mode>_intrinsic): New define_insns.
20047 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20049 * config/arm/arm-cpus.in (fp16fml): New feature.
20050 (ALL_SIMD): Add fp16fml.
20051 (armv8.2-a): Add fp16fml as an option.
20052 (armv8.3-a): Likewise.
20053 (armv8.4-a): Add fp16fml as part of fp16.
20054 * config/arm/arm.h (TARGET_FP16FML): Define.
20055 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20057 * config/arm/arm-modes.def (V2HF): Define.
20058 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20059 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20060 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20061 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20062 vfmsl_low, vfmsl_high): New set of builtins.
20063 * config/arm/iterators.md (PLUSMINUS): New code iterator.
20064 (vfml_op): New code attribute.
20065 (VFMLHALVES): New int iterator.
20066 (VFML, VFMLSEL): New mode attributes.
20067 (V_reg): Define mapping for V2HF.
20068 (V_hi, V_lo): New mode attributes.
20069 (VF_constraint): Likewise.
20070 (vfml_half, vfml_half_selector): New int attributes.
20071 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20073 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20074 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20076 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20077 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20078 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20079 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
20081 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20082 Document new effective target and option set.
20084 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20086 * config/arm/arm-cpus.in (armv8_4): New feature.
20087 (ARMv8_4a): New fgroup.
20088 (armv8.4-a): New arch.
20089 * config/arm/arm-tables.opt: Regenerate.
20090 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20091 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20092 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20093 Add matching rules for -march=armv8.4-a and extensions.
20094 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20096 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
20099 * config/rx/rx.md (BW): New mode attribute.
20100 (sync_lock_test_and_setsi): Add mode suffix to insn output.
20102 2018-01-11 Richard Biener <rguenther@suse.de>
20104 PR tree-optimization/83435
20105 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20106 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20107 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20109 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20110 Alan Hayward <alan.hayward@arm.com>
20111 David Sherwood <david.sherwood@arm.com>
20113 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20115 (aarch64_classify_address): Initialize it. Track polynomial offsets.
20116 (aarch64_print_address_internal): Use it to check for a zero offset.
20118 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20119 Alan Hayward <alan.hayward@arm.com>
20120 David Sherwood <david.sherwood@arm.com>
20122 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20123 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20124 Return a poly_int64 rather than a HOST_WIDE_INT.
20125 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20126 rather than a HOST_WIDE_INT.
20127 * config/aarch64/aarch64.h (aarch64_frame): Protect with
20128 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
20129 hard_fp_offset, frame_size, initial_adjust, callee_offset and
20130 final_offset from HOST_WIDE_INT to poly_int64.
20131 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20132 to_constant when getting the number of units in an Advanced SIMD
20134 (aarch64_builtin_vectorized_function): Check for a constant number
20136 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20138 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20139 attribute instead of GET_MODE_NUNITS.
20140 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20141 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20142 GET_MODE_SIZE for fixed-size registers.
20143 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20144 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20145 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20146 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20147 (aarch64_print_operand, aarch64_print_address_internal)
20148 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20149 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20150 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20151 Handle polynomial GET_MODE_SIZE.
20152 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
20153 wider than SImode without modification.
20154 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20155 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20156 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20157 passing and returning SVE modes.
20158 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20159 rather than GEN_INT.
20160 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20161 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20162 (aarch64_allocate_and_probe_stack_space): Likewise.
20163 (aarch64_layout_frame): Cope with polynomial offsets.
20164 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20165 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
20166 polynomial offsets.
20167 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20168 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20169 poly_int64 rather than a HOST_WIDE_INT.
20170 (aarch64_get_separate_components, aarch64_process_components)
20171 (aarch64_expand_prologue, aarch64_expand_epilogue)
20172 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20173 (aarch64_anchor_offset): New function, split out from...
20174 (aarch64_legitimize_address): ...here.
20175 (aarch64_builtin_vectorization_cost): Handle polynomial
20176 TYPE_VECTOR_SUBPARTS.
20177 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20179 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20180 number of elements from the PARALLEL rather than the mode.
20181 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20182 rather than GET_MODE_BITSIZE.
20183 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20184 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20185 (aarch64_expand_vec_perm_const_1): Handle polynomial
20186 d->perm.length () and d->perm elements.
20187 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
20188 Apply to_constant to d->perm elements.
20189 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20190 polynomial CONST_VECTOR_NUNITS.
20191 (aarch64_move_pointer): Take amount as a poly_int64 rather
20193 (aarch64_progress_pointer): Avoid temporary variable.
20194 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20195 the mode attribute instead of GET_MODE.
20197 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20198 Alan Hayward <alan.hayward@arm.com>
20199 David Sherwood <david.sherwood@arm.com>
20201 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20202 x exists before using it.
20203 (aarch64_add_constant_internal): Rename to...
20204 (aarch64_add_offset_1): ...this. Replace regnum with separate
20205 src and dest rtxes. Handle the case in which they're different,
20206 including when the offset is zero. Replace scratchreg with an rtx.
20207 Use 2 additions if there is no spare register into which we can
20208 move a 16-bit constant.
20209 (aarch64_add_constant): Delete.
20210 (aarch64_add_offset): Replace reg with separate src and dest
20211 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
20212 Use aarch64_add_offset_1.
20213 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20214 an rtx rather than an int. Take the delta as a poly_int64
20215 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
20216 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20217 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20218 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20219 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20220 and aarch64_add_sp.
20221 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20222 aarch64_add_constant.
20224 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20226 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20227 Use scalar_float_mode.
20229 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20231 * config/aarch64/aarch64-simd.md
20232 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20233 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20234 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20235 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20236 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20237 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20238 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20239 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20240 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20241 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20243 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20246 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20247 targ_options->x_arm_arch_string is non NULL.
20249 2018-01-11 Tamar Christina <tamar.christina@arm.com>
20251 * config/aarch64/aarch64.h
20252 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
20254 2018-01-11 Sudakshina Das <sudi.das@arm.com>
20257 * expmed.c (emit_store_flag_force): Swap if const op0
20258 and change VOIDmode to mode of op0.
20260 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20262 PR rtl-optimization/83761
20263 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20264 than bytes to mode_for_size.
20266 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20268 PR middle-end/83189
20269 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20270 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20273 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20275 PR middle-end/83575
20276 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20277 when in layout mode.
20278 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20279 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20282 2018-01-10 Michael Collison <michael.collison@arm.com>
20284 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20285 * config/aarch64/aarch64-option-extension.def: Add
20286 AARCH64_OPT_EXTENSION of 'fp16fml'.
20287 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20288 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20289 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20290 * config/aarch64/constraints.md (Ui7): New constraint.
20291 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20292 (VFMLA_SEL_W): Ditto.
20295 (VFMLA16_LOW): New int iterator.
20296 (VFMLA16_HIGH): Ditto.
20297 (UNSPEC_FMLAL): New unspec.
20298 (UNSPEC_FMLSL): Ditto.
20299 (UNSPEC_FMLAL2): Ditto.
20300 (UNSPEC_FMLSL2): Ditto.
20301 (f16mac): New code attribute.
20302 * config/aarch64/aarch64-simd-builtins.def
20303 (aarch64_fmlal_lowv2sf): Ditto.
20304 (aarch64_fmlsl_lowv2sf): Ditto.
20305 (aarch64_fmlalq_lowv4sf): Ditto.
20306 (aarch64_fmlslq_lowv4sf): Ditto.
20307 (aarch64_fmlal_highv2sf): Ditto.
20308 (aarch64_fmlsl_highv2sf): Ditto.
20309 (aarch64_fmlalq_highv4sf): Ditto.
20310 (aarch64_fmlslq_highv4sf): Ditto.
20311 (aarch64_fmlal_lane_lowv2sf): Ditto.
20312 (aarch64_fmlsl_lane_lowv2sf): Ditto.
20313 (aarch64_fmlal_laneq_lowv2sf): Ditto.
20314 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20315 (aarch64_fmlalq_lane_lowv4sf): Ditto.
20316 (aarch64_fmlsl_lane_lowv4sf): Ditto.
20317 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20318 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20319 (aarch64_fmlal_lane_highv2sf): Ditto.
20320 (aarch64_fmlsl_lane_highv2sf): Ditto.
20321 (aarch64_fmlal_laneq_highv2sf): Ditto.
20322 (aarch64_fmlsl_laneq_highv2sf): Ditto.
20323 (aarch64_fmlalq_lane_highv4sf): Ditto.
20324 (aarch64_fmlsl_lane_highv4sf): Ditto.
20325 (aarch64_fmlalq_laneq_highv4sf): Ditto.
20326 (aarch64_fmlsl_laneq_highv4sf): Ditto.
20327 * config/aarch64/aarch64-simd.md:
20328 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20329 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20330 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20331 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20332 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20333 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20334 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20335 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20336 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20337 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20338 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20339 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20340 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20341 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20342 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20343 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20344 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20345 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20346 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20347 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20348 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20349 (vfmlsl_low_u32): Ditto.
20350 (vfmlalq_low_u32): Ditto.
20351 (vfmlslq_low_u32): Ditto.
20352 (vfmlal_high_u32): Ditto.
20353 (vfmlsl_high_u32): Ditto.
20354 (vfmlalq_high_u32): Ditto.
20355 (vfmlslq_high_u32): Ditto.
20356 (vfmlal_lane_low_u32): Ditto.
20357 (vfmlsl_lane_low_u32): Ditto.
20358 (vfmlal_laneq_low_u32): Ditto.
20359 (vfmlsl_laneq_low_u32): Ditto.
20360 (vfmlalq_lane_low_u32): Ditto.
20361 (vfmlslq_lane_low_u32): Ditto.
20362 (vfmlalq_laneq_low_u32): Ditto.
20363 (vfmlslq_laneq_low_u32): Ditto.
20364 (vfmlal_lane_high_u32): Ditto.
20365 (vfmlsl_lane_high_u32): Ditto.
20366 (vfmlal_laneq_high_u32): Ditto.
20367 (vfmlsl_laneq_high_u32): Ditto.
20368 (vfmlalq_lane_high_u32): Ditto.
20369 (vfmlslq_lane_high_u32): Ditto.
20370 (vfmlalq_laneq_high_u32): Ditto.
20371 (vfmlslq_laneq_high_u32): Ditto.
20372 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20373 (AARCH64_FL_FOR_ARCH8_4): New.
20374 (AARCH64_ISA_F16FML): New ISA flag.
20375 (TARGET_F16FML): New feature flag for fp16fml.
20376 (doc/invoke.texi): Document new fp16fml option.
20378 2018-01-10 Michael Collison <michael.collison@arm.com>
20380 * config/aarch64/aarch64-builtins.c:
20381 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20382 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20383 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20384 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20385 (AARCH64_ISA_SHA3): New ISA flag.
20386 (TARGET_SHA3): New feature flag for sha3.
20387 * config/aarch64/iterators.md (sha512_op): New int attribute.
20388 (CRYPTO_SHA512): New int iterator.
20389 (UNSPEC_SHA512H): New unspec.
20390 (UNSPEC_SHA512H2): Ditto.
20391 (UNSPEC_SHA512SU0): Ditto.
20392 (UNSPEC_SHA512SU1): Ditto.
20393 * config/aarch64/aarch64-simd-builtins.def
20394 (aarch64_crypto_sha512hqv2di): New builtin.
20395 (aarch64_crypto_sha512h2qv2di): Ditto.
20396 (aarch64_crypto_sha512su0qv2di): Ditto.
20397 (aarch64_crypto_sha512su1qv2di): Ditto.
20398 (aarch64_eor3qv8hi): Ditto.
20399 (aarch64_rax1qv2di): Ditto.
20400 (aarch64_xarqv2di): Ditto.
20401 (aarch64_bcaxqv8hi): Ditto.
20402 * config/aarch64/aarch64-simd.md:
20403 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20404 (aarch64_crypto_sha512su0qv2di): Ditto.
20405 (aarch64_crypto_sha512su1qv2di): Ditto.
20406 (aarch64_eor3qv8hi): Ditto.
20407 (aarch64_rax1qv2di): Ditto.
20408 (aarch64_xarqv2di): Ditto.
20409 (aarch64_bcaxqv8hi): Ditto.
20410 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20411 (vsha512h2q_u64): Ditto.
20412 (vsha512su0q_u64): Ditto.
20413 (vsha512su1q_u64): Ditto.
20414 (veor3q_u16): Ditto.
20415 (vrax1q_u64): Ditto.
20416 (vxarq_u64): Ditto.
20417 (vbcaxq_u16): Ditto.
20418 * config/arm/types.md (crypto_sha512): New type attribute.
20419 (crypto_sha3): Ditto.
20420 (doc/invoke.texi): Document new sha3 option.
20422 2018-01-10 Michael Collison <michael.collison@arm.com>
20424 * config/aarch64/aarch64-builtins.c:
20425 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20426 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20427 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20428 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20429 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20430 (AARCH64_ISA_SM4): New ISA flag.
20431 (TARGET_SM4): New feature flag for sm4.
20432 * config/aarch64/aarch64-simd-builtins.def
20433 (aarch64_sm3ss1qv4si): Ditto.
20434 (aarch64_sm3tt1aq4si): Ditto.
20435 (aarch64_sm3tt1bq4si): Ditto.
20436 (aarch64_sm3tt2aq4si): Ditto.
20437 (aarch64_sm3tt2bq4si): Ditto.
20438 (aarch64_sm3partw1qv4si): Ditto.
20439 (aarch64_sm3partw2qv4si): Ditto.
20440 (aarch64_sm4eqv4si): Ditto.
20441 (aarch64_sm4ekeyqv4si): Ditto.
20442 * config/aarch64/aarch64-simd.md:
20443 (aarch64_sm3ss1qv4si): Ditto.
20444 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20445 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20446 (aarch64_sm4eqv4si): Ditto.
20447 (aarch64_sm4ekeyqv4si): Ditto.
20448 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20449 (sm3part_op): Ditto.
20450 (CRYPTO_SM3TT): Ditto.
20451 (CRYPTO_SM3PART): Ditto.
20452 (UNSPEC_SM3SS1): New unspec.
20453 (UNSPEC_SM3TT1A): Ditto.
20454 (UNSPEC_SM3TT1B): Ditto.
20455 (UNSPEC_SM3TT2A): Ditto.
20456 (UNSPEC_SM3TT2B): Ditto.
20457 (UNSPEC_SM3PARTW1): Ditto.
20458 (UNSPEC_SM3PARTW2): Ditto.
20459 (UNSPEC_SM4E): Ditto.
20460 (UNSPEC_SM4EKEY): Ditto.
20461 * config/aarch64/constraints.md (Ui2): New constraint.
20462 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20463 * config/arm/types.md (crypto_sm3): New type attribute.
20464 (crypto_sm4): Ditto.
20465 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20466 (vsm3tt1aq_u32): Ditto.
20467 (vsm3tt1bq_u32): Ditto.
20468 (vsm3tt2aq_u32): Ditto.
20469 (vsm3tt2bq_u32): Ditto.
20470 (vsm3partw1q_u32): Ditto.
20471 (vsm3partw2q_u32): Ditto.
20472 (vsm4eq_u32): Ditto.
20473 (vsm4ekeyq_u32): Ditto.
20474 (doc/invoke.texi): Document new sm4 option.
20476 2018-01-10 Michael Collison <michael.collison@arm.com>
20478 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20479 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20480 (AARCH64_FL_FOR_ARCH8_4): New.
20481 (AARCH64_FL_V8_4): New flag.
20482 (doc/invoke.texi): Document new armv8.4-a option.
20484 2018-01-10 Michael Collison <michael.collison@arm.com>
20486 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20487 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20488 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20489 * config/aarch64/aarch64-option-extension.def: Add
20490 AARCH64_OPT_EXTENSION of 'sha2'.
20491 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20492 (crypto): Disable sha2 and aes if crypto disabled.
20493 (crypto): Enable aes and sha2 if enabled.
20494 (simd): Disable sha2 and aes if simd disabled.
20495 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20497 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20498 (TARGET_SHA2): New feature flag for sha2.
20499 (TARGET_AES): New feature flag for aes.
20500 * config/aarch64/aarch64-simd.md:
20501 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20502 conditional on TARGET_AES.
20503 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20504 (aarch64_crypto_sha1hsi): Make pattern conditional
20506 (aarch64_crypto_sha1hv4si): Ditto.
20507 (aarch64_be_crypto_sha1hv4si): Ditto.
20508 (aarch64_crypto_sha1su1v4si): Ditto.
20509 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20510 (aarch64_crypto_sha1su0v4si): Ditto.
20511 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20512 (aarch64_crypto_sha256su0v4si): Ditto.
20513 (aarch64_crypto_sha256su1v4si): Ditto.
20514 (doc/invoke.texi): Document new aes and sha2 options.
20516 2018-01-10 Martin Sebor <msebor@redhat.com>
20518 PR tree-optimization/83781
20519 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20522 2018-01-11 Martin Sebor <msebor@gmail.com>
20523 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20525 PR tree-optimization/83501
20526 PR tree-optimization/81703
20528 * tree-ssa-strlen.c (get_string_cst): Rename...
20529 (get_string_len): ...to this. Handle global constants.
20530 (handle_char_store): Adjust.
20532 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20533 Jim Wilson <jimw@sifive.com>
20535 * config/riscv/riscv-protos.h (riscv_output_return): New.
20536 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20537 (riscv_attribute_table, riscv_output_return),
20538 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20539 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20540 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20542 (riscv_expand_prologue): Add early return for naked function.
20543 (riscv_expand_epilogue): Likewise.
20544 (riscv_function_ok_for_sibcall): Return false for naked function.
20545 (riscv_set_current_function): New.
20546 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20547 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20548 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20549 * doc/extend.texi (RISC-V Function Attributes): New.
20551 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20553 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20554 check for 128-bit long double before checking TCmode.
20555 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20556 128-bit long doubles before checking TFmode or TCmode.
20557 (FLOAT128_IBM_P): Likewise.
20559 2018-01-10 Martin Sebor <msebor@redhat.com>
20561 PR tree-optimization/83671
20562 * builtins.c (c_strlen): Unconditionally return zero for the empty
20564 Use -Warray-bounds for warnings.
20565 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20566 for non-constant array indices with COMPONENT_REF, arrays of
20567 arrays, and pointers to arrays.
20568 (gimple_fold_builtin_strlen): Determine and set length range for
20569 non-constant character arrays.
20571 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20573 PR middle-end/81897
20574 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20577 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20579 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20581 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20584 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20585 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20586 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20587 indexed_or_indirect_operand predicate.
20588 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20589 (*vsx_le_perm_load_v8hi): Likewise.
20590 (*vsx_le_perm_load_v16qi): Likewise.
20591 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20592 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20593 (*vsx_le_perm_store_v8hi): Likewise.
20594 (*vsx_le_perm_store_v16qi): Likewise.
20595 (eight unnamed splitters): Likewise.
20597 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20599 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20600 * config/rs6000/emmintrin.h: Likewise.
20601 * config/rs6000/mmintrin.h: Likewise.
20602 * config/rs6000/xmmintrin.h: Likewise.
20604 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20607 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20609 * tree.c (tree_nop_conversion): Return true for location wrapper
20611 (maybe_wrap_with_location): New function.
20612 (selftest::check_strip_nops): New function.
20613 (selftest::test_location_wrappers): New function.
20614 (selftest::tree_c_tests): Call it.
20615 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20616 (maybe_wrap_with_location): New decl.
20617 (EXPR_LOCATION_WRAPPER_P): New macro.
20618 (location_wrapper_p): New inline function.
20619 (tree_strip_any_location_wrapper): New inline function.
20621 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20624 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20625 stack_realign_offset for the largest alignment of stack slot
20627 (ix86_find_max_used_stack_alignment): New function.
20628 (ix86_finalize_stack_frame_flags): Use it. Set
20629 max_used_stack_alignment if we don't realign stack.
20630 * config/i386/i386.h (machine_function): Add
20631 max_used_stack_alignment.
20633 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20635 * config/arm/arm.opt (-mbranch-cost): New option.
20636 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20639 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20642 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20643 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20645 2018-01-10 Richard Biener <rguenther@suse.de>
20648 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20649 early out so it also covers the case where we have a non-NULL
20652 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20654 PR tree-optimization/83753
20655 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20656 for non-strided grouped accesses if the number of elements is 1.
20658 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20661 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20662 * i386.h (TARGET_USE_GATHER): Define.
20663 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20665 2018-01-10 Martin Liska <mliska@suse.cz>
20668 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20669 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20671 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20672 CLEANUP_NO_PARTITIONING is not set.
20674 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20676 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20677 for vectors, as a partial revert of r254296.
20678 * rtl.h (const_vec_p): Delete.
20679 (const_vec_duplicate_p): Don't test for vector CONSTs.
20680 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20681 * expmed.c (make_tree): Likewise.
20684 * common.md (E, F): Use CONSTANT_P instead of checking for
20686 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20687 checking for CONST_VECTOR.
20689 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20691 PR middle-end/83575
20692 * predict.c (force_edge_cold): Handle in more sane way edges
20693 with no prediction.
20695 2018-01-09 Carl Love <cel@us.ibm.com>
20697 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20699 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20700 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20701 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20702 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20703 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20704 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20705 * config/rs6000/rs6000-protos.h: Add extern defition for
20706 rs6000_generate_float2_double_code.
20707 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20709 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20710 (float2_v2df): Add define_expand.
20712 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20715 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20716 op_mode in the force_to_mode call.
20718 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20720 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20721 instead of checking each element individually.
20722 (aarch64_evpc_uzp): Likewise.
20723 (aarch64_evpc_zip): Likewise.
20724 (aarch64_evpc_ext): Likewise.
20725 (aarch64_evpc_rev): Likewise.
20726 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20727 instead of checking each element individually. Return true without
20729 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20730 whether all selected elements come from the same input, instead of
20731 checking each element individually. Remove calls to gen_rtx_REG,
20732 start_sequence and end_sequence and instead assert that no rtl is
20735 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20737 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20738 order of HIGH and CONST checks.
20740 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20742 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20743 if the destination isn't an SSA_NAME.
20745 2018-01-09 Richard Biener <rguenther@suse.de>
20747 PR tree-optimization/83668
20748 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20750 (canonicalize_loop_form): ... here, renamed from ...
20751 (canonicalize_loop_closed_ssa_form): ... this and amended to
20752 swap successor edges for loop exit blocks to make us use
20753 the RPO order we need for initial schedule generation.
20755 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20757 PR tree-optimization/64811
20758 * match.pd: When optimizing comparisons with Inf, avoid
20759 introducing or losing exceptions from comparisons with NaN.
20761 2018-01-09 Martin Liska <mliska@suse.cz>
20764 * asan.c (shadow_mem_size): Add gcc_assert.
20766 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20768 Don't save registers in main().
20771 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20772 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20773 * config/avr/avr.c (avr_set_current_function): Don't error if
20774 naked, OS_task or OS_main are specified at the same time.
20775 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20777 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20779 * common/config/avr/avr-common.c (avr_option_optimization_table):
20780 Switch on -mmain-is-OS_task for optimizing compilations.
20782 2018-01-09 Richard Biener <rguenther@suse.de>
20784 PR tree-optimization/83572
20785 * graphite.c: Include cfganal.h.
20786 (graphite_transform_loops): Connect infinite loops to exit
20787 and remove fake edges at the end.
20789 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20791 * ipa-inline.c (edge_badness): Revert accidental checkin.
20793 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20796 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20797 symbols; not inline clones.
20799 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20802 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20803 hard registers. Formatting fixes.
20805 PR preprocessor/83722
20806 * gcc.c (try_generate_repro): Pass
20807 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20808 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20811 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20812 Kito Cheng <kito.cheng@gmail.com>
20814 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20815 (riscv_leaf_function_p): Delete.
20816 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20818 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20820 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20822 (do_ifelse): New function.
20823 (do_isel): New function.
20824 (do_sub3): New function.
20825 (do_add3): New function.
20826 (do_load_mask_compare): New function.
20827 (do_overlap_load_compare): New function.
20828 (expand_compare_loop): New function.
20829 (expand_block_compare): Call expand_compare_loop() when appropriate.
20830 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20831 option description.
20832 (-mblock-compare-inline-loop-limit): New option.
20834 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20837 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20838 Reverse order of second and third operands in first alternative.
20839 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20840 of first and second elements in UNSPEC_VPERMR vector.
20841 (altivec_expand_vec_perm_le): Likewise.
20843 2018-01-08 Jeff Law <law@redhat.com>
20845 PR rtl-optimizatin/81308
20846 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20847 (process_switch): If group_case_labels makes a change, then set
20849 (pass_convert_switch::execute): If a switch is converted, then
20850 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20852 PR rtl-optimization/81308
20853 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20856 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20858 PR target/83663 - Revert r255946
20859 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20860 generation for cases where splatting a value is not useful.
20861 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20862 across a vec_duplicate and a paradoxical subreg forming a vector
20863 mode to a vec_concat.
20865 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20867 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20868 -march=armv8.3-a variants.
20869 * config/arm/t-multilib: Likewise.
20870 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20872 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20874 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20876 (cceq_ior_compare_complement): Give it a name so I can use it, and
20877 change boolean_or_operator predicate to boolean_operator so it can
20878 be used to generate a crand.
20879 (eqne): New code iterator.
20880 (bd/bd_neg): New code_attrs.
20881 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20882 a single define_insn.
20883 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20884 decrement (bdnzt/bdnzf/bdzt/bdzf).
20885 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20886 with the new names of the branch decrement patterns, and added the
20887 names of the branch decrement conditional patterns.
20889 2018-01-08 Richard Biener <rguenther@suse.de>
20891 PR tree-optimization/83563
20892 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20895 2018-01-08 Richard Biener <rguenther@suse.de>
20897 PR middle-end/83713
20898 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20900 2018-01-08 Richard Biener <rguenther@suse.de>
20902 PR tree-optimization/83685
20903 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20904 references to abnormals.
20906 2018-01-08 Richard Biener <rguenther@suse.de>
20909 * dwarf2out.c (output_indirect_strings): Handle empty
20910 skeleton_debug_str_hash.
20911 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20913 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20915 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20916 (emit_store_direct): Likewise.
20917 (arc_trampoline_adjust_address): Likewise.
20918 (arc_asm_trampoline_template): New function.
20919 (arc_initialize_trampoline): Use asm_trampoline_template.
20920 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20921 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20922 * config/arc/arc.md (flush_icache): Delete pattern.
20924 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20926 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20927 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20930 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20933 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20934 by not USED_FOR_TARGET.
20935 (make_pass_resolve_sw_modes): Likewise.
20937 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20939 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20942 2018-01-08 Richard Biener <rguenther@suse.de>
20944 PR middle-end/83580
20945 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20947 2018-01-08 Richard Biener <rguenther@suse.de>
20949 PR middle-end/83517
20950 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20952 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20954 PR middle-end/81897
20955 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20956 basic blocks with a small number of successors.
20957 (convert_control_dep_chain_into_preds): Improve handling of
20959 (dump_predicates): Split apart into...
20960 (dump_pred_chain): ...here...
20961 (dump_pred_info): ...and here.
20962 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20963 (can_chain_union_be_invalidated_p): Improve check for invalidation
20965 (uninit_uses_cannot_happen): Avoid unnecessary if
20966 convert_control_dep_chain_into_preds yielded nothing.
20968 2018-01-06 Martin Sebor <msebor@redhat.com>
20970 PR tree-optimization/83640
20971 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20972 subtracting negative offset from size.
20973 (builtin_access::overlap): Adjust offset bounds of the access to fall
20974 within the size of the object if possible.
20976 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20978 PR rtl-optimization/83699
20979 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20980 extract_bit_field_as_subreg to cases in which the extracted
20981 value is also a vector.
20983 * lra-constraints.c (process_alt_operands): Test for the equivalence
20984 substitutions when detecting a possible reload cycle.
20986 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20989 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20990 by default if flag_selective_schedling{,2}. Formatting fixes.
20992 PR rtl-optimization/83682
20993 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20994 if it has non-VECTOR_MODE element mode.
20995 (vec_duplicate_p): Likewise.
20997 PR middle-end/83694
20998 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20999 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21001 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21004 * config/i386/i386-builtin.def
21005 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21006 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21007 Require also OPTION_MASK_ISA_AVX512F in addition to
21008 OPTION_MASK_ISA_GFNI.
21009 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21010 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21011 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21012 to OPTION_MASK_ISA_GFNI.
21013 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21014 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21015 OPTION_MASK_ISA_AVX512BW.
21016 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21017 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21018 addition to OPTION_MASK_ISA_GFNI.
21019 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21020 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21021 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21022 to OPTION_MASK_ISA_GFNI.
21023 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21024 a requirement for all ISAs rather than any of them with a few
21026 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21028 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21029 bitmasks to be enabled with 3 exceptions, instead of requiring any
21030 enabled ISA with lots of exceptions.
21031 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21032 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21033 Change avx512bw in isa attribute to avx512f.
21034 * config/i386/sgxintrin.h: Add license boilerplate.
21035 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
21036 to __AVX512F__ and __AVX512VL to __AVX512VL__.
21037 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21038 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21040 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21041 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21042 temporarily sse2 rather than sse if not enabled already.
21045 * config/i386/sse.md (VI248_VLBW): Rename to ...
21046 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
21047 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21048 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21049 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21050 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21051 mode iterator instead of VI248_VLBW.
21053 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
21055 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21056 (record_modified): Skip clobbers; add debug output.
21057 (param_change_prob): Use sreal frequencies.
21059 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21061 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21062 punt for user-aligned variables.
21064 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21066 * tree-chrec.c (chrec_contains_symbols): Return true for
21069 2018-01-05 Sudakshina Das <sudi.das@arm.com>
21072 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21073 of (x|y) == x for BICS pattern.
21075 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21077 PR tree-optimization/83605
21078 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21079 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21082 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
21084 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21085 * config/epiphany/rtems.h: New file.
21087 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21088 Uros Bizjak <ubizjak@gmail.com>
21091 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21092 QIreg_operand instead of register_operand predicate.
21093 * config/i386/i386.c (ix86_rop_should_change_byte_p,
21094 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21095 comments instead of -fmitigate[-_]rop.
21097 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21100 * cgraphunit.c (symbol_table::compile): Switch to text_section
21101 before calling assembly_start debug hook.
21102 * run-rtl-passes.c (run_rtl_passes): Likewise.
21105 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21107 * tree-vrp.c (extract_range_from_binary_expr_1): Check
21108 range_int_cst_p rather than !symbolic_range_p before calling
21109 extract_range_from_multiplicative_op_1.
21111 2018-01-04 Jeff Law <law@redhat.com>
21113 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21114 redundant test in assertion.
21116 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21118 * doc/rtl.texi: Document machine_mode wrapper classes.
21120 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21122 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21123 using tree_to_uhwi.
21125 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21127 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21128 the VEC_PERM_EXPR fold to fail.
21130 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21133 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21134 to switched_sections.
21136 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21139 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21140 test for d.testing.
21142 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
21145 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21146 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21148 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21151 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21152 is BLKmode and bitpos not zero or mode change is needed.
21154 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21157 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21160 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
21163 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21164 instead of MULT rtx. Update all corresponding splitters.
21165 (*saddl_se): Ditto.
21166 (*ssub<modesuffix>): Ditto.
21167 (*ssubl_se): Ditto.
21168 (*cmp_sadd_di): Update split patterns.
21169 (*cmp_sadd_si): Ditto.
21170 (*cmp_sadd_sidi): Ditto.
21171 (*cmp_ssub_di): Ditto.
21172 (*cmp_ssub_si): Ditto.
21173 (*cmp_ssub_sidi): Ditto.
21174 * config/alpha/predicates.md (const23_operand): New predicate.
21175 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21176 Look for ASHIFT, not MULT inner operand.
21177 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21179 2018-01-04 Martin Liska <mliska@suse.cz>
21181 PR gcov-profile/83669
21182 * gcov.c (output_intermediate_file): Add version to intermediate
21184 * doc/gcov.texi: Document new field 'version' in intermediate
21185 file format. Fix location of '-k' option of gcov command.
21187 2018-01-04 Martin Liska <mliska@suse.cz>
21190 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21192 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21194 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21196 2018-01-03 Martin Sebor <msebor@redhat.com>
21198 PR tree-optimization/83655
21199 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21200 checking calls with invalid arguments.
21202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21204 * tree-vect-stmts.c (vect_get_store_rhs): New function.
21205 (vectorizable_mask_load_store): Delete.
21206 (vectorizable_call): Return false for masked loads and stores.
21207 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
21208 instead of gimple_assign_rhs1.
21209 (vectorizable_load): Handle IFN_MASK_LOAD.
21210 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21214 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21216 (vectorizable_mask_load_store): ...here.
21217 (vectorizable_load): ...and here.
21219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21221 * tree-vect-stmts.c (vect_build_all_ones_mask)
21222 (vect_build_zero_merge_argument): New functions, split out from...
21223 (vectorizable_load): ...here.
21225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21227 * tree-vect-stmts.c (vect_check_store_rhs): New function,
21229 (vectorizable_mask_load_store): ...here.
21230 (vectorizable_store): ...and here.
21232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21234 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21236 (vectorizable_mask_load_store): ...here.
21238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21240 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21241 (vect_model_store_cost): Take a vec_load_store_type instead of a
21243 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21244 (vect_model_store_cost): Take a vec_load_store_type instead of a
21246 (vectorizable_mask_load_store): Update accordingly.
21247 (vectorizable_store): Likewise.
21248 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21252 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21253 IFN_MASK_LOAD calls here rather than...
21254 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21257 Alan Hayward <alan.hayward@arm.com>
21258 David Sherwood <david.sherwood@arm.com>
21260 * expmed.c (extract_bit_field_1): For vector extracts,
21261 fall back to extract_bit_field_as_subreg if vec_extract
21264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21265 Alan Hayward <alan.hayward@arm.com>
21266 David Sherwood <david.sherwood@arm.com>
21268 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21269 they are variable or constant sized.
21270 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21271 slots for constant-sized data.
21273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21274 Alan Hayward <alan.hayward@arm.com>
21275 David Sherwood <david.sherwood@arm.com>
21277 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21278 handling COND_EXPRs with boolean comparisons, try to find a better
21279 basis for the mask type than the boolean itself.
21281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21283 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21284 is calculated and how it can be overridden.
21285 * genmodes.c (max_bitsize_mode_any_mode): New variable.
21286 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21288 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21292 Alan Hayward <alan.hayward@arm.com>
21293 David Sherwood <david.sherwood@arm.com>
21295 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21296 Remove the mode argument.
21297 (aarch64_simd_valid_immediate): Remove the mode and inverse
21299 * config/aarch64/iterators.md (bitsize): New iterator.
21300 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21301 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21302 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21303 aarch64_simd_valid_immediate.
21304 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21305 (aarch64_reg_or_bic_imm): Likewise.
21306 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21307 with an insn_type enum and msl with a modifier_type enum.
21308 Replace element_width with a scalar_mode. Change the shift
21309 to unsigned int. Add constructors for scalar_float_mode and
21310 scalar_int_mode elements.
21311 (aarch64_vect_float_const_representable_p): Delete.
21312 (aarch64_can_const_movi_rtx_p)
21313 (aarch64_simd_scalar_immediate_valid_for_move)
21314 (aarch64_simd_make_constant): Update call to
21315 aarch64_simd_valid_immediate.
21316 (aarch64_advsimd_valid_immediate_hs): New function.
21317 (aarch64_advsimd_valid_immediate): Likewise.
21318 (aarch64_simd_valid_immediate): Remove mode and inverse
21319 arguments. Rewrite to use the above. Use const_vec_duplicate_p
21320 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21321 and aarch64_float_const_representable_p on the result.
21322 (aarch64_output_simd_mov_immediate): Remove mode argument.
21323 Update call to aarch64_simd_valid_immediate and use of
21324 simd_immediate_info.
21325 (aarch64_output_scalar_simd_mov_immediate): Update call
21328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21329 Alan Hayward <alan.hayward@arm.com>
21330 David Sherwood <david.sherwood@arm.com>
21332 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21333 (mode_nunits): Likewise CONST_MODE_NUNITS.
21334 * machmode.def (ADJUST_NUNITS): Document.
21335 * genmodes.c (mode_data::need_nunits_adj): New field.
21336 (blank_mode): Update accordingly.
21337 (adj_nunits): New variable.
21338 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21340 (emit_mode_size_inline): Set need_bytesize_adj for all modes
21341 listed in adj_nunits.
21342 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21343 listed in adj_nunits. Don't emit case statements for such modes.
21344 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21345 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
21346 nothing if adj_nunits is nonnull.
21347 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21348 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21349 (emit_mode_fbit): Update use of print_maybe_const_decl.
21350 (emit_move_size): Likewise. Treat the array as non-const
21352 (emit_mode_adjustments): Handle adj_nunits.
21354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21356 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21357 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21358 (VECTOR_MODES): Use it.
21359 (make_vector_modes): Take the prefix as an argument.
21361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21362 Alan Hayward <alan.hayward@arm.com>
21363 David Sherwood <david.sherwood@arm.com>
21365 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21366 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21367 for MODE_VECTOR_BOOL.
21368 * machmode.def (VECTOR_BOOL_MODE): Document.
21369 * genmodes.c (VECTOR_BOOL_MODE): New macro.
21370 (make_vector_bool_mode): New function.
21371 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21373 * lto-streamer-in.c (lto_input_mode_table): Likewise.
21374 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21376 * stor-layout.c (int_mode_for_mode): Likewise.
21377 * tree.c (build_vector_type_for_mode): Likewise.
21378 * varasm.c (output_constant_pool_2): Likewise.
21379 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21380 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
21381 for MODE_VECTOR_BOOL.
21382 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21383 of mode class checks.
21384 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21385 instead of a list of mode class checks.
21386 (expand_vector_scalar_condition): Likewise.
21387 (type_for_widest_vector_mode): Handle BImode as an inner mode.
21389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21390 Alan Hayward <alan.hayward@arm.com>
21391 David Sherwood <david.sherwood@arm.com>
21393 * machmode.h (mode_size): Change from unsigned short to
21395 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21396 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21397 or if measurement_type is not polynomial.
21398 (fixed_size_mode::includes_p): Check for constant-sized modes.
21399 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21400 return a poly_uint16 rather than an unsigned short.
21401 (emit_mode_size): Change the type of mode_size from unsigned short
21402 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
21403 (emit_mode_adjustments): Cope with polynomial vector sizes.
21404 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21406 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21408 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21409 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21410 * caller-save.c (setup_save_areas): Likewise.
21411 (replace_reg_with_saved_mem): Likewise.
21412 * calls.c (emit_library_call_value_1): Likewise.
21413 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21414 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21415 (gen_lowpart_for_combine): Likewise.
21416 * convert.c (convert_to_integer_1): Likewise.
21417 * cse.c (equiv_constant, cse_insn): Likewise.
21418 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21419 (cselib_subst_to_values): Likewise.
21420 * dce.c (word_dce_process_block): Likewise.
21421 * df-problems.c (df_word_lr_mark_ref): Likewise.
21422 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21423 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21424 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21425 (rtl_for_decl_location): Likewise.
21426 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21427 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21428 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21429 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21430 (expand_expr_real_1): Likewise.
21431 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21432 (pad_below): Likewise.
21433 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21434 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21435 * ira.c (get_subreg_tracking_sizes): Likewise.
21436 * ira-build.c (ira_create_allocno_objects): Likewise.
21437 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21438 (ira_sort_regnos_for_alter_reg): Likewise.
21439 * ira-costs.c (record_operand_costs): Likewise.
21440 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21441 (resolve_simple_move): Likewise.
21442 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21443 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21444 (lra_constraints): Likewise.
21445 (CONST_POOL_OK_P): Reject variable-sized modes.
21446 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21447 (add_pseudo_to_slot, lra_spill): Likewise.
21448 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21449 * optabs-query.c (get_best_extraction_insn): Likewise.
21450 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21451 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21452 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21453 * recog.c (offsettable_address_addr_space_p): Likewise.
21454 * regcprop.c (maybe_mode_change): Likewise.
21455 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21456 * regrename.c (build_def_use): Likewise.
21457 * regstat.c (dump_reg_info): Likewise.
21458 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21459 (find_reloads, find_reloads_subreg_address): Likewise.
21460 * reload1.c (eliminate_regs_1): Likewise.
21461 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21462 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21463 (simplify_binary_operation_1, simplify_subreg): Likewise.
21464 * targhooks.c (default_function_arg_padding): Likewise.
21465 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21466 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21467 (verify_gimple_assign_ternary): Likewise.
21468 * tree-inline.c (estimate_move_cost): Likewise.
21469 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21470 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21471 (get_address_cost_ainc): Likewise.
21472 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21473 (vect_supportable_dr_alignment): Likewise.
21474 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21475 (vectorizable_reduction): Likewise.
21476 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21477 (vectorizable_operation, vectorizable_load): Likewise.
21478 * tree.c (build_same_sized_truth_vector_type): Likewise.
21479 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21480 * var-tracking.c (emit_note_insn_var_location): Likewise.
21481 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21482 (ADDR_VEC_ALIGN): Likewise.
21484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21485 Alan Hayward <alan.hayward@arm.com>
21486 David Sherwood <david.sherwood@arm.com>
21488 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21490 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21491 or if measurement_type is polynomial.
21492 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21493 * combine.c (make_extraction): Likewise.
21494 * dse.c (find_shift_sequence): Likewise.
21495 * dwarf2out.c (mem_loc_descriptor): Likewise.
21496 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21497 (extract_bit_field, extract_low_bits): Likewise.
21498 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21499 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21500 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21501 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21502 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21503 * reload.c (find_reloads): Likewise.
21504 * reload1.c (alter_reg): Likewise.
21505 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21506 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21507 * tree-if-conv.c (predicate_mem_writes): Likewise.
21508 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21509 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21510 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21511 * valtrack.c (dead_debug_insert_temp): Likewise.
21512 * varasm.c (mergeable_constant_section): Likewise.
21513 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21516 Alan Hayward <alan.hayward@arm.com>
21517 David Sherwood <david.sherwood@arm.com>
21519 * expr.c (expand_assignment): Cope with polynomial mode sizes
21520 when assigning to a CONCAT.
21522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21523 Alan Hayward <alan.hayward@arm.com>
21524 David Sherwood <david.sherwood@arm.com>
21526 * machmode.h (mode_precision): Change from unsigned short to
21528 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21530 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21531 or if measurement_type is not polynomial.
21532 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21533 in which the mode is already known to be a scalar_int_mode.
21534 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21535 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21537 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21538 for GET_MODE_PRECISION.
21539 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21540 for GET_MODE_PRECISION.
21541 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21543 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21544 (expand_field_assignment, make_extraction): Likewise.
21545 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21546 (get_last_value): Likewise.
21547 * convert.c (convert_to_integer_1): Likewise.
21548 * cse.c (cse_insn): Likewise.
21549 * expr.c (expand_expr_real_1): Likewise.
21550 * lra-constraints.c (simplify_operand_subreg): Likewise.
21551 * optabs-query.c (can_atomic_load_p): Likewise.
21552 * optabs.c (expand_atomic_load): Likewise.
21553 (expand_atomic_store): Likewise.
21554 * ree.c (combine_reaching_defs): Likewise.
21555 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21556 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21557 * tree.h (type_has_mode_precision_p): Likewise.
21558 * ubsan.c (instrument_si_overflow): Likewise.
21560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21561 Alan Hayward <alan.hayward@arm.com>
21562 David Sherwood <david.sherwood@arm.com>
21564 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21565 polynomial numbers of units.
21566 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21567 (valid_vector_subparts_p): New function.
21568 (build_vector_type): Remove temporary shim and take the number
21569 of units as a poly_uint64 rather than an int.
21570 (build_opaque_vector_type): Take the number of units as a
21571 poly_uint64 rather than an int.
21572 * tree.c (build_vector_from_ctor): Handle polynomial
21573 TYPE_VECTOR_SUBPARTS.
21574 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21575 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21576 (build_vector_from_val): If the number of units is variable,
21577 use build_vec_duplicate_cst for constant operands and
21578 VEC_DUPLICATE_EXPR otherwise.
21579 (make_vector_type): Remove temporary is_constant ().
21580 (build_vector_type, build_opaque_vector_type): Take the number of
21581 units as a poly_uint64 rather than an int.
21582 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21584 * cfgexpand.c (expand_debug_expr): Likewise.
21585 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21586 (store_constructor, expand_expr_real_1): Likewise.
21587 (const_scalar_mask_from_tree): Likewise.
21588 * fold-const-call.c (fold_const_reduction): Likewise.
21589 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21590 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21591 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21592 (fold_relational_const): Likewise.
21593 (native_interpret_vector): Likewise. Change the size from an
21594 int to an unsigned int.
21595 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21596 TYPE_VECTOR_SUBPARTS.
21597 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21598 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21599 duplicating a non-constant operand into a variable-length vector.
21600 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21601 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21602 * ipa-icf.c (sem_variable::equals): Likewise.
21603 * match.pd: Likewise.
21604 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21605 * print-tree.c (print_node): Likewise.
21606 * stor-layout.c (layout_type): Likewise.
21607 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21608 * tree-cfg.c (verify_gimple_comparison): Likewise.
21609 (verify_gimple_assign_binary): Likewise.
21610 (verify_gimple_assign_ternary): Likewise.
21611 (verify_gimple_assign_single): Likewise.
21612 * tree-pretty-print.c (dump_generic_node): Likewise.
21613 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21614 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21615 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21616 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21617 (vect_shift_permute_load_chain): Likewise.
21618 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21619 (expand_vector_condition, optimize_vector_constructor): Likewise.
21620 (lower_vec_perm, get_compute_type): Likewise.
21621 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21622 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21623 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21624 (vect_recog_mask_conversion_pattern): Likewise.
21625 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21626 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21627 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21628 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21629 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21630 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21631 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21632 (supportable_widening_operation): Likewise.
21633 (supportable_narrowing_operation): Likewise.
21634 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21636 * varasm.c (output_constant): Likewise.
21638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21639 Alan Hayward <alan.hayward@arm.com>
21640 David Sherwood <david.sherwood@arm.com>
21642 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21643 so that both the length == 3 and length != 3 cases set up their
21644 own permute vectors. Add comments explaining why we know the
21645 number of elements is constant.
21646 (vect_permute_load_chain): Likewise.
21648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21649 Alan Hayward <alan.hayward@arm.com>
21650 David Sherwood <david.sherwood@arm.com>
21652 * machmode.h (mode_nunits): Change from unsigned char to
21654 (ONLY_FIXED_SIZE_MODES): New macro.
21655 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21656 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21657 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21659 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21660 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21661 or if measurement_type is not polynomial.
21662 * genmodes.c (ZERO_COEFFS): New macro.
21663 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21665 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21666 Use ZERO_COEFFS when emitting initializers.
21667 * data-streamer.h (bp_pack_poly_value): New function.
21668 (bp_unpack_poly_value): Likewise.
21669 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21670 for GET_MODE_NUNITS.
21671 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21672 for GET_MODE_NUNITS.
21673 * tree.c (make_vector_type): Remove temporary shim and make
21674 the real function take the number of units as a poly_uint64
21675 rather than an int.
21676 (build_vector_type_for_mode): Handle polynomial nunits.
21677 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21678 * emit-rtl.c (const_vec_series_p_1): Likewise.
21679 (gen_rtx_CONST_VECTOR): Likewise.
21680 * fold-const.c (test_vec_duplicate_folding): Likewise.
21681 * genrecog.c (validate_pattern): Likewise.
21682 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21683 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21684 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21685 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21686 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21687 * rtlanal.c (subreg_get_info): Likewise.
21688 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21689 (vect_grouped_load_supported): Likewise.
21690 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21691 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21692 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21693 (simplify_const_unary_operation, simplify_binary_operation_1)
21694 (simplify_const_binary_operation, simplify_ternary_operation)
21695 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21696 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21697 instead of CONST_VECTOR_NUNITS.
21698 * varasm.c (output_constant_pool_2): Likewise.
21699 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21700 explicit-encoded elements in the XVEC for variable-length vectors.
21702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21704 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21707 Alan Hayward <alan.hayward@arm.com>
21708 David Sherwood <david.sherwood@arm.com>
21710 * coretypes.h (fixed_size_mode): Declare.
21711 (fixed_size_mode_pod): New typedef.
21712 * builtins.h (target_builtins::x_apply_args_mode)
21713 (target_builtins::x_apply_result_mode): Change type to
21714 fixed_size_mode_pod.
21715 * builtins.c (apply_args_size, apply_result_size, result_vector)
21716 (expand_builtin_apply_args_1, expand_builtin_apply)
21717 (expand_builtin_return): Update accordingly.
21719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21721 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21722 * cselib.c (cselib_hash_rtx): Likewise.
21723 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21724 CONST_VECTOR encoding.
21726 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21727 Jeff Law <law@redhat.com>
21730 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21731 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21732 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21733 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21736 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21737 explicitly probe *sp in a noreturn function if there were any callee
21738 register saves or frame pointer is needed.
21740 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21743 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21744 BLKmode for ternary, binary or unary expressions.
21747 * var-tracking.c (delete_vta_debug_insn): New inline function.
21748 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21749 insns from get_insns () to NULL instead of each bb separately.
21750 Use delete_vta_debug_insn. No longer static.
21751 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21752 delete_vta_debug_insns callers.
21753 * rtl.h (delete_vta_debug_insns): Declare.
21754 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21755 instead of variable_tracking_main.
21757 2018-01-03 Martin Sebor <msebor@redhat.com>
21759 PR tree-optimization/83603
21760 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21761 arguments past the endof the argument list in functions declared
21762 without a prototype.
21763 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21764 Avoid checking when arguments are null.
21766 2018-01-03 Martin Sebor <msebor@redhat.com>
21769 * doc/extend.texi (attribute const): Fix a typo.
21770 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21771 issuing -Wsuggest-attribute for void functions.
21773 2018-01-03 Martin Sebor <msebor@redhat.com>
21775 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21776 offset_int::from instead of wide_int::to_shwi.
21777 (maybe_diag_overlap): Remove assertion.
21778 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21779 * gimple-ssa-sprintf.c (format_directive): Same.
21780 (parse_directive): Same.
21781 (sprintf_dom_walker::compute_format_length): Same.
21782 (try_substitute_return_value): Same.
21784 2018-01-03 Jeff Law <law@redhat.com>
21786 PR middle-end/83654
21787 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21788 non-constant residual for zero at runtime and avoid probing in
21789 that case. Reorganize code for trailing problem to mirror handling
21792 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21794 PR tree-optimization/83501
21795 * tree-ssa-strlen.c (get_string_cst): New.
21796 (handle_char_store): Call get_string_cst.
21798 2018-01-03 Martin Liska <mliska@suse.cz>
21800 PR tree-optimization/83593
21801 * tree-ssa-strlen.c: Include tree-cfg.h.
21802 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21803 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21804 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21806 (strlen_dom_walker::before_dom_children): Call
21807 gimple_purge_dead_eh_edges. Dump tranformation with details
21809 (strlen_dom_walker::before_dom_children): Update call by adding
21810 new argument cleanup_eh.
21811 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21813 2018-01-03 Martin Liska <mliska@suse.cz>
21816 * cif-code.def (VARIADIC_THUNK): New enum value.
21817 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21820 2018-01-03 Jan Beulich <jbeulich@suse.com>
21822 * sse.md (mov<mode>_internal): Tighten condition for when to use
21823 vmovdqu<ssescalarsize> for TI and OI modes.
21825 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21827 Update copyright years.
21829 2018-01-03 Martin Liska <mliska@suse.cz>
21832 * ipa-visibility.c (function_and_variable_visibility): Skip
21833 functions with noipa attribure.
21835 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21837 * gcc.c (process_command): Update copyright notice dates.
21838 * gcov-dump.c (print_version): Ditto.
21839 * gcov.c (print_version): Ditto.
21840 * gcov-tool.c (print_version): Ditto.
21841 * gengtype.c (create_file): Ditto.
21842 * doc/cpp.texi: Bump @copying's copyright year.
21843 * doc/cppinternals.texi: Ditto.
21844 * doc/gcc.texi: Ditto.
21845 * doc/gccint.texi: Ditto.
21846 * doc/gcov.texi: Ditto.
21847 * doc/install.texi: Ditto.
21848 * doc/invoke.texi: Ditto.
21850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21852 * vector-builder.h (vector_builder::m_full_nelts): Change from
21853 unsigned int to poly_uint64.
21854 (vector_builder::full_nelts): Update prototype accordingly.
21855 (vector_builder::new_vector): Likewise.
21856 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21857 (vector_builder::operator ==): Likewise.
21858 (vector_builder::finalize): Likewise.
21859 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21860 Take the number of elements as a poly_uint64 rather than an
21862 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21863 from unsigned int to poly_uint64.
21864 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21865 (vec_perm_indices::new_vector): Likewise.
21866 (vec_perm_indices::length): Likewise.
21867 (vec_perm_indices::nelts_per_input): Likewise.
21868 (vec_perm_indices::input_nelts): Likewise.
21869 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21870 number of elements per input as a poly_uint64 rather than an
21871 unsigned int. Use the original encoding for variable-length
21872 vectors, rather than clamping each individual element.
21873 For the second and subsequent elements in each pattern,
21874 clamp the step and base before clamping their sum.
21875 (vec_perm_indices::series_p): Handle polynomial element counts.
21876 (vec_perm_indices::all_in_range_p): Likewise.
21877 (vec_perm_indices_to_tree): Likewise.
21878 (vec_perm_indices_to_rtx): Likewise.
21879 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21880 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21881 (tree_vector_builder::new_binary_operation): Handle polynomial
21882 element counts. Return false if we need to know the number
21883 of elements at compile time.
21884 * fold-const.c (fold_vec_perm): Punt if the number of elements
21885 isn't known at compile time.
21887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21889 * vec-perm-indices.h (vec_perm_builder): Change element type
21890 from HOST_WIDE_INT to poly_int64.
21891 (vec_perm_indices::element_type): Update accordingly.
21892 (vec_perm_indices::clamp): Handle polynomial element_types.
21893 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21894 (vec_perm_indices::all_in_range_p): Likewise.
21895 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21897 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21898 polynomial vec_perm_indices element types.
21899 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21900 * fold-const.c (fold_vec_perm): Likewise.
21901 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21902 * tree-vect-generic.c (lower_vec_perm): Likewise.
21903 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21904 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21905 element type to HOST_WIDE_INT.
21907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21908 Alan Hayward <alan.hayward@arm.com>
21909 David Sherwood <david.sherwood@arm.com>
21911 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21912 rather than an int. Use plus_constant.
21913 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21914 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21917 Alan Hayward <alan.hayward@arm.com>
21918 David Sherwood <david.sherwood@arm.com>
21920 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21921 a HOST_WIDE_INT to a poly_int64.
21923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21924 Alan Hayward <alan.hayward@arm.com>
21925 David Sherwood <david.sherwood@arm.com>
21927 * calls.c (load_register_parameters): Cope with polynomial
21928 mode sizes. Require a constant size for BLKmode parameters
21929 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21930 forces a parameter to be padded at the lsb end in order to
21931 fill a complete number of words, require the parameter size
21932 to be ordered wrt UNITS_PER_WORD.
21934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21935 Alan Hayward <alan.hayward@arm.com>
21936 David Sherwood <david.sherwood@arm.com>
21938 * reload1.c (spill_stack_slot_width): Change element type
21939 from unsigned int to poly_uint64_pod.
21940 (alter_reg): Treat mode sizes as polynomial.
21942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21943 Alan Hayward <alan.hayward@arm.com>
21944 David Sherwood <david.sherwood@arm.com>
21946 * reload.c (complex_word_subreg_p): New function.
21947 (reload_inner_reg_of_subreg, push_reload): Use it.
21949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21950 Alan Hayward <alan.hayward@arm.com>
21951 David Sherwood <david.sherwood@arm.com>
21953 * lra-constraints.c (process_alt_operands): Reject matched
21954 operands whose sizes aren't ordered.
21955 (match_reload): Refer to this check here.
21957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21958 Alan Hayward <alan.hayward@arm.com>
21959 David Sherwood <david.sherwood@arm.com>
21961 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21962 that the mode size is in the set {1, 2, 4, 8, 16}.
21964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21965 Alan Hayward <alan.hayward@arm.com>
21966 David Sherwood <david.sherwood@arm.com>
21968 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21969 Use plus_constant instead of gen_rtx_PLUS.
21971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21972 Alan Hayward <alan.hayward@arm.com>
21973 David Sherwood <david.sherwood@arm.com>
21975 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21976 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21977 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21978 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21979 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21980 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21981 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21982 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21983 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21984 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21986 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21987 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21988 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21989 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21990 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21991 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21992 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21993 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21994 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21995 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21997 * expr.c (emit_move_resolve_push): Treat the input and result
21998 of PUSH_ROUNDING as a poly_int64.
21999 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22000 (emit_push_insn): Likewise.
22001 * lra-eliminations.c (mark_not_eliminable): Likewise.
22002 * recog.c (push_operand): Likewise.
22003 * reload1.c (elimination_effects): Likewise.
22004 * rtlanal.c (nonzero_bits1): Likewise.
22005 * calls.c (store_one_arg): Likewise. Require the padding to be
22006 known at compile time.
22008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22009 Alan Hayward <alan.hayward@arm.com>
22010 David Sherwood <david.sherwood@arm.com>
22012 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22013 Use plus_constant instead of gen_rtx_PLUS.
22015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22016 Alan Hayward <alan.hayward@arm.com>
22017 David Sherwood <david.sherwood@arm.com>
22019 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22020 rather than an int.
22022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22023 Alan Hayward <alan.hayward@arm.com>
22024 David Sherwood <david.sherwood@arm.com>
22026 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22027 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22028 via stack temporaries. Treat the mode size as polynomial too.
22030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22031 Alan Hayward <alan.hayward@arm.com>
22032 David Sherwood <david.sherwood@arm.com>
22034 * expr.c (expand_expr_real_2): When handling conversions involving
22035 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22036 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
22037 as a poly_uint64 too.
22039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22040 Alan Hayward <alan.hayward@arm.com>
22041 David Sherwood <david.sherwood@arm.com>
22043 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22046 Alan Hayward <alan.hayward@arm.com>
22047 David Sherwood <david.sherwood@arm.com>
22049 * combine.c (can_change_dest_mode): Handle polynomial
22050 REGMODE_NATURAL_SIZE.
22051 * expmed.c (store_bit_field_1): Likewise.
22052 * expr.c (store_constructor): Likewise.
22053 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22054 and polynomial REGMODE_NATURAL_SIZE.
22055 (gen_lowpart_common): Likewise.
22056 * reginfo.c (record_subregs_of_mode): Likewise.
22057 * rtlanal.c (read_modify_subreg_p): Likewise.
22059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22060 Alan Hayward <alan.hayward@arm.com>
22061 David Sherwood <david.sherwood@arm.com>
22063 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22064 numbers of elements.
22066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22067 Alan Hayward <alan.hayward@arm.com>
22068 David Sherwood <david.sherwood@arm.com>
22070 * match.pd: Cope with polynomial numbers of vector elements.
22072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22073 Alan Hayward <alan.hayward@arm.com>
22074 David Sherwood <david.sherwood@arm.com>
22076 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22077 in a POINTER_PLUS_EXPR.
22079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22080 Alan Hayward <alan.hayward@arm.com>
22081 David Sherwood <david.sherwood@arm.com>
22083 * omp-simd-clone.c (simd_clone_subparts): New function.
22084 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22085 (ipa_simd_modify_function_body): Likewise.
22087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22088 Alan Hayward <alan.hayward@arm.com>
22089 David Sherwood <david.sherwood@arm.com>
22091 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22092 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22093 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22094 (expand_vector_condition, vector_element): Likewise.
22095 (subparts_gt): New function.
22096 (get_compute_type): Use subparts_gt.
22097 (count_type_subparts): Delete.
22098 (expand_vector_operations_1): Use subparts_gt instead of
22099 count_type_subparts.
22101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22102 Alan Hayward <alan.hayward@arm.com>
22103 David Sherwood <david.sherwood@arm.com>
22105 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22106 (vect_compile_time_alias): ...this new function. Do the calculation
22107 on poly_ints rather than trees.
22108 (vect_prune_runtime_alias_test_list): Update call accordingly.
22110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22111 Alan Hayward <alan.hayward@arm.com>
22112 David Sherwood <david.sherwood@arm.com>
22114 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22116 (vect_schedule_slp_instance): Likewise.
22118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22119 Alan Hayward <alan.hayward@arm.com>
22120 David Sherwood <david.sherwood@arm.com>
22122 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22123 constant and extern definitions for variable-length vectors.
22124 (vect_get_constant_vectors): Note that the number of units
22125 is known to be constant.
22127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22128 Alan Hayward <alan.hayward@arm.com>
22129 David Sherwood <david.sherwood@arm.com>
22131 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22132 of units as polynomial. Choose between WIDE and NARROW based
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 * tree-vect-stmts.c (simd_clone_subparts): New function.
22140 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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 * tree-vect-stmts.c (vectorizable_call): Treat the number of
22147 vectors as polynomial. Use build_index_vector for
22148 IFN_GOMP_SIMD_LANE.
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-stmts.c (get_load_store_type): Treat the number of
22155 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22156 for variable-length vectors.
22157 (vectorizable_mask_load_store): Treat the number of units as
22158 polynomial, asserting that it is constant if the condition has
22159 already been enforced.
22160 (vectorizable_store, vectorizable_load): Likewise.
22162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22163 Alan Hayward <alan.hayward@arm.com>
22164 David Sherwood <david.sherwood@arm.com>
22166 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22167 of units as polynomial. Punt if we can't tell at compile time
22168 which vector contains the final result.
22170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22171 Alan Hayward <alan.hayward@arm.com>
22172 David Sherwood <david.sherwood@arm.com>
22174 * tree-vect-loop.c (vectorizable_induction): Treat the number
22175 of units as polynomial. Punt on SLP inductions. Use an integer
22176 VEC_SERIES_EXPR for variable-length integer reductions. Use a
22177 cast of such a series for variable-length floating-point
22180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22181 Alan Hayward <alan.hayward@arm.com>
22182 David Sherwood <david.sherwood@arm.com>
22184 * tree.h (build_index_vector): Declare.
22185 * tree.c (build_index_vector): New function.
22186 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22187 of units as polynomial, forcibly converting it to a constant if
22188 vectorizable_reduction has already enforced the condition.
22189 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
22190 to create a {1,2,3,...} vector.
22191 (vectorizable_reduction): Treat the number of units as polynomial.
22192 Choose vectype_in based on the largest scalar element size rather
22193 than the smallest number of units. Enforce the restrictions
22196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22197 Alan Hayward <alan.hayward@arm.com>
22198 David Sherwood <david.sherwood@arm.com>
22200 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22201 number of units as polynomial.
22203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22204 Alan Hayward <alan.hayward@arm.com>
22205 David Sherwood <david.sherwood@arm.com>
22207 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22208 * target.def (autovectorize_vector_sizes): Return the vector sizes
22209 by pointer, using vector_sizes rather than a bitmask.
22210 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22211 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22212 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22214 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22215 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22216 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22217 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22218 * omp-general.c (omp_max_vf): Likewise.
22219 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22220 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22221 * tree-vect-loop.c (vect_analyze_loop): Likewise.
22222 * tree-vect-slp.c (vect_slp_bb): Likewise.
22223 * doc/tm.texi: Regenerate.
22224 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22226 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22227 the vector size as a poly_uint64 rather than an unsigned int.
22228 (current_vector_size): Change from an unsigned int to a poly_uint64.
22229 (get_vectype_for_scalar_type): Update accordingly.
22230 * tree.h (build_truth_vector_type): Take the size and number of
22231 units as a poly_uint64 rather than an unsigned int.
22232 (build_vector_type): Add a temporary overload that takes
22233 the number of units as a poly_uint64 rather than an unsigned int.
22234 * tree.c (make_vector_type): Likewise.
22235 (build_truth_vector_type): Take the number of units as a poly_uint64
22236 rather than an unsigned int.
22238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22239 Alan Hayward <alan.hayward@arm.com>
22240 David Sherwood <david.sherwood@arm.com>
22242 * target.def (get_mask_mode): Take the number of units and length
22243 as poly_uint64s rather than unsigned ints.
22244 * targhooks.h (default_get_mask_mode): Update accordingly.
22245 * targhooks.c (default_get_mask_mode): Likewise.
22246 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22247 * doc/tm.texi: Regenerate.
22249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22250 Alan Hayward <alan.hayward@arm.com>
22251 David Sherwood <david.sherwood@arm.com>
22253 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22254 * omp-general.c (omp_max_vf): Likewise.
22255 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22256 (expand_omp_simd): Handle polynomial safelen.
22257 * omp-low.c (omplow_simd_context): Add a default constructor.
22258 (omplow_simd_context::max_vf): Change from int to poly_uint64.
22259 (lower_rec_simd_input_clauses): Update accordingly.
22260 (lower_rec_input_clauses): Likewise.
22262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22263 Alan Hayward <alan.hayward@arm.com>
22264 David Sherwood <david.sherwood@arm.com>
22266 * tree-vectorizer.h (vect_nunits_for_cost): New function.
22267 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22268 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22269 (vect_analyze_slp_cost): Likewise.
22270 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22271 (vect_model_load_cost): Likewise.
22273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22274 Alan Hayward <alan.hayward@arm.com>
22275 David Sherwood <david.sherwood@arm.com>
22277 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22278 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22279 from an unsigned int * to a poly_uint64_pod *.
22280 (calculate_unrolling_factor): New function.
22281 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
22283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22284 Alan Hayward <alan.hayward@arm.com>
22285 David Sherwood <david.sherwood@arm.com>
22287 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22288 from an unsigned int to a poly_uint64.
22289 (_loop_vec_info::slp_unrolling_factor): Likewise.
22290 (_loop_vec_info::vectorization_factor): Change from an int
22292 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22293 (vect_get_num_vectors): New function.
22294 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22295 (vect_get_num_copies): Use vect_get_num_vectors.
22296 (vect_analyze_data_ref_dependences): Change max_vf from an int *
22297 to an unsigned int *.
22298 (vect_analyze_data_refs): Change min_vf from an int * to a
22300 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22301 than an unsigned HOST_WIDE_INT.
22302 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22303 (vect_analyze_data_ref_dependence): Change max_vf from an int *
22304 to an unsigned int *.
22305 (vect_analyze_data_ref_dependences): Likewise.
22306 (vect_compute_data_ref_alignment): Handle polynomial vf.
22307 (vect_enhance_data_refs_alignment): Likewise.
22308 (vect_prune_runtime_alias_test_list): Likewise.
22309 (vect_shift_permute_load_chain): Likewise.
22310 (vect_supportable_dr_alignment): Likewise.
22311 (dependence_distance_ge_vf): Take the vectorization factor as a
22312 poly_uint64 rather than an unsigned HOST_WIDE_INT.
22313 (vect_analyze_data_refs): Change min_vf from an int * to a
22315 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22316 vfm1 as a poly_uint64 rather than an int. Make the same change
22317 for the returned bound_scalar.
22318 (vect_gen_vector_loop_niters): Handle polynomial vf.
22319 (vect_do_peeling): Likewise. Update call to
22320 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22321 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22323 * tree-vect-loop.c (vect_determine_vectorization_factor)
22324 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22325 (vect_get_known_peeling_cost): Likewise.
22326 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22327 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22328 (vect_transform_loop): Likewise. Use the lowest possible VF when
22329 updating the upper bounds of the loop.
22330 (vect_min_worthwhile_factor): Make static. Return an unsigned int
22331 rather than an int.
22332 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22333 polynomial unroll factors.
22334 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22335 (vect_make_slp_decision): Likewise.
22336 (vect_supported_load_permutation_p): Likewise, and polynomial
22338 (vect_analyze_slp_cost): Handle polynomial vf.
22339 (vect_slp_analyze_node_operations): Likewise.
22340 (vect_slp_analyze_bb_1): Likewise.
22341 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22342 than an unsigned HOST_WIDE_INT.
22343 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22344 (vectorizable_load): Handle polynomial vf.
22345 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22347 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22350 Alan Hayward <alan.hayward@arm.com>
22351 David Sherwood <david.sherwood@arm.com>
22353 * match.pd: Handle bit operations involving three constants
22354 and try to fold one pair.
22356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22358 * tree-vect-loop-manip.c: Include gimple-fold.h.
22359 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22360 niters_maybe_zero parameters. Handle other cases besides a step of 1.
22361 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22362 Add a path that uses a step of VF instead of 1, but disable it
22364 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22365 and niters_no_overflow parameters. Update calls to
22366 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22367 Create a new SSA name if the latter choses to use a ste other
22368 than zero, and return it via niters_vector_mult_vf_var.
22369 * tree-vect-loop.c (vect_transform_loop): Update calls to
22370 vect_do_peeling, vect_gen_vector_loop_niters and
22371 slpeel_make_loop_iterate_ntimes.
22372 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22373 (vect_gen_vector_loop_niters): Update declarations after above changes.
22375 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
22377 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22378 128-bit round to integer instructions.
22379 (ceil<mode>2): Likewise.
22380 (btrunc<mode>2): Likewise.
22381 (round<mode>2): Likewise.
22383 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22385 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22386 unaligned VSX load/store on P8/P9.
22387 (expand_block_clear): Allow the use of unaligned VSX
22388 load/store on P8/P9.
22390 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22392 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22394 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22395 swap associated with both a load and a store.
22397 2018-01-02 Andrew Waterman <andrew@sifive.com>
22399 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22400 * config/riscv/riscv.md (clear_cache): Use it.
22402 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
22404 * web.c: Remove out-of-date comment.
22406 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22408 * expr.c (fixup_args_size_notes): Check that any existing
22409 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22410 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22411 (emit_single_push_insn): ...here.
22413 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22415 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22416 (const_vector_encoded_nelts): New function.
22417 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22418 (const_vector_int_elt, const_vector_elt): Declare.
22419 * emit-rtl.c (const_vector_int_elt_1): New function.
22420 (const_vector_elt): Likewise.
22421 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22422 of CONST_VECTOR_ELT.
22424 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22426 * expr.c: Include rtx-vector-builder.h.
22427 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22428 directly on the tree encoding.
22429 (const_vector_from_tree): Likewise.
22430 * optabs.c: Include rtx-vector-builder.h.
22431 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22432 sequence of "u" values.
22433 * vec-perm-indices.c: Include rtx-vector-builder.h.
22434 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22435 directly on the vec_perm_indices encoding.
22437 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22439 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22440 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22441 * rtx-vector-builder.h: New file.
22442 * rtx-vector-builder.c: Likewise.
22443 * rtl.h (rtx_def::u2): Add a const_vector field.
22444 (CONST_VECTOR_NPATTERNS): New macro.
22445 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22446 (CONST_VECTOR_DUPLICATE_P): Likewise.
22447 (CONST_VECTOR_STEPPED_P): Likewise.
22448 (CONST_VECTOR_ENCODED_ELT): Likewise.
22449 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22450 (unwrap_const_vec_duplicate): Likewise.
22451 (const_vec_series_p): Check for a non-duplicated vector encoding.
22452 Say that the function only returns true for integer vectors.
22453 * emit-rtl.c: Include rtx-vector-builder.h.
22454 (gen_const_vec_duplicate_1): Delete.
22455 (gen_const_vector): Call gen_const_vec_duplicate instead of
22456 gen_const_vec_duplicate_1.
22457 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22458 (gen_const_vec_duplicate): Use rtx_vector_builder.
22459 (gen_const_vec_series): Likewise.
22460 (gen_rtx_CONST_VECTOR): Likewise.
22461 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22462 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22463 Build a new vector rather than modifying a CONST_VECTOR in-place.
22464 (handle_special_swappables): Update call accordingly.
22465 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22466 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22467 Build a new vector rather than modifying a CONST_VECTOR in-place.
22468 (handle_special_swappables): Update call accordingly.
22470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22472 * simplify-rtx.c (simplify_const_binary_operation): Use
22473 CONST_VECTOR_ELT instead of XVECEXP.
22475 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22477 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22478 the selector elements to be different from the data elements
22479 if the selector is a VECTOR_CST.
22480 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22481 ssizetype for the selector.
22483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22485 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22486 before testing each element individually.
22487 * tree-vect-generic.c (lower_vec_perm): Likewise.
22489 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22491 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22492 * selftest-run-tests.c (selftest::run_tests): Call it.
22493 * vector-builder.h (vector_builder::operator ==): New function.
22494 (vector_builder::operator !=): Likewise.
22495 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22496 (vec_perm_indices::all_from_input_p): New function.
22497 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22498 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22499 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22500 instead of reading the VECTOR_CST directly. Detect whether both
22501 vector inputs are the same before constructing the vec_perm_indices,
22502 and update the number of inputs argument accordingly. Use the
22503 utility functions added above. Only construct sel2 if we need to.
22505 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22507 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22508 the broadcast of the low byte.
22509 (expand_mult_highpart): Use an explicit encoding for the permutes.
22510 * optabs-query.c (can_mult_highpart_p): Likewise.
22511 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22512 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22513 (vectorizable_bswap): Likewise.
22514 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22515 explicit encoding for the power-of-2 permutes.
22516 (vect_permute_store_chain): Likewise.
22517 (vect_grouped_load_supported): Likewise.
22518 (vect_permute_load_chain): Likewise.
22520 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22522 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22523 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22524 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22525 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22526 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22527 (vect_gen_perm_mask_any): Likewise.
22529 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22531 * int-vector-builder.h: New file.
22532 * vec-perm-indices.h: Include int-vector-builder.h.
22533 (vec_perm_indices): Redefine as an int_vector_builder.
22534 (auto_vec_perm_indices): Delete.
22535 (vec_perm_builder): Redefine as a stand-alone class.
22536 (vec_perm_indices::vec_perm_indices): New function.
22537 (vec_perm_indices::clamp): Likewise.
22538 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22539 (vec_perm_indices::new_vector): New function.
22540 (vec_perm_indices::new_expanded_vector): Update for new
22541 vec_perm_indices class.
22542 (vec_perm_indices::rotate_inputs): New function.
22543 (vec_perm_indices::all_in_range_p): Operate directly on the
22544 encoded form, without computing elided elements.
22545 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22546 encoding. Update for new vec_perm_indices class.
22547 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22548 the given vec_perm_builder.
22549 (expand_vec_perm_var): Update vec_perm_builder constructor.
22550 (expand_mult_highpart): Use vec_perm_builder instead of
22551 auto_vec_perm_indices.
22552 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22553 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22554 or double series encoding as appropriate.
22555 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22556 vec_perm_indices instead of auto_vec_perm_indices.
22557 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22558 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22559 (vect_permute_store_chain): Likewise.
22560 (vect_grouped_load_supported): Likewise.
22561 (vect_permute_load_chain): Likewise.
22562 (vect_shift_permute_load_chain): Likewise.
22563 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22564 (vect_transform_slp_perm_load): Likewise.
22565 (vect_schedule_slp_instance): Likewise.
22566 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22567 (vectorizable_mask_load_store): Likewise.
22568 (vectorizable_bswap): Likewise.
22569 (vectorizable_store): Likewise.
22570 (vectorizable_load): Likewise.
22571 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22572 vec_perm_indices instead of auto_vec_perm_indices. Use
22573 tree_to_vec_perm_builder to read the vector from a tree.
22574 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22575 vec_perm_builder instead of a vec_perm_indices.
22576 (have_whole_vector_shift): Use vec_perm_builder and
22577 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22578 truncation to calc_vec_perm_mask_for_shift.
22579 (vect_create_epilog_for_reduction): Likewise.
22580 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22581 from auto_vec_perm_indices to vec_perm_indices.
22582 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22583 instead of changing individual elements.
22584 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22585 the vector in d.perm.
22586 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22587 from auto_vec_perm_indices to vec_perm_indices.
22588 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22589 instead of changing individual elements.
22590 (arm_vectorize_vec_perm_const): Use new_vector to install
22591 the vector in d.perm.
22592 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22593 Update vec_perm_builder constructor.
22594 (rs6000_expand_interleave): Likewise.
22595 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22596 (rs6000_expand_interleave): Likewise.
22598 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22600 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22601 to qimode could truncate the indices.
22602 * optabs.c (expand_vec_perm_var): Likewise.
22604 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22606 * Makefile.in (OBJS): Add vec-perm-indices.o.
22607 * vec-perm-indices.h: New file.
22608 * vec-perm-indices.c: Likewise.
22609 * target.h (vec_perm_indices): Replace with a forward class
22611 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22612 * optabs.h: Include vec-perm-indices.h.
22613 (expand_vec_perm): Delete.
22614 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22615 (expand_vec_perm_const): Declare.
22616 * target.def (vec_perm_const_ok): Replace with...
22617 (vec_perm_const): ...this new hook.
22618 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22619 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22620 * doc/tm.texi: Regenerate.
22621 * optabs.def (vec_perm_const): Delete.
22622 * doc/md.texi (vec_perm_const): Likewise.
22623 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22624 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22625 expand_vec_perm for constant permutation vectors. Assert that
22626 the mode of variable permutation vectors is the integer equivalent
22627 of the mode that is being permuted.
22628 * optabs-query.h (selector_fits_mode_p): Declare.
22629 * optabs-query.c: Include vec-perm-indices.h.
22630 (selector_fits_mode_p): New function.
22631 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22632 is defined, instead of checking whether the vec_perm_const_optab
22633 exists. Use targetm.vectorize.vec_perm_const instead of
22634 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22635 fit in the vector mode before using a variable permute.
22636 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22637 vec_perm_indices instead of an rtx.
22638 (expand_vec_perm): Replace with...
22639 (expand_vec_perm_const): ...this new function. Take the selector
22640 as a vec_perm_indices rather than an rtx. Also take the mode of
22641 the selector. Update call to shift_amt_for_vec_perm_mask.
22642 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22643 Use vec_perm_indices::new_expanded_vector to expand the original
22644 selector into bytes. Check whether the indices fit in the vector
22645 mode before using a variable permute.
22646 (expand_vec_perm_var): Make global.
22647 (expand_mult_highpart): Use expand_vec_perm_const.
22648 * fold-const.c: Includes vec-perm-indices.h.
22649 * tree-ssa-forwprop.c: Likewise.
22650 * tree-vect-data-refs.c: Likewise.
22651 * tree-vect-generic.c: Likewise.
22652 * tree-vect-loop.c: Likewise.
22653 * tree-vect-slp.c: Likewise.
22654 * tree-vect-stmts.c: Likewise.
22655 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22657 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22658 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22659 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22660 (aarch64_vectorize_vec_perm_const): ...this new function.
22661 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22662 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22663 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22664 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22665 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22666 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22667 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22669 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22670 check for NEON modes.
22671 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22672 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22673 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22674 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22676 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22677 the old VEC_PERM_CONST conditions.
22678 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22679 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22680 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22681 (ia64_vectorize_vec_perm_const_ok): Merge into...
22682 (ia64_vectorize_vec_perm_const): ...this new function.
22683 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22684 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22685 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22686 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22687 * config/mips/mips.c (mips_expand_vec_perm_const)
22688 (mips_vectorize_vec_perm_const_ok): Merge into...
22689 (mips_vectorize_vec_perm_const): ...this new function.
22690 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22691 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22692 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22693 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22694 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22695 (rs6000_expand_vec_perm_const): Delete.
22696 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22698 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22699 (altivec_expand_vec_perm_const_le): Take each operand individually.
22700 Operate on constant selectors rather than rtxes.
22701 (altivec_expand_vec_perm_const): Likewise. Update call to
22702 altivec_expand_vec_perm_const_le.
22703 (rs6000_expand_vec_perm_const): Delete.
22704 (rs6000_vectorize_vec_perm_const_ok): Delete.
22705 (rs6000_vectorize_vec_perm_const): New function.
22706 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22707 an element count and rtx array.
22708 (rs6000_expand_extract_even): Update call accordingly.
22709 (rs6000_expand_interleave): Likewise.
22710 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22711 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22712 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22713 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22714 (rs6000_expand_vec_perm_const): Delete.
22715 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22716 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22717 (altivec_expand_vec_perm_const_le): Take each operand individually.
22718 Operate on constant selectors rather than rtxes.
22719 (altivec_expand_vec_perm_const): Likewise. Update call to
22720 altivec_expand_vec_perm_const_le.
22721 (rs6000_expand_vec_perm_const): Delete.
22722 (rs6000_vectorize_vec_perm_const_ok): Delete.
22723 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22724 reference to the SPE evmerge intructions.
22725 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22726 an element count and rtx array.
22727 (rs6000_expand_extract_even): Update call accordingly.
22728 (rs6000_expand_interleave): Likewise.
22729 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22730 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22732 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22734 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22736 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22737 vector mode and that that mode matches the mode of the data
22739 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22740 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22741 directly using expand_vec_perm_1 when forcing selectors into
22743 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22745 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22747 * optabs-query.h (can_vec_perm_p): Delete.
22748 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22749 * optabs-query.c (can_vec_perm_p): Split into...
22750 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22751 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22752 particular selector is valid.
22753 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22754 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22755 (vect_grouped_load_supported): Likewise.
22756 (vect_shift_permute_load_chain): Likewise.
22757 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22758 (vect_transform_slp_perm_load): Likewise.
22759 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22760 (vectorizable_bswap): Likewise.
22761 (vect_gen_perm_mask_checked): Likewise.
22762 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22763 implementations of variable permutation vectors into account
22764 when deciding which selector to use.
22765 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22766 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22767 with a false third argument.
22768 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22769 to test whether the constant selector is valid and can_vec_perm_var_p
22770 to test whether a variable selector is valid.
22772 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22774 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22775 * optabs-query.c (can_vec_perm_p): Likewise.
22776 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22777 instead of vec_perm_indices.
22778 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22779 (vect_gen_perm_mask_checked): Likewise,
22780 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22781 (vect_gen_perm_mask_checked): Likewise,
22783 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22785 * optabs-query.h (qimode_for_vec_perm): Declare.
22786 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22787 (qimode_for_vec_perm): ...this new function.
22788 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22790 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22792 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22793 does not have a conditional at the top.
22795 2018-01-02 Richard Biener <rguenther@suse.de>
22797 * ipa-inline.c (big_speedup_p): Fix expression.
22799 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22802 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22805 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22809 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22810 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22811 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22812 cond_taken_branch_cost 3->4.
22814 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22816 PR tree-optimization/83581
22817 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22818 TODO_cleanup_cfg if any changes have been made.
22820 PR middle-end/83608
22821 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22822 convert_modes if target mode has the right side, but different mode
22825 PR middle-end/83609
22826 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22827 last argument when extracting from CONCAT. If either from_real or
22828 from_imag is NULL, use expansion through memory. If result is not
22829 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22830 the parts directly to inner mode, if even that fails, use expansion
22833 PR middle-end/83623
22834 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22835 check for bswap in mode rather than HImode and use that in expand_unop
22838 Copyright (C) 2018 Free Software Foundation, Inc.
22840 Copying and distribution of this file, with or without modification,
22841 are permitted in any medium without royalty provided the copyright
22842 notice and this notice are preserved.