1 2018-11-15 Jakub Jelinek <jakub@redhat.com>
3 PR rtl-optimization/88018
4 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
5 on the presence of fallthru edge, rather than if it is a USE or not.
7 2018-11-15 Richard Biener <rguenther@suse.de>
10 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
11 analyze_subscript_affine_affine properly.
13 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
15 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
16 (GLIBC_DYNAMIC_LINKER): Define.
17 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
19 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
21 PR tree-optimization/84648
22 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
23 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
24 by calling adjust_cond_for_loop_until_wrap.
26 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
29 * doc/extend.texi (Common Function Attributes): Clarify linker
30 restrictions on "aligned" attribute.
31 (Common Variable Attributes): Likewise. Mention that linker
32 restrictions don't apply to stack-allocated variables.
34 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
36 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
39 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
43 * doc/invoke.texi (Optimize Options): Remove bad example about
44 interaction between -flto and -O. Replace it with a note that
45 you need to compile with -O and not just link. Copy-edit -flto
46 discussion to reduce verbiage and improve flow.
48 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
51 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
52 also suppress many optimizations. Alphabetize option lists for
53 -O1, -O2, and -Os. Add list of options disabled with -Og, and
54 correct documentation for those options to say that.
55 * opts.c (default_options_table): Sort table by level and option
56 name, to make it easier to correlate to the manual.
58 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
60 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
61 printing of the names of segment registers.
63 2018-11-14 Nathan Sidwell <nathan@acm.org>
67 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
70 2018-11-14 David Malcolm <dmalcolm@redhat.com>
72 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
74 2018-11-14 Jakub Jelinek <jakub@redhat.com>
76 P1236R1 - Signed integers are two's complement
77 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
80 * hash-map.h (hash_map::iterator::reference_pair): New class.
81 (hash_map::iterator::operator*): Return it rather than std::pair.
83 2018-11-14 Jeff Law <law@redhat.com>
85 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
86 iff the operand is a constant.
88 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
90 * gimple-ssa-evrp-analyze.c
91 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
92 ignore_equivs_equal_p to equal_p.
93 * ipa-cp.c (meet_with_1): Use equal_p instead of
94 ignore_equivs_equal_p.
95 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
96 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
97 (value_range::operator==): Remove.
98 (value_range::operator!=): Remove.
99 (vrp_prop::visit_stmt): Use equal_p.
100 * tree-vrp.h (value_range): Remove operator==, operator!=,
101 ignore_equivs_equal_p.
102 * vr-values.c (update_value_range): Use equal_p.
104 2018-11-14 Michael Matz <matz@suse.de>
107 * gimplify.c (collect_fallthrough_labels): Add new argument,
108 return location via that, don't modify statements.
109 (warn_implicit_fallthrough_r): Adjust call, don't use
110 statement location directly.
112 2018-11-14 Richard Biener <rguenther@suse.de>
115 * tree-data-ref.c (split_constant_offset): Add wrapper
116 allocating a cache hash-map.
117 (split_constant_offset_1): Cache results of expanding
118 expressions from SSA def stmts.
120 2018-11-14 Richard Biener <rguenther@suse.de>
123 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
125 (lambda_vector_mult_const): Likewise.
126 (lambda_matrix_right_hermite): Use lambda_int temporaries.
128 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
129 Jackson Woodruff <jackson.woodruff@arm.com>
131 PR 71026/tree-optimization
132 * match.pd: Simplify floating point comparisons.
134 2018-11-14 Jakub Jelinek <jakub@redhat.com>
136 PR rtl-optimization/87817
137 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
138 last argument has low 8 bits clear, fold to 0.
140 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
142 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
143 MAX_OFILE_ALIGNMENT as needed.
145 2018-11-14 Richard Biener <rguenther@suse.de>
147 PR tree-optimization/88019
148 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
149 COND_EXPR arguments to non-trapping overflow.
151 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
153 * config/arc/arc.h (reg_class): Reorder registers classes, remove
154 unused register classes.
155 (REG_CLASS_NAMES): Likewise.
156 (REG_CLASS_CONTENTS): Likewise.
157 (FIXED_REGISTERS): Make lp_count fixed.
158 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
159 (PROGRAM_COUNTER_REGNO): Remove.
160 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
161 register classes, use constants for register numbers, remove
162 reg_class_contents references.
163 (arc_process_double_reg_moves): Add asserts.
164 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
165 lra_in_progress predicate.
166 (arc_init_reg_tables): Remove unused register classes.
167 (arc_register_move_cost): Likewise.
168 (arc_preferred_reload_class): Likewise.
169 (hwloop_optimize): Update rtx patterns involving lp_count register.
170 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
171 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
172 CHEAP_CORE_REGS. Former one will be used for LRA.
173 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
174 one will be used for LRA.
175 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
176 one will be used for LRA.
177 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
178 Former one will be used for LRA.
179 ("f"): Delete constraint.
182 ("l"): Change it from register constraint to constraint.
183 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
184 (movhi_insn): Likewise.
185 (movsi_insn): Update pattern.
188 (stack_tie): Remove 'b' constraint letter.
190 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
191 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
192 (R57_REG, R59_REG, PCL_REG): Likewise.
193 (ILINK1_REGNUM): Renamed to ILINK1_REG.
194 (ILINK2_REGNUM): Renamed to ILINK2_REG.
197 (Rcw): Remove unused reg classes.
198 * config/arc/predicates.md (dest_reg_operand): Just default on
199 register_operand predicate.
200 (mpy_dest_reg_operand): Likewise.
201 (move_dest_operand): Use macros instead of constants.
202 * config/arc/arc.opt (mlra): Switch to lra as default.
204 2018-11-14 Richard Biener <rguenther@suse.de>
206 PR tree-optimization/87974
207 * tree-vect-loop.c (vectorizable_reduction): When computing
208 the vectorized reduction PHI vector type ignore constant
211 2018-11-14 Jakub Jelinek <jakub@redhat.com>
213 PR tree-optimization/87977
214 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
215 stmt, build a new one and replace the old one with it. Formatting fix.
216 Call release_ssa_name (x) if !has_other_use and !delete_div.
217 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
218 verify lhs of stmt is still def.
220 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
222 PR rtl-optimization/87507
223 * lower-subreg.c (operand_for_swap_move_operator): New function.
224 (simple_move): Strip simple operators.
225 (find_pseudo_copy): Likewise.
226 (resolve_operand_for_swap_move_operator): New function.
227 (resolve_simple_move): Strip simple operators and swap operands.
229 2018-11-13 Jakub Jelinek <jakub@redhat.com>
231 PR tree-optimization/87898
232 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
233 (ipa_simd_modify_function_body): Remove debug stmts where the first
234 argument was changed into a non-decl.
236 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
238 PR rtl-optimization/87899
239 * lra-lives.c (start_living): Update white space in comment.
240 (enum point_type): New.
241 (sparseset_contains_pseudos_p): New function.
242 (update_pseudo_point): Likewise.
243 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
244 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
245 handling. Move early exit after adding conflicts.
246 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
247 if regno is already live. Remove all handling of program points.
248 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
249 after adding conflicts. Remove all handling of program points and
250 ignore_reg_for_conflicts.
251 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
252 and do not guard call to mark_pseudo_live.
253 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
254 and do not guard call to mark_pseudo_dead.
255 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
256 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
257 Use new function update_pseudo_point. Handle register copies by
258 removing the source register from the live set. Handle INOUT operands.
259 Update to the next program point using the unused_set, dead_set and
261 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
263 2018-11-13 David Malcolm <dmalcolm@redhat.com>
265 * builtins.c: Replace "source_location" with "location_t".
266 * diagnostic-show-locus.c: Likewise.
267 * diagnostic.c: Likewise.
268 * dumpfile.c: Likewise.
269 * gcc-rich-location.h: Likewise.
270 * genmatch.c: Likewise.
271 * gimple.h: Likewise.
272 * gimplify.c: Likewise.
274 * input.h: Likewise. Eliminate the typedef.
275 * omp-expand.c: Likewise.
276 * selftest.h: Likewise.
277 * substring-locations.h (get_source_location_for_substring):
279 (get_location_within_string): ...this.
280 * tree-cfg.c: Replace "source_location" with "location_t".
281 * tree-cfgcleanup.c: Likewise.
282 * tree-diagnostic.c: Likewise.
283 * tree-into-ssa.c: Likewise.
284 * tree-outof-ssa.c: Likewise.
285 * tree-parloops.c: Likewise.
286 * tree-phinodes.c: Likewise.
287 * tree-phinodes.h: Likewise.
288 * tree-ssa-loop-ivopts.c: Likewise.
289 * tree-ssa-loop-manip.c: Likewise.
290 * tree-ssa-phiopt.c: Likewise.
291 * tree-ssa-phiprop.c: Likewise.
292 * tree-ssa-threadupdate.c: Likewise.
293 * tree-ssa.c: Likewise.
294 * tree-ssa.h: Likewise.
295 * tree-vect-loop-manip.c: Likewise.
297 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
299 * doc/extend.texi: Fix typo in the weakref description.
301 2018-11-13 Richard Biener <rguenther@suse.de>
303 PR tree-optimization/86991
304 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
305 group building until we have successfully detected the SLP
307 (vect_is_simple_reduction): Remove fixup code here.
309 2018-11-13 David Malcolm <dmalcolm@redhat.com>
311 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
312 (dump_gimple_stmt): Use it.
313 (dump_gimple_stmt_loc): Likewise.
314 (dump_gimple_expr): Likewise.
315 (dump_gimple_expr_loc): Likewise.
316 (dump_generic_expr): Likewise.
317 (dump_generic_expr_loc): Likewise.
318 (dump_printf): Likewise.
319 (dump_printf_loc): Likewise.
320 (dump_dec): Likewise.
321 (dump_dec): Likewise.
322 (dump_hex): Likewise.
323 (dump_symtab_node): Likewise.
324 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
325 Guard dump call with dump_enabled_p.
326 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
327 * graphite-optimize-isl.c (optimize_isl): Likewise.
328 * graphite.c (graphite_transform_loops): Likewise.
329 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
330 * tree-parloops.c (parallelize_loops): Likewise.
331 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
332 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
333 (vect_prune_runtime_alias_test_list): Likewise.
334 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
335 (vect_estimate_min_profitable_iters): Likewise.
336 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
337 (vect_build_slp_tree_2): Likewise.
338 (vect_supported_load_permutation_p): Likewise.
339 (vect_slp_analyze_operations): Likewise.
340 (vect_slp_analyze_bb_1): Likewise.
341 (vect_slp_bb): Likewise.
342 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
343 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
344 (pass_slp_vectorize::execute): Likewise.
345 (increase_alignment): Likewise.
347 2018-11-13 David Malcolm <dmalcolm@redhat.com>
350 * ipa-inline.c (report_inline_failed_reason): Guard calls to
351 cl_target_option_print_diff and cl_optimization_print_diff with
354 2018-11-13 David Malcolm <dmalcolm@redhat.com>
356 * doc/invoke.texi (-fsave-optimization-record): Note that the
357 output is compressed.
358 * optinfo-emit-json.cc: Include <zlib.h>.
359 (optrecord_json_writer::write): Compress the output.
361 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
363 * tree-vrp.c (value_range_base::dump): Dump type.
364 Do not use INF nomenclature for 1-bit types.
365 (dump_value_range): Group all variants to common dumping code.
366 (debug): New overloaded functions for value_ranges.
367 (value_range_base::dump): Remove no argument version.
368 (value_range::dump): Same.
370 2018-11-13 Richard Biener <rguenther@suse.de>
372 PR tree-optimization/87931
373 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
374 nested cycles we support to latch computations vectorizable_reduction
377 2018-11-13 Martin Liska <mliska@suse.cz>
379 PR tree-optimization/87885
380 * cfghooks.c (account_profile_record): Rename
382 (profile_record_check_consistency): ... this.
383 Calculate missing num_mismatched_freq_in.
384 (profile_record_account_profile): New function
385 that calculates time and size of a function.
386 * cfghooks.h (struct profile_record): Remove
388 (struct cfg_hooks): Remove after_pass flag.
389 (account_profile_record): Rename to ...
390 (profile_record_check_consistency): ... this.
391 (profile_record_account_profile): New.
392 * cfgrtl.c (rtl_account_profile_record): Remove
394 * passes.c (check_profile_consistency): Do only
396 (account_profile): Calculate size and time of
398 (pass_manager::dump_profile_report): Reformat
400 (execute_one_ipa_transform_pass): Call
401 consistency check before clean upand call account_profile
402 after a clean up is done.
403 (execute_one_pass): Call check_profile_consistency and
404 account_profile instead of using after_pass flag..
405 * tree-cfg.c (gimple_account_profile_record): Likewise.
407 2018-11-13 Martin Liska <mliska@suse.cz>
410 * config/i386/i386.c (ix86_option_override_internal): Error
411 about usage -mabi=ms and -fsanitize={,kernel-}address.
413 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
415 * config/aarch64/aarch64.c
416 (aarch64_vectorize_preferred_vector_alignment): Change return type to
418 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
419 alignment being a poly int.
420 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
421 return type to poly_uint64.
422 * target.def (default_preferred_vector_alignment): Likewise.
423 * targhooks.c (default_preferred_vector_alignment): Likewise.
424 * targhooks.h (default_preferred_vector_alignment): Likewise.
425 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
426 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
428 (vect_update_misalignment_for_peel): Likewise.
429 (vect_enhance_data_refs_alignment): Likewise.
430 (vect_find_same_alignment_drs): Likewise.
431 (vect_duplicate_ssa_name_ptr_info): Likewise.
432 (vect_setup_realignment): Likewise.
433 (vect_can_force_dr_alignment_p): Change alignment parameter type to
435 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
436 mask with a compile time variable vector alignment.
437 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
439 (vect_do_peeling): Exit early if vector alignment is not constant.
440 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
442 (vectorizable_store): Likewise.
443 (vectorizable_load): Likweise.
444 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
446 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
448 (vect_can_force_dr_alignment_p): Change alignment parameter type to
451 2018-11-13 Richard Biener <rguenther@suse.de>
453 PR tree-optimization/87962
454 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
455 detect outer reduction for disqualifying in-loop uses.
457 2018-11-13 Richard Biener <rguenther@suse.de>
459 PR tree-optimization/87967
460 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
461 for constants for the scalar loop.
463 2018-11-13 Alan Modra <amodra@gmail.com>
465 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
466 integer constants when -mcmodel=medium.
468 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
470 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
471 * config/arc/elf.h (PROFILE_HOOK): Define.
472 * config/arc/linux.h (PROFILE_HOOK): Likewise.
474 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
476 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
477 jump table data in the text section.
479 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
481 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
482 to fit the eh_return pattern.
483 * config/arc/arc.md (eh_return): Define.
484 (VUNSPEC_ARC_EH_RETURN): Likewise.
485 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
487 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
490 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
492 * common/config/arc/arc-common.c (arc_option_optimization_table):
493 Millicode optimization is default on for size optimizations.
494 * config/arc/arc-protos.h (arc_check_multi): New function.
495 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
496 (ENTER_LEAVE_START_REG): Define.
497 (ENTER_LEAVE_END_REG): Likewise.
498 (arc_override_options): Disable millicode when long calls option
500 (arc_frame_info): Change it from int to bool.
501 (arc_compute_frame_size): Clean up.
502 (arc_save_restore): Remove.
503 (frame_save_reg): New function.
504 (frame_restore_reg): Likewise.
505 (arc_enter_leave_p): Likewise.
506 (arc_save_callee_saves): Likewise.
507 (arc_restore_callee_saves): Likewise.
508 (arc_save_callee_enter): Likewise.
509 (arc_restore_callee_leave): Likewise.
510 (arc_save_callee_milli): Likewise.
511 (arc_restore_callee_milli): Likewise.
512 (arc_expand_prologue): Reimplement to emit enter/leave
514 (arc_expand_epilogue): Likewise.
515 (arc_check_multi): New function.
516 * config/arc/arc.md (push_multi_fp): New pattern.
517 (push_multi_fp_blink): Likewise.
518 (pop_multi_fp): Likewise.
519 (pop_multi_fp_blink): Likewise.
520 (pop_multi_fp_ret): Likewise.
521 (pop_multi_fp_blink_ret): Likewise.
522 * config/arc/arc.opt (mmillicode): Update option.
523 (mcode-density-frame): New option.
524 * config/arc/predicates.md (push_multi_operand): New predicate.
525 (pop_multi_operand): Likewise.
526 * doc/invoke.texi (ARC): Update ARC options information.
529 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
531 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
532 * config/arc/arc.c (operands_ok_ldd_std): New function.
533 (mem_ok_for_ldd_std): Likewise.
534 (gen_operands_ldd_std): Likewise.
535 * config/arc/arc.md: Add peephole2 rules for std/ldd.
537 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
539 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
540 test on stack_usage_file.
541 (lang_dependent_init): Do not open the .su file if generating LTO.
543 2018-11-13 Jakub Jelinek <jakub@redhat.com>
545 PR rtl-optimization/87918
546 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
547 simplify_gen_relational rather than simplify_gen_binary.
549 2018-11-13 Richard Biener <rguenther@suse.de>
551 * tree-ssanames.h (set_range_info): Use value_range_base.
552 (get_range_info): Likewise.
553 * tree-ssanames.c (set_range_info): Likewise.
554 (get_range_info): Likewise.
555 * tree-vrp.c (value_range_base::union_helper): Split
556 out common parts of value_range[_base]::union_.
557 (value_range_base::union_): Update.
558 (value_range::union_): Likewise.
559 (determine_value_range_1): Use value_range_base.
560 (determine_value_range): Likewise.
561 * tree-vrp.h (value_range_base::union_helper): Move ...
562 (value_range::union_helper): ... from here.
564 2018-11-13 Alan Modra <amodra@gmail.com>
566 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
568 (rs6000_secondary_reload_gpr): Don't call find_replacement.
570 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
573 * doc/invoke.texi (Optimize Options): Clarify that the
574 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
575 apply to data cache size.
577 2018-11-13 Alan Modra <amodra@gmail.com>
579 * config/rs6000/predicates.md (logical_const_operand),
580 (logical_operand): Correct comment.
581 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
583 2018-11-13 Alan Modra <amodra@gmail.com>
585 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
587 2018-11-13 Alan Modra <amodra@gmail.com>
589 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
591 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
592 covered by alternative.
593 (movcc_internal1): Ignore h for register preference.
594 (mov<mode>_hardfloat64): Likewise.
595 (mov<mode>_softfloat): Ignore c, l, h for register preference.
597 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
599 PR preprocessor/47823
600 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
603 * doc/extend.texi (Pragmas): Note additional pragmas documented
606 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
610 * tree-scalar-evolution.c (expression_expensive_p): Make
611 BUILTIN POPCOUNT as expensive when backend does not define it.
613 2018-11-12 Fredrik Noring <noring@nocrew.org>
615 * config.gcc: Update with-llsc defaults for MIPS r5900.
617 2018-11-12 Martin Liska <mliska@suse.cz>
619 PR gcov-profile/87442
620 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
622 * doc/invoke.texi: Document them.
623 * tree-profile.c (parse_profile_filter): New.
624 (parse_profile_file_filtering): Likewise.
625 (release_profile_file_filtering): Likewise.
626 (include_source_file_for_profile): Likewise.
627 (tree_profiling): Filter source files based on the
630 2018-11-12 Martin Liska <mliska@suse.cz>
633 * doc/extend.texi: Add missing values for __builtin_cpu_is and
634 __builtin_cpu_supports for x86 target.
636 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
639 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
641 (Arithmetic): Likewise for "lo_sum".
643 2018-11-12 Renlin Li <renlin.li@arm.com>
646 * dse.c (get_stored_val): Add check for compile-time constantness
649 2018-11-12 Sudakshina Das <sudi.das@arm.com>
651 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
652 (ARMv8_5a): New fgroup.
653 (armv8.5-a): New arch.
654 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
656 * config/arm/arm-tables.opt: Regenerate.
657 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
658 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
659 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
660 Add matching rules for -march=armv8.5-a and extensions.
661 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
662 Add sb and predres to all armv8-a except armv8.5-a.
664 2018-11-12 Richard Biener <rguenther@suse.de>
666 * tree-vrp.h (value_range[_base]::set): Make public. Provide
667 overload for single value.
668 (value_range[_base]::set_nonnull): New.
669 (value_range[_base]::set_null): Likewise.
670 (value_range): Document bitmap copying behavior, mark
671 copy constructor and assignment operator deleted.
672 (value_range::move): New.
673 (value_range::set_and_canonicalize): Default bitmap to zero.
674 (set_value_range_to_nonnull): Remove.
675 (set_value_range_to_null): Likewise.
676 (set_value_range): Likewise.
677 (set_value_range_to_value): Likewise.
678 (extract_range_from_unary_expr): Work on value_range_base.
679 (extract_range_from_binary_expr_1): Likewise. Rename to...
680 (extract_range_from_binary_expr): ... this.
681 * tree-vrp.c (value_range::update): Clear equiv bitmap
683 (value_range::move): New, move equiv bitmap.
684 (value_range_base::set_undefined): Avoid assignment.
685 (value_range::set_undefined): Likewise.
686 (value_range_base::set_varying): Likewise.
687 (value_range::set_varying): Likewise.
688 (set_value_range): Remove.
689 (value_range_base::set): New overload for value.
690 (value_range::set): Likewise.
691 (set_value_range_to_nonnull): Remove.
692 (value_range_base::set_nonnull): New.
693 (value_range::set_nonnull): Likewise.
694 (set_value_range_to_null): Remove.
695 (value_range_base::set_null): New.
696 (value_range::set_null): Likewise.
697 (range_is_null): Work on value_range_base.
698 (range_is_nonnull): Likewise.
699 (ranges_from_anti_range): Likewise.
700 (extract_range_into_wide_ints): Likewise.
701 (extract_range_from_multiplicative_op): Likewise.
702 (extract_range_from_binary_expr): Likewise. Update for API changes.
703 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
705 (value_range::intersect_helper): Avoid copy and assignment.
706 (value_range::union_helper): Likewise.
707 (determine_value_range_1): Adjust.
708 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
709 Avoid assignment by using move.
710 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
711 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
713 * tree-ssanames.c (get_range_info): Likewise.
714 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
715 * vr-values.c (vr_values::get_value_range): Adjust.
716 (vr_values::update_value_range): Likewise.
717 (symbolic_range_based_on_p): Work on value_range_base.
718 (vr_values::extract_range_from_binary_expr): Use value_range_base.
719 (vr_values::extract_range_from_unary_expr): Likewise.
720 (vr_values::extract_range_from_cond_expr): Avoid assignment.
721 (vr_values::extract_range_from_comparison): Adjust.
722 (vr_values::check_for_binary_op_overflow): Use value_range_base.
723 (vr_values::extract_range_basic): Adjust.
724 (vr_values::adjust_range_with_scev): Likewise.
725 (vr_values::vrp_visit_assignment_or_call): Likewise.
726 (vr_values::get_vr_for_comparison): Change API to avoid
727 assignment and copy construction.
728 (vr_values::compare_name_with_value): Adjust accordingly.
729 (vr_values::compare_names): Likewise.
730 (vr_values::extract_range_from_phi_node): Avoid assignment and
731 bogus in-place modify of equiv bitmap.
732 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
733 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
734 for extract_range_from_unary_expr API change.
735 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
737 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
739 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
741 2018-11-12 Richard Biener <rguenther@suse.de>
743 * tree-vrp.h (value_range_base::symbolic_p,
744 value_range_base::constant_p, value_range_base::zero_p,
745 value_range_base::singleton_p): Move from value_range.
746 (value_range::dump): Add.
747 * gimple-ssa-evrp-analyze.c
748 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
749 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
750 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
752 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
753 (value_range::constant_p): Likewise.
754 (value_range::singleton_p): Likewise.
755 (value_range_base::dump): Add.
756 (set_value_range_to_undefined): Remove.
757 (set_value_range_to_varying): Likewise.
758 (range_int_cst_p): Take value_range_base argument.
759 (range_int_cst_singleton_p): Likewise.
760 (value_range_constant_singleton): Likewise.
761 (vrp_set_zero_nonzero_bits): Likewise.
762 (extract_range_from_multiplicative_op): Use set_varying.
763 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
764 (extract_range_from_unary_expr): Likewise.
765 (dump_value_range_base): Change to overload of dump_value_range.
766 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
767 (vrp_prop::visit_stmt): Likewise.
768 (value_range::intersect_helper): Likewise.
769 (value_range::union_helper): Likewise.
770 (determine_value_range_1): Likewise.
772 2018-11-12 Richard Biener <rguenther@suse.de>
774 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
775 (set_value_range_to_null): Likewise.
776 * vr-values.c (vr_values::extract_range_from_comparison):
777 Clear equiv for constant singleton ranges.
779 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
781 * config/i386/sse.md: Combine VFIXUPIMM* patterns
782 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
783 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
784 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
785 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
786 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
787 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
789 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
792 * doc/extend.texi (Common Type Attributes): For the align type
793 attribute, copy language about decreasing alignment from the
794 corresponding variable attribute.
796 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
798 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
801 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
804 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
805 -frtti and -fno-rtti code.
807 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
810 * doc/extend.texi (Other Builtins): Document probability associated
811 with __builtin_expect.
813 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
816 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
817 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
818 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
819 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
821 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
823 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
825 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
827 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
829 2018-11-11 Richard Biener <rguenther@suse.de>
831 * tree-vrp.h (class value_range_base): New base class for
832 value_range containing all but the m_equiv member.
833 (dump_value_range_base): Add.
834 (range_includes_zero_p): Work on value_range_base.
835 * tree-vrp.c (value_range_base::set): Split out base handling
837 (value_range::set): this.
838 (value_range::set_equiv): New.
839 (value_range_base::value_range_base): New constructors.
840 (value_range_base::check): Split out base handling from...
841 (value_range::check): this.
842 (value_range::equal_p): Refactor in terms of
843 ignore_equivs_equal_p which is now member of the base.
844 (value_range_base::set_undefined): New.
845 (value_range_base::set_varying): Likewise.
846 (value_range_base::dump):Split out base handling from...
847 (value_range::dump): this.
848 (value_range_base::set_and_canonicalize): Split out base handling
850 (value_range::set_and_canonicalize): this.
851 (value_range_base::union_): New.
852 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
854 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
855 instead of value_range everywhere.
856 (ipcp_vr_lattice::print): Use dump_value_range_base.
857 (ipcp_vr_lattice::meet_with): Adjust.
858 (ipcp_vr_lattice::meet_with_1): Likewise.
859 (ipa_vr_operation_and_type_effects): Likewise.
860 (propagate_vr_across_jump_function): Likewise.
861 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
862 (ipa_get_value_range): Likewise.
863 (ipa_set_jfunc_vr): Likewise.
864 (ipa_compute_jump_functions_for_edge): Likewise.
866 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
869 * doc/invoke.texi (Optimize Options): Add @opindex entries
870 for the positive forms of -fno-xxx and -mno-xxx options
871 that were lacking them.
873 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
875 * combine.c (make_more_copies): Only make an intermediate copy if the
876 dest of a move is a pseudo.
878 2018-11-09 Maya Rashish <coypu@sdf.org>
881 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
882 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
884 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
888 * doc/invoke.texi (Optimize Options): Clarify default behavior
889 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
891 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
893 PR tree-optimization/87940
894 * expr.c (string_constant): Don't strip NOPS in subexpressions.
895 Fold PLUS_EXPR correctly.
897 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
900 * config/s390/s390.c (s390_safe_relative_long_p): New function.
901 (annotate_constant_pool_refs): Skip insns which support
903 (annotate_constant_pool_refs_1): New helper function.
904 (find_constant_pool_ref): Skip insns which support relative
906 (find_constant_pool_ref_1): New helper function.
907 (replace_constant_pool_ref): Skip insns which support
909 (replace_constant_pool_ref_1): New helper function.
910 (s390_mainpool_start): Adapt to the new signature.
911 (s390_mainpool_finish): Likewise.
912 (s390_chunkify_start): Likewise.
913 (s390_chunkify_finish): Likewise.
914 (pass_s390_early_mach::execute): Likewise.
915 (s390_prologue_plus_offset): Likewise.
916 (s390_emit_prologue): Likewise.
917 (s390_emit_epilogue): Likewise.
919 2018-11-09 Jakub Jelinek <jakub@redhat.com>
921 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
922 but unsupported lastprivate with conditional modifier.
924 2018-11-09 Jeff Law <law@redhat.com>
926 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
927 unused argument better. Add gcc_unreachable to silence warning.
929 2018-11-09 Martin Sebor <msebor@redhat.com>
932 * attribs.c (has_attribute): New helper function.
933 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
934 * attribs.h (decls_mismatched_attributes): Declare.
935 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
936 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
937 * common.opt (-Wattribute-alias): Take an argument.
938 (-Wno-attribute-alias): New option.
939 * doc/extend.texi (Common Function Attributes): Document copy.
940 (Common Variable Attributes): Same.
941 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
942 (-Wattribute-alias): Document new option argument.
944 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
946 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
947 matching criteria. Remove unused array initializer.
949 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
950 Jinsong Ji <jji@us.ibm.com>
952 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
953 constraints by introducing a new temporary.
954 (_mm_cvtss_si64): Likewise.
956 2018-11-09 Martin Liska <mliska@suse.cz>
958 * common.opt: Add -fipa-stack-alignment flag.
959 * doc/invoke.texi: Document it.
960 * final.c (rest_of_clean_state): Guard stack
963 2018-11-09 Martin Liska <mliska@suse.cz>
965 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
967 (ipa_discover_variable_flags): ... this.
968 * common.opt: Come up with new flag -fipa-reference-addressable.
969 * doc/invoke.texi: Document it.
970 * ipa-reference.c (propagate): Call the renamed fn.
971 * ipa-visibility.c (whole_program_function_and_variable_visibility):
973 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
975 (ipa_discover_variable_flags): ... this. Discover
976 non-addressable variables only with the newly added flag.
977 * opts.c: Enable the newly added flag with -O1 and higher
980 2018-11-09 David Malcolm <dmalcolm@redhat.com>
982 * json.cc (selftest::test_writing_literals): Fix comment.
984 2018-11-09 Martin Liska <mliska@suse.cz>
986 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
987 string to a stack buffer.
988 (aarch64_parse_cpu): Likewise.
989 (aarch64_parse_tune): Likewise.
991 2018-11-09 Richard Biener <rguenther@suse.de>
993 PR tree-optimization/87953
994 * tree-vect-loop.c (vectorizable_reduction): For analysis
995 always pass ops[0] to vectorizable_condition.
997 2018-11-09 Stafford Horne <shorne@gmail.com>
998 Richard Henderson <rth@twiddle.net>
999 Joel Sherrill <joel@rtems.org>
1001 * common/config/or1k/or1k-common.c: New file.
1002 * config/or1k/*: New.
1003 * config.gcc (or1k*-*-*): New.
1004 * configure.ac (or1k*-*-*): New test for openrisc tls.
1005 * configure: Regenerated.
1006 * doc/install.texi: Document OpenRISC triplets.
1007 * doc/invoke.texi: Document OpenRISC arguments.
1008 * doc/md.texi: Document OpenRISC.
1010 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1012 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1013 (arm7tdmi-s): Delete CPU.
1014 (arm710t): Add aliases for arm720t and arm740t.
1015 (arm720t, arm740t): Delete CPUs.
1016 (arm920t): Add aliases for arm920, arm922t and arm940t.
1017 (arm920, arm922t, arm940t): Delete CPUs.
1018 (arm10tdmi): Add alias for arm1020t.
1019 (arm1020t): Delete CPU.
1020 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1021 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1022 (arm10e): Add aliases for arm1020e and arm1022e.
1023 (arm1020e, arm1022e): Delete CPU.
1024 * config/arm/arm.md (generic_sched): Remove entries that are now
1026 (generic_vfp): Likewise.
1027 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1029 * config/arm/arm-tune.md: Regenerated.
1030 * config/arm/arm-tables.opt: Regenerated.
1032 2018-11-09 Richard Biener <rguenther@suse.de>
1034 PR tree-optimization/87621
1035 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1036 op with only phi inputs.
1037 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1038 (ch_base::copy_headers): Run CSE on copied loop headers.
1039 (pass_ch_vect::process_loop_p): Simplify.
1041 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1043 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1044 for non-w64 x86_64 biarch.
1046 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1048 PR rtl-optimization/86438
1049 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1050 of in_b for the compare if in_b is SET_DEST.
1053 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1054 non-toplevel UNSPEC.
1056 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1058 * tree-vrp.c (value_range::check): Do not access internals
1060 (value_range::singleton_p): Same.
1061 (value_range::type): Same.
1062 (vrp_finalize): Use value_range API.
1064 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1066 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1068 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1070 * vr-values.c (vr_values::get_value_range): Use value_range API
1071 instead of piecing together ranges.
1072 (vr_values::update_value_range): Same.
1074 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1076 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1077 of performing ad-hoc calculations.
1078 * tree-ssanames.c (set_range_info): New overloaded function
1079 accepting value_range &.
1080 (get_range_info): Same.
1081 * tree-ssanames.h (set_range_info_raw): Remove.
1082 (set_range_info): New prototype.
1083 (get_range_info): Same.
1084 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1085 * tree-vrp.c (value_range::null_p): Same.
1087 2018-11-09 Jan Hubicka <jh@suse.cz>
1089 * tree.c (fld_type_variant_equal_p): Test user align flag.
1090 (flt_type_variant): Copy user align flag.
1091 (fld_incomplete_type_of): Clear it.
1093 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1095 * config/arm/neon.md (div<mode>3): New pattern.
1097 2018-11-08 Andi Kleen <ak@linux.intel.com>
1099 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1100 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1101 (ix86_handle_option): Handle OPT_mptwrite.
1102 * config/i386/cpuid.h (bit_PTWRITE): Add.
1103 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1104 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1105 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1106 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1107 (ix86_option_override_internal): Handle PTA_PTWRITE.
1108 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1109 (def_builtin2): Force UINT64 to be 64bit only.
1110 * config/i386/i386.h (TARGET_PTWRITE): Add.
1111 (TARGET_PTWRITE_P): Add.
1113 * config/i386/i386.md: Define ptwrite.
1114 * config/i386/i386.opt: Add -mptwrite.
1115 * config/i386/immintrin.h (_ptwrite64): Add.
1117 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1118 * doc/invoke.texi: Document -mptwrite.
1120 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1122 PR rtl-optimization/87600
1123 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1124 * lra-constraints.c (process_alt_operands): Skip illegal hard
1125 register usage. Prefer reloading non hard register operands.
1127 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1130 * doc/invoke.texi (Optimize Options): Clarify default behavior
1131 for -fno-sched-interblock and -fno-sched-spec.
1133 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1135 * collect2.c (linker_select): Add USE_LLD_LD.
1136 (ld_suffixes): Add ld.lld.
1137 (main): Handle -fuse-ld=lld.
1138 * common.opt (-fuse-ld=lld): New option.
1139 * doc/invoke.texi (-fuse-ld=lld): Document.
1140 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1142 2018-11-08 Paul Koning <ni1d@arrl.net>
1144 * config/pdp11/constraints.md: Add "Z" series constraints for use
1145 with pre-dec and post-inc addressing.
1146 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1147 (pdp11_expand_operands): Add int argument (word count).
1148 (pdp11_sp_frame_offset): Delete.
1149 (pdp11_cmp_length): New function.
1150 (pushpop_regeq): New function.
1151 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1153 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1155 (pdp11_initial_elimination_offset): Ditto.
1156 (pdp11_expand_operands): Add word count argument. Bugfixes.
1157 (output_move_multiple): Change how pointer adjustment is done.
1158 (pdp11_gen_int_label): Correct format.
1159 (output_ascii): Ditto.
1160 (pdp11_asm_output_var): Add code for DEC assembler case.
1161 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1163 (legitimate_const_double_p): Ditto.
1164 (pdp11_register_move_cost): Adjust for new register classes.
1165 (pdp11_regno_reg_class): Ditto.
1166 (expand_block_move): Delete.
1167 (pushpop_regeq): New function.
1168 (pdp11_legitimate_address_p): Bugfix in check for constant
1170 (pdp11_sp_frame_offset): Delete.
1171 (pdp11_reg_save_size): New helper function for new frame layout.
1172 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1173 (pdp11_expand_shift): Bugfix in check for constant shift count.
1174 (pdp11_shift_length): Ditto.
1175 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1176 (pdp11_cmp_length): New function.
1177 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1178 some compile options.
1179 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1180 (CALL_USED_REGISTERS): Ditto.
1181 (ELIMINABLE_REGS): Ditto.
1182 (REGISTER_NAMES): Ditto.
1183 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1185 (REG_CLASS_NAMES): Ditto.
1186 (REG_CLASS_CONTENTS): Ditto. Also remove
1187 HARD_FRAME_POINTER_REGNUM.
1188 (CPU_REG_CLASS): New macro.
1189 (CLASS_MAX_NREGS): Adjust for new register classes.
1190 (FUNCTION_PROFILER): Make no-op.
1191 (may_call_alloca): Remove unused declaration.
1192 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1193 (ASM_OUTPUT_SKIP): Fix format.
1194 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1195 (HARD_FRAME_POINTER_REGNUM): Remove.
1197 (*rts): Rename. Remove epilogue related checks.
1198 (cmpsi, cmpdi): New insn.
1199 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1200 (mov<mode>): Change constraints to enforce that push/pop
1201 destination cannot use the same register as source.
1202 (*mov<mode><cc_cc>): Ditto.
1203 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1204 at assembly output rather than as RTL expander.
1205 (zero_extendqihi2): Bugfix in check for same registers.
1206 (adddi3_nocc): Bugfix in check for constant operand.
1207 (addsi3_nocc): Ditto.
1208 (subdi3_nocc): Ditto.
1209 (subsi3_nocc): Ditto.
1210 (negdi2_nocc): Copy input to pdp11_expand_operands.
1211 (negsi2_nocc): Ditto.
1212 (bswap2_nocc): Ditto.
1213 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1214 * config/pdp11/t-pdp11: Use -Os.
1216 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1218 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1219 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1220 (gen_comm_data): Print out CPU alias tables.
1221 (check_cpu): Match aliases when checking the CPU name.
1222 * config/arm/arm-protos.h (cpu_alias): New structure.
1223 (cpu_option): Add entry for aliases.
1224 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1225 strongarm1100 and strongarm1110.
1226 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1227 (config/arm/arm-generic.md): Remove redundant references to
1228 strongarm110, strongarm1100 and strongarm1110.
1229 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1230 Scan aliases for additional hints.
1231 (arm_parse_cpu_option_name): Also match a cpu name against the list
1233 * config/arm/arm-tables.opt: Regenerated.
1234 * config/arm/arm-tune.md: Regenerated.
1236 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1238 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1239 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1240 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1241 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1242 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1243 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1244 * gengtype.c (open_base_files): Add omp-general.h.
1245 * gimple.c (gimple_build_omp_critical):
1246 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1247 gimple_omp_taskgroup_set_clauses.
1248 (gimple_build_omp_atomic_load): Add mo argument, call
1249 gimple_omp_atomic_set_memory_order.
1250 (gimple_build_omp_atomic_store): Likewise.
1251 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1252 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1254 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1255 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1256 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1257 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1258 different value for GF_OMP_ATOMIC_NEED_VALUE.
1259 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1261 (struct gimple_statement_omp_single_layout): And remove here.
1262 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1263 than gimple_statement_omp_single_layout.
1264 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1266 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1267 (gimple_omp_subcode): Formatting fix.
1268 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1269 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1270 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1271 gimple_omp_teams_host, gimple_omp_teams_set_host,
1272 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1273 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1274 gimple_omp_taskgroup_set_clauses): New inline functions.
1275 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1276 (gimple_build_omp_atomic_store): Likewise.
1277 (gimple_omp_atomic_seq_cst_p): Remove.
1278 (gimple_omp_atomic_memory_order): New function.
1279 (gimple_omp_atomic_set_seq_cst): Remove.
1280 (gimple_omp_atomic_set_memory_order): New function.
1281 (gimple_build_omp_taskgroup): Add clauses argument.
1282 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1283 (dump_gimple_omp_task): Print taskwait with depend clauses.
1284 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1285 dump_omp_atomic_memory_order.
1286 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1287 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1288 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1289 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1290 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1291 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1292 ORT_UNTIED_TASKLOOP enumerators.
1293 (enum gimplify_defaultmap_kind): New.
1294 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1295 target_map_pointers_as_0len_arrays members, add defaultmap.
1296 (new_omp_context): Initialize defaultmap member.
1297 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1298 (maybe_fold_stmt): Don't fold even in host teams regions.
1299 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1300 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1301 ctx->omp_firstprivatize_variable.
1302 (omp_add_variable): Don't add private/firstprivate for VLAs in
1304 (omp_default_clause): Print "taskloop" rather than "task" if
1306 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1307 Handle new defaultmap clause kinds.
1308 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1309 iterator to be lastprivate or private. Fix up diagnostics if linear
1310 is used on collapse>1 simd iterator.
1311 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1312 (gimplify_omp_depend): New function.
1313 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1314 combined parallel master taskloop{, simd} if taskloop has
1315 firstprivate, lastprivate or reduction clause. Handle
1316 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1317 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1318 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1319 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1320 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1322 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1323 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1324 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1325 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1326 (gimplify_omp_task): Handle taskwait with depend clauses.
1327 (gimplify_omp_for): Add shared clause on parallel for combined
1328 parallel master taskloop{, simd} if taskloop has firstprivate,
1329 lastprivate or reduction clause. Use ORT_TASKLOOP or
1330 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1331 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1332 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1333 __for_end and __for_range temporaries on OMP_PARALLEL for
1334 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1335 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1336 sandwiched in between two taskloops.
1337 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1338 instead of ctx->omp_firstprivatize_variable.
1339 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1340 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1341 host teams, use gimplify_and_return_first etc. for body like
1342 for target or target data constructs, and at the end call
1343 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1344 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1345 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1346 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1347 gimple_omp_atomic_set_seq_cst calls.
1348 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1349 case, handle taskgroup clauses.
1350 * lto-streamer-out.c (hash_tree): Handle
1351 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1352 * Makefile.in (GTFILES): Add omp-general.h.
1353 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1354 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1355 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1356 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1357 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1358 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1359 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1360 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1361 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1362 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1363 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1364 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1365 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1366 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1367 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1368 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1369 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1370 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1371 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1372 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1373 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1374 non-worksharing loops.
1375 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1376 (determine_parallel_type): Don't combine parallel with worksharing
1377 which has _reductemp_ clause.
1378 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1379 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1380 if there is nonmonotonic modifier or if there is no modifier and no
1381 ordered clause. For dynamic and guided schedule without monotonic
1382 and nonmonotonic modifier, default to nonmonotonic.
1383 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1384 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1386 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1387 there are any reduction clauses.
1388 (expand_taskwait_call): New function.
1389 (expand_teams_call): New function.
1390 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1391 expand_teams_call for it. Formatting fix. Handle taskwait with
1393 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1394 of worksharing loops with task reductions.
1395 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1396 expansion of worksharing loops with task reductions.
1397 (expand_omp_sections): Handle expansion of sections with task
1399 (expand_omp_synch): For host teams call expand_omp_taskreg.
1400 (omp_memory_order_to_memmodel): New function.
1401 (expand_omp_atomic_load, expand_omp_atomic_store,
1402 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1403 instead of gimple_omp_atomic_seq_cst_p.
1404 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1405 depend clauses as a standalone directive.
1406 * omp-general.c (enum omp_requires): New variable.
1407 (omp_extract_for_data): Initialize have_reductemp member. Allow
1408 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1409 GT_EXPR loops depending on incr sign. Formatting fixes.
1410 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1411 (enum omp_requires): New enum.
1412 (omp_requires_mask): Declare.
1413 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1415 * omp-low.c (struct omp_context): Add task_reductions and
1416 task_reduction_map fields.
1417 (is_host_teams_ctx): New function.
1418 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1419 (use_pointer_for_field): Use is_global_var instead of
1420 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1422 (build_outer_var_ref): Ignore taskgroup outer contexts.
1423 (delete_omp_context): Release task_reductions and task_reduction_map.
1424 (scan_sharing_clauses): Don't add any fields for reduction clause on
1425 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1426 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1427 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1428 Handle OMP_CLAUSE_NONTEMPORAL.
1429 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1431 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1432 clauses with task modifier.
1433 (scan_omp_task): Handle taskwait with depend clauses.
1434 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1435 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1436 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1437 (scan_omp_for): Fix comment formatting.
1438 (scan_omp_teams): Handle host teams constructs.
1439 (check_omp_nesting_restrictions): Allow teams with no outer
1440 OpenMP context. Adjust diagnostics for teams strictly nested into
1441 some explicit OpenMP construct other than target. Allow OpenMP atomics
1442 inside of simd regions.
1443 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1444 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1445 taskreg_nesting_level while scanning host teams construct.
1446 (task_reduction_read): New function.
1447 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1448 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1449 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1450 second argument create_tmp_var if it is NULL. Don't ignore shared
1451 clauses in is_host_teams_ctx contexts. Handle
1452 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1454 (lower_reduction_clauses): Ignore reduction clauses with task
1455 modifier. Remove second argument create_tmp_var if it is NULL.
1456 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1457 (lower_send_clauses): Ignore reduction clauses with task modifier.
1458 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1459 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1460 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1461 rely that it is the last stmt in body so far. Ignore outer taskgroup
1463 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1464 lower_omp_task_reductions): New functions.
1465 (lower_omp_sections): Handle reduction clauses with taskgroup
1466 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1467 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1468 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1470 (lower_omp_taskgroup): Handle taskgroup reductions.
1471 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1472 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1473 (lower_depend_clauses): If there are any
1474 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1475 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1476 seen, assume lowering is done already and return early. Set kind
1477 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1478 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1479 parallel construct. Handle reduction clause on taskloop construct.
1480 Handle taskwait with depend clauses.
1481 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1482 for host teams constructs.
1483 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1484 nontemporal and _reductemp_ clause entries.
1485 (omp_clause_code_name): Likewise.
1486 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1487 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1488 * tree-core.h (enum omp_clause_code): Add
1489 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1490 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1491 (struct tree_base): Add omp_atomic_memory_order field into union.
1492 Remove OMP_ATOMIC_SEQ_CST comment.
1493 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1494 and OMP_CLAUSE_DEPEND_DEPOBJ.
1495 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1496 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1497 OpenMP constructs with body and clauses operands.
1498 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1499 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1500 (OMP_TASKGROUP_CLAUSES): Define.
1501 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1502 OMP_CLAUSE__LOOPTEMP_.
1503 (OMP_ATOMIC_SEQ_CST): Remove.
1504 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1505 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1506 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1507 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1508 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1509 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1510 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1511 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1512 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1513 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1515 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1516 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1517 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1518 (convert_local_omp_clauses): Likewise. Remove useless test.
1519 * tree-parloops.c (create_call_for_reduction_1): Pass
1520 OMP_MEMORY_ORDER_RELAXED as new argument to
1521 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1522 * tree-pretty-print.c (dump_omp_iterators): New function.
1523 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1524 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1525 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1526 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1527 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1528 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1529 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1530 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1531 (dump_omp_atomic_memory_order): New function.
1532 (dump_generic_node): Use it. Print taskgroup clauses. Print
1533 taskwait with depend clauses.
1534 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1535 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1536 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1537 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1538 write_ts_omp_clause_tree_pointers): Likewise.
1540 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1543 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1544 "-missed", "-note", and "-all" sub-options.
1545 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1547 (can_early_inline_edge_p): Likewise.
1548 (want_early_inline_function_p): Likewise.
1549 (want_inline_self_recursive_call_p): Likewise.
1550 (recursive_inlining): Likewise.
1551 (inline_small_functions): Likewise.
1552 (flatten_function): Likewise.
1553 (ipa_inline): Likewise.
1554 (inline_always_inline_functions): Likewise.
1555 (early_inline_small_functions): Likewise.
1556 (early_inliner): Likewise.
1557 * tree-inline.c (expand_call_inline): Likewise.
1559 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1561 * pretty-print.c (pp_format): Handle %f.
1562 (selftest::test_pp_format): Add test of %f.
1563 * pretty-print.h (pp_double): New macro.
1565 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1567 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1568 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1569 (dump_pretty_printer::decode_format): Implement "%C" for
1571 (selftest::test_capture_of_dump_calls): Rename "where" to
1572 "stmt_loc". Convert test_decl to a function decl and set its
1573 location. Add a symbol_table_test RAII instance and a
1574 cgraph_node, using it to test "%C" and dump_symtab_node.
1576 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1579 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1581 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1583 * cgraph.c: Include "selftest.h".
1584 (saved_symtab): New variable.
1585 (selftest::symbol_table_test::symbol_table_test): New ctor.
1586 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1587 (selftest::test_symbol_table_test): New test.
1588 (selftest::cgraph_c_tests): New.
1589 * cgraph.h (saved_symtab): New decl.
1590 (selftest::symbol_table_test): New class.
1591 * selftest-run-tests.c (selftest::run_tests): Call
1592 selftest::cgraph_c_tests.
1593 * selftest.h (selftest::cgraph_c_tests): New decl.
1595 2018-11-08 Richard Biener <rguenther@suse.de>
1597 * tree-data-ref.h (lambda_int): New typedef.
1598 (lambda_vector_gcd): Adjust.
1599 (lambda_vector_new): Likewise.
1600 (lambda_matrix_new): Likewise.
1601 * tree-data-ref.c (print_lambda_vector): Adjust.
1603 2018-11-08 Richard Biener <rguenther@suse.de>
1605 PR tree-optimization/87929
1606 * tree-complex.c (expand_complex_comparison): Clean EH.
1608 2018-11-08 Martin Liska <mliska@suse.cz>
1610 * doc/extend.texi: Reword.
1611 * predict.c (expr_expected_value_1): Likewise.
1613 2018-11-08 Richard Biener <rguenther@suse.de>
1615 PR tree-optimization/87913
1616 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1617 of extreme values to ordered comparisons.
1619 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1622 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1624 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1626 * doc/invoke.texi: Remove leading dash from @opindex entries
1627 throughout the file.
1629 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1632 * doc/invoke.texi (Option Summary): Add -e and --entry.
1633 (Link Options): Likewise.
1635 2018-11-07 Nathan Sidwell <nathan@acm.org>
1638 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1639 --disable-checking bootstrap.
1641 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1643 * configure: Regenerated.
1645 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1648 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1649 to the mode of the widest field iff the widest field has mode class
1650 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1653 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1655 * common.opt: Add -Wattribute-warning.
1656 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1657 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1658 call to allow user configure behavior of "warning" attribute.
1660 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1662 * target.def: Put @: after every vs., e.g., and i.e. where it is
1663 followed by whitespace.
1664 * doc/extend.texi: Ditto.
1665 * doc/fragments.texi: Ditto.
1666 * doc/gimple.texi: Ditto.
1667 * doc/implement-c.texi: Ditto.
1668 * doc/install.texi: Ditto.
1669 * doc/invoke.texi: Ditto.
1670 * doc/md.texi: Ditto.
1671 * doc/plugins.texi: Ditto.
1672 * doc/rtl.texi: Ditto.
1673 * doc/sourcebuild.texi: Ditto.
1674 * doc/tm.texi.in: Ditto.
1675 * doc/ux.texi: Ditto.
1676 * doc/tm.texi: Regenerate.
1678 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1680 * config/arm/arm-cpus.in (ares): New entry.
1681 * config/arm/arm-tables.opt: Regenerate.
1682 * config/arm/arm-tune.md: Likewise.
1683 * doc/invoke.texi (ARM Options): Document ares.
1685 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1687 * config/aarch64/aarch64-cores.def (ares): Define.
1688 * config/aarch64/aarch64-tune.md: Regenerate.
1689 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1691 2018-11-07 Jan Hubicka <jh@suse.cz>
1693 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1694 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1695 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1698 2018-11-07 Richard Biener <rguenther@suse.de>
1700 PR tree-optimization/87914
1701 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1703 (vectorizable_reduction): Handle shifts and rotates by dispatching
1704 to vectorizable_shift.
1705 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1706 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1708 (vectorizable_shift): Export and handle being called as
1710 (vect_analyze_stmt): Call vectorizable_shift after
1711 vectorizable_reduction.
1712 * tree-vectorizer.h (vectorizable_shift): Declare.
1714 2018-11-07 Jan Hubicka <jh@suse.cz>
1716 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1717 than const decls in TREE_VALUE of enum.
1718 (dump_type_inheritance_graph): Improve duplicate dumping.
1719 (free_enum_values): New.
1720 (build_type_inheritance_graph): Use it.
1721 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1722 which are not main variants or not ODR types.
1723 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1725 2018-11-07 Richard Biener <rguenther@suse.de>
1727 * ipa-inline.c (want_inline_small_function_p): Compute
1728 big_speedup_p lazily and last.
1730 2018-11-07 Jan Hubicka <jh@suse.cz>
1732 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1733 building incomplete variant of complete type.
1734 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1735 variant of complete type.
1737 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1739 * config/mips/mips.c: Fix typo in documentation of
1740 mips_loongson_ext2_prefetch_cookie.
1741 (mips_option_override): fix brain twister logical.
1742 * config/mips/mips.h: Fix typo in documentation of
1743 ISA_HAS_CTZ_CTO and define pattern.
1744 * config/mips/mips.md (prefetch): Hoist EXT2 above
1746 (prefetch_indexed): Hoist EXT2 above the EXT block.
1748 2018-11-07 Jan Hubicka <jh@suse.cz>
1750 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1751 return and parameter types of function and method types.
1752 (free_lang_data_in_cgraph): Update.
1754 2018-11-07 Martin Liska <mliska@suse.cz>
1756 PR rtl-optimization/87868
1757 * postreload-gcse.c (eliminate_partially_redundant_load): Set
1758 threshold to max_count if we would overflow.
1759 * profile-count.h: Make max_count a public constant.
1761 2018-11-07 Martin Liska <mliska@suse.cz>
1763 * mem-stats.h: Fix GNU coding style.
1765 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1767 * config/mips/gs264e.md: New.
1768 * config/mips/mips-cpus.def: Define gs264e.
1769 * config/mips/mips-tables.opt: Regenerate.
1770 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1772 (mips_issue_rate): Add support for gs264e.
1773 (mips_multipass_dfa_lookahead): Likewise.
1774 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1775 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1776 (MIPS_ASE_MSA_SPEC): New.
1777 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1778 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1779 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1780 * config/mips/mips.md: Include gs264e.md.
1781 (processor): Add gs264e.
1782 * config/mips/mips.opt (MSA): Use Mask instead of Var.
1783 * doc/invoke.texi: Add gs264e to supported architectures.
1785 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1787 * config/mips/gs464e.md: New.
1788 * config/mips/mips-cpus.def: Define gs464e.
1789 * config/mips/mips-tables.opt: Regenerate.
1790 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1792 (mips_issue_rate): Add support for gs464e.
1793 (mips_multipass_dfa_lookahead): Likewise.
1794 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1795 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1796 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1797 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1798 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1799 * config/mips/mips.md: Include gs464e.md.
1800 (processor): Add gs464e.
1801 * doc/invoke.texi: Add gs464e to supported architectures.
1803 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1805 * config/mips/loongson3a.md: Rename to ...
1806 * config/mips/gs464.md: ... here.
1807 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1808 as an alias of gs464 processor.
1809 * config/mips/mips-tables.opt: Regenerate.
1810 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1811 instead of PROCESSOR_LOONGSON_3A.
1812 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1814 (mips_option_override): Enable MMI and EXT for gs464.
1815 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1816 Rename TUNE_LOONGSON_3A to TUNE_GS464.
1817 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1818 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1819 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1821 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1822 (processor): Add gs464;
1823 * doc/invoke.texi: Add gs464 to supported architectures.
1825 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1827 * config/mips/mips-protos.h
1828 (mips_loongson_ext2_prefetch_cookie): New prototype.
1829 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1830 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1831 TARGET_LOONGSON_EXT2 is true.
1832 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1833 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1834 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1835 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1836 TARGET_LOONGSON_EXT2.
1837 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1838 (define_insn "ctz<mode>2"): New insn pattern.
1839 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1840 (define_insn "prefetch_indexed_<mode>"): Include
1841 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1842 * config/mips/mips.opt (-mloongson-ext2): Add option.
1843 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1845 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1847 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1848 __mips_loongson_ext.
1849 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1850 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1852 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1853 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1854 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1855 instead of TARGET_LOONGSON_3A.
1856 * config/mips/mips.opt (-mloongson-ext): Add option.
1857 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1859 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1861 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1862 * config/mips/loongson.md: Move to ...
1863 * config/mips/loongson-mmi.md: here; Adjustment.
1864 * config/mips/loongson.h: Move to ...
1865 State as deprecated. Include loongson-mmiintrin.h for back
1866 compatibility and warning.
1867 * config/mips/loongson-mmiintrin.h: ... here.
1868 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1869 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1870 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1871 (mips_option_override): Make sure MMI use hard float;
1872 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1873 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1874 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1875 TARGET_LOONGSON_VECTORS.
1876 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1877 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1878 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1879 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1881 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1882 TARGET_LOONGSON_VECTORS.
1883 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1884 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1885 (Loongson MMI patterns): Include loongson-mmi.md instead of
1887 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1888 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1890 2018-11-07 Richard Biener <rguenther@suse.de>
1893 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1894 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1896 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
1898 PR rtl-optimization/87874
1899 * lra.c (lra_substitute_pseudo): Do not create a subreg for
1902 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
1904 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1905 if not in indexed or indirect form.
1906 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1907 (bswap<mode>2_store): Ditto.
1909 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
1911 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1914 2018-11-06 Richard Biener <rguenther@suse.de>
1916 PR tree-optimization/86850
1917 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1918 instead of src.m_vec.
1920 2018-11-06 Jan Hubicka <jh@suse.cz>
1922 * tree.c (fld_simplified_type_name): Break out form ...
1923 (free_lang_data_in_type): ... here.
1924 (fld_type_variant_equal_p): Use it.
1926 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1928 * config/default-d.c: Include memmodel.h.
1930 * config/sol2-d.c: New file.
1931 * config/t-sol2 (sol2-d.o): New rule.
1932 * config.gcc <*-*-solaris2*>: Set d_target_objs,
1933 target_has_targetdm.
1935 2018-11-06 Jan Hubicka <jh@suse.cz>
1937 * tree.c (fld_type_variant): Also copy alignment; be sure that
1938 new variant is equal.
1940 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
1943 * config/s390/s390.md: Add relative_long attribute.
1945 2018-11-06 Jan Hubicka <jh@suse.cz>
1947 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1948 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1949 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1950 stream TYPE_NEEDS_CONSTRUCTING.
1951 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1952 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1954 2018-11-06 Richard Biener <rguenther@suse.de>
1956 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1958 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1960 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1962 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1963 REG_CLASS_CONTENTS[GEN_REGS].
1964 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1966 2018-11-06 Jan Hubicka <jh@suse.cz>
1968 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1970 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1973 * config/sol2.h (ASAN_CC1_SPEC): Define.
1974 (LD_WHOLE_ARCHIVE_OPTION): Define.
1975 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1976 (ASAN_REJECT_SPEC): Provide default.
1977 (LIBASAN_EARLY_SPEC): Define.
1978 (LIBTSAN_EARLY_SPEC): Define.
1979 (LIBLSAN_EARLY_SPEC): Define.
1980 * config/i386/sol2.h (CC1_SPEC): Redefine.
1981 (ASAN_REJECT_SPEC): Define.
1983 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1984 (TARGET_ASAN_SHADOW_OFFSET): Define.
1985 (sparc_asan_shadow_offset): New function.
1986 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1987 (ASAN_REJECT_SPEC): Define.
1989 2018-11-06 Jan Hubicka <jh@suse.cz>
1991 * tree.c (fld_type_variant): Copy canonical type.
1992 (fld_incomplete_type_of): Check that canonical types looks sane;
1993 copy canonical type.
1994 (verify_type): Accept when incomplete type has complete canonical type.
1996 2018-11-06 Jan Hubicka <jh@suse.cz>
1998 * tree.c (free_lang_data): Reset overwite_assembler_name,
1999 print_xnode, print_decl, print_type and print_identifier of
2002 2018-11-06 Richard Biener <rguenther@suse.de>
2004 PR tree-optimization/87889
2005 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2006 Do nothing if old and new arg are the same
2008 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2011 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2012 attributes for operands 3 and 4.
2014 2018-11-06 Richard Biener <rguenther@suse.de>
2017 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2018 matching bitfield insertion.
2020 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2022 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2023 (reg_next_debug_use): New.
2024 (attempt_change): Propagate adjusted expression into affected
2026 (merge_in_block): Track uses in debug insns.
2027 (pass_inc_dec::execute): Allocate and release
2030 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2032 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2033 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2034 (_mm512_maskz_fixupimm_round_pd): Ditto.
2035 (_mm512_fixupimm_round_ps): Ditto.
2036 (_mm512_maskz_fixupimm_round_ps): Ditto.
2037 (_mm_fixupimm_round_sd): Ditto.
2038 (_mm_maskz_fixupimm_round_sd): Ditto.
2039 (_mm_fixupimm_round_ss): Ditto.
2040 (_mm_maskz_fixupimm_round_ss): Ditto.
2041 (_mm512_fixupimm_pd): Ditto.
2042 (_mm512_maskz_fixupimm_pd): Ditto.
2043 (_mm512_fixupimm_ps): Ditto.
2044 (_mm512_maskz_fixupimm_ps): Ditto.
2045 (_mm_fixupimm_sd): Ditto.
2046 (_mm_maskz_fixupimm_sd): Ditto.
2047 (_mm_fixupimm_ss): Ditto.
2048 (_mm_maskz_fixupimm_ss): Ditto.
2049 (_mm512_mask_fixupimm_round_pd): Update builtin.
2050 (_mm512_mask_fixupimm_round_ps): Ditto.
2051 (_mm_mask_fixupimm_round_sd): Ditto.
2052 (_mm_mask_fixupimm_round_ss): Ditto.
2053 (_mm512_mask_fixupimm_pd): Ditto.
2054 (_mm512_mask_fixupimm_ps): Ditto.
2055 (_mm_mask_fixupimm_sd): Ditto.
2056 (_mm_mask_fixupimm_ss): Ditto.
2057 * config/i386/avx512vlintrin.h:
2058 (_mm256_fixupimm_pd): Update parameters and builtin.
2059 (_mm256_maskz_fixupimm_pd): Ditto.
2060 (_mm256_fixupimm_ps): Ditto.
2061 (_mm256_maskz_fixupimm_ps): Ditto.
2062 (_mm_fixupimm_pd): Ditto.
2063 (_mm_maskz_fixupimm_pd): Ditto.
2064 (_mm_fixupimm_ps): Ditto.
2065 (_mm_maskz_fixupimm_ps): Ditto.
2066 (_mm256_mask_fixupimm_pd): Update builtin.
2067 (_mm256_mask_fixupimm_ps): Ditto.
2068 (_mm_mask_fixupimm_pd): Ditto.
2069 (_mm_mask_fixupimm_ps): Ditto.
2070 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2071 * config/i386/i386-builtin.def: Update builtin definitions.
2072 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2073 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2074 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2075 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2076 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2077 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2078 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2079 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2080 * config/i386/subst.md:
2081 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2082 (round_saeonly_sd_mask_op4): Ditto.
2083 (round_saeonly_expand_operand5): Ditto.
2084 (round_saeonly_expand): Update.
2086 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2088 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2090 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2092 PR rtl-optimization/87871
2093 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2095 2018-11-05 Paul Koning <ni1d@arrl.net>
2097 * doc/sourcebuild.texi (target attributes): Document new "inf"
2098 effective target keyword.
2100 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2102 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2103 moves involving the CC reg.
2105 2018-11-05 Richard Biener <rguenther@suse.de>
2107 PR tree-optimization/87873
2108 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2110 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2111 * tree-vect-loop.c (vect_transform_loop): When splitting the
2112 loop exit also create forwarder PHIs for constants.
2113 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2114 Handle constant to_arg, add extra checking we match up the correct
2117 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2119 * config/s390/s390.md: QImode and HImode for load on condition.
2121 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2123 * config/s390/predicates.md: Fix typo.
2124 * config/s390/s390.md: Allow immediates for load on condition.
2126 2018-11-05 Martin Liska <mliska@suse.cz>
2128 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2129 * bitmap.h (struct bitmap_usage): Likewise.
2130 * ggc-common.c (SCALE): Remove.
2132 (struct ggc_usage): Use SIZE_AMOUNT. And update
2134 * ggc-page.c (SCALE): Remove.
2135 (STAT_LABEL): Remove.
2136 (ggc_print_statistics): Use SIZE_AMOUNT.
2137 * gimple.h (SCALE): Remove.
2139 * input.c (ONE_K): Remove.
2142 (STAT_LABEL): Likewise.
2143 (FORMAT_AMOUNT): Likewise.
2144 (dump_line_table_statistics): Use SIZE_AMOUNT.
2145 * mem-stats.h (struct mem_usage): Likewise.
2146 * rtl.c (dump_rtx_statistics): Likewise.
2147 (rtx_alloc_counts): Change type to size_t.
2148 (rtx_alloc_sizes): Likewise.
2149 (rtx_count_cmp): New.
2150 (dump_rtx_statistics): Sort first based on counts.
2151 * tree.c (tree_nodes_cmp): New.
2152 (tree_codes_cmp): New.
2153 (dump_tree_statistics): Sort first based on counts.
2154 * system.h (ONE_K): New.
2156 (SIZE_SCALE): Likewise.
2157 (SIZE_LABEL): Likewise.
2158 (SIZE_AMOUNT): Likewise.
2159 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2160 * tree-dfa.c (dump_dfa_stats): Likewise.
2161 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2162 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2163 * tree.c (dump_tree_statistics): Likewise.
2164 * vec.c (struct vec_usage): Likewise.
2165 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2166 trigger a -Werror=format-overflow with
2167 --enable-gather-detailed-stats.
2169 2018-11-05 Martin Liska <mliska@suse.cz>
2171 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2173 * vec.c (struct vec_usage): Register m_element_size.
2174 (vec_prefix::register_overhead): New arguments: elements and
2176 (vec_prefix::release_overhead): Subtract elements.
2177 * vec.h (struct vec_prefix): Change signature.
2178 (va_heap::reserve): Pass proper arguments.
2179 (va_heap::release): Likewise.
2181 2018-11-05 Martin Liska <mliska@suse.cz>
2183 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2187 2018-11-05 Richard Biener <rguenther@suse.de>
2189 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2191 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2192 whether anything was done.
2193 (scev_const_prop): Remove constant propagation part, fold
2195 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2196 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2199 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2201 PR tree-optimization/87859
2202 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2203 only_constants and first_nonmergeable_order members.
2204 (merged_store_group::merged_store_group): Initialize them.
2205 (merged_store_group::do_merge): Clear only_constants member if
2206 adding something other than INTEGER_CST store.
2207 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2208 stores with order >= first_nonmergeable_order. Use
2209 merged_store->only_constants instead of always recomputing it.
2210 Set merged_store->first_nonmergeable_order if we've skipped any
2211 stores. Attempt to merge overlapping INTEGER_CST stores that
2212 we would otherwise skip.
2215 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2217 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2220 * config/i386/emmintrin.h (__v16qs): New to cope with option
2222 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2223 (_mm_cmplt_epi8): Likewise.
2224 (_mm_cmpgt_epi8): Likewise.
2226 2018-11-05 Richard Biener <rguenther@suse.de>
2228 PR rtl-optimization/87852
2229 * fwprop.c (use_killed_between): Only consider single-defs of the
2230 use whose definition statement dominates the use.
2232 2018-11-05 Martin Liska <mliska@suse.cz>
2235 * doc/invoke.texi: Remove options that are
2236 not disabled with -Os.
2238 2018-11-05 Martin Liska <mliska@suse.cz>
2241 * doc/extend.texi: Update constrain about the last argument
2242 of __builtin_expect_with_probability.
2244 2018-11-05 Martin Liska <mliska@suse.cz>
2247 * predict.c (expr_expected_value_1): Verify
2248 that last argument is a real constants and emit
2251 2018-11-05 Martin Liska <mliska@suse.cz>
2253 PR gcov-profile/77698
2254 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2257 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2259 PR tree-optimization/86572
2260 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2262 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2264 PR tree-optimization/87672
2265 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2266 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2268 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2271 * cfgexpand.c (pass_expand::execute): Move the call to
2272 finish_eh_generation in front of the call to expand_stack_alignment.
2274 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2276 * common/config/i386/i386-common.c (processor_alias_table): Add
2278 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2279 (case ${target}): Add znver2.
2280 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2281 -march=native recognize znver2 processors.
2282 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2283 * config/i386/i386.c (m_znver2): New definition.
2284 (m_ZNVER): New definition.
2285 (m_AMD_MULTIPLE): Includes m_znver2.
2286 (processor_cost_table): Add znver2 entry.
2287 (processor_target_table): Add znver2 entry.
2288 (get_builtin_code_for_version): Set priority for
2290 (processor_model): Add M_AMDFAM17H_ZNVER2.
2291 (arch_names_table): Ditto.
2292 (ix86_reassociation_width): Include znver2.
2293 * config/i386/i386.h (TARGET_znver2): New definition.
2294 (struct ix86_size_cost): Add TARGET_ZNVER2.
2295 (enum processor_type): Add PROCESSOR_ZNVER2.
2296 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2297 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2298 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2299 (ix86_adjust_cost): Add znver2.
2300 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2301 * gcc/doc/extend.texi: Add details about znver2.
2302 * gcc/doc/invoke.texi: Add details about znver2.
2304 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2308 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2311 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2313 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2314 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2316 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2318 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2319 shrink-wrapping when -mtrack-speculation.
2321 2018-11-02 Richard Biener <rguenther@suse.de>
2323 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2324 (pop_cost_one_pair): Do not free pair.
2325 (pop_best_coalesce): Likewise.
2326 (create_coalesce_list): Initialize obstack.
2327 (delete_coalesce_list): Free obstack.
2328 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2329 (add_cost_one_coalesce): Likewise.
2330 (struct live_track): Remove bitmap pointer indirections.
2331 (new_live_track): Adjust.
2332 (delete_live_track): Likewise.
2333 (live_track_remove_partition): Likewise.
2334 (live_track_add_partition): Likewise.
2335 (live_track_live_p): Likewise.
2336 (live_track_process_def): Likewise.
2337 (live_track_clear_base_vars): Likewise.
2339 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2341 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2342 * configure: Regenerate.
2343 * config.in: Regenerate.
2344 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2345 HAVE_AS_REGISTER_PSEUDO_OP guard.
2346 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2347 !HAVE_AS_REGISTER_PSEUDO_OP support.
2348 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2351 2018-11-02 Richard Biener <rguenther@suse.de>
2353 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2356 2018-11-02 Richard Biener <rguenther@suse.de>
2358 PR tree-optimization/87776
2359 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2360 executable when iterating but running into rpo-vn-max-loop-depth
2361 and not eliding the iteration.
2363 2018-11-30 Jan Hubicka <jh@suse.cz>
2365 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2368 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2370 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2372 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2373 Combine with rs6000_address_for_fpconvert.
2374 (rs6000_address_for_fpconvert): Combine with
2375 rs6000_force_indexed_or_indirect_mem.
2376 (rs6000_expand_vector_init): Change function call from
2377 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2378 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2379 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2380 (floatsi<mode>2_lfiwax_mem): Ditto.
2381 (floatunssi<mode>2_lfiwzx): Ditto.
2382 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2383 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2384 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2385 (fix_trunc<mode>si2_stfiwx): Ditto.
2386 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2387 (float_<mode>si2_hw): Ditto.
2388 (floatuns_<mode>si2_hw): Ditto.
2389 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2390 (vsx_splat_<mode>): Ditto.
2392 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2394 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2395 at end of assembler input text.
2396 * configure: Regenerate.
2398 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2400 PR tree-optimization/87826
2401 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2402 negative or larger or equal to type's precision.
2404 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2406 * opts.c (default_options_table): Do not enable
2407 OPT_fdelayed_branch at -Og.
2408 * doc/invoke.texi (-fdelayed-branch): Document it.
2410 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2412 * optabs-libfuncs.c (build_libfunc_function_visibility):
2413 New, split out from...
2414 (build_libfunc_function): ... here.
2415 (init_one_libfunc_visibility): New, split out from ...
2416 (init_one_libfunc): ... here.
2418 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2419 scratch register need not be early-clobber. Document the reason
2420 why we cannot use ST<OP>.
2422 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2425 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2426 line for second argument of AC_DEFINE_UNQUOTED.
2427 * doc/install.texi (Tools/packages necessary for modifying GCC):
2428 Update to autoconf 2.69 and automake 1.15.1.
2429 * aclocal.m4, config.in, configure: Regenerate.
2431 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2433 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2436 2018-10-31 Martin Liska <mliska@suse.cz>
2439 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2440 Add new argument invalid_extension.
2441 (aarch64_get_all_extension_candidates): New function.
2442 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2443 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2445 (aarch64_get_all_extension_candidates): New function.
2446 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2447 argument invalid_extension.
2448 (aarch64_parse_cpu): Likewise.
2449 (aarch64_print_hint_for_extensions): New function.
2450 (aarch64_validate_mcpu): Provide hint about invalid extension.
2451 (aarch64_validate_march): Likewise.
2452 (aarch64_handle_attr_arch): Pass new argument.
2453 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2454 (aarch64_handle_attr_isa_flags): Likewise.
2456 2018-10-31 Richard Biener <rguenther@suse.de>
2460 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2461 copy generation to useful cases. Place the copy before
2462 the definition of the backedge value when possible.
2464 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2466 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2467 * config/arc/arc.c (arc_active_insn): New function.
2468 (check_store_cacheline_hazard): Likewise.
2469 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2470 (arc_override_options): Disable delay slot scheduler for older
2472 (arc_store_addr_hazard_p): New implementation, old one renamed to
2474 (arc_store_addr_hazard_internal_p): Renamed.
2475 (arc_reorg): Don't combine into brcc instructions which are part
2476 of hardware hazard solution.
2477 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2478 (tune_arc700): Likewise.
2479 * config/arc/arc.opt (arc7xx): New tune value.
2480 * config/arc/arc700.md: Improve A7 scheduler.
2482 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2484 * config/arc/arc.c (arc_override_options): Remove
2485 TARGET_COMPACT_CASESI.
2486 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2487 (CASE_VECTOR_MODE): Likewise.
2488 (CASE_VECTOR_PC_RELATIVE): Likewise.
2489 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2490 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2491 (ADDR_VEC_ALIGN): Update.
2492 (ASM_OUTPUT_CASE_LABEL): Undefine.
2493 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2494 (TARGET_BI_BIH): Define.
2495 (DEFAULT_BRANCH_INDEX): Likewise.
2496 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2497 instructions, remove compact_casesi use case.
2498 (casesi_compact_jump): Remove.
2499 (casesi_dispatch): New pattern.
2500 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2501 compact_casesi option.
2502 * doc/invoke.texi: Document mbranch-index option.
2504 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2506 * config/arc/arc.c (arc_get_tp): Remove function.
2507 (arc_emit_call_tls_get_addr): Likewise.
2508 (arc_call_tls_get_addr): New function.
2509 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2510 * config/arc/arc.md (tls_load_tp_soft): Remove.
2511 (tls_gd_get_addr): Likewise.
2513 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2515 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2516 (mulsi3_600_lib): Remove pattern.
2517 (umulsi3_highpart_600_lib_le): Likewise.
2518 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2519 (umulsidi3): Remove call to umulsidi3_600_lib.
2520 (umulsidi3_600_lib): Remove pattern.
2521 (peephole2): Remove peephole using the above deprecated patterns.
2523 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2526 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2527 use of -mslow-flash-data and -mword-relocations.
2528 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2529 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2531 * doc/invoke.texi (-mword-relocations): Mention conflict with
2533 (-mslow-flash-data): Reciprocally.
2535 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2537 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2538 16-byte modes held in GP registers to use an even regno.
2540 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2541 (aarch64_atomic_ldop_supported_p): Remove.
2542 (aarch64_gen_atomic_ldop): Remove.
2543 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2544 Fully expand LSE operations here.
2545 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2546 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2547 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2548 and use ATOMIC_LDOP instead; use register_operand for the input;
2549 drop the split and emit insns directly.
2550 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2551 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2552 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2554 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2555 (aarch64_gen_atomic_ldop): Don't call it.
2556 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2557 Use aarch64_reg_or_zero.
2558 (aarch64_atomic_exchange<ALLI>): Likewise.
2559 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2560 operand 0; use aarch64_reg_or_zero for input; merge ...
2561 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2563 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2564 (aarch64_split_compare_and_swap): Use it.
2565 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2566 test oldval against the proper predicate.
2567 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2568 Use nonmemory_operand for expected.
2569 (cas_short_expected_pred): New.
2570 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2571 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2572 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2573 (aarch64_plushi_operand): New.
2575 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2576 Force oldval into the rval register for TARGET_LSE; emit the compare
2577 during initial expansion so that it may be deleted if unused.
2578 (aarch64_gen_atomic_cas): Remove.
2579 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2580 Change =&r to +r for operand 0; use match_dup for operand 2;
2581 remove is_weak and mod_f operands as unused. Drop the split
2583 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2584 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2585 (@aarch64_atomic_cas<GPI>): Similarly.
2587 2018-10-31 Richard Biener <rguenther@suse.de>
2589 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2592 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2594 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2595 * config/aarch64/aarch64.md: Include saphira.md
2596 * config/aarch64/saphira.md: New file for pipeline description.
2598 2018-10-30 Martin Sebor <msebor@redhat.com>
2601 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2603 (sprintf_dom_walker::compute_format_length):
2604 Avoid setting POSUNDER4K here.
2605 (get_destination_size): Handle null argument values.
2606 (get_user_idx_format): New function.
2607 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2608 functions, including user-defined with attribute format printf.
2609 Use %G to include inlining context.
2610 Set POSUNDER4K here.
2612 2018-10-30 Jan Hubicka <jh@suse.cz>
2614 * params.def (lto-partitions): Bump from 32 to 128.
2616 2018-10-30 Jan Hubicka <jh@suse.cz>
2619 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2621 (free_lang_data_in_type): Forward declare.
2622 (fld_type_variant_equal_p): New function.
2623 (fld_type_variant): New function
2624 (fld_incomplete_types): New hash.
2625 (fld_incomplete_type_of): New function
2626 (fld_simplfied-type): New function.
2627 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2628 (free_lang_data): Allocate and free fld_incomplete_type; update call
2629 of free_lang_data_in_decl.
2631 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2633 * gcov.c (output_lines): Remove duplicate line.
2635 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2637 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2638 if not in indexed or indirect form.
2639 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2640 (bswapdi2_store): Ditto.
2641 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2643 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2644 Prototype for helper function.
2646 2018-10-30 Martin Sebor <msebor@redhat.com>
2648 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2649 (target, pragma GCC optimize, pragma GCC target): Ditto.
2651 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2653 * doc/extend.texi: Fix prototype and description of
2654 __builtin_expect_with_probability.
2656 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2658 * cgraph.h (clone_function_name_1): Replaced by new
2659 clone_function_name_numbered that takes name as string; for
2660 privatize_symbol_name_1 use only.
2661 (clone_function_name): Renamed to
2662 clone_function_name_numbered to be explicit about numbering.
2663 (clone_function_name): New two-argument function that does
2664 not number its output.
2665 (clone_function_name): New three-argument function that
2666 takes a number to append to its output.
2667 * cgraphclones.c (duplicate_thunk_for_node):
2668 (clone_function_name_1): Renamed.
2669 (clone_function_name_numbered): Two new functions.
2670 (clone_function_name): Improved documentation.
2671 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2672 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2673 * final.c (final_scan_insn_1): Use the new clone_function_name
2675 * multiple_target.c (create_dispatcher_calls): Ditto.
2676 (create_target_clone): Ditto.
2677 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2678 * omp-low.c (create_omp_child_function_name): Ditto.
2679 * omp-simd-clone.c (simd_clone_create): Ditto.
2680 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2681 new clone_function_name without numbering.
2683 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2685 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2686 Assert that the allocation size is not zero.
2688 2018-10-30 Richard Biener <rguenther@suse.de>
2690 PR tree-optimization/87800
2691 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2692 non-induction or reduction PHIs.
2694 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2696 * config/aarch64/falkor-tag-collision-avoidance.c
2697 (execute_tag_collision_avoidance): Call df_note_add_problem.
2699 2018-10-30 Martin Liska <mliska@suse.cz>
2701 * doc/extend.texi: Fix typo in documentation
2702 of __builtin_expect_with_probability.
2704 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2707 * input.c (get_substring_ranges_for_loc): Detect if
2708 linemap_resolve_location gives us a NULL map, and reject
2711 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2713 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2715 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2716 Martin Sebor <msebor@redhat.com>
2717 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2719 * doc/ux.texi (Quoting): New subsection, adapted from material at
2720 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2721 MartinSebor and ManuelLopezIbanez.
2722 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2725 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2728 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2731 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2733 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2735 2018-10-29 Paul Koning <ni1d@arrl.net>
2737 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2739 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2741 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2742 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2743 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2744 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2745 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2746 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2747 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2748 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2749 Change 'vector' to '__vector'.
2750 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2751 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2752 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2753 _mm_avg_pu16): Likewise. And, whitespace corrections.
2755 2018-10-29 Richard Biener <rguenther@suse.de>
2757 PR tree-optimization/87785
2758 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2761 2018-10-29 Olivier Hainque <hainque@adacore.com>
2763 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2765 2018-10-29 Olivier Hainque <hainque@adacore.com>
2767 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2768 ports configuration macro, defaults to "gnu".
2769 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2770 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2772 2018-10-29 Olivier Hainque <hainque@adacore.com>
2774 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2776 2018-10-29 Richard Biener <rguenther@suse.de>
2778 PR tree-optimization/87790
2779 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2780 (vect_make_slp_decision): Adjust.
2781 (vect_slp_analyze_bb_1): Likewise.
2782 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2785 2018-10-29 Richard Biener <rguenther@suse.de>
2787 PR tree-optimization/87785
2788 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2790 (vect_build_slp_tree): Likewise.
2791 (vect_gather_slp_loads): New function.
2792 (vect_analyze_slp_instance): Gather loads separately from the
2795 2018-10-29 Martin Liska <mliska@suse.cz>
2797 * Makefile.in: Make dependency to json.o.
2798 * doc/gcov.texi: Document new JSON format, remove
2799 old intermediate format documentation.
2800 * gcov.c (struct function_info): Come up with m_name and
2802 (function_info::function_info): Initialize it.
2803 (function_info::~function_info): Release it.
2804 (main): Rename flag_intermediate_format to flag_json_format.
2805 (print_usage): Describe --json-format.
2806 (process_args): Set flag_json_format.
2807 (output_intermediate_line): Remove.
2808 (output_intermediate_json_line): Likewise.
2809 (get_gcov_intermediate_filename): Return new extension
2811 (output_intermediate_file): Implement JSON emission.
2812 (output_json_intermediate_file): Implement JSON emission.
2813 (generate_results): Use ::get_name for function name.
2814 Handle JSON output file.
2815 (read_graph_file): Use ::get_name instead of cplus_demangle.
2816 (read_count_file): Likewise.
2817 (solve_flow_graph): Likewise.
2818 (add_line_counts): Likewise.
2819 (accumulate_line_counts): Use new flag_json_format.
2820 (output_function_details): Use ::get_name instead of cplus_demangle.
2821 (output_lines): Likewise.
2822 * json.cc (test_writing_literals): Add new tests.
2823 * json.h (class literal): Add new boolean constructor.
2825 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
2827 PR rtl-optimization/87701
2828 PR rtl-optimization/87780
2829 * combine.c (make_more_copies): Rewrite.
2831 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2833 * doc/generic.texi (ABSU_EXPR): Document.
2834 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2835 (absu(absu(X)) -> absu(X)): Likewise.
2836 (absu(-X) -> absu(X)): Likewise.
2837 (absu(X) where X is nonnegative -> X): Likewise.
2839 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2841 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2842 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2843 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2844 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2845 (s-tm-texi): Also check timestamp on d-target.def.
2846 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2847 (build/genhooks.o): Also depend on D_TARGET_DEF.
2848 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2850 * config/aarch64/aarch64-d.c: New file.
2851 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2853 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2855 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2856 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2857 * config/arm/arm-d.c: New file.
2858 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2859 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2860 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2861 * config/arm/t-arm (arm-d.o): New rule.
2862 * config/default-d.c: New file.
2863 * config/glibc-d.c: New file.
2864 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2865 * config/i386/i386-d.c: New file.
2866 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2867 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2868 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2869 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2870 * config/i386/t-i386 (i386-d.o): New rule.
2871 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2872 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2873 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2874 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2875 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2876 * config/mips/mips-d.c: New file.
2877 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2878 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2879 * config/mips/t-mips (mips-d.o): New rule.
2880 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2881 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2882 * config/powerpcspe/powerpcspe-d.c: New file.
2883 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2885 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2886 Support GNU D by using 0 as the language type.
2887 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2888 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2889 * config/riscv/riscv-d.c: New file.
2890 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2892 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2893 * config/riscv/t-riscv (riscv-d.o): New rule.
2894 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2895 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2896 * config/rs6000/rs6000-d.c: New file.
2897 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2899 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2900 Support GNU D by using 0 as the language type.
2901 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2902 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2903 * config/s390/s390-d.c: New file.
2904 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2905 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2906 * config/s390/t-s390 (s390-d.o): New rule.
2907 * config/sparc/sparc-d.c: New file.
2908 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2910 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2911 * config/sparc/t-sparc (sparc-d.o): New rule.
2912 * config/t-glibc (glibc-d.o): New rule.
2913 * configure: Regenerated.
2914 * configure.ac (tm_d_file): New variable.
2915 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2916 * doc/contrib.texi (Contributors): Add self for the D frontend.
2917 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2918 * doc/install.texi (Configuration): Mention libphobos as an option for
2919 --enable-shared. Mention d as an option for --enable-languages.
2920 (Testing): Mention check-d as a target.
2921 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2922 name suffixes. Mention d as a -x option.
2923 * doc/sourcebuild.texi (Top Level): Mention libphobos.
2924 * doc/standards.texi (Standards): Add section on D language.
2925 * doc/tm.texi: Regenerated.
2926 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2927 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2928 * dwarf2out.c (is_dlang): New function.
2929 (gen_compile_unit_die): Use DW_LANG_D for D.
2930 (declare_in_namespace): Return module die for D, instead of adding
2931 extra declarations into the namespace.
2932 (gen_namespace_die): Generate DW_TAG_module for D.
2933 (gen_decl_die): Handle CONST_DECLSs for D.
2934 (dwarf2out_decl): Likewise.
2935 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2936 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2937 kinds of aggregates.
2938 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2939 * genhooks.c: Include d/d-target.def.
2941 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2944 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2945 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2946 (STACK_DYNAMIC_OFFSET): Likewise.
2948 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
2951 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2954 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2956 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2957 return type and other typos.
2959 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2961 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2962 a shorter sequence with fewer branches.
2963 (emit_final_str_compare_gpr): Ditto.
2965 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2967 * config/rs6000/tmmintrin.h: New file.
2968 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2970 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2972 * config/rs6000/mmintrin.h: Enable 32bit compilation.
2973 * config/rs6000/xmmintrin.h: Likewise.
2975 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2977 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2979 2018-10-26 Richard Biener <rguenther@suse.de>
2981 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2983 (vect_mark_slp_stmts_relevant): Likewise.
2984 (vect_detect_hybrid_slp_stmts): Likewise.
2985 (vect_bb_slp_scalar_cost): Likewise.
2986 (vect_remove_slp_scalar_calls): Likewise.
2988 2018-10-26 Jan Hubicka <jh@suse.cz>
2990 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2991 (warn_types_mismatch): Fix walk of DECL_NAME.
2992 (odr_types_equivalent_p): Fix overactive assert.
2994 2018-10-26 Richard Biener <rguenther@suse.de>
2996 PR tree-optimization/87105
2997 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2998 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3000 (vect_create_new_slp_node): Initialize refcnt to one.
3002 (scalar_stmts_set_t, bst_fail): Remove.
3003 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3004 (vect_build_slp_tree): Add bst_map argument and lookup
3005 already created SLP nodes.
3006 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3008 (vect_slp_rearrange_stmts): Handle a SLP graph.
3009 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3010 the CSE map. Fix indenting.
3011 (vect_schedule_slp_instance): Add short-cut.
3013 2018-10-26 Martin Liska <mliska@suse.cz>
3016 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3017 addr_expr and not with pointers.
3019 2018-10-26 Jan Hubicka <jh@suse.cz>
3021 * tree.c (free_lang_data_in_type): Only check main variants.
3022 * ipa-devirt.c (warn_odr): Make static.
3023 (types_same_for_odr): Drop strict variant.
3024 (types_odr_comparable): Likewise.
3025 (odr_or_derived_type_p): Look for main variants.
3026 (odr_name_hasher::equal): Cleanup comment.
3027 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3029 (type_variants_equivalent_p): break out from ...
3030 (odr_types_equivalent): ... here; go for main variants where needed.
3031 (warn_odr): ... here; turn static.
3032 (warn_types_mismatch): Compare mangled names of main variants.
3033 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3034 (type_with_linkage_p): Sanity check that we look at main variant.
3035 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3036 * tree.h (types_same_for_odr): Drop strict argument.
3038 2018-10-26 Richard Biener <rguenther@suse.de>
3040 PR tree-optimization/87746
3041 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3042 Simplify and fix WRT strided store groups with size not
3043 equal to step in element count.
3044 (vect_analyze_group_access_1): Dump the whole group.
3046 2018-10-25 Carl Love <cel@us.ibm.com>
3048 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3049 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3050 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3051 precicion entry for each overloaded builtin.
3052 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3053 VSCEDPUO): Rename overloaded name.
3054 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3055 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3056 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3057 define_expand for xscmpexqp instruction.
3058 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3060 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3061 Jinsong Ji <jji@us.ibm.com>
3063 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3064 function with vec_sl.
3065 (_mm_slli_epi32): Likewise.
3066 (_mm_slli_epi64): Likewise.
3067 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3068 (_mm_srai_epi32): Likewise.
3069 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3070 (_mm_srli_epi32): Likewise.
3071 (_mm_srli_epi64): Likewise.
3072 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3073 (_mm_sll_epi32): Likewise.
3074 (_mm_sll_epi64): Likewise.
3075 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3076 (_mm_sra_epi32): Likewise.
3077 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3078 (_mm_srl_epi32): Likewise.
3079 (_mm_srl_epi64): Likewise.
3081 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3082 Jinsong Ji <jji@us.ibm.com>
3084 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3085 comparison operators with vec_cmp* for compatibility due to
3086 unfortunate history; clean up formatting and use types more
3088 (_mm_sll_epi32): Likewise.
3089 (_mm_sll_epi64): Likewise.
3090 (_mm_srl_epi16): Likewise.
3091 (_mm_srl_epi32): Likewise.
3092 (_mm_srl_epi64): Likewise.
3094 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3095 Jinsong Ji <jji@us.ibm.com>
3097 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3098 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3099 __vector __bool int. Use vec_cmpgt in preference to deprecated
3100 function vec_vcmpgtfp.
3101 (_mm_max_ps): Likewise.
3103 2018-10-25 Jeff Law <law@redhat.com>
3105 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3108 2018-10-25 Martin Sebor <msebor@redhat.com>
3110 * doc/extend.texi (aligned): Expand attribute description.
3111 (Alignment): Rename section. Discuss function arguments.
3113 2018-10-25 Jan Hubicka <jh@suse.cz>
3115 * ipa-devirt.c (main_odr_variant): Remove.
3116 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3117 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3118 Drop use of main_odr_variant.
3119 (add_type_duplicate): Silence confused warnings on integer types.
3120 (get_odr_type): Always look for main variant.
3121 (register_odr_type): Simplify.
3123 2018-10-25 Richard Biener <rguenther@suse.de>
3125 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3126 Initialize ng to silence error with release checking bootstrap.
3128 2018-10-25 Richard Biener <rguenther@suse.de>
3130 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3131 (tree_if_conversion): Run CSE on the if-converted loop body.
3133 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3135 * config/s390/constraints.md (ZL): New constraint.
3136 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3138 * config/s390/s390.md (movdi_larl): Remove.
3139 (movdi_64): Add the LARL alternative.
3141 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3144 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3145 (RTX_CODE_HWINT_P): New macro.
3146 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3148 2018-10-25 Jan Hubicka <jh@suse.cz>
3150 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3153 2018-10-25 Richard Biener <rguenther@suse.de>
3155 PR tree-optimization/87665
3156 PR tree-optimization/87745
3157 * tree-vectorizer.h (get_earlier_stmt): Remove.
3158 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3160 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3162 * options.texi (Deprecated): Move list to Var section.
3164 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3165 Jinsong Ji <jji@us.ibm.com>
3167 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3168 __vector long to __vector long long.
3169 (_mm_cvtpd_ps): Likewise.
3170 (_mm_cvttpd_epi32): Likewise.
3171 (_mm_cvtpi32_pd): Likewise.
3172 (_mm_unpackhi_epi64): Likewise.
3173 (_mm_unpacklo_epi64): Likewise.
3175 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3177 PR rtl-optimization/87720
3178 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3180 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3182 * gimple-ssa-isolate-paths.c
3183 (find_implicit_erroneous_behavior): Do not change code if the
3184 pass is running for warnings only.
3185 (find_explicit_erroneous_behavior): Likewise.
3187 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3189 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3190 Define as rs6000_mangle_decl_assembler_name.
3191 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3192 long double to IEEE long double, switch the names of the long
3193 double built-in functions to be <func>f128 instead of <func>l.
3195 2018-10-24 Martin Sebor <msebor@redhat.com>
3197 * doc/extend.texi (nonnull): List no-argument form. Reference
3198 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3200 2018-10-24 Richard Biener <rguenther@suse.de>
3202 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3204 2018-10-24 Martin Liska <mliska@suse.cz>
3206 PR tree-optimization/84436
3207 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3209 (switch_conversion::contains_linear_function_p): New.
3210 (switch_conversion::build_one_array): Support linear
3211 transformation on input.
3212 * tree-switch-conversion.h (struct switch_conversion): Add
3213 contains_linear_function_p declaration.
3215 2018-10-24 Richard Biener <rguenther@suse.de>
3217 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3218 if its argument is CONSTANT_CLASS_P.
3220 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3222 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3223 it is wrong for forward declarations.
3225 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3227 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3228 SYMBOL_REF_P () check.
3230 2018-10-24 Richard Biener <rguenther@suse.de>
3232 PR tree-optimization/87105
3233 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3234 dump classification.
3235 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3236 stores by splitting the affected group after the fact.
3237 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3238 fail the SLP build because of size constraints.
3240 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3242 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3243 * configure: Regenerate.
3244 * config.in: Regenerate.
3245 * varasm.c (mergeable_string_section): Use readonly_data_section
3246 if linker doesn't support SHF_MERGE with alignment > 8.
3247 (mergeable_constant_section): Likewise.
3249 2018-10-24 Richard Biener <rguenther@suse.de>
3251 PR tree-optimization/84013
3252 * tree-ssa-structalias.c (struct msdi_data): New struct for
3253 marshalling data to walk_stmt_load_store_ops.
3254 (maybe_set_dependence_info): Refactor as callback for
3255 walk_stmt_load_store_ops.
3256 (compute_dependence_clique): Set restrict info on all stmt kinds.
3258 2018-10-24 Martin Liska <mliska@suse.cz>
3260 * cgraph.c (cgraph_node::dump):
3261 Remove reduntant dumps and make tp_first_run dump more compact.
3263 2018-10-24 Richard Biener <rguenther@suse.de>
3265 PR tree-optimization/87665
3266 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3269 2018-10-12 Jeff Law <law@redhat.com>
3271 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3274 2018-10-23 Richard Biener <rguenther@suse.de>
3276 * tree-vrp.c (add_assert_info): Guard dump_printf with
3278 * gimple-ssa-evrp-analyze.c
3279 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3280 Use value_range::ignore_equivs_equal_p.
3282 2018-10-23 Richard Biener <rguenther@suse.de>
3284 PR tree-optimization/87105
3285 PR tree-optimization/87608
3286 * passes.def (pass_all_early_optimizations): Add early phi-opt
3288 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3289 addition to debug stmts.
3290 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3291 and abs replacement early.
3292 * tree-cfg.c (gimple_empty_block_p): Likewise.
3294 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3297 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3298 specified to configure.
3299 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3301 2018-10-23 Richard Biener <rguenther@suse.de>
3303 PR tree-optimization/87700
3304 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3306 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3309 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3310 second argument from __mmask16 to __mmask8.
3311 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3312 _mm_mask_packs_epi32): Likewise.
3313 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3315 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3317 2018-10-23 Richard Biener <rguenther@suse.de>
3319 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3321 2018-10-23 Richard Biener <rguenther@suse.de>
3323 PR tree-optimization/86144
3324 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3325 over simd attribute.
3327 2018-10-23 Richard Biener <rguenther@suse.de>
3329 PR tree-optimization/87693
3330 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3331 the case we do not find the taken edge.
3333 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3334 Jinsong Ji <jji@us.ibm.com>
3336 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3337 (_mm_store_pd): Use unaligned vector type for pointer cast.
3338 (_mm_maskmoveu_si128): Likewise.
3339 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3340 (_mm_store_ps): Use unaligned vector type for pointer cast.
3342 2018-10-22 Paul Koning <ni1d@arrl.net>
3344 * symtab.c (symtab_node::increase_alignment): Correct max
3347 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3349 PR tree-optimization/87633
3350 * match.pd: Do not generate unordered integer comparisons.
3352 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3354 PR rtl-optimization/87600
3355 * combine.c: Add include of expr.h.
3356 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3357 register to a pseudo.
3358 (make_more_copies): New function, add a copy to a new pseudo after
3359 the moves from hard registers into pseudos.
3360 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3361 later. Call make_more_copies.
3363 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3365 * lra-constraints.c (process_alt_operands): New local array,
3366 matching_early_clobber. Check matching_early_clobber before
3367 decrementing reject, and set matching_early_clobber after.
3369 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3372 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3373 call output_addr_const and hope for the best.
3375 2018-10-22 Richard Biener <rguenther@suse.de>
3377 * gimple-ssa-evrp-analyze.c
3378 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3379 smarter about what ranges to use.
3380 * tree-vrp.c (add_assert_info): Dump here.
3381 (register_edge_assert_for_2): Instead of here at multiple but
3384 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3385 * gcc.dg/predict-6.c: Adjust.
3386 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3387 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3388 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3390 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3391 Richard Biener <rguenther@suse.de>
3393 * bitmap.h: Update data structure documentation, including a
3394 description of bitmap views as either linked-lists or splay trees.
3395 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3396 (struct bitmap_head_def): Likewise.
3397 (bitmap_list_view, bitmap_tree_view): New prototypes.
3398 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3400 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3401 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3402 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3403 released bitmap element here.
3404 (bitmap_element_free): Remove.
3405 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3406 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3407 this function similar ones such that linked-list bitmap implementation
3408 functions are grouped.
3409 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3410 and moved for grouping.
3411 (bitmap_list_insert_element_after): Renamed from
3412 bitmap_elt_insert_after, and moved for grouping.
3413 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3414 (bitmap_tree_link_left, bitmap_tree_link_right,
3415 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3416 bitmap_tree_link_element, bitmap_tree_unlink_element,
3417 bitmap_tree_find_element): New functions for splay-tree bitmap
3419 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3420 Renamed and moved, see above entries.
3421 (bitmap_tree_listify_from): New function to convert part of a splay
3422 tree bitmap to a linked-list bitmap.
3423 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3424 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3425 (bitmap_find_bit): Remove.
3426 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3427 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3428 Handle splay tree bitmaps.
3429 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3430 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3431 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3432 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3433 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3434 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3435 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3436 corresponding changes to use linked-list specific bitmap_element
3437 manipulation functions as applicable for efficiency.
3438 (bitmap_tree_to_vec): New function.
3439 (debug_bitmap_elt_file): New function split out from ...
3440 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3441 (bitmap_print): Likewise.
3443 PR tree-optimization/63155
3444 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3446 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3449 2018-10-22 Martin Liska <mliska@suse.cz>
3451 PR tree-optimization/87686
3453 2018-08-29 Martin Liska <mliska@suse.cz>
3455 * tree-switch-conversion.c (switch_conversion::expand):
3456 Strenghten assumption about gswitch statements.
3458 2018-10-22 Martin Liska <mliska@suse.cz>
3460 * ipa-icf.c (sem_item::compare_attributes): Remove.
3461 (sem_item::compare_referenced_symbol_properties): Use
3462 attribute_list_equal instead.
3463 (sem_function::equals_wpa): Likewise.
3464 * ipa-icf.h: Remove compare_attributes.
3466 2018-10-22 Richard Biener <rguenther@suse.de>
3469 * mem-stats.h (mem_usage::operator==): Fix pasto.
3471 2018-10-22 Richard Biener <rguenther@suse.de>
3473 PR tree-optimization/87640
3474 * tree-vrp.c (set_value_range_with_overflow): Decompose
3476 (extract_range_from_binary_expr_1): Adjust.
3478 2018-10-22 Martin Jambor <mjambor@suse.cz>
3480 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3481 (stmt_can_throw_external): Likewise.
3482 (stmt_can_throw_internal): Likewise.
3483 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3484 (lower_eh_constructs_2): Likewise.
3485 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3486 (stmt_can_throw_external): Likewise.
3487 (stmt_can_throw_internal): Likewise.
3488 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3489 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3490 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3491 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3492 (pass_lower_eh_dispatch::execute): Pass cfun to
3493 stmt_can_throw_external.
3494 (cleanup_empty_eh): Likewise.
3495 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3496 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3497 stmt_can_throw_external instead of pushing it to cfun.
3498 (symbol_table::create_edge): Likewise.
3499 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3500 stmt_can_throw_internal.
3501 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3502 to stmt_could_throw_p.
3503 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3504 stmt_can_throw_internal.
3505 (pass_store_merging::execute): Likewise.
3506 * gimple-ssa-strength-reduction.c
3507 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3509 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3510 stmt_can_throw_internal.
3511 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3512 to stmt_can_throw_external.
3513 (check_stmt): Pass cfun to stmt_could_throw_p.
3514 (check_stmt): Pass cfun to stmt_can_throw_external.
3515 (pass_nothrow::execute): Likewise.
3516 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3517 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3518 stmt_can_throw_internal.
3519 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3520 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3521 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3522 * tree-complex.c (expand_complex_libcall): Pass cfun to
3523 stmt_could_throw_p and to stmt_can_throw_internal.
3524 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3525 * tree-inline.c (copy_edges_for_bb): Likewise.
3526 (maybe_move_debug_stmts_to_successors): Likewise.
3527 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3529 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3530 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3531 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3532 stmt_can_throw_internal.
3533 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3534 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3536 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3537 stmt_can_throw_internal.
3538 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3539 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3541 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3542 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3543 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3544 (convert_mult_to_fma_1): Likewise.
3545 (convert_to_divmod): Likewise.
3546 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3547 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3548 * tree-ssa-propagate.c
3549 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3550 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3551 (maybe_optimize_range_tests): Likewise.
3552 (linearize_expr_tree): Likewise.
3553 (reassociate_bb): Likewise.
3554 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3555 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3556 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3557 (handle_char_store): Likewise.
3558 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3559 stmt_can_throw_internal.
3560 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3562 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3563 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3564 (vectorizable_simd_clone_call): Likewise.
3565 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3566 (gimple_stringop_fixed_value): Likewise.
3568 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3570 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3571 literal pool references.
3572 (s390_check_qrst_address): Adapt to the new behavior of
3573 s390_loadrelative_operand_p ().
3575 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3578 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3580 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3583 * config/i386/sse.md (*<code><mode>3_bcst): New.
3585 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3588 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3589 V4DI, V16SI and V8DI.
3590 (*sub<mode>3<mask_name>_bcst): New.
3591 (*add<mode>3<mask_name>_bcst): Likewise.
3593 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3594 Jinsong Ji <jji@us.ibm.com>
3596 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3597 __m64 with __vector unsigned long long for compatibility.
3598 (_mm_movemask_epi8): Likewise.
3599 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3600 (_mm_cvttps_pi32): Likewise.
3601 (_mm_cvtpi32_ps): Likewise.
3602 (_mm_cvtps_pi16): Likewise.
3603 (_mm_loadh_pi): Likewise.
3604 (_mm_storeh_pi): Likewise.
3605 (_mm_movehl_ps): Likewise.
3606 (_mm_movelh_ps): Likewise.
3607 (_mm_loadl_pi): Likewise.
3608 (_mm_storel_pi): Likewise.
3609 (_mm_movemask_ps): Likewise.
3610 (_mm_shuffle_pi16): Likewise.
3612 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3615 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3616 __builtin_ia32_vfnmsubpd512_mask.
3617 (_mm512_mask_fnmsub_round_pd): Likewise.
3618 (_mm512_fnmsub_pd): Likewise.
3619 (_mm512_mask_fnmsub_pd): Likewise.
3620 (_mm512_maskz_fnmsub_round_pd): Use
3621 __builtin_ia32_vfnmsubpd512_maskz.
3622 (_mm512_maskz_fnmsub_pd): Likewise.
3623 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3624 (_mm512_mask_fnmsub_round_ps): Likewise.
3625 (_mm512_fnmsub_ps): Likewise.
3626 (_mm512_mask_fnmsub_ps): Likewise.
3627 (_mm512_maskz_fnmsub_round_ps): Use
3628 __builtin_ia32_vfnmsubps512_maskz.
3629 (_mm512_maskz_fnmsub_ps): Likewise.
3630 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3631 __builtin_ia32_vfnmsubpd256_mask.
3632 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3633 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3634 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3635 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3636 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3637 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3638 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3639 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3640 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3641 __builtin_ia32_vfnmsubpd.
3642 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3643 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3644 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3645 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3646 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3647 * config/i386/i386-builtin.def: Add
3648 __builtin_ia32_vfnmsubpd256_mask,
3649 __builtin_ia32_vfnmsubpd256_maskz,
3650 __builtin_ia32_vfnmsubpd128_mask,
3651 __builtin_ia32_vfnmsubpd128_maskz,
3652 __builtin_ia32_vfnmsubps256_mask,
3653 __builtin_ia32_vfnmsubps256_maskz,
3654 __builtin_ia32_vfnmsubps128_mask,
3655 __builtin_ia32_vfnmsubps128_maskz,
3656 __builtin_ia32_vfnmsubpd512_mask,
3657 __builtin_ia32_vfnmsubpd512_maskz,
3658 __builtin_ia32_vfnmsubps512_mask,
3659 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3660 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3661 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3662 __builtin_ia32_vfnmsubpd256.
3663 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3664 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3665 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3667 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3669 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3671 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3673 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3676 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3677 __builtin_ia32_vfnmaddpd512_mask.
3678 (_mm512_mask_fnmadd_round_pd): Likewise.
3679 (_mm512_fnmadd_pd): Likewise.
3680 (_mm512_mask_fnmadd_pd): Likewise.
3681 (_mm512_maskz_fnmadd_round_pd): Use
3682 __builtin_ia32_vfnmaddpd512_maskz.
3683 (_mm512_maskz_fnmadd_pd): Likewise.
3684 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3685 (_mm512_mask_fnmadd_round_ps): Likewise.
3686 (_mm512_fnmadd_ps): Likewise.
3687 (_mm512_mask_fnmadd_ps): Likewise.
3688 (_mm512_maskz_fnmadd_round_ps): Use
3689 __builtin_ia32_vfnmaddps512_maskz.
3690 (_mm512_maskz_fnmadd_ps): Likewise.
3691 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3692 __builtin_ia32_vfnmaddpd256_mask.
3693 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3694 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3695 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3696 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3697 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3698 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3699 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3700 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3701 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3702 __builtin_ia32_vfnmaddpd.
3703 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3704 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3705 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3706 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3707 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3708 * config/i386/i386-builtin.def: Add
3709 __builtin_ia32_vfnmaddpd256_mask,
3710 __builtin_ia32_vfnmaddpd256_maskz,
3711 __builtin_ia32_vfnmaddpd128_mask,
3712 __builtin_ia32_vfnmaddpd128_maskz,
3713 __builtin_ia32_vfnmaddps256_mask,
3714 __builtin_ia32_vfnmaddps256_maskz,
3715 __builtin_ia32_vfnmaddps128_mask,
3716 __builtin_ia32_vfnmaddps128_maskz,
3717 __builtin_ia32_vfnmaddpd512_mask,
3718 __builtin_ia32_vfnmaddpd512_maskz,
3719 __builtin_ia32_vfnmaddps512_mask,
3720 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3721 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3722 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3723 __builtin_ia32_vfnmaddpd256.
3724 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3725 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3726 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3728 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3730 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3732 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3734 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3737 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3738 __builtin_ia32_vfmsubpd512_mask.
3739 (_mm512_mask_fmsub_round_pd): Likewise.
3740 (_mm512_fmsub_pd): Likewise.
3741 (_mm512_mask_fmsub_pd): Likewise.
3742 (_mm512_maskz_fmsub_round_pd): Use
3743 __builtin_ia32_vfmsubpd512_maskz.
3744 (_mm512_maskz_fmsub_pd): Likewise.
3745 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3746 (_mm512_mask_fmsub_round_ps): Likewise.
3747 (_mm512_fmsub_ps): Likewise.
3748 (_mm512_mask_fmsub_ps): Likewise.
3749 (_mm512_maskz_fmsub_round_ps): Use
3750 __builtin_ia32_vfmsubps512_maskz.
3751 (_mm512_maskz_fmsub_ps): Likewise.
3752 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3753 __builtin_ia32_vfmsubpd256_mask.
3754 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3755 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3756 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3757 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3758 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3759 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3760 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3761 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3762 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3763 __builtin_ia32_vfmsubpd.
3764 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3765 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3766 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3767 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3768 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3769 * config/i386/i386-builtin.def: Add
3770 __builtin_ia32_vfmsubpd256_mask,
3771 __builtin_ia32_vfmsubpd256_maskz,
3772 __builtin_ia32_vfmsubpd128_mask,
3773 __builtin_ia32_vfmsubpd128_maskz,
3774 __builtin_ia32_vfmsubps256_mask,
3775 __builtin_ia32_vfmsubps256_maskz,
3776 __builtin_ia32_vfmsubps128_mask,
3777 __builtin_ia32_vfmsubps128_maskz,
3778 __builtin_ia32_vfmsubpd512_mask,
3779 __builtin_ia32_vfmsubpd512_maskz,
3780 __builtin_ia32_vfmsubps512_mask,
3781 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3782 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3783 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3784 __builtin_ia32_vfmsubpd256.
3785 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3786 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3787 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3789 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3791 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3793 (fmai_vmfmsub_<mode><round_name>): Likewise.
3795 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3797 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3798 Remove plus. Renamed to ...
3799 (*sub<mode>3<mask_name>_bcst): This.
3800 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3801 (*add<mode>3<mask_name>_bcst): This.
3803 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3806 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3808 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3811 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3812 (_mm_or_epi32): Likewise.
3813 (_mm256_xor_epi32): Likewise.
3814 (_mm_xor_epi32): Likewise.
3815 (_mm256_or_epi64): Likewise.
3816 (_mm_or_epi64): Likewise.
3817 (_mm256_xor_epi64): Likewise.
3818 (_mm_xor_epi64): Likewise.
3820 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
3823 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3825 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3828 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3830 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3832 * doc/ux.texi: Move @section directly after @node.
3834 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3838 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3839 depend closely nested inside of loop with ordered clause with
3842 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3844 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3845 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3846 * doc/ux.texi: New file.
3848 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3850 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3851 be the first CR field allocated.
3853 2018-10-19 Richard Biener <rguenther@suse.de>
3856 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3857 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3859 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3862 * config/i386/sse.md
3863 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3864 (*add<mode>3<mask_name>_bcst_2): Likewise.
3866 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3868 * config/i386/sse.md
3869 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3870 Replace nonimmediate_operand with register_operand.
3871 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3873 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3876 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3878 PR rtl-optimization/87596
3879 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3880 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3881 for instructions in FROM..TO range.
3883 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
3885 * cfgexpand.c (expand_one_var): Use specific wording in error message
3886 for non-local frame variables.
3887 * stor-layout.c (layout_decl): Do not issue a warning for them.
3889 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
3891 * haifa-sched.c (priority): Add force_recompute parameter.
3892 (apply_replacement): Call priority () with force_recompute = true.
3893 (restore_pattern): Likewise.
3895 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3897 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3898 HOST_BITS_PER_WIDE_INT.
3899 (test_vector_ops_duplicate): Likewise.
3901 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3904 * config/i386/sse.md (VF_AVX512): New.
3905 (avx512bcst): Likewise.
3906 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3908 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3910 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3913 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
3915 * doc/invoke.texi (-dumpversion): Improve grammar.
3916 (-dumpfullversion): Make more consistent with -dumpversion.
3918 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3920 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3921 Set JUMP_LABEL to the jump insn.
3922 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3923 Predict emitted jump and add label to jump insn.
3925 2018-10-18 David Malcolm <dmalcolm@redhat.com>
3927 PR tree-optimization/87562
3928 * input.c (get_substring_ranges_for_loc): Use
3929 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3930 getting the linemap for the endpoint. Verify that it's either
3931 in the same linemap as the start point's spelling location, or
3932 at least in the same file.
3934 2018-10-18 Richard Biener <rguenther@suse.de>
3936 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3937 feed width-specific load/store costs through ix86_vec_cost.
3938 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3939 (k8_cost): Likewise.
3940 (bdver_cost): Likewise.
3941 (znver1_cost): Likewise.
3942 (btver1_cost): Likewise.
3943 (btver2_cost): Likewise.
3945 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3947 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3948 to simplify subreg of vec_merge.
3950 2018-10-18 Richard Biener <rguenther@suse.de>
3952 * config/i386/i386.c: Fix costing of vector FMA.
3954 2018-10-18 Richard Biener <rguenther@suse.de>
3956 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3958 (ix86_builtin_vectorization_cost): For vec_construct properly
3959 cost insertion into SSE regs.
3960 (...): Adjust calls to ix86_vec_cost.
3962 2018-10-18 Richard Biener <rguenther@suse.de>
3966 2018-02-07 Richard Biener <rguenther@suse.de>
3968 PR tree-optimization/84204
3969 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3972 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3975 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3977 (test_vector_ops_duplicate): Add test for a scalar subreg of a
3978 VEC_MERGE of a VEC_DUPLICATE.
3980 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3982 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3983 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3984 * doc/standards.texi (C Language): Document C2X.
3985 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3986 (rl78_option_override): Handle "GNU C2X" language name.
3988 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3990 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3991 Document C17 as published in 2018.
3993 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3996 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3997 bail out if both sides do not have the same storage order.
3999 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4001 * bitmap.c (bitmap_head::dump): New.
4002 * bitmap.h (bitmap_head): Add dump().
4003 * gimple-ssa-evrp-analyze.c
4004 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4005 (evrp_range_analyzer::set_ssa_range_info): Same.
4006 (evrp_range_analyzer::record_ranges_from_phis): Same.
4007 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4008 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4009 * gimple-ssa-sprintf.c (get_int_range): Same.
4010 (format_integer): Same.
4011 (sprintf_dom_walker::handle_gimple_call): Same.
4012 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4013 (ipcp_vr_lattice::top_p): Same.
4014 (ipcp_vr_lattice::bottom_p): Same.
4015 (ipcp_vr_lattice::set_to_bottom): Same.
4016 (ipa_vr_operation_and_type_effects): Same.
4017 (propagate_vr_across_jump_function): Same.
4018 (ipcp_store_vr_results): Same.
4019 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4020 (ipa_print_node_jump_functions_for_edge): Same.
4021 (ipa_get_value_range): Same.
4022 (ipa_compute_jump_functions_for_edge): Same.
4023 (ipa_write_jump_function): Same.
4024 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4025 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4027 * vr-values.c (set_value_range_to_nonnegative): Same.
4028 (set_value_range_to_truthvalue): Same.
4029 (vr_values::get_value_range): Same.
4030 (vr_values::set_defs_to_varying): Same.
4031 (vr_values::update_value_range): Same.
4032 (symbolic_range_based_on_p): Same.
4033 (vr_values::op_with_boolean_value_range_p): Same.
4034 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4035 (vr_values::extract_range_from_ssa_name): Same.
4036 (vr_values::extract_range_from_binary_expr): Same.
4037 (vr_values::extract_range_from_unary_expr): Same.
4038 (vr_values::extract_range_from_cond_expr): Same.
4039 (vr_values::extract_range_from_comparison): Same.
4040 (vr_values::check_for_binary_op_overflow): Same.
4041 (vr_values::extract_range_basic): Same.
4042 (vr_values::extract_range_from_assignment): Same.
4043 (compare_ranges): Same.
4044 (compare_range_with_value): Same.
4045 (vr_values::adjust_range_with_scev): Same.
4046 (vrp_valueize): Same.
4047 (vrp_valueize_1): Same.
4048 (vr_values::get_vr_for_comparison): Same.
4049 (vr_values::compare_name_with_value): Same.
4050 (vr_values::compare_names): Same.
4051 (vr_values::vrp_evaluate_conditional): Same.
4052 (find_case_label_ranges): Same.
4053 (vr_values::vrp_visit_switch_stmt): Same.
4054 (vr_values::extract_range_from_phi_node): Same.
4055 (vr_values::simplify_div_or_mod_using_ranges): Same.
4056 (vr_values::simplify_bit_ops_using_ranges): Same.
4057 (test_for_singularity): Same.
4058 (range_fits_type_p): Same.
4059 (vr_values::simplify_cond_using_ranges_1): Same.
4060 (vr_values::simplify_switch_using_ranges): Same.
4061 (vr_values::simplify_float_conversion_using_ranges): Same.
4062 (vr_values::two_valued_val_range_p): Same.
4063 (vr_values::add_equivalence): Move to value_range::equiv_add.
4064 * vr-values.h (vr_values::add_equivalence): Remove.
4065 (VR_INITIALIZER): Remove.
4066 * tree-vrp.c (value_range::set): New.
4067 (value_range::equiv_add): New.
4068 (value_range::value_range): New.
4069 (value_range::deep_copy): New.
4070 (value_range::check): New.
4071 (value_range::equal_p): New.
4072 (value_range::ignore_equivs_equal_p): New.
4073 (value_range::operator==): New.
4074 (value_range::operator!=): New.
4075 (value_range::symbolic_p): New.
4076 (value_range::numeric_p): New.
4077 (value_range::set_undefined): New.
4078 (value_range::set_varying): New.
4079 (value_range::may_contain_p): New.
4080 (value_range::equiv_clear): New.
4081 (value_range::singleton_p): New.
4082 (value_range::intersect): New.
4083 (value_range::dump): New.
4084 (value_range::set_and_canonicalize): New.
4085 (set_value_range): Adjust for value_range API.
4086 (set_value_range_to_undefined): Same.
4087 (set_value_range_to_varying): Same.
4088 (set_and_canonicalize_value_range): Same.
4089 (set_value_range_to_nonnull): Same.
4090 (set_value_range_to_null): Same.
4091 (range_is_null): Same.
4092 (range_is_nonnull): Same.
4093 (range_int_cst_p): Same.
4094 (range_int_cst_singleton_p): Same.
4095 (symbolic_range_p): Same.
4096 (range_includes_zero_p): Same.
4097 (value_range_constant_singleton): Same.
4098 (vrp_set_zero_nonzero_bits): Same.
4099 (ranges_from_anti_range): Same.
4100 (extract_range_into_wide_ints): Same.
4101 (extract_range_from_multiplicative_op): Same.
4102 (set_value_range_with_overflow): Same.
4103 (extract_range_from_binary_expr_1): Same.
4104 (extract_range_from_unary_expr): Same.
4105 (dump_value_range): Same.
4106 (debug_value_range): Same.
4107 (vrp_prop::check_array_ref): Same.
4108 (vrp_prop::check_mem_ref): Same.
4109 (vrp_prop::vrp_initialize): Same.
4110 (vrp_prop::visit_stmt): Same.
4111 (intersect_ranges): Same.
4112 (vrp_prop::visit_phi): Same.
4113 (vrp_prop::vrp_finalize): Same.
4114 (determine_value_range_1): Same.
4115 (determine_value_range): Same.
4116 (vrp_intersect_ranges_1): Rename to...
4117 (vrp_intersect_1): this.
4118 (vrp_intersect_ranges): Rename to...
4119 (value_range::intersect_helper): ...this.
4120 (vrp_meet_1): Rename to...
4121 (value_range::union_helper): ...this.
4122 (vrp_meet): Rename to...
4123 (value_range::union_): ...this.
4124 (copy_value_range): Remove.
4125 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4126 (value_range::vrtype): New.
4127 (value_range::type): New.
4128 (value_range::equiv): New.
4129 (value_range::min): New.
4130 (value_range::max): New.
4131 (value_range::varying_p): New.
4132 (value_range::undefined_p): New.
4133 (value_range::null_p): New.
4134 (value_range::equiv_add): New.
4135 (copy_value_range): Remove.
4137 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4139 * Makefile.in (SELFTEST_TARGETS): New.
4140 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4141 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4142 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4144 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4145 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4147 * configure: Regenerate.
4148 * configure.ac (selftest_languages): New.
4150 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4152 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4153 overflow wraps argument.
4154 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4155 wide_int_range_multiplicative_op.
4156 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4157 overflow wraps argument.
4158 (wide_int_range_multiplicative_op): Same.
4159 (wide_int_range_lshift): Same.
4160 (wide_int_range_div): Same.
4161 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4162 (wide_int_range_lshift): Same.
4163 (wide_int_range_div): Same.
4165 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4167 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4168 use sign as argument.
4169 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4170 wide_int_range_shift_undefined_p.
4172 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4174 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4176 (@despeculate_copy<ALLI_TI:mode>): ... This.
4177 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4180 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4182 * config.gcc: Obsolete *-*-solaris2.10*.
4183 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4185 2018-10-12 Jeff Law <law@redhat.com>
4187 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4188 reg + sym +- const_int addressing modes.
4190 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4192 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4193 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4195 (layout::start_annotation_line): Only print up to 3 of the
4196 margin character, to avoid touching the left-hand side.
4197 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4198 minimum margin width, as set by test_diagnostic_context's ctor.
4199 (selftest::test_fixit_insert_containing_newline): Likewise.
4200 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4201 (selftest::test_line_numbers_multiline_range): Clear
4202 dc.min_margin_width.
4203 * diagnostic.c (diagnostic_initialize): Initialize
4205 * diagnostic.h (struct diagnostic_context): Add field
4207 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4208 * opts.c (common_handle_option): Handle
4209 OPT_fdiagnostics_minimum_margin_width_.
4210 * selftest-diagnostic.c
4211 (selftest::test_diagnostic_context::test_diagnostic_context):
4212 Initialize min_margin_width to 6.
4213 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4215 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4217 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4218 Fix usage of "error_at_rich_loc" in the comment.
4220 2018-10-15 Renlin Li <renlin.li@arm.com>
4223 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4224 if-conversioned loop when it contains ifn with types not
4225 supported by backend.
4226 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4227 (direct_internal_fn_supported_p): New helper function.
4228 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4230 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4233 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4234 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4235 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4237 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4239 PR tree-optimization/87022
4240 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4241 bits in dist vector rather than the first one.
4243 2018-10-15 Richard Biener <rguenther@suse.de>
4246 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4247 (visit_loadstore): When a used restrict tag escaped verify that
4248 the points-to solution of "other" pointers do not include
4250 (compute_dependence_clique): If a used restrict tag escaped
4251 communicated that down to visit_loadstore.
4253 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4255 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4256 into reg if it isn't a general operand.
4258 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4261 * config/i386/sse.md (*vec_dupv2di): Add register source to
4264 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4267 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4268 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4269 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4270 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4272 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4274 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4275 (notice_args_size): Set it in the current trace if no insn that can
4276 throw internally has been seen yet.
4277 (connect_traces): When connecting args_size between traces, allow the
4278 incoming values not to match if there is an insn setting it before the
4279 first insn that can throw internally; in that case, force the creation
4280 of a CFI note on this latter insn.
4282 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4284 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4285 the base class, because using the injected-class-name was not clearly
4286 specified until DR 176.
4288 2018-10-12 Paul Koning <ni1d@arrl.net>
4290 * config/pdp11/pdp11.md (doloop_end): New expander.
4291 (doloop_end_insn): renamed from "doloop_end".
4292 (addqi3): New pattern.
4293 (subqi3): New pattern.
4294 * config/pdp11/predicates.md (incdec_operand): New predicate.
4296 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4299 * real.c (format_helper::can_represent_integral_type_p): New function
4300 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4301 * match.pd: New pattern.
4303 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4305 * configure.ac: Introduce --enable-large-address-aware
4306 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4307 * doc/install.texi: Document it.
4308 * configure, config.in: Rebuilt.
4309 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4310 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4311 (LINK_SPEC): Insert it.
4312 * config/i386/mingw-w64.h: Likewise.
4314 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4316 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4318 PR rtl-optimization/87600
4319 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4321 2018-10-12 Paul Koning <ni1d@arrl.net>
4323 * doc/md.texi (doloop_end): Document that the pattern code may
4324 need to check operand mode.
4326 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4328 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4329 to zero-extend between int and floating-point registers.
4330 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4331 ldp into floating-point registers. Add type and arch attributes.
4332 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4333 Use f_loads for type attribute.
4335 2018-10-11 Martin Sebor <msebor@redhat.com>
4337 * doc/extend.texi (attribute packed): Correct typos.
4339 2018-10-11 Martin Sebor <msebor@redhat.com>
4341 * doc/extend.texi (attribute flatten): Mention interaction with
4344 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4347 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4348 Set new_decl virtual flag to zero.
4350 2018-10-11 Martin Sebor <msebor@redhat.com>
4353 * doc/extend.texi (attribute format_arg): Discuss using multiple
4354 attributes on a single function.
4356 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4358 PR tree-optimization/86829
4359 * match.pd (sin (atan (x))): New simplification rules.
4360 (cos (atan (x))): Likewise.
4361 * real.c (build_sinatan_real): New function.
4362 * real.h (build_sinatan_real): Prototype.
4364 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4366 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4368 (fold_mergeeo_helper): New helper function.
4369 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4370 intrinsics. Correct some whitespace indentation issues.
4372 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4375 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4376 Use HOST_WIDE_INT_1U for shift.
4378 2018-10-11 Doug Rupp <rupp@adacore.com>
4379 Olivier Hainque <hainque@adacore.com>
4381 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4382 Pass --relax to the linker for RTPs.
4383 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4385 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4386 Jan Hubicka <jh@suse.cz>
4387 Martin Jambor <mjambor@suse.cz>
4389 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4390 the same elements are repeated rather than printing all of them.
4391 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4392 "repeated" elements.
4393 * read-rtl-function.c (test_loading_repeat): New function.
4394 (read_rtl_function_c_tests): Call test_loading_repeat.
4395 * rtl-tests.c (test_dumping_repeat): New function.
4396 (rtl_tests_c_tests): Call test_dumping_repeat.
4398 2018-10-11 Richard Biener <rguenther@suse.de>
4400 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4401 bdver?_cost): Unify to ...
4402 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4403 * config/i386/i386.c (processor_cost_table): Adjust.
4405 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4408 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4409 the thunk when expanding to GIMPLE.
4411 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4413 * varasm.c (mergeable_string_section): Don't try to move zero-length
4414 strings to the merge section.
4416 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4419 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4421 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4424 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4425 to special_args set.
4427 2018-10-10 Richard Biener <rguenther@suse.de>
4429 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4430 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4431 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4432 and recursing and pattern terminating the recursion on SSE
4433 vector width using ix86_expand_reduc.
4434 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4435 width and recursing and SSE2 vector variant doing the final
4436 reduction with ix86_expand_reduc.
4437 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4438 with terminating the recursion at AVX level, splitting that
4441 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4443 * genmatch.c (error_cb): Rename to...
4444 (diagnostic_cb): ...this, converting int params to enums.
4445 (fatal_at): Update for renaming.
4446 (warning_at): Likewise.
4448 * input.c (selftest::ebcdic_execution_charset::apply):
4449 Update for renaming of...
4450 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4452 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4453 converting level and reason to enums.
4454 (class selftest::lexer_error_sink): Rename to...
4455 (class selftest::lexer_test_options): ...this, renaming field
4456 "m_errors" to "m_diagnostics".
4457 (selftest::lexer_test_options::apply): Update for renaming of...
4458 (selftest::lexer_test_options::on_error): ...this, renaming to...
4459 (selftest::lexer_test_options::on_diagnostic): ...this
4460 converting level and reason to enums.
4461 (selftest::test_lexer_string_locations_raw_string_unterminated):
4462 Update for renamings.
4463 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4466 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4468 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4469 * config/rs6000/pmmintrin.h: New file.
4471 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4473 PR tree-optimization/86659
4474 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4476 2018-10-09 Richard Biener <rguenther@suse.de>
4478 PR tree-optimization/63155
4479 * tree-ssa-structalias.c: Include tree-ssa.h.
4480 (get_constraint_for_ssa_var): For undefs return nothing_id.
4481 (find_func_aliases): Cleanup PHI handling.
4483 2018-10-09 Richard Biener <rguenther@suse.de>
4485 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4488 2018-10-09 Martin Liska <mliska@suse.cz>
4490 * asan.c (asan_emit_stack_protection): If a stack variable
4491 is located in a same file as current function, then emit
4492 line info into variable definition string.
4494 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4496 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4499 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4501 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4504 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4506 PR tree-optimization/86659
4507 * gimple-match.h (struct gimple_match_op): Add reverse field.
4508 (gimple_match_op::set_op): New overloaded method.
4509 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4510 the REF_REVERSE_STORAGE_ORDER flag on the value.
4511 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4512 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4514 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4517 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4518 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4520 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4523 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4524 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4526 2018-10-08 Richard Biener <rguenther@suse.de>
4528 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4529 cost the same as AVX128 ones.
4531 2018-10-08 Paul Koning <ni1d@arrl.net>
4533 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4534 (expand_block_move): New function.
4535 * config/pdp11/pdp11.c (output_block_move): Remove.
4536 (expand_block_move): New function.
4537 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4538 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4539 (*movmemhi1): Remove.
4541 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4543 * config/s390/2827.md: Increase latencies for some FP instructions.
4545 2018-10-08 Richard Biener <rguenther@suse.de>
4547 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4549 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4550 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4551 (add_stmt_cost): Dump return value of the hook.
4553 2018-10-08 Richard Biener <rguenther@suse.de>
4555 PR tree-optimization/63155
4556 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4557 (ssa_propagation_engine::ssa_propagate): Remove redundant
4558 bitmap bit clearing.
4560 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4562 PR rtl-optimization/86939
4563 PR rtl-optimization/87479
4564 * ira.h (non_conflicting_reg_copy_p): New prototype.
4565 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4566 (make_hard_regno_dead): Don't add conflicts for register
4567 ignore_reg_for_conflicts.
4568 (make_object_dead): Likewise.
4569 (non_conflicting_reg_copy_p): New function.
4570 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4571 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4572 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4573 (make_hard_regno_dead): Don't add conflicts for register
4574 ignore_reg_for_conflicts. Remove special conflict handling of
4575 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4576 check_pic_pseudo_p and update callers.
4577 (mark_pseudo_dead): Don't add conflicts for register
4578 ignore_reg_for_conflicts.
4579 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4581 2018-10-05 Andrew Waterman <andrew@sifive.com>
4582 Jim Wilson <jimw@sifive.com>
4584 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4585 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4586 new pattern using HONOR_SNANS that emits one extra instruction.
4588 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4590 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4591 patterns): Merge SI and DI patterns to a GPR pattern.
4592 (unnamed define_insn and define_split for record form of that): Merge
4593 to a single define_insn_and_split pattern.
4595 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4598 * input.c (expand_location_to_spelling_point): Add param "aspect"
4599 and use rather than hardcoding LOCATION_ASPECT_CARET.
4600 (get_substring_ranges_for_loc): Handle the case of a single token
4601 within a macro expansion.
4602 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4603 defaulting to LOCATION_ASPECT_CARET.
4605 2018-10-05 Paul Koning <ni1d@arrl.net>
4607 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4608 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4609 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4610 (pdp11_guard_type): New function.
4612 2018-10-05 Paul Koning <ni1d@arrl.net>
4614 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4615 * config/pdp11/pdp11.opt (mfloat32): Remove.
4617 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4618 (pdp11 -mfloat64): Remove.
4620 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4622 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4623 (*cmp<mode>_cc_i387): Ditto.
4624 (*cmpu<mode>_cc_i387): Ditto.
4625 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4626 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4628 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4629 Emit x86_sahf_1 pattern.
4630 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4631 (ix86_expand_carry_flag_compare): Ditto.
4633 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4635 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4636 to reg_or_0_operand. Add "C" constraint.
4637 (*cmpxf_cc_i387): Ditto.
4638 (*cmp<mode>_i387): Change operand 2 predicate
4639 to nonimm_or_0_operand. Add "C" constraint.
4640 (*cmp<mode>_cc_i387): Ditto.
4641 (*cmp<mode>_0_i387): Remove insn pattern.
4642 (*cmp<mode>_0_cc_i387): Ditto.
4644 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4646 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4647 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4648 from vector_move_operand. Update all uses.
4650 2018-10-05 Martin Sebor <msebor@redhat.com>
4652 PR tree-optimization/87490
4653 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4656 2018-10-05 Richard Biener <rguenther@suse.de>
4658 PR tree-optimization/63155
4659 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4660 vertical space in dumpfiles.
4661 * tree-ssa-propagate.h
4662 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4663 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4664 (ssa_edge_worklist_back): Likewise.
4665 (curr_order): Likewise.
4666 (cfg_blocks_get): Remove abstraction.
4667 (cfg_blocks_add): Likewise.
4668 (cfg_blocks_empty_p): Likewise.
4669 (add_ssa_edge): Add to current or next worklist based on
4671 (add_control_edge): Likewise.
4672 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4674 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4675 iteration from CFG and SSA edge worklist so we process
4676 everything in RPO order, prioritizing forward progress
4678 (ssa_prop_init): Allocate new worklists, do not dump
4680 (ssa_prop_fini): Free new worklists.
4682 2018-10-05 Richard Biener <rguenther@suse.de>
4684 * tree-core.h (tree_block::abstract_flag): Remove.
4685 (tree_block::block_num): Make full 32bits.
4686 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4687 * tree.h (BLOCK_ABSTRACT): Remove.
4688 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4689 resulting from BLOCK_ABSTRACT being always false.
4690 (gen_inlined_subroutine_die): Likewise.
4691 (gen_block_die): Likewise.
4692 * tree.c (block_ultimate_origin): Likewise.
4693 * tree-pretty-print.c (dump_block_node): Remove code dealing
4694 with BLOCK_ABSTRACT.
4695 * tree-ssa-live.c (dump_scope_block): Likewise.
4696 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4697 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4699 2018-10-05 Richard Biener <rguenther@suse.de>
4701 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4702 is asked for initialize mode to the component mode of the
4705 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4708 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4709 assembler for -mavx.
4710 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4712 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4715 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4717 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4718 to be DImode. When using mffscrn, force the operand to a register.
4720 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4722 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4723 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4724 X87MODEF mode iterator.
4725 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4726 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4727 X87MODEF mode iterator.
4729 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4731 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4732 -Wno-prio-ctor-dtor.
4734 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4736 * Makefile.in (OBJS): Add opt-problem.o.
4737 * dump-context.h: Include "selftest.h.
4738 (selftest::temp_dump_context): New forward decl.
4739 (class dump_context): Make friend of class
4740 selftest::temp_dump_context.
4741 (dump_context::dump_loc_immediate): New decl.
4742 (class dump_pretty_printer): Move here from dumpfile.c.
4743 (class temp_dump_context): Move to namespace selftest.
4744 (temp_dump_context::temp_dump_context): Add param
4745 "forcibly_enable_dumping".
4746 (selftest::verify_dumped_text):
4747 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4748 (selftest::verify_item):
4749 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4750 (ASSERT_IS_TREE): Likewise.
4751 (ASSERT_IS_GIMPLE): Likewise.
4752 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4754 (dump_context::dump_loc_immediate): ...this new function.
4755 (class dump_pretty_printer): Move to dump-context.h.
4756 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4757 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4758 (temp_dump_context::temp_dump_context): Move to "selftest"
4759 namespace. Add param "forcibly_enable_dumping", and use it to
4760 conditionalize the use of m_pp;
4761 (selftest::verify_dumped_text): Make non-static.
4762 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4763 (selftest::verify_item): Make non-static.
4764 (ASSERT_IS_TEXT): Move to dump-context.h.
4765 (ASSERT_IS_TREE): Likewise.
4766 (ASSERT_IS_GIMPLE): Likewise.
4767 (selftest::test_capture_of_dump_calls): Pass "true" for new
4768 param of temp_dump_context.
4769 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4770 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
4772 * opt-problem.cc: New file.
4773 * opt-problem.h: New file.
4774 * optinfo-emit-json.cc
4775 (selftest::test_building_json_from_dump_calls): Pass "true" for
4776 new param of temp_dump_context.
4777 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4778 (optinfo::emit_for_opt_problem): New function.
4779 (optinfo::emit): Clarity which emit_item is used.
4780 * optinfo.h (optinfo::get_dump_location): New accessor.
4781 (optinfo::emit_for_opt_problem): New decl.
4782 (optinfo::emit): Make const.
4783 * selftest-run-tests.c (selftest::run_tests): Call
4784 selftest::opt_problem_cc_tests.
4785 * selftest.h (selftest::opt_problem_cc_tests): New decl.
4786 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4787 bool to opt_result, converting fprintf messages to
4788 opt_result::failure_at calls. Add "stmt" param for use by the
4790 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4791 (runtime_alias_check_p): Convert return type from bool to
4792 opt_result, converting dump_printf calls to
4793 opt_result::failure_at, using the statement DDR_A for their
4795 (find_data_references_in_stmt): Convert return type from bool to
4796 opt_result, converting "return false" to opt_result::failure_at
4798 * tree-data-ref.h: Include "opt-problem.h".
4799 (dr_analyze_innermost): Convert return type from bool to opt_result,
4800 and add a const gimple * param.
4801 (find_data_references_in_stmt): Convert return type from bool to
4803 (runtime_alias_check_p): Likewise.
4804 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4805 dr_analyze_innermost.
4806 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4807 Convert return type from bool to opt_result, adding a message for
4808 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4809 (vect_analyze_data_ref_dependence): Convert return type from bool
4810 to opt_result. Change sense of return type from "false"
4811 effectively meaning "no problems" to "false" meaning a problem,
4812 so that "return false" becomes "return opt_result::success".
4813 Convert "return true" calls to opt_result::failure_at, using
4814 the location of statement A rather than vect_location.
4815 (vect_analyze_data_ref_dependences): Convert return type from bool
4817 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4818 calls to opt_result::failure_at, using the stmt location rather
4820 (vect_verify_datarefs_alignment): Convert return type from bool
4822 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
4823 into multiple more-tightly-scoped copies.
4824 (vect_analyze_data_refs_alignment): Convert return type from bool
4826 (vect_analyze_data_ref_accesses): Likewise, converting a
4827 "return false" to a "return opt_result::failure_at", adding a
4829 (vect_prune_runtime_alias_test_list): Convert return type from
4830 bool to opt_result, converting dump_printf_loc to
4831 opt_result::failure_at. Add a %G to show the pertinent statement,
4832 and use the stmt's location rather than vect_location.
4833 (vect_find_stmt_data_reference): Convert return type from
4834 bool to opt_result, converting dump_printf_loc to
4835 opt_result::failure_at, using stmt's location.
4836 (vect_analyze_data_refs): Convert return type from bool to
4837 opt_result. Convert "return false" to "return
4838 opt_result::failure_at", adding messages as needed.
4839 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4840 type from bool to opt_result.
4841 (vect_determine_vf_for_stmt): Likewise.
4842 (vect_determine_vectorization_factor): Likewise, converting
4843 dump_printf_loc to opt_result::failure_at, using location of phi
4844 rather than vect_location.
4845 (vect_analyze_loop_form_1): Convert return type from bool to
4846 opt_result, converting dump_printf_loc calls, retaining the use of
4848 (vect_analyze_loop_form): Convert return type from loop_vec_info
4849 to opt_loop_vec_info.
4850 (vect_analyze_loop_operations): Convert return type from bool to
4851 opt_result, converting dump_printf_loc calls, using the location
4852 of phi/stmt rather than vect_location where available. Convert
4853 various "return false" to "return opt_result::failure_at" with
4854 "unsupported phi" messages.
4855 (vect_get_datarefs_in_loop): Convert return type from bool to
4856 opt_result. Add a message for the
4857 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4858 (vect_analyze_loop_2): Convert return type from bool to
4859 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4860 each "goto again;", adding new messages where needed.
4861 Add "unsupported grouped {store|load}" messages.
4862 (vect_analyze_loop): Convert return type from loop_vec_info to
4864 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4866 * tree-vect-stmts.c (process_use): Likewise, converting
4867 dump_printf_loc call and using stmt location, rather than
4869 (vect_mark_stmts_to_be_vectorized): Likeise.
4870 (vect_analyze_stmt): Likewise, adding a %G.
4871 (vect_get_vector_types_for_stmt): Convert return type from bool to
4872 opt_result, converting dump_printf_loc calls and using stmt
4873 location, rather than vect_location.
4874 (vect_get_mask_type_for_stmt): Convert return type from tree to
4875 opt_tree, converting dump_printf_loc calls and using stmt location.
4876 * tree-vectorizer.c: Include "opt-problem.h.
4877 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4878 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4879 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4880 enabled, use it to report at the top level "couldn't vectorize
4881 loop" followed by the problem.
4882 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4883 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4885 (vect_analyze_stmt): Likewise.
4886 (vect_get_vector_types_for_stmt): Likewise.
4887 (tree vect_get_mask_type_for_stmt): Likewise.
4888 (vect_analyze_data_ref_dependences): Likewise.
4889 (vect_enhance_data_refs_alignment): Likewise.
4890 (vect_analyze_data_refs_alignment): Likewise.
4891 (vect_verify_datarefs_alignment): Likewise.
4892 (vect_analyze_data_ref_accesses): Likewise.
4893 (vect_prune_runtime_alias_test_list): Likewise.
4894 (vect_find_stmt_data_reference): Likewise.
4895 (vect_analyze_data_refs): Likewise.
4896 (vect_analyze_loop): Convert return type from loop_vec_info to
4898 (vect_analyze_loop_form): Likewise.
4899 (vect_analyze_slp): Convert return type from bool to opt_result.
4901 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4903 * doc/invoke.texi (-fopt-info): Document new "internals"
4905 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4906 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4908 (optinfo_verbosity_options): Add "internals".
4909 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4910 (dump_context::apply_dump_filter_p): New member function.
4911 (dump_context::dump_loc): Use apply_dump_filter_p rather than
4912 explicitly masking the dump_kind.
4913 (dump_context::begin_scope): Increment the scope depth first. Use
4914 apply_dump_filter_p rather than explicitly masking the dump_kind.
4915 (dump_context::emit_item): Use apply_dump_filter_p rather than
4916 explicitly masking the dump_kind.
4917 (dump_dec): Likewise.
4918 (dump_hex): Likewise.
4919 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4920 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4921 (opt_info_switch_p): Update handling of default
4922 MSG_OPTIMIZED_LOCATIONS to cope with default of
4923 MSG_PRIORITY_USER_FACING.
4924 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4925 masking the dump_kind.
4926 (selftest::test_capture_of_dump_calls): Update test_dump_context
4927 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4928 than MSG_ALL. Generalize scope test to be run at all four
4929 combinations of with/without MSG_PRIORITY_USER_FACING and
4930 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4931 for each of the two values.
4932 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4933 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
4934 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4935 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4936 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4937 with MSG_PRIORITY_*.
4938 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4939 dump messages as MSG_PRIORITY_USER_FACING.
4940 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4941 about the interaction with MSG_PRIORITY_*.
4943 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4945 * varasm.c (output_constant): Add new parameter merge_strings.
4946 Make strings properly zero terminated in merge string sections.
4947 (mergeable_string_section): Don't fail if the last char is non-zero.
4948 (assemble_variable_contents): Handle merge string sections.
4949 (assemble_variable): Likewise.
4950 (assemble_constant_contents): Likewise.
4951 (output_constant_def_contents): Likewise.
4952 (output_constructor_array_range,
4953 output_constructor_regular_field): Adjust call to output_constant.
4954 (output_object_block): Adjust call to assemble_constant_contents
4955 and assemble_variable_contents.
4957 2018-10-04 Martin Liska <mliska@suse.cz>
4960 * cgraphunit.c (process_function_and_variable_attributes):
4961 Warn about a function with alias attribute and a body.
4963 2018-10-04 Martin Liska <mliska@suse.cz>
4966 * multiple_target.c (redirect_to_specific_clone): New function.
4967 (ipa_target_clone): Use it.
4968 * tree-inline.c: Fix comment.
4970 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4972 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4974 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4975 (gcc::dump_manager::register_pass): New member function, adapted
4976 from loop body in gcc::pass_manager::register_pass, adding a
4977 call to update_dfi_for_opt_info.
4978 (gcc::dump_manager::opt_info_enable_passes): Store the
4979 -fopt-info options into the new fields. Move the loop
4981 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4983 * dumpfile.h (struct opt_pass): New forward decl.
4984 (gcc::dump_manager::register_pass): New decl.
4985 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4986 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4987 "m_optinfo_flags", and "m_optinfo_filename".
4988 * passes.c (gcc::pass_manager::register_pass): Move all of the
4989 dump-handling code to gcc::dump_manager::register_pass.
4991 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4993 PR rtl-optimization/87466
4994 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4995 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4996 * doc/tm.texi: Regenerate.
4997 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4998 * lra-lives.c (process_bb_lives): Likewise.
4999 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5002 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5004 * params.c (add_params): Fix initialization.
5006 2018-10-04 Martin Liska <mliska@suse.cz>
5008 PR gcov-profile/84107
5009 * tree-profile.c (init_ic_make_global_vars):
5010 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5011 Come up with new ic_tuple* variables. Emit
5012 __gcov_indirect_call{,_topn} variables.
5013 (gimple_gen_ic_profiler): Access the variable
5015 (gimple_gen_ic_func_profiler): Access
5016 __gcov_indirect_call.callee field.
5017 (gimple_init_gcov_profiler): Use ptr_type_node.
5018 * value-prof.c (gimple_ic): Use ptr_type_node.
5020 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5022 PR tree-optimization/85787
5023 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5024 malloc_candidate_p into this function and add support for
5025 detecting multiple phis.
5026 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5028 2018-10-04 Martin Liska <mliska@suse.cz>
5031 * ipa-inline.c (inline_to_all_callers_1):
5032 Call ultimate_alias_target for node being inlined.
5034 2018-10-03 Jeff Law <law@redhat.com>
5036 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5038 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5039 * tree.h (get_typenode_from_name): Prototype.
5041 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5043 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5044 Change operand 2 predicate to nonimmediate_operand.
5045 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5047 2018-10-03 Martin Sebor <msebor@redhat.com>
5048 Jeff Law <law@redhat.com>
5050 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5052 (get_string_length): Detect unterminated arrays.
5053 (format_string): Same.
5054 (format_directive): Warn about unterminated arrays.
5055 (handle_gimple_call): Mark statements with no_warning as needed.
5057 2018-10-03 Jim Wilson <jimw@sifive.com>
5059 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5060 also define __riscv_abi_rve. Delete trailing white space.
5062 2018-10-03 Paul Koning <ni1d@arrl.net>
5064 Enable LRA register allocator for PDP11.
5065 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5068 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5069 * config/pdp11/pdp11.opt (-mlra): New option.
5070 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5072 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5074 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5075 (*<absneg:code>extend<mode>xf2): Ditto.
5077 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5079 PR tree-optimization/87415
5080 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5083 2018-10-02 Jeff Law <law@redhat.com>
5085 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5086 an unterminated string is discovered. Bubble up range
5087 even for unterminated strings.
5088 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5089 indicates the string was not terminated via NONSTR.
5091 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5093 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5094 pointer conversions.
5095 Do not do anything special for anti-ranges.
5097 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5099 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5100 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5102 2018-10-03 Martin Liska <mliska@suse.cz>
5104 PR gcov-profile/86109
5105 * coverage.c (coverage_begin_function): Do not
5106 mark lambdas as artificial.
5107 * tree-core.h (struct GTY): Remove tm_clone_flag
5108 and introduce new lambda_function.
5109 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5111 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5114 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5115 P8_VECTOR and VSX are enabled.
5117 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5119 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5120 0x3907 as CPU model number.
5122 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5124 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5125 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5126 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5127 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5128 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5129 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5130 value from arch12 to z14.
5132 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5134 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5136 (isinf<mode>2): Ditto.
5138 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5140 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5141 before emitting fxam. Perform calculations in XFmode.
5143 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5145 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5147 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5150 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5151 * tree.c (signed_or_unsigned_type_for): Handle complex.
5153 2018-10-02 Jeff Law <law@redhat.com>
5155 * gimple-fold.c (get_range_strlen): Remove dead code.
5157 2018-10-02 Martin Sebor <msebor@redhat.com>
5158 Jeff Law <law@redhat.com>
5160 * builtins.c (unterminated_array): Add new arguments.
5161 If argument is not terminated, bubble up size and exact
5163 (expand_builtin_strnlen): Detect, avoid expanding
5164 and diagnose unterminated arrays.
5165 (c_strlen): Fill in offset of start of unterminated strings.
5166 * builtins.h (unterminated_array): Update prototype.
5168 2018-10-02 Richard Biener <rguenther@suse.de>
5170 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5171 of haddv4df, first reduce to SSE width and exploit the fact
5172 that we only need element zero with the reduction result.
5173 (reduc_plus_scal_v2df): Likewise.
5175 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5177 * dojump.h (do_jump): Delete.
5178 (do_jump_1): Likewise.
5179 (split_comparison): Move around.
5180 * dojump.c (do_jump): Make static.
5181 (do_jump_1): Likewise.
5182 (jumpifnot): Move around.
5183 (jumpifnot_1): Likewise.
5185 (jumpif_1): Likewise.
5186 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5188 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5190 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5191 insns in the delay slot and add_insn_after for the jump insn.
5193 2018-10-02 Richard Biener <rguenther@suse.de>
5195 * tree-inline.c (expand_call_inline): Use the location of
5196 the callee declaration for the inline-entry marker.
5197 * final.c (notice_source_line): Remove special-casing of
5198 NOTE_INSN_INLINE_ENTRY.
5200 2018-10-01 Carl Love <cel@us.ibm.com>
5203 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5204 (__builtin_mtfsb0): New.
5205 (__builtin_mtfsb1): New.
5206 ( __builtin_set_fpscr_rn): New.
5207 (__builtin_set_fpscr_drn): New.
5208 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5209 (rs6000_expand_set_fpscr_rn_builtin): Add.
5210 (rs6000_expand_set_fpscr_drn_builtin): Add.
5211 (rs6000_expand_builtin): Add case statement entries for
5212 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5213 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5214 RS6000_BUILTIN_MFFSL.
5215 (rs6000_init_builtins): Add ftype initialization and def_builtin
5216 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5217 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5218 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5219 rs6000_mffscdrn): Add define_insn.
5220 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5221 * doc/extend.texi: Add documentation for the builtins.
5223 2018-10-01 Richard Biener <rguenther@suse.de>
5225 PR tree-optimization/87465
5226 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5227 causing branch miscounts.
5229 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5231 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5232 aarch64_option_default_param): New.
5233 (params.h): Include.
5234 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5235 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5236 stack-clash protection validation code.
5238 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5240 * params.c (validate_param): New.
5241 (add_params): Use it.
5242 (set_param_value): Refactor param validation into validate_param.
5243 (diagnostic.h): Include.
5244 * diagnostic.h (diagnostic_ready_p): New.
5246 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5248 * params.c (set_param_value):
5249 Add index of parameter being validated.
5250 * common/common-target.def (option_validate_param): New.
5251 * common/common-targhooks.h (default_option_validate_param): New.
5252 * common/common-targhooks.c (default_option_validate_param): New.
5253 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5254 * doc/tm.texi: Regenerate.
5256 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5259 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5260 Add validation for stack-clash parameters and set defaults.
5262 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5265 * configure.ac: Add stack-clash-protection-guard-size.
5266 * doc/install.texi: Document it.
5267 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5268 * params.def: Update comment for guard-size.
5269 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5270 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5271 * configure: Regenerate.
5273 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5276 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5277 STACK_DYNAMIC_OFFSET): New.
5278 * config/aarch64/aarch64.c (aarch64_layout_frame):
5279 Update outgoing args size.
5280 (aarch64_stack_clash_protection_alloca_probe_range,
5281 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5283 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5286 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5288 * target.def (stack_clash_protection_alloca_probe_range): New.
5289 (stack_clash_protection_final_dynamic_probe): Remove.
5290 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5291 (default_stack_clash_protection_final_dynamic_probe): Remove.
5292 * targhooks.c: Likewise.
5293 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5294 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5295 * doc/tm.texi: Regenerate.
5297 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5300 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5301 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5302 aarch64_clamp_to_uimm12_shift): New.
5303 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5304 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5306 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5309 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5311 2018-10-01 Jeff Law <law@redhat.com>
5312 Richard Sandiford <richard.sandiford@linaro.org>
5313 Tamar Christina <tamar.christina@arm.com>
5316 * config/aarch64/aarch64.md
5317 (probe_stack_range): Add k (SP) constraint.
5318 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5319 STACK_CLASH_MAX_UNROLL_PAGES): New.
5320 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5321 stack probes for stack clash.
5322 (aarch64_allocate_and_probe_stack_space): New.
5323 (aarch64_expand_prologue): Use it.
5324 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5325 (aarch64_sub_sp): Add emit_move_imm optional param.
5327 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5329 PR tree-optimization/87261
5330 * match.pd: Remove trailing whitespace.
5331 Add (x & y) | ~(x | y) -> ~(x ^ y),
5332 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5334 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5336 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5338 (ashlsi3_insn): Update instruction constraints.
5339 (ashrsi3_insn): Likewise.
5340 (rotrsi3): Likewise.
5341 (add_shift): Likewise.
5342 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5343 avoids placing in the limm field small constants which, otherwise,
5344 could end into a small instruction.
5346 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5348 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5349 destination register is not odd-even.
5350 (umaddsidi4_split): Likewise.
5352 2018-10-01 Richard Biener <rguenther@suse.de>
5354 * tree-inline.c (expand_call_inline): Store origin of fn
5355 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5356 * tree.c (block_ultimate_origin): Simplify and do some
5359 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5361 * config/i386/mmx.md (EMMS): New int iterator.
5362 (emms): New int attribute.
5363 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5364 EMMS int iterator. Explicitly declare clobbers.
5365 (mmx_emms): Remove expander.
5367 * config/i386/predicates.md (emms_operation): Remove predicate.
5368 (vzeroall_pattern): New predicate.
5369 (vzeroupper_pattern): Rename from vzeroupper_operation.
5370 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5371 vzeroupper_pattern and vzeroall_pattern predicates.
5373 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5375 PR rtl-optimization/86939
5376 * ira-lives.c (make_hard_regno_born): Rename from this...
5377 (make_hard_regno_live): ... to this. Remove update to conflict
5378 information. Update function comment.
5379 (make_hard_regno_dead): Add conflict information update. Update
5381 (make_object_born): Rename from this...
5382 (make_object_live): ... to this. Remove update to conflict information.
5383 Update function comment.
5384 (make_object_dead): Add conflict information update. Update function
5386 (mark_pseudo_regno_live): Call make_object_live.
5387 (mark_pseudo_regno_subword_live): Likewise.
5388 (mark_hard_reg_dead): Update function comment.
5389 (mark_hard_reg_live): Call make_hard_regno_live.
5390 (process_bb_node_lives): Likewise.
5391 * lra-lives.c (make_hard_regno_born): Rename from this...
5392 (make_hard_regno_live): ... to this. Remove update to conflict
5393 information. Remove now uneeded check_pic_pseudo_p argument.
5394 Update function comment.
5395 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5396 to conflict information. Update function comment.
5397 (mark_pseudo_live): Remove update to conflict information. Update
5399 (mark_pseudo_dead): Add conflict information update.
5400 (mark_regno_live): Call make_hard_regno_live.
5401 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5402 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5404 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5407 * config/i386/i386.c (construct_container): Use TImode for
5408 BLKmode values in 2 integer registers.
5410 2018-09-29 Jeff Law <law@redhat.com>
5412 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5413 c_strlen rather than just a tree *.
5414 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5415 Update recursive calls appropriately. If caller did not provide a
5416 suitable data pointer, create a local one. When a non-terminated
5417 string is discovered, bubble up information about the string via the
5418 c_strlen_data object.
5419 * builtins.h (c_strlen): Update prototype.
5420 (c_strlen_data): New structure.
5421 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5422 For a type 2 call, if c_strlen indicates a non-terminated string
5423 use the length of the non-terminated string.
5424 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5426 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5429 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5430 __m512d type for __A argument rather than __m512.
5432 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5434 * match.pd (simple_comparison): Don't optimize if either operand is
5435 a function pointer when target needs function pointer canonicalization.
5437 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5439 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5440 power5 .. power9 to remove indirection.
5441 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5442 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5443 ASM_CPU_476_SPEC): Delete.
5444 (ASM_CPU_SPEC): Adjust.
5445 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5446 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5448 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5450 * config.in: Delete HAVE_AS_DCI.
5451 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5452 * config/rs6000/rs6000.h: Ditto.
5453 * configure.ac: Delete HAVE_AS_DCI.
5454 * configure: Regenerate.
5456 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5458 * config.in (HAVE_AS_LWSYNC): Delete.
5459 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5460 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5462 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5463 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5465 * configure.ac: Delete HAVE_AS_LWSYNC.
5466 * configure: Regenerate.
5468 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5469 Pierre-Marie de Rodat <derodat@adacore.com>
5471 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5472 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5473 (cgraph_node::create_thunk): Add indirect_offset parameter.
5474 (thunk_adjust): Likewise.
5475 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5476 and initialize the corresponding field with it.
5477 (cgraph_node::dump): Dump indirect_offset field.
5478 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5479 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5480 (thunk_adjust): Add indirect_offset parameter and deal with it.
5481 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5482 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5483 or if the thunk is external or local. Fix formatting. Do not chain
5484 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5485 if any, in the GIMPLE representation.
5486 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5487 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5488 (input_node): Read indirect_offset field.
5489 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5490 call to thunk_adjust.
5491 * tree-nested.c (struct nesting_info): Add thunk_p field.
5492 (create_nesting_tree): Set it.
5493 (convert_all_function_calls): Copy static chain from targets to thunks.
5494 (finalize_nesting_tree_1): Return early for thunks.
5495 (unnest_nesting_tree_1): Do not finalize thunks.
5496 (gimplify_all_functions): Do not gimplify thunks.
5498 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5500 * opt-suggestions.c (option_proposer::build_option_suggestions):
5501 Release "option_values".
5503 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5505 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5506 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5507 * dumpfile.c (kind_as_string): New function.
5508 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5509 kind_as_string to vary the prefix based on dump_kind.
5510 (selftest::test_capture_of_dump_calls): Update for above.
5512 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5514 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5515 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5517 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5519 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5520 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5521 INVALID_REGNUM instead of FPSR_REG.
5522 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5523 * config/i386/i386.md: Update comment of FP compares.
5524 (fldenv): Do not clobber FPSR_REG.
5526 2018-09-28 Richard Biener <rguenther@suse.de>
5528 * tree.h (BLOCK_ORIGIN): New.
5529 * omp-expand.c (grid_expand_target_grid_body): Assign
5530 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5531 * tree-inline.c (remap_block): Likewise.
5532 * auto-profile.c (get_function_decl_from_block): Simplify
5533 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5534 * langhooks.c (lhd_print_error_function): Likewise.
5535 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5537 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5538 * tree.c (block_nonartificial_location): Likewise.
5539 (block_ultimate_origin): Likewise.
5540 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5541 no longer needed LTO case.
5543 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5544 Jan Hubicka <jh@suse.cz>
5545 Martin Jambor <mjambor@suse.cz>
5547 * simplify-rtx.c (simplify_merge_mask): New function.
5548 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5549 same masks are used in op1 or op2.
5550 (test_vec_merge): New function.
5551 (test_vector_ops): Call test_vec_merge.
5553 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5555 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5556 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5557 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5558 (cypress_costs): Set it.
5559 (supersparc_costs): Likewise.
5560 (hypersparc_costs): Likewise.
5561 (leon_cost): Likewise.
5562 (leon3_costs): Likewise.
5563 (sparclet_costs): Likewise.
5564 (ultrasparc_costs): Likewise.
5565 (ultrasparc_costs): Likewise.
5566 (niagara_costs): Likewise.
5567 (niagara2_costs): Likewise.
5568 (niagara3_costs): Likewise.
5569 (niagara4_costs): Likewise.
5570 (niagara7_costs): Likewise.
5571 (m8_costs): Likewise.
5572 (TARGET_CAN_FOLLOW_JUMP): Define.
5573 (pass_work_around_errata::gate): Minor tweak.
5574 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5575 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5576 Automaitcally clear MASK_FSMULD mask for V7 processors.
5577 (sparc_can_follow_jump): New static function.
5578 (output_ubranch): Deal with CROSSING_JUMP_P.
5579 (sparc_use_sched_lookahead): Rewrite using switch statement.
5580 (sparc_issue_rate): Reorder.
5581 (sparc_branch_cost): New function.
5583 2018-09-27 Martin Sebor <msebor@redhat.com>
5585 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5586 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5587 (int_fits_type_p): Same.
5589 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5591 * config/i386/i386.md (FPCR_REG): Remove.
5592 (UNSPEC_FLDCW): Remove.
5593 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5594 (x86_fldcw_1): Remove insn pattern.
5595 (fnstenv): Do not clobber FPCR_REG.
5597 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5598 (CALL_USED_REGISTERS): Ditto.
5599 (REG_ALLOC_ORDER): Ditto.
5600 (REG_CLASS_CONTENTS): Ditto.
5601 (HI_REGISTER_NAMES): Ditto.
5602 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5603 of numerical constants.
5604 * config/i386/i386.c (regclass_map): Remove fpsr register.
5605 (dbx_register_map): Ditto.
5606 (dbx64_register_map): Ditto.
5607 (svr4_dbx_register_map): Ditto.
5608 (print_reg): Do not handle FPCR_REG.
5610 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5613 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5614 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5615 Delete, always treat as true.
5616 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5617 Ditto. Simplify remaining code.
5618 * config/powerpcspe/powerpcspe.h: Ditto.
5619 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5620 Simplify remaining code.
5621 (rs6000_expand_builtin): Ditto.
5622 * config/rs6000/rs6000.h: Ditto.
5623 * configure.ac: Ditto.
5624 * configure: Regenerate.
5626 2018-09-27 Martin Liska <mliska@suse.cz>
5628 * coverage.c (get_coverage_counts): Revert the formatting
5629 of missing profile opt info.
5631 2018-09-27 Richard Biener <rguenther@suse.de>
5635 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5636 block as we do not output that.
5637 (gen_inlined_subroutine_die): Elide the originally outermost
5638 block, matching what we do for concrete instances.
5639 (decls_for_scope): Add parameter specifying whether to recurse
5642 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5643 Tom de Vries <tom@codesourcery.com>
5647 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5648 STORE_FLAG_VALUE == 1.
5650 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5652 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5653 constant definitions.
5654 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5655 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5656 ("speculation_barrier"): New expander definition.
5658 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5660 PR gcov-profile/86957
5661 * common.opt: New warning option -Wmissing-profile.
5662 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5663 * doc/invoke.texi: Document -Wmissing-profile.
5665 2018-09-26 Jim Wilson <jimw@sifive.com>
5667 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5668 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5670 2018-09-26 Martin Sebor <msebor@redhat.com>
5672 * tree.c (zerop): Change return type to bool.
5673 (integer_zerop, integer_onep, integer_each_onep): Same.
5674 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5675 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5676 (real_onep, real_minus_onep, chain_index): Same.
5677 (print_type_hash_statistics, type_list_equal): Same.
5678 * tree.h (zerop): Same.
5679 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5680 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5681 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5682 (real_onep, real_minus_onep, chain_index): Same.
5683 (print_type_hash_statistics, type_list_equal): Same.
5685 2018-09-26 Jim Wilson <jimw@sifive.com>
5687 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5689 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5692 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5693 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5696 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5698 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5700 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5702 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5703 and FP_SECOND_SSE_REGS.
5704 (REG_CLASS_NAMES): Ditto.
5705 (REG_CLASS_CONTENTS): Ditto.
5706 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5707 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5708 (ix86_preferred_output_reload_class): Ditto.
5709 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5710 clobber constraint to "=&f".
5711 (fix_truncdi_i387): Ditto.
5712 (lrintxfdi2): Ditto.
5713 (fistdi2_<rounding>): Ditto.
5714 (fpremxf4_i387): Change "=u" constraint to "=f".
5715 (fprem1xf4_i387): Ditto.
5717 (fptanxf4_i387): Ditto.
5718 (fxtractxf3_i387): Ditto.
5719 (fscalexf4_i387): Ditto.
5720 (atan2xf3): Change "u" constraint to "f".
5721 (fyl2xxf3_i387): Ditto.
5722 (fyl2xp1xf3_i387): Ditto.
5724 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5727 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5728 for removed I387_MASK_PM entity.
5731 2018-09-26 Jeff Law <law@redhat.com>
5733 2018-09-26 Alexey Neyman <stilor@att.net>
5735 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5736 headers are no longer pulled in by <isl/val.h>.
5738 2018-09-26 Richard Biener <rguenther@suse.de>
5741 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5742 or concrete instance DIE to the tree. Create abstract origin
5743 attributes also for concrete instances.
5745 2018-09-26 Alexey Neyman <stilor@att.net>
5747 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5748 headers are no longer pulled in by <isl/val.h>.
5750 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5752 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5753 Use new helper functions.
5754 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5755 Use new helper functions.
5756 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5757 aarch_mm_needs_release): New declarations.
5758 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5759 aarch_mm_needs_release): New.
5761 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
5763 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5764 (arm32_output_mi_thunk): Deal with long calls.
5766 2018-09-26 Richard Biener <rguenther@suse.de>
5770 * tree-inline.c (expand_call_inline): When the location
5771 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5772 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5773 the inserted BLOCK to make inlined_function_outer_scope_p
5775 * dwarf2out.c (add_call_src_coords_attributes): Do not add
5776 coords for reserved locations.
5778 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5780 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5781 (*call_indirect_nonlocal_sysv<mode>): Ditto.
5782 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5783 (*sibcall_nonlocal_sysv<mode>): Ditto.
5784 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5785 (<bd>_<mode>): Ditto.
5786 (<bd>tf_<mode>): Ditto.
5788 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5790 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5791 control string as a list of templates instead of as C code.
5792 (*altivec_movti): Ditto.
5793 * config/rs6000/darwin.md (movdf_low_di): Ditto.
5795 2018-09-25 Jim Wilson <jimw@sifive.com>
5797 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5798 when target symbol is weak.
5800 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5803 * builtins.c (unterminated_array): Simplify.
5804 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
5805 where pointer arithmetic is safe.
5807 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5810 * config/rs6000/altivec.md (altivec_vspltb): Use
5811 const_0_to_15_operand instead of u5bit_cint_operand.
5812 (*altivec_vspltb_internal): Ditto.
5813 (altivec_vspltb_direct): Ditto.
5814 (altivec_vsplth): Use const_0_to_7_operand instead of
5816 (*altivec_vsplth_internal): Ditto.
5817 (altivec_vsplth_direct): Ditto.
5818 (altivec_vspltw): Use const_0_to_3_operand instead of
5820 (*altivec_vspltw_internal): Ditto.
5821 (altivec_vspltw_direct): Ditto.
5822 (altivec_vspltsf): Ditto.
5823 (*altivec_vspltsf_internal): Ditto.
5824 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5825 various splats with the proper size immediate. Reorder the various
5826 cases by ascending size of immediate, and put all such together.
5828 2018-09-25 Richard Biener <rguenther@suse.de>
5831 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5833 (maybe_create_die_with_external_ref): Do not create
5834 DW_TAG_imported_unit here.
5835 (add_abstract_origin_attribute): Handle external BLOCK refs.
5836 (dwarf2out_abstract_function): Simplify LTO case.
5837 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5838 rather than using maybe_create_die_with_external_ref.
5840 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5843 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5844 (frndintxf2_mask_pm_i387): Ditto.
5845 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5846 Enable for !flag_trapping_math.
5847 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5848 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5849 Change operand 1 predicate to nonimmediate_operand.
5850 (attr "i387_cw"): Remove mask_pm.
5851 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5852 (enum ix86_entity): Remove I387_MASK_PM.
5853 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5854 handle I387_MASK_PM.
5855 (ix86_mode_needed): Ditto.
5856 (ix86_mode_after): Ditto.
5857 (ix86_mode_entry): Ditto.
5858 (ix86_mode_exit): Ditto.
5859 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5861 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5863 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5864 to_update_switch_stmts to vNULL instead of calling create on them
5867 2018-09-25 Richard Biener <rguenther@suse.de>
5869 PR tree-optimization/87402
5870 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5871 (visit_phi): Re-instantiate handling of supposed to be VARYING
5872 but non-VARYING backedge value.
5874 2018-09-25 Richard Biener <rguenther@suse.de>
5877 * dwarf2out.c (struct sym_off_pair): New.
5878 (external_die_map): New global.
5879 (lookup_decl_die): When in LTO create DIEs lazily from the
5881 (lookup_block_die): New function, create DIEs lazily in LTO.
5882 (equate_block_to_die): New function.
5883 (dwarf2out_die_ref_for_decl): During WPA get the association
5884 from the external DIE map.
5885 (dwarf2out_register_external_die): Record mapping into the
5887 (maybe_create_die_with_external_ref): New function split out from
5888 DIE generation part of old dwarf2out_register_external_die.
5889 (add_abstract_origin_attribute): Do not return the DIE. When
5890 in LTO reference externals directly.
5891 (dwarf2out_abstract_function): When in LTO ignore calls for
5892 decls with external DIEs (already present abstract instances).
5893 (gen_call_site_die): Adjust.
5894 (add_high_low_attributes): Likewise.
5895 (gen_lexical_block_die): Likewise.
5896 (gen_inlined_subroutine_die): Likewie.
5897 (gen_block_die): Likewise.
5898 (dwarf2out_inline_entry): Likewise.
5899 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5902 2018-09-25 Martin Liska <mliska@suse.cz>
5904 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5905 integers and not by a float value.
5907 2018-09-25 Martin Liska <mliska@suse.cz>
5910 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5912 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5913 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5914 * godump.c (go_format_type): Remove extra parenthesis.
5916 2018-09-25 Martin Liska <mliska@suse.cz>
5918 * alias.c (set_dest_equal_p): Remove unused function.
5919 * config/i386/i386.c (def_builtin_pure2): Likewise.
5920 * diagnostic-show-locus.c (class layout): Remove
5922 (layout::layout): Likewise here.
5923 * dump-context.h (class temp_dump_context): Likewise.
5924 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5925 (add_AT_loclistsptr): Likewise.
5926 (add_AT_offset): Likewise.
5927 (get_AT_hi_pc): Likewise.
5928 (is_comdat_die): Likewise.
5929 (type_is_enum): Likewise.
5930 (ceiling): Likewise.
5931 (add_AT_vms_delta): Likewise.
5932 (is_class_die): Likewise.
5933 * edit-context.c (class line_event): Remove unused field.
5934 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5936 * ipa-cp.c (ipa_get_vr_lat): Likewise.
5937 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5938 (ok_for_base_p_nonstrict): Likewise.
5939 * tree-chrec.c (is_not_constant_evolution): Likewise.
5940 (chrec_fold_poly_cst): Likewise.
5941 * tree-if-conv.c (has_pred_critical_p): Likewise.
5942 * tree-ssa-coalesce.c (print_exprs): Likewise.
5943 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5944 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5945 * tree-vrp.c (value_ranges_intersect_p): Likewise.
5946 (value_range_nonnegative_p): Likewise.
5948 2018-09-25 Martin Liska <mliska@suse.cz>
5950 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5951 Do not handle "GNU Pascal".
5952 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5954 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5955 from documentation. Likewise.
5956 * dbxout.c (dbxout_range_type): Likewise.
5957 * doc/cpp.texi: Likewise.
5958 * doc/extend.texi: Likewise.
5959 * doc/frontends.texi: Likewise.
5960 * doc/invoke.texi: Remove Pascal entry.
5961 * tree.def (CLEANUP_POINT_EXPR): Likewise.
5962 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5964 2018-09-25 Martin Liska <mliska@suse.cz>
5967 * doc/invoke.texi: Document all parameters and remove default
5970 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
5973 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5974 contains HOST_WIDE_INTs when computing its size.
5976 2018-09-24 Jim Wilson <jimw@sifive.com>
5979 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5981 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5983 2018-09-24 Andrew Pinski <apinski@marvell.com>
5985 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5986 access prev before checking it for NULLness in the
5987 AARCH64_FUSE_CMP_BRANCH case.
5989 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5992 * config/i386/i386.c (rest_of_insert_endbranch): Set
5993 endbr_queued_at_entrance to true and don't insert ENDBR if
5994 x86_function_profiler will be called.
5995 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5997 * config/i386/i386.h (machine_function): Add
5998 endbr_queued_at_entrance.
6000 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6002 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6003 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6005 (check_attr_test): Use alternative_mask.
6006 (get_attr_value): Likewise.
6007 (compute_alternative_mask): Use alternative_mask and XWINT.
6008 (make_alternative_compare): Use alternative_mask.
6009 (attr_alt_subset_p): Use XWINT.
6010 (attr_alt_subset_of_compl_p): Likewise.
6011 (attr_alt_intersection): Use alternative_mask and XWINT.
6012 (attr_alt_union): Likewise.
6013 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6014 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6015 (simplify_test_exp): Use alternative_mask and XWINT.
6016 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6017 number calculation to support 64 bits. Generate code that
6018 checks 64-bit masks.
6019 (main): Use alternative_mask.
6020 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6022 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6025 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6026 RETURN+USE when returning via %r14.
6028 2018-09-24 Martin Liska <mliska@suse.cz>
6030 * gcov.c (output_lines): Print colorization legend
6031 for both flag_use_colors and flag_use_hotness_colors.
6034 2018-09-24 Martin Liska <mliska@suse.cz>
6036 * coverage.c (get_coverage_counts): Use warning_at
6037 with current_function_decl location. Use %qD in warning
6040 2018-09-24 Martin Liska <mliska@suse.cz>
6042 * memory-block.h (memory_block_pool::release): Annotate with
6043 valgrind that the memory is not accessible.
6045 2018-09-24 Martin Liska <mliska@suse.cz>
6048 * asan.c: Make asan_handled_variables extern.
6050 * cfgexpand.c (expand_stack_vars): Make sure
6051 a representative is unpoison if another
6052 variable in the partition is handled by
6053 use-after-scope sanitization.
6055 2018-09-24 Richard Biener <rguenther@suse.de>
6057 PR tree-optimization/63155
6058 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6059 the worklist when the edge of the respective argument isn't
6062 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6064 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6065 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6066 (MASK_CLASS_P): Update for rename.
6067 (MAYBE_MASK_CLASS_P): Ditto.
6068 (REG_CLASS_NAMES): Update.
6069 (REG_CLASS_CONTENT): Update.
6070 * config/i386/i386.c (regclass_map): Update for MASK_REG
6071 and ALL_MASK_REGS rename.
6072 * config/i386/constraints.md (Yk): Update for rename.
6075 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6077 * config/i386/i386.h (enum reg_class): Remove
6078 EVEX_SSE_REGS and MOD4_SSE_REGS.
6079 (REG_CLASS_NAMES): Update.
6080 (REG_CLASS_CONTENT): Update.
6081 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6082 registers as ALL_SSE_REGS.
6083 (ix86_additional_allocno_class_p): Remove.
6084 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6085 (ix86_register_priority): Lower priority of EVEX SSE registers.
6086 Use IN_RANGE macro where appropriate.
6087 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6088 AVX-5124VNNIW checks.
6089 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6090 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6091 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6092 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6093 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6094 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6095 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6096 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6097 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6098 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6099 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6100 * config/i386/constraints.md (Yh): Remove.
6102 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6104 * config/i386/i386.c (regclass_map): Declare integer REX registers
6107 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6109 * doc/service.texi (Service): Switch the fsf.org link to https.
6111 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6114 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6115 Define to speculation_safe_value_not_needed.
6117 2018-09-21 Florian Weimer <fweimer@redhat.com>
6120 * doc/extend.texi (Common Function Attributes): Mention that
6121 noreturn suppresses tail call optimization.
6123 2018-09-21 Jeff Law <law@redhat.com>
6125 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6126 vr_values::cleanup_edges_and_switches.
6127 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6129 (identify_jump_threads): Remove EDGE_IGNORE handling.
6130 (execute_vrp): Move handling of to_remove_edges and
6131 to_update_switch_stmts into vr_values class member functions.
6132 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6133 (to_update_switch_stmts): Likewise.
6134 * vr-values.c: Include cfghooks.h.
6135 (vr_values::vr_values): Initialize to_remove_edges and
6136 to_update_switch_stmts.
6137 (vr_values::~vr_values): Verify to_remove_edges and
6138 to_update_switch_stmts are empty.
6139 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6140 (vr_values::cleanup_edges_and_switches): New member function.
6141 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6142 function. Add new data members.
6144 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6146 PR tree-optimization/87309
6147 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6148 calls with pflags and alt_flags.
6149 (selftest::test_capture_of_dump_calls): Add test of interaction of
6150 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6152 2018-09-21 Olivier Hainque <hainque@adacore.com>
6154 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6156 2018-09-21 Olivier Hainque <hainque@adacore.com>
6158 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6160 2018-09-21 Olivier Hainque <hainque@adacore.com>
6162 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6163 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6164 (VXWORKS_LIBS_RTP): Minor reordering.
6166 2018-09-21 Olivier Hainque <hainque@adacore.com>
6168 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6169 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6171 2018-09-21 Olivier Hainque <hainque@adacore.com>
6173 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6174 (PTRDIFF_TYPE): Likewise.
6176 2018-09-21 Olivier Hainque <hainque@adacore.com>
6178 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6179 triplet, similar to support for VxWorks7.
6180 * config/vxworks-dummy.h: Provide a default definition
6181 of TARGET_VXWORKS64 to 0.
6183 2018-09-21 Olivier Hainque <hainque@adacore.com>
6185 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6186 * config/vxworks-dummy.h: here.
6188 2018-09-21 Olivier Hainque <hainque@adacore.com>
6190 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6192 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6193 Bo Zhou <zbo.zhou@hisilicon.com>
6195 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6196 * config/aarch64/aarch64-tune.md: Regenerated.
6197 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6198 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6199 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6201 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6202 Julian Brown <julian@codesourcery.com>
6204 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6206 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6208 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6209 if the call takes a static chain.
6211 2018-09-21 Martin Liska <mliska@suse.cz>
6213 * auto-profile.c (autofdo_source_profile::read): Do not
6215 (read_profile): Do not add working sets.
6216 (read_autofdo_file): Remove sum_all.
6217 (afdo_callsite_hot_enough_for_early_inline): Remove const
6219 * coverage.c (struct counts_entry): Remove gcov_summary.
6220 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6221 do not support GCOV_TAG_PROGRAM_SUMMARY.
6222 (get_coverage_counts): Remove summary and expected
6224 * coverage.h (get_coverage_counts): Likewise.
6225 * doc/gcov-dump.texi: Remove -w option.
6226 * gcov-dump.c (dump_working_sets): Remove.
6227 (main): Do not support '-w' option.
6228 (print_usage): Likewise.
6229 (tag_summary): Likewise.
6230 * gcov-io.c (gcov_write_summary): Do not dump
6232 (gcov_read_summary): Likewise.
6233 (gcov_histo_index): Remove.
6234 (gcov_histogram_merge): Likewise.
6235 (compute_working_sets): Likewise.
6236 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6238 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6239 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6240 (GCOV_HISTOGRAM_SIZE): Remove.
6241 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6242 (struct gcov_summary): Simplify rapidly just
6243 to runs and sum_max fields.
6244 (gcov_histo_index): Remove.
6245 (NUM_GCOV_WORKING_SETS): Likewise.
6246 (compute_working_sets): Likewise.
6247 * gcov-tool.c (print_overlap_usage_message): Remove
6248 trailing empty line.
6249 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6250 (output_lines): Remove program related line.
6251 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6252 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6254 (input_profile_summary): Do not read it.
6255 (merge_profile_summaries): And do not merge it.
6256 (input_symtab): Do not call removed function.
6257 * modulo-sched.c (sms_schedule): Do not print sum_max.
6258 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6259 removed when histogram method was invented.
6260 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6262 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6264 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6265 and dump selected value.
6266 * profile.c (add_working_set): Remove.
6267 (get_working_sets): Likewise.
6268 (find_working_set): Likewise.
6269 (get_exec_counts): Do not work with working sets.
6270 (read_profile_edge_counts): Do not inform as sum_max is removed.
6271 (compute_branch_probabilities): Likewise.
6272 (compute_value_histograms): Remove argument for call of
6273 get_coverage_counts.
6274 * profile.h: Do not make gcov_summary const.
6276 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6278 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6280 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6282 PR tree-optimization/86990
6283 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6284 Check that the entire merged store group is made of constants only for
6287 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6289 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6290 (VTABLE_VERIFICATION_SPEC): Likewise.
6291 (SANITIZER_EARLY_SPEC): Likewise.
6292 (SANITIZER_SPEC): Likewise.
6293 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6294 * doc/invoke.texi (Link Options): Document -r.
6296 2018-09-20 Richard Biener <rguenther@suse.de>
6299 * gimplify.c (gimplify_expr): Retain alignment of
6300 addressable lvalue in dereference.
6302 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6305 * configure.ac: Check for .loc is_stmt support.
6306 * configure, config.in: Rebuilt.
6307 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6310 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6312 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6313 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6316 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6318 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6320 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6323 2018-09-20 Marek Polacek <polacek@redhat.com>
6325 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6327 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6329 PR tree-optimization/87288
6330 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6331 into account when determining PEELING_FOR_NITERS.
6333 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6335 PR tree-optimization/86877
6336 * tree-vect-loop.c (vect_analyze_loop_2): Call
6337 vect_verify_datarefs_alignment.
6339 2018-09-19 Marek Polacek <polacek@redhat.com>
6341 * doc/invoke.texi: Document -Wclass-conversion.
6343 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6345 * config/pa/pa.c (pa_adjust_priority): Delete.
6346 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6348 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6349 (atomic_storehi): Likewise.
6350 (atomic_storesi): Likewise.
6351 (atomic_loaddi): Restore compare and swap exchange loop code.
6353 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6355 PR rtl-optimization/86902
6356 * combine.c (try_combine): When changing the CC mode used, don't change
6357 an unrelated mode in other_insn to that new CC mode.
6359 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6361 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6362 with %T in place of calls to dump_generic_expr.
6363 (prune_runtime_alias_test_list): Likewise.
6364 (create_runtime_alias_checks): Likewise.
6365 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6366 (vect_analyze_data_ref_dependence): Likewise.
6367 (vect_slp_analyze_data_ref_dependence): Likewise.
6368 (vect_record_base_alignment): Likewise. Use %G in place of call
6369 to dump_gimple_stmt.
6370 (vect_compute_data_ref_alignment): Likewise.
6371 (verify_data_ref_alignment): Likewise.
6372 (vect_find_same_alignment_drs): Likewise.
6373 (vect_analyze_group_access_1): Likewise.
6374 (vect_analyze_data_ref_accesses): Likewise.
6375 (dependence_distance_ge_vf): Likewise.
6376 (dump_lower_bound): Likewise.
6377 (vect_prune_runtime_alias_test_list): Likewise.
6378 (vect_find_stmt_data_reference): Likewise.
6379 (vect_analyze_data_refs): Likewise.
6380 (vect_create_addr_base_for_vector_ref): Likewise.
6381 (vect_create_data_ref_ptr): Likewise.
6382 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6383 (vect_can_advance_ivs_p): Likewise.
6384 (vect_update_ivs_after_vectorizer): Likewise.
6385 (vect_gen_prolog_loop_niters): Likewise.
6386 (vect_prepare_for_masked_peels): Likewise.
6387 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6388 (vect_determine_vectorization_factor): Likewise.
6389 (vect_is_simple_iv_evolution): Likewise.
6390 (vect_analyze_scalar_cycles_1): Likewise.
6391 (vect_analyze_loop_operations): Likewise.
6392 (report_vect_op): Likewise.
6393 (vect_is_slp_reduction): Likewise.
6394 (check_reduction_path): Likewise.
6395 (vect_is_simple_reduction): Likewise.
6396 (vect_create_epilog_for_reduction): Likewise.
6397 (vect_finalize_reduction:): Likewise.
6398 (vectorizable_induction): Likewise.
6399 (vect_transform_loop_stmt): Likewise.
6400 (vect_transform_loop): Likewise.
6401 (optimize_mask_stores): Likewise.
6402 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6403 (vect_split_statement): Likewise.
6404 (vect_recog_over_widening_pattern): Likewise.
6405 (vect_recog_average_pattern): Likewise.
6406 (vect_determine_min_output_precision_1): Likewise.
6407 (vect_determine_precisions_from_range): Likewise.
6408 (vect_determine_precisions_from_users): Likewise.
6409 (vect_mark_pattern_stmts): Likewise.
6410 (vect_pattern_recog_1): Likewise.
6411 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6412 (vect_record_max_nunits): Likewise.
6413 (vect_build_slp_tree_1): Likewise.
6414 (vect_build_slp_tree_2): Likewise.
6415 (vect_print_slp_tree): Likewise.
6416 (vect_analyze_slp_instance): Likewise.
6417 (vect_detect_hybrid_slp_stmts): Likewise.
6418 (vect_detect_hybrid_slp_1): Likewise.
6419 (vect_slp_analyze_operations): Likewise.
6420 (vect_slp_analyze_bb_1): Likewise.
6421 (vect_transform_slp_perm_load): Likewise.
6422 (vect_schedule_slp_instance): Likewise.
6423 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6424 (vect_mark_stmts_to_be_vectorized): Likewise.
6425 (vect_init_vector_1): Likewise.
6426 (vect_get_vec_def_for_operand): Likewise.
6427 (vect_finish_stmt_generation_1): Likewise.
6428 (vect_check_load_store_mask): Likewise.
6429 (vectorizable_call): Likewise.
6430 (vectorizable_conversion): Likewise.
6431 (vectorizable_operation): Likewise.
6432 (vectorizable_load): Likewise.
6433 (vect_analyze_stmt): Likewise.
6434 (vect_is_simple_use): Likewise.
6435 (vect_get_vector_types_for_stmt): Likewise.
6436 (vect_get_mask_type_for_stmt): Likewise.
6437 * tree-vectorizer.c (increase_alignment): Likewise.
6439 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6441 * doc/rtl.texi: Adjust vec_select description.
6442 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6443 non-constant selectors.
6445 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6447 * config/aarch64/aarch64-protos.h
6448 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6449 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6450 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6451 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6452 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6453 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6454 (AARCH64_ISA_RCPC8_4): New flag.
6455 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6456 to aarch64_offset_9bit_signed_unscaled_p.
6457 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6459 * config/aarch64/constraints.md (Ust): New constraint.
6460 * config/aarch64/predicates.md.
6461 (aarch64_9bit_offset_memory_operand): New predicate.
6462 (aarch64_rcpc_memory_operand): New predicate.
6464 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6466 PR rtl-optimization/87361
6467 * rtlanal.c (nonzero_bits1): Revert accidental change.
6469 2018-09-19 Richard Biener <rguenther@suse.de>
6471 PR tree-optimization/87349
6472 PR tree-optimization/87342
6473 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6475 2018-09-18 Marek Polacek <polacek@redhat.com>
6477 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6478 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6480 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6482 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6484 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6486 PR rtl-optimization/86882
6487 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6489 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6491 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6492 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6494 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6497 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6499 2018-09-18 Richard Biener <rguenther@suse.de>
6502 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6503 (compute_samebase_partition_bases): Likewise.
6504 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6505 (gimple_can_coalesce_p): Simplify.
6507 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6509 Handle a library implementation of ffs calling __builtin_ffs.
6510 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6511 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6514 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6516 * diagnostic-show-locus.c (class layout_range): Add field
6518 (layout_range::layout_range): Add "original_idx" param and use it
6519 to initialize new field.
6520 (make_range): Use 0 for original_idx.
6521 (layout::layout): Pass in index to calls to
6522 maybe_add_location_range.
6523 (layout::maybe_add_location_range): Add param "original_idx" and
6524 pass it on to layout_range.
6525 (layout::print_any_labels): Pass on range->m_original_idx to
6527 (gcc_rich_location::add_location_if_nearby): Use 0 for
6529 * gcc-rich-location.h (text_range_label::get_text): Update for new
6531 (range_label_for_type_mismatch::get_text): Likewise.
6533 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6535 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6537 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6539 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6540 format_string_diagnostic_t.
6541 (fmtwarn_n): Likewise.
6542 * substring-locations.c
6543 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6544 (format_warning_n_va): Convert to...
6545 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6546 (format_warning_va): Convert to...
6547 (format_string_diagnostic_t::emit_warning_va): ...this.
6548 (format_warning_at_substring): Convert to...
6549 (format_string_diagnostic_t::emit_warning): ...this.
6550 (format_warning_at_substring_n): Convert to...
6551 (format_string_diagnostic_t::emit_warning_n): ...this.
6552 * substring-locations.h (class format_string_diagnostic_t): New
6554 (format_warning_va): Convert to
6555 format_string_diagnostic_t::emit_warning_va.
6556 (format_warning_n_va): Convert to
6557 format_string_diagnostic_t::emit_warning_n_va.
6558 (format_warning_at_substring): Convert to
6559 format_string_diagnostic_t::emit_warning.
6560 (format_warning_at_substring_n): Convert to
6561 format_string_diagnostic_t::emit_warning_n.
6563 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6564 Bernd Schmidt <bernds_cb1@t-online.de>
6566 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6569 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6571 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6572 operand 0 predicate to nonimmediate operand.
6573 (rint<mode>2_frndint): Remove insn pattern.
6574 (rint<mode>2): Change operand 1 predicate to general_operand.
6575 Extend operand 1 to XFmode and generate rintxf2 insn.
6576 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6577 Do not use X87MODEF mode macro.
6578 (frndintxf2_<rounding>_i387): Rename from
6579 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6580 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6581 to XFmode and generate significandxf3 insn.
6583 2018-09-17 Richard Biener <rguenther@suse.de>
6585 PR tree-optimization/87328
6586 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6587 visiting unexecutable backedges when not iterating.
6588 (do_rpo_vn): Mark all edges not executable even when not
6591 2018-09-17 Martin Jambor <mjambor@suse.cz>
6594 * doc/invoke.texi (Warning Options): Likewise.
6596 2018-09-17 Richard Biener <rguenther@suse.de>
6598 PR tree-optimization/87301
6599 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6600 clean EH info from leftover copy assignments.
6602 2018-09-17 Martin Liska <mliska@suse.cz>
6604 PR gcov-profile/85871
6605 * gcov.c (output_intermediate_file): Fix out of bounds
6608 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6610 * config/arc/arc.c: Object attributes for core4 not reflected
6612 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6615 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6617 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6619 2018-09-17 Martin Liska <mliska@suse.cz>
6621 * doc/gcov.texi: Document new option --use-hotness-colors.
6622 * gcov.c (struct source_info): Declare new field.
6623 (source_info::source_info): Set default for maximum_count.
6624 (print_usage): Add new -q option.
6625 (process_args): Process it.
6626 (accumulate_line_info): Save src->maximum_count.
6627 (output_line_beginning): Make color line number if
6628 flag_use_hotness_colors is set.
6629 (output_line_details): Pass default argument value.
6630 (output_lines): Pass src->maximum_count.
6632 2018-09-17 Martin Liska <mliska@suse.cz>
6634 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6635 Use processor_names table.
6636 * config/i386/i386.c (ix86_default_align): Use
6637 processor_cost_table for alignment values.
6638 (ix86_option_override_internal): Use processor_names.
6639 (ix86_function_specific_print): Likewise.
6640 * config/i386/i386.h (struct processor_costs):
6641 Add alignment values.
6642 (struct ptt): Remove and replace with const char *.
6643 * config/i386/x86-tune-costs.h (struct processor_costs):
6644 Declare default alignments for all costs.
6646 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6648 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6649 symbolics or VR_VARYING ranges for ABS_EXPR.
6650 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6651 when range will wrap.
6653 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6656 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6657 before and after a JUMP_TABLE_DATA.
6659 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6662 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6663 when one operand is a function pointer. Use POINTER_TYPE_P and
6664 FUNC_OR_METHOD_TYPE_P.
6665 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6666 * fold-const.c (build_range_check): Likewise.
6667 * match.pd (simple_comparison): Likewise.
6669 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6672 * spellcheck.c (get_edit_distance_cutoff): New function.
6673 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6674 (selftest::test_get_edit_distance_one_way): ...this.
6675 (selftest::test_get_edit_distance_unit): Rename to...
6676 (selftest::test_get_edit_distance_both_ways): ...this.
6677 (selftest::test_edit_distances): Move tests to this new function,
6678 and test some more pairs of strings. Update for above renaming.
6679 (selftest::get_old_cutoff): New function.
6680 (selftest::test_get_edit_distance_cutoff): New function.
6681 (selftest::assert_suggested_for): New function.
6682 (ASSERT_SUGGESTED_FOR): New macro.
6683 (selftest::assert_not_suggested_for): New function.
6684 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6685 (selftest::test_suggestions): New function.
6686 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6687 tests to selftest::test_edit_distances and call it. Add calls to
6688 selftest::test_get_edit_distance_cutoff and
6689 selftest::test_suggestions.
6690 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6691 (best_match::consider): Replace hard-coded cutoff calculation with
6693 (best_match::get_cutoff): New declaration.
6694 (best_match::get_best_meaningful_candidate): Likewise.
6696 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6698 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6700 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6703 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6705 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6706 terminated string literal.
6708 2018-09-14 Martin Sebor <msebor@redhat.com>
6710 * builtins.c (unterminated_array): Handle ARRAY_REF.
6711 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6712 * builtins.h (unterminated_array): Declare extern.
6713 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6715 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6718 2018-09-14 Martin Sebor <msebor@redhat.com>
6719 Jeff Law <law@redhat.com>
6721 * builtins.c (unterminated_array): New.
6722 (expand_builtin_strcpy): Adjust.
6723 (expand_builtin_strcpy_args): Detect unterminated arrays.
6724 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6725 unterminated arrays.
6726 * gimple-fold.h (get_maxval_strlen): Add argument.
6727 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6729 * gimple-fold.c (get_range_strlen): Add argument.
6730 (get_maxval_strlen): Adjust.
6731 * gimple-fold.h (get_range_strlen): Add argument.
6733 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6735 * config/i386/movdirintrin.h: Fix copyright year.
6737 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6739 * reg-stack.c: Include regs.h.
6740 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6741 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6742 FIRST_STACK_REG, not DFmode.
6743 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6744 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6745 (change stack): Default register mode to the reg_raw_mode of
6746 FIRST_STACK_REG, not DFmode.
6747 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6748 (*swapxf): Rename from swapxf.
6750 2018-09-14 Carl Love <cel@us.ibm.com>
6752 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6753 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6755 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
6758 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6761 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
6764 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6766 2018-09-14 Jason Merrill <jason@redhat.com>
6768 Fix --enable-gather-detailed-mem-stats.
6769 * hash-table.c (hash_table_usage): Change from variable to function.
6770 * hash-table.h: Adjust.
6771 * Makefile.in: Add missing dependencies on hash-table.h.
6773 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6775 PR tree-optimization/87259
6777 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6778 execute_cse_reciprocals_1 has tried transforming.
6780 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
6782 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6783 VR_VARYING for PLUS/MINUS_EXPR.
6785 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
6787 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6790 2018-09-14 Richard Biener <rguenther@suse.de>
6793 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6794 bits for the merged partition.
6796 2018-09-13 Martin Sebor <msebor@redhat.com>
6797 Bernd Edlinger <bernd.edlinger@hotmail.de>
6799 * builtins.h (c_srlen): Add argument.
6800 * builtins.c (warn_string_no_nul): New function.
6801 (c_strlen): Add argument and use it. Update recursive calls.
6802 Pass DECL argument to string_constant to get info on non
6803 terminated strings. Update *NONSTR as needed.
6804 (fold_builtin_strlen): Add argument to calls to c_strlen.
6805 Warn for unterminated arrays.
6806 (warn_string_no_null): Add prototype.
6807 * expr.c (string_constant): Update arguments. Update recursive
6808 calls appropriately. Detect missing NUL terminator and outermost
6809 declaration its missing in.
6810 Improve checks for arrays with nonzero lower bound or elements
6811 that are not a single byte. Simplify offset computation.
6812 Simplify checks for non-NUL terminated strings.
6813 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6814 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6816 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6818 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6820 * fold-const.c (c_getstr): Fix function comment. Remove unused third
6821 argument. Fix range checks.
6822 * fold-const.h (c_getstr): Adjust protoype.
6823 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6824 string is constant but contains no NUL byte.
6826 * expr.c (string_constant): Adjust function comment.
6827 Remove bogus check for zero termination.
6829 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6831 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6832 (get_constant_size): Don't make STRING_CSTs larger than they are.
6833 (check_string_literal): New check function for STRING_CSTs.
6834 (output_constant): Use it.
6836 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6839 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6841 2018-09-13 Richard Biener <rguenther@suse.de>
6843 PR tree-optimization/87263
6844 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6845 (struct unwind_state): Add max_rpo field.
6846 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6847 Compute max_rpo, the max RPO number a block can be backwards reached
6848 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6849 separating it from the iterating mode.
6851 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6853 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6854 (rfs_decision): New scheduling decision.
6856 2018-09-13 Richard Biener <rguenther@suse.de>
6859 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6860 (vn_nary_op_insert_pieces_predicated): Do not write useless
6861 valid_dominated_by_p entry outside of the allocated storage.
6863 2018-09-13 Omar Sandoval <osandov@osandov.com>
6864 Tom de Vries <tdevries@suse.de>
6867 * dwarf2out.c (is_c): New function.
6868 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6870 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6873 * config/aarch64/aarch64.md (*aarch64_bfxil):
6875 * config/aarch64/constraints.md (Ulc): Define.
6876 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6878 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6881 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6883 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6884 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6885 aarch64_layout_frame call.
6886 (aarch64_expand_epilogue): Likewise.
6887 (aarch64_initial_elimination_offset): Likewise.
6888 (aarch64_get_separate_components): Likewise.
6889 (aarch64_use_return_insn_p): Likewise.
6890 (aarch64_layout_frame): Remove unneeded check.
6892 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6894 * configure.ac: Only append
6895 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6896 gcc_config_arguments if it was never reconfigured or last reconfigure
6897 was with different arguments.
6898 * configure: Regenerated.
6900 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6901 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6904 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6905 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6907 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6909 PR tree-optimization/87287
6910 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6911 X % C == 0 to X % (unsigned) C == 0 optimization to ...
6912 * match.pd (X % C == 0): ... here. New optimization.
6914 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6917 * expr.h (maybe_optimize_mod_cmp): Declare.
6918 * expr.c (mod_inv): New function.
6919 (maybe_optimize_mod_cmp): New function.
6920 (do_store_flag): Use it.
6921 * cfgexpand.c (expand_gimple_cond): Likewise.
6923 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
6924 Julian Brown <julian@codesourcery.com>
6927 * gimplify.c (gimplify_scan_omp_clauses): Set
6928 target_firstprivatize_array_bases in OpenACC parallel and kernels
6929 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6930 OpenACC data regions.
6932 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
6934 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6935 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6937 2018-09-12 Richard Biener <rguenther@suse.de>
6939 PR tree-optimization/87280
6940 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6941 edge but unreachable target.
6942 (do_rpo_vn): For conservatively handling a PHI only mark
6943 the backedge executable but not the block reachable.
6945 2018-09-12 Richard Biener <rguenther@suse.de>
6947 PR tree-optimization/87266
6948 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6951 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
6953 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6955 ("trunc<BFP:mode><DFP_ALL:mode>2")
6956 ("trunc<DFP_ALL:mode><BFP:mode>2")
6957 ("extend<BFP:mode><DFP_ALL:mode>2")
6958 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6959 according to the target operand type.
6961 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6962 Andreas Krebbel <krebbel@linux.ibm.com>
6964 PR tree-optimization/86844
6965 * gimple-ssa-store-merging.c
6966 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6967 there are any overlapping stores in between them, make sure they are
6968 also coalesced or we give up completely.
6970 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6973 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6974 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
6976 2018-09-12 Tom de Vries <tdevries@suse.de>
6978 * common.opt (gdescribe-dies): Add option.
6979 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6980 attribute for artifical and nameless decls.
6981 (dwarf2out_register_external_die): Add description attribute to
6982 external reference die.
6983 (add_desc_attribute): New functions.
6984 (gen_subprogram_die): Add description attribute to
6985 DW_TAG_call_site_parameter.
6986 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6987 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6988 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6990 (@item -gdescribe-dies): Add.
6992 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6994 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6995 (extract_range_from_binary_expr_1: Call
6996 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6997 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7000 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7002 * gimple-ssa-warn-alloca.c
7003 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7004 field for ALLOCA_BOUND_*_LARGE.
7006 2018-09-11 Nathan Sidwell <nathan@acm.org>
7008 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7010 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7012 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7013 for clobbers. Remove obsolete comment.
7015 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7017 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7018 mpxchk, mpxld and mpxst types.
7019 (define_attr length_immediate): Remove all processing of mpx types.
7020 (define_attr prefix_0f): Ditto.
7021 (define_attr memory): Ditto.
7023 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7025 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7026 (log<mode>2): Change operand 1 predicate to general_operand.
7027 Extend operand 1 to XFmode and generate logxf3 insn.
7028 (log10<mode>2): Change operand 1 predicate to general_operand.
7029 Extend operand 1 to XFmode and generate log10xf3 insn.
7030 (log2<mode>2): Change operand 1 predicate to general_operand.
7031 Extend operand 1 to XFmode and generate log2xf3 insn.
7032 (fyl2xp1_extend<mode>xf3_i387): Remove.
7033 (log1p<mode>2): Change operand 1 predicate to general_operand.
7034 Extend operand 1 to XFmode and generate log1pxf3 insn.
7035 (fxtract_extend<mode>xf3_i387): Remove.
7036 (logb<mode>2): Change operand 1 predicate to general_operand.
7037 Extend operand 1 to XFmode and generate logbxf3 insn.
7038 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7039 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7040 (significand<mode>2): Change operand 1 predicate to general_operand.
7041 Extend operand 1 to XFmode and generate significandxf3 insn.
7043 2018-09-11 Nathan Sidwell <nathan@acm.org>
7045 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7046 (load_specs): Use fatal_error.
7047 (DELETE_IF_ORDINARY, process_command): Use error.
7048 (execute, run_attempt): Use fatal_error.
7050 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7052 * diagnostic-core.h (sorry_at): New prototype.
7053 * diagnostic.c (sorry_at): New function.
7055 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7057 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7058 by zero as VR_UNDEFINED.
7060 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7062 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7063 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7064 (<sincos>mode2): New expander.
7065 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7066 (sincos -> sin, cos splitters): Remove splitter patterns.
7067 (sincos<mode>3): Change operand 2 predicate to general_operand.
7068 Extend operand 2 to XFmode and generate sincosxf3 insn.
7069 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7070 Change operand 3 predicate to const1_operand.
7071 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7072 (tanxf2): Update operands in the call to fptanxf4_i387.
7073 (tan<mode>2): Change operand 1 predicate to general_operand.
7074 Extend operand 1 to XFmode and generate tanxf3 insn.
7075 (atan2xf3): Rename from *fpatanxf3_i387.
7076 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7077 (atan2xf3): Remove expander.
7078 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7079 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7080 (atan<mode>2): Change operand 1 predicate to general_operand.
7081 Extend operand 1 to XFmode and generate atanxf3 insn.
7083 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7085 * config/i386/i386.md (x87/SSE constant load splitter): Use
7086 memory_operand instead of nonimmediate_operand for input operand
7089 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7091 * config/i386/i386.md (float partial SSE register stall splitter): Move
7092 splitter near its instruction pattern.
7093 (float_extend partial SSE register stall splitter): Ditto.
7094 (float_truncate partial SSE register stall splitter): Ditto.
7096 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7099 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7100 to speculation_safe_value_not_needed.
7103 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7104 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7105 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7106 leaf_function_p, instead use has_hard_reg_initial_val.
7108 2018-09-09 Nathan Sidwell <nathan@acm.org>
7110 * gcc.h (pfatal_with_name): Don't declare here.
7111 * gcc.c (pfatal_with_name): Make static.
7113 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7115 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7118 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7120 PR rtl-optimization/85458
7121 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7122 priority hook to reduce the priority of EXPR.
7124 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7126 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7127 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7128 with X87_ENABLE_FLOAT. Remove preparation code.
7129 (*float<SWI48:mode><MODEF:mode>2): Rename from
7130 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7131 math using "enabled" attribute.
7132 (*floatdi<MODEF:mode>2_i387): Rename from
7133 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7134 enable for 32bit targets only.
7135 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7137 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7138 as operand 1 predicate. Rewrite as define_insn_and_split.
7139 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7141 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7143 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7144 to fallthru to FLOAT case.
7146 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7149 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7150 around folding of vec_sl to handle out of range shift values.
7152 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7154 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7155 Update callers to gen_fix_trunc<mode>_i387_fisttp
7156 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7157 nonimmediate_operand.
7158 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7159 and corresponding splitters.
7160 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7161 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7162 (fix_truncdi_i387_with_temp): Remove insn pattern
7163 and corresponding splitters.
7164 (fix_trunc<mode>_i387): Change operand 0 predicate to
7165 nonimmediate_operand.
7166 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7167 and corresponding splitters.
7168 (*fistdi2_1): Remove.
7170 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7171 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7172 (*fist<mode>2_1): Remove.
7173 (fist<mode>2): Ditto.
7174 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7176 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7177 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7178 (fistdi2_<rounding>): Change operand 0 predicate to
7179 nonimmediate_operand.
7180 (fistdi2_<rounding>_with_temp): Remove insn pattern
7181 and corresponding splitters.
7182 (fist<mode>2_<rounding>): Change operand 0 predicate to
7183 nonimmediate_operand.
7184 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7185 and corresponding splitters.
7187 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7189 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7191 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7194 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7196 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7197 early gimple folding of vec_splat().
7198 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7199 * gimple-fold.h: Add an extern define for tree_vec_extract().
7201 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7203 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7204 wrappers around TREE_TYPE comparisons.
7206 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7209 * config/s390/predicates.md: Add nonsym_memory_operand.
7210 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7211 contains a SYMBOL_REF, load it into an intermediate pseudo.
7212 (s390_emit_compare_and_swap): Legitimize operand.
7213 * config/s390/s390.md: Use the new nonsym_memory_operand
7214 with UNSPECV_CAS patterns.
7216 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7219 * config/s390/s390-passes.def: New file.
7220 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7222 (make_pass_s390_early_mach): Add declaration.
7223 * config/s390/s390.c (make_pass_s390_early_mach):
7224 (s390_option_override): Remove dynamic registration.
7225 * config/s390/t-s390: Add s390-passes.def.
7227 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7229 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7230 Remove UNSPEC_LTREL_BASE check.
7231 (annotate_constant_pool_refs): Likewise.
7232 (find_constant_pool_ref): Likewise.
7233 (find_ltrel_base): Removed.
7234 (replace_ltrel_base): Removed.
7235 (s390_mainpool_finish): Remove replace_ltrel_base call.
7236 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7237 (s390_chunkify_finish): Remove replace_ltrel_base call.
7238 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7240 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7243 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7244 to speculation_safe_value_not_needed.
7246 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7247 Bernd Schmidt <bernds_cb1@t-online.de>
7249 * config/nvptx/nvptx-opts.h: New file.
7250 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7251 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7253 (TARGET_SM35): New macro.
7254 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7256 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7258 (misa=): New option.
7259 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7261 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7263 * config/i386/i386.md (truncdfsf2): Remove expander.
7264 (truncdfsf2_with_temp): Ditto.
7265 (truncxf<mode>2): Ditto.
7266 (*truncdfsf_fast_mixed): Remove insn pattern.
7267 (*truncdfsf_fast_i387): Ditto.
7268 (*truncdfsf_mixed): Ditto.
7269 (*truncdfsf_i387): Ditto.
7270 (*truncdfsf2_i387_1): Ditto.
7271 (*truncxfsf2_mixed): Ditto.
7272 (*truncxfdf2_mixed): Ditto.
7273 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7274 to call gen_truncxf<mode>2 instead.
7275 (*truncxf<mode>2_i387): Remove.
7276 (reg->reg splitters): Remove splitter pattern.
7277 (reg->mem splitters): Ditto.
7279 (truncdfsf2): New insn pattern.
7280 (truncxf<mode>2): Ditto.
7282 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7284 * tree-ssa-math-opts.c (is_mult_by): New function.
7285 (is_square_of): Use the above.
7286 (optimize_recip_sqrt): New function.
7287 (pass_cse_reciprocals::execute): Use the above.
7289 2018-09-05 Richard Biener <rguenther@suse.de>
7292 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7293 to zero-init the emplaced vec.
7295 2018-09-05 Martin Liska <mliska@suse.cz>
7297 PR tree-optimization/87205
7298 * tree-switch-conversion.c (pass_lower_switch::execute):
7299 Group cases for switch statements.
7301 2018-09-05 Richard Biener <rguenther@suse.de>
7303 PR tree-optimization/87217
7304 * tree-ssa-sccvn.c (vuse_valueize): New.
7305 (vn_reference_lookup_pieces): Use it.
7306 (vn_reference_lookup): Likewise.
7308 2018-09-05 Nathan Sidwell <nathan@acm.org>
7311 * stor-layout.c (place_field): Scan forwards to check last
7312 bitfield when ms_bitfield_placement is in effect.
7314 2018-09-05 Richard Biener <rguenther@suse.de>
7317 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7320 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7321 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7323 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7324 * config.gcc (extra_objs): Build it.
7325 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7327 * config/aarch64/aarch64-passes.def
7328 (pass_tag_collision_avoidance): New pass.
7329 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7330 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7331 (aarch64_classify_address): Remove static qualifier.
7332 (aarch64_address_info, aarch64_address_type): Move to...
7333 * config/aarch64/aarch64-protos.h: ... here.
7334 (make_pass_tag_collision_avoidance): New function.
7335 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7338 2018-09-05 Martin Liska <mliska@suse.cz>
7340 * doc/gcov.texi: Update documentation of humar
7342 * gcov.c (format_count): Print one decimal place, it provides
7343 more fine number of situations like '1G' vs. '1.4G'.
7345 2018-09-05 Martin Liska <mliska@suse.cz>
7348 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7349 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7350 to generate a MASK value.
7352 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7355 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7356 if frame pointer isn't used.
7357 (compute_frame_pointer_to_fb_displacement): Likewise.
7359 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7362 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7363 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7364 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7365 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7366 and OPTION_MASK_ISA_XSAVEC_UNSET.
7368 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7370 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7371 XOR operations in NAND case.
7373 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7375 * wide-int-range.cc (wide_int_range_convert): New.
7376 * wide-int-range.h (wide_int_range_convert): New.
7377 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7378 code into wide_int_range_convert.
7379 (extract_range_into_wide_ints): Do not munge anti range constants
7380 into the entire domain. Just return the range back.
7382 2018-09-04 Martin Liska <mliska@suse.cz>
7384 * genmatch.c (output_line_directive): Add new argument
7386 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7388 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7390 * doc/invoke.texi (Option Summary): Add whitespace.
7392 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7394 2018-09-04 Richard Biener <rguenther@suse.de>
7396 PR tree-optimization/87211
7397 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7398 backedge value we're supposed to treat as VARYING also number
7399 the PHI to VARYING in case it got a different value-number already.
7401 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7403 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7404 (extract_range_from_binary_expr_1): Do not call
7405 vrp_can_optimize_bit_op.
7406 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7408 (wide_int_range_get_mask_and_bounds): New.
7409 (wide_int_range_optimize_bit_op): New.
7410 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7411 (wide_int_range_bit_and): Same.
7412 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7413 (wide_int_range_optimize_bit_op): New.
7414 (wide_int_range_get_mask_and_bounds): New.
7416 2018-09-04 Richard Biener <rguenther@suse.de>
7418 PR tree-optimization/87176
7419 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7420 variable. When value-numbering a virtual PHI node make sure
7421 to not value-number to the backedge value.
7423 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7425 * doc/extend.texi (Long Long, Hex Floats): Document support for
7426 long long and hex floats in more recent versions of ISO C++.
7428 2018-09-03 Richard Biener <rguenther@suse.de>
7430 PR tree-optimization/87177
7431 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7434 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7436 * bb-reorder.c (edge_order): Convert to C-qsort-style
7437 tri-state comparator.
7438 (reorder_basic_blocks_simple): Change std::stable_sort to
7441 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7443 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7444 tri-state comparator.
7445 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7447 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7449 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7450 (mergesort): ... here as maximum count for using netsort.
7451 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7452 (gcc_stablesort): New.
7453 * system.h (gcc_stablesort): Declare.
7455 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7457 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7458 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7459 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7461 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7463 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7464 lxsdx and stxsdx alternatives.
7465 (*mov<mode>_hardfloat64): Ditto.
7466 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7468 2018-09-03 Richard Biener <rguenther@suse.de>
7470 PR tree-optimization/87200
7471 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7474 2018-09-03 Martin Liska <mliska@suse.cz>
7476 PR tree-optimization/87201
7477 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7478 Fix parenthesis in an expression.
7480 2018-09-03 Richard Biener <rguenther@suse.de>
7482 PR tree-optimization/87197
7483 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7484 visited. CSE the VN_INFO hashtable lookup.
7486 PR tree-optimization/87169
7487 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7488 iterating make sure there's no extra backedges from irreducible
7489 regions feeding the header. Mark the destination block
7492 2018-09-03 Martin Liska <mliska@suse.cz>
7495 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7496 * common/common-targhooks.c (default_get_valid_option_values):
7498 * common/common-targhooks.h (default_get_valid_option_values):
7500 * common/config/i386/i386-common.c: Move processor_target_table
7502 (ix86_get_valid_option_values): New function.
7503 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7504 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7505 (PTA_*): Move all defined masks into i386-common.c.
7506 (ix86_function_specific_restore): Use new processor_cost_table.
7507 * config/i386/i386.h (struct ptt): Moved from i386.c.
7508 (struct pta): Likewise.
7509 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7510 * doc/tm.texi.in: Likewise.
7511 * opt-suggestions.c (option_proposer::suggest_option):
7512 Pass prefix to build_option_suggestions.
7513 (option_proposer::get_completions): Likewise.
7514 (option_proposer::build_option_suggestions): Use the new target
7516 * opts.c (struct option_help_tuple): New struct.
7517 (print_filtered_help): Use the new target hook.
7519 2018-09-03 Martin Liska <mliska@suse.cz>
7522 * predict.c (set_even_probabilities): Add likely_edges
7523 argument and handle cases where we have precisely one
7525 (combine_predictions_for_bb): Catch also likely_edges.
7526 (tree_predict_by_opcode): Handle gswitch statements.
7527 * tree-cfg.h (find_case_label_for_value): New declaration.
7528 (find_taken_edge_switch_expr): Likewise.
7529 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7530 Find pivot in decision tree based on probabily, not by number of
7533 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7535 * doc/standards.texi (Standards): Update Objective-C reference.
7537 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7539 * doc/install.texi (Prerequisites): Update link for MPC.
7541 2018-09-01 Michael Matz <matz@suse.de>
7543 PR tree-optimization/87074
7544 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7545 PHIs for outer-loop uses.
7547 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7549 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7550 * doc/invoke.texi (C Dialect Options): Ditto.
7552 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7554 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7556 2018-08-31 Richard Biener <rguenther@suse.de>
7558 PR tree-optimization/87168
7559 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7560 (rpo_elim::eliminate_avail): When OP was not visited it must
7563 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7565 * tree-vrp.c (copy_value_range): Convert param "from" from
7566 "value_range *" to "const value_range *".
7567 (range_is_null): Likewise for param "vr".
7568 (range_int_cst_p): Likewise.
7569 (range_int_cst_singleton_p): Likewise.
7570 (symbolic_range_p): Likewise.
7571 (value_ranges_intersect_p): Likewise for both params.
7572 (value_range_nonnegative_p): Likewise for param "vr".
7573 (value_range_constant_singleton): Likewise.
7574 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7575 (extract_range_into_wide_ints): Likewise for param "vr".
7576 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7578 (vrp_can_optimize_bit_op): Likewise.
7579 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7581 (extract_range_from_unary_expr): Likewise.
7582 (debug_value_range): Likewise for param "vr".
7583 (value_range::dump): Add "const" qualifier.
7584 (vrp_prop::check_array_ref): Convert local "vr" from
7585 "value_range *" to "const value_range *".
7586 (vrp_prop::check_mem_ref): Likewise.
7587 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7588 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7589 (vrp_intersect_ranges): Likewise.
7590 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7591 (vrp_prop::vrp_finalize): Likewise.
7592 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7593 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7594 (extract_range_from_unary_expr): Likewise.
7595 (value_range_constant_singleton): Likewise.
7596 (symbolic_range_p): Likewise.
7597 (copy_value_range): Likewise.
7598 (extract_range_from_binary_expr_1): Likewise.
7599 (range_int_cst_p): Likewise.
7600 (vrp_set_zero_nonzero_bits): Likewise.
7601 (range_int_cst_singleton_p): Likewise.
7603 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7605 * config/aarch64/arm_neon.h (vabsd_s64): New.
7606 (vnegd_s64): Likewise.
7608 2018-08-31 Martin Jambor <mjambor@suse.cz>
7610 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7612 2018-08-31 Martin Liska <mliska@suse.cz>
7614 * ipa-icf.c (sem_item::add_type): Use
7615 sem_item::m_type_hash_cache.
7616 * ipa-icf.h: Move the cache from sem_item_optimizer
7619 2018-08-31 Nathan Sidwell <nathan@acm.org>
7621 * doc/extend.texi (Backwards Compatibility): Remove implicit
7622 extern C leeway of () being (...).
7624 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7626 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7628 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7632 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7634 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7637 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7638 gen_int_mode. Formatting fixes.
7640 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7642 * target.def (custom_function_descriptors): Improve documentation.
7643 * doc/tm.texi.in (Trampolines): Expand discussion of function
7644 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7645 beginning of the section.
7646 * doc/tm.texi: Regenerated.
7648 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7650 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7651 base class in the initializer list. This is a workaround for
7652 building with older GCC.
7653 (class auto_bb_flag): Likewise.
7655 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7657 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7658 (altivec_vcmpequ<VI_char>_p): Remove star.
7659 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7661 (expand_strncmp_vec_sequence): New function.
7662 (emit_final_str_compare_vec): New function.
7663 (expand_strn_compare): Add support for vector strncmp.
7664 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7665 length specification to bytes.
7666 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7667 (vcmpnezb_p): New pattern.
7668 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7669 for option -mstring-compare-inline-limit.
7671 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7673 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7674 (PTA_SKYLAKE): Add PTA_AES.
7675 (PTA_GOLDMONT): Likewise.
7677 2018-08-29 Jan Hubicka <jh@suse.cz>
7680 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7681 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7683 2018-08-29 Jan Hubicka <jh@suse.cz>
7685 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7687 (hash_tree): Do not visit TYPE_STUB_DECL.
7688 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7689 stream TYPE_STUB_DECL.
7690 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7691 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7692 after free_lang_data.
7693 (type_in_anonymous_namespace_p): Likewise.
7695 2018-08-29 Jan Hubicka <jh@suse.cz>
7697 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7698 comment that it has to be even number.
7699 (class sreal): Change m_sig type to int32_t.
7700 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7701 int64_t for temporary calculations.
7702 (sreal_verify_basics): Drop one bit from minimum and maximum.
7704 2018-08-30 Richard Biener <rguenther@suse.de>
7706 PR tree-optimization/87147
7707 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7708 (visit_phi): When the degenerate result is from the backedge and
7709 we didn't visit its definition yet drop to VARYING.
7710 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7712 2018-08-29 Jan Hubicka <jh@suse.cz>
7714 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7716 (hash_tree): Likewise.
7718 2018-08-29 Jan Hubicka <jh@suse.cz>
7720 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7721 and TYPE_NEXT_REF_TO.
7723 2018-08-29 Jan Hubicka <jh@suse.cz>
7725 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7726 comment that it has to be even number.
7727 (class sreal): Change m_sig type to int32_t.
7728 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7729 int64_t for temporary calculations.
7730 (sreal_verify_basics): Drop one bit from minimum and maximum.
7732 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7734 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7736 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7739 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7740 if to_add is negative.
7742 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7745 * builtins.c (c_strlen): Improve range checks.
7747 2018-08-29 Martin Sebor <msebor@redhat.com>
7748 Jeff Law <law@redhat.com>
7750 PR tree-optimization/86714
7751 PR tree-optimization/86711
7752 * builtins.c (c_strlen): Add arguments to call to string_constant.
7753 * expr.c (string_constant): Add argument. Detect missing nul
7754 terminator and outermost declaration it's missing in.
7755 * expr.h (string_constant): Add argument.
7756 * fold-const.c (read_from_constant_string): Add arguments to call to
7758 (c_getstr): Likewise.
7759 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7761 * tree-ssa-strlen.c (get_stridx): Likewise.
7763 2018-08-29 Jan Hubicka <jh@suse.cz>
7765 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7766 Do not stream DECL_VINDEX.
7767 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7768 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7769 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7771 2018-08-29 Richard Biener <rguenther@suse.de>
7773 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7774 virtual operands that are not default defs to honor region
7776 (rpo_vn_valueize): Remove ineffective code here.
7778 2018-08-29 Richard Biener <rguenther@suse.de>
7780 PR tree-optimization/87132
7781 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7782 when skipping defs reachable over backedges.
7784 2018-08-29 Richard Biener <rguenther@suse.de>
7786 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7787 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7788 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7789 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7790 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7791 (vn_reference_lookup_3): Remove use of const_parms.
7792 (free_rpo_vn): Do not free const_parms.
7793 (do_rpo_vn): Do not call init_const_parms.
7794 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7795 SSA_NAME_POINTS_TO_READONLY_MEMORY.
7796 (call_may_clobber_ref_p_1): Likewise.
7798 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
7801 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7803 (-ftree-scev-cprop): Document.
7805 2018-08-29 Jan Hubicka <jh@suse.cz>
7807 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7809 (sreal constructor): Update.
7810 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7811 sreal:operator/): Update.
7813 2018-08-29 Martin Liska <mliska@suse.cz>
7815 * tree-switch-conversion.c (switch_conversion::expand):
7816 Strenghten assumption about gswitch statements.
7818 2018-08-29 Richard Biener <rguenther@suse.de>
7820 PR tree-optimization/87117
7821 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7822 re-value-number released SSA VDEFs.
7824 2018-08-29 Richard Biener <rguenther@suse.de>
7826 PR tree-optimization/87126
7827 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7829 2018-08-28 Jim Wilson <jimw@sifive.com>
7831 * config/riscv/pic.md: Rewrite.
7832 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7834 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7835 (SOFTF, default_load, softload, softstore): New.
7837 2018-08-28 Jeff Law <law@redhat.com>
7839 * fold-const.c (fold_binary_loc): Remove recently added assert.
7841 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7843 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7844 to OP parmeter of generated function.
7846 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7848 PR tree-optimization/87009
7849 * match.pd: Add boolean optimizations.
7851 2018-08-28 Martin Sebor <msebor@redhat.com>
7854 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7855 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7856 (pass_walloca::gate): Use it.
7857 (alloca_call_type): Same.
7858 (pass_walloca::execute): Same.
7859 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7861 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7863 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7864 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7867 2018-08-28 Richard Biener <rguenther@suse.de>
7869 PR tree-optimization/87124
7870 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7871 constants before looking up avail.
7873 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7876 * calls.c (maybe_warn_nonstring_arg): Punt early if
7877 warn_stringop_overflow is zero. Don't call get_range_strlen
7878 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7879 Swap comparison operands to have constants on rhs. Only use
7880 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
7881 increment lenrng[0].
7883 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
7885 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7886 use of tree_to_shwi. Remove duplicated test for the size being
7887 a whole number of bytes.
7889 2018-08-28 Richard Biener <rguenther@suse.de>
7891 PR tree-optimization/87117
7892 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7893 Handle removed stmt without LHS (GIMPLE_NOP).
7895 2018-08-28 Richard Biener <rguenther@suse.de>
7897 PR tree-optimization/87117
7898 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7899 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7901 2018-08-28 Richard Biener <rguenther@suse.de>
7903 PR tree-optimization/87117
7904 * tree-ssa-pre.c (compute_avail): Do not make expressions
7905 with predicated values available.
7906 (get_expr_value_id): Assert we do not run into predicated value
7909 2018-08-28 Richard Biener <rguenther@suse.de>
7911 PR tree-optimization/87117
7912 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7913 get virtual operands.
7914 (get_expr_operands): Handle STRING_CST like other decls.
7916 2018-08-28 Martin Liska <mliska@suse.cz>
7918 * tree.h: Update documentation of fndecl_built_in_p
7922 2018-08-27 Jeff Law <law@redhat.com>
7923 PR tree-optimization/87110
7924 * tree-ssa-dse.c (compute_trims): Handle non-constant
7927 2018-08-27 Martin Sebor <msebor@redhat.com>
7929 PR tree-optimization/86914
7930 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7932 2018-08-27 Martin Sebor <msebor@redhat.com>
7934 PR tree-optimization/87112
7935 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7936 the type of the bound argument.
7938 2018-08-27 Jeff Law <law@redhat.com>
7940 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7941 type does not have a TYPE_SIZE_UNIT.
7943 2018-08-27 Steve Ellcey <sellcey@cavium.com>
7945 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7946 with include of backend.h.
7948 2018-08-27 Richard Biener <rguenther@suse.de>
7950 PR tree-optimization/86927
7951 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7952 use const cond reduction code.
7954 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
7956 PR tree-optimization/85758
7957 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7959 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7962 * diagnostic-show-locus.c (class layout_range): Update for
7963 conversion of show_caret_p to a tri-state.
7964 (layout_range::layout_range): Likewise.
7965 (make_range): Likewise.
7966 (layout::maybe_add_location_range): Likewise.
7967 (layout::should_print_annotation_line_p): Don't show annotation
7968 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7969 (layout::get_state_at_point): Update for conversion of
7970 show_caret_p to a tri-state. Bail out early for
7971 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7972 underlining or source colorization.
7973 (gcc_rich_location::add_location_if_nearby): Update for conversion
7974 of show_caret_p to a tri-state.
7975 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7976 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7978 (selftest::test_one_liner_labels): Likewise.
7979 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7980 conversion of show_caret_p to a tri-state.
7981 * pretty-print.c (text_info::set_location): Likewise.
7982 * pretty-print.h (text_info::set_location): Likewise.
7983 * substring-locations.c (format_warning_n_va): Likewise.
7984 * tree-diagnostic.c (default_tree_printer): Likewise.
7985 * tree-pretty-print.c (newline_and_indent): Likewise.
7987 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7990 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7991 line above for line-insertion fix-it hints.
7992 (selftest::test_fixit_insert_containing_newline): Update the
7993 expected results, and add a test with line-numbering enabled.
7995 2018-08-27 Martin Liska <mliska@suse.cz>
7998 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7999 params with DECL_HAS_VALUE_EXPR_P.
8001 2018-08-27 Martin Liska <mliska@suse.cz>
8003 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8004 selected expansion strategy.
8006 2018-08-27 Martin Liska <mliska@suse.cz>
8008 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8009 * builtins.c (is_builtin_fn): Likewise.
8010 * attribs.c (diag_attr_exclusions): Use new function
8011 fndecl_built_in_p and remove check for FUNCTION_DECL if
8013 (builtin_mathfn_code): Likewise.
8014 (fold_builtin_expect): Likewise.
8015 (fold_call_expr): Likewise.
8016 (fold_builtin_call_array): Likewise.
8017 (fold_call_stmt): Likewise.
8018 (set_builtin_user_assembler_name): Likewise.
8019 (is_simple_builtin): Likewise.
8020 * calls.c (gimple_alloca_call_p): Likewise.
8021 (maybe_warn_nonstring_arg): Likewise.
8022 * cfgexpand.c (expand_call_stmt): Likewise.
8023 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8024 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8025 (cgraph_node::verify_node): Likewise.
8026 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8027 (cgraph_node::create_clone): Likewise.
8028 * config/arm/arm.c (arm_insert_attributes): Likewise.
8029 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8030 * dse.c (scan_insn): Likewise.
8031 * expr.c (expand_expr_real_1): Likewise.
8032 * fold-const.c (operand_equal_p): Likewise.
8033 (fold_binary_loc): Likewise.
8034 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8035 * gimple-low.c (lower_stmt): Likewise.
8036 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8037 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8039 * gimple.c (gimple_build_call_from_tree): Likewise.
8040 (gimple_call_builtin_p): Likewise.
8041 (gimple_call_combined_fn): Likewise.
8042 * gimplify.c (gimplify_call_expr): Likewise.
8043 (gimple_boolify): Likewise.
8044 (gimplify_modify_expr): Likewise.
8045 (gimplify_addr_expr): Likewise.
8046 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8047 * ipa-cp.c (determine_versionability): Likewise.
8048 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8049 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8050 * ipa-split.c (visit_bb): Likewise.
8051 (split_function): Likewise.
8052 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8053 * lto-cgraph.c (input_node): Likewise.
8054 * lto-streamer-out.c (write_symbol): Likewise.
8055 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8056 (lower_omp_1): Likewise.
8057 * predict.c (strip_predict_hints): Likewise.
8058 * print-tree.c (print_node): Likewise.
8059 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8060 * trans-mem.c (is_tm_irrevocable): Likewise.
8061 (is_tm_load): Likewise.
8062 (is_tm_simple_load): Likewise.
8063 (is_tm_store): Likewise.
8064 (is_tm_simple_store): Likewise.
8065 (is_tm_abort): Likewise.
8066 (tm_region_init_1): Likewise.
8067 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8068 * tree-cfg.c (verify_gimple_call): Likewise.
8069 (move_stmt_r): Likewise.
8070 (stmt_can_terminate_bb_p): Likewise.
8071 * tree-eh.c (lower_eh_constructs_2): Likewise.
8072 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8073 * tree-inline.c (remap_gimple_stmt): Likewise.
8074 (copy_bb): Likewise.
8075 (estimate_num_insns): Likewise.
8076 (fold_marked_statements): Likewise.
8077 * tree-sra.c (scan_function): Likewise.
8078 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8079 (optimize_stack_restore): Likewise.
8080 (pass_fold_builtins::execute): Likewise.
8081 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8082 (mark_all_reaching_defs_necessary_1): Likewise.
8083 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8084 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8085 (pass_forwprop::execute): Likewise.
8086 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8087 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8088 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8089 * tree-ssa-strlen.c (get_string_length): Likewise.
8090 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8091 (find_func_aliases_for_call): Likewise.
8092 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8093 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8094 * tree-tailcall.c (find_tail_calls): Likewise.
8095 * tree.c (need_assembler_name_p): Likewise.
8096 (free_lang_data_in_decl): Likewise.
8097 (get_call_combined_fn): Likewise.
8098 * ubsan.c (is_ubsan_builtin_p): Likewise.
8099 * varasm.c (incorporeal_function_p): Likewise.
8100 * tree.h (DECL_BUILT_IN): Remove and replace with
8102 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8103 (fndecl_built_in_p): New.
8105 2018-08-27 Martin Liska <mliska@suse.cz>
8107 PR tree-optimization/86847
8108 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8109 Dump also subtree probability.
8110 (switch_decision_tree::do_jump_if_equal): New function.
8111 (switch_decision_tree::emit_case_nodes): Handle special
8112 situations in balanced tree that can be emitted much simpler.
8113 Fix calculation of probabilities that happen in tree expansion.
8114 * tree-switch-conversion.h (struct cluster): Add
8116 (struct simple_cluster): Likewise.
8117 (struct case_tree_node): Add new function has_child.
8118 (do_jump_if_equal): New.
8120 2018-08-27 Martin Liska <mliska@suse.cz>
8122 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8123 Add new argument to bit_test_cluster constructor.
8124 (bit_test_cluster::emit): Set bits really number of values
8126 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8127 probability argument.
8128 * tree-switch-conversion.h (struct bit_test_cluster):
8129 Add m_handles_entire_switch.
8131 2018-08-27 Martin Liska <mliska@suse.cz>
8133 PR tree-optimization/86702
8134 * tree-switch-conversion.c (jump_table_cluster::emit):
8135 Make probabilities even for values in jump table
8136 according to number of cases handled.
8137 (switch_decision_tree::compute_cases_per_edge): Pass
8138 argument to reset_out_edges_aux function.
8139 (switch_decision_tree::analyze_switch_statement): Likewise.
8140 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8143 2018-08-27 Martin Liska <mliska@suse.cz>
8145 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8146 cfun argument explicitly.
8147 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8148 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8149 function gimple_switch_default_bb.
8150 (convert_switch_statements):
8152 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8153 * stmt.c (label_to_block_fn): Use label_to_block and pass
8154 cfun argument explicitly and use gimple_switch_label_bb.
8155 (expand_case): Likewise.
8156 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8157 cfun argument explicitly. Likewise.
8158 (make_edges_bb): Likewise.
8159 (make_cond_expr_edges): Likewise.
8160 (get_cases_for_edge): Likewise.
8161 (make_gimple_switch_edges): Likewise.
8162 (label_to_block_fn): Likewise.
8163 (label_to_block): Likewise.
8164 (make_goto_expr_edges): Likewise.
8165 (make_gimple_asm_edges): Likewise.
8166 (main_block_label): Likewise.
8167 (group_case_labels_stmt): Likewise.
8168 (find_taken_edge_computed_goto): Likewise.
8169 (find_taken_edge_switch_expr): Likewise.
8170 (gimple_verify_flow_info): Likewise.
8171 (gimple_redirect_edge_and_branch): Likewise.
8172 (gimple_switch_label_bb): New function.
8173 (gimple_switch_default_bb): Likewise.
8174 (gimple_switch_edge): Likewise.
8175 (gimple_switch_default_edge): Likewise.
8176 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8177 (label_to_block): ... with this.
8178 (gimple_switch_label_bb): New.
8179 (gimple_switch_default_bb): Likewise.
8180 (gimple_switch_edge): Likewise.
8181 (gimple_switch_default_edge): Likewise.
8182 * tree-cfgcleanup.c (convert_single_case_switch): Use
8183 new gimple functions and pass new argument to label_to_block.
8184 (cleanup_control_flow_bb):
8185 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8186 cfun argument explicitly.
8187 (make_eh_edges): Likewise.
8188 (redirect_eh_dispatch_edge): Likewise.
8189 (lower_resx): Likewise.
8190 (lower_eh_dispatch): Likewise.
8191 (maybe_remove_unreachable_handlers): Likewise.
8192 (unsplit_eh): Likewise.
8193 (cleanup_empty_eh): Likewise.
8194 (verify_eh_edges): Likewise.
8195 (verify_eh_dispatch_edge): Likewise.
8196 * tree-ssa-dom.c (record_edge_info): Likewise.
8197 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8198 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8199 (thread_through_normal_block): Likewise.
8200 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8201 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8202 * tree-switch-conversion.c (switch_conversion::collect): Use new
8204 (switch_conversion::check_final_bb): Likewise.
8205 (switch_conversion::gather_default_values): Pass new argument
8207 (switch_conversion::build_constructors): Likewise.
8208 (switch_decision_tree::compute_cases_per_edge): Use new
8209 gimple_switch_edge function.
8210 (switch_decision_tree::analyze_switch_statement): Pass new argument
8212 (switch_decision_tree::try_switch_expansion): Use
8213 gimple_switch_default_edge.
8214 * tree-vrp.c (find_switch_asserts): Pass new argument
8216 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8217 (vr_values::simplify_switch_using_ranges): Likewise.
8219 2018-08-27 Richard Biener <rguenther@suse.de>
8221 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8222 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8224 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8225 (struct vn_nary_op_s): Add unwind_to member. Add
8226 predicated_values flag and put result into a union together
8227 with a linked list of vn_pval.
8228 (struct vn_ssa_aux): Add name member to make maintaining
8229 a map of SSA name to vn_ssa_aux possible. Remove no longer
8230 needed info, dfsnum, low, visited, on_sccstack, use_processed
8231 and range_info_anti_range_p members.
8232 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8233 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8235 (vn_valueize): New global.
8236 (vn_context_bb): Likewise.
8237 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8238 VN_INFO_PTR_INFO): Remove.
8239 * tree-ssa-sccvn.c: ... (rewrite)
8240 (pass_fre::execute): For -O2+ initialize loops and run
8241 RPO VN in optimistic mode (iterating). For -O1 and -Og
8242 run RPO VN in non-optimistic mode.
8243 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8244 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8245 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8246 (rpo-vn-max-loop-depth): Document.
8247 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8248 when valuezing the VUSE signals we walked out of the region.
8249 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8250 (phi_translate): Set VN context block to use for availability
8252 (compute_avail): Likewise.
8253 (pre_valueize): New function.
8254 (pass_pre::execute): Adjust to the RPO VN API.
8256 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8257 (propagate_constants_for_unrolling): Remove.
8258 (tree_unroll_loops_completely): Perform value-numbering
8259 on the unrolled bodies loop parent.
8261 2018-08-27 Richard Biener <rguenther@suse.de>
8263 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8264 for partial antic compute.
8266 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8268 PR rtl-optimization/87065
8269 * combine.c (simplify_if_then_else): Formatting fix.
8270 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8272 (known_cond): Don't return const_true_rtx for vector modes. Use
8273 CONST0_RTX instead of const0_rtx. Formatting fixes.
8275 2018-08-27 Martin Liska <mliska@suse.cz>
8277 PR gcov-profile/87069
8278 * gcov.c (process_file): Record files already processed
8279 and warn about a file being processed multiple times.
8281 2018-08-27 Martin Liska <mliska@suse.cz>
8284 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8285 Set default values for x_aarch64_*_string strings.
8286 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8287 prefix. For -mabi do not print '=ABI' in help and use
8288 <option_value> format for -msve-vector-bits and -moverride
8291 2018-08-26 Jeff Law <law@redhat.com>
8293 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8296 2018-08-26 Marek Polacek <polacek@redhat.com>
8298 PR c++/87029, Implement -Wredundant-move.
8299 * doc/invoke.texi: Document -Wredundant-move.
8301 2018-08-25 Martin Sebor <msebor@redhat.com>
8303 PR tree-optimization/87059
8304 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8305 to the same type as the other.
8306 * fold-const.c (fold_binary_loc): Assert expectation.
8308 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8310 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8311 extraneous parentheses, dead code section and formatting.
8313 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8316 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8317 wide enough for jumps in the line-numbering to be visible.
8318 (layout::print_gap_in_line_numbering): New member function.
8319 (layout::calculate_line_spans): When using line numbering, merge
8320 line spans that are only 1 line apart.
8321 (diagnostic_show_locus): When printing line numbers, show gaps in
8322 line numbering directly, rather than printing headers.
8323 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8324 line-numbering with multiple line spans.
8325 (selftest::test_fixit_insert_containing_newline_2): Add test of
8326 line-numbering, in which the spans are close enough to be merged.
8328 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8330 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8331 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8332 * tree-vrp.c (range_is_nonnull): Remove.
8333 (range_includes_zero_p): Accept value_range instead of min/max.
8334 (extract_range_from_binary_expr_1): Do not early bail on
8336 Use range_includes_zero_p instead of range_is_nonnull.
8337 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8338 of range_is_nonnull.
8339 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8340 special case VR_ANTI_RANGE.
8341 (vrp_finalize): Same.
8342 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8344 (range_is_nonnull): Remove.
8345 * vr-values.c (vrp_stmt_computes_nonzero): Use
8346 range_includes_zero_p instead of range_is_nonnull.
8347 (extract_range_basic): Pass value_range to range_includes_zero_p
8348 instead of range_is_nonnull.
8350 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8352 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8353 * emit-rtl.h (rtl_data): Remove return_bnd.
8354 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8355 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8356 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8357 (POINTER_BOUNDS_MODE): Remove definition.
8358 (make_pointer_bounds_mode): Remove.
8359 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8360 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8361 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8362 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8363 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8364 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8365 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8367 * config/i386/i386-modes.def (BND32, BND64): Remove.
8368 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8369 (dbx64_register_map): Ditto.
8370 (svr4_dbx_register_map): Ditto.
8371 (indirect_thunk_bnd_needed): Remove.
8372 (indirect_thunks_bnd_used): Ditto.
8373 (indirect_return_bnd_needed): Ditto.
8374 (indirect_return_via_cx_bnd): Ditto.
8375 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8376 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8377 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8378 (output_indirect_thunk_function): Remove handling of
8379 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8380 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8381 (ix86_save_reg): Remove handling of crtl->return_bnd.
8382 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8383 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8384 and UNSPEC_BNDLX_ADDR.
8385 (ix86_output_indirect_branch_via_reg): Remove handling of
8386 indirect_thunk_prefix_bnd.
8387 (ix86_output_indirect_branch_via_push): Ditto.
8388 (ix86_output_function_return): Ditto.
8389 (ix86_output_indirect_function_return): Ditto.
8390 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8391 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8392 (CALL_USED_REGISTERS): Ditto.
8393 (REG_ALLOC_ORDER): Update for removal of bound registers.
8394 (HI_REGISTER_NAMES): Ditto.
8395 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8396 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8397 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8398 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8399 (FIRST_PSEUDO_REG): Update.
8400 (BND): Remove mode iterator.
8401 * config/i386/predicates.md (bnd_mem_operator): Remove.
8403 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8405 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8408 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8410 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8411 the case in which the permute needs only a single element and
8412 repeats for every vector of the result. Extend that case to
8413 handle variable-length vectors.
8414 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8416 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8419 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8420 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8422 2018-08-24 Richard Biener <rguenther@suse.de>
8424 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8425 bb_flags_allocated members.
8426 (auto_flag): New RAII class for allocating flags.
8427 (auto_edge_flag): New RAII class for allocating edge flags.
8428 (auto_bb_flag): New RAII class for allocating bb flags.
8429 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8431 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8432 in favor of temporarily allocated BB flag.
8433 * hsa-brig.c: Re-order includes.
8434 * hsa-dump.c: Likewise.
8435 * hsa-regalloc.c: Likewise.
8436 * print-rtl.c: Likewise.
8437 * profile-count.c: Likewise.
8439 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8442 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8445 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8448 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8449 from wide_int_range_multiplicative_op.
8451 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8453 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8456 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8458 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8461 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8463 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8464 full GENERIC expression used for replacement.
8466 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8468 * tree-vrp.c (abs_extent_range): Remove.
8469 (extract_range_into_wide_ints): Pass wide ints by reference.
8470 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8471 Pass wide ints by reference in all calls to
8472 extract_range_into_wide_ints.
8473 * wide-int-range.cc (wide_int_range_div): New.
8474 * wide-int-range.h (wide_int_range_div): New.
8475 (wide_int_range_includes_zero_p): New.
8476 (wide_int_range_zero_p): New.
8478 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8480 * config/aarch64/aarch64.md (arches): New enum.
8481 (arch): New enum attr.
8482 (arch_enabled): New attr.
8483 (enabled): Now uses arch_enabled only.
8484 (simd, sve, fp16): Removed attribute.
8485 (fp): Attr now defined in terms of 'arch'.
8486 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8487 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8488 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8489 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8490 attributes into 'arch'.
8491 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8492 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8493 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8494 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8495 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8496 'simd' attribute into 'arch'.
8497 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8498 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8499 Convert use of 'fp' attribute to 'arch'.
8500 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8501 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8503 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8504 (different modes) Merge 'fp' and 'simd' into 'arch'.
8505 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8508 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8510 PR rtl-optimization/87026
8511 * expmed.c (canonicalize_comparison): If we can no longer create
8512 pseudoregisters, don't.
8514 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8517 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8519 * config/arm/arm.c (speculation_barrier_libfunc): New static
8521 (arm_init_libfuncs): Initialize it.
8522 (arm_emit_speculation_barrier): New function.
8523 * config/arm/arm.md (speculation_barrier): Call
8524 arm_emit_speculation_barrier for architectures that do not have
8526 (speculation_barrier_insn): Only match on Armv7 or later.
8528 2018-08-23 Richard Biener <rguenther@suse.de>
8531 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8534 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8536 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8537 of single-vector TBLs.
8538 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8541 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8544 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8545 aarch64_evpc_tbl guard.
8547 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8549 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8552 2018-08-22 Martin Sebor <msebor@redhat.com>
8555 * tree-pretty-print.c (pretty_print_string): Add argument.
8556 (dump_generic_node): Call to pretty_print_string with string size.
8558 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8560 PR rtl-optimization/86771
8561 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8562 of two SETs into those two SETs, one to be placed at i2, if that SETs
8563 destination is modified between i2 and i3.
8565 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8567 PR tree-optimization/86725
8568 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8570 (vect_analyze_scalar_cycles_1): Check it.
8572 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8574 PR tree-optimization/86725
8575 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8576 an outer loop phi as a double reduction, make sure that the
8577 single user of the phi result is an inner loop phi.
8579 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8581 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8582 grouped stores with gaps to a strided group.
8584 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8586 * tree-vect-stmts.c (get_group_load_store_type)
8587 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8588 first statement in a group.
8590 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8592 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8593 the sequence used in gcc/gcc.c.
8595 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8598 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8601 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8603 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8604 Darwin10-specific unwinder-shim.
8605 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8606 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8607 New to cater for Darwin10 Rosetta.
8609 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8611 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8612 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8614 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8619 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8620 (dwarf2out_switch_text_section): Generate a local label for the
8621 second function sub-section and apply it as the second FDE start
8623 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8624 second sub-section start.
8626 2018-08-22 Richard Biener <rguenther@suse.de>
8628 PR tree-optimization/86988
8629 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8631 2018-08-22 Richard Biener <rguenther@suse.de>
8633 PR tree-optimization/86945
8634 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8636 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8638 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8639 a comment about how uses of r2 for .sdata2 come about.
8641 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8643 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8645 2018-08-21 Marek Polacek <polacek@redhat.com>
8647 PR c++/86981, Implement -Wpessimizing-move.
8648 * doc/invoke.texi: Document -Wpessimizing-move.
8650 2018-08-21 Jan Hubicka <jh@suse.cz>
8652 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8653 * tree.h (is_redundant_typedef): Remove.
8654 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8656 2018-08-21 Jan Hubicka <jh@suse.cz>
8658 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8661 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8663 * expmed.c (extract_low_bits): Reject invalid subregs early.
8665 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8668 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8671 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8673 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8674 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8675 * config/vxworks.c: Likewise.
8677 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8679 * config/vxworks.c: Set targetm.have_ctors_dtors
8680 if HAVE_INITFINI_ARRAY_SUPPORT.
8681 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8682 if HAVE_INITFINI_ARRAY_SUPPORT.
8684 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8686 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8687 default search path for VxWorks < 7.
8689 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8691 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8692 (get_format_string): Refer to c_getstr.
8694 2018-08-21 Tom de Vries <tdevries@suse.de>
8696 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8697 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8698 (debuginfo_early_stop): Declare.
8699 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8700 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8701 (debuginfo_early_stop): New function.
8702 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8703 and debuginfo_early_stop.
8704 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8705 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8706 (general_init): Call debuginfo_early_init.
8707 (finalize): Call debuginfo_fini.
8708 (do_compile): Call debuginfo_init.
8709 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8711 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8713 2018-08-21 Tom de Vries <tdevries@suse.de>
8715 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8716 flag_dump_noaddr and flag_dump_unnumbered.
8718 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8720 * wide-int-range.cc (wide_int_range_abs): New.
8721 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8722 * wide-int-range.h (wide_int_range_abs): New.
8723 (wide_int_range_min_max): New.
8724 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8725 case to call wide_int_range_abs.
8726 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8727 (extract_range_from_abs_expr): Delete.
8729 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8732 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8733 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8736 2018-08-20 Nathan Sidwell <nathan@acm.org>
8737 Jeff Law <law@redhat.com>
8739 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8740 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8742 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8745 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8746 (decl_attributes): Likewise.
8747 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8749 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8750 * diagnostic-core.h (class auto_diagnostic_group): New class.
8751 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8752 (diagnostic_report_diagnostic): Handle the first diagnostics within
8754 (emit_diagnostic): Add auto_diagnostic_group instance.
8756 (inform_n): Likewise.
8757 (warning): Likewise.
8758 (warning_at): Likewise.
8759 (warning_n): Likewise.
8760 (pedwarn): Likewise.
8761 (permerror): Likewise.
8763 (error_n): Likewise.
8764 (error_at): Likewise.
8766 (fatal_error): Likewise.
8767 (internal_error): Likewise.
8768 (internal_error_no_backtrace): Likewise.
8769 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8770 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8771 * diagnostic.h (struct diagnostic_context): Add fields
8772 "diagnostic_group_nesting_depth",
8773 "diagnostic_group_emission_count", "begin_group_cb",
8775 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8776 Add auto_diagnostic_group instance(s).
8777 (find_explicit_erroneous_behavior): Likewise.
8778 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8779 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8780 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8781 (gimplify_va_arg_expr): Likewise.
8782 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8783 (HSA_SORRY_AT): Likewise.
8784 * ipa-devirt.c (compare_virtual_tables): Likewise.
8785 (warn_odr): Likewise.
8786 * multiple_target.c (expand_target_clones): Likewise.
8787 * opts-common.c (cmdline_handle_error): Likewise.
8788 * reginfo.c (globalize_reg): Likewise.
8789 * substring-locations.c (format_warning_n_va): Likewise.
8790 * tree-inline.c (expand_call_inline): Likewise.
8791 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8792 * tree-ssa-loop-niter.c
8793 (do_warn_aggressive_loop_optimizations): Likewise.
8794 * tree-ssa-uninit.c (warn_uninit): Likewise.
8795 * tree.c (warn_deprecated_use): Likewise.
8797 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
8800 * config/i386/i386.md (eh_return): Always update EH return
8801 address in word_mode.
8803 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
8805 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8806 TARGET_SPLIT_COMPLEX_ARG is defined.
8808 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8810 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8812 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8815 * expr.c (expand_assignment): Assert that bitpos is positive.
8816 (store_field): Likewise
8817 (expand_expr_real_1): Make sure that bitpos is positive.
8818 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8821 2018-08-20 Nathan Sidwell <nathan@acm.org>
8823 * Makefile.in (CPP_ID_DATA_H): Delete.
8824 (CPP_INTERNAL_H): Don't add it.
8825 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8826 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8828 2018-08-20 Richard Biener <rguenther@suse.de>
8830 PR tree-optimization/78655
8831 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8832 pointer + offset nonnull if either operand is nonnull work.
8834 2018-08-20 Tom de Vries <tdevries@suse.de>
8836 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8837 unless the referenced die describes the added property using
8838 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8839 Otherwise, add a DW_AT_location to the referenced die.
8841 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8844 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8845 register_operand when calling ix86_set_reg_reg_cost.
8846 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8847 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8848 predicate and to 1 otherwise.
8850 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8852 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8853 emit a diagnostic that it is not supported and reset the option.
8854 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8855 supported and consume the option. (ASM_FINAL_SPEC): New.
8857 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8859 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8862 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8864 C-SKY port: Documentation
8866 * doc/extend.texi (C-SKY Function Attributes): New section.
8867 * doc/invoke.texi (Option Summary): Add C-SKY options.
8868 (C-SKY Options): New section.
8869 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8871 2018-08-17 Jojo <jijie_rong@c-sky.com>
8872 Huibin Wang <huibin_wang@c-sky.com>
8873 Sandra Loosemore <sandra@codesourcery.com>
8874 Chung-Lin Tang <cltang@codesourcery.com>
8876 C-SKY port: Backend implementation
8878 * config/csky/*: New.
8879 * common/config/csky/*: New.
8881 2018-08-17 Jojo <jijie_rong@c-sky.com>
8882 Huibin Wang <huibin_wang@c-sky.com>
8883 Sandra Loosemore <sandra@codesourcery.com>
8884 Chung-Lin Tang <cltang@codesourcery.com>
8885 Andrew Jenner <andrew@codesourcery.com>
8887 C-SKY port: Configury
8889 * config.gcc (csky-*-*): New.
8890 * configure.ac: Add csky to targets for dwarf2 debug_line support.
8891 * configure: Regenerated.
8893 2018-08-17 David Malcolm <dmalcolm@redhat.com>
8895 * dump-context.h: Include "dumpfile.h".
8896 (dump_context::dump_printf_va): Convert final param from va_list
8897 to va_list *. Convert from ATTRIBUTE_PRINTF to
8898 ATTRIBUTE_GCC_DUMP_PRINTF.
8899 (dump_context::dump_printf_loc_va): Likewise.
8900 * dumpfile.c: Include "stringpool.h".
8901 (make_item_for_dump_printf_va): Delete.
8902 (make_item_for_dump_printf): Delete.
8903 (class dump_pretty_printer): New class.
8904 (dump_pretty_printer::dump_pretty_printer): New ctor.
8905 (dump_pretty_printer::emit_items): New member function.
8906 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8908 (dump_pretty_printer::emit_item): New member function.
8909 (dump_pretty_printer::stash_item): New member function.
8910 (dump_pretty_printer::format_decoder_cb): New member function.
8911 (dump_pretty_printer::decode_format): New member function.
8912 (dump_context::dump_printf_va): Reimplement in terms of
8913 dump_pretty_printer.
8914 (dump_context::dump_printf_loc_va): Convert final param from va_list
8916 (dump_context::begin_scope): Reimplement call to
8917 make_item_for_dump_printf.
8918 (dump_printf): Update for change to dump_printf_va.
8919 (dump_printf_loc): Likewise.
8920 (selftest::test_capture_of_dump_calls): Convert "stmt" from
8921 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
8922 with %T, %E, and %G.
8923 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8924 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8925 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8926 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8927 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8928 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8929 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8930 within a dump_printf_loc call to "%wu".
8931 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8932 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
8933 missing space after "=".
8934 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8935 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8936 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8937 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8938 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
8939 duplicate "vectorized" from message.
8941 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
8943 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8944 polyNxK_t element's TYPE_STRING_FLAG.
8946 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8948 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8949 (they were unnamed before). Fix comments.
8951 2018-08-17 Nathan Sidwell <nathan@acm.org>
8953 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8955 2018-08-17 Richard Biener <rguenther@suse.de>
8957 PR tree-optimization/86841
8958 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8960 2018-08-17 Martin Liska <mliska@suse.cz>
8962 * common.opt: Remove Warn, Init and Report for options with
8963 Ignore/Deprecated flag. Warning is done automatically for
8965 * config/i386/i386.opt: Likewise.
8966 * config/ia64/ia64.opt: Likewise.
8967 * config/rs6000/rs6000.opt: Likewise.
8968 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8969 Remove usage of flag_check_pointer_bounds.
8970 * lto-wrapper.c (merge_and_complain): Do not handle
8971 OPT_fcheck_pointer_bounds.
8972 (append_compiler_options): Likewise.
8973 * opt-functions.awk: Do not handle Deprecated.
8974 * optc-gen.awk: Check that Var, Report and Init are not
8975 used for an option with Ignore/Deprecated flag.
8976 * opts-common.c (decode_cmdline_option): Do not report
8978 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8980 * opts.h (struct cl_option): Remove cl_deprecated flag.
8981 (CL_ERR_DEPRECATED): Remove error enum value.
8983 2018-08-17 Richard Biener <rguenther@suse.de>
8986 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8987 across a va-arg-pack using call adjust its return value accordingly.
8989 2018-08-16 Martin Sebor <msebor@redhat.com>
8991 PR tree-optimization/86853
8992 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8993 (struct fmtresult): Add member and initialize it in ctors.
8994 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8995 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8996 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8997 (parse_directive): Handle %C same as %c.
8998 (sprintf_dom_walker::compute_format_length): Adjust.
8999 (is_call_safe): Adjust.
9001 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9003 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9004 for determining how to count the elements.
9005 * builtins.h (c_strlen): Adjust prototype.
9006 * expr.c (string_constant): Add new parameter mem_size.
9007 Set *mem_size appropriately.
9008 * expr.h (string_constant): Adjust protoype.
9009 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9010 * gimple-fold.h (get_range_strlen): Adjust prototype.
9011 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9012 (format_string): Call get_string_length with eltsize.
9014 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9016 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9017 to emit the span, rather than setting it as the prefix.
9019 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9021 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9022 "margin_char" parameter, defaulting to space. Use it in place
9023 of pp_space for the initial part of the margin.
9024 (layout::print_leading_fixits): Use '+' when filling the margin
9025 of line-insertion fix-it hints.
9027 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9029 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9032 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9034 * config/rs6000/altivec.md: Don't set length attribute to the default
9036 * config/rs6000/darwin.md: Ditto.
9037 * config/rs6000/dfp.md: Ditto.
9038 * config/rs6000/htm.md: Ditto.
9039 * config/rs6000/rs6000.md: Ditto.
9040 * config/rs6000/sync.md: Ditto.
9041 * config/rs6000/vsx.md: Ditto.
9043 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9045 * config/rs6000/altivec.md: Don't set length attribute to the default
9046 value, for branch instructions.
9047 * config/rs6000/darwin.md: Ditto.
9048 * config/rs6000/rs6000.md: Ditto.
9050 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9052 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9053 (unnamed conditional branch define_insn): Set length to 4 or 8
9054 depending on offset.
9055 (<bd>_<mode>): Similar, for alternative 0.
9056 (<bd>tf_<mode>): Ditto.
9058 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9060 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9062 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9064 * doc/rtl.texi: Replace old RTX class names with new names.
9067 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9069 * expmed.h (canonicalize_comparison): New declaration.
9070 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9071 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9072 * optabs.c (prepare_cmp_insn): Likewise.
9073 * rtl.h (unsigned_condition_p): New function which checks if a
9074 comparison operator is unsigned.
9076 2018-08-16 Nathan Sidwell <nathan@acm.org>
9078 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9079 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9081 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9084 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9085 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9086 (mov<mov>): ..this and enable unconditionally.
9088 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9090 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9092 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9094 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9095 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9096 "Common" with "Target".
9098 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9100 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9101 * doc/invoke.texi (mmitigate-rop): Remove.
9102 * config/i386/i386.c: Do not include "regrename.h".
9103 (ix86_rop_should_change_byte_p, reg_encoded_number)
9104 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9106 (ix86_reorg): Remove call to ix86_mitigate_rop.
9107 * config/i386/i386.md (attr "modrm_class"): Remove.
9108 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9109 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9110 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9112 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9114 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9115 allow folding of mergeh() and mergel() for the float and double types.
9116 (fold_mergehl_helper): Rework to handle building a permute tree
9119 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9121 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9124 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9126 * common.opt (fdiagnostics-show-labels): New option.
9127 * diagnostic-show-locus.c (class layout_range): Add field
9129 (class layout): Add field "m_show_labels_p".
9130 (layout_range::layout_range): Add param "label" and use it to
9132 (make_range): Pass in NULL for new "label" param of layout_range's
9134 (layout::layout): Initialize m_show_labels_p.
9135 (layout::maybe_add_location_range): Pass in loc_range->m_label
9136 when constructing layout_range instances.
9137 (struct line_label): New struct.
9138 (layout::print_any_labels): New member function.
9139 (layout::print_line): Call it if label-printing is enabled.
9140 (selftest::test_one_liner_labels): New test.
9141 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9142 * diagnostic.c (diagnostic_initialize): Initialize
9143 context->show_labels_p.
9144 * diagnostic.h (struct diagnostic_context): Add field
9146 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9147 -fno-diagnostics-show-labels.
9148 * dwarf2out.c (gen_producer_string): Add
9149 OPT_fdiagnostics_show_labels to the ignored options.
9150 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9152 (gcc_rich_location::maybe_add_expr): Likewise.
9153 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9154 label" param, defaulting to NULL.
9155 (gcc_rich_location::add_expr): Add "label" param.
9156 (gcc_rich_location::maybe_add_expr): Likewise.
9157 (class text_range_label): New class.
9158 (class range_label_for_type_mismatch): New class.
9159 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9160 of format_warning_va.
9161 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9162 * lto-wrapper.c (merge_and_complain): Add
9163 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9164 (append_compiler_options): Likewise to the dropped options.
9165 (append_diag_options): Likewise to the passed-on options.
9166 * opts.c (common_handle_option): Handle the new option.
9167 * selftest-diagnostic.c
9168 (test_diagnostic_context::test_diagnostic_context): Enable
9170 * substring-locations.c: Include "gcc-rich-location.h".
9171 (format_warning_n_va): Add "fmt_label" and "param_label" params
9172 and use them as appropriate.
9173 (format_warning_va): Add "fmt_label" and "param_label" params,
9174 passing them on to format_warning_n_va.
9175 (format_warning_at_substring): Likewise.
9176 (format_warning_at_substring_n): Likewise.
9177 * substring-locations.h (format_warning_va): Add "fmt_label" and
9178 "param_label" params.
9179 (format_warning_n_va): Likewise.
9180 (format_warning_at_substring): Likewise.
9181 (format_warning_at_substring_n): Likewise.
9182 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9184 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9187 * builtins.c (expand_builtin_memcmp): Do not expand the call
9188 when overflow is detected.
9190 2018-08-15 Martin Sebor <msebor@redhat.com>
9192 PR tree-optimization/71625
9193 * config/aarch64/aarch64-builtins.c
9194 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9196 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9198 * config/s390/s390.c (s390_reorg): Remove loop.
9200 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9203 (darwin_function_switched_text_sections): Delete.
9204 * gcc/config/darwin.h
9205 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9207 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9210 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9211 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9212 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9214 2018-08-15 Martin Liska <mliska@suse.cz>
9216 PR tree-optimization/86925
9217 * predict.c (expr_expected_value_1): When taking
9218 later predictor, assign also probability.
9219 Use fold_build2_initializer_loc in order to fold
9220 the expression in -frounding-math.
9222 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9224 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9226 (expand_vec_perm_1): Try the new method.
9228 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9231 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9232 Check whether lra_live_max_point is 0 before dividing.
9234 2018-08-14 Martin Sebor <msebor@redhat.com>
9236 PR tree-optimization/86650
9237 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9238 (vrp_prop::check_mem_ref): Same.
9240 2018-08-13 Liu Hao <lh_mouse@126.com>
9242 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9243 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9244 and clear it thereafter, as it only works for DBCS.
9246 2018-08-13 Liu Hao <lh_mouse@126.com>
9248 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9249 handle returned by _get_osf_handle().
9251 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9253 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9254 for folding vec_perm.
9256 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9258 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9259 Add support for gimple-folding of vec_pack() and vec_unpack()
9262 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9264 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9265 vec_xst variants to the list.
9266 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9267 vector loads and stores.
9269 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9271 * config.gcc (rs6000-ibm-aix4.x): Delete.
9272 (rs6000-ibm-aix5.1): Delete.
9273 (rs6000-ibm-aix5.2): Delete.
9274 (rs6000-ibm-aix5.3): Delete.
9275 * config/rs6000/aix43.h: Delete.
9276 * config/rs6000/aix51.h: Delete.
9277 * config/rs6000/aix52.h: Delete.
9278 * config/rs6000/t-aix43: Delete.
9280 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9282 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9284 (s390_decompose_address): Factor out constant pool ref
9287 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9289 * config/nds32/nds32-predicates.c
9290 (nds32_can_use_bclr_p): Change return type as bool.
9291 (nds32_can_use_bset_p): Ditto.
9292 (nds32_can_use_btgl_p): Ditto.
9293 (nds32_can_use_bitci_p): Ditto.
9294 * config/nds32/nds32-protos.h
9295 (nds32_can_use_bclr_p): Change declaration.
9296 (nds32_can_use_bset_p): Ditto.
9297 (nds32_can_use_btgl_p): Ditto.
9298 (nds32_can_use_bitci_p): Ditto.
9300 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9302 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9303 Support -msched-prolog-epilog option.
9304 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9306 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9308 * common/config/nds32/nds32-common.c
9309 (nds32_option_optimization_table): Enalbe -malways-align.
9311 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9313 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9315 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9316 OPT_misr_secure_ case.
9317 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9318 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9319 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9321 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9322 (nds32_isr_info): New field security_level.
9323 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9324 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9325 * config/nds32/nds32.opt (misr-secure): New option.
9326 * config/nds32/nds32_init.inc: New file.
9327 * config/nds32/nds32_isr.h: New file.
9329 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9331 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9332 Update comment for atomic instructions.
9333 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9334 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9336 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9337 load for __ATOMIC_SEQ_CST model.
9338 (atomic_loaddi_1): Remove float register target.
9339 (atomic_storedi): Handle CONST_INT values.
9340 (atomic_storedi_1): Remove float register source. Add special case
9342 (memory_barrier): New expander and insn.
9344 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9346 PR tree-optimization/86835
9347 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9348 new_stmt after def_gsi, make sure to insert new_square_stmt after
9349 that stmt, not 2 stmts before it.
9351 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9354 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9357 2018-08-10 Martin Liska <mliska@suse.cz>
9360 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9362 * builtins.c (expand_builtin_expect_with_probability):
9364 (expand_builtin_expect_with_probability): New function.
9365 (build_builtin_expect_predicate): Add new argumnet probability
9366 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9367 (fold_builtin_expect):
9370 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9371 * builtins.h (fold_builtin_expect): Set new argument.
9372 * doc/extend.texi: Document __builtin_expect_with_probability.
9373 * doc/invoke.texi: Likewise.
9374 * gimple-fold.c (gimple_fold_call): Pass new argument.
9375 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9376 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9377 * predict.c (get_predictor_value): New function.
9378 (expr_expected_value): Add new argument probability. Assume
9379 that predictor and probability are always non-null.
9380 (expr_expected_value_1): Likewise. For __builtin_expect and
9381 __builtin_expect_with_probability set probability. Handle
9382 combination in binary expressions.
9383 (tree_predict_by_opcode): Simplify code by simply calling
9384 get_predictor_value.
9385 (pass_strip_predict_hints::execute): Add handling of
9386 BUILT_IN_EXPECT_WITH_PROBABILITY.
9387 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9389 * tree.h (DECL_BUILT_IN_P): New function.
9391 2018-08-10 Martin Liska <mliska@suse.cz>
9393 PR tree-optimization/85799
9394 * passes.def: Add argument for pass_strip_predict_hints.
9395 * predict.c (class pass_strip_predict_hints): Add new argument
9397 (strip_predictor_early): New function.
9398 (pass_strip_predict_hints::execute): Call the function to
9400 (strip_predict_hints): New function.
9401 * predict.def: Fix comment.
9403 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9405 * Makefile.in: Clarify which tm.texi to copy over to assert the
9406 right to grant a GFDL license for all.
9408 2018-08-09 Jeff Law <law@redhat.com>
9410 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9413 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9415 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9418 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9420 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9421 reductions for variable-length vectors.
9423 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9426 * common.opt (fdiagnostics-show-line-numbers): New option.
9427 * diagnostic-show-locus.c (class layout): Add fields
9428 "m_show_line_numbers_p" and "m_linenum_width";
9429 (num_digits): New function.
9430 (test_num_digits): New function.
9431 (layout::layout): Initialize new fields. Update m_x_offset
9432 logic to handle any left margin.
9433 (layout::print_source_line): Print line number when requested.
9434 (layout::start_annotation_line): New member function.
9435 (layout::print_annotation_line): Call it.
9436 (layout::print_leading_fixits): Likewise.
9437 (layout::print_trailing_fixits): Likewise. Update calls to
9438 move_to_column for new parameter.
9439 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9440 it to potentially call start_annotation_line.
9441 (layout::show_ruler): Call start_annotation_line.
9442 (selftest::test_line_numbers_multiline_range): New selftest.
9443 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9444 and selftest::test_line_numbers_multiline_range.
9445 * diagnostic.c (diagnostic_initialize): Initialize
9446 show_line_numbers_p.
9447 * diagnostic.h (struct diagnostic_context): Add field
9448 "show_line_numbers_p".
9449 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9450 -fno-diagnostics-show-line-numbers.
9451 * dwarf2out.c (gen_producer_string): Add
9452 OPT_fdiagnostics_show_line_numbers to the ignored options.
9453 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9454 one setting" options.
9455 (append_compiler_options): Likewise to the dropped options.
9456 (append_diag_options): Likewise to the passed-on options.
9457 * opts.c (common_handle_option): Handle the new option.
9458 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9460 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9462 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9463 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9464 third argument of type "const signed char" to descriptions of
9465 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9466 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9467 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9468 __builtin_bcdsub_ov functions.
9470 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9472 PR tree-optimization/86858
9473 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9474 flow_bb_inside_loop_p calls.
9476 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9478 PR tree-optimization/86871
9479 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9480 instead of gimple_assign_lhs.
9482 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9485 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9486 register constraint to operand 0.
9487 (add<mode>3_carryinC): Likewise.
9488 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9490 2018-08-09 Martin Liska <mliska@suse.cz>
9493 * common.opt: Remove extra line.
9495 2018-08-09 Martin Liska <mliska@suse.cz>
9497 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9498 at the end of a line, make first letter capital and end up
9499 a sentence with a dot.
9500 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9501 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9502 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9503 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9504 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9505 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9506 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9507 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9508 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9509 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9510 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9511 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9512 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9513 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9514 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9515 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9516 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9517 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9519 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9522 * config/s390/s390.c (s390_option_override_internal): Reduce the
9523 stack-clash-protection-probe-interval param if it would be too big
9526 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9529 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9530 * config/m68k/m68k.c (handle_move_double): Don't call
9531 m68k_final_prescan_insn.
9532 (m68k_adjust_decorated_operand): Renamed from
9533 m68k_final_prescan_insn, remove first and third operand and
9535 (print_operand): Call it.
9536 (print_operand_address): Call it.
9538 2018-08-08 Nathan Sidwell <nathan@acm.org>
9540 * diagnostic.c (diagnostic_report_current_module): Use
9541 linemap_included_from & linemap_included_from_linemap.
9543 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9545 * config/aarch64/aarch64-cores.def: Add phecda core.
9546 * config/aarch64/aarch64-tune.md: Regenerate.
9547 * doc/invoke.texi: Add phecda core.
9549 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9552 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9554 * config/s390/s390.md ("movti"): Add more alternatives for
9555 constant to GPR copies.
9557 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9559 * config/s390/s390.c: Fix whitespace damage throughout the file.
9560 * config/s390/s390.h: Likewise.
9561 * config/s390/tpf.h: Likewise.
9563 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9565 * config/s390/s390.c (s390_loadrelative_operand_p):
9566 Remove TARGET_CPU_ZARCH usages.
9567 (s390_rtx_costs): Likewise.
9568 (s390_legitimate_constant_p): Likewise.
9569 (s390_cannot_force_const_mem): Likewise.
9570 (legitimate_reload_constant_p): Likewise.
9571 (s390_preferred_reload_class): Likewise.
9572 (legitimize_pic_address): Likewise.
9573 (legitimize_tls_address): Likewise.
9574 (s390_split_branches): Removed.
9575 (s390_add_execute): Removed.
9576 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9577 (s390_mainpool_start): Likewise.
9578 (s390_mainpool_finish): Likewise.
9579 (s390_mainpool_cancel): Removed.
9580 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9581 (s390_chunkify_cancel): Likewise.
9582 (s390_return_addr_rtx): Likewise.
9583 (s390_register_info): Remove split_branches_pending_p uages.
9584 (s390_optimize_register_info): Likewise.
9585 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9586 split_branches_pending_p usages.
9587 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9588 (s390_load_got): Likewise.
9589 (s390_expand_split_stack_prologue): Likewise.
9590 (output_asm_nops): Likewise.
9591 (s390_function_profiler): Likewise.
9592 (s390_emit_call): Likewise.
9593 (s390_conditional_register_usage): Likewise.
9594 (s390_optimize_prologue): Likewise.
9595 (s390_reorg): Remove TARGET_CPU_ZARCH and
9596 split_branches_pending_p usages.
9597 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9599 (s390_output_indirect_thunk_function): Likewise.
9600 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9601 (TARGET_CPU_ZARCH_P): Removed.
9602 (struct machine_function): Remove split_branches_pending_p.
9603 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9605 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9607 * common/config/s390/s390-common.c (processor_flags_table):
9609 * config.gcc: Remove with_arch/with_tune support.
9610 * config/s390/2064.md: Remove cpu attribute comparisons.
9611 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9613 * config/s390/linux.h (ASM_SPEC):
9614 Remove -march support.
9615 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9616 Use a table to get an arch level.
9617 * config/s390/s390-opts.h (enum processor_type):
9619 * config/s390/s390.c
9620 (processor_table): Remove entries, add arch_level values.
9621 (s390_issue_rate): Remove cases.
9622 (s390_option_override): Adjust
9623 s390_option_override_internal() call.
9624 (s390_option_override_internal): Remove deprecation warning.
9625 (s390_valid_target_attribute_tree): Adjust
9626 s390_option_override_internal() call.
9627 * config/s390/s390.h (struct s390_processor):
9628 Share with s390-c.c, add arch_level field.
9629 * config/s390/s390.md:
9630 Remove occurrences in cpu attribute.
9631 * config/s390/s390.opt: Remove -march/-mtune support.
9632 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9633 * doc/invoke.texi: Remove deprecation warning.
9635 2018-08-08 Luis Machado <luis.machado@linaro.org>
9637 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9639 (qdf24xx_tunings): Set vector cost structure to
9640 qdf24xx_vector_cost.
9642 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9643 <register_sextend>: Set to 3.
9645 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9648 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9649 * config/aarch64/aarch64-simd.md
9650 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9651 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9652 (aarch64_frecpx<mode>): ...this new pattern.
9653 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9654 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9656 2018-08-07 Martin Liska <mliska@suse.cz>
9659 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9660 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9661 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9662 * doc/extend.texi: Document that malloc attribute adds
9665 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9668 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9669 Define to speculation_safe_value_not_needed.
9671 2018-08-06 Jeff Law <law@redhat.com>
9673 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9674 the vr_values instance to cprop_into_stmt.
9675 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9676 (cprop_operand): Also query EVRP to determine if OP is a constant.
9678 2018-08-06 Nathan Sidwell <nathan@acm.org>
9680 * diagnostic.c (diagnostic_report_current_module): Reroll
9681 included-at loop. Translate text.
9683 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9685 * function-tests.c (selftest::test_expansion_to_rtl): Call
9686 free_after_compilation.
9688 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9690 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9692 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9694 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9695 loops with memory block operations from getting unrolled.
9697 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9700 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9701 Define to speculation_safe_value_not_needed.
9703 2018-08-06 Jeff Law <law@redhat.com>
9705 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9708 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9711 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9712 with all enabled __intN types.
9714 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9716 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9718 * alias.c (record_set): Check for clobber high.
9719 * cfgexpand.c (expand_gimple_stmt): Likewise.
9720 * combine-stack-adj.c (single_set_for_csa): Likewise.
9721 * combine.c (find_single_use_1): Likewise.
9722 (set_nonzero_bits_and_sign_copies): Likewise.
9723 (get_combine_src_dest): Likewise.
9724 (is_parallel_of_n_reg_sets): Likewise.
9725 (try_combine): Likewise.
9726 (record_dead_and_set_regs_1): Likewise.
9727 (reg_dead_at_p_1): Likewise.
9728 (reg_dead_at_p): Likewise.
9729 * dce.c (deletable_insn_p): Likewise.
9730 (mark_nonreg_stores_1): Likewise.
9731 (mark_nonreg_stores_2): Likewise.
9732 * df-scan.c (df_find_hard_reg_defs): Likewise.
9733 (df_uses_record): Likewise.
9734 (df_get_call_refs): Likewise.
9735 * dwarf2out.c (mem_loc_descriptor): Likewise.
9736 * haifa-sched.c (haifa_classify_rtx): Likewise.
9737 * ira-build.c (create_insn_allocnos): Likewise.
9738 * ira-costs.c (scan_one_insn): Likewise.
9739 * ira.c (equiv_init_movable_p): Likewise.
9740 (rtx_moveable_p): Likewise.
9741 (interesting_dest_for_shprep): Likewise.
9742 * jump.c (mark_jump_label_1): Likewise.
9743 * postreload-gcse.c (record_opr_changes): Likewise.
9744 * postreload.c (reload_cse_simplify): Likewise.
9745 (struct reg_use): Add source expr.
9746 (reload_combine): Check for clobber high.
9747 (reload_combine_note_use): Likewise.
9748 (reload_cse_move2add): Likewise.
9749 (move2add_note_store): Likewise.
9750 * print-rtl.c (print_pattern): Likewise.
9751 * recog.c (decode_asm_operands): Likewise.
9752 (store_data_bypass_p): Likewise.
9753 (if_test_bypass_p): Likewise.
9754 * regcprop.c (kill_clobbered_value): Likewise.
9755 (kill_set_value): Likewise.
9756 * reginfo.c (reg_scan_mark_refs): Likewise.
9757 * reload1.c (maybe_fix_stack_asms): Likewise.
9758 (eliminate_regs_1): Likewise.
9759 (elimination_effects): Likewise.
9760 (mark_not_eliminable): Likewise.
9761 (scan_paradoxical_subregs): Likewise.
9762 (forget_old_reloads_1): Likewise.
9763 * reorg.c (find_end_label): Likewise.
9764 (try_merge_delay_insns): Likewise.
9765 (redundant_insn): Likewise.
9766 (own_thread_p): Likewise.
9767 (fill_simple_delay_slots): Likewise.
9768 (fill_slots_from_thread): Likewise.
9769 (dbr_schedule): Likewise.
9770 * resource.c (update_live_status): Likewise.
9771 (mark_referenced_resources): Likewise.
9772 (mark_set_resources): Likewise.
9773 * rtl.c (copy_rtx): Likewise.
9774 * rtlanal.c (reg_referenced_p): Likewise.
9775 (single_set_2): Likewise.
9776 (noop_move_p): Likewise.
9777 (note_stores): Likewise.
9778 * sched-deps.c (sched_analyze_reg): Likewise.
9779 (sched_analyze_insn): Likewise.
9781 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9783 * cse.c (invalidate_reg): New function extracted from...
9784 (invalidate): ...here.
9785 (canonicalize_insn): Check for clobber high.
9786 (invalidate_from_clobbers): invalidate clobber highs.
9787 (invalidate_from_sets_and_clobbers): Likewise.
9788 (count_reg_usage): Check for clobber high.
9789 (insn_live_p): Likewise.
9790 * cselib.c (cselib_expand_value_rtx_1):Likewise.
9791 (cselib_invalidate_regno): Check for clobber in setter.
9792 (cselib_invalidate_rtx): Pass through setter.
9793 (cselib_invalidate_rtx_note_stores):
9794 (cselib_process_insn): Check for clobber high.
9795 * cselib.h (cselib_invalidate_rtx): Add operand.
9797 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9799 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9800 (mark_not_eliminable): Likewise.
9801 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9802 * lra-lives.c (process_bb_lives): Check for clobber high.
9803 * lra.c (new_insn_reg): Remember clobber highs.
9804 (collect_non_operand_hard_regs): Check for clobber high.
9805 (lra_set_insn_recog_data): Likewise.
9806 (add_regs_to_insn_regno_info): Likewise.
9807 (lra_update_insn_regno_info): Likewise.
9809 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9811 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9812 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9814 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9816 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9817 (copy_insn_1): Likewise.
9818 (gen_hard_reg_clobber_high): New gen function.
9819 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9820 * genemit.c (gen_exp): Likewise.
9821 (gen_emit_seq): Pass through info.
9822 (gen_insn): Check for CLOBBER_HIGH.
9823 (gen_expand): Pass through info.
9824 (gen_split): Likewise.
9825 (output_add_clobbers): Likewise.
9826 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9827 (remove_clobbers): Likewise.
9828 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9830 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9832 * doc/rtl.texi (clobber_high): Add.
9833 (parallel): Add in clobber high
9834 * rtl.c (rtl_check_failed_code3): Add function.
9835 * rtl.def (CLOBBER_HIGH): Add expression.
9836 * rtl.h (RTL_CHECKC3): Add macro.
9837 (rtl_check_failed_code3): Add declaration.
9838 (XC3EXP): Add macro.
9840 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9843 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9844 cfun->machine->max_used_stack_alignment if needed.
9846 2018-08-04 Martin Sebor <msebor@redhat.com>
9848 PR tree-optimization/86571
9849 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9852 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9855 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9858 2018-08-03 Jeff Law <law@redhat.com>
9861 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9862 Define to speculation_safe_value_not_needed.
9864 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9866 * doc/gcov.texi (-x): Remove duplicate "to".
9867 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9868 (-Wif-not-aligned): Remove duplicate "is".
9869 (-flto): Remove duplicate "the".
9870 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9871 duplicate "v5.00.b".
9872 (MSP430 Options): Remove duplicate "and" from the description
9873 of "-mgprel-sec=regexp".
9874 (x86 Options): Remove duplicate copies of "vmldLog102" and
9875 vmlsLog104 from description of "-mveclibabi=type".
9877 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9879 * internal-fn.h (first_commutative_argument): Declare.
9880 * internal-fn.c (first_commutative_argument): New function.
9881 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9882 restrictions for pattern statements. Use first_commutative_argument
9883 to look for commutative operands in calls to internal functions.
9885 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
9887 * Makefile.in (wide-int-range.o): New.
9888 * tree-vrp.c: Move all the wide_int_* functions to...
9889 * wide-int-range.cc: ...here.
9890 * tree-vrp.h: Move all the wide_int_* prototypes to...
9891 * wide-int-range.h: ...here.
9893 2018-08-03 Tom de Vries <tdevries@suse.de>
9895 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9897 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9898 * except.c (output_function_exception_table): Do early exit if
9899 targetm_common.except_unwind_info (&global_options) == UI_NONE.
9901 2018-08-03 Martin Liska <mliska@suse.cz>
9903 * predict.c (dump_prediction): Change to 2 digits
9906 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
9908 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9910 (falkor_am_1_gtov_gtov): ... a new insn reservation.
9912 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
9914 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9915 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9916 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9917 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9918 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9920 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9922 * diagnostic-show-locus.c (diagnostic_show_locus): Use
9923 pp_take_prefix when saving the existing prefix.
9924 * diagnostic.c (diagnostic_append_note): Likewise.
9925 * langhooks.c (lhd_print_error_function): Likewise.
9926 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9927 param's type. Free the existing prefix.
9928 (pp_take_prefix): New function.
9929 (pretty_printer::pretty_printer): Drop the prefix parameter.
9930 Rename the length parameter to match the comment.
9931 (pretty_printer::~pretty_printer): Free the prefix.
9932 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9934 (struct pretty_printer): Drop the "const" from "prefix" field's
9935 type and clarify memory management.
9936 (pp_set_prefix): Drop the "const" from the 2nd param.
9937 (pp_take_prefix): New decl.
9939 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9941 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9942 for word_mode_ok here instead of passing as argument.
9943 (expand_block_compare): Change select_block_compare_mode() call.
9944 (expand_strncmp_gpr_sequence): New function.
9945 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9947 2018-08-02 Jeff Law <law@redhat.com>
9950 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9951 Define to speculation_safe_value_not_needed.
9954 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9955 Define to speculation_safe_value_not_needed.
9957 2018-08-02 Tom de Vries <tdevries@suse.de>
9960 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9961 function. Return UI_TARGET unconditionally.
9962 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9963 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9965 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9967 * genemit.c (print_overload_test): Fix typo.
9969 2018-08-02 Richard Biener <rguenther@suse.de>
9971 PR tree-optimization/86816
9972 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9973 which checks for value availability before querying it.
9974 (gvn_uses_equal): Use it.
9975 (same_succ_hash): Likewise.
9976 (gimple_equal_p): Likewise.
9978 2018-08-02 Nick Clifton <nickc@redhat.com>
9981 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9982 Define to speculation_safe_value_not_needed.
9985 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9986 Define to speculation_safe_value_not_needed.
9989 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9990 Define to speculation_safe_value_not_needed.
9993 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9994 Define to speculation_safe_value_not_needed.
9997 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9998 Define to speculation_safe_value_not_needed.
10001 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10002 Define to speculation_safe_value_not_needed.
10005 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10006 Define to speculation_safe_value_not_needed.
10009 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10010 Define to speculation_safe_value_not_needed.
10013 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10014 speculation_safe_value_not_needed.
10017 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10018 to speculation_safe_value_not_needed.
10020 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10022 * doc/md.texi: Expand the documentation of instruction names
10023 to mention port-local uses. Document '@' in pattern names.
10024 * read-md.h (overloaded_instance, overloaded_name): New structs.
10025 (mapping): Declare.
10026 (md_reader::handle_overloaded_name): New member function.
10027 (md_reader::get_overloads): Likewise.
10028 (md_reader::m_first_overload): New member variable.
10029 (md_reader::m_next_overload_ptr): Likewise.
10030 (md_reader::m_overloads_htab): Likewise.
10031 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10032 m_next_overload_ptr and m_overloads_htab.
10033 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10034 (get_mode_token, get_code_token, get_int_token): New functions.
10035 (map_attr_string): Add an optional argument that passes back
10036 the associated iterator.
10037 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10038 (md_reader::handle_overloaded_name, add_overload_instance): New
10040 (apply_iterators): Handle '@' names. Report an error if '@'
10041 is used without iterators.
10042 (initialize_iterators): Initialize the new iterator_group fields.
10043 * genopinit.c (handle_overloaded_code_for)
10044 (handle_overloaded_gen): New functions.
10045 (main): Use them to print declarations of maybe_code_for_* and
10046 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10047 * genemit.c (print_overload_arguments, print_overload_test)
10048 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10049 (main): Use it to print definitions of maybe_code_for_* and
10050 maybe_gen_* functions.
10051 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10052 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10053 instead of explicit mode checks.
10054 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10055 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10056 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10057 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10058 (aarch64_expand_compare_and_swap): Likewise
10059 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10060 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10061 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10062 (aarch64_constant_pool_reload_icode): Delete.
10063 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10064 instead of aarch64_constant_pool_reload_icode. Use
10065 code_for_aarch64_reload_mov instead of explicit mode checks.
10066 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10067 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10068 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10069 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10070 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10071 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10072 (aarch64_atomic_load_op_code): Delete.
10073 (aarch64_emit_atomic_load_op): Likewise.
10074 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10075 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10076 instead of aarch64_emit_atomic_load_op.
10077 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10078 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10079 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10080 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10081 character before the pattern name.
10082 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10083 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10084 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10085 (aarch64_frecps<mode>): Likewise.
10086 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10087 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10088 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10089 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10090 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10092 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10094 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10095 Allow HFmode constants if TARGET_FP_F16INST.
10097 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10100 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10101 No longer check last store for clobber of address register.
10103 2018-08-02 Martin Liska <mliska@suse.cz>
10105 PR gcov-profile/86817
10106 * gcov.c (process_all_functions): New function.
10108 (process_file): Move functions processing to
10109 process_all_functions.
10111 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10113 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10114 "const" to the "gimple *" and "rtx_insn *" parameters.
10115 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10117 (dump_location_t::dump_location_t): Likewise.
10119 2018-08-01 Martin Sebor <msebor@redhat.com>
10121 PR tree-optimization/86650
10122 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10123 rather than a "gcall *". Directly pass the data of interest
10124 to percent_K_format, rather than building a temporary CALL_EXPR
10126 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10127 (gimple_fold_builtin_strncat): Adjust.
10128 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10129 gcall* argument with gimple*.
10130 * gimple-ssa-warn-restrict.c (check_call): Same.
10131 (wrestrict_dom_walker::before_dom_children): Same.
10132 (builtin_access::builtin_access): Same.
10133 (check_bounds_or_overlap): Same
10134 (maybe_diag_overlap): Same.
10135 (maybe_diag_offset_bounds): Same.
10136 * tree-diagnostic.c (default_tree_printer): Move usage of
10137 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10139 * tree-pretty-print.c (percent_K_format): Add argument.
10140 * tree-pretty-print.h: Add argument.
10141 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10142 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10143 (maybe_diag_stxncpy_trunc): Same.
10144 (handle_builtin_stxncpy): Same.
10145 (handle_builtin_strcat): Same.
10147 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10149 * match.pd: Optimise pointer range checks.
10151 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10153 PR tree-optimization/86758
10154 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10155 to remove pattern statements.
10157 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10159 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10160 result of dfs_enumerate_from when constructing stmt_vec_infos,
10161 instead of additionally calling get_loop_body.
10163 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10165 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10167 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10168 When creating an iv, assert that the step is not known to be zero.
10169 (vect_setup_realignment): Update call accordingly.
10170 * tree-vect-stmts.c (vectorizable_store): Likewise.
10171 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10173 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10175 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10176 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10177 (vectorizable_reduction): Likewise.
10178 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10179 (vect_detect_hybrid_slp_stmts): Likewise.
10180 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10182 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10184 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10185 (wide_int_set_zero_nonzero_bits): ...this.
10186 (zero_nonzero_bits_from_vr): Rename to...
10187 (vrp_set_zero_nonzero_bits): ...this.
10188 (extract_range_from_multiplicative_op_1): Abstract wide int
10190 (wide_int_range_multiplicative_op): ...here.
10191 (extract_range_from_binary_expr_1): Extract wide int binary
10192 operations into their own functions.
10193 (wide_int_range_lshift): New.
10194 (wide_int_range_can_optimize_bit_op): New.
10195 (wide_int_range_shift_undefined_p): New.
10196 (wide_int_range_bit_xor): New.
10197 (wide_int_range_bit_ior): New.
10198 (wide_int_range_bit_and): New.
10199 (wide_int_range_trunc_mod): New.
10200 (extract_range_into_wide_ints): New.
10201 (vrp_shift_undefined_p): New.
10202 (extract_range_from_multiplicative_op): New.
10203 (vrp_can_optimize_bit_op): New.
10204 * tree-vrp.h (value_range::dump): New.
10205 (wide_int_range_multiplicative_op): New.
10206 (wide_int_range_lshift):New.
10207 (wide_int_range_shift_undefined_p): New.
10208 (wide_int_range_bit_xor): New.
10209 (wide_int_range_bit_ior): New.
10210 (wide_int_range_bit_and): New.
10211 (wide_int_range_trunc_mod): New.
10212 (zero_nonzero_bits_from_bounds): Rename to...
10213 (wide_int_set_zero_nonzero_bits): ...this.
10214 (zero_nonzero_bits_from_vr): Rename to...
10215 (vrp_set_zero_nonzero_bits): ...this.
10216 (range_easy_mask_min_max): Rename to...
10217 (wide_int_range_can_optimize_bit_op): this.
10218 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10219 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10221 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10223 * tree-vectorizer.h (vect_orig_stmt): New function.
10224 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10225 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10226 (vect_create_epilog_for_reduction): Likewise.
10227 (vectorizable_live_operation): Likewise.
10228 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10229 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10230 * tree-vect-stmts.c (vectorizable_call): Likewise.
10231 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10233 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10235 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10237 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10238 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10239 (vect_transform_loop): Likewise.
10240 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10242 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10244 * tree-vectorizer.h (vect_schedule_slp): Return void.
10245 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10246 (vect_schedule_slp): Likewise.
10248 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10250 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10252 (vect_transform_loop): Update calls accordingly. Schedule SLP
10253 instances before the main loop, if any exist.
10255 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10257 PR tree-optimization/86749
10258 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10259 If the lhs is used in a COND_EXPR, check that it is being used
10260 as the "then" or "else" value.
10262 2018-08-01 Tom de Vries <tdevries@suse.de>
10265 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10266 speculation_safe_value_not_needed.
10268 2018-08-01 Richard Biener <rguenther@suse.de>
10270 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10271 as base and offset.
10273 2018-08-01 Martin Liska <mliska@suse.cz>
10275 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10276 format how successful transformation is dumped.
10277 (gimple_mod_pow2_value_transform): Likewise.
10278 (gimple_mod_subtract_transform): Likewise.
10279 (gimple_stringops_transform): Likewise.
10281 2018-08-01 Martin Liska <mliska@suse.cz>
10283 PR value-prof/35543
10284 * value-prof.c (interesting_stringop_to_profile_p):
10285 Simplify the code and add BUILT_IN_MEMMOVE.
10286 (gimple_stringops_transform): Likewise.
10288 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10290 * config/aarch64/aarch64-simd.md
10291 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10292 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10293 use GPI iterator instead of SI mode.
10295 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10297 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10298 rs6000_speculation_barrier.
10299 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10300 new barrier pattern name.
10302 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10304 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10305 (speculation_barrier): New insn.
10307 2018-08-01 Richard Biener <rguenther@suse.de>
10310 * graphite.h: Include isl/id.h and isl/space.h to allow build
10313 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10316 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10317 mode for COFF targets.
10318 * defaults.h (TARGET_COFF): Define.
10319 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10320 TARGET_COFF): Define.
10321 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10322 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10323 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10325 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10327 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10328 * gimple-streamer-out.c (output_bb): Save it.
10329 * lto-streamer-in.c (input_struct_function_base): Restore
10330 instance discriminator if available. Create map on demand.
10331 * lto-streamer-out.c (output_struct_function_base): Save it if
10333 * final.c (decl_to_instance_map): Document LTO strategy.
10335 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10336 Olivier Hainque <hainque@adacore.com>
10338 * debug.h (decl_to_instance_map_t): New type.
10339 (decl_to_instance_map): Declare.
10340 (maybe_create_decl_to_instance_map): New inline function.
10341 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10342 to track basic block discriminators.
10343 (final_start_function_1): Initialize them.
10344 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10346 (decl_to_instance_map): New variable.
10347 (map_decl_to_instance, maybe_set_discriminator): New functions.
10348 (notice_source_line): Set discriminator.
10350 2018-07-31 Ian Lance Taylor <iant@golang.org>
10352 * targhooks.c (default_have_speculation_safe_value): Add
10355 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10357 * dump-context.h: Include "pretty-print.h".
10358 (dump_context::refresh_dumps_are_enabled): New decl.
10359 (dump_context::emit_item): New decl.
10360 (class dump_context): Add fields "m_test_pp" and
10362 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10363 (temp_dump_context::get_dumped_text): New decl.
10364 (class temp_dump_context): Add field "m_pp".
10365 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10366 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10368 (set_dump_file): Update for above change.
10369 (set_alt_dump_file): Likewise.
10370 (dump_loc): New overload, taking a pretty_printer *.
10371 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10372 to any test pretty-printer.
10373 (make_item_for_dump_gimple_stmt): New function, adapted from
10374 optinfo::add_gimple_stmt.
10375 (dump_context::dump_gimple_stmt): Call it, and use the result,
10376 eliminating the direct usage of dump_file and alt_dump_file in
10377 favor of indirectly using them via emit_item.
10378 (make_item_for_dump_gimple_expr): New function, adapted from
10379 optinfo::add_gimple_expr.
10380 (dump_context::dump_gimple_expr): Call it, and use the result,
10381 eliminating the direct usage of dump_file and alt_dump_file in
10382 favor of indirectly using them via emit_item.
10383 (make_item_for_dump_generic_expr): New function, adapted from
10385 (dump_context::dump_generic_expr): Call it, and use the result,
10386 eliminating the direct usage of dump_file and alt_dump_file in
10387 favor of indirectly using them via emit_item.
10388 (make_item_for_dump_printf_va): New function, adapted from
10389 optinfo::add_printf_va.
10390 (make_item_for_dump_printf): New function.
10391 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10392 and use the result, eliminating the direct usage of dump_file and
10393 alt_dump_file in favor of indirectly using them via emit_item.
10394 (make_item_for_dump_dec): New function.
10395 (dump_context::dump_dec): Call it, and use the result,
10396 eliminating the direct usage of dump_file and alt_dump_file in
10397 favor of indirectly using them via emit_item.
10398 (make_item_for_dump_symtab_node): New function, adapted from
10399 optinfo::add_symtab_node.
10400 (dump_context::dump_symtab_node): Call it, and use the result,
10401 eliminating the direct usage of dump_file and alt_dump_file in
10402 favor of indirectly using them via emit_item.
10403 (dump_context::begin_scope): Reimplement, avoiding direct usage
10404 of dump_file and alt_dump_file in favor of indirectly using them
10406 (dump_context::emit_item): New member function.
10407 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10408 Set up test pretty-printer on the underlying context. Call
10409 refresh_dumps_are_enabled.
10410 (temp_dump_context::~temp_dump_context): Call
10411 refresh_dumps_are_enabled.
10412 (temp_dump_context::get_dumped_text): New member function.
10413 (selftest::verify_dumped_text): New function.
10414 (ASSERT_DUMPED_TEXT_EQ): New macro.
10415 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10416 and then without optinfo enabled. Add uses of
10417 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10418 * dumpfile.h: Update comment for the dump_* API.
10419 * optinfo-emit-json.cc
10420 (selftest::test_building_json_from_dump_calls): Update for new
10421 param for temp_dump_context ctor.
10422 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10423 and "m_owned" field.
10424 (optinfo_item::~optinfo_item): Likewise.
10425 (optinfo::add_item): New member function.
10426 (optinfo::emit): Update comment.
10427 (optinfo::add_string): Delete.
10428 (optinfo::add_printf): Delete.
10429 (optinfo::add_printf_va): Delete.
10430 (optinfo::add_gimple_stmt): Delete.
10431 (optinfo::add_gimple_expr): Delete.
10432 (optinfo::add_tree): Delete.
10433 (optinfo::add_symtab_node): Delete.
10434 (optinfo::add_dec): Delete.
10435 * optinfo.h (class dump_context): New forward decl.
10436 (optinfo::add_item): New decl.
10437 (optinfo::add_string): Delete.
10438 (optinfo::add_printf): Delete.
10439 (optinfo::add_printf_va): Delete.
10440 (optinfo::add_gimple_stmt): Delete.
10441 (optinfo::add_gimple_expr): Delete.
10442 (optinfo::add_tree): Delete.
10443 (optinfo::add_symtab_node): Delete.
10444 (optinfo::add_dec): Delete.
10445 (optinfo::add_poly_int): Delete.
10446 (optinfo_item::optinfo_item): Remove "owned" param.
10447 (class optinfo_item): Remove field "m_owned".
10449 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10451 PR middle-end/86705
10452 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10453 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10454 requested variable alignment.
10455 (expand_one_ssa_partition): Likewise.
10456 (expand_one_var): Likewise.
10458 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10460 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10461 to speculation_safe_value_not_needed.
10463 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10465 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10466 * targhooks.c (speculation_safe_value_not_needed): New function.
10467 * target.def (have_speculation_safe_value): Update documentation.
10468 * doc/tm.texi: Regenerated.
10470 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10472 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10473 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10475 (despeculate_copy<ALLI:mode>_insn): New insn.
10476 (despeculate_copyti_insn): New insn.
10477 (despeculate_simple<ALLI:mode>): New insn
10478 (despeculate_simpleti): New insn.
10479 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10481 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10482 aarch64_speculation_safe_value.
10483 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10485 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10487 * config/aarch64/aarch64-speculation.cc: New file.
10488 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10489 before pass_reorder_blocks.
10490 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10492 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10493 X14 and X15 when tracking speculation.
10494 * config/aarch64/aarch64.md (register name constants): Add
10495 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10496 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10497 (speculation_barrier): New insn attribute.
10498 (cmp<mode>): Allow SP in comparisons.
10499 (speculation_tracker): New insn.
10500 (speculation_barrier): Add speculation_barrier attribute.
10501 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10502 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10503 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10505 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10507 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10508 aarch64_track_speculation is true.
10509 (tb<optab><mode>1): Likewise.
10510 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10511 generate CB[N]Z when tracking speculation.
10512 (aarch64_split_compare_and_swap): Likewise.
10513 (aarch64_split_atomic_op): Likewise.
10515 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10517 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10519 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10521 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10522 (speculation_barrier): New insn.
10524 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10526 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10527 * config/arm/arm.md (speculation_barrier): New expand.
10528 (speculation_barrier_insn): New pattern.
10530 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10532 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10533 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10534 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10535 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10537 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10538 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10539 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10540 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10541 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10542 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10543 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10544 * builtins.c (expand_speculation_safe_value): New function.
10545 (expand_builtin): Call it.
10546 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10547 * doc/extend.texi: Document __builtin_speculation_safe_value.
10548 * doc/md.texi: Document "speculation_barrier" pattern.
10549 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10550 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10551 * doc/tm.texi: Regenerated.
10552 * target.def (have_speculation_safe_value, speculation_safe_value): New
10554 * targhooks.c (default_have_speculation_safe_value): New function.
10555 (default_speculation_safe_value): New function.
10556 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10557 (default_speculation_safe_value): Add prototype.
10559 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10561 * dump-context.h (dump_context::dump_loc): New decl.
10562 * dumpfile.c (dump_context::dump_loc): New member function.
10563 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10564 and dump_gimple_stmt.
10565 (dump_context::dump_gimple_expr_loc): Likewise, using
10567 (dump_context::dump_generic_expr_loc): Likewise, using
10569 (dump_context::dump_printf_loc_va): Likewise, using
10571 (dump_context::begin_scope): Explicitly using the global function
10572 "dump_loc", rather than the member function.
10574 2018-07-31 Martin Sebor <msebor@redhat.com>
10576 PR tree-optimization/86741
10577 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10579 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10581 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10582 depend on whether prefetch instructions will be emitted or not.
10583 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10584 will be emitted or not.
10585 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10586 (TARGET_SETMEM_PFD): New macros.
10588 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10590 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10591 (NULL_STMT_VEC_INFO): Delete.
10592 (stmt_vec_info::operator*): Likewise.
10593 (stmt_vec_info::operator gimple *): Likewise.
10594 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10595 of NULL_STMT_VEC_INFO.
10596 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10597 (vect_reassociating_reduction_p): Likewise.
10598 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10599 (vectorizable_store): Likewise.
10600 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10601 (vec_info::free_stmt_vec_infos): Likewise.
10603 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10605 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10606 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10608 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10610 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10611 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10612 (vec_info::free_stmt_vec_info): New private member functions.
10613 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10614 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10615 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10616 set_stmt_vec_info_vec and free_stmt_vec_infos.
10617 * tree-vect-loop.c (_loop_vec_info): Remove call to
10618 set_stmt_vec_info_vec.
10619 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10620 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10621 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10622 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10623 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10624 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10625 with the clearing in the xcalloc.
10626 (stmt_vec_info_vec): Delete.
10627 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10628 (vectorize_loops): Likewise.
10629 (vec_info::~vec_info): Remove argument from call to
10630 free_stmt_vec_infos.
10631 (vec_info::add_stmt): Remove vinfo argument from call to
10634 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10636 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10637 rather than a gimple stmt.
10638 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10639 information for pattern statements when passed the original
10640 statement; instead wait to be passed the pattern statement itself.
10641 Don't call set_vinfo_for_stmt here.
10642 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10643 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10644 stmt_vec_infos here.
10645 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10646 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10647 stmt_vec_infos entry.
10649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10651 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10652 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10653 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10654 * tree-vect-stmts.c (vectorizable_call): Likewise.
10655 (vectorizable_simd_clone_call): Likewise.
10657 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10659 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10660 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10661 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10662 * tree-vect-loop.c (vect_transform_loop): Likewise.
10663 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10664 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10668 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10669 (vect_dr_stmt): Delete.
10670 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10671 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10673 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10674 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10675 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10676 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10677 (vect_analyze_data_refs): Likewise.
10678 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10680 (vect_find_same_alignment_drs): Likewise.
10681 (vect_slp_analyze_node_dependences): Update calls accordingly.
10682 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10683 instead of DR_VECT_AUX.
10684 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10685 of a vector data references. Use vec_info::lookup_dr instead of
10687 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10688 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10689 instead of DR_VECT_AUX.
10691 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10693 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10695 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10697 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10698 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10699 (vect_gen_prolog_loop_niters): Likewise.
10701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10703 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10704 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10705 (vect_known_alignment_in_bytes, vect_dr_behavior)
10706 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10707 instead of data_references. Update calls to other routines for
10708 which the same change has been made.
10709 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10710 dr_vec_infos instead of stmt_vec_infos.
10711 (vect_analyze_data_ref_dependence): Update call accordingly.
10712 (vect_slp_analyze_data_ref_dependence)
10713 (vect_record_base_alignments): Use DR_VECT_AUX.
10714 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10715 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10716 (vector_alignment_reachable_p, vect_get_data_access_cost)
10717 (vect_peeling_supportable, vect_analyze_group_access_1)
10718 (vect_analyze_group_access, vect_analyze_data_ref_access)
10719 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10720 (vect_compile_time_alias, vect_small_gap_p)
10721 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10722 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10723 instead of data_references. Update calls to other routines for
10724 which the same change has been made.
10725 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10726 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10727 (vect_slp_analyze_and_verify_node_alignment)
10728 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10729 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10730 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10732 (_vect_peel_info::dr): Replace with...
10733 (_vect_peel_info::dr_info): ...this new field.
10734 (vect_peeling_hash_get_most_frequent)
10735 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10736 (vect_peeling_hash_get_lowest_cost):
10737 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10738 routines for which the same change has been made.
10739 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10741 * tree-vect-loop-manip.c (get_misalign_in_elems)
10742 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10744 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10745 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10746 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10747 (get_group_load_store_type, get_negative_load_store_type)
10748 (vect_get_data_ptr_increment, vectorizable_store)
10749 (vectorizable_load): Likewise.
10750 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10751 Update calls to other routines for which the same change has been made.
10753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10755 * tree-vectorizer.h (vec_info::move_dr): New member function.
10756 (dataref_aux): Rename to...
10757 (dr_vec_info): ...this and add "dr" and "stmt" fields.
10758 (_stmt_vec_info::dr_aux): Update accordingly.
10759 (_stmt_vec_info::data_ref_info): Delete.
10760 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10761 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10762 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10763 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10765 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
10766 (STMT_VINFO_DR_INFO): New macro.
10767 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10768 (set_dr_misalignment): Update after rename of dataref_aux.
10769 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
10770 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10771 initialization of STMT_VINFO_DATA_REF.
10772 * tree-vectorizer.c (vec_info::move_dr): New function.
10773 * tree-vect-patterns.c (vect_recog_bool_pattern)
10774 (vect_recog_mask_conversion_pattern)
10775 (vect_recog_gather_scatter_pattern): Use it.
10776 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10777 the "dr" and "stmt" fields of dr_vec_info instead of
10778 STMT_VINFO_DATA_REF.
10780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10782 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10783 (is_pattern_stmt_p): Use it.
10784 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10785 on pattern statements.
10787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10789 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10790 original stmt as a stmt_vec_info rather than a gimple stmt.
10791 (vect_pattern_recog_1): Take the statement directly as a
10792 stmt_vec_info, rather than via a gimple_stmt_iterator.
10793 Update call to vect_mark_pattern_stmts.
10794 (vect_pattern_recog): Update calls accordingly.
10796 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10798 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10799 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10800 a vect_def_type for the first argument.
10801 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10802 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
10803 operand if it isn't defined by a vectorized statement.
10804 (vect_build_gather_load_calls): Remove the mask_dt argument and
10805 update calls to vect_get_vec_def_for_stmt_copy.
10806 (vectorizable_bswap): Likewise the dt argument.
10807 (vectorizable_call): Update calls to vectorizable_bswap and
10808 vect_get_vec_def_for_stmt_copy.
10809 (vectorizable_simd_clone_call, vectorizable_assignment)
10810 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10811 (vectorizable_comparison): Update calls to
10812 vect_get_vec_def_for_stmt_copy.
10813 (vectorizable_store): Likewise. Remove now-unnecessary calls to
10814 vect_is_simple_use.
10815 (vect_get_loop_based_defs): Remove dt argument and update call
10816 to vect_get_vec_def_for_stmt_copy.
10817 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10818 and vect_get_vec_def_for_stmt_copy.
10819 (vectorizable_load): Update calls to vect_build_gather_load_calls
10820 and vect_get_vec_def_for_stmt_copy.
10821 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10822 (vectorizable_reduction, vectorizable_live_operation): Update calls
10823 to vect_get_vec_def_for_stmt_copy.
10825 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10827 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10828 and gimple stmt arguments with a stmt_vec_info.
10829 (vect_record_base_alignments): Update calls accordingly.
10830 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10831 and gimple stmt arguments with a stmt_vec_info.
10832 (vect_build_slp_tree_1): Remove vinfo argument and update call
10833 to vect_record_max_nunits.
10834 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10835 and vect_record_max_nunits.
10837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10839 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10840 file and take a stmt_vec_info instead of a gimple stmt.
10841 (supportable_widening_operation, vect_finish_replace_stmt)
10842 (vect_finish_stmt_generation, vect_get_store_rhs)
10843 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10844 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10845 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10846 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10847 (vect_create_data_ref_ptr, bump_vector_ptr)
10848 (vect_permute_store_chain, vect_setup_realignment)
10849 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10850 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10851 (vectorizable_reduction, vectorizable_induction)
10852 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10853 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10854 than gimple stmts as arguments.
10855 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10856 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10857 (can_group_stmts_p, vect_check_gather_scatter)
10858 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10859 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10860 (vect_permute_load_chain, vect_shift_permute_load_chain)
10861 (vect_transform_grouped_load)
10862 (vect_record_grouped_load_vectors): Likewise.
10863 * tree-vect-loop.c (vect_fixup_reduc_chain)
10864 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10865 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10866 (vectorizable_reduction, vectorizable_induction)
10867 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10868 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10869 (vect_get_load_store_mask): Likewise.
10870 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10871 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10872 * tree-vect-stmts.c (vect_mark_relevant)
10873 (is_simple_and_all_uses_invariant)
10874 (exist_non_indexing_operands_for_use_p, process_use)
10875 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10876 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10877 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10878 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10879 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10880 (get_negative_load_store_type, get_load_store_type)
10881 (vect_check_load_store_mask, vect_check_store_rhs)
10882 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10883 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10884 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10885 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10886 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10887 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10888 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10889 (supportable_widening_operation): Likewise.
10891 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10893 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10894 a stmt_vec_info instead of a gcall.
10895 (vect_check_gather_scatter): Update call accordingly.
10896 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10898 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10899 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10900 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10901 instead of a gimple stmt.
10902 (vect_transform_loop): Update calls accordingly.
10903 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10904 stmt_vec_infos instead of gimple stmts.
10905 (vect_analyze_slp_instance): Update use accordingly.
10906 * tree-vect-stmts.c (read_vector_array, write_vector_array)
10907 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10908 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10909 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10910 (vect_gen_widened_results_half, vect_get_loop_based_defs)
10911 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10912 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10913 down to subroutines.
10915 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10917 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10918 of the worklist from a vector of gimple stmts to a vector of
10920 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10921 (vect_mark_stmts_to_be_vectorized): Likewise
10923 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10925 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10926 statement before passing it to vect_analyze_stmt.
10927 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10928 the chain of phi vector definitions. Track the exit phi via its
10930 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10931 STMT_VINFO_REDUC_DEF.
10932 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10933 stmt_vec_infos to handle the statement chains.
10934 (vect_get_slp_defs): Record the first statement in the node
10935 using a stmt_vec_info.
10936 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10937 statements here and pass their stmt_vec_info down to subroutines.
10938 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10939 down to vect_finish_stmt_generation.
10940 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10941 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10942 stmt_vec_infos to subroutines.
10943 (vect_remove_stores): Use stmt_vec_infos to handle the statement
10946 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10948 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10949 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10950 (vect_permute_store_chain, vect_setup_realignment)
10951 (vect_permute_load_chain, vect_shift_permute_load_chain)
10952 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10953 stmts internally, and when passing values to other vectorizer routines.
10954 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10955 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10956 (vect_analyze_loop_operations, get_initial_def_for_reduction)
10957 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10958 (vectorizable_reduction, vectorizable_induction)
10959 (vectorizable_live_operation, vect_transform_loop_stmt)
10960 (vect_transform_loop): Likewise.
10961 * tree-vect-patterns.c (vect_reassociating_reduction_p)
10962 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10963 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10964 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10965 (vect_slp_analyze_node_operations_1): Likewise.
10966 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10967 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10968 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10969 (vect_finish_stmt_generation_1, get_group_load_store_type)
10970 (get_load_store_type, vect_build_gather_load_calls)
10971 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10972 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10973 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10974 (vectorizable_store, vectorizable_load, vectorizable_condition)
10975 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10976 (supportable_widening_operation): Likewise.
10977 (vect_get_vector_types_for_stmt): Likewise.
10978 * tree-vectorizer.h (vect_dr_behavior): Likewise.
10980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10982 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10983 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10984 (vect_permute_store_chain, vect_permute_load_chain)
10985 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10986 repeated stmt_vec_info lookups.
10987 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10988 (vect_update_ivs_after_vectorizer): Likewise.
10989 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10990 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10991 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10992 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10993 (vect_bb_slp_scalar_cost): Likewise.
10994 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10996 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10998 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10999 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11000 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11001 to get gassigns and gcalls, rather than operating on generc gimple
11003 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11004 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11005 (vectorizable_load, vect_analyze_stmt): Likewise.
11006 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11008 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11010 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11011 return stmt_vec_infos rather than gimple stmts. Do not accept
11013 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11015 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11016 Update use of get_later_stmt.
11017 (vect_get_constant_vectors): Update call accordingly.
11018 (vect_schedule_slp_instance): Likewise
11019 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11020 (vect_slp_analyze_instance_dependence): Likewise.
11021 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11023 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11025 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11026 (stmt_info_for_cost::stmt_info): ...this new field.
11027 (add_stmt_costs): Update accordingly.
11028 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11029 (vect_get_known_peeling_cost): Likewise.
11030 (vect_estimate_min_profitable_iters): Likewise.
11031 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11033 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11035 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11036 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11037 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11039 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11041 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11043 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11044 a gimple stmt to a stmt_vec_info.
11045 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11047 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11049 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11050 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11051 (_loop_vec_info::reduction_chains): Likewise.
11052 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11054 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11058 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11059 a gimple stmt to a stmt_vec_info.
11060 (_stmt_vec_info::next_element): Likewise.
11061 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11062 (vect_slp_analyze_and_verify_node_alignment)
11063 (vect_analyze_group_access_1, vect_analyze_group_access)
11064 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11065 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11066 (vect_supportable_dr_alignment): Update accordingly.
11067 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11068 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11069 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11070 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11071 * tree-vect-slp.c (vect_build_slp_tree_1)
11072 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11073 (vect_split_slp_store_group, vect_analyze_slp_instance)
11074 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11075 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11076 (get_group_load_store_type, get_load_store_type)
11077 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11078 (vect_transform_stmt, vect_remove_stores): Likewise.
11080 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11082 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11083 than a gimple stmt.
11084 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11085 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11086 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11087 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11088 (vector_alignment_reachable_p, vect_get_data_access_cost)
11089 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11090 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11091 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11092 (vect_analyze_group_access_1, vect_analyze_group_access)
11093 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11094 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11095 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11096 result of vect_dr_stmt and use the stmt_vec_info instead of
11097 the associated gimple stmt.
11098 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11099 (vect_gen_prolog_loop_niters): Likewise.
11100 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11102 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11104 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11105 to a vec<stmt_vec_info>.
11106 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11107 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11108 vec<stmt_vec_info>.
11109 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11110 to a vec<stmt_vec_info>.
11111 (bst_traits::value_type, bst_traits::value_type): Likewise.
11112 (bst_traits::hash): Update accordingly.
11113 (vect_get_and_check_slp_defs): Change the stmts parameter from
11114 a vec<gimple *> to a vec<stmt_vec_info>.
11115 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11116 (vect_build_slp_tree): Likewise.
11117 (vect_build_slp_tree_2): Likewise. Update uses of
11118 SLP_TREE_SCALAR_STMTS.
11119 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11120 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11121 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11122 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11123 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11124 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11125 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11126 (vect_get_constant_vectors, vect_get_slp_defs)
11127 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11128 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11129 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11130 instead of gimple stmts.
11131 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11132 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11133 (vect_slp_analyze_instance_dependence): Update uses of
11134 SLP_TREE_SCALAR_STMTS.
11135 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11136 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11137 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11138 (get_initial_defs_for_reduction): Likewise.
11139 (vect_create_epilog_for_reduction): Likewise.
11140 (vectorize_fold_left_reduction): Likewise.
11141 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11142 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11143 (can_vectorize_live_stmts): Likewise.
11145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11147 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11148 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11149 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11151 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11153 (gather_scalar_reductions): Update after above interface changes.
11154 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11155 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11157 (vect_force_simple_reduction): Likewise.
11158 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11159 LOOP_VINFO_REDUCTIONS.
11160 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11164 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11165 a gimple stmt to a stmt_vec_info.
11166 * tree-vect-loop.c (vect_active_double_reduction_p)
11167 (vect_force_simple_reduction, vectorizable_reduction): Update
11170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11172 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11173 vec<gimple *> to a vec<stmt_vec_info>.
11174 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11175 the reduction_phis argument from a vec<gimple *> to a
11176 vec<stmt_vec_info>.
11177 (vectorizable_reduction): Likewise the phis local variable that
11178 is passed to vect_create_epilog_for_reduction. Update for new type
11179 of SLP_TREE_VEC_STMTS.
11180 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11181 (vectorizable_live_operation): Likewise.
11182 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11183 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11187 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11188 a gimple stmt to a stmt_vec_info.
11189 (vectorizable_condition, vectorizable_live_operation)
11190 (vectorizable_reduction, vectorizable_induction): Pass back the
11191 vectorized statement as a stmt_vec_info.
11192 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11193 use of STMT_VINFO_VEC_STMT.
11194 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11195 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11196 as stmt_vec_infos rather than gimple stmts.
11197 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11198 to a stmt_vec_info.
11199 (vectorizable_live_operation): Likewise.
11200 (vectorizable_reduction, vectorizable_induction): Likewise,
11201 updating use of STMT_VINFO_VEC_STMT.
11202 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11203 of STMT_VINFO_VEC_STMT.
11204 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11205 (vectorizable_simd_clone_call, vectorizable_conversion)
11206 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11207 (vectorizable_store, vectorizable_load, vectorizable_condition)
11208 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11209 from a gimple stmt to a stmt_vec_info.
11210 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11211 pointer to a stmt_vec_info to the vectorizable_* routines.
11213 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11215 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11216 a gimple stmt to a stmt_vec_info.
11217 (is_pattern_stmt_p): Update accordingly.
11218 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11219 (vect_record_grouped_load_vectors): Likewise.
11220 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11221 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11222 (vect_model_reduction_cost): Likewise.
11223 (vect_create_epilog_for_reduction): Likewise.
11224 (vectorizable_reduction, vectorizable_induction): Likewise.
11225 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11226 Return the stmt_vec_info for the pattern statement.
11227 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11228 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11229 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11230 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11231 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11232 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11233 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11234 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11236 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11238 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11239 (vect_finish_stmt_generation): Likewise.
11240 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11241 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11242 (vect_build_gather_load_calls): Use the return value of the above
11243 functions instead of a separate call to vinfo_for_stmt. Use narrow
11244 scopes for the input gimple stmt and wider scopes for the associated
11245 stmt_vec_info. Use vec_info::lookup_def when setting these
11246 stmt_vec_infos from an SSA_NAME definition.
11247 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11248 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11249 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11250 (vectorizable_store, vectorizable_load, vectorizable_condition)
11251 (vectorizable_comparison): Likewise.
11252 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11253 (vectorizable_reduction): Likewise.
11255 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11257 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11258 stmt_vec_info * parameter before the optional gimple **.
11259 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11260 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11261 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11262 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11263 (vectorizable_live_operation): Likewise.
11264 * tree-vect-patterns.c (type_conversion_p): Likewise.
11265 (vect_look_through_possible_promotion): Likewise.
11266 (vect_recog_rotate_pattern): Likewise.
11267 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11271 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11272 a typedef to a wrapper class.
11273 (NULL_STMT_VEC_INFO): New macro.
11274 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11275 (stmt_vec_info::operator*): New function.
11276 (stmt_vec_info::operator gimple *): Likewise.
11277 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11278 (add_stmt_costs): Likewise.
11279 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11280 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11281 (vect_get_known_peeling_cost): Likewise.
11282 (vect_estimate_min_profitable_iters): Likewise.
11283 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11284 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11285 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11286 (vectorizable_store, free_stmt_vec_infos): Likewise.
11287 (new_stmt_vec_info): Change return type of xcalloc to
11290 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11292 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11293 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11294 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11295 a single_imm_use-based sequence.
11296 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11298 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11300 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11301 * tree-vectorizer.c (vec_info::lookup_def): New function.
11302 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11303 (vect_widened_op_tree): Likewise.
11304 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11305 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11306 (vectorizable_reduction): Likewise.
11307 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11309 (vect_is_slp_reduction): Update calls accordingly. Use
11310 vec_info::lookup_def.
11311 (vect_is_simple_reduction): Likewise
11312 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11314 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11316 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11317 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11318 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11320 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11321 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11322 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11323 (vect_is_slp_reduction, vectorizable_induction)
11324 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11325 * tree-vect-patterns.c (vect_init_pattern_stmt):
11326 (vect_determine_min_output_precision_1, vect_determine_precisions)
11327 (vect_pattern_recog): Likewise.
11328 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11329 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11330 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11331 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11332 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11333 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11334 info field from a loop to a loop_vec_info.
11336 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11338 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11339 (vec_info::add_stmt): Declare.
11340 * tree-vectorizer.c (vec_info::add_stmt): New function.
11341 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11342 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11343 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11344 (vectorizable_induction): Likewise.
11345 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11346 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11347 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11348 (vectorizable_load): Likewise.
11349 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11350 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11351 (vect_recog_gather_scatter_pattern): Likewise.
11352 (append_pattern_def_seq): Likewise. Remove a check that is
11353 performed by add_stmt itself.
11355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11357 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11358 which make_ssa_name was called with new_stmt before new_stmt
11361 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11363 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11365 (vect_is_slp_reduction): ...here...
11366 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11367 that are already known to be false.
11369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11371 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11372 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11373 STMT_VINFO_NUM_SLP_USES when it's true.
11374 (vect_free_slp_instance): Add a final_p parameter and pass it to
11375 vect_free_slp_tree.
11376 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11377 (vect_analyze_slp_instance): Likewise.
11378 (vect_slp_analyze_operations): Likewise.
11379 (vect_slp_analyze_bb_1): Likewise.
11380 * tree-vectorizer.c (vec_info): Likewise.
11381 * tree-vect-loop.c (vect_transform_loop): Likewise.
11383 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11385 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11386 function is not called for second and subsequent members of
11389 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11391 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11392 cases for nested loops from here to ...
11393 (vect_create_epilog_for_reduction): ...here. Only call
11394 vect_is_simple_use for inner-loop reductions.
11396 2018-07-31 Martin Liska <mliska@suse.cz>
11398 PR gcov-profile/85338
11399 PR gcov-profile/85350
11400 PR gcov-profile/85372
11401 * profile.c (struct location_triplet): New.
11402 (struct location_triplet_hash): Likewise.
11403 (output_location): Do not output a BB that
11404 is already recorded for a line.
11405 (branch_prob): Use streamed_locations.
11407 2018-07-31 Martin Liska <mliska@suse.cz>
11409 PR gcov-profile/85370
11410 * coverage.c (coverage_begin_function): Do not mark target
11411 clones as artificial functions.
11413 2018-07-31 Martin Liska <mliska@suse.cz>
11415 PR gcov-profile/83813
11416 PR gcov-profile/84758
11417 PR gcov-profile/85217
11418 PR gcov-profile/85332
11419 * profile.c (branch_prob): Do not record GOTO expressions
11420 for GIMPLE statements which locations are already streamed.
11422 2018-07-31 Olivier Hainque <hainque@adacore.com>
11424 * gcc.c (handle_spec_function): Accept a soft_matched_part
11425 argument, as do_spec_1. Pass it down to ...
11426 (eval_spec_function): Accept a soft_matched_part argument,
11427 and pass it down to ...
11428 (do_spec_2): Accept a soft_matched_part argument, and pass
11429 it down to do_spec_1.
11430 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11431 (handle_braces): Update call to handle_spec_function.
11432 (driver::set_up_specs): Update calls to do_spec_2.
11433 (compare_debug_dump_opt_spec_function): Likewise.
11434 (compare_debug_self_opt_spec_function): Likewise.
11436 2018-07-31 Olivier Hainque <hainque@adacore.com>
11438 * common.opt (nolibc): New option.
11439 * doc/invoke.texi (Link Options): Document it.
11440 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11441 * config/alpha/linux.h: Likewise.
11442 * config/arc/elf.h: Likewise.
11443 * config/arm/uclinux-elf.h: Likewise.
11444 * config/arm/unknown-elf.h: Likewise.
11445 * config/avr/avrlibc.h: Likewise.
11446 * config/bfin/bfin.h: Likewise.
11447 * config/bfin/linux.h: Likewise.
11448 * config/bfin/uclinux.h: Likewise.
11449 * config/darwin.h: Likewise.
11450 * config/darwin10.h: Likewise.
11451 * config/darwin12.h: Likewise.
11452 * config/gnu-user.h: Likewise.
11453 * config/lm32/uclinux-elf.h: Likewise.
11454 * config/pa/pa-hpux11.h: Likewise.
11455 * config/pa/pa64-hpux.h: Likewise.
11456 * config/sparc/sparc.h: Likewise.
11458 2018-07-31 Olivier Hainque <hainque@adacore.com>
11460 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11461 undefined variables.
11463 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11466 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11467 instead of GEN_INT.
11469 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11471 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11472 terminated string literal.
11474 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11476 PR rtl-optimization/85160
11477 * combine.c (is_just_move): New function.
11478 (try_combine): Allow combining two instructions into two if neither of
11479 the original instructions was a move.
11481 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11484 * doc/extend.texi (Global Register Variables): Discourage use of type
11486 (Local Register Variables): Likewise.
11488 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11490 PR tree-optimization/86506
11491 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11493 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11496 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11497 hard_regno, make sure no insn between `from` and `to` clobbers it.
11499 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11500 Tom de Vries <tdevries@suse.de>
11502 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11503 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11504 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11505 PTX_DEFAULT_RUNTIME_DIM.
11506 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11508 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11510 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11511 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11512 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11514 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11516 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11518 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11519 predicate to reflect toc fusion has been deleted.
11520 (toc_fusion_mem_raw): Delete, no longer used.
11521 (toc_fusion_mem_wrapped): Likewise.
11522 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11524 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11525 Delete, no longer used.
11526 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11527 meant to be used for toc fusion.
11528 (rs6000_debug_print_mode): Delete toc fusion debugging.
11529 (rs6000_debug_reg_global): Likewise.
11530 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11531 fusion and secondary reload support that were never used.
11532 (rs6000_option_override_internal): Delete TOC fusion, that was only
11533 partially defined, and it did not work unless you also used the
11535 (rs6000_legitimate_address_p): Delete TOC fusion support.
11536 (rs6000_opt_masks): Likewise.
11537 (fusion_wrap_memory_address): Delete function, no longer used.
11538 (fusion_split_address); Delete TOC fusion support.
11539 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11540 longer used with toc fusion being deleted.
11541 (TARGET_TOC_FUSION_FP): Likewise.
11542 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11544 (toc fusion spliter): Delete TOC fusion support.
11545 (toc_fusionload_<mode>): Likewise.
11546 (toc_fusionload_di): Likewise.
11547 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11548 longer needs to be named. Rename predicate to delete TOC fusion.
11549 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11550 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11551 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11552 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11553 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11555 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11557 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11558 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11559 __int128 in built-in function prototypes.
11560 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11561 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11563 2018-07-27 Martin Sebor <msebor@redhat.com>
11565 PR tree-optimization/86696
11566 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11567 types, including enums.
11568 (handle_char_store): Be prepared for the above function to fail.
11570 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11572 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11573 when optimization level is lower than 2 or optimize for size.
11575 2018-07-26 Martin Sebor <msebor@redhat.com>
11577 PR tree-optimization/86043
11578 PR tree-optimization/86042
11579 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11580 (get_string_cst_length): Rename...
11581 (get_min_string_length): ...to this. Add argument.
11582 (handle_char_store): Extend to handle multi-character stores by
11584 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11585 * tree.h (initializer_zerop): Add argument.
11587 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11589 PR middle-end/86660
11590 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11591 declare target to variables if they have always,{to,from,tofrom} map
11594 2018-07-26 Martin Liska <mliska@suse.cz>
11597 * lto-wrapper.c: Add linker_output as prefix
11598 for ltrans_output_file.
11600 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11602 PR rtl-optimization/85805
11603 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11604 value for hard registers if that was written in the same mode.
11606 2018-07-26 Martin Liska <mliska@suse.cz>
11608 PR gcov-profile/86536
11609 * gcov.c (format_gcov): Use printf format %.*f directly
11610 and do not handle special values.
11612 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11614 * common/config/arc/arc-common.c (arc_option_optimization_table):
11615 Update default optimizations for size.
11617 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11619 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11620 * config/arc/constraints.md (CfZ): New constraint.
11621 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11622 (subsf3_fpu): Likewise.
11623 (cmpsf_fpu): Likewise.
11624 (cmpsf_fpu_uneq): Likewise.
11626 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11628 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11630 (arc_is_uncached_mem_p): uncached applies to both the variable and
11633 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11635 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11638 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11640 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11641 field "m_scopes" from vec to auto_vec.
11643 2018-07-25 Martin Liska <mliska@suse.cz>
11645 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11648 2018-07-25 Richard Biener <rguenther@suse.de>
11651 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11652 special wrt context_die late.
11653 (gen_subprogram_die): Re-use DIEs in local scope.
11655 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11657 PR tree-optimization/86644
11658 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11660 2018-07-25 Martin Liska <mliska@suse.cz>
11662 PR middle-end/86645
11663 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11664 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11666 2018-07-25 Martin Liska <mliska@suse.cz>
11669 * params.def: Explain ASan abbreviation and provide
11670 a documentation link.
11672 2018-07-24 Martin Sebor <msebor@redhat.com>
11674 PR tree-optimization/86622
11675 PR tree-optimization/86532
11676 * builtins.h (string_length): Declare.
11677 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11678 (check_access): Be prepared for non-constant length ranges.
11679 (string_length): Make extern.
11680 * expr.c (string_constant): Only handle the minor non-constant
11681 array index. Use string_constant to compute the length of
11682 a generic string constant.
11684 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11686 PR tree-optimization/86618
11687 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11688 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11690 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11692 PR tree-optimization/86636
11693 * json.cc (json::object::set): Fix comment. Add assertions.
11694 (json::array::append): Move here from json.h. Add comment and an
11696 (json::string::string): Likewise.
11697 * json.h (json::array::append): Move to json.cc.
11698 (json::string::string): Likewise.
11699 * optinfo-emit-json.cc
11700 (optrecord_json_writer::impl_location_to_json): Assert that we
11701 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11702 wrapper around it. Expand the location once, rather than three
11704 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11705 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11707 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11708 places. Fix some overlong lines.
11710 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11712 * config/aarch64/aarch64-simd.md
11713 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11714 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11715 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11716 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11717 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11718 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11719 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11720 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11721 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11723 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11725 PR middle-end/86627
11726 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11727 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11728 and abs_d == d, do the power of two handling if profitable.
11730 2018-07-24 Richard Biener <rguenther@suse.de>
11732 * match.pd: Add BIT_FIELD_REF canonicalizations.
11734 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11737 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11739 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11741 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11742 terminated STRING_CST object.
11744 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11746 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11748 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11750 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11751 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11752 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11753 the elements into a register.
11754 (rs6000_split_v4si_init_di_reg): Delete.
11755 (rs6000_split_v4si_init): Delete.
11756 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11757 (vsx_init_v4si): Rewrite as a define_expand.
11759 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11761 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11762 zero_extend argument from memory): New.
11764 2018-07-22 Martin Sebor <msebor@redhat.com>
11767 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11768 diagnosing calls with unknown arguments unless -Walloca-larger-than
11769 is restricted to less than PTRDIFF_MAX bytes.
11771 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
11773 * doc/gcov.texi (Invoking Gcov): Editorial changes.
11775 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11777 * pretty-print.c (text_info::set_location): Remove redundant
11778 "line_table" parameter from call to rich_location::set_range.
11780 2018-07-20 Martin Sebor <msebor@redhat.com>
11782 PR middle-end/82063
11783 * builtins.c (expand_builtin_alloca): Adjust.
11784 * calls.c (alloc_max_size): Simplify.
11785 * cgraphunit.c (cgraph_node::expand): Adjust.
11786 * common.opt (larger_than_size, warn_frame_larger_than): Remove
11788 (frame_larger_than_size): Same.
11789 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11790 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11792 * doc/invoke.texi (GCC Command Options): Document option arguments.
11793 Explain byte-size arguments and suffixes.
11794 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11795 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11796 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11797 * doc/options.texi (UInteger): Expand.
11798 (Host_Wide_Int, ByteSize): Document new properties.
11799 * final.c (final_start_function_1): Include sizes in an error message.
11800 * function.c (frame_offset_overflow): Same.
11801 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11802 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11803 Diagnose unbounded alloca calls only for limits of less than
11805 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
11806 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
11808 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
11809 only for limits of less than PTRDIFF_MAX.
11810 * langhooks-def.h (lhd_handle_option): Change function argument
11812 * langhooks.c (lhd_handle_option): Same.
11813 * langhooks.h (handle_option): Same.
11814 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11816 (var_type, var_type_struct): Same.
11817 (var_set): Handle ByteSize flag.
11818 * optc-gen.awk: Add comments to output to ease debugging. Make
11819 use of HOST_WIDE_INT where appropriate.
11820 * opts-gen-save.awk: Use %lx to format unsigned long.
11821 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11822 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11823 arguments. Parse bytes-size suffixes.
11824 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11825 (enum_value_to_arg): Same.
11826 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
11827 (handle_option): Adjust.
11828 (generate_option): Change function argument to HOST_WIDE_INT.
11829 (cmdline_handle_error): Adjust.
11830 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11831 (set_option): Change function argument to HOST_WIDE_INT.
11832 (option_enabled): Handle cl_host_wide_int.
11833 (get_option_state): Handle CLVC_SIZE.
11834 (control_warning_option): Same.
11835 * opts.c (common_handle_option): Change function argument to
11836 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11837 OPT_Wvla_larger_than_.
11838 * opts.h (enum cl_var_type): Add an enumerator.
11839 * stor-layout.c (layout_decl): Print a more meaningful warning.
11840 * toplev.c (output_stack_usage): Adjust.
11842 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11844 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11845 call to inline_expand_builtin_string_cmp.
11846 (expand_builtin_strcmp): Likewise.
11847 (expand_builtin_strncmp): Likewise.
11848 (inline_string_cmp): Delete the last parameter, change char_type_node
11849 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11851 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11852 the inlining expansion on target where the type of the call has same or
11853 narrower precision than unsigned char.
11855 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11857 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11858 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11859 * common.opt (fsave-optimization-record): New option.
11860 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11861 * doc/invoke.texi (-fsave-optimization-record): New option.
11862 * dumpfile.c: Include "optinfo-emit-json.h".
11863 (struct kv_pair): Move to coretypes.h.
11864 (optgroup_options): Make non-static.
11865 (dump_context::end_scope): Call
11866 optimization_records_maybe_pop_dump_scope.
11867 * dumpfile.h (optgroup_options): New decl.
11868 * json.cc: New file.
11869 * json.h: New file.
11870 * optinfo-emit-json.cc: New file.
11871 * optinfo-emit-json.h: New file.
11872 * optinfo.cc: Include "optinfo-emit-json.h".
11873 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11874 (optinfo_enabled_p): Check optimization_records_enabled_p.
11875 (optinfo_wants_inlining_info_p): Likewise.
11876 * optinfo.h: Update comment.
11877 * profile-count.c (profile_quality_as_string): New function.
11878 * profile-count.h (profile_quality_as_string): New decl.
11879 (profile_count::quality): New accessor.
11880 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11881 and optinfo_emit_json_cc_tests.
11882 * selftest.h (selftest::json_cc_tests): New decl.
11883 (selftest::optinfo_emit_json_cc_tests): New decl.
11884 * toplev.c: Include "optinfo-emit-json.h".
11885 (compile_file): Call optimization_records_finish.
11886 (do_compile): Call optimization_records_start.
11887 * tree-ssa-live.c: Include optinfo.h.
11888 (remove_unused_scope_block_p): Retain inlining information if
11889 optinfo_wants_inlining_info_p returns true.
11891 2018-07-20 Richard Biener <rguenther@suse.de>
11894 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11895 to cover -flto-partition=none.
11897 2018-07-20 Martin Liska <mliska@suse.cz>
11899 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11900 (get_decl_source_range): Remove unused function.
11902 2018-07-20 Richard Biener <rguenther@suse.de>
11904 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11905 (struct vn_phi_s): Likewise.
11906 (struct vn_reference_s): Likewise.
11907 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11908 for searching the slot of an entry known to be in the hash itself.
11909 (vn_phi_hasher::equal): Likewise.
11910 (vn_reference_hasher::equal): Likewise.
11911 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11913 (optimistic_info, current_info): Remove, keeping only valid_info.
11914 (vn_reference_lookup_1): Remove fallback lookup.
11915 (vn_reference_lookup_2): Likewise.
11916 (vn_nary_op_lookup_1): Likewise.
11917 (vn_phi_lookup): Likewise.
11918 (vn_nary_build_or_lookup_1): Make sure to not chain the built
11920 (vn_reference_insert): Adjust, chain the inserted hash element
11921 at last_inserted_ref.
11922 (vn_reference_insert_pieces): Likewise.
11923 (visit_reference_op_call): Likewise.
11924 (vn_nary_op_insert_into): Chain the inserted hash element at
11925 last_inserted_nary.
11926 (vn_nary_op_insert_pieces): Adjust.
11927 (vn_nary_op_insert): Likewise.
11928 (vn_nary_op_insert_stmt): Likewise.
11929 (vn_phi_insert): Adjust, chain the inserted hash element at
11931 (process_scc): Remove clearing and copying the optimistic
11932 table. Instead remove elements inserted during an optimistic
11933 iteration from the single table we maintain.
11934 (init_scc_vn): Adjust.
11935 (free_scc_vn): Likewise.
11936 (sccvn_dom_walker::record_cond): Likewise.
11937 (sccvn_dom_walker::after_dom_children): Likewise.
11939 2018-07-19 Martin Sebor <msebor@redhat.com>
11941 PR tree-optimization/84047
11942 PR tree-optimization/83776
11943 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11944 (check_array_bounds): Call it.
11946 2018-07-19 Martin Sebor <msebor@redhat.com>
11948 * align.h (align_flags): Use member initialization.
11950 2018-07-19 David Malcolm <dmalcolm@redhat.com>
11952 * Makefile.in (OBJS): Add optinfo.o.
11953 * coretypes.h (class symtab_node): New forward decl.
11954 (struct cgraph_node): New forward decl.
11955 (class varpool_node): New forward decl.
11956 * dump-context.h: New file.
11957 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11959 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11960 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11961 (set_alt_dump_file): Likewise.
11962 (dump_context::~dump_context): New dtor.
11963 (dump_gimple_stmt): Move implementation to...
11964 (dump_context::dump_gimple_stmt): ...this new member function.
11965 Add the stmt to any pending optinfo, creating one if need be.
11966 (dump_gimple_stmt_loc): Move implementation to...
11967 (dump_context::dump_gimple_stmt_loc): ...this new member function.
11968 Start a new optinfo and add the stmt to it.
11969 (dump_gimple_expr): Move implementation to...
11970 (dump_context::dump_gimple_expr): ...this new member function.
11971 Add the stmt to any pending optinfo, creating one if need be.
11972 (dump_gimple_expr_loc): Move implementation to...
11973 (dump_context::dump_gimple_expr_loc): ...this new member function.
11974 Start a new optinfo and add the stmt to it.
11975 (dump_generic_expr): Move implementation to...
11976 (dump_context::dump_generic_expr): ...this new member function.
11977 Add the tree to any pending optinfo, creating one if need be.
11978 (dump_generic_expr_loc): Move implementation to...
11979 (dump_context::dump_generic_expr_loc): ...this new member
11980 function. Add the tree to any pending optinfo, creating one if
11982 (dump_printf): Move implementation to...
11983 (dump_context::dump_printf_va): ...this new member function. Add
11984 the text to any pending optinfo, creating one if need be.
11985 (dump_printf_loc): Move implementation to...
11986 (dump_context::dump_printf_loc_va): ...this new member function.
11987 Start a new optinfo and add the stmt to it.
11988 (dump_dec): Move implementation to...
11989 (dump_context::dump_dec): ...this new member function. Add the
11990 value to any pending optinfo, creating one if need be.
11991 (dump_context::dump_symtab_node): New member function.
11992 (dump_context::get_scope_depth): New member function.
11993 (dump_context::begin_scope): New member function.
11994 (dump_context::end_scope): New member function.
11995 (dump_context::ensure_pending_optinfo): New member function.
11996 (dump_context::begin_next_optinfo): New member function.
11997 (dump_context::end_any_optinfo): New member function.
11998 (dump_context::s_current): New global.
11999 (dump_context::s_default): New global.
12000 (dump_scope_depth): Delete global.
12001 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12002 (dump_symtab_node): New function.
12003 (get_dump_scope_depth): Reimplement in terms of dump_context.
12004 (dump_begin_scope): Likewise.
12005 (dump_end_scope): Likewise.
12006 (selftest::temp_dump_context::temp_dump_context): New ctor.
12007 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12008 (selftest::verify_item): New function.
12009 (ASSERT_IS_TEXT): New macro.
12010 (ASSERT_IS_TREE): New macro.
12011 (ASSERT_IS_GIMPLE): New macro.
12012 (selftest::test_capture_of_dump_calls): New test.
12013 (selftest::dumpfile_c_tests): Call it.
12014 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12015 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12016 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12017 descriptive comment.
12018 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12019 (dump_node, dump_bb): Move these unrelated decls.
12020 (class dump_manager): Add leading comment.
12021 * optinfo.cc: New file.
12022 * optinfo.h: New file.
12024 2018-07-19 Michael Collison <michael.collison@arm.com>
12025 Richard Henderson <rth@redhat.com>
12027 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12028 (subti): Handle op1 zero.
12029 (subvti4, usub4ti4): New.
12030 (*sub<GPI>3_compare1_imm): New.
12031 (sub<GPI>3_carryinCV): New.
12032 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12033 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12035 2018-07-19 Michael Collison <michael.collison@arm.com>
12036 Richard Henderson <rth@redhat.com>
12038 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12039 (addti3): Create simpler code if low part is already known to be 0.
12040 (addvti4, uaddvti4): New.
12041 (*add<GPI>3_compareC_cconly_imm): New.
12042 (*add<GPI>3_compareC_cconly): New.
12043 (*add<GPI>3_compareC_imm): New.
12044 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12045 handle constants within this pattern..
12046 (*add<GPI>3_compareV_cconly_imm): New.
12047 (*add<GPI>3_compareV_cconly): New.
12048 (*add<GPI>3_compareV_imm): New.
12049 (add<GPI>3_compareV): New.
12050 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12051 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12052 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12053 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12054 with 'comparison' operator.
12055 (*add<GPI>3_compareV_cconly_imm): Ditto.
12056 (*add<GPI>3_compareV_cconly): Ditto.
12057 (*add<GPI>3_compareV_imm): Ditto.
12058 (add<GPI>3_compareV): Ditto.
12059 (add<mode>3_carryinC): Ditto.
12060 (*add<mode>3_carryinC_zero): Ditto.
12061 (*add<mode>3_carryinC): Ditto.
12062 (add<mode>3_carryinV): Ditto.
12063 (*add<mode>3_carryinV_zero): Ditto.
12064 (*add<mode>3_carryinV): Ditto.
12066 2018-07-19 Michael Collison <michael.collison@arm.com>
12067 Richard Henderson <rth@redhat.com>
12069 * config/aarch64/aarch64-modes.def (CC_V): New.
12070 * config/aarch64/aarch64-protos.h
12071 (aarch64_addti_scratch_regs): Declare
12072 (aarch64_subvti_scratch_regs): Declare.
12073 (aarch64_expand_subvti): Declare.
12074 (aarch64_gen_unlikely_cbranch): Declare
12075 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12076 for signed overflow using CC_Vmode.
12077 (aarch64_get_condition_code_1): Handle CC_Vmode.
12078 (aarch64_gen_unlikely_cbranch): New function.
12079 (aarch64_addti_scratch_regs): New function.
12080 (aarch64_subvti_scratch_regs): New function.
12081 (aarch64_expand_subvti): New function.
12083 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12085 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12087 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12088 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12091 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12094 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12095 address check not strict.
12097 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12099 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12101 (store_pair_lanes<mode>): Likewise.
12102 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12103 enum value 'ADDR_QUERY_LDP_STP_N'.
12104 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12105 (aarch64_print_address_internal): Add declaration.
12106 (aarch64_print_ldpstp_address): Remove.
12107 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12108 (aarch64_print_operand): Change printing of 'y'.
12109 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12110 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12111 'true' rather than '1'.
12112 * config/aarch64/constraints.md (Uml): Likewise.
12113 (Uml): Rename to Umn.
12116 2018-07-19 Richard Biener <rguenther@suse.de>
12118 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12120 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12121 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12122 (vn_reference_hasher): Likewise.
12123 (struct vn_tables_s): Remove obstack and alloc-pool members.
12124 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12125 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12126 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12127 (vn_reference_insert_pieces): Likewise.
12128 (alloc_vn_nary_op_noinit): Adjust.
12129 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12130 (vn_phi_eq): Adjust.
12131 (shared_lookup_phiargs): Remove.
12132 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12133 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12134 (visit_reference_op_call): Likewise.
12135 (copy_nary, copy_phi, copy_reference): Remove.
12136 (process_scc): Rewind the obstack when iterating. Do not
12137 copy the elements to valid_info but just move them from one
12138 hashtable to the other.
12139 (allocate_vn_table): Adjust.
12140 (free_vn_table): Likewise.
12141 (init_scc_vn): Likewise.
12142 (free_scc_vn): Likewise.
12144 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12147 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12148 indirect_return as function type attribute.
12149 (ix86_attribute_table): Change indirect_return to function
12151 * doc/extend.texi: Update indirect_return attribute.
12153 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12155 * wide-int.h (widest2_int): New.
12156 * gimple-fold.c (arith_overflowed_p): Use it.
12157 * tree.h (widest2_int_cst): New.
12158 * tree-vrp.c (wide_int_binop_overflow): Rename from
12159 vrp_int_const_binop.
12160 Rewrite to work on trees.
12161 (extract_range_from_multiplicative_op_1): Abstract code to...
12162 (wide_int_range_min_max): ...here.
12163 (wide_int_range_cross_product): ...and here.
12164 (extract_range_from_binary_expr_1): Abstract overflow code to...
12165 (wide_int_range_mult_wrapping): ...here.
12166 * tree-vrp.h (wide_int_range_cross_product): New.
12167 (wide_int_range_mult_wrapping): New.
12169 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12170 Julia Koval <julia.koval@intel.com>
12172 * config/i386/x86-tune-costs.h (skylake_memcpy,
12173 skylake_memset): Replace rep_prefix with unrolling for size 512.
12175 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12177 PR middle-end/86544
12178 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12179 comparision with EQ_EXPR in last stmt.
12181 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12183 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12184 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12185 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12186 previously known as "PowerPC AltiVec Built-in Functions". Move
12187 some material to new subsubsections "PowerPC AltiVec Built-in
12188 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12190 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12191 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12192 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12193 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12195 2018-07-18 Richard Biener <rguenther@suse.de>
12197 PR tree-optimization/86557
12198 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12201 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12203 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12205 2018-07-17 Jeff Law <law@redhat.com>
12207 * config/arm/arm.c (get_label_padding): Update for recent
12208 changes to label_to_alignment.
12210 PR tree-optimization/86010
12211 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12213 * config/mips/mips.c (vr4130_align_insns): Update for recent
12214 changes to label_to_alignment.
12216 * config/frv/frv.c (frv_label_align): Update for recent changes
12217 to label_to_alignment.
12219 * config/nios2/nios2.c (nios2_label_align): Update for recent
12220 changes which dropped ALIGN_LABELS_LOG.
12222 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12224 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12225 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12227 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12229 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12230 deprecated align_labels_log.
12232 2018-07-17 Richard Biener <rguenther@suse.de>
12235 * dwarf2out.c (init_sections_and_labels): Always generate
12236 a debug_line_str_section for early LTO debug.
12237 (dwarf2out_finish): Reset debug_line_str_hash output early.
12238 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12240 (dwarf2out_early_finish): Output debug_line_str.
12242 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12244 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12245 index register on z196 or later.
12247 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12249 * config/s390/s390.c (s390_default_align): Set default function
12251 (s390_override_options_after_change): Call s390_default align.
12252 (s390_option_override_internal): Call s390_default_align.
12253 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12255 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12257 PR middle-end/86542
12258 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12259 to _looptemp_ clauses, other than the first two.
12261 2018-07-17 Martin Liska <mliska@suse.cz>
12263 * opts.c: Do not enable OPT_falign_* for -Os.
12265 2018-07-17 Martin Liska <mliska@suse.cz>
12267 * align.h (MAX_CODE_ALIGN): New.
12268 (MAX_CODE_ALIGN_VALUE): New.
12269 * common/config/i386/i386-common.c (ix86_handle_option):
12270 (MAX_CODE_ALIGN): Moved to align.h.
12271 * final.c (MAX_CODE_ALIGN): Likewise.
12272 * opts.c (parse_and_check_align_values):
12273 (MAX_CODE_ALIGN): Likewise.
12274 (MAX_CODE_ALIGN_VALUE): Likewise.
12276 2018-07-17 Martin Liska <mliska@suse.cz>
12278 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12279 in order to fulfil coding style.
12280 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12281 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12282 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12283 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12284 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12285 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12286 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12287 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12288 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12290 2018-07-17 Martin Liska <mliska@suse.cz>
12292 * align.h: New file.
12293 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12295 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12296 align_flags of label_to_alignment.
12297 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12299 * config/m68k/m68k.c: Do not use removed align_labels_value and
12301 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12302 (LOOP_ALIGN): Likewise.
12303 (LABEL_ALIGN): Likewise.
12304 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12305 Remove not used macro.
12306 (rs6000_loop_align): Change return type to align_flags.
12307 (rs6000_loop_align_max_skip): Remove.
12308 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12309 Change return type to align_flags.
12310 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12311 Remove not used macro.
12312 (rs6000_loop_align): Change return type to align_flags.
12313 (rs6000_loop_align_max_skip): Remove.
12314 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12315 * config/rx/rx-protos.h (rx_align_for_label): Make it
12317 * config/rx/rx.c (rx_align_for_label): Change return type
12319 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12321 into align_flags class.
12322 (LABEL_ALIGN): Likewise.
12323 (LOOP_ALIGN): Likewise.
12324 * config/s390/s390.c (s390_label_align): Use align_flags
12326 (s390_asm_output_function_label): Likewise.
12327 * config/sh/sh.c (sh_override_options_after_change):
12328 Use align_flags class directly without macros.
12329 (find_barrier): Likewise.
12330 (barrier_align): Likewise.
12331 (sh_loop_align): Likewise.
12332 * config/spu/spu.c (spu_option_override):
12333 Use align_flags_tuple::get_value instead of removed macros.
12334 (spu_sched_init): Likewise.
12335 * config/spu/spu.h (GTY): Likewise.
12336 * config/visium/visium.c (visium_option_override):
12337 Set "8" as default secondary alignment.
12338 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12339 in order to guarantee secondary alignment of 8.
12340 * coretypes.h: Include align.h header file.
12341 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12342 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12343 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12344 * doc/tm.texi.in: Likewise.
12345 * final.c (struct label_alignment): Remove not used structure.
12346 (LABEL_ALIGN): Change type to align_flags.
12347 (LOOP_ALIGN): Likewise.
12348 (JUMP_ALIGN): Likewise.
12349 (default_loop_align_max_skip): Remove.
12350 (default_label_align_max_skip): Likewise.
12351 (default_jump_align_max_skip): Likewise.
12352 (default_label_align_after_barrier_max_skip):
12353 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12354 (LABEL_TO_MAX_SKIP): Remove.
12355 (label_to_alignment): Return align_flags type instead of integer.
12356 (label_to_max_skip): Remove.
12357 (align_fuzz): Use align_flags type.
12358 (compute_alignments): Use align_flags type and use align_flags::max
12359 to combine multiple alignments.
12360 (grow_label_align): Grow vec instead of C array.
12361 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12362 (shorten_branches): Use align_flags type and use align_flags::max
12363 to combine multiple alignments.
12364 (final_scan_insn_1): Remove usage of secondary alignment that comes
12365 from label alignment, but instead use proper secondary alignment
12366 which is computed in grow_label_align.
12367 * flags.h (struct align_flags_tuple): Move to align.h.
12368 (struct align_flags): Likewise.
12369 (state_align_loops): Rename to align_loops.
12370 (state_align_jumps): Rename to align_jumps.
12371 (state_align_labels): Rename to align_labels.
12372 (state_align_functions): Rename to align_functions.
12373 (align_loops_log): Remove.
12374 (align_jumps_log): Remove.
12375 (align_labels_log): Remove.
12376 (align_functions_log): Remove.
12377 (align_loops_max_skip): Remove.
12378 (align_jumps_max_skip): Remove.
12379 (align_labels_max_skip): Remove.
12380 (align_functions_max_skip): Remove.
12381 (align_loops_value): Remove.
12382 (align_jumps_value): Remove.
12383 (align_labels_value): Remove.
12384 (align_functions_value): Remove.
12385 * output.h (label_to_alignment): Change return type to align_flags.
12386 (label_to_max_skip): Remove.
12387 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12388 jump_align_max_skip macros.
12389 * targhooks.h (default_loop_align_max_skip): Remove.
12390 (default_label_align_max_skip): Likewise.
12391 (default_jump_align_max_skip): Likewise.
12392 (default_label_align_after_barrier_max_skip): Remove.
12393 * toplev.c (read_log_maxskip): Use ::normalize function.
12394 (parse_N_M): Remove not used argument and also call ::normalize.
12395 (parse_alignment_opts): Do not pass unused arguments.
12396 * varasm.c (assemble_start_function): Use directly align_functions
12397 instead of removed macros.
12398 * system.h: Do not poison removed macros.
12400 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12402 PR middle-end/86539
12403 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12404 and cond temporaries don't have reference type if iterator has
12405 pointer type. For init use &for_pre_body instead of pre_p if
12406 for_pre_body is non-empty.
12408 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12410 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12411 double-double modes to SFmode directly directly.
12412 (trunc<mode>sf2_fprs): Delete.
12414 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12416 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12417 for conversions between IFmode and the decimal floating point modes.
12418 (init_float128_ieee): Use the correct names for conversions between
12419 KFmode and the decimal floating point modes.
12421 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12423 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12424 for the conversions between TDmode and IFmode.
12425 (init_float128_ieee): Use more correct names for the conversions
12426 between TDmode and KFmode.
12428 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12430 PR tree-optimization/86526
12431 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12432 (inline_expand_builtin_string_cmp): Likewise.
12433 (inline_string_cmp): Likewise. Use c_readstr instead of
12434 builtin_memcpy_read_str. Add unit_mode temporary.
12436 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12438 PR middle-end/86528
12439 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12440 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12442 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12444 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12445 Alphabetize prototypes of built-in functions, separating out
12446 built-in functions that are listed in this section but should be
12447 described elsewhere.
12449 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12452 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12453 conditional move when trapping comparison was split to a
12454 non-trapping one (and vice versa).
12456 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12458 * config/s390/s390.c (s390_function_profiler): Generate nops
12459 instead of profiler call sequences.
12460 * config/s390/s390.opt: Add the new option.
12462 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12464 * config/s390/s390.c (s390_function_profiler): Generate
12465 __mcount_loc section.
12466 * config/s390/s390.opt: Add the new option.
12468 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12470 * common.opt: Add the new warning.
12471 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12472 %r0,__fentry__" when -mfentry is specified.
12473 (s390_option_override_internal): Disallow -mfentry for 31-bit
12475 * config/s390/s390.opt: Add the new option.
12477 2018-07-16 Richard Biener <rguenther@suse.de>
12480 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12481 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12483 2018-07-16 Martin Liska <mliska@suse.cz>
12486 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12489 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12491 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12493 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12495 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12497 * config/arc/arc-cpus.def (hs4x): New cpu.
12499 * config/arc/arc-tables.opt: Regenerate.
12500 * config/arc/arc.c (arc_sched_issue_rate): New function.
12501 (TARGET_SCHED_ISSUE_RATE): Define.
12502 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12503 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12505 (attr tune): Add ARCHS4x tune values.
12506 (attr tune_dspmpy): Define.
12507 (*tst): Correct instruction type.
12508 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12509 * config/arc/arcHS4x.md: New file.
12510 * config/arc/fpu.md: Update instruction type attributes.
12511 * config/arc/t-multilib: Regenerate.
12513 2018-07-16 Tom de Vries <tdevries@suse.de>
12516 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12518 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12520 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12523 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12525 PR tree-optimization/86514
12526 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12527 conversion to a boolean type from a type with greater precision.
12529 2018-07-16 Tom de Vries <tdevries@suse.de>
12531 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12532 dump_flags request TDF_SLIM.
12534 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12536 * fold-const.c (int_const_binop_1): Abstract...
12537 (wide_int_binop): ...wide int code here.
12538 (poly_int_binop): ...poly int code here.
12539 Abstract the rest of int_const_binop_1 into int_const_binop.
12540 * fold-const.h (wide_int_binop): New.
12541 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12542 Remove useless PLUS/MINUS_EXPR case.
12543 (zero_nonzero_bits_from_vr): Move wide int code...
12544 (zero_nonzero_bits_from_bounds): ...here.
12545 (extract_range_from_binary_expr_1): Move mask optimization code...
12546 (range_easy_mask_min_max): ...here.
12547 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12548 (range_easy_mask_min_max): New.
12550 2018-07-15 Jeff Law <law@redhat.com>
12553 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12556 2018-07-14 Jim Wilson <jimw@sifive.com>
12558 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12560 2018-07-14 Paul Koning <ni1d@arrl.net>
12562 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12564 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12566 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12569 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12570 Steve Munroe <munroesj52@gmail.com>
12572 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12573 (_mm_andnot_si128): Likewise.
12574 (_mm_or_si128): Likewise.
12575 (_mm_xor_si128): Likewise.
12577 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12579 PR middle-end/78809
12580 * builtins.c (expand_builtin_memcmp): Inline the calls first
12581 when result_eq is false.
12582 (expand_builtin_strcmp): Inline the calls first.
12583 (expand_builtin_strncmp): Likewise.
12584 (inline_string_cmp): New routine. Expand a string compare
12585 call by using a sequence of char comparison.
12586 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12587 a call to str(n)cmp/memcmp.
12588 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12590 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12592 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12594 * config/arm/driver-arm.c: Include arm-native.h.
12595 (host_detect_local_cpu): Use auto-generated data tables.
12596 (vendors, arm_cpu_table): Delete. Move part information to ...
12597 * config/arm/arm-cpus.in: ... here.
12598 * config/arm/parsecpu.awk (gen_native): New function.
12599 (vendor, part): New CPU fields.
12600 (END): Add support for building the native CPU detection tables.
12601 * config/arm/t-arm (arm-native.h): Add build rule.
12602 (driver-arm.o): Add dependency on arm-native.h.
12604 2018-07-13 Richard Biener <rguenther@suse.de>
12606 PR middle-end/85974
12607 * match.pd (addr1 - addr2): Allow either of the operand to
12610 2018-07-13 Tom de Vries <tdevries@suse.de>
12612 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12615 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12617 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12618 arrays instead of numbered variables.
12620 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12622 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12623 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12625 2018-07-13 Richard Biener <rguenther@suse.de>
12628 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12629 instead of get_context_die.
12631 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12632 Richard Biener <rguenther@suse.de>
12634 PR middle-end/86489
12635 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12636 that the loop latch destination where phi is defined.
12638 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12640 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12641 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12642 (riscv_set_current_function): Extract getting interrupt type to new
12644 (riscv_get_interrupt_type): New function.
12645 (riscv_merge_decl_attributes): New function, checking interrupt type is
12647 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12649 2018-07-12 Paul Koning <ni1d@arrl.net>
12651 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12654 2018-07-12 Paul Koning <ni1d@arrl.net>
12656 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12657 zero reference, add doloop_end instead.
12658 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12659 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12660 detail for doloop_end.
12662 2018-07-12 Martin Sebor <msebor@redhat.com>
12665 * attribs.c (decl_attributes): Reject conflicting attributes before
12666 calling attribute handlers.
12668 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12670 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12672 (gcc::dump_manager::get_dump_file_name): likewise.
12673 (dump_begin): Likewise.
12674 * dumpfile.h (dump_begin): Update prototype.
12675 (gcc::dump_manager::get_dump_file_name,
12676 gcc::dump_manager::get_dump_file_name): Update prototype.
12678 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12680 * internal-fn.h (vectorizable_internal_fn_p): New function.
12681 * tree-vect-slp.c (compatible_calls_p): Likewise.
12682 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12683 to internal functions.
12684 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12686 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12688 * fold-const.h (inverse_conditions_p): Declare.
12689 * fold-const.c (inverse_conditions_p): New function.
12690 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12691 that test the inverse condition of a conditional internal function.
12692 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12693 * internal-fn.c (internal_fn_mask_index): Handle conditional
12694 internal functions.
12695 (vectorized_internal_fn_supported_p): New function.
12696 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12697 (any_pred_load_store): Replace with...
12698 (need_to_predicate): ...this new variable.
12699 (redundant_ssa_names): New variable.
12700 (ifcvt_can_use_mask_load_store): Move initial checks to...
12701 (ifcvt_can_predicate): ...this new function. Handle tree codes
12702 for which a conditional internal function exists.
12703 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12704 instead of ifcvt_can_use_mask_load_store. Update after variable
12706 (predicate_load_or_store): New function, split out from
12707 predicate_mem_writes.
12708 (check_redundant_cond_expr): New function.
12709 (value_available_p): Likewise.
12710 (predicate_rhs_code): Likewise.
12711 (predicate_mem_writes): Rename to...
12712 (predicate_statements): ...this. Use predicate_load_or_store
12713 and predicate_rhs_code.
12714 (combine_blocks, tree_if_conversion): Update after above name changes.
12715 (ifcvt_local_dce): Handle redundant_ssa_names.
12716 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12717 general conditional functions.
12718 * tree-vect-stmts.c (vectorizable_call): Likewise.
12720 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12721 Alan Hayward <alan.hayward@arm.com>
12722 David Sherwood <david.sherwood@arm.com>
12724 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12725 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12726 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12727 plus and minus and convert them into IFN_COND_FMA-based sequences.
12728 (convert_mult_to_fma): Handle conditional plus and minus.
12730 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12732 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12733 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12734 (cond_fnms_optab): New optabs.
12735 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12736 internal functions.
12737 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12738 * internal-fn.h (get_conditional_internal_fn): Declare.
12739 (get_unconditional_internal_fn): Likewise.
12740 * internal-fn.c (cond_ternary_direct): New macro.
12741 (expand_cond_ternary_optab_fn): Likewise.
12742 (direct_cond_ternary_optab_supported_p): Likewise.
12743 (FOR_EACH_COND_FN_PAIR): Likewise.
12744 (get_conditional_internal_fn): New function.
12745 (get_unconditional_internal_fn): Likewise.
12746 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12747 (gimple_match_op::gimple_match_op): Add a new overload for 5
12749 (gimple_match_op::set_op): Likewise.
12750 (gimple_resimplify5): Declare.
12751 * genmatch.c (decision_tree::gen): Generate simplifications for
12753 * gimple-match-head.c (gimple_simplify): Define an overload for
12754 5 operands. Handle calls with 5 arguments in the top-level overload.
12755 (convert_conditional_op): Handle conversions from unconditional
12756 internal functions to conditional ones.
12757 (gimple_resimplify5): New function.
12758 (build_call_internal): Pass a fifth operand.
12759 (maybe_push_res_to_seq): Likewise.
12760 (try_conditional_simplification): Try converting conditional
12761 internal functions to unconditional internal functions.
12762 Handle 3-operand unconditional forms.
12763 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12764 Define ternary equivalents of the current rules for binary conditional
12765 internal functions.
12766 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12767 ternary operations.
12768 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12769 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12770 (optab): Handle them.
12771 (SVE_COND_FP_TERNARY): New int iterator.
12772 (sve_fmla_op, sve_fmad_op): New int attributes.
12773 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12774 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12775 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12777 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12779 * target.def (preferred_else_value): New target hook.
12780 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12781 * doc/tm.texi: Regenerate.
12782 * targhooks.h (default_preferred_else_value): Declare.
12783 * targhooks.c (default_preferred_else_value): New function.
12784 * internal-fn.h (conditional_internal_fn_code): Declare.
12785 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12786 (get_conditional_internal_fn): Use it.
12787 (conditional_internal_fn_code): New function.
12788 * gimple-match.h (gimple_match_cond): New struct.
12789 (gimple_match_op): Add a cond member function.
12790 (gimple_match_op::gimple_match_op): Update all forms to take a
12792 * genmatch.c (expr::gen_transform): Use the same condition as res_op
12793 for the suboperation, but don't specify a particular else_value.
12794 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12795 (visit_nary_op, visit_reference_op_load): Pass
12796 gimple_match_cond::UNCOND to the gimple_match_op constructor.
12797 * gimple-match-head.c: Include tree-eh.h
12798 (convert_conditional_op): New function.
12799 (maybe_resimplify_conditional_op): Likewise.
12800 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12801 (gimple_resimplify2): Likewise.
12802 (gimple_resimplify3): Likewise.
12803 (gimple_resimplify4): Likewise.
12804 (maybe_push_res_to_seq): Return null for conditional operations.
12805 (try_conditional_simplification): New function.
12806 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
12808 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12810 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12812 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12814 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12816 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12818 (hash_tree): Do not hash DECL_FCONTEXT
12819 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12820 Do not stream DECL_FCONTEXT.
12821 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12822 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12824 2018-07-12 Richard Biener <rguenther@suse.de>
12827 * dwarf2out.c (gen_block_die): Only output blocks when they have
12828 at least one !DECL_IGNORED_P variable.
12830 2018-07-12 Richard Biener <rguenther@suse.de>
12833 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12834 Remove -mieee-fp handling.
12836 2018-07-12 Richard Biener <rguenther@suse.de>
12838 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12839 left-over from last patch.
12841 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12843 PR tree-optimization/86492
12844 * gimple-ssa-store-merging.c
12845 (imm_store_chain_info::coalesce_immediate_stores): Call
12846 check_no_overlap even for the merge_overlapping case. Formatting fix.
12848 2018-07-12 Richard Biener <rguenther@suse.de>
12850 PR middle-end/86479
12851 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12852 move possibly trapping operations into the conditional.
12854 2018-07-12 Richard Biener <rguenther@suse.de>
12856 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12857 (vn_lookup_simplify_result): Remove recursion limit applied
12859 (vn_nary_build_or_lookup_1): Adjust.
12860 (try_to_simplify): Likewise.
12861 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12863 (gimple_resimplify2): Likewise.
12864 (gimple_resimplify3): Likewise.
12865 (gimple_resimplify4): Likewise.
12867 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12869 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12870 Use __mmask64 type instead of __mmask8 for __M argument.
12871 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12872 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12874 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12875 __mmask16 for __M argument.
12876 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12877 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12878 to __mmask16 instead of __mmask8.
12879 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12880 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12881 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12882 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12883 instead of __mmask16 for __U argument.
12884 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12885 __mmask16 instead of __mmask8 for __U argument.
12886 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12888 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12890 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12892 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12894 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12896 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12898 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12900 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12902 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12904 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12906 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12907 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12908 return type as well as __M argument type and all casts from __mmask8
12910 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12911 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12912 return type as well as __M argument type and all casts from __mmask8
12914 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12915 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12916 return type as well as __M argument type and all casts from __mmask8
12918 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12919 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12920 return type as well as __M argument type and all casts from __mmask8
12922 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12923 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12926 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
12928 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12929 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12932 2018-07-11 Paul Koning <ni1d@arrl.net>
12934 * doc/md.texi (define_subst): Document how multiple occurrences of
12935 the same argument in the replacement pattern are handled.
12937 2018-07-11 Paul Koning <ni1d@arrl.net>
12939 * doc/extend.texi (Common Variable Attributes): Move "mode" into
12940 alphabetical order.
12941 (Common Type Attributes): Add "mode" attribute.
12943 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
12945 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12946 stream DECL_ORIGINAL_TYPE.
12947 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12948 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12949 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12950 Do not walk original type.
12951 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12953 (write_ts_decl_non_common_tree_pointers): Do not stream
12955 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12956 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12958 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12960 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12961 thread twice from the same starting edge.
12963 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12965 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12966 * gimple.c (gimple_call_nonnull_result_p): ...here...
12967 (gimple_call_nonnull_arg): ...and here.
12968 * gimple.h (gimple_call_nonnull_result_p): New.
12969 (gimple_call_nonnull_arg): New.
12971 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
12973 * config/arm/arm-cpus.in: Move information from fpu field of each
12974 cpu definition to the isa field.
12975 * config/arm/parsecpu.awk (fpu): Delete match rule.
12976 (gen_comm_data): Don't add bits from the CPU's FPU entry.
12978 2018-07-11 Richard Biener <rguenther@suse.de>
12981 * dwarf2out.c (init_sections_and_labels): Use
12982 output_asm_line_debug_info consistently.
12983 (dwarf2out_early_finish): Likewise.
12984 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12987 2018-07-11 Richard Biener <rguenther@suse.de>
12989 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12990 Rework father_bb setting in a way to avoid propagating constants
12991 multiple times on a loop body.
12993 2018-07-10 Mark Wielaard <mark@klomp.org>
12996 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12998 2018-07-10 Richard Biener <rguenther@suse.de>
13000 * hash-map.h (hash_map::iterator::operator*): Return
13001 references to key and value.
13003 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13006 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13007 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13008 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13009 (gimplify_omp_for): For composite loops, move outer
13010 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13011 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13012 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13013 TREE_LIST for both the original class iterator and the "last" helper
13014 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13015 loop, remember has_decl_expr from outer composite loops for the
13016 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13018 2018-07-09 Martin Sebor <msebor@redhat.com>
13020 PR middle-end/77357
13021 PR middle-end/86428
13022 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13023 accessing implicitly initialized array elements.
13024 * expr.c (string_constant): Handle string initializers of
13025 character arrays within aggregates.
13026 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13027 Store element offset. As a special case, handle zero size.
13028 (fold_nonarray_ctor_reference): Same.
13029 (fold_ctor_reference): Add argument. Store subobject offset.
13030 * gimple-fold.h (fold_ctor_reference): Add argument.
13032 2018-07-09 Paul Koning <ni1d@arrl.net>
13034 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13035 (pdp11_insn_cost): New function.
13036 (pdp11_md_asm_adjust): New function.
13037 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13038 (pdp11_rtx_costs): Update to match machine better.
13039 (output_addr_const_pdp11): Correct format mismatch warnings.
13040 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13041 * config/pdp11/pdp11.md: General change to add base_cost and/or
13042 length attributes for use by new pdp11_insn_cost function.
13043 (MIN_BRANCH): Correct definition.
13045 (doloop_end): Use standard pattern name for looping pattern.
13046 (doloop_end_nocc): New.
13047 (movsf): Add another constraint alternative.
13048 (zero_extendqihi2): Add constraint alternatives for not in place
13050 (zero_extendhisi2): Remove.
13051 (shift patterns): Add CC handling variants.
13055 (define_peephole2): New peephole to recognize mov that sets CC for
13058 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13060 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13061 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13064 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13067 * real.c (real_nextafter): Return true if result is denormal.
13069 2018-07-09 Martin Liska <mliska@suse.cz>
13071 * common.opt: Add back wrongly removed attribute.
13073 2018-07-09 Richard Biener <rguenther@suse.de>
13076 * dwarf2out.c (gen_block_die): For an early generated DIE
13077 always output high/low PC attributes.
13079 2018-07-09 Tom de Vries <tdevries@suse.de>
13081 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13082 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13083 onto VAR_DECL with abstract origin.
13085 2018-07-07 Jim Wilson <jimw@sifive.com>
13087 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13089 2018-07-07 Tom de Vries <tdevries@suse.de>
13091 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13093 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13095 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13097 (combine_bound): Use wide-int overflow calculation instead of
13099 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13101 * fold-const.c (int_const_binop_2): Same.
13102 (extract_muldiv_1): Same.
13103 (fold_div_compare): Same.
13104 (fold_abs_const): Same.
13106 * poly-int.h (add): Same.
13110 * predict.c (predict_iv_comparison): Same.
13111 * profile-count.c (slow_safe_scale_64bit): Same.
13112 * simplify-rtx.c (simplify_const_binary_operation): Same.
13113 * tree-chrec.c (tree_fold_binomial): Same.
13114 * tree-data-ref.c (split_constant_offset_1): Same.
13115 * tree-if-conv.c (idx_within_array_bound): Same.
13116 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13117 * tree-ssa-phiopt.c (minmax_replacement): Same.
13118 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13119 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13120 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13121 * wide-int.cc (wi::add_large): Same.
13122 (wi::mul_internal): Same.
13123 (wi::sub_large): Same.
13124 (wi::divmod_internal): Same.
13125 * wide-int.h: Change overflow type to overflow_type for neg, add,
13126 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13127 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13128 mul_internal, divmod_internal.
13129 (overflow_type): New enum.
13130 (accumulate_overflow): New.
13132 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13134 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13135 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13137 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13139 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13140 argument is checked for zero before entering loop, avoid checking again.
13142 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13144 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13145 * gimplify.h (generic_expr_could_trap_p): Likwise.
13146 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13148 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13150 PR tree-optimization/86401
13151 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13152 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13153 (fold_bit_and_mask): ... here. New helper function for match.pd.
13154 * fold-const.h (fold_bit_and_mask): Declare.
13155 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13157 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13160 * target.def (translate_mode_attribute): New hook.
13161 * targhooks.h (default_translate_mode_attribute): Declare.
13162 * targhooks.c (default_translate_mode_attribute): New function.
13163 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13164 * doc/tm.texi: Regenerate.
13165 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13166 (rs6000_translate_mode_attribute): New function.
13168 2018-07-06 Paul Koning <ni1d@arrl.net>
13170 * doc/md.texi (define_split): Document DONE and FAIL.
13171 (define_peephole2): Ditto.
13173 2018-07-05 Jeff Law <law@redhat.com>
13175 PR tree-optimization/86010
13176 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13177 both the head and tail of mem* and str* calls.
13179 2018-07-05 Jim Wilson <jimw@sifive.com>
13181 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13183 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13185 * config/aarch64/aarch64-simd.md: correct flags text for
13186 MIN_EXPR replacement.
13188 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13190 * configure: Regenerated.
13192 2018-07-05 Carl Love <cel@us.ibm.com>
13194 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13195 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13196 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13197 VSX_BUILTIN_DOUBLEL_V4SF.
13199 2018-07-05 Martin Sebor <msebor@redhat.com>
13202 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13203 than its domain to compute its the upper bound of a char array.
13205 2018-07-05 Nathan Sidwell <nathan@acm.org>
13207 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13208 * doc/cpp.texi: Update comment.
13209 * doc/tm.texi: Rebuilt.
13210 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13211 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13212 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13213 headers affected by extern "C".
13214 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13215 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13216 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13217 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13218 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13219 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13220 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13221 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13222 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13223 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13224 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13225 config/sparc/sp64-elf.h, config/spu/spu.h,
13226 config/stormy16/stormy16.h, config/v850/v850.h,
13227 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13228 define NO_IMPLICIT_EXTERN_C.
13229 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13231 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13234 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13235 instead of GET_MODE_SIZE when comparing Units.
13237 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13240 * rtlanal.c (set_noop_p): Constrain on mode change,
13241 include hard-reg-set.h
13243 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13245 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13247 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13250 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13253 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13255 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13257 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13260 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13262 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13264 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13266 PR middle-end/86380
13267 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13269 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13271 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13272 neg_*_op* variables.
13274 2018-07-04 Martin Liska <mliska@suse.cz>
13276 * tree-switch-conversion.c: Define
13277 max_ratio_for_speed and max_ratio_for_size constants.
13279 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13280 Martin Liska <mliska@suse.cz>
13282 PR middle-end/66240
13285 * common.opt: Rename align options with 'str_' prefix.
13286 * common/config/i386/i386-common.c (set_malign_value): New
13288 (ix86_handle_option): Use it to set -falign-* options/
13289 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13290 type from int to string.
13291 * config/aarch64/aarch64.c: Update default values from int
13293 * config/alpha/alpha.c (alpha_override_options_after_change):
13295 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13296 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13297 max skip conditionally.
13298 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13299 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13300 max skip conditionally.
13301 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13302 max skip conditionally.
13303 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13304 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13305 max skip conditionally.
13306 * config/i386/i386.c (struct ptt): Change type from int to
13308 (ix86_default_align): Set default values.
13309 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13310 max skip conditionally.
13311 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13312 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13313 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13314 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13315 max skip conditionally.
13316 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13317 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13318 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13319 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13320 max skip conditionally.
13321 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13322 * config/ia64/ia64.c (ia64_option_override): Set default values
13323 for alignment options.
13324 * config/m68k/m68k.c: Handle new str_align_* options.
13325 * config/mips/mips.c (mips_set_compression_mode): Change
13327 (mips_option_override): Set default values for options.
13328 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13330 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13332 * config/rx/rx.c (rx_option_override): Likewise.
13333 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13334 (LABEL_ALIGN): Use align_labels_log.
13335 (LOOP_ALIGN): Use align_loops_align.
13336 * config/s390/s390.c (s390_asm_output_function_label): Use new
13338 * config/sh/sh.c (sh_override_options_after_change):
13339 Change type of constants.
13340 * config/spu/spu.c (spu_sched_init): Likewise.
13341 * config/sparc/sparc.c (sparc_option_override): Set default
13342 values for options.
13343 * config/visium/visium.c (visium_option_override): Likewise.
13344 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13345 emit p2align format with last argument if it's not needed.
13346 * doc/invoke.texi: Document extended format of -falign-*.
13347 * final.c: Use align_labels alignment.
13348 * flags.h (struct target_flag_state): Change type to use
13350 (struct align_flags_tuple): New.
13351 (struct align_flags): Likewise.
13352 (align_loops_log): Redefine macro to use new types.
13353 (align_loops_max_skip): Redefine macro to use new types.
13354 (align_jumps_log): Redefine macro to use new types.
13355 (align_jumps_max_skip): Redefine macro to use new types.
13356 (align_labels_log): Redefine macro to use new types.
13357 (align_labels_max_skip): Redefine macro to use new types.
13358 (align_functions_log): Redefine macro to use new types.
13359 (align_loops): Redefine macro to use new types.
13360 (align_jumps): Redefine macro to use new types.
13361 (align_labels): Redefine macro to use new types.
13362 (align_functions): Redefine macro to use new types.
13363 (align_functions_max_skip): Redefine macro to use new types.
13364 (align_loops_value): New macro.
13365 (align_jumps_value): New macro.
13366 (align_labels_value): New macro.
13367 (align_functions_value): New macro.
13368 * function.c (invoke_set_current_function_hook): Propagate
13369 alignment values from flags to global variables default in
13371 * ipa-icf.c (sem_function::equals_wpa): Use
13372 cl_optimization_option_eq instead of memcmp.
13373 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13375 (cl_optimization_stream_in): Likewise.
13376 * optc-save-gen.awk: Support strings in cl_optimization.
13377 * opth-gen.awk: Likewise.
13378 * opts.c (finish_options): Remove error checking of invalid
13380 (MAX_CODE_ALIGN): Remove.
13381 (MAX_CODE_ALIGN_VALUE): Likewise.
13382 (parse_and_check_align_values): New function.
13383 (check_alignment_argument): Likewise.
13384 (common_handle_option): Use check_alignment_argument.
13385 * opts.h (parse_and_check_align_values): Declare.
13386 * toplev.c (init_alignments): Remove.
13387 (read_log_maxskip): New.
13388 (parse_N_M): Likewise.
13389 (parse_alignment_opts): Likewise.
13390 (backend_init_target): Remove usage of init_alignments.
13391 * toplev.h (parse_alignment_opts): Declare.
13392 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13394 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13395 * tree.c (cl_option_hasher::equal): New.
13396 * varasm.c: Use new global macros.
13398 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13400 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13401 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13402 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13403 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13404 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13405 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13406 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13407 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13408 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13409 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13410 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13411 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13412 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13414 2018-07-04 Martin Liska <mliska@suse.cz>
13415 Jonathan Wakely <jwakely@redhat.com>
13417 * coverage.c: Use correct type.
13418 * doc/invoke.texi: Language correction.
13420 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13423 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13424 ENDBRANCH for non-tail call which may return via indirect branch.
13425 * doc/extend.texi: Document indirect_return attribute.
13427 2018-07-03 Martin Sebor <msebor@redhat.com>
13429 PR tree-optimization/86274
13430 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13432 (format_floating): Correct handling of infinities and NaNs.
13434 2018-07-03 Martin Sebor <msebor@redhat.com>
13436 * print-tree.c (print_real_cst): New function.
13437 (print_node_brief): Call it.
13438 (print_node): Ditto.
13440 2018-07-03 Jeff Law <law@redhat.com>
13442 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13443 into a single pattern.
13445 * config/h8300/h8300.md (ors code_iterator): New.
13446 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13447 a single pattern and single splitter.
13448 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13449 (iorqi3_1, xorqi3_1): Likewise.
13450 (iorqi3, xorqi3 expanders): Similarly.
13452 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13453 (movmd_internal) into a single pattern using the P mode iterator.
13454 (movmd splitters): Similarly.
13455 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13456 (movsd splitters): Similarly.
13458 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13459 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13460 right table based on the size of the operand.
13461 * config/h8300/h8300.md (length_table): Corresponding changes. All
13462 references to "addb", "addw" and "addl" changed to "add".
13463 (btst patterns): Merge two variants into a single pattern.
13464 (tstqi, tsthi): Likewise.
13465 (addhi3_incdec, addsi3_incdec): Likewise.
13466 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13467 (mulhi3, mulsi3): Likewise.
13468 (udivhi3, udivsi3): Likewise.
13469 (divhi3, divsi3): Likewise.
13470 (andorqi3, andorhi3, andorsi3): Likewise.
13472 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13475 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13476 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13478 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13480 PR tree-optimization/85694
13481 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13482 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13484 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13485 (<u>avg<mode>3_ceil): New patterns.
13487 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13489 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13490 scan-tree-dump directive.
13491 * gcc.dg/vect/slp-perm-2.c: Likewise.
13492 * gcc.dg/vect/slp-perm-3.c: Likewise.
13493 * gcc.dg/vect/slp-perm-5.c: Likewise.
13494 * gcc.dg/vect/slp-perm-6.c: Likewise.
13495 * gcc.dg/vect/slp-perm-7.c: Likewise.
13496 * gcc.dg/vect/slp-perm-8.c: Likewise.
13498 2018-07-03 Marek Polacek <polacek@redhat.com>
13500 PR middle-end/86202
13501 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13503 2018-07-03 Richard Biener <rguenther@suse.de>
13506 * tree-ssa-structalias.c (find_func_clobbers): Properly
13507 handle indirect calls.
13509 2018-07-03 Jeff Law <law@redhat.com>
13511 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13512 (shifts): New code iterator.
13513 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13514 expander. Fix HImode handling on H8/SX.
13515 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13516 (subqi3, subhi3, subsi3 expanders): Likewise.
13517 (andqi3, andhi3, andsi3 expanders): Likewise.
13518 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13519 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13520 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13521 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13522 (zero_extendqihi2, zero_extendqisi2): Likewise.
13523 (extendqihi2, extendqisi2): Likewise.
13524 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13525 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13526 (rotlqi3_1, rotlhi3_1): Likewise.
13527 (logicalhi3_sn, logicalsi3_sn): Likewise.
13528 (logicalhi3, logicalsi3): Likewise.
13530 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13532 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13533 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13534 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13535 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13536 type to append_pattern_def_seq instead of creating a stmt_vec_info
13538 (build_mask_conversion): Likewise. Remove vinfo argument.
13539 (vect_add_conversion_to_patterm): Likewise, renaming to...
13540 (vect_add_conversion_to_pattern): ...this.
13541 (vect_recog_mask_conversion_pattern): Update call to
13542 build_mask_conversion. Pass the vector type to
13543 append_pattern_def_seq here too.
13544 (vect_recog_gather_scatter_pattern): Update call to
13545 vect_add_conversion_to_pattern.
13547 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13549 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13550 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13551 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13552 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13553 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13554 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13555 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13556 append_pattern_def_seq instead of new_pattern_def_seq.
13557 (vect_recog_divmod_pattern): Do both of the above.
13558 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13561 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13563 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13564 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13565 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13566 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13567 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13568 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13569 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13570 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13571 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13572 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13573 parameter with a single stmt_vec_info.
13574 (vect_recog_func_ptr): Likewise.
13575 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13576 (vect_try_gather_scatter_pattern): ...this.
13577 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13578 the stmt_vec_info of the statement to be matched. Don't clear
13579 STMT_VINFO_RELATED_STMT.
13580 (vect_pattern_recog): Update call accordingly.
13582 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13584 PR tree-optimization/85694
13585 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13586 (uavgM3_ceil): Document new optabs.
13587 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13588 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13590 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13591 (savg_ceil_optab): New optabs.
13592 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13593 (vect_vect_recog_func_ptrs): Add it.
13594 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13595 constant directly from the associated lhs.
13597 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13599 * tree-vect-patterns.c (vect_split_statement): New function.
13600 (vect_convert_input): Use it to try to split an existing cast.
13602 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13604 * poly-int.h (print_hex): New function.
13605 * dumpfile.h (dump_dec, dump_hex): Declare.
13606 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13607 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13608 min_input_precision, operation_precision and operation_sign.
13609 * tree-vect-patterns.c (vect_get_range_info): New function.
13610 (vect_same_loop_or_bb_p, vect_single_imm_use)
13611 (vect_operation_fits_smaller_type): Delete.
13612 (vect_look_through_possible_promotion): Add an optional
13613 single_use_p parameter.
13614 (vect_recog_over_widening_pattern): Rewrite to use new
13615 stmt_vec_info infomration. Handle one operation at a time.
13616 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13617 (vect_truncatable_operation_p, vect_set_operation_type)
13618 (vect_set_min_input_precision): New functions.
13619 (vect_determine_min_output_precision_1): Likewise.
13620 (vect_determine_min_output_precision): Likewise.
13621 (vect_determine_precisions_from_range): Likewise.
13622 (vect_determine_precisions_from_users): Likewise.
13623 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13624 (vect_vect_recog_func_ptrs): Put over_widening first.
13626 (vect_pattern_recog): Call vect_determine_precisions.
13628 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13630 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13631 statements that have been replaced by further pattern statements.
13632 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13634 2018-07-03 Richard Biener <rguenther@suse.de>
13636 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13637 always set *dt. Dump vectype in vectype overload.
13638 * dumpfile.h (dump_gimple_expr): New function.
13639 (dump_gimple_expr_loc): Likewise.
13640 * dumpfile.c (dump_gimple_expr): New function.
13641 (dump_gimple_expr_loc): Likewise.
13643 2018-07-02 Jeff Law <law@redhat.com>
13645 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13646 the H8/300, H8/300H and H8/S variants into a single pattern.
13647 (movhi_h8300, movqi_h8300hs): Similarly.
13648 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13649 (QHI mode iterator): New.
13651 * config/h8300/h8300.md: Remove trailing whitespace.
13653 2018-07-02 Jim Wilson <jimw@sifive.com>
13655 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13656 instead of emit_insn for interrupt returns.
13657 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13658 (riscv_sret, riscv_uret): Likewise.
13660 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13662 * pretty-print.c (selftest::test_pp_format): Move save and restore
13663 of quotes to class auto_fix_quotes, and add an instance.
13664 * selftest.c: Include "intl.h".
13665 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13666 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13667 * selftest.h (selftest::auto_fix_quotes): New class.
13669 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13671 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13672 (aarch64_sve_prepare_conditional_op): Remove.
13673 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13674 Allow aarch64_simd_reg_or_zero as select operand; remove
13675 the aarch64_sve_prepare_conditional_op call.
13676 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13677 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13678 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13679 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13680 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13681 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13682 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13683 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13684 and a splitters to match all of the *_any patterns.
13685 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13687 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13688 (SVE_COND_FP_BINARY_REV): Remove.
13689 (sve_int_op_rev, sve_fp_op_rev): New.
13690 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13691 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13692 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13693 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13694 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13695 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13696 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13697 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13698 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13700 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13701 Remove match_dup 1 from the inner unspec.
13702 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13704 * config/aarch64/aarch64.md (movprfx): New attr.
13705 (length): Default movprfx to 8.
13706 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13707 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13708 (*<su>mul<SVE_I>3_highpart): Likewise.
13709 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13710 (*v<ASHIFT><SVE_I>3): Likewise.
13711 (*<su><MAXMIN><SVE_I>3): Likewise.
13712 (*<su><MAXMIN><SVE_F>3): Likewise.
13713 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13714 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13715 (*div<SVE_F>4): Likewise.
13717 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13719 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13722 2018-07-02 Richard Biener <rguenther@suse.de>
13724 PR tree-optimization/86363
13725 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13726 memset argument refers to a non-variable address.
13728 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13730 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13731 {PLUS,MINUS}_EXPR code to...
13732 (adjust_symbolic_bound): ...here,
13733 (combine_bound): ...here,
13734 (set_value_range_with_overflow): ...and here.
13736 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13738 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13740 (extract_range_from_abs_expr): ...here.
13742 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13744 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13745 -fno-omit-frame-pointer when not optimizing.
13747 2018-07-02 Martin Liska <mliska@suse.cz>
13750 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13751 (propagate_nothrow): Likewise.
13753 2018-07-02 Martin Liska <mliska@suse.cz>
13756 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13758 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13760 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13761 function in r262149, changing "loc" param from source_location to
13762 const dump_location_t &.
13763 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13764 declaration, as above.
13766 2018-07-01 Paul Koning <ni1d@arrl.net>
13768 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13769 -munit-asm, -mgnu-asm, -mdec-asm.
13770 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13771 (pdp11_output_labelref): New.
13772 (pdp11_output_def): New.
13773 (pdp11_output_addr_vec_elt): New.
13774 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
13775 %# and %@ format codes.
13776 (pdp11_option_override): New.
13777 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13778 (pdp11_output_ident): New.
13779 (pdp11_asm_named_section): New.
13780 (pdp11_asm_init_sections): New.
13781 (pdp11_file_start): New.
13782 (pdp11_file_end): New.
13783 (output_ascii): Use .ascii/.asciz for -mdec-asm.
13784 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
13785 %o, like %c but octal.
13786 (pdp11_option_override): New.
13787 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13789 (DATA_SECTION_ASM_OP): Ditto.
13790 (READONLY_DATA_SECTION_ASM_OP): New.
13791 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13792 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13793 (ASM_OUTPUT_LABELREF): Ditto.
13794 (ASM_OUTPUT_DEF): Ditto.
13795 (ASM_OUTPUT_EXTERNAL): New.
13796 (ASM_OUTPUT_SOURCE_FILENAME): New.
13797 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13798 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13799 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
13800 %# and %@ format codes.
13801 * config/pdp11/pdp11.opt (mgnu-asm): New.
13802 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13803 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13804 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13806 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
13808 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13809 dereferencing path[] beyond its length.
13811 (debug_all_paths): New.
13812 (rewire_first_differing_edge): New.
13813 (adjust_paths_after_duplication): New.
13814 (duplicate_thread_path): Call adjust_paths_after_duplication.
13816 (thread_through_all_blocks): Add new argument to
13817 duplicate_thread_path.
13819 2018-06-30 Jim Wilson <jimw@sifive.com>
13821 * config/riscv/predicates.md (p2m1_shift_operand): New.
13822 (high_mask_shift_operand): New.
13823 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13824 pattern using p2m1_shift_operand.
13825 (lshsi3_zero_extend_3+2): New combiner pattern using
13826 high_mask_shift_operand.
13828 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13830 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13832 (vect_recog_rotate_pattern): ...here.
13833 (vect_convert_input): Try to insert casts of invariants in the
13835 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13836 preheader to be empty.
13838 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13840 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13841 vector type. If given, install it in the new statement's
13842 STMT_VINFO_VECTYPE.
13843 (vect_element_precision): New function.
13844 (vect_unpromoted_value): New struct.
13845 (vect_unpromoted_value::vect_unpromoted_value): New function.
13846 (vect_unpromoted_value::set_op): Likewise.
13847 (vect_look_through_possible_promotion): Likewise.
13848 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13849 (vect_widened_op_tree, vect_convert_input): Likewise.
13850 (vect_convert_inputs, vect_convert_output): Likewise.
13851 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13852 to handle the optional cast of the multiplication result and
13853 vect_widened_op_tree to detect the widened multiplication itself.
13854 Do not require the input and output of promotion casts to have
13855 the same sign, but base the signedness of the operation on the
13856 input rather than the result. If the pattern includes two
13857 promotions, check that those promotions have the same sign.
13858 Do not restrict the MULT_EXPR handling to a double-width result;
13859 handle quadruple-width results and wider. Use vect_convert_inputs
13860 to convert the inputs to the common type.
13861 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13862 to handle the optional cast of the ABS result. Also allow a sign
13863 change or a sign extension between the ABS and MINUS.
13864 Use vect_widened_op_tree to detect the widened subtraction and use
13865 vect_convert_inputs to convert the inputs to the common type.
13866 (vect_handle_widen_op_by_const): Delete.
13867 (vect_recog_widen_op_pattern): New function.
13868 (vect_recog_widen_mult_pattern): Use it.
13869 (vect_recog_widen_shift_pattern): Likewise.
13870 (vect_recog_widen_sum_pattern): Use
13871 vect_look_through_possible_promotion to handle the promoted
13874 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13876 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13877 the containing gimple_seq *.
13878 * gimple-iterator.h (gsi_for_stmt): Declare it.
13879 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13880 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13881 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13882 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13883 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13885 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13887 (vect_mark_pattern_stmts): ...here. Handle cases in which the
13888 statement being replaced is part of an existing pattern
13889 definition sequence, inserting the new pattern statements before
13891 (vect_pattern_recog_1): Don't return a bool. If the statement
13892 is already part of a pattern, instead apply pattern matching
13893 to the pattern definition statements. Don't clear the
13894 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13895 (vect_pattern_recog): Don't break after the first match;
13896 continue processing the pattern definition statements instead.
13897 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13899 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13901 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13902 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13903 (vect_recog_widen_sum_pattern): Use it.
13905 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13907 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13908 phi is not a pattern statement and has not been replaced by
13909 a pattern statement.
13910 * tree-vect-patterns.c (type_conversion_p): Don't check
13911 STMT_VINFO_IN_PATTERN_P.
13912 (vect_recog_vector_vector_shift_pattern): Likewise.
13913 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13914 the pattern statement rather than the original statement; check
13915 directly for a WIDEN_MULT_EXPR here.
13916 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13917 vect_is_simple_use to return the pattern statement rather
13918 than the original statement; use is_pattern_stmt_p to check
13919 for such a pattern statement.
13920 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13921 to return the pattern statement rather than the original statement;
13922 don't do the same transformation here.
13923 (vect_is_simple_use): If the defining statement has been replaced
13924 by a pattern statement, return the pattern statement instead.
13925 Remove the corresponding (local) transformation from the vectype
13928 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13930 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13931 end and default to null.
13932 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13933 (vectorizable_reduction): Update calls accordingly, dropping the
13934 gimple ** argument if the passed-back statement isn't needed.
13935 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13936 (vect_recog_rotate_pattern): Likewise.
13937 (vect_recog_mask_conversion_pattern): Likewise.
13938 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13939 (vect_mask_constant_operand_p): Likewise.
13940 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13941 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13942 (get_group_load_store_type, get_load_store_type): Likewise.
13943 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13944 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13945 (vectorizable_conversion, vectorizable_assignment): Likewise.
13946 (vectorizable_shift, vectorizable_operation): Likewise.
13947 (vectorizable_store, vect_is_simple_cond): Likewise.
13948 (vectorizable_condition, vectorizable_comparison): Likewise.
13949 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13950 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13951 and move it to the end. Cope with null def_stmt_outs.
13953 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13955 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13957 2018-06-29 Jeff Law <law@redhat.com>
13959 * config/v850/v850.c (v850_legitimate_address_p): Handle large
13960 displacements for TARGET_V850E2V3 and newer.
13961 (TARGET_LRA_P): Remove. Defaults to LRA now.
13962 * config/v850/v850.md (sign23byte_load): Remove.
13963 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13964 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13966 2018-06-29 Martin Liska <mliska@suse.cz>
13969 * coverage.c (coverage_init): Mangle full path name.
13970 * doc/invoke.texi: Document the change.
13971 * gcov-io.c (mangle_path): New.
13972 * gcov-io.h (mangle_path): Likewise.
13973 * gcov.c (mangle_name): Use mangle_path for path mangling.
13975 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13977 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13978 if starting source register is not even.
13980 2018-06-29 Martin Liska <mliska@suse.cz>
13982 PR tree-optimization/86263
13983 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13984 Make edge redirection.
13986 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13988 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13989 (dump_scope_depth): New variable.
13990 (get_dump_scope_depth): New function.
13991 (dump_begin_scope): New function.
13992 (dump_end_scope): New function.
13993 * dumpfile.h (get_dump_scope_depth): New declaration.
13994 (dump_begin_scope): New declaration.
13995 (dump_end_scope): New declaration.
13996 (class auto_dump_scope): New class.
13997 (AUTO_DUMP_SCOPE): New macro.
13998 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14001 2018-06-29 Richard Biener <rguenther@suse.de>
14003 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14004 compute_all_dependences succeeds.
14005 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14006 exceed --param loop-max-datarefs-for-datadeps.
14008 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14010 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14012 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14015 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14016 alternative 0 in preferred_for_speed attribute.
14018 2018-06-28 Paul Koning <ni1d@arrl.net>
14020 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14021 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14022 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14023 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14024 for shift insn patterns.
14026 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14028 * cgraph.c (cgraph_node::get_body): Replace assignments to
14029 "dump_file" with calls to set_dump_file.
14030 * dumpfile.c (alt_dump_file): Make static, and group with...
14031 (alt_flags): ...this definition.
14032 (dumps_are_enabled): New variable.
14033 (refresh_dumps_are_enabled): New function.
14034 (set_dump_file): New function.
14035 (set_alt_dump_file): New function.
14036 (gcc::dump_manager::dump_start): Replace assignments to
14037 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14039 (gcc::dump_manager::dump_finish): Likewise.
14040 * dumpfile.h (alt_dump_file): Delete decl.
14041 (dumps_are_enabled): New variable decl.
14042 (set_dump_file): New function decl.
14043 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14045 * tree-nested.c (lower_nested_functions): Replace assignments to
14046 "dump_file" with calls to set_dump_file.
14048 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14050 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14051 goto_locus of each outgoing edge of each basic block.
14053 2018-06-28 Richard Biener <rguenther@suse.de>
14055 * dwarf2out.c (decl_scope_table): Remove.
14056 (push_decl_scope): Likewise.
14057 (pop_decl_scope): Likewise.
14058 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14059 (gen_struct_or_union_type_die): Likewise.
14060 (gen_tagged_type_die): Likewise.
14061 (dwarf2out_init): Do not initialize decl_scope_table.
14062 (dwarf2out_c_finalize): Do not free it.
14064 2018-06-28 Richard Biener <rguenther@suse.de>
14066 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14067 deciding whether to not re-use a DIE.
14069 2018-06-28 Richard Biener <rguenther@suse.de>
14071 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14072 DW_AT_abstract_origin attribute.
14074 2018-06-28 Martin Liska <mliska@suse.cz>
14076 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14077 Use newly introduced constants.
14078 * tree-switch-conversion.h (struct jump_table_cluster):
14079 Define max_ratio_for_size and max_ratio_for_speed.
14081 2018-06-28 Martin Liska <mliska@suse.cz>
14083 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14084 Add new checking assert to catch invalid state.
14085 (jump_table_cluster::can_be_handled): Handle single case
14087 (jump_table_cluster::is_beneficial): Bail out for such case.
14088 (bit_test_cluster::find_bit_tests):
14089 Add new checking assert to catch invalid state.
14090 (bit_test_cluster::can_be_handled): Handle single case
14092 (bit_test_cluster::is_beneficial): Bail out for such case.
14093 (switch_decision_tree::analyze_switch_statement):
14096 2018-06-28 Martin Liska <mliska@suse.cz>
14098 * common.opt: Introduce -completion option.
14099 * gcc.c (driver_handle_option): Handle it.
14100 (driver::main): Print completions if completion
14102 * opt-suggestions.c (option_proposer::get_completions):
14104 (option_proposer::suggest_completion): Likewise.
14105 (option_proposer::find_param_completions): Likewise.
14106 (verify_autocompletions): Likewise.
14107 (test_completion_valid_options): Likewise.
14108 (test_completion_valid_params): Likewise.
14109 (in_completion_p): Likewise.
14110 (empty_completion_p): Likewise.
14111 (test_completion_partial_match): Likewise.
14112 (test_completion_garbage): Likewise.
14113 (opt_proposer_c_tests): Likewise.
14114 * opt-suggestions.h: Declare new functions.
14115 * opts.c (common_handle_option): Handle OPT__completion_.
14116 * selftest-run-tests.c (selftest::run_tests): Add
14117 opt_proposer_c_tests.
14118 * selftest.c (assert_str_startswith): New.
14119 * selftest.h (assert_str_startswith): Likewise.
14120 (opt_proposer_c_tests): New.
14121 (ASSERT_STR_STARTSWITH): Likewise.
14123 2018-06-28 Martin Liska <mliska@suse.cz>
14125 * Makefile.in: Add opt-suggestions.o.
14126 * gcc-main.c: Include opt-suggestions.h.
14127 * gcc.c (driver::driver): Likewise.
14128 (driver::~driver): Remove m_option_suggestions.
14129 (driver::build_option_suggestions): Moved to option_proposer.
14130 (driver::suggest_option): Likewise.
14131 (driver::handle_unrecognized_options): Use option_proposer.
14132 * gcc.h (class driver): Add new memver m_option_proposer.
14133 * opt-suggestions.c: New file.
14134 * opt-suggestions.h: New file.
14136 2018-06-28 Martin Liska <mliska@suse.cz>
14138 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14139 (auto_string_vec::~auto_string_vec): Likewise.
14141 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14143 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14144 prevent_decl_creation_for_types fields up and add reset_location field.
14145 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14146 statement if id->reset_location is true.
14147 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14148 id->reset_location is true.
14149 (copy_phis_for_bb): Force input_location on the arguments if
14150 id->reset_location is true.
14151 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14152 is set on the function to be inlined.
14154 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14156 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14158 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14160 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14161 registers for Pmode.
14162 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14163 hard registers for the clobbered pseudo.
14165 2018-06-27 Paul Koning <ni1d@arrl.net>
14167 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14168 mutually exclusive options.
14169 * config/pdp11/constraints.md (h): New constraint.
14170 (O): Update definition to match shift code generation.
14171 (D): New constraint.
14172 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14174 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14176 (output_jump): Change arguments.
14177 (pdp11_fixed_cc_regs): New function.
14178 (pdp11_cc_mode): Ditto.
14179 (pdp11_expand_shift): Ditto.
14180 (pdp11_assemble_shift): Ditto.
14181 (pdp11_small_shift): Ditto.
14182 (pdp11_branch_cost): Remove.
14183 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14185 (pdp11_register_move_cost): Update for CC registers.
14186 (pdp11_rtx_costs): Add case for LSHIFTRT.
14187 (pdp11_output_jump): Add CCNZ mode conditional branches.
14188 (notice_update_cc_on_set): Remove.
14189 (pdp11_cc_mode): New function.
14190 (simple_memory_operand): Correct pre/post decrement case.
14191 (no_side_effect_operand): New function.
14192 (pdp11_regno_reg_class): Add CC_REGS class.
14193 (pdp11_fixed_cc_regs): New function.
14194 (pdp11_small_shift): New function.
14195 (pdp11_expand_shift): New function to expand shift insns.
14196 (pdp11_assemble_shift): New function to output shifts.
14197 (pdp11_branch_cost): Remove.
14198 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14199 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14200 (WCHAR_TYPE): Ditto.
14201 (PTRDIFF_TYPE): Ditto.
14202 (ADJUST_INSN_LENGTH): New macro.
14203 (FIXED_REGISTERS): Add CC registers.
14204 (CALL_USED_REGISTERS): Ditto.
14205 (reg_class): Ditto.
14206 (REG_CLASS_NAMES): Ditto.
14207 (REG_CLASS_CONTENTS): Ditto.
14208 (SELECT_CC_MODE): Use new function.
14209 (TARGET_FLAGS_REGNUM): New macro.
14210 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14211 (cc0_reg_rtx): Remove.
14212 (CC_STATUS_MDEP): Remove.
14213 (CC_STATUS_MDEFP_INIT): Remove.
14214 (CC_IN_FPU): Remove.
14215 (NOTICE_UPDATE_CC): Remove.
14216 (REGISTER_NAMES): Add CC registers.
14217 (BRANCH_COST): Change to constant 1.
14218 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14220 * config/pdp11/pdp11.opt (mbcopy): Remove.
14221 (mbcopy-builtin): Remove.
14222 (mbranch-cheap): Remove.
14223 (mbranch-expensive): Remove.
14224 * config/pdp11/predicates.md (expand_shift_operand): Update to
14225 match shift code generation.
14226 (ccnz_operator): New predicate.
14227 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14228 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14229 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14231 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14232 description of O constraint.
14234 2018-06-27 Jeff Law <law@redhat.com>
14235 Austin Law <austinklaw@gmail.com>
14237 * config/v850/v850.md (addsi3_set_flags): New pattern.
14238 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14239 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14240 (zero_extendhisi2_v850_set_flags): Likewise.
14241 (zero_extendqisi2_v850_set_flags): Likewise.
14242 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14243 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14244 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14246 * config/v850/v850-protos.h (notice_update_cc): Remove.
14247 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14248 (v850_print_operand): Handle 'D' and "d".
14249 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14250 Add handling of arithmetic/logical operations compared against zero.
14251 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14252 Do not look at v850_compare_op, instead get mode from last argument.
14253 (v850_gen_compare): Remove
14254 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14255 after reload for prologue insns.
14256 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14258 (construct_save_jarl): Likewise.
14259 (TARGET_FLAGS_REGNUM): Define.
14260 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14261 (NOTICE_UPDATE_CC): Remove.
14262 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14263 than cc0. Conditionalize on reload_completed.
14264 (cmpsi_insn, setfcc_insn): Likewise.
14265 (tst1 splitter): Turn into define_and_split which sets the flags
14267 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14268 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14269 (cstoresf4, cstoredf4): Clobber the flags.
14270 (cmpsi, cmpsf, cmpdf): Remove expanders.
14271 (setf_insn): Remove pattern.
14272 (addsi3): Turn into define_and_split which clobbers the flags after
14273 reload and a suitable pattern (addsi3_clobber_flags) for use after
14275 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14276 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14277 (ashrsi3, ashrsi3_v850e2): Likewise.
14278 (bins): Clobber the flags.
14279 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14280 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14281 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14282 (call_value_internal_short, call_value_internal_long): Likewise.
14283 (callt_save_interrupt, callt_return_interrupt): Likewise.
14284 (save_interrupt, return_interrupt): Likewise.
14285 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14286 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14287 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14288 (All FP comparisons): Only allow after reload has completed.
14290 (divh, divhu): Tweak output template.
14291 (branch_z_normal, branch_z_invert): Remove
14292 (branch_nz_normal, branch_nz_invert): Likewise.
14293 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14295 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14296 * config/v850/v850.c (notice_update_cc): Remove.
14297 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14298 (CC_NO_CARRY): Likewise.
14299 (NOTICE_UPDATE_CC): Define to nothing.
14300 * config/v850/v850.md: Remove block comment on cc0 handling
14301 Remove "cc" attribute from all patterns. Remove cc_status handling
14302 from all patterns. Minor formatting fixes.
14304 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14306 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14307 (cortex-a76.cortex-a55): Likewise.
14308 * config/aarch64/aarch64-tune.md: Regenerate.
14309 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14310 cortex-a76.cortex-a55.
14312 2018-06-27 Jeff Law <law@redhat.com>
14314 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14315 (MULTILIB_DIRNAMES): Similarly.
14317 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14319 * gimple.h (gimple_return_retbnd): Delete.
14320 (gimple_return_set_retbnd): Likewise.
14321 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14322 gimple_return_set_retbnd.
14323 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14324 gimple_return_retbnd and adjust.
14325 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14326 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14327 Explicitly return NULL in a couple more cases. Move assertion
14328 on debug statements and remove unreachable code.
14329 (reset_debug_binding): Do not test id->retbnd.
14330 (expand_call_inline): Do not set it.
14332 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14334 * configure.ac: Add --disable-gcov option.
14335 * configure: Regenerate.
14336 * Makefile.in: Honour @enable_gcov@.
14337 * doc/install.texi: Document --disable-gcov.
14339 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14341 * config/arm/arm-cpus.in (cortex-a76): New entry.
14342 (cortex-a76.cortex-a55): Likewise.
14343 * config/arm/arm-tables.opt: Regenerate.
14344 * config/arm/arm-tune.md: Likewise.
14345 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14346 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14347 cortex-a76.cortex-a55.
14349 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14352 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14354 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14356 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14358 (EPILOGUE_USES): Likewise.
14360 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14362 * tree-inline.c (remap_location): New function extracted from...
14363 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14364 (copy_phis_for_bb): ...here. Call remap_location.
14365 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14367 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14369 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14370 unaligned vsx for 16B memset.
14372 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14375 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14376 ieee128_float_type_node to long_double_type_node unless
14377 TARGET_LONG_DOUBLE_128 is set.
14379 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14381 * cfgloop.c (get_loop_location): Convert return type from
14382 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14383 by implicit construction from rtx_insn *, and using
14384 dump_user_location_t::from_function_decl for the fallback case.
14385 * cfgloop.h (get_loop_location): Convert return type from
14386 location_t to dump_user_location_t.
14387 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14388 dump_printf_loc to pass in a dump_location_t rather than a
14389 location_t, via the gimple stmt.
14390 * coverage.c (get_coverage_counts): Update calls to
14391 dump_printf_loc to pass in dump_location_t rather than a
14393 * doc/optinfo.texi (Dump types): Convert example of
14394 dump_printf_loc from taking "locus" to taking "insn". Update
14395 description of the "_loc" calls to cover dump_location_t.
14396 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14398 (dump_user_location_t::dump_user_location_t): New constructors,
14399 from gimple *stmt and rtx_insn *.
14400 (dump_user_location_t::from_function_decl): New function.
14401 (dump_loc): Make static.
14402 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14403 const dump_location_t &.
14404 (dump_generic_expr_loc): Delete.
14405 (dump_printf_loc): Convert param "loc" from location_t to
14406 const dump_location_t &.
14407 (selftest::test_impl_location): New function.
14408 (selftest::dumpfile_c_tests): New function.
14409 * dumpfile.h: Include "profile-count.h".
14410 (class dump_user_location_t): New class.
14411 (struct dump_impl_location_t): New struct.
14412 (class dump_location_t): New class.
14413 (dump_printf_loc): Convert 2nd param from source_location to
14414 const dump_location_t &.
14415 (dump_generic_expr_loc): Delete.
14416 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14417 const dump_location_t &.
14418 * gimple-fold.c (fold_gimple_assign): Update call to
14419 dump_printf_loc to pass in a dump_location_t rather than a
14420 location_t, via the gimple stmt.
14421 (gimple_fold_call): Likewise.
14422 * gimple-loop-interchange.cc
14423 (loop_cand::analyze_iloop_reduction_var): Update for change to
14424 check_reduction_path.
14425 (tree_loop_interchange::interchange): Update for change to
14426 find_loop_location.
14427 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14428 change in return-type of find_loop_location.
14429 (graphite_regenerate_ast_isl): Likewise.
14430 * graphite-optimize-isl.c (optimize_isl): Likewise.
14431 * graphite.c (graphite_transform_loops): Likewise.
14432 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14433 pass in a dump_location_t rather than a location_t, via the
14435 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14436 * ipa.c (walk_polymorphic_call_targets): Likewise.
14437 * loop-unroll.c (report_unroll): Convert "locus" param from
14438 location_t to dump_location_t.
14439 (decide_unrolling): Update for change to get_loop_location's
14441 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14442 location_t to dump_user_location_t.
14443 (grid_find_single_omp_among_assignments_1): Updates calls to
14444 dump_printf_loc to pass in a dump_location_t rather than a
14445 location_t, via the gimple stmt.
14446 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14447 location_t to dump_location_t. Updates calls to dump_printf_loc
14448 to pass in a dump_location_t rather than a location_t, via the
14450 (grid_inner_loop_gridifiable_p): Likewise.
14451 (grid_dist_follows_simple_pattern): Likewise.
14452 (grid_gfor_follows_tiling_pattern): Likewise.
14453 (grid_target_follows_gridifiable_pattern): Likewise.
14454 (grid_attempt_target_gridification): Convert initialization
14455 of local "grid" from memset to zero-initialization; FIXME: does
14456 this require C++11? Update call to dump_printf_loc to pass in a
14457 optinfo_location rather than a location_t, via the gimple stmt.
14458 * profile.c (read_profile_edge_counts): Updates call to
14459 dump_printf_loc to pass in a dump_location_t rather than a
14461 (compute_branch_probabilities): Likewise.
14462 * selftest-run-tests.c (selftest::run_tests): Call
14464 * selftest.h (dumpfile_c_tests): New decl.
14465 * tree-loop-distribution.c (pass_loop_distribution::execute):
14466 Update for change in return type of find_loop_location.
14467 * tree-parloops.c (parallelize_loops): Likewise.
14468 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14469 "locus" from location_t to dump_user_location_t.
14470 (canonicalize_loop_induction_variables): Likewise.
14471 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14472 for change in return type of find_loop_location.
14473 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14474 to dump_printf_loc to pass in a dump_location_t rather than a
14475 location_t, via the stmt.
14476 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14478 * tree-vect-loop-manip.c (find_loop_location): Convert return
14479 type from source_location to dump_user_location_t.
14480 (vect_do_peeling): Update for above change.
14481 (vect_loop_versioning): Update for change in type of
14483 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14484 from location_t to dump_user_location_t.
14485 (vect_estimate_min_profitable_iters): Update for change in type
14487 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14488 location_t to dump_location_t.
14489 (vect_slp_bb): Update for change in type of vect_location.
14490 * tree-vectorizer.c (vect_location): Convert from source_location
14491 to dump_user_location_t.
14492 (try_vectorize_loop_1): Update for change in vect_location's type.
14493 (vectorize_loops): Likewise.
14494 (increase_alignment): Likewise.
14495 * tree-vectorizer.h (vect_location): Convert from source_location
14496 to dump_user_location_t.
14497 (find_loop_location): Convert return type from source_location to
14498 dump_user_location_t.
14499 (check_reduction_path): Convert 1st param from location_t to
14500 dump_user_location_t.
14501 * value-prof.c (check_counter): Update call to dump_printf_loc to
14502 pass in a dump_user_location_t rather than a location_t; update
14503 call to error_at for change in type of "locus".
14504 (check_ic_target): Update call to dump_printf_loc to
14505 pass in a dump_user_location_t rather than a location_t, via the
14508 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14510 * config/s390/s390.h (enum processor_flags): Do not use
14511 default tune parameter when -march was specified.
14513 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14516 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14517 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14520 2018-06-26 Richard Biener <rguenther@suse.de>
14522 PR tree-optimization/86287
14524 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14525 (vect_analyze_loop): Initialize n_stmts.
14527 2018-06-26 Richard Biener <rguenther@suse.de>
14529 PR middle-end/86271
14530 * fold-const.c (fold_convertible_p): Pointer extension
14533 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14536 * dwarf2out.c (loc_list_has_views): Adjust comments.
14537 (dw_loc_list): Split single cross-partition range with
14540 2018-06-25 Jeff Law <law@redhat.com>
14542 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14543 on -mbig-switch by default.
14545 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14547 (const_float_0_operand): Remove unused predicate.
14548 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14549 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14550 (recipsf2): New expander. Original pattern now called
14552 (recipdf2, recipdf2_insn): Similarly.
14553 (rsqrtsf2, rsqrtsf2_insn): Similarly
14554 (rsqrtdf2, rsqrtdf2_insn): Similarly
14556 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14558 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14559 Simplify logic for FreeBSD (twice).
14561 2018-06-25 Martin Sebor <msebor@redhat.com>
14563 PR tree-optimization/86204
14564 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14565 a strnlen result if it's less than the length of the string.
14567 2018-06-25 Martin Sebor <msebor@redhat.com>
14569 PR tree-optimization/85700
14570 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14571 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14572 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14574 2018-06-25 Martin Sebor <msebor@redhat.com>
14576 * doc/extend.texi (Zero-length arrays): Update and clarify.
14578 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14580 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14581 added IEEE/IBM long double multilib support on PowerPC little
14582 endian Linux systems.
14583 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14584 (MULTILIB_DEFAULTS): Likewise.
14585 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14587 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14588 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14589 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14591 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14593 PR middle-end/86311
14594 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14595 (REORDER_45): Likewise.
14597 2018-06-25 Jeff Law <law@redhat.com>
14599 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14600 dividend to 32 bits. Adjust length.
14601 (udivmodhi4): Cleanup output template. Fix length.
14603 2018-06-25 Carl Love <cel@us.ibm.com>
14605 * config/rs6000/vsx.md: Change word selector to prefered location.
14607 2018-06-25 Richard Biener <rguenther@suse.de>
14609 PR tree-optimization/86304
14610 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14611 epilogue-if-converted loops as well.
14613 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14615 * lto-section-out.c (lto_begin_section): Do not print section
14616 name for noaddr and unnumbered dumps.
14618 2018-06-25 Richard Biener <rguenther@suse.de>
14620 * tree-vectorizer.h (struct vec_info_shared): New structure
14621 with parts split out from struct vec_info and loop_nest from
14622 struct _loop_vec_info.
14623 (struct vec_info): Adjust accordingly.
14624 (struct _loop_vec_info): Likewise.
14625 (LOOP_VINFO_LOOP_NEST): Adjust.
14626 (LOOP_VINFO_DATAREFS): Likewise.
14627 (LOOP_VINFO_DDRS): Likewise.
14628 (struct _bb_vec_info): Likewise.
14629 (BB_VINFO_DATAREFS): Likewise.
14630 (BB_VINFO_DDRS): Likewise.
14631 (struct _stmt_vec_info): Add dr_aux member.
14632 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14633 (DR_MISALIGNMENT_UNINITIALIZED): New.
14634 (set_dr_misalignment): Adjust.
14635 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14636 (vect_analyze_loop): Adjust prototype.
14637 (vect_analyze_loop_form): Likewise.
14638 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14639 Compute dependences lazily.
14640 (vect_record_base_alignments): Use shared datarefs/ddrs.
14641 (vect_verify_datarefs_alignment): Likewise.
14642 (vect_analyze_data_refs_alignment): Likewise.
14643 (vect_analyze_data_ref_accesses): Likewise.
14644 (vect_analyze_data_refs): Likewise.
14645 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14646 constructor parameter for shared part.
14647 (vect_analyze_loop_form): Pass in shared part and adjust.
14648 (vect_analyze_loop_2): Pass in storage for the number of
14649 stmts. Move loop nest finding to the caller. Compute
14651 (vect_analyze_loop): Pass in shared part.
14652 (vect_transform_loop): Verify shared datarefs are unchanged.
14653 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14654 constructor parameter for shared part.
14655 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14656 (vect_slp_bb): Verify shared datarefs are unchanged before
14658 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14660 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14661 DR_MISALIGNMENT_UNINITIALIZED.
14662 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14663 parameter for shared part.
14664 (vec_info::~vec_info): Adjust.
14665 (vec_info_shared::vec_info_shared): New.
14666 (vec_info_shared::~vec_info_shared): Likewise.
14667 (vec_info_shared::save_datarefs): Likewise.
14668 (vec_info_shared::check_datarefs): Likewise.
14669 (try_vectorize_loop_1): Construct shared part live for analyses
14670 of a single loop for multiple vector sizes.
14671 * tree-parloops.c (gather_scalar_reductions): Adjust.
14673 2018-06-25 Richard Biener <rguenther@suse.de>
14675 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14676 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14677 (vect_analyze_data_refs): Remove similar code from here and
14678 simplify accordingly.
14680 2018-06-25 Richard Biener <rguenther@suse.de>
14682 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14683 for reverse storage order accesses rather than asserting
14684 they cannot happen here.
14686 2018-06-25 Tom de Vries <tdevries@suse.de>
14689 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14690 Use data16 instead of .byte for insn prefix.
14692 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14695 * parser.c (make_char_string_pack): Pass this literal chars
14696 through cpp_interpret_string.
14697 (cp_parser_userdef_numeric_literal): Check the result of
14698 make_char_string_pack.
14700 2018-06-24 Maya Rashish <coypu@sdf.org>
14702 * ginclude/stddef.h: Simplify conditions around avoiding
14703 re-definition of __size_t.
14705 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14707 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14708 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14710 2018-06-22 Maya Rashish <coypu@sdf.org>
14712 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14713 made to OpenBSD and NetBSD through the years.
14715 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14717 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14718 behavior of vec_pack (vector double, vector double) to match
14719 behavior of vec_float2 (vector double, vector double).
14721 2018-06-22 Olivier Hainque <hainque@adacore.com>
14723 * gimplify.c (gimplify_function_tree): Prevent creation
14724 of a trampoline for the address of the current function
14725 passed to entry/exit instrumentation hooks.
14727 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14730 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14733 2018-06-22 Martin Liska <mliska@suse.cz>
14735 PR tree-optimization/86263
14736 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14737 Bail out if is_enabled is false.
14738 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14740 (jump_table_cluster::is_enabled): New function.
14742 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14744 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14745 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14746 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14747 (lto_input_ts_binfo_tree_pointers): Likewise.
14748 * tree-streamer-out.c (streamer_write_tree_bitfields,
14749 write_ts_binfo_tree_pointers): Likewise.
14750 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14752 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14754 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14756 2018-06-22 Martin Liska <mliska@suse.cz>
14758 * symbol-summary.h (get): Make it pure and inline move
14759 functionality from ::get function.
14760 (get): Remove and inline into ::get and ::get_create.
14761 (get_create): Move code from ::get function.
14763 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14766 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14767 -x assembler-with-cpp.
14769 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14771 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14772 _FILE_OFFSET_BITS=64 for C++.
14774 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
14776 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14777 conversion insn that shows up when pr85657-3.c is compiled using
14778 IEEE 128-bit long double.
14779 (neg<mode>2_internal): Use the correct mode to check whether the
14780 mode is IBM extended.
14781 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14782 multiply and divide external functions from being created more
14785 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14787 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14789 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
14790 the edge can be forwarded.
14791 (cfg_layout_merge_blocks): Likewise.
14793 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14795 * except.c (finish_eh_generation): Commit edge insertions only after
14796 the EH edges have been redirected from post-landing to landing pads.
14798 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14800 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14801 create_tmp_var_for to create the FRAME decl.
14802 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14804 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14806 * tree-inline.c (copy_edges_for_bb): Minor tweak.
14807 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14808 debug statement when resetting its value.
14809 (expand_call_inline): Copy the locus of the call onto the assignment
14810 of the return value, if any. Use local variable in more cases.
14812 2018-06-21 Martin Liska <mliska@suse.cz>
14814 * ipa-pure-const.c (propagate_nothrow): Use
14815 funct_state_summaries->get.
14816 (dump_malloc_lattice): Likewise.
14817 (propagate_malloc): Likewise.
14819 2018-06-21 Richard Biener <rguenther@suse.de>
14821 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14822 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14823 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14825 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14826 BLOCK_ABSTRACT_ORIGIN unconditionally.
14828 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14830 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14832 * ipa-reference.c (ipa_reference_c_finalize): Delete
14833 ipa_ref_opt_sum_summaries and set it to NULL.
14835 2018-06-21 Tom de Vries <tdevries@suse.de>
14837 PR tree-optimization/85859
14838 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14839 test with comment from bb_no_side_effects_p.
14841 2018-06-21 Richard Biener <rguenther@suse.de>
14843 PR tree-optimization/86232
14844 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14845 max for constant niter.
14847 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14849 * config/aarch64/aarch64-simd.md
14850 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14852 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14854 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14855 Make opernads of the unspec commutative.
14857 2018-06-21 Richard Biener <rguenther@suse.de>
14859 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14860 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14861 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14862 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14864 (vect_record_base_alignments): Do not record base alignment
14865 for gathers or scatters.
14866 (vect_compute_data_ref_alignment): Drop return value that is always
14867 true. Bail out early for gathers or scatters.
14868 (vect_enhance_data_refs_alignment): Bail out early for gathers
14870 (vect_find_same_alignment_drs): Likewise.
14871 (vect_analyze_data_refs_alignment): Remove dead code.
14872 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14873 (vect_analyze_data_refs): For possible gathers or scatters do
14874 not create an alternate DR, just check their possible validity
14875 and mark them. Adjust DECL_NONALIASED handling to not rely
14876 on DR_BASE_ADDRESS.
14877 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14878 update inits of gathers or scatters.
14879 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14880 Also copy gather/scatter flag to pattern vinfo.
14882 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
14884 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14885 behavior of vec_packsu (vector unsigned long long, vector unsigned
14886 long long) to match behavior of vec_packs with same signature.
14888 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
14889 Thomas Schwinge <thomas@codesourcery.com>
14890 Cesar Philippidis <cesar@codesourcery.com>
14892 * gimplify.c (gimplify_scan_omp_clauses): Add support for
14893 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14894 (gimplify_adjust_omp_clauses): Likewise.
14895 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14896 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14897 (gimplify_omp_target_update): Update handling of acc update and
14899 * omp-low.c (install_var_field): Remove unused parameter
14900 base_pointers_restrict.
14901 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14902 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14904 (omp_target_base_pointers_restrict_p): Delete.
14905 (scan_omp_target): Update call to scan_sharing_clauses.
14906 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14908 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14909 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14910 (convert_local_omp_clauses): Likewise.
14911 * tree-pretty-print.c (dump_omp_clause): Likewise.
14912 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
14914 (omp_clause_code_name): Likewise.
14916 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14919 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14922 PR tree-optimization/86231
14923 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
14924 anti-range don't overwrite *vr0min before using it to compute *vr0max.
14926 2018-06-20 Tom de Vries <tdevries@suse.de>
14928 PR tree-optimization/86097
14929 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14930 iv type if signedness of iv type is not the same as that of *nit.
14932 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14934 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
14935 EDGE_EH edges, verify they are all EDGE_EH.
14937 2018-06-20 Maya Rashish <coypu@sdf.org>
14939 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14941 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14943 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14944 * config/aarch64/aarch64.c (xgene1_tunings): Add
14945 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14946 (aarch64_mode_valid_for_sched_fusion_p):
14947 Allow 16-byte modes.
14948 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14949 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14951 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14953 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14954 * config/aarch64/iterators.md (VQ2): New mode iterator.
14956 2018-06-20 Martin Liska <mliska@suse.cz>
14958 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14959 Change default ratio from 10 to 8.
14961 2018-06-20 Martin Liska <mliska@suse.cz>
14963 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14965 (bit_test_cluster::find_bit_tests): Likewise.
14966 (switch_decision_tree::analyze_switch_statement): Find clusters.
14967 * tree-switch-conversion.h (struct jump_table_cluster): Document
14970 2018-06-20 Martin Liska <mliska@suse.cz>
14972 * tree-switch-conversion.c (switch_conversion::collect):
14973 Record m_uniq property.
14974 (switch_conversion::expand): Bail out for special conditions.
14975 (group_cluster::~group_cluster): New.
14976 (group_cluster::group_cluster): Likewise.
14977 (group_cluster::dump): Likewise.
14978 (jump_table_cluster::emit): New.
14979 (switch_decision_tree::fix_phi_operands_for_edges): New.
14980 (struct case_node): Remove struct.
14981 (jump_table_cluster::can_be_handled): New.
14982 (case_values_threshold): Moved to header.
14983 (reset_out_edges_aux): Likewise.
14984 (jump_table_cluster::is_beneficial): New.
14985 (bit_test_cluster::can_be_handled): Likewise.
14986 (add_case_node): Remove.
14987 (bit_test_cluster::is_beneficial): New.
14988 (case_bit_test::cmp): New.
14989 (bit_test_cluster::emit): New.
14990 (expand_switch_as_decision_tree_p): Remove.
14991 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14992 (fix_phi_operands_for_edge): Likewise.
14993 (switch_decision_tree::analyze_switch_statement): New.
14994 (compute_cases_per_edge): Move ...
14995 (switch_decision_tree::compute_cases_per_edge): ... here.
14996 (try_switch_expansion): Likewise.
14997 (switch_decision_tree::try_switch_expansion): Likewise.
14998 (record_phi_operand_mapping): Likewise.
14999 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15000 (emit_case_decision_tree): Likewise.
15001 (switch_decision_tree::emit): Likewise.
15002 (balance_case_nodes): Likewise.
15003 (switch_decision_tree::balance_case_nodes): Likewise.
15004 (dump_case_nodes): Likewise.
15005 (switch_decision_tree::dump_case_nodes): Likewise.
15006 (emit_jump): Likewise.
15007 (switch_decision_tree::emit_jump): Likewise.
15008 (emit_cmp_and_jump_insns): Likewise.
15009 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15010 (emit_case_nodes): Likewise.
15011 (switch_decision_tree::emit_case_nodes): Likewise.
15012 (conditional_probability): Remove.
15013 * tree-switch-conversion.h (enum cluster_type): New.
15015 (struct cluster): Likewise.
15016 (cluster::cluster): Likewise.
15017 (struct simple_cluster): Likewise.
15018 (simple_cluster::simple_cluster): Likewise.
15019 (struct group_cluster): Likewise.
15020 (struct jump_table_cluster): Likewise.
15021 (struct bit_test_cluster): Likewise.
15022 (struct min_cluster_item): Likewise.
15023 (struct case_tree_node): Likewise.
15024 (case_tree_node::case_tree_node): Likewise.
15025 (jump_table_cluster::case_values_threshold): Likewise.
15026 (struct case_bit_test): Likewise.
15027 (struct switch_decision_tree): Likewise.
15028 (struct switch_conversion): Likewise.
15029 (switch_decision_tree::reset_out_edges_aux): Likewise.
15031 2018-06-20 Martin Liska <mliska@suse.cz>
15033 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15034 (hoist_edge_and_branch_if_true): Likewise.
15035 (expand_switch_using_bit_tests_p): Likewise.
15036 (struct case_bit_test): Likewise.
15037 (case_bit_test_cmp): Likewise.
15038 (emit_case_bit_tests): Likewise.
15039 (switch_conversion::switch_conversion): New class.
15040 (struct switch_conv_info): Remove old struct.
15041 (collect_switch_conv_info): More to ...
15042 (switch_conversion::collect): ... this.
15043 (check_range): Likewise.
15044 (switch_conversion::check_range): Likewise.
15045 (check_all_empty_except_final): Likewise.
15046 (switch_conversion::check_all_empty_except_final): Likewise.
15047 (check_final_bb): Likewise.
15048 (switch_conversion::check_final_bb): Likewise.
15049 (create_temp_arrays): Likewise.
15050 (switch_conversion::create_temp_arrays): Likewise.
15051 (free_temp_arrays): Likewise.
15052 (gather_default_values): Likewise.
15053 (switch_conversion::gather_default_values): Likewise.
15054 (build_constructors): Likewise.
15055 (switch_conversion::build_constructors): Likewise.
15056 (constructor_contains_same_values_p): Likewise.
15057 (switch_conversion::contains_same_values_p): Likewise.
15058 (array_value_type): Likewise.
15059 (switch_conversion::array_value_type): Likewise.
15060 (build_one_array): Likewise.
15061 (switch_conversion::build_one_array): Likewise.
15062 (build_arrays): Likewise.
15063 (switch_conversion::build_arrays): Likewise.
15064 (gen_def_assigns): Likewise.
15065 (switch_conversion::gen_def_assigns): Likewise.
15066 (prune_bbs): Likewise.
15067 (switch_conversion::prune_bbs): Likewise.
15068 (fix_phi_nodes): Likewise.
15069 (switch_conversion::fix_phi_nodes): Likewise.
15070 (gen_inbound_check): Likewise.
15071 (switch_conversion::gen_inbound_check): Likewise.
15072 (process_switch): Use the newly created class.
15073 (switch_conversion::expand): New.
15074 (switch_conversion::~switch_conversion): New.
15075 * tree-switch-conversion.h: New file.
15077 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15079 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15080 tree-vect-patterns.c.
15081 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15082 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15083 (vect_recog_sad_pattern): Likewise.
15084 (vect_recog_widen_sum_pattern): Likewise.
15085 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15086 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15087 (vect_recog_rotate_pattern): Likewise.
15088 (vect_recog_mult_pattern): Likewise.
15089 (vect_recog_vector_vector_shift_pattern): Likewise.
15090 (vect_recog_divmod_pattern): Likewise.
15091 (vect_recog_mixed_size_cond_pattern): Likewise.
15092 (vect_recog_bool_pattern): Likewise.
15093 (vect_recog_mask_conversion_pattern): Likewise.
15094 (vect_try_gather_scatter_pattern): Likewise.
15095 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15096 (vect_recog_over_widening_pattern): Likewise.
15097 (vect_recog_gather_scatter_pattern): Likewise.
15098 (vect_recog_func_ptr): Move from tree-vectorizer.h
15099 (vect_vect_recog_func_ptrs): Move further down the file.
15100 (vect_recog_func): Likewise. Remove the third argument.
15101 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15102 (vect_pattern_recog_1): Expect the pattern function to do any
15103 necessary target tests. Also expect it to provide a vector type.
15104 Remove the type_in handling.
15106 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15108 * tree-vect-patterns.c (vect_pattern_detected): New function.
15109 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15110 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15111 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15112 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15113 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15114 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15115 (vect_recog_mask_conversion_pattern)
15116 (vect_try_gather_scatter_pattern): Likewise.
15118 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15120 * tree-vect-patterns.c (vect_get_internal_def): New function.
15121 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15122 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15123 (search_type_for_mask_1): Use it.
15125 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15127 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15128 redundant WIDEN_SUM_EXPR handling.
15129 (vect_recog_sad_pattern): Likewise.
15131 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15133 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15134 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15135 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15136 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15137 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15139 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15141 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15142 use the stmt_vec_info of the original bb statement for the
15143 new zero assignment, even if the call is part of a pattern.
15145 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15147 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15148 that the sequence is attached to the original statement rather
15149 than the pattern statement.
15150 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15151 PATTERN_DEF_SEQ from the original statement rather than
15152 the main pattern statement.
15153 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15154 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15155 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15157 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15159 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15160 definition statements before the early exit for statements that aren't
15162 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15164 (vect_transform_loop): ...here. Process pattern definition
15165 statements without first checking whether the main pattern
15166 statement is live or relevant.
15168 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15170 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15171 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15173 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15175 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15176 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15177 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15178 (expand_block_compare): Change select_block_compare_mode call.
15179 (expand_strncmp_align_check): Use new functions, fix comment.
15180 (emit_final_str_compare_gpr): New function.
15181 (expand_strn_compare): Refactor and clean up code.
15182 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15184 2018-06-19 Tony Reix <tony.reix@atos.com>
15185 Damien Bergamini <damien.bergamini@atos.com>
15186 David Edelsohn <dje.gcc@gmail.com>
15188 * collect2.c (static_obj): New variable.
15189 (static_libs): New variable.
15190 (is_in_list): Uncomment declaration.
15191 (main): Track AIX libraries linked statically.
15192 (is_in_list): Uncomment definition.
15193 (scan_prog_file): Don't add AIX shared libraries initializer
15194 to constructor list if linking statically.
15196 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15198 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15200 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15202 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15204 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15207 2018-06-19 Martin Liska <mliska@suse.cz>
15209 * config/i386/i386.c (ix86_can_inline_p): Do not use
15210 ipa_fn_summaries::get_create.
15211 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15213 (devirtualization_time_bonus): Likewise.
15214 (ipcp_propagate_stage): Likewise.
15215 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15216 (edge_set_predicate): Likewise.
15217 (evaluate_conditions_for_known_args): Likewise.
15218 (evaluate_properties_for_edge): Likewise.
15219 (ipa_call_summary::reset): Tranform to ...
15220 (ipa_call_summary::~ipa_call_summary): ... this.
15221 (ipa_fn_summary::reset): Transform to ...
15222 (ipa_fn_summary::~ipa_fn_summary): ... this.
15223 (ipa_fn_summary_t::remove): Rename to ...
15224 (ipa_fn_summary_t::remove_callees): ... this.
15225 (ipa_fn_summary_t::duplicate): Use placement new
15226 instead of memory copy.
15227 (ipa_call_summary_t::duplicate): Likewise.
15228 (ipa_call_summary_t::remove): Remove.
15229 (dump_ipa_call_summary): Change get_create to get.
15230 (ipa_dump_fn_summary): Dump only when summary exists.
15231 (analyze_function_body): Use symbol_summary::get instead
15233 (compute_fn_summary): Likewise.
15234 (estimate_edge_devirt_benefit): Likewise.
15235 (estimate_edge_size_and_time): Likewise.
15236 (inline_update_callee_summaries): Likewise.
15237 (remap_edge_change_prob): Likewise.
15238 (remap_edge_summaries): Likewise.
15239 (ipa_merge_fn_summary_after_inlining): Likewise.
15240 (write_ipa_call_summary): Likewise.
15241 (ipa_fn_summary_write): Likewise.
15242 (ipa_free_fn_summary): Likewise.
15243 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15244 (struct ipa_call_summary): Likewise.
15245 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15247 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15248 (estimate_size_after_inlining): Likewise.
15249 (estimate_growth): Likewise.
15250 (growth_likely_positive): Likewise.
15251 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15252 (inline_call): Likewise.
15253 * ipa-inline.c (caller_growth_limits): Likewise.
15254 (can_inline_edge_p): Likewise.
15255 (can_inline_edge_by_limits_p): Likewise.
15256 (compute_uninlined_call_time): Likewise.
15257 (compute_inlined_call_time): Likewise.
15258 (want_inline_small_function_p): Likewise.
15259 (edge_badness): Likewise.
15260 (update_caller_keys): Likewise.
15261 (update_callee_keys): Likewise.
15262 (inline_small_functions): Likewise.
15263 (inline_to_all_callers_1): Likewise.
15264 (dump_overall_stats): Likewise.
15265 (early_inline_small_functions): Likewise.
15266 (early_inliner): Likewise.
15267 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15268 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15269 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15270 * ipa-split.c (execute_split_functions): Likewise.
15271 * symbol-summary.h: Likewise.
15272 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15274 2018-06-19 Richard Biener <rguenther@suse.de>
15276 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15277 (vectorize_loops): ... here. Fix dbgcnt handling.
15278 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15280 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15283 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15284 ieee128 argument takes up only one (vector) register, not two (floating
15287 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15289 * gimplify.c (gimplify_init_constructor): Really never clear for an
15290 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15292 2018-06-19 Richard Biener <rguenther@suse.de>
15294 PR tree-optimization/86179
15295 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15296 after failed recognition.
15298 2018-06-18 Martin Sebor <msebor@redhat.com>
15300 PR middle-end/85602
15301 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15302 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15303 Handle integer subtraction.
15304 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15305 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15307 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15309 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15310 param from rtx to rtx_insn *.
15311 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15313 (frv_ifcvt_modify_insn): Likwise.
15314 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15315 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15316 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15317 as_a <rtx_insn *> cast to local "unprotected_region" once
15318 it's been established that it's not NULL or pc_rtx.
15319 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15320 param "sethi" from rtx to rtx_insn *.
15321 (nds32_group_float_insns): Likewise for param "insn".
15322 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15324 (vax_output_int_subtract): Likewise.
15325 * config/vax/vax.c (vax_output_int_add): Likewise for param
15327 (vax_output_int_subtract): Likewise.
15328 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15329 (emit_pattern_after): Likewise for param "after".
15330 (emit_insn_after): Likewise.
15331 (emit_jump_insn_after): Likewise.
15332 (emit_call_insn_after): Likewise.
15333 (emit_debug_insn_after): Likewise.
15334 (emit_pattern_before): Likewise for param "before".
15335 (emit_insn_before): Likewise.
15336 (emit_jump_insn_before): Likewise.
15337 * final.c (get_insn_template): Likewise for param "insn", removing
15339 * output.h (get_insn_template): Likewise for 2nd param.
15340 * rtl.h (emit_insn_before): Likewise.
15341 (emit_jump_insn_before): Likewise.
15342 (emit_debug_insn_before_noloc): Likewise.
15343 (emit_insn_after): Likewise.
15344 (emit_jump_insn_after): Likewise.
15345 (emit_call_insn_after): Likewise.
15346 (emit_debug_insn_after): Likewise.
15347 (set_insn_deleted): Likewise for param.
15349 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15352 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15353 floating point modes, so that IFmode is numerically greater than
15354 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15355 to declare the ordering. This prevents IFmode from being
15356 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15357 machine. Include rs6000-modes.h to share the fractional values
15358 between genmodes* and the rest of the compiler.
15359 (IFmode): Likewise.
15360 (KFmode): Likewise.
15361 (TFmode): Likewise.
15362 * config/rs6000/rs6000-modes.h: New file.
15363 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15364 meaning of rs6000_long_double_size so that 126..128 selects an
15365 appropriate 128-bit floating point type.
15366 (rs6000_option_override_internal): Likewise.
15367 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15368 (TARGET_LONG_DOUBLE_128): Change the meaning of
15369 rs6000_long_double_size so that 126..128 selects an appropriate
15370 128-bit floating point type.
15371 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15372 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15373 source and destination to match the standard usage.
15374 (truncifkf2): Likewise.
15375 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15376 ISA 2.07 to use an explicit clobber, instead of passing in a
15378 (copysign<mode>3_soft): Likewise.
15380 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15382 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15383 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15384 (vect_slp_analyze_instance_dependence): Likewise.
15385 (vect_enhance_data_refs_alignment): Likewise.
15386 (vect_analyze_data_refs_alignment): Likewise.
15387 (vect_slp_analyze_and_verify_instance_alignment
15388 (vect_analyze_data_ref_accesses): Likewise.
15389 (vect_prune_runtime_alias_test_list): Likewise.
15390 (vect_analyze_data_refs): Likewise.
15391 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15392 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15393 (vect_analyze_scalar_cycles_1): Likewise.
15394 (vect_get_loop_niters): Likewise.
15395 (vect_analyze_loop_form_1): Likewise.
15396 (vect_update_vf_for_slp): Likewise.
15397 (vect_analyze_loop_operations): Likewise.
15398 (vect_analyze_loop): Likewise.
15399 (vectorizable_induction): Likewise.
15400 (vect_transform_loop): Likewise.
15401 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15402 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15403 (vect_make_slp_decision): Likewise.
15404 (vect_detect_hybrid_slp): Likewise.
15405 (vect_slp_analyze_operations): Likewise.
15406 (vect_slp_bb): Likewise.
15407 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15408 (vectorizable_bswap): Likewise.
15409 (vectorizable_call): Likewise.
15410 (vectorizable_simd_clone_call): Likewise.
15411 (vectorizable_conversion): Likewise.
15412 (vectorizable_assignment): Likewise.
15413 (vectorizable_shift): Likewise.
15414 (vectorizable_operation): Likewise.
15415 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15417 2018-06-18 Martin Sebor <msebor@redhat.com>
15419 PR tree-optimization/81384
15420 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15421 * builtins.c (expand_builtin_strnlen): New function.
15422 (expand_builtin): Call it.
15423 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15424 * builtins.def (BUILT_IN_STRNLEN): New.
15425 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15426 Warn for bounds in excess of maximum object size.
15427 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15428 single-value ranges. Handle strnlen.
15429 (handle_builtin_strlen): Handle strnlen.
15430 (strlen_check_and_optimize_stmt): Same.
15431 * doc/extend.texi (Other Builtins): Document strnlen.
15433 2018-06-18 Maya Rashish <coypu@sdf.org>
15435 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15436 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15437 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15439 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15441 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15443 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15445 * tree.c (escaped_string::escape): Replace cast to char * by
15446 const_cast<char *> (unescaped).
15448 2018-06-18 Nick Clifton <nickc@redhat.com>
15451 * tree.c (escaped_string): New class. Converts an unescaped
15452 string into its escaped equivalent.
15453 (warn_deprecated_use): Use the new class to convert the
15454 deprecation message, if present.
15455 (test_escaped_strings): New self test.
15456 (test_c_tests): Add test_escaped_strings.
15457 * doc/extend.texi (deprecated): Add a note that the
15458 deprecation message is affected by the -fmessage-length
15459 option, and that control characters will be escaped.
15460 (#pragma GCC error): Document this pragma.
15461 (#pragma GCC warning): Likewise.
15462 * doc/invoke.texi (-fmessage-length): Document this option's
15463 effect on the #warning and #error preprocessor directives and
15464 the deprecated attribute.
15466 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15468 * tree.c (decl_value_expr_lookup): Revert latest change.
15469 (decl_value_expr_insert): Likewise.
15471 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15473 * gimplify.c (nonlocal_vlas): Delete.
15474 (nonlocal_vla_vars): Likewise.
15475 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15477 (gimplify_body): Do not create and destroy nonlocal_vlas.
15478 * tree-nested.c: Include diagnostic.h.
15479 (use_pointer_in_frame): Tweak.
15480 (lookup_field_for_decl): Add assertion and declare the transformation.
15481 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15482 internal error when the reference is in a wrong context. Do not
15483 create a debug decl by default.
15484 (note_nonlocal_block_vlas): Delete.
15485 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15486 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15487 create a debug decl by default.
15488 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15489 call is in a wrong context.
15490 (fixup_vla_decls): New function.
15491 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15492 debug variables were created.
15493 * tree.c (decl_value_expr_lookup): Add checking assertion.
15494 (decl_value_expr_insert): Likewise.
15496 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15498 PR middle-end/82479
15499 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15500 * tree-scalar-evolution.c (interpret_expr): Likewise.
15501 (expression_expensive_p): Likewise.
15502 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15503 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15504 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15505 (ssa_defined_by_minus_one_stmt_p): New.
15507 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15509 PR middle-end/64946
15510 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15511 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15512 * dojump.c (do_jump): Likewise.
15513 * expr.c (expand_expr_real_2): Check operand type's sign.
15514 * fold-const.c (const_unop): Handle ABSU_EXPR.
15515 (fold_abs_const): Likewise.
15516 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15517 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15518 (strip_sign_op_1): Likesise.
15519 * match.pd: Add new pattern to generate ABSU_EXPR.
15520 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15521 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15522 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15523 * tree-inline.c (estimate_operator_cost): Likewise.
15524 * tree-pretty-print.c (dump_generic_node): Likewise.
15525 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15526 * tree.def (ABSU_EXPR): New.
15528 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15530 PR middle-end/86095
15531 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15532 documented as preserved for backward compatibility only.
15533 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15535 PR rtl-optimization/86108
15536 * bb-reorder.c (create_forwarder_block): Renamed to ...
15537 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15538 jump from new landing pad to the second part.
15539 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15542 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15544 PR middle-end/85878
15545 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15546 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15547 Only call store_expr for halves if the mode is the same.
15549 PR middle-end/86123
15550 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15551 Fix up comment formatting.
15553 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15555 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15556 (typed_splay_tree::closure,
15557 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15558 (typed_splay_tree::typed_splay_tree,
15559 typed_splay_tree::operator =): Declared private.
15560 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15561 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15562 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15563 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15564 typed_splay_tree::splay_tree_splay,
15565 typed_splay_tree::splay_tree_foreach_helper,
15566 typed_splay_tree::splay_tree_insert,
15567 typed_splay_tree::splay_tree_remove,
15568 typed_splay_tree::splay_tree_lookup,
15569 typed_splay_tree::splay_tree_predecessor,
15570 typed_splay_tree::splay_tree_successor,
15571 typed_splay_tree::splay_tree_min,
15572 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15573 (typed_splay_tree::root, typed_splay_tree::comp,
15574 typed_splay_tree::delete_key,
15575 typed_splay_tree::delete_value): New data members.
15576 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15577 typed_splay_tree::remove.
15579 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15581 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15582 -mginv and -mno-ginv to the assembler.
15583 * config/mips/mips.opt (-mcrc): New option.
15584 (-mginv): Likewise.
15585 * doc/invoke.text (-mcrc): Document.
15586 (-mginv): Likewise.
15588 2018-06-15 Nick Clifton <nickc@redhat.com>
15591 * tree.c (escaped_string): New class. Converts an unescaped
15592 string into its escaped equivalent.
15593 (warn_deprecated_use): Use the new class to convert the
15594 deprecation message, if present.
15595 (test_escaped_strings): New self test.
15596 (test_c_tests): Add test_escaped_strings.
15597 * doc/extend.texi (deprecated): Add a note that the
15598 deprecation message is affected by the -fmessage-length
15599 option, and that control characters will be escaped.
15600 (#pragma GCC error): Document this pragma.
15601 (#pragma GCC warning): Likewise.
15602 * doc/invoke.texi (-fmessage-length): Document this option's
15603 effect on the #warning and #error preprocessor directives and
15604 the deprecated attribute.
15606 2018-06-15 Richard Biener <rguenther@suse.de>
15608 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15609 here, also noting vector size used.
15610 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15611 size used in MSG_OPTIMIZED_LOCATIONS dump.
15612 (pass_slp_vectorize::execute): Adjust.
15614 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15617 * config/arc/arc.c (arc_return_address_register): Fix
15620 2018-06-15 Richard Biener <rguenther@suse.de>
15622 PR middle-end/86159
15623 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15624 leave useless conversion stripping to force_gimple_operand_gsi.
15625 (gimplify_build2): Likewise.
15626 (gimplify_build1): Likewise.
15628 2018-06-15 Richard Biener <rguenther@suse.de>
15630 PR middle-end/86076
15631 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15632 before adjusting their block.
15634 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15636 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15637 multilibs for *-*-rtems*.
15638 * config/riscv/t-rtems: New file.
15640 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15642 PR middle-end/86122
15643 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15644 unsigned_type_for returns NULL.
15647 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15648 subregs of multi-word pseudos unless the float mode has word size.
15650 2018-06-14 Richard Biener <rguenther@suse.de>
15652 PR middle-end/86139
15653 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15654 duplicate and harmful type_hash_canon.
15655 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15657 2018-06-14 Richard Biener <rguenther@suse.de>
15660 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15663 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15665 * config/rtems.h (STDINT_LONG32): Define.
15667 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15668 Prachi Godbole <prachi.godbole@imgtec.com>
15670 * config/mips/mips-cpus.def: Define P6600.
15671 * config/mips/mips-tables.opt: Regenerate.
15672 * config/mips/mips.c (mips_ucbranch_type): New enum.
15673 (mips_rtx_cost_data): Add support for P6600.
15674 (mips_issue_rate): Likewise.
15675 (mips_multipass_dfa_lookahead): Likewise.
15676 (mips_avoid_hazard): Likewise.
15677 (mips_reorg_process_insns): Likewise.
15678 (mips_classify_branch_p6600): New function.
15679 * config/mips/mips.h (TUNE_P6600): New define.
15680 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15681 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15682 * config/mips/mips.md: Include p6600.md.
15683 (processor): Add p6600.
15684 * config/mips/p6600.md: New file.
15685 * doc/invoke.texi: Add p6600 to supported architectures.
15687 2018-06-13 Martin Sebor <msebor@redhat.com>
15689 PR tree-optimization/86114
15690 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15692 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15694 2018-06-13 Richard Biener <rguenther@suse.de>
15696 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15697 Properly set vector type of the intermediate stmt.
15698 * tree-vect-stmts.c (vectorizable_operation): The destination
15699 var always has vectype_out type.
15701 2018-06-13 Jeff Law <law@redhat.com>
15703 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15704 integer 0 for argument to print_rtl_with_bb.
15705 (rl78_reorg): Likewise.
15707 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15709 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15710 from rtx to rtx_insn *.
15711 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15713 (add_sched_insns_for_speculation): Likewise for local "target",
15714 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15715 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15716 from rtx_insn ** to rtx_code_label **.
15717 (reorg_emit_nops): Likewise.
15718 (c6x_reorg): Likewise for local "call_labels".
15719 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15721 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15722 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15723 the loops over LABEL_REFS.
15724 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15726 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15727 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15728 (split_branches): Strengthen local "olabel" from rtx to
15729 rtx_insn *, adding a safe_as_a cast.
15730 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15732 (add_insn_after): Likewise for first two params.
15733 (add_insn_before): Likewise.
15734 (remove_insn): Likewise for param.
15735 (emit_pattern_before_noloc): Likewise for second and third params.
15736 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15737 (emit_call_insn_before_noloc): Likewise.
15738 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15740 (emit_barrier_before): Likewise.
15741 (emit_label_before): Strengthen "label" param from "rtx" to
15742 "rtx_code_label *". Strengthen "before" param from "rtx" to
15744 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15746 (emit_pattern_after_noloc): Likewise.
15747 (emit_insn_after_noloc): Likewise.
15748 (emit_jump_insn_after_noloc): Likewise.
15749 (emit_call_insn_after_noloc): Likewise.
15750 (emit_debug_insn_after_noloc): Likewise.
15751 (emit_barrier_after): Likewise.
15752 (emit_label_after): Likewise for both params.
15753 (emit_pattern_after_setloc): Likewise for "after" param. Convert
15754 "loc" param from "int" to "location_t".
15755 (emit_insn_after_setloc): Likewise.
15756 (emit_jump_insn_after_setloc): Likewise.
15757 (emit_call_insn_after_setloc): Likewise.
15758 (emit_debug_insn_after_setloc): Likewise.
15759 (emit_pattern_before_setloc): Likewise for "before" param. Convert
15760 "loc" param from "int" to "location_t".
15761 (emit_pattern_before): Convert NULL_RTX to NULL.
15762 (emit_insn_before_setloc): Convert "loc" param from "int" to
15764 (emit_jump_insn_before_setloc): Likewise.
15765 (emit_call_insn_before_setloc): Likewise.
15766 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15767 rtx_insn *. Convert "loc" param from "int" to "location_t".
15768 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15769 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15770 Convert 3rd param from "int" to "location_t".
15771 (emit_barrier_before, emit_barrier_after, next_real_insn):
15772 Strengthen param from rtx to rtx_insn *.
15773 (emit_label_before): Strengthen 1st param from "rtx" to
15774 "rtx_code_label *". Strengthen 2nd param from "rtx" to
15776 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15777 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15778 Strengthen 2nd param from "rtx" to "rtx_insn *".
15779 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15780 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15781 Likewise. Convert 3rd param from "int" to "location_t".
15782 (emit_label_after): Strengthen 1st param from "rtx" to
15783 "rtx_code_label *".
15784 (next_real_insn, remove_insn): Strengthen param from "rtx" to
15786 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15787 from "rtx" to "rtx_insn *".
15789 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
15791 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15792 bodies streamed in with -Q.
15793 * dumpfile.c (dump_files): Add lto-stream-out dump file.
15794 * dumpfile.h (tree_dump_index): Add lto_stream_out.
15795 * gimple-streamer-out.c: Include gimple-pretty-print.h
15796 (output_bb): Dump stmts streamed.
15797 * lto-section-out.c: Include print-tree.h
15798 (lto_begin_section): Dump sections created.
15799 (lto_output_decl_index): Dump decl encoded.
15800 * lto-streamer-out.c: Include print-tree.h
15801 (create_output_block): Dump output block created.
15802 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15803 (output_function): Dump function output.
15804 (output_constructor): Dump constructor streamed.
15805 (write_global_stream): Output indexes encoded.
15806 (produce_asm_for_decls): Dump streams encoded.
15807 * lto-streamer.c (streamer_dump_file): New global var.
15808 * lto-streamer.h (streamer_dump_file): Declare.
15809 * passes.c (ipa_write_summaries): Initialize streamer dump.
15810 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15813 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
15816 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15817 offsets for register save directives. Emit a second batch of save
15818 directives, if need be, when the function accesses prior frames.
15820 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15822 * config/arc/fpu.md (fmasf4): Force operand to register.
15823 (fnmasf4): Likewise.
15825 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15827 * config/arc/arc-protos.h (arc_pad_return): Remove.
15828 * config/arc/arc.c (machine_function): Remove force_short_suffix
15830 (arc_print_operand): Adjust printing of '&'.
15831 (arc_verify_short): Remove conditional printing of short suffix.
15832 (arc_final_prescan_insn): Remove reference to size_reason.
15833 (pad_return): New function.
15834 (arc_reorg): Call pad_return.
15835 (arc_pad_return): Remove.
15836 (arc_init_machine_status): Remove reference to force_short_suffix.
15837 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15838 (attr length): When attribute iscompact is true force to 2
15839 regardless; in the case of maybe check if we want to force the
15840 instruction to have 4 bytes length.
15841 (nopv): Change it to generate 4 byte long nop as well.
15842 (blockage): New pattern.
15843 (simple_return): Remove call to arc_pad_return.
15844 (p_return_i): Likewise.
15846 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15848 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15850 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15852 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15855 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15857 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15858 for ARC700 and ARCv2.
15860 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15863 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15864 operands[2] instead of operands[1].
15867 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15869 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15870 case, check whether the outer register overlaps an unallocatable
15871 register, not just whether it fits the required class.
15873 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15875 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15877 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15878 (memrefs_conflict_p): Likewise.
15879 (init_alias_analysis): Likewise.
15880 * cfgexpand.c (expand_debug_expr): Likewise.
15881 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15882 * cse.c (fold_rtx): Likewise.
15883 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15884 * expr.c (emit_block_move_hints): Likewise.
15885 (clear_storage_hints, push_block, emit_push_insn): Likewise.
15886 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15887 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15888 (emit_group_store): Likewise.
15889 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
15890 to read the PRE/POST_MODIFY increment.
15891 * calls.c (store_one_arg): Use strip_offset.
15892 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15894 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15896 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15897 (simplify_binary_operation_1): Extend CONST_INT handling to
15899 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15900 than a HOST_WIDE_INT.
15901 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15903 (adjust_mems, add_stores): Update accodingly.
15904 (vt_canonicalize_addr): Track polynomial offsets.
15905 (emit_note_insn_var_location): Likewise.
15906 (vt_add_function_parameter): Likewise.
15907 (vt_initialize): Likewise.
15909 2018-06-12 Jeff Law <law@redhat.com>
15911 * config.gcc (alpha*-*-freebsd*): Remove.
15912 * config/alpha/freebsd.h: Remove.
15914 2018-06-12 David Malcolm <dmalcolm@redhat.com>
15917 * spellcheck-tree.c (levenshtein_distance): Rename to...
15918 (get_edit_distance): ...this, and update for underlying renaming.
15919 * spellcheck-tree.h (levenshtein_distance): Rename to...
15920 (get_edit_distance): ...this.
15921 * spellcheck.c (levenshtein_distance): Rename to...
15922 (get_edit_distance): ...this. Convert from Levenshtein distance
15923 to Damerau-Levenshtein distance by supporting transpositions of
15924 adjacent characters. Rename "v1" to "v_next" and "v0" to
15926 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15927 (selftest::test_edit_distance_unit_test_oneway): ...this, and
15928 update for underlying renaming.
15929 (selftest::levenshtein_distance_unit_test): Rename to...
15930 (selftest::test_get_edit_distance_unit): ...this, and update for
15931 underlying renaming.
15932 (selftest::test_find_closest_string): Add example from PR 69968
15933 where transposition helps
15934 (selftest::test_metric_conditions): Update for renaming.
15935 (selftest::test_metric_conditions): Likewise.
15936 (selftest::spellcheck_c_tests): Likewise.
15937 * spellcheck.h (levenshtein_distance): Rename both overloads to...
15938 (get_edit_distance): ...this.
15939 (best_match::consider): Update for renaming.
15941 2018-06-12 Martin Sebor <msebor@redhat.com>
15943 PR tree-optimization/85259
15944 * builtins.c (compute_objsize): Handle constant offsets.
15945 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15946 true iff a warning has been issued.
15947 * gimple.h (gimple_nonartificial_location): New function.
15948 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15949 gimple_nonartificial_location and handle -Wno-system-headers.
15950 (handle_builtin_stxncpy): Same.
15952 2018-06-12 Martin Sebor <msebor@redhat.com>
15955 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15957 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
15959 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15960 BUILTIN_VEC_XST entries for pointer to double and long long.
15962 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
15965 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15967 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15970 2018-06-12 Martin Liska <mliska@suse.cz>
15972 * doc/options.texi: Document IntegerRange.
15974 2018-06-12 Martin Liska <mliska@suse.cz>
15976 * config/i386/i386.opt: Make MPX-related options as Deprecated.
15977 * opt-functions.awk: Handle Deprecated flag.
15978 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15980 (read_cmdline_option): Report warning for a deprecated option.
15981 * opts.h (struct cl_option): Add new field cl_deprecated.
15982 (CL_ERR_DEPRECATED): New.
15984 2018-06-12 Martin Liska <mliska@suse.cz>
15986 * doc/options.texi: Document Deprecated option flag.
15988 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15990 * config/arc/arc-arch.h (arc_extras): New enum.
15991 (arc_cpu_t):Add field extra.
15992 (arc_cpu_types): Consider the extras.
15993 * config/arc/arc-cpus.def: Add extras info.
15994 * config/arc/arc-opts.h (processor_type): Consider extra field.
15995 * config/arc/arc.c (arc_override_options): Handle extra field.
15997 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15999 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16000 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16002 * config/arc/arc.c (arc_init): Update pic warning.
16003 (irq_range): Update irq range parsing warnings.
16004 (arc_override_options): Update various warning messages.
16005 (arc_handle_aux_attribute): Likewise.
16007 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16009 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16011 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16013 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16014 compiler messages directives.
16016 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16018 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16019 * config/mips/mips-tables.opt: Regenerate.
16020 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16022 * doc/invoke.texi: Document -march=i6500.
16024 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16026 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16027 (i6400_gpmul): Add cpu_unit.
16028 (i6400_gpdiv): Likewise.
16029 (i6400_msa_add_d): Update reservations.
16030 (i6400_msa_int_add) Likewise.
16031 (i6400_msa_short_logic3) Likewise.
16032 (i6400_msa_short_logic2) Likewise.
16033 (i6400_msa_short_logic) Likewise.
16034 (i6400_msa_move) Likewise.
16035 (i6400_msa_cmp) Likewise.
16036 (i6400_msa_short_float2) Likewise.
16037 (i6400_msa_div_d) Likewise.
16038 (i6400_msa_long_logic1) Likewise.
16039 (i6400_msa_long_logic2) Likewise.
16040 (i6400_msa_mult) Likewise.
16041 (i6400_msa_long_float2) Likewise.
16042 (i6400_msa_long_float4) Likewise.
16043 (i6400_msa_long_float5) Likewise.
16044 (i6400_msa_long_float8) Likewise.
16045 (i6400_fpu_fadd): Include frint type.
16046 (i6400_fpu_store): New define_insn_reservation.
16047 (i6400_fpu_load): Likewise.
16048 (i6400_fpu_move): Likewise.
16049 (i6400_fpu_fcmp): Likewise.
16050 (i6400_fpu_fmadd): Likewise.
16051 (i6400_int_mult): Include imul3nc type and update reservation.
16052 (i6400_int_div): Include idiv3 type and update reservation.
16053 (i6400_int_load): Update to check type not move_type.
16054 (i6400_int_store): Likewise.
16055 (i6400_int_prefetch): Set zero latency.
16057 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16059 * gcc.c: Document new %@{...} sequence.
16060 (LINK_COMMAND_SPEC): Use it for the -L switches.
16061 (cpp_unique_options): Use it for the -I switches.
16062 (at_file_argbuf): New global variable.
16063 (in_at_file): Likewise.
16064 (alloc_args): Create at_file_argbuf.
16065 (clear_args): Truncate at_file_argbuf.
16066 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16067 (open_at_file): New function.
16068 (close_at_file): Likewise.
16069 (create_at_file): Delete.
16070 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16073 (validate_switches_from_spec): Deal with %@{...} sequence.
16074 (validate_switches): Likewise.
16075 (driver::finalize): Call clear_args.
16077 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16079 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16081 2018-06-11 Martin Sebor <msebor@redhat.com>
16083 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16084 (Wno-class-memaccess): Add @opindex.
16085 (Wno-templates, Wno-multiple-inheritance): Same.
16086 (Wno-virtual-inheritance, Wno-namespaces): Same.
16087 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16088 (Wno-format-overflow, Wno-format-truncation): Same.
16089 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16090 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16091 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16092 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16093 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16094 (Wno-misspelled-isr): Same.
16096 2018-06-11 Martin Sebor <msebor@redhat.com>
16098 * PR tree-optimization/86083
16099 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16101 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16103 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16105 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16108 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16109 on the correct operand.
16110 (*movdi_internal64): Ditto.
16112 2018-06-11 Martin Liska <mliska@suse.cz>
16114 PR tree-optimization/86089
16115 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16117 2018-06-11 Julia Koval <julia.koval@intel.com>
16119 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16120 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16121 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16123 2018-06-11 Olivier Hainque <hainque@adacore.com>
16125 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16126 for Ada with strict dwarf2.
16128 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16131 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16134 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16136 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16138 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16140 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16143 2018-06-08 Martin Liska <mliska@suse.cz>
16145 * tree-cfg.h (debug_function): Fix argument type to match
16148 2018-06-08 Martin Liska <mliska@suse.cz>
16150 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16151 Remove usage of MPX-related (and removed) fields.
16152 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16154 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16156 * cfg.c (debug): Use TDF_NONE rather than 0.
16157 * cfghooks.c (debug): Likewise.
16158 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16159 (struct dump_option_value_info): Convert to...
16160 (struct kv_pair): ...this template type.
16161 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16163 (optinfo_verbosity_options): Likewise.
16164 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16166 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16167 than int for "optgroup_flags" param.
16168 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16170 (dump_dec): Likewise.
16171 (dump_finish): Use TDF_NONE rather than 0.
16172 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16173 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16174 than 0. Update for change to option_ptr.
16175 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16176 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16177 0. Update for changes to optinfo_verbosity_options and
16179 (opt_info_switch_p): Convert optgroup_flags from int to
16181 (dump_basic_block): Use dump_flags_t rather than int
16182 for "dump_kind" param.
16183 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16184 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16185 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16186 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16187 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16188 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16189 TDF_NONE): Convert from macros to...
16190 (enum dump_flag): ...this new enum.
16191 (dump_flags_t): Update to use enum.
16192 (operator|, operator&, operator~, operator|=, operator&=):
16193 Implement for dump_flags_t.
16194 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16195 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16196 Convert from macros to...
16197 (enum optgroup_flag): ...this new enum.
16198 (optgroup_flags_t): New typedef.
16199 (operator|, operator|=): Implement for optgroup_flags_t.
16200 (struct dump_file_info): Convert field "alt_flags" to
16201 dump_flags_t. Convert field "optgroup_flags" to
16203 (dump_basic_block): Use dump_flags_t rather than int for param.
16204 (dump_generic_expr_loc): Likewise.
16205 (dump_dec): Likewise.
16206 (dump_register): Convert param "optgroup_flags" to
16208 (opt_info_enable_passes): Likewise.
16209 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16211 * gimple-pretty-print.c (debug): Likewise.
16212 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16213 (merged_store_group::apply_stores): Likewise.
16214 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16215 * gimple.c (verify_gimple_pp): Likewise.
16216 * graphite-poly.c (print_pbb_body): Likewise.
16217 * passes.c (pass_manager::register_one_dump_file): Convert
16218 local "optgroup_flags" to optgroup_flags_t.
16219 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16221 (debug_body): Likewise.
16222 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16223 to optgroup_flags_t.
16224 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16226 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16227 (convert_mult_to_fma): Likewise.
16228 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16229 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16230 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16231 "dump_kind" to dump_flags_t.
16233 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16235 * config/rs6000/rs6000.c (min, max): Delete.
16237 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16239 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16240 -mabi=spe and -mabi=no-spe.
16242 2018-06-08 Martin Liska <mliska@suse.cz>
16244 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16245 where we expect an existing summary.
16247 2018-06-08 Martin Liska <mliska@suse.cz>
16249 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16250 * ipa-inline.h (estimate_edge_growth): Likewise.
16252 2018-06-08 Martin Liska <mliska@suse.cz>
16254 * cgraph.c (function_version_hasher::hash): Use
16255 cgraph_node::get_uid ().
16256 (function_version_hasher::equal):
16257 * cgraph.h (cgraph_node::get_uid): New method.
16258 * ipa-inline.c (update_caller_keys): Use
16259 cgraph_node::get_uid ().
16260 (update_callee_keys): Likewise.
16261 * ipa-utils.c (searchc): Likewise.
16262 (ipa_reduced_postorder): Likewise.
16263 * lto-cgraph.c (input_node): Likewise.
16264 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16265 * symbol-summary.h (symtab_insertion): Likewise.
16266 (symtab_removal): Likewise.
16267 (symtab_duplication): Likewise.
16268 * tree-pretty-print.c (dump_function_header): Likewise.
16269 * tree-sra.c (convert_callers_for_node): Likewise.
16271 2018-06-08 Martin Liska <mliska@suse.cz>
16273 * cgraph.c (symbol_table::create_edge): Always assign a new
16275 (symbol_table::free_edge): Do not recycle numbers.
16276 * cgraph.h (cgraph_edge::get): New method.
16277 * symbol-summary.h (symtab_removal): Use it.
16278 (symtab_duplication): Likewise.
16279 (call_summary::hashable_uid): Remove.
16281 2018-06-08 Martin Liska <mliska@suse.cz>
16283 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16284 (initialize_growth_caches): Remove.
16285 (free_growth_caches): Likewise.
16286 (do_estimate_edge_time): Use edge_growth_cache.
16287 (do_estimate_edge_size): Likewise.
16288 (do_estimate_edge_hints): Likewise.
16289 * ipa-inline.c (reset_edge_caches): Likewise.
16290 (recursive_inlining): Likewise.
16291 (inline_small_functions): Likewise.
16292 * ipa-inline.h (initialize_growth_caches): Remove.
16293 (estimate_edge_size): Likewise.
16294 (estimate_edge_time): Likewise.
16295 (estimate_edge_hints): Likewise.
16296 (reset_edge_growth_cache): Likewise.
16297 * symbol-summary.h (call_summary::remove): New method.
16299 2018-06-08 Martin Liska <mliska@suse.cz>
16301 * ipa-cp.c (class edge_clone_summary): New summary.
16302 (grow_edge_clone_vectors): Remove.
16303 (ipcp_edge_duplication_hook): Remove.
16304 (class edge_clone_summary_t): New call_summary class.
16305 (ipcp_edge_removal_hook): Remove.
16306 (edge_clone_summary_t::duplicate): New function.
16307 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16308 (create_specialized_node): Likewise.
16309 (ipcp_driver): Initialize edge_clone_summaries and do not
16312 2018-06-08 Martin Liska <mliska@suse.cz>
16314 * symbol-summary.h (get): New function.
16315 (call_summary::m_initialize_when_cloning): New class member.
16317 2018-06-08 Martin Liska <mliska@suse.cz>
16319 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16320 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16321 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16322 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16323 (remove_cgraph_node_from_order): Use the removed_nodes set.
16324 (do_per_function_toporder): Likwise.
16325 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16326 instead of summary_uid.
16327 (symtab_removal): Likewise.
16328 (symtab_duplication): Likewise.
16330 2018-06-08 Martin Liska <mliska@suse.cz>
16332 * ipa-cp.c (ipcp_store_bits_results): Use
16333 ipcp_transformation_sum.
16334 (ipcp_store_vr_results): Likewise.
16335 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16337 (ipcp_transformation_initialize): ... this.
16338 (ipa_set_node_agg_value_chain):
16339 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16340 (write_ipcp_transformation_info): Likewise.
16341 (read_ipcp_transformation_info): Likewise.
16342 (ipcp_update_bits): Likewise.
16343 (ipcp_update_vr): Likewise.
16344 (ipcp_transform_function): Likewise.
16345 * ipa-prop.h: Rename ipcp_transformation_summary to
16346 ipcp_transformation.
16347 (class ipcp_transformation_t): New function summary.
16348 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16349 (ipa_get_agg_replacements_for_node): Likewise.
16351 2018-06-08 Martin Liska <mliska@suse.cz>
16353 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16355 (class funct_state_summary_t): New function_summary class.
16356 (has_function_state): Remove.
16357 (get_function_state): Likewise.
16358 (set_function_state): Likewise.
16359 (add_new_function): Likewise.
16360 (funct_state_summary_t::insert): New function.
16361 (duplicate_node_data): Remove.
16362 (remove_node_data): Remove.
16363 (funct_state_summary_t::duplicate): New function.
16364 (register_hooks): Create new funct_state_summaries.
16365 (pure_const_generate_summary): Use it.
16366 (pure_const_write_summary): Likewise.
16367 (pure_const_read_summary): Likewise.
16368 (propagate_pure_const): Likewise.
16369 (propagate_nothrow): Likewise.
16370 (dump_malloc_lattice): Likewise.
16371 (propagate_malloc): Likewise.
16372 (execute): Do not register hooks, just remove summary
16374 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16377 2018-06-08 Martin Liska <mliska@suse.cz>
16379 * ipa-reference.c (remove_node_data): Remove.
16380 (duplicate_node_data): Likewise.
16381 (class ipa_ref_var_info_summary_t): New class.
16382 (class ipa_ref_opt_summary_t): Likewise.
16383 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16384 (get_reference_optimization_summary): Use
16385 ipa_ref_opt_sum_summaries.
16386 (set_reference_vars_info): Remove.
16387 (set_reference_optimization_summary): Likewise.
16388 (ipa_init): Create summaries.
16389 (init_function_info): Use function summary.
16390 (ipa_ref_opt_summary_t::duplicate): New function.
16391 (ipa_ref_opt_summary_t::remove): New function.
16392 (get_read_write_all_from_node): Fix GNU coding style.
16393 (propagate): Use function summary.
16394 (write_node_summary_p): Fix GNU coding style.
16395 (stream_out_bitmap): Likewise.
16396 (ipa_reference_read_optimization_summary): Use function summary.
16397 (ipa_reference_c_finalize): Do not release hooks.
16399 2018-06-08 Martin Liska <mliska@suse.cz>
16401 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16402 (analyze_function_body): Extract multiple calls of get_create.
16403 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16404 * ipa-inline.c (recursive_inlining): Use ::get method.
16405 * ipa-inline.h (estimate_edge_growth): Likewise.
16407 2018-06-08 Martin Liska <mliska@suse.cz>
16409 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16411 (hsa_function_summary::hsa_function_summary): Use the new enum
16413 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16414 * hsa-gen.c (hsa_get_host_function): Likewise.
16415 (get_brig_function_name): Likewise.
16416 * ipa-hsa.c (process_hsa_functions): Likewise.
16417 (ipa_hsa_write_summary): Likewise.
16418 * symbol-summary.h (symtab_duplication): Use ::get function/
16419 (get): New function.
16421 2018-06-08 Martin Liska <mliska@suse.cz>
16423 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16425 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16426 (hsa_register_kernel): Likewise.
16427 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16428 * hsa-gen.c (hsa_get_host_function): Likewise.
16429 (get_brig_function_name): Likewise.
16430 (generate_hsa): Likewise.
16431 (pass_gen_hsail::execute): Likewise.
16432 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16433 (devirtualization_time_bonus): Likewise.
16434 (ipcp_propagate_stage): Likewise.
16435 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16436 (edge_set_predicate): Likewise.
16437 (evaluate_conditions_for_known_args): Likewise.
16438 (evaluate_properties_for_edge): Likewise.
16439 (ipa_fn_summary::reset): Likewise.
16440 (ipa_fn_summary_t::duplicate): Likewise.
16441 (dump_ipa_call_summary): Likewise.
16442 (ipa_dump_fn_summary): Likewise.
16443 (analyze_function_body): Likewise.
16444 (compute_fn_summary): Likewise.
16445 (estimate_edge_devirt_benefit): Likewise.
16446 (estimate_edge_size_and_time): Likewise.
16447 (estimate_calls_size_and_time): Likewise.
16448 (estimate_node_size_and_time): Likewise.
16449 (inline_update_callee_summaries): Likewise.
16450 (remap_edge_change_prob): Likewise.
16451 (remap_edge_summaries): Likewise.
16452 (ipa_merge_fn_summary_after_inlining): Likewise.
16453 (ipa_update_overall_fn_summary): Likewise.
16454 (read_ipa_call_summary): Likewise.
16455 (inline_read_section): Likewise.
16456 (write_ipa_call_summary): Likewise.
16457 (ipa_fn_summary_write): Likewise.
16458 (ipa_free_fn_summary): Likewise.
16459 * ipa-hsa.c (process_hsa_functions): Likewise.
16460 (ipa_hsa_write_summary): Likewise.
16461 (ipa_hsa_read_section): Likewise.
16462 * ipa-icf.c (sem_function::merge): Likewise.
16463 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16464 (do_estimate_edge_time): Likewise.
16465 (estimate_size_after_inlining): Likewise.
16466 (estimate_growth): Likewise.
16467 (growth_likely_positive): Likewise.
16468 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16469 (inline_call): Likewise.
16470 * ipa-inline.c (caller_growth_limits): Likewise.
16471 (can_inline_edge_p): Likewise.
16472 (can_inline_edge_by_limits_p): Likewise.
16473 (compute_uninlined_call_time): Likewise.
16474 (compute_inlined_call_time): Likewise.
16475 (want_inline_small_function_p): Likewise.
16476 (edge_badness): Likewise.
16477 (update_caller_keys): Likewise.
16478 (update_callee_keys): Likewise.
16479 (recursive_inlining): Likewise.
16480 (inline_small_functions): Likewise.
16481 (inline_to_all_callers_1): Likewise.
16482 (dump_overall_stats): Likewise.
16483 (early_inline_small_functions): Likewise.
16484 (early_inliner): Likewise.
16485 * ipa-inline.h (estimate_edge_growth): Likewise.
16486 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16487 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16488 * ipa-prop.h (IPA_NODE_REF): Likewise.
16489 (IPA_EDGE_REF): Likewise.
16490 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16491 (propagate_malloc): Likewise.
16492 * ipa-split.c (execute_split_functions): Likewise.
16493 * symbol-summary.h: Rename get to get_create.
16495 (get_create): Likewise.
16496 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16498 2018-06-08 Martin Liska <mliska@suse.cz>
16500 * symbol-summary.h (release): Move definition out of class
16502 (symtab_removal): Likewise.
16503 (symtab_duplication): Likewise.
16505 2018-06-08 Martin Liska <mliska@suse.cz>
16507 * symbol-summary.h (function_summary): Move constructor
16508 implementation out of class declaration.
16509 (release): Likewise.
16510 (symtab_insertion): Likewise.
16511 (symtab_removal): Likewise.
16512 (symtab_duplication): Likewise.
16515 2018-06-08 Martin Liska <mliska@suse.cz>
16517 * Makefile.in: Remove support for MPX (macros, related functions,
16518 fields in cgraph_node, ...).
16519 * builtin-types.def (BT_BND): Likewise.
16520 (BT_FN_BND_CONST_PTR): Likewise.
16521 (BT_FN_CONST_PTR_BND): Likewise.
16522 (BT_FN_VOID_PTR_BND): Likewise.
16523 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16524 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16525 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16526 (expand_builtin_mempcpy_with_bounds): Likewise.
16527 (expand_builtin_memset_with_bounds): Likewise.
16528 (expand_builtin_memset_args): Likewise.
16529 (std_expand_builtin_va_start): Likewise.
16530 (expand_builtin): Likewise.
16531 (expand_builtin_with_bounds): Likewise.
16532 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16533 (DEF_LIB_BUILTIN_CHKP): Likewise.
16534 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16535 (DEF_CHKP_BUILTIN): Likewise.
16536 (BUILT_IN_MEMCPY): Likewise.
16537 (BUILT_IN_MEMMOVE): Likewise.
16538 (BUILT_IN_MEMPCPY): Likewise.
16539 (BUILT_IN_MEMSET): Likewise.
16540 (BUILT_IN_STPCPY): Likewise.
16541 (BUILT_IN_STRCAT): Likewise.
16542 (BUILT_IN_STRCHR): Likewise.
16543 (BUILT_IN_STRCPY): Likewise.
16544 (BUILT_IN_STRLEN): Likewise.
16545 (BUILT_IN_MEMCPY_CHK): Likewise.
16546 (BUILT_IN_MEMMOVE_CHK): Likewise.
16547 (BUILT_IN_MEMPCPY_CHK): Likewise.
16548 (BUILT_IN_MEMSET_CHK): Likewise.
16549 (BUILT_IN_STPCPY_CHK): Likewise.
16550 (BUILT_IN_STRCAT_CHK): Likewise.
16551 (BUILT_IN_STRCPY_CHK): Likewise.
16552 * calls.c (store_bounds): Likewise.
16553 (emit_call_1): Likewise.
16554 (special_function_p): Likewise.
16555 (maybe_warn_nonstring_arg): Likewise.
16556 (initialize_argument_information): Likewise.
16557 (finalize_must_preallocate): Likewise.
16558 (compute_argument_addresses): Likewise.
16559 (expand_call): Likewise.
16560 * cfgexpand.c (expand_call_stmt): Likewise.
16561 (expand_return): Likewise.
16562 (expand_gimple_stmt_1): Likewise.
16563 (pass_expand::execute): Likewise.
16564 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16565 (cgraph_node::remove): Likewise.
16566 (cgraph_node::dump): Likewise.
16567 (cgraph_node::verify_node): Likewise.
16568 * cgraph.h (chkp_function_instrumented_p): Likewise.
16569 (symtab_node::get_alias_target): Likewise.
16570 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16571 (cgraph_local_p): Likewise.
16572 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16573 (cgraph_edge::rebuild_references): Likewise.
16574 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16575 (walk_polymorphic_call_targets): Likewise.
16576 (cgraph_node::expand_thunk): Likewise.
16577 (symbol_table::output_weakrefs): Likewise.
16578 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16579 (ix86_handle_option): Likewise.
16580 * config/i386/constraints.md: Likewise.
16581 * config/i386/i386-builtin-types.def (BND): Likewise.
16585 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16586 (BDESC_FIRST): Likewise.
16588 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16589 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16590 * config/i386/i386.c (enum reg_class): Likewise.
16591 (ix86_target_string): Likewise.
16592 (ix86_option_override_internal): Likewise.
16593 (ix86_conditional_register_usage): Likewise.
16594 (ix86_valid_target_attribute_inner_p): Likewise.
16595 (ix86_set_indirect_branch_type): Likewise.
16596 (ix86_set_current_function): Likewise.
16597 (ix86_function_arg_regno_p): Likewise.
16598 (init_cumulative_args): Likewise.
16599 (ix86_function_arg_advance): Likewise.
16600 (ix86_function_arg): Likewise.
16601 (ix86_pass_by_reference): Likewise.
16602 (ix86_function_value_regno_p): Likewise.
16603 (ix86_function_value_1): Likewise.
16604 (ix86_function_value_bounds): Likewise.
16605 (ix86_return_in_memory): Likewise.
16606 (ix86_setup_incoming_vararg_bounds): Likewise.
16607 (ix86_va_start): Likewise.
16608 (indirect_thunk_need_prefix): Likewise.
16609 (print_reg): Likewise.
16610 (ix86_print_operand): Likewise.
16611 (ix86_expand_call): Likewise.
16612 (ix86_output_function_return): Likewise.
16613 (reg_encoded_number): Likewise.
16614 (BDESC_VERIFYS): Likewise.
16615 (ix86_init_mpx_builtins): Likewise.
16616 (ix86_init_builtins): Likewise.
16617 (ix86_emit_cmove): Likewise.
16618 (ix86_emit_move_max): Likewise.
16619 (ix86_expand_builtin): Likewise.
16620 (ix86_builtin_mpx_function): Likewise.
16621 (ix86_get_arg_address_for_bt): Likewise.
16622 (ix86_load_bounds): Likewise.
16623 (ix86_store_bounds): Likewise.
16624 (ix86_load_returned_bounds): Likewise.
16625 (ix86_store_returned_bounds): Likewise.
16626 (ix86_class_likely_spilled_p): Likewise.
16627 (ix86_hard_regno_mode_ok): Likewise.
16628 (x86_order_regs_for_local_alloc): Likewise.
16629 (ix86_mitigate_rop): Likewise.
16630 (ix86_bnd_prefixed_insn_p): Likewise.
16631 (ix86_mpx_bound_mode): Likewise.
16632 (ix86_make_bounds_constant): Likewise.
16633 (ix86_initialize_bounds): Likewise.
16634 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16635 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16636 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16637 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16638 (TARGET_CHKP_BOUND_MODE): Likewise.
16639 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16640 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16641 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16642 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16643 * config/i386/i386.h (TARGET_MPX): Likewise.
16644 (TARGET_MPX_P): Likewise.
16645 (VALID_BND_REG_MODE): Likewise.
16646 (FIRST_BND_REG): Likewise.
16647 (LAST_BND_REG): Likewise.
16648 (enum reg_class): Likewise.
16649 (BND_REG_P): Likewise.
16650 (BND_REGNO_P): Likewise.
16651 (BNDmode): Likewise.
16652 (ADJUST_INSN_LENGTH): Likewise.
16653 * config/i386/i386.md: Likewise.
16654 * config/i386/i386.opt: Likewise.
16655 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16656 (defined): Likewise.
16657 (LINK_MPX): Likewise.
16658 (MPX_SPEC): Likewise.
16659 (LIBMPX_SPEC): Likewise.
16660 (LIBMPXWRAPPERS_SPEC): Likewise.
16661 (CHKP_SPEC): Likewise.
16662 * config/i386/predicates.md: Likewise.
16663 * dbxout.c (dbxout_type): Likewise.
16664 * doc/extend.texi: Likewise.
16665 * doc/invoke.texi: Likewise.
16666 * doc/md.texi: Likewise.
16667 * doc/tm.texi: Likewise.
16668 * doc/tm.texi.in: Likewise.
16669 * dwarf2out.c (is_base_type): Likewise.
16670 (gen_formal_types_die): Likewise.
16671 (gen_subprogram_die): Likewise.
16672 (gen_type_die_with_usage): Likewise.
16673 (gen_decl_die): Likewise.
16674 (dwarf2out_late_global_decl): Likewise.
16675 * expr.c (expand_assignment): Likewise.
16676 (emit_storent_insn): Likewise.
16677 (store_expr_with_bounds): Likewise.
16678 (store_expr): Likewise.
16679 (expand_expr_real_1): Likewise.
16680 * expr.h (store_expr_with_bounds): Likewise.
16681 * function.c (use_register_for_decl): Likewise.
16682 (struct bounds_parm_data): Likewise.
16683 (assign_parms_augmented_arg_list): Likewise.
16684 (assign_parm_find_entry_rtl): Likewise.
16685 (assign_parm_is_stack_parm): Likewise.
16686 (assign_parm_load_bounds): Likewise.
16687 (assign_bounds): Likewise.
16688 (assign_parms): Likewise.
16689 (expand_function_start): Likewise.
16690 * gcc.c (CHKP_SPEC): Likewise.
16691 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16692 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16693 (wrestrict_dom_walker::check_call): Likewise.
16694 * gimple.c (gimple_build_call_from_tree): Likewise.
16695 * gimple.h (enum gf_mask): Likewise.
16696 (gimple_call_with_bounds_p): Likewise.
16697 (gimple_call_set_with_bounds): Likewise.
16698 * gimplify.c (gimplify_init_constructor): Likewise.
16699 * ipa-cp.c (initialize_node_lattices): Likewise.
16700 (propagate_constants_across_call): Likewise.
16701 (find_more_scalar_values_for_callers_subset): Likewise.
16702 * ipa-hsa.c (process_hsa_functions): Likewise.
16703 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16704 * ipa-icf.c (sem_function::merge): Likewise.
16705 * ipa-inline.c (early_inliner): Likewise.
16706 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16707 (warn_function_cold): Likewise.
16708 (propagate_pure_const): Likewise.
16709 * ipa-ref.h (enum GTY): Likewise.
16710 * ipa-split.c (find_retbnd): Likewise.
16711 (consider_split): Likewise.
16712 (split_function): Likewise.
16713 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16714 * ipa.c (walk_polymorphic_call_targets): Likewise.
16715 (symbol_table::remove_unreachable_nodes): Likewise.
16716 (process_references): Likewise.
16717 (cgraph_build_static_cdtor_1): Likewise.
16718 * lto-cgraph.c (lto_output_node): Likewise.
16719 (output_refs): Likewise.
16720 (compute_ltrans_boundary): Likewise.
16721 (input_overwrite_node): Likewise.
16722 (input_node): Likewise.
16723 (input_cgraph_1): Likewise.
16724 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16725 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16726 (class pass_chkp_instrumentation_passes): Likewise.
16727 (make_pass_chkp_instrumentation_passes): Likewise.
16728 * passes.def: Likewise.
16729 * rtl.h (struct GTY): Likewise.
16730 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16731 * stor-layout.c (layout_type): Likewise.
16732 * symtab.c: Likewise.
16733 * target.def: Likewise.
16734 * targhooks.c (default_chkp_bound_type): Likewise.
16735 (default_chkp_bound_mode): Likewise.
16736 (default_builtin_chkp_function): Likewise.
16737 (default_chkp_function_value_bounds): Likewise.
16738 (default_chkp_make_bounds_constant): Likewise.
16739 (default_chkp_initialize_bounds): Likewise.
16740 * targhooks.h (default_chkp_bound_type): Likewise.
16741 (default_chkp_bound_mode): Likewise.
16742 (default_builtin_chkp_function): Likewise.
16743 (default_chkp_function_value_bounds): Likewise.
16744 (default_chkp_make_bounds_constant): Likewise.
16745 (default_chkp_initialize_bounds): Likewise.
16746 * toplev.c (compile_file): Likewise.
16747 (process_options): Likewise.
16748 * tree-core.h (DEF_BUILTIN): Likewise.
16749 (DEF_BUILTIN_CHKP): Likewise.
16750 * tree-inline.c (declare_return_variable): Likewise.
16751 (remap_gimple_stmt): Likewise.
16752 (copy_bb): Likewise.
16753 (initialize_inlined_parameters): Likewise.
16754 (expand_call_inline): Likewise.
16755 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16756 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16757 (make_pass_ipa_chkp_produce_thunks): Likewise.
16758 (make_pass_chkp): Likewise.
16759 (make_pass_chkp_opt): Likewise.
16760 (make_pass_chkp_instrumentation_passes): Likewise.
16761 * tree-pretty-print.c (dump_generic_node): Likewise.
16762 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16763 * tree-ssa-dce.c (propagate_necessity): Likewise.
16764 (eliminate_unnecessary_stmts): Likewise.
16765 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16766 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16767 * tree-ssa-sccvn.h: Likewise.
16768 * tree-ssa-strlen.c (get_string_length): Likewise.
16769 (valid_builtin_call): Likewise.
16770 (adjust_last_stmt): Likewise.
16771 (handle_builtin_strchr): Likewise.
16772 (handle_builtin_strcpy): Likewise.
16773 (handle_builtin_stxncpy): Likewise.
16774 (handle_builtin_memcpy): Likewise.
16775 (handle_builtin_strcat): Likewise.
16776 (strlen_check_and_optimize_stmt): Likewise.
16777 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16778 * tree-streamer-in.c: Likewise.
16779 * tree-streamer.c (record_common_node): Likewise.
16780 * tree.c (tree_code_size): Likewise.
16781 (wide_int_to_tree_1): Likewise.
16782 (type_contains_placeholder_1): Likewise.
16783 (build_common_tree_nodes): Likewise.
16784 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16785 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16786 (POINTER_BOUNDS_P): Likewise.
16787 (BOUNDED_TYPE_P): Likewise.
16788 (BOUNDED_P): Likewise.
16789 (CALL_WITH_BOUNDS_P): Likewise.
16790 (pointer_bounds_type_node): Likewise.
16791 * value-prof.c (gimple_ic): Likewise.
16792 * var-tracking.c (vt_add_function_parameters): Likewise.
16793 * varasm.c (make_decl_rtl): Likewise.
16794 (assemble_start_function): Likewise.
16795 (output_constant): Likewise.
16796 (maybe_assemble_visibility): Likewise.
16797 * varpool.c (ctor_for_folding): Likewise.
16798 * chkp-builtins.def: Remove.
16799 * ipa-chkp.c: Remove.
16800 * ipa-chkp.h: Remove.
16801 * rtl-chkp.c: Remove.
16802 * rtl-chkp.h: Remove.
16803 * tree-chkp-opt.c: Remove.
16804 * tree-chkp.c: Remove.
16805 * tree-chkp.h: Remove.
16807 2018-06-07 Carl Love <cel@us.ibm.com>
16809 * config/rs6000/vsx.md (vextract_fp_from_shorth,
16810 vextract_fp_from_shortl): Add BE support.
16812 2018-06-07 Paul Koning <ni1d@arrl.net>
16814 * compare-elim.c (try_merge_compare): Don't merge compare if
16815 address contains a side effect.
16816 (try_eliminate_compare): Likewise.
16818 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
16820 * config.gcc: Support "tremont".
16821 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16822 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16824 * config/i386/i386.c (m_TREMONT): Define.
16825 (processor_target_table): Add "tremont".
16826 (PTA_TREMONT): Define.
16827 (ix86_lea_outperforms): Add TARGET_TREMONT.
16828 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16829 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16830 and M_INTEL_GOLDMONT_PLUS.
16831 (fold_builtin_cpu): Add "tremont".
16832 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16833 (ix86_option_override_internal): Add "tremont".
16834 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16835 (processor_type): Add PROCESSOR_TREMONT.
16836 * config/i386/x86-tune.def: Add m_TREMONT.
16837 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16839 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16841 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16842 symbol defined for msp430i* devices to be lower case.
16844 2018-06-07 Richard Biener <rguenther@suse.de>
16846 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16847 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16848 Properly wrap signed arithmetic if overflow wraps.
16850 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16852 PR tree-optimization/69615
16853 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16854 of a cast from a same precision integral SSA_NAME in a bb dominated
16855 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16856 cast to utype if rhs2 has already a compatible type.
16858 2018-06-07 Richard Biener <rguenther@suse.de>
16860 PR tree-optimization/85935
16861 * graphite-scop-detection.c (find_params_in_bb): Analyze
16862 condition operands with respect to the correct loop. Assert
16863 the analysis doesn't fail.
16865 2018-06-04 Carl Love <cel@us.ibm.com>
16867 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16868 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16869 as it is slightly cheaper.
16870 (first_match_or_eos_index_<mode>):
16871 Calculate index using natural element order.
16872 (first_match_index_<mode>):
16873 Calculate index using natural element order.
16874 (first_match_or_eos_index_<mode>):
16875 Calculate index using natural order.
16876 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16877 for BE and LE modes.
16878 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16879 P9V_BUILTIN_VCLZLSBB_V16QI.
16880 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16883 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16885 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16886 indentation and line wrap for many prototypes. Add missing
16887 @smallexample directives around block of prototypes for vec_xl and
16890 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
16892 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16893 track if we pass or return IEEE 128-bit floating point.
16894 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16895 C++ mangling that is compatible with GCC 8.1.
16896 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16897 (init_cumulative_args): Note if we pass or return IEEE 128-bit
16898 floating point types.
16899 (rs6000_function_arg_advance_1): Likewise.
16900 (rs6000_mangle_type): Optionally generate mangled names that match
16901 what GCC 8.1 generated for IEEE 128-bit floating point types.
16902 (rs6000_globalize_decl_name): If we have an external function that
16903 passes or returns IEEE 128-bit types, generate a weak reference
16904 from the mangled name used in GCC 8.1 to the current mangled
16906 (rs6000_init_builtins): Make __ibm128 use the long double type if
16907 long double is IBM extended double. Make __float128 use the long
16908 double type if long double is IEEE 128-bit.
16911 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16912 macro for __ibm128 built-in functions.
16913 (PACK_IF): Add __ibm128 pack/unpack functions.
16914 (UNPACK_IF): Likewise.
16915 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16916 enable long double built-in functions if long double is IEEE
16917 128-bit floating point.
16918 (rs6000_invalid_builtin): Update long double built-in function
16920 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16921 functions, adjust the built-in function to use the long double
16922 built-in function if __ibm128 and long double are the same type.
16923 * doc/extend.texi (PowerPC builtins): Update documention for
16924 __builtin_{,un}pack_longdouble. Add documentation for
16925 __builtin_{,un}pack_ibm128.
16927 2018-06-06 Jim Wilson <jimw@sifive.com>
16929 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16930 (struct machine_function): New field interrupt_mode.
16931 (riscv_handle_type_attribute): New function. Add forward declaration.
16932 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16933 (riscv_expand_epilogue): Check interrupt_mode field.
16934 (riscv_set_current_function): Check interrupt attribute args and
16935 set interrupt_mode field.
16936 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16937 (riscv_sret, riscv_uret): New.
16938 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16939 new arguments to interrupt attribute.
16941 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
16944 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16945 Don't handle -mcpu=power8 if -mpower9-vector is also used.
16947 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16949 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16950 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16951 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16952 several redundant entries.
16954 2018-06-06 David Malcolm <dmalcolm@redhat.com>
16956 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16957 type from "rtx" to "rtx_insn *".
16958 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16959 for local "call_insn", removing cast.
16960 (ix86_expand_call): Likewise, introducing a "call_insn" local.
16962 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
16964 PR tree-optimization/86066
16965 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16966 for BIT_INSERT_EXPR stores.
16968 2018-06-06 Richard Biener <rguenther@suse.de>
16970 PR tree-optimization/86062
16971 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16972 component refs ontop
16973 of to be offsetted base.
16975 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16977 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16978 to be static and remove check on interrupt attribute name.
16980 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
16982 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16983 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16985 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16988 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16990 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16991 Remove second argument, change how error is called.
16992 (aarch64_layout_arg): Remove second argument from
16993 aarch64_err_no_fpadvsimd call.
16994 (aarch64_init_cumulative_args): Ditto.
16995 (aarch64_gimplify_va_arg_expr): Ditto.
16996 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16998 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17000 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17001 (*simple_return_indirect_internal<mode>): Rename from
17002 simple_return_indirect_internal. Use W mode iterator.
17003 (rstorssp): New expander.
17004 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17005 (clrssbsy): New expander.
17006 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17008 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17010 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17012 (cmse_check_pointed_object): Likewise.
17014 2018-06-05 Martin Liska <mliska@suse.cz>
17016 PR gcov-profile/47618
17017 * doc/invoke.texi: Document how -fprofile-dir format
17020 2018-06-05 Richard Biener <rguenther@suse.de>
17022 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17023 removal pretend DOM info isn't available so we do not update
17024 it and only remove edges, not dominated blocks. Actually free
17025 DOM info in case we removed something. Remove unreachable blocks.
17026 (mfb_keep_latches): Work with either DOM info or marked backedges.
17027 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17028 first. Mark backedges if DOM info isn't available.
17029 (Re-)compute DOM info after cleanup_control_flow_pre.
17031 2018-06-05 Richard Biener <rguenther@suse.de>
17033 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17034 (locus_discrim_hasher::hash): Adjust.
17035 (locus_discrim_hasher::equal): Likewise.
17036 (next_discriminator_for_locus): Work on line directly.
17037 (same_line_p): Pass in expanded locus1 as well.
17038 (assign_discriminators): Avoid redundant location expansions.
17040 2018-06-05 Richard Biener <rguenther@suse.de>
17042 PR tree-optimization/86046
17043 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17044 if required after clearing TREE_ADDRESSABLE.
17046 2018-06-05 Richard Biener <rguenther@suse.de>
17048 PR tree-optimization/86047
17049 * tree-ssa-loop.c (for_each_index): Glob handling of all
17050 decls and constants and really handle all of them.
17052 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17055 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17056 qualifier_void_pointer and qualifier_const_void_pointer.
17057 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17058 (arm_init_builtins): Handle the above.
17059 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17060 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17061 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17064 2018-06-05 Martin Liska <mliska@suse.cz>
17066 * auto-profile.c (read_autofdo_file): Do not use
17067 gcov_ctr_summary struct.
17068 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17069 * coverage.c (struct counts_entry): Likewise.
17070 (read_counts_file): Read just single summary entry.
17071 (get_coverage_counts): Use gcov_summary struct.
17072 * coverage.h (get_coverage_counts): Likewise.
17073 * gcov-dump.c (dump_working_sets): Likewise.
17074 (tag_summary): Dump just single summary.
17075 * gcov-io.c (gcov_write_summary): Write just histogram
17077 (gcov_read_summary): Read just single summary.
17078 (compute_working_sets): Use gcov_summary struct.
17079 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17080 of GCOV_COUNTERS_SUMMABLE.
17081 (GCOV_COUNTERS_SUMMABLE): Remove.
17082 (GCOV_FIRST_VALUE_COUNTER): Replace with
17083 GCOV_COUNTER_V_INTERVAL.
17084 (struct gcov_ctr_summary): Remove.
17085 (struct gcov_summary): Directly use fields of former
17087 (compute_working_sets): Use gcov_summary struct.
17088 * gcov.c (read_count_file): Do not use ctrs fields.
17089 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17091 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17093 * profile.c: Likewise.
17094 * profile.h: Likewise.
17096 2018-06-05 Martin Liska <mliska@suse.cz>
17098 PR gcov-profile/84846
17099 * gcov.c (output_lines): Print working directory only
17100 in intermediate format.
17102 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17104 * config/s390/s390-builtin-types.def: Add void function type.
17105 * config/s390/s390-builtins.def: Use the function type for the
17108 2018-06-04 Jim Wilson <jimw@sifive.com>
17110 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17112 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17113 and maybe_eh_return. Change regno to unsigned int. Use new args to
17114 handle EH_RETURN_DATA_REGNO registers properly.
17115 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17116 (riscv_expand_epilogue): Update comment. Change argument name and
17117 type. Update code to use new name and type. Pass new args to
17118 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17120 * config/riscv/riscv.md (NORMAL_RETURN): New.
17121 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17122 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17123 (eh_return): Call gen_eh_return_internal and emit barrier.
17124 (eh_return_internal): Call riscv_expand_epilogue.
17126 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17128 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17129 bit_insertion field and declare can_be_merged_into method.
17130 (merged_store_group::can_be_merged_into): New method.
17131 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17132 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17133 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17135 2018-06-04 Richard Biener <rguenther@suse.de>
17137 PR tree-optimization/85955
17138 * builtins.c (fold_builtin_sincos): Convert pointers to
17139 destination to appropriate type before dereferencing.
17141 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17143 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17145 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17147 * expr.c (expand_expr_real_1): Force the operand into memory if
17148 its TYPE_MODE is BLKmode and if there is no integer mode for
17149 the number of bits being extracted.
17151 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17155 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17156 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17158 2018-06-04 Richard Biener <rguenther@suse.de>
17160 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17161 (cleanup_tree_cfg_noloop): ... single caller. Do
17162 start_recording_case_labels later.
17164 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17166 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17167 to _IMMINTRIN_H_INCLUDED.
17168 * config/i386/pconfigintrin.h: Ditto.
17169 * config/i386/waitpkgintrin.h: Ditto.
17170 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17171 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17172 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17173 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17174 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17175 waitpkgintrin.h and cldemoteintrin.h.
17177 2018-06-04 Richard Biener <rguenther@suse.de>
17179 PR tree-optimization/86038
17180 * tracer.c (find_best_successor): Check probability for
17181 being initialized, bail out if not.
17183 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17186 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17187 of bits to ignore when comparing architectures.
17189 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17191 PR tree-optimization/69615
17192 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17193 maximum or minimum of the type, try to merge it also as if
17194 range1 is + [-, x - 1] or + [x + 1, -].
17197 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17199 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17201 PR tree-optimization/86034
17202 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17203 the unsigned bitfield type in a bit insertion sequence if it does not
17204 have a larger precision than the bitfield size.
17205 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17207 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17209 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17211 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17213 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17214 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17215 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17216 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17218 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17220 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17221 Disable -fdelete-null-pointer-checks for ELF toolchain.
17223 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17224 Kito Cheng <kito.cheng@gmail.com>
17226 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17227 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17228 (nds32*-*-*): Add glibc and uclibc conditions.
17229 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17230 (TARGET_EXCEPT_UNWIND_INFO): Define.
17231 * config/nds32/elf.h: New file.
17232 * config/nds32/linux.h: New file.
17233 * config/nds32/nds32-elf.opt: New file.
17234 * config/nds32/nds32-linux.opt: New file.
17235 * config/nds32/nds32-fp-as-gp.c
17236 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17237 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17239 (nds32_asm_file_end): Ditto.
17240 (nds32_print_operand): Ditto.
17241 (nds32_insert_attributes): Ditto.
17242 (nds32_init_libfuncs): New function.
17243 (TARGET_HAVE_TLS): Define.
17244 (TARGET_INIT_LIBFUNCS): Define.
17245 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17247 (TARGET_ELF): Apply different mcmodel setting.
17248 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17249 been migrated into elf.h and linux.h files.
17250 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17251 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17252 (mcmodel): The content has been migrated into nds32-elf.opt and
17253 nds32-linux.opt files.
17254 * config/nds32/t-elf: New file.
17255 * config/nds32/t-linux: New file.
17257 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17258 Shiva Chen <shiva0217@gmail.com>
17260 * config/nds32/constants.md (unspec_volatile_element): Add
17261 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17262 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17264 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17265 (make_pass_nds32_fp_as_gp): Declare.
17266 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17268 (nds32_asm_function_end_prologue): Remove unused asm output.
17269 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17270 (nds32_asm_file_start): Output necessary fp_as_gp information.
17271 (nds32_option_override): Adjust register usage.
17272 (nds32_expand_prologue): Consider fp_as_gp situation.
17273 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17274 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17277 (simple_return): Ditto.
17278 (omit_fp_begin): Output special directive for fp_as_gp.
17279 (omit_fp_end): Output special directive for fp_as_gp.
17280 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17281 mforbid-fp-as-gp): New options.
17283 2018-06-01 Mark Wielaard <mark@klomp.org>
17285 * dwarf2out.c (dwarf2out_finish): Remove generation of
17286 DW_AT_loclists_base.
17288 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17290 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17291 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17292 (struct merged_store_group): Add bit_insertion field.
17293 (dump_char_array): Use standard hexadecimal format.
17294 (merged_store_group::merged_store_group): Set bit_insertion to false.
17295 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17296 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17297 also print the mask in the dump file.
17298 (pass_store_merging::gate): Minor tweak.
17299 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17300 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17301 stores with INTEGER_CST stores.
17302 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17303 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17304 and use it throughout. Generate bit insertion sequences if need be.
17305 (pass_store_merging::process_store): Remove redundant condition.
17306 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17308 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17310 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17311 the 128-bit floating point types. Fix function comment.
17313 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17315 * config/aarch64/aarch64-simd.md
17316 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17318 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17321 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17323 PR tree-optimization/85989
17324 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17326 (backprop::intersect_uses): Check it when deciding whether this
17327 is a backedge reference.
17328 (backprop::process_block): Add each phi to m_visited_phis
17329 after visiting it, then clear it at the end.
17331 2018-06-01 Richard Biener <rguenther@suse.de>
17333 * tree-vectorizer.h (vect_dr_stmt): New function.
17334 (vect_get_load_cost): Adjust.
17335 (vect_get_store_cost): Likewise.
17336 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17337 Use vect_dr_stmt instead of DR_SMTT.
17338 (vect_record_base_alignments): Likewise.
17339 (vect_calculate_target_alignment): Likewise.
17340 (vect_compute_data_ref_alignment): Likewise and make static.
17341 (vect_update_misalignment_for_peel): Likewise.
17342 (vect_verify_datarefs_alignment): Likewise.
17343 (vector_alignment_reachable_p): Likewise.
17344 (vect_get_data_access_cost): Likewise. Pass down
17345 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17346 (vect_get_peeling_costs_all_drs): Likewise.
17347 (vect_peeling_hash_get_lowest_cost): Likewise.
17348 (vect_enhance_data_refs_alignment): Likewise.
17349 (vect_find_same_alignment_drs): Likewise.
17350 (vect_analyze_data_refs_alignment): Likewise.
17351 (vect_analyze_group_access_1): Likewise.
17352 (vect_analyze_group_access): Likewise.
17353 (vect_analyze_data_ref_access): Likewise.
17354 (vect_analyze_data_ref_accesses): Likewise.
17355 (vect_vfa_segment_size): Likewise.
17356 (vect_small_gap_p): Likewise.
17357 (vectorizable_with_step_bound_p): Likewise.
17358 (vect_prune_runtime_alias_test_list): Likewise.
17359 (vect_analyze_data_refs): Likewise.
17360 (vect_supportable_dr_alignment): Likewise.
17361 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17362 (vect_gen_prolog_loop_niters): Likewise.
17363 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17364 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17366 (vect_recog_mask_conversion_pattern): Likewise.
17367 (vect_try_gather_scatter_pattern): Likewise.
17368 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17369 to vect_get_store_cost.
17370 (vect_get_store_cost): Get stmt_info instead of DR.
17371 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17372 (vect_get_load_cost): Get stmt_info instead of DR.
17374 2018-06-01 Richard Biener <rguenther@suse.de>
17376 PR middle-end/86017
17377 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17378 vars wrapped in MEM_REFs.
17380 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17382 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17383 Fix subreg tests so that we only return a choice between
17384 GENERAL_REGS and FP_REGS if the original classes included both.
17386 2018-06-01 Richard Biener <rguenther@suse.de>
17389 * tree-ssa-structalias.c (get_function_part_constraint):
17390 Handle NULL fi->decl.
17391 (find_func_aliases_for_call): Properly handle indirect
17392 fi from direct call.
17393 (find_func_clobbers): Likewise.
17394 (ipa_pta_execute): Likewise.
17395 (create_variable_info_for): For functions that are ifunc_resolver
17396 resolve to a varinfo that contains the result of the resolver call.
17397 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17400 2018-05-31 Michael Collison <michael.collison@arm.com>
17402 * config/aarch64/aarch64.md:
17403 (*fix_to_zero_extenddfdi2): New pattern.
17404 * gcc.target/aarch64/fix_extend1.c: New testcase.
17406 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17408 PR middle-end/78809
17409 PR middle-end/83026
17410 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17411 and BUILT_IN_STRNCMP_EQ.
17412 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17413 BUILT_IN_STRNCMP_EQ.
17414 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17415 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17416 (gimple_fold_builtin): Likewise.
17417 * tree-ssa-strlen.c (compute_string_length): New function.
17418 (determine_min_obsize): New function.
17419 (handle_builtin_string_cmp): New function to handle calls to
17420 string compare functions.
17421 (strlen_optimize_stmt): Add handling to builtin string compare
17423 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17424 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17425 * tree.c (build_common_builtin_nodes): Add new defines of
17426 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17428 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17431 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17432 functions with naked attribute.
17434 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17436 * config/i386/sse.md (avx_vec_concat<mode>):
17437 Substitute concat_tg_mode mode attribute with xtg_mode.
17438 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17439 (concat_tg_mode): Remove mode attribute.
17441 2018-05-31 Martin Sebor <msebor@redhat.com>
17444 * calls.c (alloc_max_size): Correct a logic error/typo.
17445 Treat excessive arguments as infinite. Warn for invalid arguments.
17446 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17448 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17451 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17452 and movx for Haswell.
17454 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17455 Cesar Philippidis <cesar@codesourcery.com>
17457 PR middle-end/85879
17458 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17459 when emitting error on private/firstprivate reductions.
17460 * omp-low.c (lower_omp_target): Avoid reference-type processing
17461 on pointers for firstprivate clause.
17463 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17465 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17468 * config/aarch64/aarch64-simd.md
17469 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17470 (aarch64_ld1_x3_<mode>): Likewise
17471 (aarch64_st1x2<VALLDIF:mode>): Likewise
17472 (aarch64_st1_x2_<mode>): Likewise
17473 (aarch64_st1x3<VALLDIF:mode>): Likewise
17474 (aarch64_st1_x3_<mode>): Likewise
17475 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17476 (vld1_s8_x3): Likewise.
17477 (vld1_u16_x3): Likewise.
17478 (vld1_s16_x3): Likewise.
17479 (vld1_u32_x3): Likewise.
17480 (vld1_s32_x3): Likewise.
17481 (vld1_u64_x3): Likewise.
17482 (vld1_s64_x3): Likewise.
17483 (vld1_f16_x3): Likewise.
17484 (vld1_f32_x3): Likewise.
17485 (vld1_f64_x3): Likewise.
17486 (vld1_p8_x3): Likewise.
17487 (vld1_p16_x3): Likewise.
17488 (vld1_p64_x3): Likewise.
17489 (vld1q_u8_x3): Likewise.
17490 (vld1q_s8_x3): Likewise.
17491 (vld1q_u16_x3): Likewise.
17492 (vld1q_s16_x3): Likewise.
17493 (vld1q_u32_x3): Likewise.
17494 (vld1q_s32_x3): Likewise.
17495 (vld1q_u64_x3): Likewise.
17496 (vld1q_s64_x3): Likewise.
17497 (vld1q_f16_x3): Likewise.
17498 (vld1q_f32_x3): Likewise.
17499 (vld1q_f64_x3): Likewise.
17500 (vld1q_p8_x3): Likewise.
17501 (vld1q_p16_x3): Likewise.
17502 (vld1q_p64_x3): Likewise.
17503 (vst1_s64_x2): Likewise.
17504 (vst1_u64_x2): Likewise.
17505 (vst1_f64_x2): Likewise.
17506 (vst1_s8_x2): Likewise.
17507 (vst1_p8_x2): Likewise.
17508 (vst1_s16_x2): Likewise.
17509 (vst1_p16_x2): Likewise.
17510 (vst1_s32_x2): Likewise.
17511 (vst1_u8_x2): Likewise.
17512 (vst1_u16_x2): Likewise.
17513 (vst1_u32_x2): Likewise.
17514 (vst1_f16_x2): Likewise.
17515 (vst1_f32_x2): Likewise.
17516 (vst1_p64_x2): Likewise.
17517 (vst1q_s8_x2): Likewise.
17518 (vst1q_p8_x2): Likewise.
17519 (vst1q_s16_x2): Likewise.
17520 (vst1q_p16_x2): Likewise.
17521 (vst1q_s32_x2): Likewise.
17522 (vst1q_s64_x2): Likewise.
17523 (vst1q_u8_x2): Likewise.
17524 (vst1q_u16_x2): Likewise.
17525 (vst1q_u32_x2): Likewise.
17526 (vst1q_u64_x2): Likewise.
17527 (vst1q_f16_x2): Likewise.
17528 (vst1q_f32_x2): Likewise.
17529 (vst1q_f64_x2): Likewise.
17530 (vst1q_p64_x2): Likewise.
17531 (vst1_s64_x3): Likewise.
17532 (vst1_u64_x3): Likewise.
17533 (vst1_f64_x3): Likewise.
17534 (vst1_s8_x3): Likewise.
17535 (vst1_p8_x3): Likewise.
17536 (vst1_s16_x3): Likewise.
17537 (vst1_p16_x3): Likewise.
17538 (vst1_s32_x3): Likewise.
17539 (vst1_u8_x3): Likewise.
17540 (vst1_u16_x3): Likewise.
17541 (vst1_u32_x3): Likewise.
17542 (vst1_f16_x3): Likewise.
17543 (vst1_f32_x3): Likewise.
17544 (vst1_p64_x3): Likewise.
17545 (vst1q_s8_x3): Likewise.
17546 (vst1q_p8_x3): Likewise.
17547 (vst1q_s16_x3): Likewise.
17548 (vst1q_p16_x3): Likewise.
17549 (vst1q_s32_x3): Likewise.
17550 (vst1q_s64_x3): Likewise.
17551 (vst1q_u8_x3): Likewise.
17552 (vst1q_u16_x3): Likewise.
17553 (vst1q_u32_x3): Likewise.
17554 (vst1q_u64_x3): Likewise.
17555 (vst1q_f16_x3): Likewise.
17556 (vst1q_f32_x3): Likewise.
17557 (vst1q_f64_x3): Likewise.
17558 (vst1q_p64_x3): Likewise.
17560 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17562 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17563 user_label_prefix to name.
17565 * tree-core.h: Update comment about the format of NAME string
17566 passed to handler in attribute_spec.
17568 * config/msp430/msp430.md: Remove erroneous subreg expression from
17569 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17570 zero_extend{q,h}isi2.
17572 2018-05-30 Borislav Petkov <bp@suse.de>
17574 * doc/extend.texi: Document some architecture specific
17575 constraints and sort entries.
17577 2018-05-30 Martin Sebor <msebor@redhat.com>
17579 PR middle-end/85369
17580 * builtins.c (expand_builtin_stpcpy_1): New function.
17581 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17582 only if the former succeeds.
17584 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17586 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17589 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17591 * doc/invoke.texi (-flinker-output): Document
17593 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17595 * passes.c (ipa_write_summaries): Only modify statements if body
17597 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17598 incrementally linking.
17599 (ipa_passes): Likewise.
17600 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17601 pass down resolution info.
17602 * common.opt (flag_incremental_link): Update info.
17603 * gcc.c (plugin specs): Turn flinker-output=* to
17604 -plugin-opt=-linker-output-known
17605 * toplev.c (compile_file): Also cut compilation when doing incremental
17607 * flag-types. (enum lto_partition_model): Add
17608 LTO_LINKER_OUTPUT_NOLTOREL.
17609 (invoke.texi): Add -flinker-output docs.
17610 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17611 link same way as WPA; do not stream in dead initializers.
17613 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17614 darf2out_register_external_decl): Support incremental link.
17616 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17618 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17620 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17622 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17623 it down to simple_object_copy_lto_debug_sections.
17624 (run_gcc): Determine incremental LTO link time and configure
17625 lto1 into non-wpa mode, disable renaming of debug sections.
17627 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17629 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17630 descriptions of various incorrectly documented functions.
17632 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17635 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17636 address check not strict.
17638 2018-05-30 Richard Biener <rguenther@suse.de>
17640 PR tree-optimization/85964
17641 * tracer.c (better_p): Drop initialized count check, we only
17642 call the function with initialized counts now.
17643 (find_best_successor): Do find a best edge if one
17644 has uninitialized count.
17645 (find_best_predecessor): Likewise. Do BB frequency check only
17646 if count is initialized.
17648 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17650 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17651 (aarch64_ldrstr_offset_compare): New.
17652 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17653 load/store orderings.
17654 (aarch64_gen_adjusted_ldpstp): Likewise.
17656 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17658 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17659 Check for subset of GENERAL_REGS and FP_REGS.
17660 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17663 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17665 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17666 and wi::to_poly_offset. Add the current offset and then check
17667 whether the sum fits, rather than using an unchecked addition of
17668 a checked term. Check for a shwi rather than a uhwi.
17669 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17670 (store_constructor): Use poly_int_tree_p.
17671 (expand_expr_real_1): Likewise.
17672 * function.c (assign_temp): Likewise.
17673 * fold-const.c (const_binop): Use poly_int_tree_p and
17674 wi::to_poly_offset.
17675 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17677 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17678 to_poly_offset for MEM offsets.
17679 * ipa-icf.c (sem_variable::equals): Likewise.
17680 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17681 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17682 wi::to_poly_offset for BIT_FIELD_REF offsets.
17683 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17684 wi::to_poly_offset.
17685 * var-tracking.c (emit_note_insn_var_location): Use
17686 tree_to_poly_uint64.
17688 2018-05-29 Jim Wilson <jimw@sifive.com>
17690 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17692 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17695 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17696 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17698 (sse4_1_round<mode>2): Use nonimmediate_operand
17699 for operand 1 predicate.
17701 2018-05-29 Martin Sebor <msebor@redhat.com>
17702 Richard Biener <rguenther@suse.de>
17705 * calls.c (get_size_range): Call determine_value_range instead
17706 of get_value_range..
17707 * tree-vrp.h (determine_value_range): Declared new function.
17708 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17710 2018-05-29 Richard Biener <rguenther@suse.de>
17712 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17713 sure to use non-pattern stmts for get_earlier_stmt arguments.
17714 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17715 called on pattern stmts.
17716 (get_later_stmt): Likewise.
17718 2018-05-29 Martin Liska <mliska@suse.cz>
17720 PR gcov-profile/85759
17721 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17724 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17726 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17728 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17732 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17733 VEC_PACK_FLOAT_EXPR): New tree codes.
17734 * tree-pretty-print.c (op_code_prio): Handle
17735 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17736 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17737 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17738 * tree-inline.c (estimate_operator_cost): Likewise.
17739 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17740 * fold-const.c (const_binop): Likewise.
17741 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17742 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17743 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17744 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17745 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17746 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17747 * expr.c (expand_expr_real_2): Likewise.
17748 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17749 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17750 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17752 * optabs.c (expand_widen_pattern_expr): For
17753 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17754 sign from result type rather than operand's type.
17755 (expand_binop_directly): For vec_packu_float_optab and
17756 vec_packs_float_optab allow result type to be different from operand's
17758 * optabs-tree.c (optab_for_tree_code): Handle
17759 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17760 VEC_PACK_FLOAT_EXPR. Formatting fixes.
17761 * tree-vect-generic.c (expand_vector_operations_1): Handle
17762 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17763 VEC_PACK_FLOAT_EXPR.
17764 * tree-vect-stmts.c (supportable_widening_operation): Handle
17766 (supportable_narrowing_operation): Handle FLOAT_EXPR.
17767 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17768 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17769 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
17770 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17772 (vec_pack<floatprefix>_float_<mode>): New expander.
17773 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17775 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17776 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17777 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17778 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17779 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17781 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17782 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17783 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17784 VEC_PACK_FLOAT_EXPR): Document.
17786 2018-05-29 Richard Biener <rguenther@suse.de>
17788 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17790 (stmt_vec_info_vec): Make pointer.
17791 (init_stmt_vec_info_vec): Remove.
17792 (free_stmt_vec_info_vec): Likewise.
17793 (set_stmt_vec_info_vec): New function.
17794 (free_stmt_vec_infos): Likewise.
17795 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17796 (set_vinfo_for_stmt): Likewise.
17797 (get_earlier_stmt): Likewise.
17798 (get_later_stmt): Likewise.
17799 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17800 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17801 (vec_info::~vec_info): Free stmt_vec_infos.
17802 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17803 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17804 (pass_slp_vectorize::execute): Likewise.
17805 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17806 (free_stmt_vec_info_vec): Likewise.
17807 (set_stmt_vec_info_vec): New function.
17808 (free_stmt_vec_infos): Likewise.
17809 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17810 the global stmt_vec_info_vec.
17811 * tree-parloops.c (gather_scalar_reductions): Use
17812 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17815 2018-05-29 Richard Biener <rguenther@suse.de>
17817 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17819 2018-05-29 Martin Liska <mliska@suse.cz>
17820 David Malcolm <dmalcolm@redhat.com>
17822 * vec.c (test_reverse): New.
17823 (vec_c_tests): Add new test.
17824 * vec.h (vl_ptr>::reverse): New function.
17826 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
17828 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17830 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17833 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17835 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17837 2018-05-28 Richard Biener <rguenther@suse.de>
17839 PR tree-optimization/85933
17840 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17841 look at stmts marked as vectorizable.
17843 2018-05-28 Richard Biener <rguenther@suse.de>
17845 PR tree-optimization/85934
17846 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17847 vector boolean check before scalar optimization.
17849 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17851 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17854 2018-05-28 Mark Wielaard <mark@klomp.org>
17856 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17857 if it is an expression containing a minus sign.
17859 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17861 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17863 2018-05-27 Paul Koning <ni1d@arrl.net>
17865 * config/pdp11/pdp11.md (truncsihi2): Remove.
17867 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17868 Chung-Ju Wu <jasonwucj@gmail.com>
17870 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17872 (unaligned_store_dw): Ditto.
17873 * config/nds32/nds32-memory-manipulation.c
17874 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17875 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17876 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17877 (emit_setmem_word_loop): Rename to ...
17878 (emit_setmem_doubleword_loop): ... this.
17879 (nds32_gen_dup_4_byte_to_word_value): New function.
17880 (nds32_gen_dup_8_byte_to_double_word_value): New function.
17881 (nds32_expand_setmem_loop): Refine implementation.
17882 (nds32_expand_setmem_loop_v3m): Ditto.
17883 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17886 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17888 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17890 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17892 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17893 (nds32_init_machine_status): Initialize machine->attr_naked_p and
17894 machine->attr_no_prologue_p.
17895 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17896 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17897 (nds32_expand_epilogue): Consider attr_naked_p.
17898 (nds32_expand_epilogue_v3pop): Likewise.
17899 (nds32_can_use_return_insn): Likewise.
17900 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17901 attr_no_prologue_p fields.
17902 * config/nds32/nds32.opt (mret-in-naked-func): New option.
17904 2018-05-27 Jakub Jelinek <jakub@redhat.com>
17907 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17909 * config/i386/sse.md
17910 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17912 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17914 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17916 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17918 (*<floatsuffix>floatv2div2sf2): Rename to ...
17919 (*float<floatunssuffix>v2div2sf2): ... this.
17920 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17921 (float<floatunssuffix>v2div2sf2_mask): ... this.
17922 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17923 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17924 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17926 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17928 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17930 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17932 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17934 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17936 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17937 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17938 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17939 gen_ufix_truncv8dfv8si2.
17940 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17941 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17942 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17943 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17944 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17945 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17946 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17947 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17949 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17953 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17955 2018-05-25 Jim Wilson <jimw@sifive.com>
17957 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17958 * config/riscv/riscv.c (struct machine_function): Add
17959 interrupt_handler_p and attribute_checked_p fields.
17960 (riscv_attribute_table): Add interrupt.
17961 (riscv_interrupt_type_p): New.
17962 (riscv_save_reg_p): Save extra regs for interrupt handler.
17963 (riscv_use_save_libcall): Return false for interrupt handler.
17964 (riscv_first_stack_step): Add forward declaration.
17965 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
17966 for interrupt handler with large frame. Use it for saved reg list.
17967 (riscv_expand_prologue): Move flag_stack_usage_info support to
17968 eliminate duplication.
17969 (riscv_expand_epilogue): Generate mret for interrupt handler.
17970 (riscv_epilogue_uses): New.
17971 (riscv_can_use_return_insn): Return false for interrupt handler.
17972 (riscv_function_ok_for_sibcall): Likewise.
17973 (riscv_set_current_function): Add interrupt handler support.
17974 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17975 * config/riscv/riscv.md (UNSPECV_MRET): New.
17977 (riscv_frflags, riscv_fsflags): Use tab after opcode.
17979 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17981 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
17983 PR tree-optimization/85712
17984 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17985 this candidate has already been replaced in-situ by a copy.
17987 2018-05-25 Jason Merrill <jason@redhat.com>
17989 PR c++/80485 - inline function non-zero address.
17990 * symtab.c (nonzero_address): Check DECL_COMDAT.
17992 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17995 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17996 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17997 extension of SImode operation. Use const123_operand predicate.
17998 (*saddsi_1): Remove.
17999 (*saddl_se_1): Ditto.
18000 (*ssubsi_1): Ditto.
18001 (*ssubl_se_1): Ditto.
18002 * config/alpha/predicates.md (const123_operand): New predicate.
18003 * config/alpha/constraints.md (P): Use IN_RANGE.
18005 2018-05-25 Richard Biener <rguenther@suse.de>
18007 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18009 (ref_maybe_used_by_stmt_p): Likewise.
18010 (stmt_may_clobber_ref_p): Likewise.
18011 (stmt_may_clobber_ref_p_1): Likewise.
18012 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18014 (ref_maybe_used_by_stmt_p): Likewise.
18015 (stmt_may_clobber_ref_p): Likewise.
18016 (stmt_may_clobber_ref_p_1): Likewise.
18017 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18018 the alias oracle to disambiguate DRs with stmts DR analysis
18020 (vect_analyze_data_refs): Do not give up on not analyzable
18021 DRs for BB vectorization. Remove code truncating the dataref
18024 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18027 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18028 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18029 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18031 2018-05-25 Richard Biener <rguenther@suse.de>
18033 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18034 function, combining stmt data ref gathering and fatal analysis
18036 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18037 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18038 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18039 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18040 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18042 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18044 PR tree-optimization/85720
18045 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18046 SCC if all partitions are builtins.
18047 (version_loop_by_alias_check): New parameter. Generate cancelable
18048 runtime alias check if all partitions are builtins.
18049 (distribute_loop): Update call to above function.
18051 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18053 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18054 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18055 (parm_default_def_partition_arg): Ditto.
18056 (set_parm_default_def_partition): Ditto.
18057 (get_parm_default_def_partitions): Ditto and make it static.
18058 (get_undefined_value_partitions): Ditto and make it static.
18059 (remove_ssa_form): Refactor call to init_var_map here.
18060 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18061 computation for loop region.
18062 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18063 (register_default_def): Delete.
18064 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18065 (parm_default_def_partition_arg): Ditto.
18066 (set_parm_default_def_partition): Ditto.
18067 (get_parm_default_def_partitions): Ditto and make it static.
18068 (get_undefined_value_partitions): Ditto and make it static.
18069 (coalesce_with_default, coalesce_with_default): Update comment.
18070 (create_coalesce_list_for_region): New func factored out from
18071 create_outofssa_var_map.
18072 (populate_coalesce_list_for_outofssa): New func factored out from
18073 create_outofssa_var_map and coalesce_ssa_name.
18074 (create_outofssa_var_map): Delete.
18075 (coalesce_ssa_name): Refactor to support live range computation.
18076 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18077 (get_parm_default_def_partitions): Delete.
18078 (get_undefined_value_partitions): Ditto.
18079 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18080 computation for loop region.
18081 (new_tree_live_info, loe_visit_block): Ditto.
18082 (live_worklist, set_var_live_on_entry): Ditto.
18083 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18084 * tree-ssa-live.h (struct _var_map): New fields.
18085 (init_var_map): Change decl.
18086 (region_contains_p): New.
18088 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18090 * tree-ssa-live.h (live_merge_and_clear): Delete.
18092 2018-05-25 Richard Biener <rguenther@suse.de>
18095 * tree-dump.c (dequeue_and_dump): Remove access to removed
18096 operand 2 of a SWITCH_EXPR.
18098 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18100 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18101 multiplication and division.
18102 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18103 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18104 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18105 (cond_udiv_optab, cond_umod_optab): New optabs.
18106 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18107 (IFN_COND_RDIV): New internal functions.
18108 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18109 TRUNC_MOD_EXPR and RDIV_EXPR.
18110 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18111 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18113 (SVE_INT_BINARY): Include mult.
18114 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18115 (optab, sve_int_op): Handle mult.
18116 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18118 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18119 for SVE_INT_BINARY_SD.
18121 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18123 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18124 (optab, sve_int_op): Handle div and udiv.
18125 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18126 for SVE_INT_BINARY_SD.
18127 (*<optab><mode>3): New insn for the same.
18129 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18131 * tree-vect-patterns.c: Include predict.h.
18132 (vect_recog_divmod_pattern): Restrict check for division support
18133 to when optimizing for size.
18135 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18137 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18138 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18139 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18140 (gimple_match_op::set_op): Likewise.
18141 (gimple_resimplify4): Declare.
18142 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18143 (expr::gen_transform): Likewise.
18144 (decision_tree::gen): Generate a simplification routine for 4 operands.
18145 * gimple-match-head.c (gimple_simplify): Add an overload for
18146 4 operands. In the top-level function, handle up to 4 call
18147 arguments and call gimple_resimplify4.
18148 (gimple_resimplify4): New function.
18149 (build_call_internal): Pass a fourth operand.
18150 (maybe_push_to_seq): Likewise.
18151 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18152 Fold VEC_COND_EXPRs of an operation and a default value into
18153 an IFN_COND_* function if possible.
18154 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18156 (SVE_COND_FP_BINARY): Include them.
18157 (optab, sve_fp_op): Handle them.
18158 (SVE_INT_BINARY_REV): New code iterator.
18159 (SVE_COND_FP_BINARY_REV): New int iterator.
18160 (commutative): New int attribute.
18161 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18163 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18165 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18166 (*cond_<optab><mode>): New patterns for reversed operands.
18168 2018-05-25 Richard Biener <rguenther@suse.de>
18170 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18171 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18172 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18173 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18174 * tree-vect-data-refs.c (everywhere): Adjust users.
18175 * tree-vect-loop.c (everywhere): Likewise.
18176 * tree-vect-slp.c (everywhere): Likewise.
18177 * tree-vect-stmts.c (everywhere): Likewise.
18178 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18180 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18182 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18184 (gcc_cv_as_section_exclude): ... this.
18185 Try Solaris as #exclude syntax.
18186 * configure: Regenerate.
18187 * config.in: Regenerate.
18188 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18190 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18191 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18193 * varasm.c (default_elf_asm_named_section): Don't check if
18194 HAVE_GAS_SECTION_EXCLUDE is defined.
18196 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18198 * doc/md.texi: Update the documentation of the cond_* optabs
18199 to mention the new final operand. Fix GET_MODE_NUNITS call.
18200 Describe the scalar case too.
18201 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18202 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18204 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18205 (get_conditional_internal_fn): Update comment.
18206 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18207 accumulator value as a final argument to conditional functions.
18208 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18209 a define_expand and add an "else" operand. Assert for now that
18210 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18211 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18212 (*cond_<optab><mode>): New patterns.
18213 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18214 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18215 (UNSPEC_COND_EOR): Delete.
18216 (optab): Remove associated mappings.
18217 (SVE_INT_BINARY): New code iterator.
18218 (sve_int_op): Remove int attribute and add "minus" to the code
18220 (SVE_COND_INT_OP): Delete.
18221 (SVE_COND_FP_OP): Rename to...
18222 (SVE_COND_FP_BINARY): ...this.
18224 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18226 * optabs.c (can_reuse_operands_p): New function.
18227 (maybe_legitimize_operands): Try to reuse the results for
18230 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18232 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18233 Add {q} suffix to insn mnemonic.
18235 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18237 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18238 (msp430_warn_func_return): New.
18240 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18242 * fold-const.c (tree_nonzero_bits): New function.
18243 * fold-const.h (tree_nonzero_bits): Likewise.
18244 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18245 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18247 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18251 * varasm.c (assemble_alias): Check ifunc_resolver only on
18254 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18257 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18258 when memory input operand is handled.
18260 2018-05-24 Luis Machado <luis.machado@linaro.org>
18262 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18264 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18266 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18268 * match.pd: Delay FMA folds until after vectorization.
18270 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18273 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18274 address check not strict.
18276 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18278 * gimple-match.h (gimple_match_op): New class.
18279 (mprts_hook): Replace parameters with a gimple_match_op *.
18280 (maybe_build_generic_op): Likewise.
18281 (gimple_simplified_result_is_gimple_val): Replace parameters with
18282 a const gimple_match_op *.
18283 (gimple_simplify): Replace code_helper * and tree * parameters with
18284 a gimple_match_op * parameter.
18285 (gimple_resimplify1): Replace code_helper *, tree and tree *
18286 parameters with a gimple_match_op * parameter.
18287 (gimple_resimplify2): Likewise.
18288 (gimple_resimplify3): Likewise.
18289 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18290 parameters with a gimple_match_op * parameter.
18291 * gimple-match-head.c (gimple_simplify): Change prototypes of
18292 auto-generated functions to take a gimple_match_op * instead of
18293 separate code_helper * and tree * parameters. Make the same
18294 change in the top-level overload and update calls to the
18295 gimple_resimplify routines. Update calls to the auto-generated
18296 functions and to maybe_push_res_to_seq in the publicly-facing
18297 operation-specific gimple_simplify overloads.
18298 (gimple_match_op::MAX_NUM_OPS): Define.
18299 (gimple_resimplify1): Replace rcode and ops with a single res_op
18300 parameter. Update call to gimple_simplify.
18301 (gimple_resimplify2): Likewise.
18302 (gimple_resimplify3): Likewise.
18303 (mprts_hook): Replace parameters with a gimple_match_op *.
18304 (maybe_build_generic_op): Likewise.
18305 (build_call_internal): Replace type, nargs and ops with
18306 a gimple_match_op *.
18307 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18308 with a single gimple_match_op *. Update calls to mprts_hook,
18309 build_call_internal and gimple_simplified_result_is_gimple_val.
18310 Factor out code that is common to the tree_code and combined_fn cases.
18311 * genmatch.c (expr::gen_transform): Replace tem_code and
18312 tem_ops with a gimple_match_op called tem_op. Update calls
18313 to the gimple_resimplify functions and maybe_push_res_to_seq.
18314 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18315 res_ops. Update call to the gimple_resimplify functions.
18316 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18317 (decision_tree::gen): Make the functions take a gimple_match_op *
18318 called res_op instead of separate res_code and res_ops parameters.
18319 Update call accordingly.
18320 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18321 and ops with a single res_op parameter. Update calls to
18322 maybe_build_generic_op and maybe_push_res_to_seq.
18323 (fold_stmt_1): Update calls to gimple_simplify and
18324 replace_stmt_with_simplification.
18325 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18326 and gimple_simplified_result_is_gimple_val.
18327 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18329 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18330 with a gimple_match_op *.
18331 (vn_nary_build_or_lookup): Likewise. Update call to
18332 vn_nary_build_or_lookup_1.
18333 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18334 gimple_match_op *. Update calls to the gimple_resimplify routines
18335 and to gimple_simplified_result_is_gimple_val.
18336 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18337 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18338 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18339 (visit_nary_op): Likewise.
18340 (visit_reference_op_load): Likewise.
18342 2018-05-23 Luis Machado <luis.machado@linaro.org>
18344 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18345 modifier for printing the step amount.
18347 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18350 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18353 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18355 * doc/sourcebuild.texi (Endianness): New subsubsection.
18357 2018-05-23 Luis Machado <luis.machado@linaro.org>
18359 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18360 <prefetch_dynamic_strides>: New const bool field.
18361 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18362 prefetch_dynamic_strides.
18363 (exynosm1_prefetch_tune): Likewise.
18364 (thunderxt88_prefetch_tune): Likewise.
18365 (thunderx_prefetch_tune): Likewise.
18366 (thunderx2t99_prefetch_tune): Likewise.
18367 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18369 (aarch64_override_options_internal): Update to set
18370 PARAM_PREFETCH_DYNAMIC_STRIDES.
18371 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18372 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18373 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18374 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18375 prefetch-dynamic-strides setting.
18377 2018-05-23 Luis Machado <luis.machado@linaro.org>
18379 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18380 <minimum_stride>: New const int field.
18381 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18382 minimum_stride field defaulting to -1.
18383 (exynosm1_prefetch_tune): Likewise.
18384 (thunderxt88_prefetch_tune): Likewise.
18385 (thunderx_prefetch_tune): Likewise.
18386 (thunderx2t99_prefetch_tune): Likewise.
18387 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18388 <default_opt_level>: Set to 3.
18389 (aarch64_override_options_internal): Update to set
18390 PARAM_PREFETCH_MINIMUM_STRIDE.
18391 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18392 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18393 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18394 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18395 stride is constant and is below the minimum stride threshold.
18397 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18399 * config/arm/arm-cpus.in (mode26): Delete.
18400 (armv4): Delete mode26 reference.
18401 * config/arm/arm.c (arm_configure_build_target): Delete use of
18404 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18406 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18408 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18409 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18411 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18412 (floatunsdidf2): Ditto.
18414 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18416 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18417 (fixuns_trunc<mode>si2_avx512f): Ditto.
18418 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18419 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18420 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18422 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18424 PR rtl-optimization/79985
18425 * df-scan.c (df_insn_refs_collect): Remove special case for
18426 global registers and asm statements.
18428 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18430 * extend.texi (Global Register Variables): Rewrite the bullet list.
18431 Note that the register is available for allocation. Note that access
18432 via inline asm must use constraints. Add note about async-signal
18433 handlers. Remove paragraph about automagic register selection.
18435 2018-05-23 Richard Biener <rguenther@suse.de>
18437 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18438 of fixed offset from memset VN.
18440 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18442 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18443 first_interp field.
18444 (alloc_cand_and_find_basis): Initialize first_interp field.
18445 (slsr_process_mul): Modify first_interp field.
18446 (slsr_process_add): Likewise.
18447 (slsr_process_cast): Modify first_interp field for each new
18449 (slsr_process_copy): Likewise.
18450 (dump_candidate): Dump first_interp field.
18451 (replace_mult_candidate): Process all interpretations, not just
18453 (replace_rhs_if_not_dup): Likewise.
18454 (replace_one_candidate): Likewise.
18456 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18458 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18460 (aarch64_needs_frame_chain): New function.
18461 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18463 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18466 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18467 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18468 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18469 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18470 as true for strict-align.
18471 (aarch64_can_inline_p): Perform checks even when callee has no
18472 attributes to check for strict alignment.
18473 * doc/extend.texi (AArch64 Function Attributes): Document
18475 * doc/invoke.texi: (AArch64 Options): Likewise.
18477 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18479 PR tree-optimization/85853
18480 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18481 the handling of the root of the node to...
18482 (vect_slp_analyze_node_operations_1): ...this new function,
18483 and run the whole thing with the child nodes' def types
18484 set according to their SLP node's def type.
18486 2018-05-23 Richard Biener <rguenther@suse.de>
18488 PR middle-end/85874
18489 * tree-data-ref.c (create_runtime_alias_checks): Defer
18490 and ignore overflow warnings.
18492 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18494 PR tree-optimization/85822
18495 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18498 2018-05-23 Richard Biener <rguenther@suse.de>
18500 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18501 memset constants via native_interpret_expr.
18503 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18506 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18508 (cgraph_node::create_alias): Likewise.
18509 (cgraph_node::get_availability): Check ifunc_resolver instead
18510 of looking up ifunc attribute.
18511 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18512 * varasm.c (do_assemble_alias): Likewise.
18513 (assemble_alias): Likewise.
18514 (default_binds_local_p_3): Likewise.
18515 * cgraph.h (cgraph_node): Add ifunc_resolver.
18516 (cgraph_node::only_called_directly_or_aliased_p): Return false
18517 for IFUNC resolver.
18518 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18520 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18521 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18522 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18523 instead of looking up ifunc attribute.
18525 2018-05-22 Luis Machado <luis.machado@linaro.org>
18527 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18529 2018-05-22 Martin Sebor <msebor@redhat.com>
18531 PR middle-end/85359
18532 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18533 only when expasion succeeds.
18534 (expand_builtin_strcmp): Same.
18535 (expand_builtin_strncmp): Same.
18537 2018-05-22 Martin Sebor <msebor@redhat.com>
18539 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18541 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18542 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18544 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18545 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18547 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18548 Add check for legitimate_address.
18549 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18550 (aarch64_swap_ldrstr_operands): New.
18551 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18554 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18555 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18557 * config/aarch64/aarch64.md: New patterns to generate stp
18559 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18560 single words and double words.
18561 (load_pair_sw, load_pair_dw): Likewise.
18562 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18564 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18566 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18567 for different mode ldpstp and add peephole for merged zero stores.
18568 Likewise for loads.
18569 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18571 (aarch64_gen_store_pair): Rename calls to match new patterns.
18572 (aarch64_gen_load_pair): Rename calls to match new patterns.
18573 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18574 (load_pair<DREG:mode><DREG2:mode>): ... This.
18575 (store_pair<mode>): Rename to...
18576 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18577 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18578 New mode iterators.
18579 (V_INT_EQUIV): Handle SImode.
18580 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18583 2018-05-22 Martin Sebor <msebor@redhat.com>
18586 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18587 or ajust the presumed bound on an operation to avoid unnecessary
18590 2018-05-22 Martin Sebor <msebor@redhat.com>
18592 PR tree-optimization/85826
18593 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18594 assuming that a DECL necesarily has a constant size.
18596 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18598 PR middle-end/85862
18599 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18601 2018-05-22 Richard Biener <rguenther@suse.de>
18603 PR tree-optimization/85834
18604 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18605 non-constant and non-zero memset arguments.
18607 2018-05-22 Martin Liska <mliska@suse.cz>
18610 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18612 2018-05-22 Richard Biener <rguenther@suse.de>
18614 PR tree-optimization/85863
18615 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18616 comparisons when vectype is specified.
18617 (vectorizable_condition): Do not specify vectype for
18618 vect_is_simple_cond when SLP vectorizing.
18620 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18623 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18624 define __ibm128 as long double.
18625 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18626 as a distinct type when IEEE 128-bit support is enabled.
18627 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18628 128-bit types to use the correct functions.
18629 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18630 convert between 128-bit floating point types that have different
18631 modes but the same representation, instead of using gen_lowpart to
18633 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18635 (IFKF_reg): New attributes to give the register constraints for
18637 (extend<mode>tf2_internal): New insns to mark an explicit
18638 conversion between 128-bit floating point types that have a
18639 different mode but share the same representation.
18641 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18643 PR tree-optimization/85814
18644 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18645 a null return from get_strinfo when unsharing the next
18646 strinfo in the chain.
18648 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18651 * varasm.c (weak_finish): Clean up weak_decls.
18653 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18655 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18656 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18657 UNSPEC_UADALP values.
18658 * config/aarch64/iterators.md (ABAL): New int iterator.
18661 (sur): Add mappings for the above.
18662 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18664 (aarch64_<sur>abal<mode>_4): Likewise.
18665 (aarch64_<sur>adalp<mode>_3): Likewise.
18666 (<sur>sadv16qi): New define_expand.
18668 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18670 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18671 (*movdf_internal): Ditto.
18672 (*rcpsf2_sse): Ditto.
18673 (*rsqrtsf2_sse): Ditto.
18674 (*sqrt<mode>2_sse): Ditto.
18676 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18678 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18680 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18681 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18682 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18683 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18685 * config/aarch64/arm_neon.h: Likewise.
18686 * config/aarch64/iterators.md (VQ_I): New.
18688 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18690 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18692 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18695 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18697 * config/nds32/constraints.md (S): New constraint.
18698 * config/nds32/nds32.md (call_internal): Use constraint S.
18699 (call_value_internal): Likewise.
18700 (sibcall_internal): Likewise.
18701 (sibcall_value_internal): Likewise.
18703 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18704 Chung-Ju Wu <jasonwucj@gmail.com>
18706 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18707 into consideration.
18709 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18710 Chung-Ju Wu <jasonwucj@gmail.com>
18712 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18713 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18714 (nds32_rtx_costs_impl): Simplify.
18715 (nds32_address_cost_impl): Simplify.
18716 (nds32_init_rtx_costs): New function.
18717 (nds32_rtx_costs_speed_prefer): Likewise.
18718 (nds32_rtx_costs_size_prefer): Likewise.
18719 (nds32_address_cost_speed_prefer): Likewise.
18720 (nds32_address_cost_speed_fwprop): Likewise.
18721 (nds32_address_cost_size_prefer): Likewise.
18722 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18723 * config/nds32/nds32.c (nds32_option_override): Use
18724 nds32_init_rtx_costs function.
18726 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18728 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18729 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18730 (TARGET_PIPELINE_N8): Likewise.
18731 (TARGET_PIPELINE_N10): Likewise.
18732 (TARGET_PIPELINE_N13): Likewise.
18733 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18735 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18737 * config/nds32/nds32-fpu.md: Update copyright year.
18739 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18741 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18743 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18745 * config/nds32/nds32.c
18746 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18747 * config/nds32/nds32.opt (minline-asm-r15): New option.
18749 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18751 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18753 * config/nds32/nds32.md (abssi2): New pattern.
18755 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
18757 * config/i386/i386.md (rex64namesuffix): New mode attribute.
18758 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18759 Merge insn pattern from sse_cvtsi2ss<round_name> and
18760 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18761 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18762 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18763 using SWI48 mode iterator.
18764 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18765 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18766 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18767 pattern from sse_cvttss2si<round_saeonly_name>
18768 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18769 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18770 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18771 using SWI48 mode iterator.
18772 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18773 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18774 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18775 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18776 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18777 using SWI48 mode iterator.
18778 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18779 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18780 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18781 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18782 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18783 SWI48 mode iterator.
18784 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18785 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18786 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18787 pattern from sse_cvttsd2si<round_saeonly_name>
18788 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18790 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18792 * config/nds32/nds32-md-auxiliary.c
18793 (nds32_valid_smw_lwm_base_p): Refine.
18794 (nds32_output_smw_single_word): Refine.
18795 (nds32_output_smw_double_word): New.
18796 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18798 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18800 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18801 (nds32_output_stack_pop): Refine.
18802 (nds32_expand_unaligned_load): Refine.
18803 (nds32_expand_unaligned_store): Refine.
18805 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18806 Chung-Ju Wu <jasonwucj@gmail.com>
18808 * config/nds32/constants.md: Add TP_REGNUM constant.
18809 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18810 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18812 * config/nds32/nds32-doubleword.md: Consider flag_pic.
18813 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18814 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18815 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18816 and PIC code generation.
18817 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18819 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18821 * config/nds32/nds32.md: Support TLS and PIC.
18822 * config/nds32/nds32.c: Support TLS and PIC.
18823 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18824 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18827 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18829 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18830 mode with E_ prefix.
18832 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18833 Chung-Ju Wu <jasonwucj@gmail.com>
18835 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18836 * config/nds32/nds32-md-auxiliary.c
18837 (symbolic_reference_mentioned_p): New.
18838 (nds32_legitimize_ict_address): New.
18839 (nds32_expand_ict_move): New.
18840 (nds32_indirect_call_referenced_p): New.
18841 (nds32_symbol_binds_local_p): Delete.
18842 (nds32_long_call_p): Modify.
18843 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18844 * config/nds32/nds32-protos.h
18845 (symbolic_reference_mentioned_p): Declare.
18846 (nds32_legitimize_ict_address): Declare.
18847 (nds32_expand_ict_move): Declare.
18848 (nds32_indirect_call_referenced_p): Declare.
18849 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18850 (nds32_relax_group): Use nds32_ict_const_p as condition.
18851 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18852 (nds32_asm_file_start): Output ict_model directive in asm code.
18853 (nds32_legitimate_address_p): Consider indirect call.
18854 (nds32_print_operand): Consider indirect call.
18855 (nds32_print_operand_address): Consider indirect call.
18856 (nds32_insert_attributes): Handle "indirect_call" attribute.
18857 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18858 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18859 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18860 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18861 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18862 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18863 (TARGET_ICT_MODEL_SMALL): Define.
18864 (TARGET_ICT_MODEL_LARGE): Define.
18865 * config/nds32/nds32.md (movsi): Consider ict model.
18866 (call, call_value): Consider ict model.
18867 (sibcall, sibcall_value): Consider ict model.
18868 * config/nds32/nds32.opt (mict-model): New option.
18869 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18872 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18873 Monk Chiang <sh.chiang04@gmail.com>
18874 Jim Wilson <jimw@sifive.com>
18876 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18877 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18878 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18879 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18880 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
18881 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18882 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18883 compute save_libcall_adjustment properly.
18884 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18885 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18886 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18887 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18888 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18889 (ABI_SPEC): Handle mabi=ilp32e.
18890 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18891 (RVE): Add RVE mask.
18892 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18893 <-march>: Add rv32e as an example.
18895 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
18898 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18899 (intra_create_variable_infos): Handle C++ constructors.
18901 2018-05-18 Martin Liska <mliska@suse.cz>
18903 * passes.def: Remove a redundant pass.
18905 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
18908 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18910 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18912 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18914 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18916 (armv2, armv2a, armv3, armv3m): Delete architectures.
18917 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18918 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18919 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18921 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18922 (*mulsidi3adddi): Likewise.
18923 (mulsidi3): Likewise.
18924 (*mulsidi3_nov6): Likewise.
18925 (umulsidi3): Likewise.
18926 (umulsidi3_nov6): Likewise.
18927 (umaddsidi4): Likewise.
18928 (*umulsidi3adddi): Likewise.
18929 (smulsi3_highpart): Likewise.
18930 (*smulsi3_highpart_nov6): Likewise.
18931 (umulsi3_highpart): Likewise.
18932 (*umulsi3_highpart_nov6): Likewise.
18933 * config/arm/arm.h (arm_arch3m): Delete.
18934 * config/arm/arm.c (arm_arch3m): Delete.
18935 (arm_option_override_internal): Update armv3-related comment.
18936 (arm_configure_build_target): Delete use of isa_bit_mode32.
18937 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18938 (arm_rtx_costs_internal): Delete check of arm_arch3m.
18939 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18940 (mulsa3): Likewise.
18941 (mulusa3): Likewise.
18942 * config/arm/arm-protos.h (arm_arch3m): Delete.
18943 * config/arm/arm-tables.opt: Regenerate.
18944 * config/arm/arm-tune.md: Likewise.
18945 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18946 deleted architectures.
18948 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18950 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18951 (armv5t, armv5te): New features.
18952 (ARMv5, ARMv5e): Delete fgroups.
18953 (ARMv5t, ARMv5te): Adjust for above changes.
18954 (ARMv6m): Likewise.
18955 (armv5, armv5e): Delete arches.
18956 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18958 (*call_reg_arm): Likewise.
18959 (*call_value_reg_armv5): Likewise.
18960 (*call_value_reg_arm): Likewise.
18961 (*call_symbol): Likewise.
18962 (*call_value_symbol): Likewise.
18963 (*sibcall_insn): Likewise.
18964 (*sibcall_value_insn): Likewise.
18965 (clzsi2): Likewise.
18966 (prefetch): Likewise.
18967 (define_split and define_peephole2 dependent on arm_arch5):
18969 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18971 (TARGET_ARM_QBIT): Likewise.
18972 (TARGET_DSP_MULTIPLY): Likewise.
18973 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18974 (arm_arch5, arm_arch5e): Delete.
18975 (arm_arch5t, arm_arch5te): Declare.
18976 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18977 (arm_arch5t): Declare.
18978 (arm_option_reconfigure_globals): Update for the above.
18979 (arm_options_perform_arch_sanity_checks): Update comment, replace
18980 use of arm_arch5 with arm_arch5t.
18981 (use_return_insn): Likewise.
18982 (arm_emit_call_insn): Likewise.
18983 (output_return_instruction): Likewise.
18984 (arm_final_prescan_insn): Likewise.
18985 (arm_coproc_builtin_available): Likewise.
18986 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18987 arm_arch5e with arm_arch5t and arm_arch5te.
18988 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18989 (arm_arch5t, arm_arch5te): Declare.
18990 * config/arm/arm-tables.opt: Regenerate.
18991 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18992 * config/arm/t-multilib: Likewise.
18993 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18994 instead of arm_arch5.
18995 (*call_reg_thumb1): Likewise.
18996 (*call_value_reg_thumb1_v5): Likewise.
18997 (*call_value_reg_thumb1): Likewise.
18998 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19000 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19002 2018-05-18 Martin Liska <mliska@suse.cz>
19004 PR gcov-profile/84846
19005 * doc/gcov.texi: Document -t option of gcov tool.
19007 2018-05-18 Martin Liska <mliska@suse.cz>
19009 PR gcov-profile/84846
19010 * gcov.c (print_usage): Add new -t option.
19011 (process_args): Handle the option.
19012 (generate_results): Use stdout as output when requested by
19015 2018-05-18 Martin Liska <mliska@suse.cz>
19017 PR gcov-profile/84846
19018 * coverage.c (coverage_init): Write PWD to .gcno file.
19019 * doc/gcov.texi: Document how working directory is printed.
19020 * gcov-dump.c (dump_gcov_file): Print PWD.
19021 * gcov.c (output_intermediate_file): Likewise.
19022 (read_graph_file): Read PWD string.
19023 (output_lines): Print PWD.
19025 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19027 PR middle-end/85817
19028 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19029 for retval and return false if all args to phi are zero.
19031 2018-05-18 Richard Biener <rguenther@suse.de>
19033 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19035 (evrp_dom_walker::before_dom_children): Call it.
19037 2018-05-18 Richard Biener <rguenther@suse.de>
19039 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19040 results when processing array refs with variable index.
19042 2018-05-18 Toon Moene <toon@moene.org>
19044 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19045 directly after that of -floop-interchange. Indicate that both
19046 options are enabled by default when specifying -O3.
19048 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19050 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19051 iterator. Delete separate integer-mode vec_set<mode> expander.
19052 (aarch64_simd_vec_setv2di): Delete.
19053 (vec_setv2di): Delete.
19054 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19055 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19056 the "w, r" alternative.
19058 2018-05-18 Martin Liska <mliska@suse.cz>
19060 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19061 * tree-pass.h (make_pass_lower_switch_O0): New function.
19062 * tree-switch-conversion.c (node_has_low_bound): Remove.
19063 (node_has_high_bound): Likewise.
19064 (node_is_bounded): Likewise.
19065 (class pass_lower_switch): Make it a template type and create
19067 (pass_lower_switch::execute): Add template argument.
19068 (make_pass_lower_switch): New function.
19069 (make_pass_lower_switch_O0): New function.
19070 (do_jump_if_equal): Remove.
19071 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19072 all the hard work to tree optimization passes.
19074 2018-05-18 Martin Liska <mliska@suse.cz>
19076 * dbgcnt.c (limit_low): Renamed from limit.
19077 (limit_high): New variable.
19078 (dbg_cnt_is_enabled): Check for upper limit.
19079 (dbg_cnt): Adjust dumping.
19080 (dbg_cnt_set_limit_by_index): Add new argument for high
19082 (dbg_cnt_set_limit_by_name): Likewise.
19083 (dbg_cnt_process_single_pair): Parse new format.
19084 (dbg_cnt_process_opt): Use strtok.
19085 (dbg_cnt_list_all_counters): Remove 'value' and add
19087 * doc/invoke.texi: Document changes.
19089 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19091 * doc/sourcebuild.texi (scalar_all_fma): Document.
19092 * tree.def (FMA_EXPR): Delete.
19093 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19094 * internal-fn.c (ternary_direct): New macro.
19095 (expand_ternary_optab_fn): Likewise.
19096 (direct_ternary_optab_supported_p): Likewise.
19097 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19098 * builtins.c (fold_builtin_fma): Delete.
19099 (fold_builtin_3): Don't call it.
19100 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19101 * expr.c (expand_expr_real_2): Likewise.
19102 * fold-const.c (operand_equal_p): Likewise.
19103 (fold_ternary_loc): Likewise.
19104 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19105 * gimple.c (DEFTREECODE): Likewise.
19106 * gimplify.c (gimplify_expr): Likewise.
19107 * optabs-tree.c (optab_for_tree_code): Likewise.
19108 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19109 * tree-eh.c (operation_could_trap_p): Likewise.
19110 (stmt_could_throw_1_p): Likewise.
19111 * tree-inline.c (estimate_operator_cost): Likewise.
19112 * tree-pretty-print.c (dump_generic_node): Likewise.
19113 (op_code_prio): Likewise.
19114 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19115 * tree-ssa-operands.c (get_expr_operands): Likewise.
19116 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19117 * fold-const-call.h (fold_fma): Delete.
19118 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19119 CFN_FNMA and CFN_FNMS.
19120 (fold_fma): Delete.
19121 * genmatch.c (combined_fn): New enum.
19122 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19123 (commutative_op): New function.
19124 (commutate): Use it. Handle more than 2 operands.
19125 (dt_operand::gen_gimple_expr): Use commutative_op.
19126 (parser::parse_expr): Allow :c to be used with non-binary
19127 operators if the commutative operand is known.
19128 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19129 CFN_FMS, CFN_FNMA and CFN_FNMS.
19130 (backprop::process_assign_use): Remove FMA_EXPR handling.
19131 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19132 (gen_hsa_fma): New function.
19133 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19134 IFN_FNMA and IFN_FNMS.
19135 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19136 * gimple-fold.h (follow_all_ssa_edges): Declare.
19137 * gimple-fold.c (follow_all_ssa_edges): New function.
19138 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19139 gimple_build interface and use follow_all_ssa_edges to fold the result.
19140 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19141 instead of checking for optabs directly.
19142 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19143 rather than FMA_EXPRs.
19144 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19145 call to IFN_FMA instead of an FMA_EXPR.
19147 2018-05-17 Jim Wilson <jimw@sifive.com>
19149 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19150 sign extended promoted subreg, and the range does not have the sign bit
19151 set, then do a sign extend.
19153 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19154 test, check for sign extended subreg and/or constant operands, and
19155 do a sign extend in that case.
19157 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19159 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19160 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19162 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19163 Change logics_shift_reg to logics_shift_imm.
19164 (thunderx2t99_fp_loadpair_basic): Delete.
19165 (thunderx2t99_fp_storepair_basic): Delete.
19166 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19167 (thunderx2t99_asimd_polynomial): Delete.
19168 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19169 and neon_fp_mul_d_scalar_q.
19170 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19171 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19172 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19173 (thunderx2t99_asimd_lut): Add missing tbl types.
19174 (thunderx2t99_asimd_ext): Delete.
19175 (thunderx2t99_asimd_load1_1_mult): Delete.
19176 (thunderx2t99_asimd_load1_2_mult): Delete.
19177 (thunderx2t99_asimd_load1_ldp): New.
19178 (thunderx2t99_asimd_load1): New.
19179 (thunderx2t99_asimd_load2): Add missing *load2* types.
19180 (thunderx2t99_asimd_load3): New.
19181 (thunderx2t99_asimd_load4): New.
19182 (thunderx2t99_asimd_store1_1_mult): Delete.
19183 (thunderx2t99_asimd_store1_2_mult): Delete.
19184 (thunderx2t99_asimd_store2_mult): Delete.
19185 (thunderx2t99_asimd_store2_onelane): Delete.
19186 (thunderx2t99_asimd_store_stp): New.
19187 (thunderx2t99_asimd_store1): New.
19188 (thunderx2t99_asimd_store2): New.
19189 (thunderx2t99_asimd_store3): New.
19190 (thunderx2t99_asimd_store4): New.
19192 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19194 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19195 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19197 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19198 Segher Boessenkool <segher@kernel.crashing.org>
19201 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19204 2018-05-17 Richard Biener <rguenther@suse.de>
19206 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19207 for pruning loop and prune defs feeding only already visited PHIs.
19209 2018-05-17 Richard Biener <rguenther@suse.de>
19211 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19213 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19214 Richard Biener <rguenther@suse.de>
19216 PR tree-optimization/85793
19217 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19218 for VMAT_ELEMENTWISE.
19220 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19222 * internal-fn.h (lookup_internal_fn): Declare
19223 * internal-fn.c (lookup_internal_fn): New function.
19224 * gimple.c (gimple_build_call_from_tree): Handle calls to
19225 internal functions.
19226 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19227 internal function names.
19228 * tree-pretty-print.c (dump_generic_node): Likewise.
19229 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19231 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19233 * gimple-fold.h (gimple_build): Make the function forms take
19234 combined_fn rather than built_in_function.
19235 (gimple_simplify): Likewise.
19236 * gimple-match-head.c (gimple_simplify): Likewise.
19237 * gimple-fold.c (gimple_build): Likewise.
19238 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19239 rather than gimple_build_call_internal.
19240 (get_initial_defs_for_reduction): Likewise.
19241 (vect_create_epilog_for_reduction): Likewise.
19242 (vectorizable_live_operation): Likewise.
19244 2018-05-17 Martin Liska <mliska@suse.cz>
19246 * gimple-ssa-sprintf.c (format_directive): Do not use
19247 space in between 'G_' and '('.
19249 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19252 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19253 even if the mask is not all ones.
19256 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19258 (ix86_gimple_fold_builtin): Likewise.
19261 * config/i386/i386.c: Include tree-vector-builder.h.
19262 (ix86_vector_shift_count): New function.
19263 (ix86_fold_builtin): Fold shift builtins by scalar count.
19264 (ix86_gimple_fold_builtin): Likewise.
19266 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19267 _mm512_setzero): New intrinsics.
19269 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19270 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19272 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19273 code generation for cases where splatting a value is not useful.
19274 * simplify-rtx.c (simplify_ternary_operation): Simplify
19275 vec_merge across a vec_duplicate and a paradoxical subreg forming
19276 a vector mode to a vec_concat.
19278 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19280 * config.gcc: Support "goldmont-plus".
19281 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19283 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19284 PROCESSOR_GOLDMONT_PLUS.
19285 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19286 (processor_target_table): Add "goldmont-plus".
19287 (PTA_GOLDMONT_PLUS): Define.
19288 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19289 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19290 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19291 (fold_builtin_cpu): Add "goldmont-plus".
19292 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19293 (ix86_option_override_internal): Add "goldmont-plus".
19294 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19295 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19296 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19297 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19299 2018-05-17 Richard Biener <rguenther@suse.de>
19301 PR tree-optimization/85757
19302 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19303 remove defs that only feed that PHI from further processing.
19305 2018-05-16 Jim Wilson <jimw@sifive.com>
19307 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19309 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19311 2018-05-16 Mark Wielaard <mark@klomp.org>
19313 * dwarf2out.c (count_index_strings): New function.
19314 (output_indirect_strings): Call count_index_strings and generate
19315 header for dwarf_version >= 5.
19317 2018-05-16 Mark Wielaard <mark@klomp.org>
19319 * dwarf2out.c (dwarf_FORM): New function.
19320 (set_indirect_string): Use dwarf_FORM.
19321 (reset_indirect_string): Likewise.
19322 (size_of_die): Likewise.
19323 (value_format): Likewise.
19324 (output_die): Likewise.
19325 (add_skeleton_AT_string): Likewise.
19326 (output_macinfo_op): Likewise.
19327 (index_string): Likewise.
19328 (output_index_string_offset): Likewise.
19329 (output_index_string): Likewise.
19330 (count_index_strings): Likewise.
19332 2018-05-16 Carl Love <cel@us.ibm.com>
19334 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19335 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19337 2018-05-16 Martin Jambor <mjambor@suse.cz>
19339 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19340 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19342 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19344 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19345 (fnma<mode>4): Likewise.
19346 (fms<mode>4): Likewise.
19347 (fnms<mode>4): Likewise.
19348 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19349 (aarch64_fnma<mode>4): Likewise.
19350 (aarch64_fms<mode>4): Likewise.
19351 (aarch64_fnms<mode>4): Likewise.
19352 (aarch64_fnmadd<mode>4): Likewise.
19354 2018-05-16 Jason Merrill <jason@redhat.com>
19356 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19358 2018-05-16 Richard Biener <rguenther@suse.de>
19360 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19361 (dump_stmt_cost): Declare.
19362 (add_stmt_cost): Dump cost we add.
19363 (add_stmt_costs): New function.
19364 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19365 No longer exported.
19366 (vect_analyze_stmt): Adjust prototype.
19367 (vectorizable_condition): Likewise.
19368 (vectorizable_live_operation): Likewise.
19369 (vectorizable_reduction): Likewise.
19370 (vectorizable_induction): Likewise.
19371 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19372 cost vector to pass to vectorizable_ and record afterwards.
19373 (vect_model_reduction_cost): Take cost vector argument and adjust.
19374 (vect_model_induction_cost): Likewise.
19375 (vectorizable_reduction): Likewise.
19376 (vectorizable_induction): Likewise.
19377 (vectorizable_live_operation): Likewise.
19378 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19379 SLP_TREE_NUMBER_OF_VEC_STMTS.
19380 (vect_analyze_slp_cost_1): Remove.
19381 (vect_analyze_slp_cost): Likewise.
19382 (vect_slp_analyze_node_operations): Take visited args and
19383 a target cost vector. Avoid processing already visited stmt sets.
19384 (vect_slp_analyze_operations): Use a local cost vector to gather
19385 costs and register those of non-discarded instances.
19386 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19387 (vect_schedule_slp_instance): Remove copying of
19388 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19390 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19391 adding cost. Record cost entry location.
19392 (vect_prologue_cost_for_slp_op): Function to compute cost of
19393 a constant or invariant generated for SLP vect in the prologue,
19394 split out from vect_analyze_slp_cost_1.
19395 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19396 (vect_model_promotion_demotion_cost): Likewise.
19397 (vect_model_store_cost): Likewise, make static.
19398 (vect_model_load_cost): Likewise.
19399 (vectorizable_bswap): Add cost vector arg and adjust.
19400 (vectorizable_call): Likewise.
19401 (vectorizable_simd_clone_call): Likewise.
19402 (vectorizable_conversion): Likewise.
19403 (vectorizable_assignment): Likewise.
19404 (vectorizable_shift): Likewise.
19405 (vectorizable_operation): Likewise.
19406 (vectorizable_store): Likewise.
19407 (vectorizable_load): Likewise.
19408 (vectorizable_condition): Likewise.
19409 (vectorizable_comparison): Likewise.
19410 (can_vectorize_live_stmts): Likewise.
19411 (vect_analyze_stmt): Likewise.
19412 (vect_transform_stmt): Adjust calls to vectorizable_*.
19413 * tree-vectorizer.c: Include gimple-pretty-print.h.
19414 (dump_stmt_cost): New function.
19416 2018-05-16 Richard Biener <rguenther@suse.de>
19418 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19419 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19420 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19421 (check_name): New callback.
19422 (dse_classify_store): Track cycles via a visited bitmap of PHI
19423 defs and simplify handling of in-loop and across loop dead stores
19424 and properly fail for loop-variant refs. Handle byte-tracking with
19425 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19428 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19430 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19431 (vect_get_mask_type_for_stmt): Likewise.
19432 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19434 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19435 to determine the statement's vector type and the vector type that
19436 should be used for calculating nunits. Deal with cases in which
19437 the type has to be deferred.
19438 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19439 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19440 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19441 (vect_determine_vf_for_stmt): New functions, split out from...
19442 (vect_determine_vectorization_factor): ...here.
19443 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19444 (vect_get_mask_type_for_stmt): New functions, split out from
19445 vect_determine_vectorization_factor.
19447 2018-05-16 Richard Biener <rguenther@suse.de>
19449 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19450 verify the [VEC_]COND_EXPR embedded comparison.
19452 2018-05-15 Martin Sebor <msebor@redhat.com>
19454 PR tree-optimization/85753
19455 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19456 RECORD_TYPE in addition to ARRAY_TYPE.
19458 2018-05-15 Martin Sebor <msebor@redhat.com>
19460 PR middle-end/85643
19461 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19463 2018-05-15 Richard Biener <rguenther@suse.de>
19465 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19466 add by_clobber_p one. Change algorithm to collect all defs
19467 representing uses we need to walk and try reducing them to
19468 a single one before failing.
19469 (dse_dom_walker::dse_optimize_stmt): Adjust.
19471 2018-05-13 Mark Wielaard <mark@klomp.org>
19473 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19474 (size_of_loc_descr): Likewise.
19475 (output_loc_operands): Likewise.
19476 (output_loc_operands_raw): Likewise.
19477 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19478 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19479 (hash_loc_operands): Likewise.
19480 (compare_loc_operands): Likewise.
19482 2018-05-14 Mark Wielaard <mark@klomp.org>
19484 * dwarf2out.c (count_index_addrs): New function.
19485 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19487 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19489 PR tree-optimization/83648
19490 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19491 return value as malloc candidate.
19493 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19496 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19497 param as true in call to suggest_attribute.
19499 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19501 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19502 -mreadonly-in-sdata.
19504 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19506 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19508 (aarch64_crypto_aesd_fused): Likewise.
19510 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19512 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19513 (movsi_aarch64): Likewise.
19514 (load_pairsi): Likewise.
19515 (load_pairdi): Likewise.
19516 (store_pairsi): Likewise.
19517 (store_pairdi): Likewise.
19518 (load_pairsf): Likewise.
19519 (load_pairdf): Likewise.
19520 (store_pairsf): Likewise.
19521 (store_pairdf): Likewise.
19522 (zero_extend): Likewise.
19523 (trunc): Swap alternatives.
19524 (fcvt_target): Add '?' to prefer w over r.
19526 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19529 * config/i386/i386.md: Disallow non-commutative arithmetics in
19530 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19531 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19532 in the peephole2 before it.
19534 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19536 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19537 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19538 (ix86_handle_option): Handle -mcldemote.
19539 * config.gcc: New header.
19540 * config/i386/cldemoteintrin.h: New file.
19541 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19542 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19544 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19545 OPTION_MASK_ISA_CLDEMOTE.
19546 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19547 (ix86_valid_target_attribute_inner_p): Ditto.
19548 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19549 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19550 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19551 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19552 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19554 * config/i386/i386.opt: Add -mcldemote.
19555 * config/i386/x86intrin.h: New header.
19556 * doc/invoke.texi: Add -mcldemote.
19558 2018-05-14 Richard Biener <rguenther@suse.de>
19560 * doc/match-and-simplify.texi: Adjust :s documentation.
19562 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19564 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19565 intended memcpy size.
19566 (REORDER_45): Likewise.
19568 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19570 * sort.cc: New file.
19571 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19572 * vec.c (qsort_chk): Use gcc_qsort.
19573 * Makefile.in (OBJS-libcommon): Add sort.o.
19574 (build/sort.o): New target. Use it...
19575 (BUILD_RTL): ... here, and...
19576 (build/gencfn-macros): ... here, and...
19577 (build/genmatch): ... here.
19579 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19580 Chung-Ju Wu <jasonwucj@gmail.com>
19582 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19583 * config/nds32/nds32-graywolf.md: New file.
19584 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19585 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19587 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19588 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19589 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19590 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19591 * config/nds32/pipelines.md: Include n15 settings.
19593 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19594 Chung-Ju Wu <jasonwucj@gmail.com>
19596 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19597 * config/nds32/nds32-n13.md: New file.
19598 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19599 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19601 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19602 * config/nds32/nds32.md (pipeline_model): Add n13.
19603 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19604 * config/nds32/pipelines.md: Include n13 settings.
19606 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19607 Chung-Ju Wu <jasonwucj@gmail.com>
19609 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19610 * config/nds32/nds32-n10.md: New file.
19611 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19612 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19614 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19615 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19616 * config/nds32/nds32.md (pipeline_model): Add n10.
19617 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19618 * config/nds32/pipelines.md: Include n10 settings.
19620 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19621 Kito Cheng <kito.cheng@gmail.com>
19622 Chung-Ju Wu <jasonwucj@gmail.com>
19624 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19625 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19626 Add enum values for DSP extension instructions.
19627 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19629 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19630 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19631 New code iterators.
19632 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19633 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19634 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19635 * config/nds32/nds32-intrinsic.md: Likewise.
19636 * config/nds32/nds32_intrinsic.h: Likewise.
19637 * config/nds32/nds32-md-auxiliary.c: Likewise.
19638 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19639 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19640 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19641 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19642 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19643 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19644 TYPE_DMAC in switch statement.
19645 * config/nds32/nds32.c: New checking and implementation for DSP
19646 extension instructions.
19647 * config/nds32/nds32.h: Likewise.
19648 * config/nds32/nds32.md: Likewise.
19649 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19650 * config/nds32/predicates.md: Implement new predicates for DSP
19653 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19655 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19656 Reformat alternatives and attributes so it is easier to identify
19657 which constraints/attributes go with which instruction.
19658 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19659 (mov<mode>_softfloat32, FMOVE64): Likewise.
19660 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19661 (mov<mode>_softfloat64, FMOVE64): Likewise.
19663 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19665 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19667 (Basic PowerPC Built-in Functions): The new name of the
19668 subsection previously known as "PowerPC Built-in Functions".
19669 (Basic PowerPC Built-in Functions Available on all Configurations):
19671 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19672 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19673 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19674 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19676 2018-05-11 Martin Jambor <mjambor@suse.cz>
19679 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19682 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19685 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19687 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19689 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19690 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19691 (ix86_handle_option): Handle -mwaitpkg.
19692 * config.gcc: New header.
19693 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19694 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19695 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19697 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19698 OPTION_MASK_ISA_WAITPKG.
19699 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19700 (ix86_option_override_internal): Add PTA_WAITPKG.
19701 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19702 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19703 IX86_BUILTIN_TPAUSE.
19704 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19705 __builtin_ia32_umwait and __builtin_ia32_tpause.
19706 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19707 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19708 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19709 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19710 UNSPECV_TPAUSE): New.
19711 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19712 * config/i386/i386.opt: Add -mwaitpkg.
19713 * config/i386/waitpkgintrin.h: New file.
19714 * config/i386/x86intrin.h: New header.
19715 * doc/invoke.texi: Add -mwaitpkg.
19717 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19720 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19722 (cortex-m0): Use armv6s-m isa.
19723 (cortex-m0plus): Likewise.
19724 (cortex-m1): Likewise.
19725 (cortex-m0.small-multiply): Likewise.
19726 (cortex-m0plus.small-multiply): Likewise.
19727 (cortex-m1.small-multiply): Likewise.
19729 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19730 Jakub Jelinek <jakub@redhat.com>
19732 PR tree-optimization/85692
19733 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19734 source permute as well.
19736 2018-05-11 Martin Liska <mliska@suse.cz>
19739 * doc/extend.texi: Document LLVM style format for no_sanitize
19742 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19744 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19745 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19746 (mode_supports_vsx_dform_quad): Likewise.
19747 (mode_supports_vmx_dform): Move these functions to be next to the
19748 other mode_supports functions.
19749 (mode_supports_dq_form): Likewise.
19750 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19751 mode_supports_dq_form.
19752 (reg_offset_addressing_ok_p): Likewise.
19753 (offsettable_ok_by_alignment): Likewise.
19754 (rs6000_legitimate_offset_address_p): Likewise.
19755 (legitimate_lo_sum_address_p): Likewise.
19756 (rs6000_legitimize_address): Likewise.
19757 (rs6000_legitimize_reload_address): Likewise.
19758 (rs6000_secondary_reload_inner): Likewise.
19759 (rs6000_preferred_reload_class): Likewise.
19760 (rs6000_output_move_128bit): Likewise.
19762 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19764 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19765 Generate SImode target register for null target.
19766 <case IX86_BUILTIN_XGETBV>: Ditto.
19767 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19768 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19770 2018-05-10 Carl Love <cel@us.ibm.com>
19772 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19773 dcbtt and dcbtstt if operands[2] is 0.
19775 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19778 * config/i386/sse.md (usadv64qi): New expander.
19780 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
19782 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19783 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19784 -maltivec=be support.
19785 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19786 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19787 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19788 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19789 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19790 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19791 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19792 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19793 altivec_vsumsws): Adjust.
19794 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19795 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19796 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19798 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19799 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19800 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19801 (altivec_lve<VI_char>x): Delete expand.
19802 (*altivec_lve<VI_char>x_internal): Rename to...
19803 (altivec_lve<VI_char>x): ... this.
19804 (altivec_lvxl_<mode>): Delete expand.
19805 (*altivec_lvxl_<mode>_internal): Rename to ...
19806 (altivec_lvxl_<mode>): ... this.
19807 (altivec_stvxl_<mode>): Delete expand.
19808 (*altivec_stvxl_<mode>_internal): Rename to ...
19809 (altivec_stvxl_<mode>): ... this.
19810 (altivec_stve<VI_char>x): Delete expand.
19811 (*altivec_stve<VI_char>x_internal): Rename to ...
19812 (altivec_stve<VI_char>x): ... this.
19813 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19814 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19815 reduc_plus_scal_<mode>): Adjust.
19816 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19818 (rs6000_cpu_cpp_builtins): Adjust.
19819 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19820 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19821 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19822 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19823 -maltivec=be support.
19824 (rs6000_split_vec_extract_var): Adjust.
19825 (rs6000_split_v4si_init): Adjust.
19826 (swap_selector_for_mode): Delete.
19827 (altivec_expand_lvx_be, altivec_expand_stvx_be,
19828 altivec_expand_stvex_be): Delete.
19829 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19830 -maltivec=be support.
19831 (rs6000_gimple_fold_builtin): Ditto.
19832 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19834 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19835 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19836 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19837 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19838 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19839 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19840 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19841 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19842 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19843 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19844 anonymous split): Adjust.
19845 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19846 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19848 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19850 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19851 when --with-gxx-include-dir is also specified.
19852 * configure: Regenerate.
19854 2018-05-09 Jim Wilson <jimw@sifive.com>
19857 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19858 * config/riscv/t-withmultilib: New.
19859 * config/riscv/withmultilib.h: New.
19860 * doc/install.texi: Document RISC-V --with-multilib-list support.
19862 2018-05-09 Richard Biener <rguenther@suse.de>
19864 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19866 (vect_bb_vectorization_profitable_p): Adjust. Compute
19867 actual scalar cost using the cost vector and the add_stmt_cost
19870 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19872 PR rtl-optimization/85645
19873 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19874 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19876 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19878 PR rtl-optimization/85645
19879 * shrink-wrap.c (spread_components): Return a boolean saying if
19880 anything was changed.
19881 (try_shrink_wrapping_separate): Iterate spread_components until
19882 nothing changes anymore.
19884 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19886 PR rtl-optimization/85645
19887 * regrename.c (build_def_use): Also kill the chains that include the
19888 destination of a REG_CFA_REGISTER note.
19890 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19892 PR rtl-optimization/85645
19893 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19894 insn that has a REG_CFA_REGISTER note.
19896 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
19898 * cfgexpand.c (expand_clobber): New function.
19899 (expand_gimple_stmt_1): Use it.
19900 * tree-vect-stmts.c (vect_clobber_variable): New function,
19902 (vectorizable_simd_clone_call): ...here.
19903 (vectorizable_store): Emit a clobber either side of an
19904 IFN_STORE_LANES sequence.
19905 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19907 2018-05-09 Tom de Vries <tom@codesourcery.com>
19910 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19911 (define_insn "trap_if_false"): Add exit after trap.
19913 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
19915 PR rtl-optimization/85638
19916 * bb-reorder.c: Include common/common-target.h.
19917 (create_forwarder_block): New function extracted from...
19918 (fix_up_crossing_landing_pad): ...here. Rename into...
19919 (dw2_fix_up_crossing_landing_pad): ...this.
19920 (sjlj_fix_up_crossing_landing_pad): New function.
19921 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19922 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19923 from both partitions and exit the loop after one iteration.
19925 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19928 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19930 (Basic PowerPC Built-in Functions): The new name of the
19931 subsection previously known as "PowerPC Built-in Functions".
19932 (Basic PowerPC Built-in Functions Available on all Configurations):
19934 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19936 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19938 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19940 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19943 2018-05-08 Jim Wilson <jimw@sifive.com>
19945 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19946 (LD_EMUL_SUFFIX): New.
19947 (LINK_SPEC): Use it.
19949 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19951 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19953 (Basic PowerPC Built-in Functions): The new name of the
19954 subsection previously known as "PowerPC Built-in Functions".
19955 (Basic PowerPC Built-in Functions Available on all Configurations):
19957 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19959 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19961 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19963 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19966 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19969 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19970 after cmpelim optimization.
19972 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
19974 * config.gcc: Support "goldmont".
19975 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19976 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19977 PROCESSOR_GOLDMONT.
19978 * config/i386/i386.c (m_GOLDMONT): Define.
19979 (processor_target_table): Add "goldmont".
19980 (PTA_GOLDMONT): Define.
19981 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19982 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19983 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19984 (fold_builtin_cpu): Add "goldmont".
19985 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19986 (ix86_option_override_internal): Add "goldmont".
19987 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19988 (processor_type): Add PROCESSOR_GOLDMONT.
19989 * config/i386/i386.md: Add CPU "glm".
19990 * config/i386/glm.md: New file.
19991 * config/i386/x86-tune.def: Add m_GOLDMONT.
19992 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19994 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19997 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19999 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20000 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20001 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20004 * config/i386/i386.c (ix86_fold_builtin): Handle
20005 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20008 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20009 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20011 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20014 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20015 (check_arch): Likewise.
20016 (check_fpu): Return the result rather than printing it.
20017 (end arch): Fix operator precedence.
20018 (end cpu): Likewise.
20019 (END): Print the result from check_fpu.
20021 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20022 Alan Hayward <alan.hayward@arm.com>
20023 David Sherwood <david.sherwood@arm.com>
20025 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20026 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20027 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20028 (*fcmuo<mode>_and): New patterns.
20030 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20032 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20033 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20034 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20035 (cmp_op, sve_imm_con): New code attributes.
20036 (SVE_COND_INT_CMP, imm_con): Delete.
20037 (cmp_op): Remove above unspecs from int attribute.
20038 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20040 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20041 comparison-specific unspecs.
20042 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20043 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20044 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20045 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20046 (*vec_fcm<cmp_op><mode>): Rename to...
20047 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20048 (*vec_fcmuo<mode>): Rename to...
20049 (*fcmuo<mode>): ...this and adjust likewise.
20050 (*pred_fcm<cmp_op><mode>): New pattern.
20051 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20052 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20054 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20056 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20057 (aarch64_emit_sve_predicated_cond): New function.
20058 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20059 (aarch64_emit_unspec_cond_or): Replace with...
20060 (aarch64_emit_sve_or_conds): ...this new function. Use
20061 aarch64_emit_sve_ptrue_op for the individual comparisons and
20062 aarch64_emit_binop to OR them together.
20063 (aarch64_emit_inverted_unspec_cond): Replace with...
20064 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20065 aarch64_emit_sve_ptrue_op for the comparison and
20066 aarch64_emit_unop to invert the result.
20067 (aarch64_expand_sve_vec_cmp_float): Update after the above
20068 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20070 2018-05-07 Nathan Sidwell <nathan@acm.org>
20072 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20073 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20074 (Backwards Compatibility): Likewise.
20076 2018-05-07 Luis Machado <luis.machado@linaro.org>
20080 2018-05-07 Luis Machado <luis.machado@linaro.org>
20082 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20083 <prefetch_dynamic_strides>: New const bool field.
20084 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20085 prefetch_dynamic_strides.
20086 (exynosm1_prefetch_tune): Likewise.
20087 (thunderxt88_prefetch_tune): Likewise.
20088 (thunderx_prefetch_tune): Likewise.
20089 (thunderx2t99_prefetch_tune): Likewise.
20090 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20092 (aarch64_override_options_internal): Update to set
20093 PARAM_PREFETCH_DYNAMIC_STRIDES.
20094 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20095 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20096 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20097 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20098 prefetch-dynamic-strides setting.
20100 2018-05-07 Luis Machado <luis.machado@linaro.org>
20102 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20103 <minimum_stride>: New const int field.
20104 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20105 minimum_stride field.
20106 (exynosm1_prefetch_tune): Likewise.
20107 (thunderxt88_prefetch_tune): Likewise.
20108 (thunderx_prefetch_tune): Likewise.
20109 (thunderx2t99_prefetch_tune): Likewise.
20110 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20111 (aarch64_override_options_internal): Update to set
20112 PARAM_PREFETCH_MINIMUM_STRIDE.
20113 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20114 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20115 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20116 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20117 stride is constant and is below the minimum stride threshold.
20119 2018-05-07 Luis Machado <luis.machado@linaro.org>
20121 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20124 2018-05-07 Luis Machado <luis.machado@linaro.org>
20126 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20127 <prefetch_dynamic_strides>: New const bool field.
20128 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20129 prefetch_dynamic_strides.
20130 (exynosm1_prefetch_tune): Likewise.
20131 (thunderxt88_prefetch_tune): Likewise.
20132 (thunderx_prefetch_tune): Likewise.
20133 (thunderx2t99_prefetch_tune): Likewise.
20134 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20136 (aarch64_override_options_internal): Update to set
20137 PARAM_PREFETCH_DYNAMIC_STRIDES.
20138 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20139 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20140 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20141 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20142 prefetch-dynamic-strides setting.
20144 2018-05-07 Luis Machado <luis.machado@linaro.org>
20146 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20147 <minimum_stride>: New const int field.
20148 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20149 minimum_stride field.
20150 (exynosm1_prefetch_tune): Likewise.
20151 (thunderxt88_prefetch_tune): Likewise.
20152 (thunderx_prefetch_tune): Likewise.
20153 (thunderx2t99_prefetch_tune): Likewise.
20154 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20155 (aarch64_override_options_internal): Update to set
20156 PARAM_PREFETCH_MINIMUM_STRIDE.
20157 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20158 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20159 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20160 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20161 stride is constant and is below the minimum stride threshold.
20163 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20166 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20167 the type is addressable. Don't force op into register if it has
20170 2018-05-05 Roland McGrath <mcgrathr@google.com>
20173 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20174 any section for which we don't know a specific type it should have,
20175 regardless of name. Previously this was done only for the exact
20176 names ".init_array", ".fini_array", and ".preinit_array".
20177 (default_elf_asm_named_section): Add comment about
20178 relationship with default_section_type_flags and SECTION_NOTYPE.
20179 (get_section): Don't consider it a type conflict if one side has
20180 SECTION_NOTYPE and the other doesn't, as long as neither has the
20181 SECTION_BSS et al used in the default_section_type_flags logic.
20183 2018-05-05 Tom de Vries <tom@codesourcery.com>
20186 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20187 (workaround_barsyncs): New function.
20188 (nvptx_reorg): Use workaround_barsyncs.
20189 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20190 (define_expand "nvptx_membar_cta"): New define_expand.
20191 (define_insn "*nvptx_membar_cta"): New insn.
20193 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20195 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20196 To improve optimization opportunities.
20197 * builtin-types.def: The new needed builtin types for the above.
20199 2018-05-04 Richard Biener <rguenther@suse.de>
20201 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20202 * gimple-ssa-store-merging.c
20203 (imm_store_chain_info::output_merged_store): Remove redundant create,
20204 release split_store vector contents on failure.
20205 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20206 scalar stmt vector on cache hit.
20208 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20210 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20212 * config.gcc (powerpc-xilinx-eabi*): Remove.
20213 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20215 (fusion_addis_mem_combo_load): Ditto.
20216 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20218 (rs6000_cpu_cpp_builtins): Ditto.
20219 * config/rs6000/rs6000-linux.c
20220 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20221 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20222 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20224 (rs6000_setup_reg_addr_masks): Ditto.
20225 (rs6000_init_hard_regno_mode_ok): Ditto.
20226 (rs6000_option_override_internal): Ditto.
20227 (legitimate_lo_sum_address_p): Ditto.
20228 (rs6000_legitimize_address): Ditto.
20229 (rs6000_legitimize_reload_address): Ditto.
20230 (rs6000_legitimate_address_p): Ditto.
20231 (abi_v4_pass_in_fpr): Ditto.
20232 (setup_incoming_varargs): Ditto.
20233 (rs6000_gimplify_va_arg): Ditto.
20234 (rs6000_split_multireg_move): Ditto.
20235 (rs6000_savres_strategy): Ditto.
20236 (rs6000_emit_prologue_components): Ditto.
20237 (rs6000_emit_epilogue_components): Ditto.
20238 (rs6000_emit_prologue): Ditto.
20239 (rs6000_emit_epilogue): Ditto.
20240 (rs6000_elf_file_end): Ditto.
20241 (rs6000_function_value): Ditto.
20242 (rs6000_libcall_value): Ditto.
20243 * config/rs6000/rs6000.h: Ditto.
20244 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20245 (TARGET_MINMAX): ... this. New.
20246 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20247 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20248 (*movsi_internal1_single): Delete.
20249 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20250 mfpu=, mxilinx-fpu): Delete.
20251 * config/rs6000/singlefp.h: Delete.
20252 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20253 * config/rs6000/t-rs6000: Ditto.
20254 * config/rs6000/t-xilinx: Delete.
20255 * config/rs6000/titan.md: Adjust for fp_type removal.
20256 * config/rs6000/vsx.md: Remove Xilinx FP support.
20257 (VStype_simple): Delete.
20258 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20259 * config/rs6000/xfpu.h: Delete.
20260 * config/rs6000/xfpu.md: Delete.
20261 * config/rs6000/xilinx.h: Delete.
20262 * config/rs6000/xilinx.opt: Delete.
20263 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20264 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20266 2018-05-04 Tom de Vries <tom@codesourcery.com>
20269 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20272 2018-05-04 Richard Biener <rguenther@suse.de>
20274 PR middle-end/85627
20275 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20276 (expand_complex_div_wide): Likewise.
20277 (expand_complex_operations_1): Likewise.
20278 (expand_complex_libcall): Preserve EH info of the original stmt.
20279 (tree_lower_complex): Handle removed blocks.
20280 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20281 on complex multiplication and division libcall builtins.
20283 2018-05-04 Richard Biener <rguenther@suse.de>
20285 PR middle-end/85574
20286 * fold-const.c (negate_expr_p): Restrict negation of operand
20287 zero of a division to when we know that can happen without
20289 (fold_negate_expr_1): Likewise.
20291 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20294 * real.h (real_nextafter): Declare.
20295 * real.c (real_nextafter): New function.
20296 * fold-const-call.c (fold_const_nextafter): New function.
20297 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20298 CASE_CFN_NEXTTOWARD.
20299 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20300 even when arg1_mode is different from arg0_mode.
20302 2018-05-03 Nathan Sidwell <nathan@acm.org>
20304 * doc/extend.texi (Deprecated Features): Remove
20305 -ffriend-injection.
20306 (Backwards Compatibility): Likewise.
20307 * doc/invoke.texi (C++ Language Options): Likewise.
20308 (C++ Dialect Options): Likewise.
20310 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20313 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20314 _mm512_mask_mullox_epi64): New intrinsics.
20316 2018-05-03 Tom de Vries <tom@codesourcery.com>
20319 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20320 dump files): Add offload-tree.
20322 2018-05-03 Richard Biener <rguenther@suse.de>
20324 PR tree-optimization/85615
20325 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20326 to loops not nested in BBs loop father to avoid creating multi-entry
20329 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20331 PR tree-optimization/70291
20332 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20333 arguments. Change return type to tree. Emit libcall as a new
20334 statement rather than replacing existing one when inplace_p is true.
20335 (expand_complex_multiplication_components): New function.
20336 (expand_complex_multiplication): Expand floating-point complex
20337 multiplication using the above.
20338 (expand_complex_division): Rename inner_type parameter to type.
20339 Update expand_complex_libcall call-site.
20340 (expand_complex_operations_1): Update expand_complex_multiplication
20341 and expand_complex_division call-sites.
20343 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20346 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20347 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20348 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20349 the highest significant bit of the shift count mask is clear. In
20350 check whether and[sq]i3 is needed verify that all significant bits
20351 of the shift count other than the highest are set.
20353 2018-05-02 Tom de Vries <tom@codesourcery.com>
20356 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20357 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20358 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20359 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20360 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20361 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20362 __builtin_goacc_parlevel_size.
20364 2018-05-02 Richard Biener <rguenther@suse.de>
20366 PR tree-optimization/85597
20367 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20368 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20371 2018-05-02 Tom de Vries <tom@codesourcery.com>
20374 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20375 dump files): Add ltrans-tree.
20377 2018-05-02 Tom de Vries <tom@codesourcery.com>
20380 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20381 dump files): Add wpa-ipa.
20383 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20385 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20386 powerpc*-*-linux*paired* target.
20387 * config/rs6000/750cl.h: Delete.
20388 * config/rs6000/paired.h: Delete.
20389 * config/rs6000/paired.md: Delete.
20390 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20392 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20393 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20394 comment. Remove paired float support.
20395 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20396 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20398 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20399 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20401 * config/rs6000/rs6000.c: Remove paired float support.
20402 (paired_expand_vector_init, paired_expand_vector_move,
20403 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20404 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20405 paired_expand_builtin, paired_expand_predicate_builtin,
20406 paired_init_builtins): Delete.
20407 * config/rs6000/rs6000.h: Remove paired float support.
20408 * config/rs6000/rs6000.md: Remove paired float support.
20409 (move_from_CR_ov_bit): Delete.
20410 * config/rs6000/rs6000.opt (mpaired): Delete.
20411 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20412 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20414 2018-05-02 Richard Biener <rguenther@suse.de>
20416 PR middle-end/85567
20417 * gimplify.c (gimplify_save_expr): When in SSA form allow
20418 SAVE_EXPRs to compute to SSA vars.
20420 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20423 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20424 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20425 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20426 clobber operands[2], instead use a new pseudo. Formatting fixes.
20428 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20430 PR tree-optimization/85586
20431 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20432 exit early for statements in the same group if the accesses are
20435 2018-05-02 Tom de Vries <tom@codesourcery.com>
20438 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20441 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20443 PR tree-optimization/85143
20444 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20446 2018-05-01 Tom de Vries <tom@codesourcery.com>
20449 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20450 not found" error message.
20452 2018-05-01 Tom de Vries <tom@codesourcery.com>
20455 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20456 * vec.c (test_ordered_remove_if): New function.
20457 (vec_c_tests): Call test_ordered_remove_if.
20458 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20459 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20460 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20461 VEC_ORDERED_REMOVE_IF.
20463 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20465 PR tree-optimization/82665
20466 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20467 pointer subtraction where arguments come from a memchr call.
20469 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20471 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20472 --push-state --as-needed and --pop-state instead of --as-needed and
20473 --no-as-needed if ld supports it.
20474 * configure: Regenerated.
20477 * doc/install.texi2html: Replace _002d with - and _002a with * in
20478 generated html files using sed.
20480 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20483 * gcc-rich-location.c (blank_line_before_p): New function.
20484 (use_new_line): New function.
20485 (gcc_rich_location::add_fixit_insert_formatted): New function.
20486 * gcc-rich-location.h
20487 (gcc_rich_location::add_fixit_insert_formatted): New function.
20489 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20491 * selftest.c (assert_streq): Rename "expected" and "actual" to
20492 "val1" and "val2". Extend NULL-handling to cover both inputs
20493 symmetrically, while still requiring both to be non-NULL for a pass.
20494 * selftest.h (assert_streq): Rename "expected" and "actual" to
20496 (ASSERT_EQ): Likewise.
20497 (ASSERT_EQ_AT): Likewise.
20498 (ASSERT_KNOWN_EQ): Likewise.
20499 (ASSERT_KNOWN_EQ_AT): Likewise.
20500 (ASSERT_NE): Likewise.
20501 (ASSERT_MAYBE_NE): Likewise.
20502 (ASSERT_MAYBE_NE_AT): Likewise.
20503 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20504 the assertion to pass.
20505 (ASSERT_STREQ_AT): Likewise.
20507 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20509 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20510 interaction with -pie.
20512 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20514 * selftest.h: Fix alphabetization of per-source-file selftest
20517 2018-04-30 Jason Merrill <jason@redhat.com>
20519 PR c++/61982 - dead stores to destroyed objects.
20520 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20523 2018-04-30 Jason Merrill <jason@redhat.com>
20525 * tree.c (build_clobber): New.
20526 * tree.h: Declare it.
20527 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20529 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20531 * diagnostic-show-locus.c (layout::layout): Update for
20532 location_get_source_line returning a char_span.
20533 (struct char_span): Move to input.h.
20534 (struct correction): Update for fields in char_span becoming
20536 (struct source_line): Update for location_get_source_line
20537 returning a char_span.
20538 (layout::print_line): Likewise.
20539 * edit-context.c (edited_file::print_content): Likewise.
20540 (edited_file::print_diff_hunk): Likewise.
20541 (edited_file::print_run_of_changed_lines): Likewise.
20542 (edited_file::get_num_lines): Likewise.
20543 (edited_line::edited_line): Likewise.
20544 * final.c (asm_show_source): Likewise.
20545 * input.c (location_get_source_line): Convert return type
20546 from const char * to char_span, losing the final "line_len"
20548 (dump_location_info): Update for the above.
20549 (get_substring_ranges_for_loc): Likewise. Use a char_span
20550 when handling the literal within the line.
20551 (test_reading_source_line): Update for location_get_source_line
20552 returning a char_span.
20553 * input.h (class char_span): Move here from
20554 diagnostic-show-locus.c, converting from a struct to a class.
20555 Make data members private.
20556 (char_span::operator bool): New.
20557 (char_span::length): New.
20558 (char_span::get_buffer): New.
20559 (char_span::operator[]): New.
20560 (char_span::subspan): Make const.
20561 (char_span::xstrdup): New.
20562 (location_get_source_line): Convert return type from const char *
20563 to char_span, losing the final "line_size" param.
20565 2018-04-30 Jan Hubicka <jh@suse.cz>
20567 * lto-wrapper.c (ltrans_priorities): New static var.
20568 (cmp_priority): New.
20569 (run_gcc): Read priorities and if doing parallel build order
20570 the Makefile by them.
20572 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20574 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20576 2018-04-30 Richard Biener <rguenther@suse.de>
20578 * tree-cfg.c (verify_address): Remove base argument, add
20579 flag whether to check TREE_ADDRESSABLE and do that.
20580 (verify_expr): Remove.
20581 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20582 (verify_gimple_assign_single): Likewise.
20583 (verify_gimple_switch): Likewise.
20584 (verify_expr_location_1): Dereference tp once. Add (disabled)
20585 piece from verify_expr.
20586 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20588 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20590 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20592 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20594 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20595 (small_data_pattern): Likewise.
20596 (arc_rewrite_small_data): Likewise.
20597 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20598 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20599 (get_symbol_alignment): New function.
20600 (legitimate_small_data_address_p): Likewise.
20601 (legitimate_scaled_address): Update, call
20602 legitimate_small_data_address_p.
20603 (output_sdata): New static variable.
20604 (arc_print_operand): Update how we handle small data operands.
20605 (arc_print_operand_address): Likewise.
20606 (arc_legitimate_address_p): Update, use
20607 legitimate_small_data_address_p.
20608 (arc_rewrite_small_data_p): Remove.
20609 (arc_rewrite_small_data_1): Likewise.
20610 (arc_rewrite_small_data): Likewise.
20611 (small_data_pattern): Likewise.
20612 (compact_sda_memory_operand): Update to use
20613 legitimate_small_data_address_p and get_symbol_alignment.
20614 (prepare_move_operands): Don't rewite sdata pattern.
20615 (prepare_extend_operands): Remove.
20616 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20618 (zero_extendqisi2): Likewise.
20619 (zero_extendhisi2): Likewise.
20620 (extendqihi2): Likewise.
20621 (extendqisi2): Likewise.
20622 (extendhisi2): Likewise.
20623 (addsi3): Likewise.
20624 (subsi3): Likewise.
20625 (andsi3): Likewise.
20626 * config/arc/constraints.md (Usd): Change it to memory constraint.
20628 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20630 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20631 as source of std instructions.
20632 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20633 allow 6-bit constants as source for store instructions.
20634 (movdi_insn): Update instruction pattern to allow 6-bit constants
20635 as source for store instructions.
20637 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20639 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20641 2018-04-30 Nathan Sidwell <nathan@acm.org>
20642 Sandra Loosemore <sandra@codesourcery.com>
20644 * dumpfile.c (dump_open): Allow '-' for stdout.
20645 * doc/invoke.texi (Developer Options): Document dump filename
20646 determination early. Document stdin/stdout selection.
20648 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20650 Microblaze Target: PIC data text relative
20652 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20653 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20655 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20656 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20657 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20658 New addressing mode for data-text relative position indepenedent code.
20659 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20660 'ADDRESS_SYMBOLIC_TXT_REL'.
20661 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20662 (microblaze_legitimate_pic_operand): Exclude function calls from
20663 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20664 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20666 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20667 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20668 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20669 for 'address + offset'.
20670 (microblaze_expand_prologue): Add new function prologue call for
20672 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20673 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20674 table in case of TARGET_PIC_DATA_TEXT_REL.
20675 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20676 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20677 Add new macros 'UNSPEC_TEXT',
20678 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20679 + exclude function calls from 'UNSPEC_PLT' in case of data text
20681 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20682 new target hook for generating address diff vector tables in case of
20684 * doc/tm.texi : Regenerate.
20685 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20686 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20687 of addr diff vector generation.
20688 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20689 target hook definition.
20690 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20691 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20692 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20693 option for data text relative.
20695 2018-04-30 Richard Biener <rguenther@suse.de>
20697 * tree-chrec.h (evolution_function_is_constant_p): Remove
20699 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20701 2018-04-30 Richard Biener <rguenther@suse.de>
20704 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20706 2018-04-30 Richard Biener <rguenther@suse.de>
20708 PR tree-optimization/28364
20709 PR tree-optimization/85275
20710 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20711 copying first exit test.
20713 2018-04-28 Mark Wielaard <mark@klomp.org>
20715 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20716 dwarf_version >= 5.
20717 (dwarf_AT): Handle DW_AT_addr_base.
20718 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20720 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20723 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20724 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20725 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20726 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20728 2018-04-28 Richard Biener <rguenther@suse.de>
20730 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20731 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20732 to reflect use. Only add interesting stmts.
20734 2018-04-27 Martin Jambor <mjambor@suse.cz>
20737 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20738 the jump function allows for passing through aggregate values.
20740 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20742 * input.h (in_system_header_at): Convert from macro to inline
20744 (from_macro_expansion_at): Likewise.
20745 (from_macro_definition_at): Likewise.
20747 2018-04-27 Jeff Law <law@redhat.com>
20749 * config.gcc: Mark tile* targets as deprecated/obsolete.
20751 2018-04-27 Richard Biener <rguenther@suse.de>
20753 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20756 2018-04-27 Richard Biener <rguenther@suse.de>
20758 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20760 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
20762 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20763 with Yd constraint. Set "preferred_for_speed" attribute from
20764 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20765 with Yd constraint.
20766 (*movdi_internal): Ditto.
20767 (movti_interunit splitters): Remove
20768 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20769 (movdi_interunit splitters): Ditto.
20770 * config/i386/constraints.md (Ye): Remove.
20771 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20773 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20776 * config/aarch64/constraints.md (Usg): Limit to 31.
20777 (Usj): Limit to 63.
20779 2018-04-27 Jakub Jelinek <jakub@redhat.com>
20781 PR tree-optimization/85529
20782 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20783 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20784 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20785 zero extension or masking of the MSB bit.
20786 (optimize_range_tests): Add FIRST_BB argument, pass it through
20787 to optimize_range_tests_var_bound.
20788 (maybe_optimize_range_tests, reassociate_bb): Adjust
20789 optimize_range_tests callers.
20791 2018-04-26 Richard Biener <rguenther@suse.de>
20792 Jakub Jelinek <jakub@redhat.com>
20794 * cgraph.h (symbol_table): Just declare debug method here.
20795 * symtab.c (symbol_table::debug): Define.
20797 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
20799 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20801 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
20803 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20804 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20805 (*movdi_internal): Substitute Yi and Yj constraint with x
20806 and Ym and Yn constraint with y constraint. Update "isa"
20807 attribute and set "preferred_for_speed" attribute from
20808 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20809 (*movsi_internal): Ditto.
20810 (*movdf_internal): Ditto.
20811 (*movsf_internal): Ditto.
20812 (*zero_extendsidi2): Ditto.
20813 * config/i386/sse.md (vec_set<mode>_0): Ditto.
20814 (sse2_loadld): Ditto.
20815 (*vec_extract<ssevecmodelower>_0): Ditto.
20816 (*vec_extractv4si_0_zext_sse4): Ditto.
20817 (vec_concatv2di): Ditto.
20818 (*vec_dup<mode>): Ditto.
20819 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20820 * config/i386/constraints.md (Yi): Remove.
20825 2018-04-26 Nathan Sidwell <nathan@acm.org>
20827 * dumpfile.c (dump_open): New.
20828 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20829 (dump_finish): Detect stdio/stderr by value not name.
20831 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20833 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20835 2018-04-26 Tom de Vries <tom@codesourcery.com>
20838 * config/nvptx/nvptx.c (verify_neutering_jumps)
20839 (verify_neutering_labels): New function
20840 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20842 2018-04-26 Tom de Vries <tom@codesourcery.com>
20845 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20846 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20849 2018-04-26 Richard Biener <rguenther@suse.de>
20850 Tom de Vries <tom@codesourcery.com>
20853 * lto-streamer-out.c (output_function): Fixup loops if required to match
20854 discovery done in the reader.
20856 2018-04-26 Richard Biener <rguenther@suse.de>
20858 PR tree-optimization/85116
20859 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20860 have a loop exit from the single latch predecessor. Remove
20861 case of header with just condition.
20862 (ch_base::copy_headers): Exclude infinite loops from any
20864 (pass_ch::execute): Record exits.
20866 2018-04-26 Richard Biener <rguenther@suse.de>
20868 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20869 prologue cost vector and pass it to vect_get_load_cost.
20870 (vect_get_peeling_costs_all_drs): Likewise.
20871 (vect_peeling_hash_get_lowest_cost): Likewise.
20872 (vect_enhance_data_refs_alignment): Likewise.
20874 2018-04-26 Richard Biener <rguenther@suse.de>
20876 PR middle-end/85450
20877 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20878 checking of integer<->pointer conversions.
20879 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20880 sign-/zero-extending pointer types.
20881 (expand_omp_for_static_chunk): Likewise.
20883 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
20884 Jean Lee <xiaoyur347@gmail.com>
20886 * config/mips/mips.c (mips_asan_shadow_offset): New function.
20887 (TARGET_ASAN_SHADOW_OFFSET): Define.
20888 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20889 true for -fsanitize=address.
20891 2018-04-25 Mark Wielaard <mark@klomp.org>
20893 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20896 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20898 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20899 than "alu", remove explicit "memory" and "imm_disp" attributes.
20900 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20902 PR middle-end/85414
20903 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20904 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20905 gen_lowpart_no_emit.
20907 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
20910 * config/i386/i386.c (ix86_expand_builtin): Change memory
20911 operand to XI, extend p0 to Pmode.
20912 * config/i386/i386.md: Change unspec volatile and operand
20913 1 mode to XI, change operand 0 mode to P.
20915 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20917 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20918 GET_MODE_MASK before any checking.
20919 (nds32_can_use_bset_p): Likewise.
20920 (nds32_can_use_btgl_p): Likewise.
20922 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20924 * config/nds32/nds32-doubleword.md: New define_split pattern for
20925 illegal register number.
20927 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20929 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20931 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20933 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20935 2018-04-25 Richard Biener <rguenther@suse.de>
20937 * lto-streamer.h (LTO_major_version): Bump to 8.
20939 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20941 * BASE-VER: Set to 9.0.0.
20943 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
20945 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20946 in __abskf2 and __powikf2.
20948 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20951 * config/aarch64/constraints.md (Usg, Usj): New constraints.
20952 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20953 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20954 Use the above on operand 2. Reindent.
20955 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20957 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20960 * common/config/i386/i386-common.c (ix86_handle_option): Don't
20962 * config/i386/i386.opt (mcet): Removed.
20963 * doc/install.texi: Remove -mcet documentation.
20964 * doc/invoke.texi: Likewise.
20966 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20969 * doc/install.texi: Remove -mcet from bootstrap-cet.
20971 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20974 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20975 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20979 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20980 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20981 containing a CONST_VECTOR.
20983 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20985 * doc/install.texi: Update newlib dependency for nvptx.
20987 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20990 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20991 instead of INTVAL when shifting x left.
20993 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20995 PR tree-optimization/85478
20996 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20997 vect_grouped_store_supported for single element vectors.
20999 2018-04-24 Richard Biener <rguenther@suse.de>
21002 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21003 load cost increase to the case of non-constant step.
21005 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21008 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21009 destination if any_malformed_asm.
21011 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21013 PR middle-end/85496
21014 * expr.c (store_field): In the bitfield case, if the value comes from
21015 a function call and is returned in registers by means of a PARALLEL,
21016 do not change the mode of the temporary unless BLKmode and VOIDmode.
21018 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21020 PR rtl-optimization/85423
21021 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21022 dependencies to debug insns when the previous insn is non-debug.
21024 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21026 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21027 enums into a single definition.
21028 (fls): Fix predicates and printing.
21031 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21033 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21034 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21035 and short u6 immediate.
21036 (check_if_valid_sleep_operand): Remove.
21037 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21039 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21041 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21042 flag_always_save_lp condition.
21043 * config/nds32/nds32.opt (malways-save-lp): New option.
21045 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21047 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21048 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21049 * config/nds32/nds32.h
21050 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21051 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21053 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21055 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21056 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21058 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21059 Chung-Ju Wu <jasonwucj@gmail.com>
21061 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21063 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21064 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21066 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21068 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21070 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21072 * config/nds32/nds32-protos.h (nds32_data_alignment,
21073 nds32_local_alignment): Declare.
21074 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21075 nds32_local_alignment): New functions.
21076 (TARGET_CONSTANT_ALIGNMENT): Define.
21077 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21079 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21081 * config/nds32/nds32.c
21082 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21083 (TARGET_MODES_TIEABLE_P): Likewise.
21085 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21087 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21088 level Ofast and Og.
21090 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21091 Chung-Ju Wu <jasonwucj@gmail.com>
21093 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21094 for unaligned access.
21095 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21097 * config/nds32/nds32-intrinsic.md: Likewise.
21098 * config/nds32/nds32_intrinsic.h: Likewise.
21099 * config/nds32/nds32.h (nds32_builtins): Likewise.
21100 * config/nds32/nds32.opt (munaligned-access): New option.
21101 * config/nds32/nds32.c (nds32_asm_file_start): Display
21102 flag_unaligned_access status.
21104 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21106 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21107 -mno-relax is present.
21108 * config/riscv/linux.h (LINK_SPEC): Ditto.
21110 2018-04-20 Martin Sebor <msebor@redhat.com>
21113 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21115 (gimple_fold_builtin_stxcpy_chk): Same.
21116 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21118 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21121 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21122 __powikf2 when long double is IEEE 128-bit.
21124 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21126 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21127 step to make sure stack always aligned.
21129 2018-04-20 Carl Love <cel@us.ibm.com>
21132 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21133 size check for arg0.
21135 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21136 Tom de Vries <tom@codesourcery.com>
21139 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21140 Emit insns for calls too.
21141 (nvptx_find_par): Always look for worker-level predecessor insn.
21142 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21144 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21145 (nvptx_process_pars): Propagate frames for calls.
21147 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21150 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21152 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21153 (ix86_handle_option): Don't handle OPT_mibt.
21154 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21156 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21158 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21159 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21160 (ix86_target_macros): Define __CET__ with flag_cf_protection
21161 for -fcf-protection.
21162 * config/i386/i386.c (isa2_opts): Remove -mibt.
21163 * config/i386/i386.h (TARGET_IBT): Removed.
21164 (TARGET_IBT_P): Likewise.
21165 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21166 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21167 * config/i386/i386.opt (mcet): Update help message.
21168 (mshstk): Likewise.
21170 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21171 -mcet as an alias for -mshstk.
21173 2018-04-20 Richard Biener <rguenther@suse.de>
21175 PR middle-end/85475
21176 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21177 complexity by forcing a single use of the multiply operand.
21179 2018-04-20 Martin Jambor <mjambor@suse.cz>
21182 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21183 recursion dependency to only apply to non-clones.
21185 2018-04-20 Martin Jambor <mjambor@suse.cz>
21188 * ipa-cp.c (create_specialized_node): Check that clones of
21189 self-recursive edges exist during IPA-CP.
21191 2018-04-19 Toon Moene <toon@moene.org>
21193 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21196 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21198 PR tree-optimization/85467
21199 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21200 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21201 VECTOR_CST element to type.
21203 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21206 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21207 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21208 (builtin_longjmp): Likewise.
21209 (save_stack_nonlocal): New pattern.
21210 (restore_stack_nonlocal): Likewise.
21212 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21215 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21216 Replace ASM_OUTPUT_LABEL with fprintf.
21218 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21221 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21222 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21223 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21224 define __IBT__ and __SHSTK__ for -fcf-protection.
21225 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21227 (ix86_trampoline_init): Likewise.
21228 (x86_output_mi_thunk): Likewise.
21229 (ix86_notrack_prefixed_insn_p): Likewise.
21230 (ix86_option_override_internal): Don't disallow -fcf-protection.
21231 * config/i386/i386.md (rdssp<mode>): Also enable for
21233 (incssp<mode>): Likewise.
21234 (nop_endbr): Likewise.
21235 * config/i386/i386.opt (mcet): Change help message to built-in
21238 (mshstk): Likewise.
21239 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21240 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21241 enable CET built-in functions.
21243 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21245 * common/config/i386/i386-common.c
21246 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21247 OPTION_MASK_ISA_MOVDIRI_UNSET,
21248 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21249 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21250 * config.gcc (movdirintrin.h): New header.
21251 * config/i386/cpuid.h (bit_MOVDIRI,
21252 bit_MOVDIR64B): New bits.
21253 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21255 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21256 (VOID, PVOID, PCVOID)): New function types.
21257 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21258 __builtin_ia32_directstoreu_u64,
21259 __builtin_ia32_movdir64b): New builtins.
21260 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21261 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21263 (ix86_valid_target_attribute_inner_p): Ditto.
21264 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21265 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21266 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21267 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21268 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21269 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21270 (movdiri<mode>, movdir64b_<mode>): New.
21271 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21272 * config/i386/immintrin.h: Include movdirintrin.h.
21273 * config/i386/movdirintrin.h: New file.
21274 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21276 2018-04-19 Richard Biener <rguenther@suse.de>
21278 PR middle-end/85455
21279 * cfg.c (clear_bb_flags): When loop state says we have
21280 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21282 2018-04-19 Richard Biener <rguenther@suse.de>
21284 PR tree-optimization/84737
21285 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21286 copying restrict info.
21287 (vect_setup_realignment): Use it.
21288 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21289 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21290 the first DR to all generated stores.
21291 (vectorizable_load): Likewise for loads.
21293 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21295 PR tree-optimization/85446
21296 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21297 the integral and pointer types to have the same precision.
21299 * doc/install.texi: Document --disable-cet being the default and
21302 2018-04-18 Martin Liska <mliska@suse.cz>
21304 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21307 2018-04-18 Martin Liska <mliska@suse.cz>
21310 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21313 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21314 arguments if they are comparable.
21316 2018-04-18 Martin Liska <mliska@suse.cz>
21319 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21322 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21325 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21328 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21329 ENDBR after calling __morestack.
21331 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21334 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21335 by using gcc_base_ver to generate a gcc_driver_version, and use
21336 it when generating GCC_DRIVER_NAME.
21337 * configure: Regenerate.
21339 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21342 * config.gcc: Obsolete powerpc*-*-*spe*.
21344 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21347 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21348 (stabstr_D): Change type of unum from unsigned int to
21349 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21352 2018-04-17 Jim Wilson <jimw@sifive.com>
21355 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21356 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21357 Set arg_pointer_offset after using pretend_args_size.
21359 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21361 PR rtl-optimization/85431
21362 * dse.c (record_store): Ignore zero width stores.
21365 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21366 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21367 __builtin_stack_restore rather than after it.
21368 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21369 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21370 argument instead of virtual_dynamic_stack_rtx.
21372 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21374 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21376 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21377 Add note to error message to explain internal mapping of overloaded
21378 built-in function name to non-overloaded built-in function name.
21379 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21382 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21385 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21386 where the inputs overlap with the output.
21388 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21390 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21391 (=v, v) alternative and explicit "memory" attribute.
21392 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21393 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21395 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21396 "sselog1" type instead of "sselog".
21397 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21398 "sselog". Remove explicit "memory" attribute.
21399 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21400 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21402 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21403 "sselog1" type instead of "sselog". Remove explicit "memory"
21405 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21406 use "sselog1" type instead of "sselog". Remove explicit "memory"
21408 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21409 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21411 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21412 "sselog1" type instead of "sselog". Remove explicit "memory"
21414 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21415 use "sselog1" type instead of "sselog". Remove explicit "memory"
21419 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21421 PR middle-end/85414
21422 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21425 2018-04-17 Martin Jambor <mjambor@suse.cz>
21428 * ipa-cp.c (create_specialized_node): Call
21429 expand_all_artificial_thunks if necessary.
21431 2018-04-17 Martin Liska <mliska@suse.cz>
21434 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21435 in message, remote space in between '_G' and '('.
21437 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21440 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21441 avx512f_vmcmp<mode>3<round_saeonly_name>,
21442 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21443 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21444 avx512f_rndscale<mode><round_saeonly_name>,
21445 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21446 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21447 Use %<iptr>2 instead of %2 for -masm=intel.
21448 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21449 avx512f_vcvttss2usi<round_saeonly_name>,
21450 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21452 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21453 avx512f_vcvttsd2usi<round_saeonly_name>,
21454 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21455 Use %q1 instead of %1 for -masm=intel.
21456 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21457 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21458 of %3 for -masm=intel.
21459 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21461 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21463 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21465 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21466 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21468 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21470 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21471 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21472 %g1 and one with %0 and %1.
21473 (avx512er_vmrcp28<mode><round_saeonly_name>,
21474 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21475 %1 for -masm=intel.
21476 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21477 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21478 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21479 of %0 and %{%4%} for -masm=intel.
21480 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21481 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21482 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21483 order of %0 and %{%5%}%{z%} for -masm=intel.
21485 2018-04-17 Jan Hubicka <jh@suse.cz>
21488 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21490 2018-04-17 Martin Liska <mliska@suse.cz>
21493 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21494 for target_clone error message. Make default implementation
21495 clone to be a local declaration.
21496 (separate_attrs): Add new argument and check for an empty
21498 (expand_target_clones): Handle it.
21499 (ipa_target_clone): Make redirection just for target_clones
21502 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21503 Tom de Vries <tom@codesourcery.com>
21505 PR middle-end/84955
21506 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21507 tiled basic blocks without omp continue statements.
21509 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21512 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21513 vec_extract expression as having side effects to make sure it gets
21516 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21519 * config/i386/i386.c (get_builtin_code_for_version): Check
21522 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21525 * config.gcc: Support "skylake".
21526 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21528 * config/i386/i386.c (m_SKYLAKE): Define.
21529 (processor_target_table): Add "skylake".
21530 (ix86_option_override_internal): Add "skylake".
21531 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21532 PROCESSOR_CANNONLAKE.
21533 (get_builtin_code_for_version): Fix priority for
21534 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21535 PROCESSOR_SKYLAKE-AVX512.
21536 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21537 (processor_type): Add PROCESSOR_SKYLAKE.
21539 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21540 Jason Merrill <jason@redhat.com>
21543 * convert.c (convert_to_integer_1): Use direct recursion for
21544 enumeral types and types with a precision less than the number
21545 of bits in their mode.
21547 2018-04-16 Julia Koval <julia.koval@intel.com>
21550 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21551 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21553 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21556 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21557 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21558 and -mno-direct-move.
21560 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21563 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21564 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21565 Ensure negative shifts result in {0}.
21567 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21569 PR rtl-optimization/79916
21570 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21571 regs (if any) to define how to gnerate SD moves when LRA is in
21574 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21576 PR rtl-optimization/85393
21577 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21578 * except.c (expand_dw2_landing_pad_for_region): Make static.
21579 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21580 a label and unconditional jump to old_bb, rather than
21581 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21584 PR rtl-optimization/85376
21585 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21586 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21587 instead of a specific value.
21589 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21590 Bin Cheng <bin.cheng@arm.com>
21592 PR tree-optimization/82965
21593 PR tree-optimization/83991
21594 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21595 by_profile_only parameter.
21596 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21597 information if the loop was predicted to iterate too many times.
21598 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21600 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21603 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21606 2018-04-13 Martin Liska <mliska@suse.cz>
21607 Jakub Jelinek <jakub@redhat.com>
21609 PR middle-end/81657
21610 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21611 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21612 * builtins.c (expand_builtin_memory_copy_args): Use
21613 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21614 handle dest_addr == pc_rtx.
21616 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21619 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21620 asked to not generate direct moves.
21621 (fix_trunc<mode>si2_stfiwx): Similar.
21622 (fix_trunc<mode>si2_internal): Similar.
21624 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21627 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21628 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21629 lookup if dest in some wider mode is known to be const0_rtx and
21630 if so, record permanent equivalence for it to be ZERO_EXTEND of
21631 the narrower mode destination.
21633 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21635 * lto-streamer-out.c (output_function): Revert 259346.
21636 * omp-expand.c (expand_oacc_for): Likewise.
21638 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21640 PR rtl-optimization/85354
21641 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21642 * sel-sched.c (sel_global_init): ... here.
21644 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21647 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21648 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21649 mode for PE-COFF targets.
21650 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21651 (i386_pe_asm_lto_end): Likewise.
21652 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21653 (TARGET_ASM_LTO_END): Likewise.
21654 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21655 (i386_pe_asm_lto_start): New function.
21656 (i386_pe_asm_lto_end): Likewise.
21658 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21659 Richard Biener <rguenther@suse.de>
21661 PR middle-end/84955
21662 * lto-streamer-out.c (output_function): Fix CFG loop state before
21664 * omp-expand.c (expand_oacc_for): Handle calls to internal
21665 functions like regular functions.
21667 2018-04-12 Richard Biener <rguenther@suse.de>
21670 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21671 for the early LTO debug to properly generate references to it
21672 during DIE emission. Do not re-use that for the skeleton for
21674 (dwarf2out_early_finish): Likewise.
21676 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21679 * config/i386/sse.md
21680 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21681 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21682 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21683 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21684 and output is a reg, avoid creating invalid lowpart subreg, but
21685 instead split into a 512-bit move. Don't split if not AVX512VL,
21686 input is xmm16+ reg and output is a mem.
21687 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21688 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21689 xmm16+ reg and output is a mem.
21691 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21693 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21694 also for flag_dwarf2_cfi_asm.
21696 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21698 PR rtl-optimization/85342
21699 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21700 a bool scalar var inside of the loop instead. Don't try to update
21701 recog_data.operand after failed apply_change_group.
21703 2018-04-12 Tom de Vries <tom@codesourcery.com>
21706 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21707 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21708 array with flexible array member as array without given dimension.
21709 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21710 argument for undefined param to true.
21712 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21715 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21716 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21717 from PowerPC section.
21718 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21719 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21720 help text that is too long.
21721 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21722 help text that is too long.
21723 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21724 help text that is too long.
21726 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21728 * config/alpha/alpha.md (stack_probe_internal): Rename
21729 from "probe_stack". Update all callers.
21731 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21733 PR rtl-optimization/84566
21734 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21735 sched_macro_fuse_insns.
21737 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21740 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21741 (compute_block_dependences): ... from here.
21743 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21745 PR tree-optimization/85331
21746 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21747 from int to HOST_WIDE_INT.
21749 2018-04-11 Martin Jambor <mjambor@suse.cz>
21752 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21753 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21754 not the same as the source val.
21755 (cgraph_edge_brings_value_p): New parameter.
21756 (gather_edges_for_value): Pass destination value to
21757 cgraph_edge_brings_value_p.
21758 (perhaps_add_new_callers): Likewise.
21759 (get_info_about_necessary_edges): Likewise and exclude values brought
21760 only by self-recursive edges.
21761 (create_specialized_node): Redirect only clones of self-calling edges.
21762 (+self_recursive_pass_through_p): New function.
21763 (find_more_scalar_values_for_callers_subset): Use it.
21764 (find_aggregate_values_for_callers_subset): Likewise.
21765 (known_aggs_to_agg_replacement_list): Removed.
21766 (decide_whether_version_node): Re-calculate known constants for all
21767 remaining context clones.
21769 2018-04-11 Richard Biener <rguenther@suse.de>
21772 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21773 from early DWARF output.
21774 (dwarf2out_early_finish): Output line info unconditionally into
21775 early DWARF and add reference to it.
21777 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21780 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21781 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21782 other than V2DFmode using iptr mode attribute.
21783 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21785 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21787 PR rtl-optimization/84659
21788 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21790 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21793 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21795 (output_loc_list): Pass address of a dummy size variable even in the
21796 locview handling loop.
21797 (index_location_lists): Add comment on why skip_loc_list_entry can't
21800 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
21803 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21806 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
21809 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21810 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21811 and -mstring-compare-inline-limit.
21813 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21816 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21817 for stack clash protection in a register whenever we need it to be in
21820 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21822 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21823 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21825 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21828 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21830 (mlong-double-): Ditto.
21831 * config/rs6000/sysv4.opt (msdata=): Ditto.
21832 (mtls-size=): Ditto.
21834 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21836 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21837 erroneous entries for
21838 "vector int vec_ldl (int, long int *)", and
21839 "vector unsigned int vec_ldl (int, unsigned long int *)".
21840 Add comments and entries for
21841 "vector bool char vec_ldl (int, bool char *)",
21842 "vector bool short vec_ldl (int, bool short *)",
21843 "vector bool int vec_ldl (int, bool int *)",
21844 "vector bool long long vec_ldl (int, bool long long *)",
21845 "vector pixel vec_ldl (int, pixel *)",
21846 "vector long long vec_ldl (int, long long *)",
21847 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21848 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21849 type tree bool_long_long_type_node and correct definition of
21850 bool_V2DI_type_node to make reference to this new type tree.
21851 (rs6000_mangle_type): Replace erroneous reference to
21852 bool_long_type_node with bool_long_long_type_node.
21853 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21854 comments to emphasize sign distinctions for char and int types and
21855 replace RS6000_BTI_bool_long constant with
21856 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21857 use of RS6000_BTI_pixel.
21858 (bool_long_type_node): Remove this macro definition.
21859 (bool_long_long_type_node): New macro definition
21861 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21863 PR rtl-optimization/85300
21864 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21865 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21866 simplify_unary_operation fails.
21868 2018-04-10 Martin Liska <mliska@suse.cz>
21870 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21871 cgraph_edge and ipa_ref.
21873 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21877 * config/i386/sse.md
21878 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21879 computation of the VEC_MERGE selector from mask.
21880 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21881 Fix decoding of the VEC_MERGE selector into mask.
21883 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21885 PR tree-optimization/85286
21886 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21888 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21890 * final.c (final_1): Set insn_last_address as well as
21891 insn_current_address.
21893 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21896 * explow.c (emit_stack_probe): Call validize_mem on memory location
21897 before passing it to gen_probe_stack. Create address operand and
21898 legitimize it for the probe_stack_address case.
21900 2018-04-09 Jan Hubicka <jh@suse.cz>
21903 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21904 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21905 * tree.c (free_lang_data_in_type): Fix handling of binfos;
21907 (free_lang_data): Rebuild type inheritance graph.
21909 2018-04-09 Martin Sebor <msebor@redhat.com>
21911 * invoke.texi (-finline-small-functions): Mention other optimization
21913 (-findirect-inlining, -fpartial-inlining): Same.
21914 (-finline-functions-called-once): Same.
21915 (-freorder-blocks-and-partition): Same.
21917 2018-04-09 Jan Hubicka <jh@suse.cz>
21920 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21921 jumps; choose last target that matches the criteria (i.e.
21922 no partition changes for non-crossing jumps).
21923 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21924 support for redirecting crossing jumps to non-crossing.
21926 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
21928 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21929 also for naked functions.
21931 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
21933 * config/arc/arc.md (add_shift): New pattern.
21934 (add_shift2): Likewise.
21935 (sub_shift): Likewise.
21936 (sub_shift_cmp0_noout): Likewise.
21937 (compare_si_ashiftsi): Likewise.
21938 (xbfu_cmp0_noout): New combine pattern.
21939 (xbfu_cmp0"): Likewise.
21940 (movsi_set_cc_insn): Place the predicable variant first.
21941 (commutative_binary_cmp0_noout): Remove clobber.
21942 (commutative_binary_cmp0): New pattern.
21943 (noncommutative_binary_cmp0): Likewise.
21944 (noncommutative_binary_cmp0_noout): Likewise.
21945 (noncommutative_binary_comparison_result_used): Removed.
21946 (rsub_cmp0): New pattern.
21947 (rsub_cmp0_noout): Likewise.
21948 (extzvsi): Changed, keep only meaningful variants.
21949 (SQH, SEZ): New iterators.
21950 (SQH_postfix): New mode attribute.
21951 (SEZ_prefix): New code attribute.
21952 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21953 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21954 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21955 of numerical value.
21956 (noncommutative_operator): Check the availability of barrel
21959 2018-04-09 Richard Biener <rguenther@suse.de>
21961 PR tree-optimization/85284
21962 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21963 Only use the niter constraining form of simple_iv when the exit
21964 is always executed.
21966 2018-04-09 Tom de Vries <tom@codesourcery.com>
21969 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21970 (define_expand "*memory_barrier"): New define_expand.
21971 (define_insn "memory_barrier"): New insn.
21973 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21975 PR rtl-optimization/80463
21976 PR rtl-optimization/83972
21977 PR rtl-optimization/83480
21979 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21980 correct producer for the insn.
21981 (tidy_control_flow): Fixup seqnos in case of debug insns.
21983 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21985 PR rtl-optimization/83913
21987 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21988 different sched-times when merging exprs.
21990 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21992 PR rtl-optimization/83962
21994 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21995 tidy_fallthru_edge and tidy_control_flow.
21997 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21999 PR rtl-optimization/83530
22001 * sel-sched.c (force_next_insn): New global variable.
22002 (remove_insn_for_debug): When force_next_insn is true, also leave only
22003 next insn in the ready list.
22004 (sel_sched_region): When the region wasn't scheduled, make another pass
22005 over it with force_next_insn set to 1.
22007 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22009 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22011 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22012 for interrupt control.
22013 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22014 functions for interrupt control.
22015 * config/nds32/nds32-intrinsic.md: Likewise.
22016 * config/nds32/nds32_intrinsic.h: Likewise.
22017 * config/nds32/nds32.h (nds32_builtins): Likewise.
22019 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22021 * config/nds32/nds32.c (nds32_init_machine_status,
22022 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22023 strict_aligned_p field.
22024 (nds32_expand_to_rtl_hook): New function.
22025 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22026 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22028 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22029 Chung-Ju Wu <jasonwucj@gmail.com>
22031 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22032 * config/nds32/nds32-n7.md: New file.
22033 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22034 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22036 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22037 * config/nds32/nds32.md (pipeline_model): Add n7.
22038 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22039 * config/nds32/pipelines.md: Include n7 settings.
22041 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22042 Chung-Ju Wu <jasonwucj@gmail.com>
22044 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22045 * config/nds32/nds32-e8.md: New file.
22046 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22047 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22049 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22050 * config/nds32/nds32.md (pipeline_model): Add e8.
22051 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22052 * config/nds32/pipelines.md: Include e8 settings.
22054 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22055 Chung-Ju Wu <jasonwucj@gmail.com>
22057 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22058 * config/nds32/nds32-n8.md: New file.
22059 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22060 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22062 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22063 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22064 * config/nds32/nds32.md (pipeline_model): Add n8.
22065 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22066 * config/nds32/pipelines.md: Include n8 settings.
22068 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22069 Chung-Ju Wu <jasonwucj@gmail.com>
22071 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22072 * config/nds32/nds32-n9-2r1w.md: New file.
22073 * config/nds32/nds32-n9-3r2w.md: New file.
22074 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22075 nds32_register_ports): New or modify for cpu n9.
22076 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22078 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22079 * config/nds32/nds32-utils.c: New file.
22080 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22081 TARGET_MUL_SLOW): Define.
22082 * config/nds32/nds32.md (pipeline_model): New attribute.
22083 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22084 New options that support cpu n9.
22085 * config/nds32/pipelines.md: Include n9 settings.
22086 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22088 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22090 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22091 information if necessary.
22092 (output_cond_branch_compare_zero): Likewise.
22093 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22094 (nds32_target_alignment): Refine for alignment.
22095 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22096 (FUNCTION_BOUNDARY): Modify.
22097 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22099 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22101 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22103 * config/nds32/constants.md (unspec_volatile_element): Add values for
22104 TLB operation and data prefetch.
22105 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22106 functions for TLB operation and data prefetch.
22107 * config/nds32/nds32-intrinsic.md: Likewise.
22108 * config/nds32/nds32_intrinsic.h: Likewise.
22109 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22110 (nds32_print_operand): Likewise.
22111 * config/nds32/nds32.h (nds32_builtins): Likewise.
22113 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22114 Andrew Pinski <pinsika@gcc.gnu.org>
22116 PR middle-end/82976
22117 * match.pd: Use constant_boolean_node of correct type instead of
22118 boolean_true_node or boolean_false_node for simplifying
22119 pointer comparisons to zero.
22121 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22123 PR tree-optimization/80021
22124 * tree.c (verify_type_variant): Make error call in verify_variant_match
22125 translatable and remove final full stop.
22127 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22129 * config/nds32/constants.md (unspec_volatile_element): Add
22130 UNSPEC_VOLATILE_EH_RETURN.
22131 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22132 nds32_output_stack_pop): Support dwarf exception handling process.
22133 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22134 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22135 exception handling process.
22136 (nds32_compute_stack_frame): Likewise.
22137 (nds32_return_addr_rtx): Likewise.
22138 (nds32_initial_elimination_offset): Likewise.
22139 (nds32_expand_prologue): Likewise.
22140 (nds32_expand_epilogue): Likewise.
22141 (nds32_dynamic_chain_address): New function.
22142 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22143 exception handling.
22144 (DYNAMIC_CHAIN_ADDRESS): Define.
22145 (EH_RETURN_DATA_REGNO): Define.
22146 (EH_RETURN_STACKADJ_RTX): Define.
22147 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22148 patterns for dwarf exception handling.
22150 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22152 * config/nds32/nds32.h: Clean up obsolete macros.
22154 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22156 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22157 Add enum values for particular instructions.
22158 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22159 particular intrinsic functions.
22160 * config/nds32/nds32-intrinsic.md: Likewise.
22161 * config/nds32/nds32_intrinsic.h: Likewise.
22162 * config/nds32/nds32.h (nds32_builtins): Likewise.
22163 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22164 (btst, ave): New patterns for particular instructions.
22166 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22168 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22169 Add enum values for atomic load/store and memory sync.
22170 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22172 * config/nds32/nds32-intrinsic.md: Likewise.
22173 * config/nds32/nds32_intrinsic.h: Likewise.
22174 * config/nds32/nds32.h (nds32_builtins): Likewise.
22176 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22178 PR tree-optimization/85257
22179 * fold-const.c (native_encode_vector): If not all elts could fit
22180 and off is -1, return 0 rather than offset.
22181 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22182 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22183 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22184 adjust buffer in native_interpret_expr call.
22186 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22188 * config/nds32/constants.md (unspec_volatile_element): Add cache
22189 control enum values.
22190 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22191 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22192 * config/nds32/nds32.c (nds32_cctl_names): New.
22193 (nds32_print_operand): Handle cache control register names.
22194 * config/nds32/nds32.h (nds32_builtins): New enum values.
22195 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22197 * config/nds32/nds32.md (type): Add mmu.
22198 * config/nds32/pipelines.md (simple_insn): Add mmu.
22200 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22202 * config/nds32/nds32.md (type): Remove call.
22203 * config/nds32/pipelines.md (simple_insn): Likewise.
22205 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22207 * config/nds32/constants.md (unspec_volatile_element): Add
22208 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22209 UNSPEC_VOLATILE_FMFCFG.
22210 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22211 description for fmfcfg and fmfcsr.
22212 (bdesc_1arg): Add fmtcsr.
22213 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22214 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22215 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22216 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22217 unspec_fmfcfg): New patterns.
22218 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22219 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22220 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22221 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22222 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22223 __nds32__fmfcfg): Define.
22225 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22227 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22228 intrinsic register names.
22229 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22230 intrinsic register enum values and macros.
22232 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22234 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22235 for load/store addressing form.
22236 (nds32_print_operand_address): Likewise.
22238 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22241 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22242 based on LABEL_REF. Remove useless assertion.
22243 (pic_address_needs_scratch): Fix formatting.
22244 (sparc_legitimize_pic_address): Minor tweaks.
22245 (sparc_delegitimize_address): Adjust assertion accordingly.
22246 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22247 into symbolic_operand.
22248 (movsi_high_pic_label_ref): Likewise.
22249 (movsi_lo_sum_pic_label_ref): Likewise.
22250 (movdi_pic_label_ref): Likewise.
22251 (movdi_high_pic_label_ref): Likewise.
22252 (movdi_lo_sum_pic_label_ref): Likewise.
22254 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22256 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22257 custom LIB_SPEC setup.
22259 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22260 Kito Cheng <kito.cheng@gmail.com>
22262 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22263 * config/riscv/freebsd.h: New.
22265 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22267 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22268 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22271 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22272 Kito Cheng <kito.cheng@gmail.com>
22274 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22275 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22276 * config/nds32/nds32-protos.h (nds32_output_call,
22277 nds32_output_return): Declare.
22278 * config/nds32/nds32.md: Refine all the call and return patterns.
22280 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22283 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22284 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22286 PR rtl-optimization/84872
22287 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22288 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22289 EDGE_CROSSING edge.
22291 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22293 * expr.c (copy_blkmode_to_reg): Revert 254862.
22294 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22296 2018-04-06 Richard Biener <rguenther@suse.de>
22298 PR middle-end/85244
22299 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22300 after seeing a component reference with an adjacent field. Treat
22301 refs to arrays at struct end of external decls similar to
22302 refs to unconstrained commons.
22304 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22307 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22308 look through SAVE_EXPRs with non-side-effects argument. Adjust
22310 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22313 2018-04-06 Richard Biener <rguenther@suse.de>
22315 PR middle-end/85180
22316 * alias.c (find_base_term): New wrapper around find_base_term
22317 unwinding CSELIB_VAL_PTR changes.
22318 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22321 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22323 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22325 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22326 constant definitions.
22327 ("nop"): lr 0,0 -> nopr r0
22328 ("nop_lr0", "nop_lr1"): New insn definitions.
22330 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22332 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22333 NDS32_V3PUSH_AVAILABLE_P macro.
22335 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22336 Chung-Ju Wu <jasonwucj@gmail.com>
22338 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22339 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22340 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22341 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22342 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22343 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22344 * config/nds32/constraints.md: New constraints and checking for hard
22345 float configuration.
22346 * config/nds32/iterators.md: New mode iterator and attribute for hard
22347 float configuration.
22348 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22350 * config/nds32/nds32-fpu.md: New file.
22351 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22352 deal with hard float code generation.
22353 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22355 (abi_type, float_reg_number): New enum type.
22356 * config/nds32/nds32-predicates.c: New predicates for hard float.
22357 * config/nds32/nds32-protos.h: Declare functions for hard float.
22358 * config/nds32/nds32.c: Implementation for hard float configuration.
22359 * config/nds32/nds32.h: Definitions for hard float configuration.
22360 * config/nds32/nds32.md: Include hard float machine description and
22361 modify patterns for hard float configuration.
22362 * config/nds32/nds32.opt: New options for hard float configuration.
22363 * config/nds32/predicates.md: New predicates for hard float
22366 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22368 * common/config/nds32/nds32-common.c
22369 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22371 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22373 PR middle-end/85195
22374 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22375 CONSTRUCTOR_ELT (ctor, ...)->value.
22377 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22380 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22382 2018-04-05 Tom de Vries <tom@codesourcery.com>
22385 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22388 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22389 Kito Cheng <kito.cheng@gmail.com>
22391 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22392 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22393 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22394 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22396 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22397 Kito Cheng <kito.cheng@gmail.com>
22399 * config/nds32/constraints.md (Ufe): New memory constraint.
22400 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22401 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22402 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22404 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22405 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22407 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22409 * config/nds32/nds32.md: Use optimize_size in the condition for
22410 alu-shift instructions.
22412 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22414 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22416 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22418 * config/nds32/nds32.md (negsi2): Refine pattern.
22420 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22421 Chung-Ju Wu <jasonwucj@gmail.com>
22423 * config/nds32/iterators.md (shift_rotate): New code iterator.
22424 (shift): New code attribute.
22425 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22426 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22427 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22428 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22429 bit-wise operations.
22430 (andsi3, *andsi3): Ditto.
22431 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22432 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22433 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22434 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22435 nds32_ior_operand, nds32_xor_operand): New predicates.
22437 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22439 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22440 (addsi3, subsi3): ... this.
22442 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22444 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22446 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22448 * config/nds32/nds32.md: Adjust indention.
22450 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22452 * config/nds32/nds32.md (feature): New attribute.
22454 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22456 * config/nds32/nds32.md (subtype): New attribute.
22458 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22461 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22462 expansion to perform a bitwise AND of the argument followed by a
22463 boolean negation of the result.
22465 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22467 PR rtl-optimization/84878
22468 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22469 the basic block. Assert the use reference is not artificial and that
22470 it has an associated insn.
22472 2018-04-04 Michael Matz <matz@suse.de>
22474 * builtins.c (compute_objsize): Pass correct operand
22475 to array_at_struct_end_p.
22477 2018-04-04 Richard Biener <rguenther@suse.de>
22480 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22481 from contexts for DINFO_LEVEL_TERSE and below.
22483 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22485 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22486 resiter_operand condition.
22487 * config/nds32/nds32.md (*move<mode>): Ditto.
22489 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22490 Monk Chiang <sh.chiang04@gmail.com>
22492 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22494 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22496 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22498 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22499 Kito Cheng <kito.cheng@gmail.com>
22501 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22502 nds32_cond_code_str, output_cond_branch,
22503 output_cond_branch_compare_zero, nds32_expand_cbranch,
22504 nds32_expand_cstore, nds32_expand_movcc,
22505 nds32_output_cbranchsi4_equality_zero,
22506 nds32_output_cbranchsi4_equality_reg,
22507 nds32_output_cbranchsi4_equality_reg_or_const_int,
22508 nds32_output_cbranchsi4_greater_less_zero: New functions.
22509 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22510 nds32_expand_cstore, nds32_expand_movcc,
22511 nds32_output_cbranchsi4_equality_zero,
22512 nds32_output_cbranchsi4_equality_reg,
22513 nds32_output_cbranchsi4_equality_reg_or_const_int,
22514 nds32_output_cbranchsi4_greater_less_zero): Declare.
22515 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22516 nds32_rimm11s_operand): New predicates.
22517 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22518 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22521 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22523 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22524 * config/nds32/nds32.md: Ditto.
22525 * config/nds32/pipelines.md: Ditto.
22527 2018-04-04 Richard Biener <rguenther@suse.de>
22529 PR tree-optimization/85168
22530 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22531 propagating abnormals.
22533 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22535 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22537 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22538 Kito Cheng <kito.cheng@gmail.com>
22540 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22541 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22542 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22543 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22544 * config/nds32/nds32.md (sibcall_internal): New.
22545 (sibcall_register): Remove.
22546 (sibcall_immediate): Remove.
22547 (sibcall_value_internal): New.
22548 (sibcall_value_register): Remove.
22549 (sibcall_value_immediate): Remove.
22550 * config/nds32/predicates.md (nds32_general_register_operand): New.
22551 (nds32_call_address_operand): New.
22553 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22555 PR rtl-optimization/85167
22556 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22557 bb_defs if *split_p, instead preinitialize it to NULL.
22559 PR tree-optimization/85156
22560 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22561 evaluating the argument multiple times.
22563 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22565 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22567 (_mm_cvtpd_ps): Likewise.
22568 (_mm_cvttpd_epi32): Likewise.
22569 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22570 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22571 vector, pixel, and bool following altivec.h include.
22573 2018-04-03 Martin Sebor <msebor@redhat.com>
22575 * doc/extend.texi (Common Function Attributes): Clarify.
22576 (const attribute): Likewise.
22577 (pure attribute): Likewise.
22579 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22582 * config/i386/i386.c (ix86_expand_vector_set): Use
22583 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22585 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22587 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22588 instructions when changing rounding bits to preserve precision bits
22589 in the x87 control word.
22591 2018-04-03 Martin Liska <mliska@suse.cz>
22593 PR tree-optimization/82491
22594 * rtl.h (strip_offset_and_add): Replace += suboffset with
22595 poly_uint64 () + suboffset.
22597 2018-03-29 Martin Liska <mliska@suse.cz>
22598 Martin Jambor <mjambor@suse.cz>
22601 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22602 param_type is not an integral or pointer type.
22604 2018-04-03 Richard Biener <rguenther@suse.de>
22606 * sese.h (recompute_all_dominators): Remove.
22608 2018-04-02 Martin Sebor <msebor@redhat.com>
22610 * doc/invoke.texi (-Wrestrict): Fix typos.
22612 2018-04-02 Jim Wilson <jimw@sifive.com>
22614 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22615 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22616 (<optab>di3, <optab>si3_extend): Likewise.
22617 (<optab>si3_mask, <optab>si3_mask_1): New.
22618 (<optab>di3_mask, <optab>di3_mask_1): New.
22619 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22620 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22621 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22623 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22625 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22628 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22630 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22631 (nds32_canonicalize_comparison): New function.
22633 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22634 Kito Cheng <kito.cheng@gmail.com>
22635 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22637 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22638 * config/nds32/constants.md (unspec_volatile_element): Add
22639 UNSPEC_VOLATILE_RELAX_GROUP.
22640 * config/nds32/nds32-relax-opt.c: New file.
22641 * config/nds32/nds32-predicates.c
22642 (nds32_symbol_load_store_p): New function.
22643 * config/nds32/nds32-protos.h
22644 (nds32_symbol_load_store_p): Declare function.
22645 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22646 * config/nds32/nds32.c
22647 (nds32_register_pass): New function to register pass.
22648 (nds32_register_passes): New function to register passes.
22649 * config/nds32/nds32.md (relax_group): New pattern.
22650 * config/nds32/nds32.opt (mrelax-hint): New option.
22651 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22653 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22655 * config/nds32/t-nds32: Modify files dependency.
22657 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22659 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22660 (PROFILE_HOOK): Define its implementation.
22662 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22664 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22665 type and 32-bit size.
22667 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22669 PR middle-end/85090
22670 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22671 (V_128_256): New mode iterator.
22672 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22673 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22674 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22676 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22677 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22679 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22682 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22683 NaN inputs correctly.
22685 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22688 * config/rs6000/vsx.md (??r): New mode attribute.
22689 (*vsx_mov<mode>_64bit): Use it.
22690 (*vsx_mov<mode>_32bit): Likewise.
22692 2018-03-30 Martin Sebor <msebor@redhat.com>
22694 PR tree-optimization/84818
22695 * builtins.c (check_access): Use warning_n.
22697 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22700 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22702 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22705 2018-03-30 Julia Koval <julia.koval@intel.com>
22708 * x86-tune.def (movx, partial_reg_dependency): Enable for
22711 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22713 PR inline-asm/84985
22714 * lra-constraints.c (process_alt_operands): Move setting
22715 this_alternative_matches below.
22717 2018-03-29 Martin Liska <mliska@suse.cz>
22720 * doc/invoke.texi: Document how LTO works with debug info.
22721 Describe auto-load support of binutils. Mention 'x86-64'
22722 as valid option value of -march option.
22724 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22726 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22729 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22730 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22731 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22734 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22737 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22738 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22739 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22740 for RS6000_BTM_POWERPC64.
22741 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22742 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22743 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22746 (DIVDEU): Likewise.
22748 2018-03-28 Carl Love <cel@us.ibm.com>
22751 2017-09-27 Carl Love <cel@us.ibm.com>
22753 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22754 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22755 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22758 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22760 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22761 instead of __vector bool.
22762 (_mm_max_pu8): Likewise.
22763 (_mm_min_pi16): Likewise.
22765 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22768 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22769 (DIVWEUO): Likewise.
22770 (DIVDEO): Likewise.
22771 (DIVDEUO): Likewise.
22772 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22773 DIVWEUO and DIVDEUO.
22774 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22775 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22776 (div_extend): Likewise.
22777 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22779 (__builtin_divweuo): Likewise.
22780 (__builtin_divdeo): Likewise.
22781 (__builtin_divdeuo): Likewise.
22783 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22786 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22787 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22789 PR tree-optimization/82004
22790 * gimple-match-head.c (optimize_pow_to_exp): New function.
22791 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22792 Don't fold to exp if optimize_pow_to_exp is false.
22794 2018-03-28 Martin Liska <mliska@suse.cz>
22797 * calls.c (initialize_argument_information): Fix trailing space.
22798 * common.opt: Fix typo and provide better explanation for
22799 -fsanitize-coverage option.
22800 * config/i386/i386.opt: Fix typo.
22802 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22803 Martin Liska <mliska@suse.cz>
22806 * gimplify.c (asan_poison_variable): Don't do the check for
22807 gimplify_omp_ctxp here.
22808 (gimplify_decl_expr): Do it here.
22809 (gimplify_target_expr): Likewise.
22811 2018-03-28 Martin Liska <mliska@suse.cz>
22814 * config/i386/i386.c (ix86_function_arg_advance): Do not call
22815 chkp_type_bounds_count if MPX is not enabled.
22817 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
22819 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22821 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
22824 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22825 function to create the function decl for complex long double
22826 multiply and divide for -mabi=ieeelongdouble.
22827 (init_float128_ieee): Call it.
22829 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22832 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22833 -fcf-protection=branch -mibt.
22834 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22836 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22839 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22840 arm_word_relocations.
22842 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22845 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22846 extern array declarations.
22848 2018-03-27 Richard Biener <rguenther@suse.de>
22850 PR middle-end/84067
22851 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22852 explicit single_use checks.
22854 2018-03-27 Richard Biener <rguenther@suse.de>
22856 PR tree-optimization/85082
22857 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22860 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22862 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22863 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22864 Turn on fasynchronous-unwind-tables and funwind-tables.
22866 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22869 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22870 (*bmi_blsr_<mode>_ccz): Ditto.
22872 2018-03-26 Tom de Vries <tom@codesourcery.com>
22874 PR tree-optimization/85063
22875 * omp-general.c (offloading_function_p): New function. Factor out
22877 * omp-offload.c (pass_omp_target_link::gate): ... here.
22878 * omp-general.h (offloading_function_p): Declare.
22879 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22880 with attribute omp declare target for offloading functions.
22882 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
22884 PR tree-optimization/84005
22885 * tree-data-ref.h (get_base_for_alignment): Declare.
22886 * tree-data-ref.c (get_base_for_alignment_1): New function.
22887 (get_base_for_alignment): Likewise.
22888 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22889 get_base_for_alignment to find a suitable base object, instead
22890 of always using drb->base_address.
22892 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22894 PR inline-asm/85022
22895 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22896 known size by default.
22898 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
22900 PR inline-asm/85030
22901 * lra-constraints.c (process_alt_operands): Don't match BLKmode
22902 and non BLKmode operands.
22904 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22907 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22908 Clean up attributes.
22910 2018-03-23 Richard Biener <rguenther@suse.de>
22913 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22914 we are going to emit early debug for LTO.
22916 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22918 PR inline-asm/85034
22919 * function.c (match_asm_constraints_1): Don't optimize if input
22920 doesn't satisfy general_operand predicate for output's mode.
22922 PR inline-asm/85022
22923 * alias.c (write_dependence_p): Don't require for x_canonicalized
22924 non-VOIDmode if x has VOIDmode.
22927 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22928 just don't try to optimize it rather than assert it never happens.
22930 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22932 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22933 macro expansions for definition of ST_INTERNAL_<mode> and
22934 LD_INTERNAL_<mode> builtins.
22935 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22937 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22939 (altivec_expand_st_builtin): Likewise.
22940 (altivec_expand_builtin): Remove calls to deleted functions.
22941 (rs6000_address_for_altivec): Delete this function.
22942 * config/rs6000/vector.md: Remove expands for
22943 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22945 2018-03-22 Sudakshina Das <sudi.das@arm.com>
22948 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22949 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22950 re-computing once computed.
22951 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22952 (arm_init_machine_status): Initialize
22953 machine->static_chain_stack_bytes.
22955 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22958 * doc/extend.texi: Add four new prototypes for vec_ld.
22959 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22960 definitions for more logical presentation.
22961 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22962 entries for V1TI variants of __builtin_altivec_ld builtin.
22963 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22964 handling of V1TI variant of LVX icode pattern.
22965 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22966 (rs6000_gimple_fold_builtin): Likewise.
22967 (altivec_init_builtins): Add code to define
22968 __builtin_altivec_lvx_v1ti function.
22970 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22972 PR inline-asm/84941
22973 * function.c (match_asm_constraints_1): Don't do the optimization
22974 if input isn't a REG, SUBREG, MEM or constant.
22976 2018-03-22 Tom de Vries <tom@codesourcery.com>
22978 PR tree-optimization/84956
22979 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22980 bb_has_abnormal_pred.
22982 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22985 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22986 DECL_INITIAL (decl) to decl at the end.
22987 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22988 adjust the comment.
22990 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22992 * doc/extend.texi (__builtin_tgmath): Document when complex
22993 integer types are treated as _Complex _Float64.
22995 2018-03-21 Tom de Vries <tom@codesourcery.com>
22997 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22999 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23001 PR tree-optimization/84960
23002 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23003 if it is ENTRY block, move them into single succ of ENTRY in that case.
23005 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23007 PR tree-optimization/84811
23008 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23009 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23010 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23011 (known_subrange_p): Update accordingly. Cast each value involved
23012 in the size comparison, rather than casting the result of the
23015 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23017 PR tree-optimization/84982
23018 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23019 by flipping the least significant bit rather than all bits from
23020 bitpos to bitpos + bitsize - 1.
23022 2018-03-21 Nathan Sidwell <nathan@acm.org>
23024 * doc/extend.texi (Deprecated Features): Remove mention of
23025 long-deleted deprecations.
23027 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23030 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23031 * configure: Regenerate.
23033 2018-03-21 Tom de Vries <tom@codesourcery.com>
23035 PR tree-optimization/83126
23036 * tree-parloops.c (num_phis): New function.
23037 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23039 2018-03-21 Nathan Sidwell <nathan@acm.org>
23041 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23042 mention anon-struct/union members and trailing attributes.
23044 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23046 PR tree-optimization/84969
23047 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23048 builtin memset partitions if they set different rhs values.
23050 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23052 PR rtl-optimization/84989
23053 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23054 VEC_DUPLICATE with scalar result mode.
23056 2018-03-21 Martin Liska <mliska@suse.cz>
23059 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23060 not intended return statement.
23062 2018-03-21 Martin Liska <mliska@suse.cz>
23065 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23066 (chkp_find_bound_slots_1): Limit number of iterations.
23068 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23071 * Minor grammar fixes for x86 options.
23073 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23076 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23077 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23079 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23082 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23083 (altivec_lvx_<mode>_1op): Likewise.
23084 (altivec_stvx_<mode>_2op): Likewise.
23085 (altivec_stvx_<mode>_1op): Likewise.
23086 (altivec_lvx_<VM2:mode>): New define_expand.
23087 (altivec_stvx_<VM2:mode>): Likewise.
23088 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23089 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23090 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23091 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23092 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23093 (rs6000_gen_lvx): Likewise.
23094 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23095 (altivec_expand_stv_builtin): Likewise.
23096 (altivec_expand_builtin): Likewise.
23097 * config/rs6000/vector.md: Likewise.
23099 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23102 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23105 2018-03-20 Richard Biener <rguenther@suse.de>
23108 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23109 sign-conversions as zero, fall back to standard scalar_stmt
23112 2018-03-20 Martin Liska <mliska@suse.cz>
23115 * predict.c (rebuild_frequencies): Handle case when we have
23116 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23118 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23121 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23122 flag_section_anchors.
23123 * varasm.c (use_blocks_for_decl_p): Remove hack for
23124 dw2_force_const_mem.
23127 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23129 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23130 be created, use lowpart_subreg of operands[0] rather than operands[0]
23132 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23133 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23134 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23135 and n constraint instead of aarch64_shift_imm_di and Usd.
23136 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23137 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23139 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23142 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23143 to favor GPR over NEON registers.
23144 (<shift>di3_neon): Likewise.
23146 2018-03-20 Tom de Vries <tom@codesourcery.com>
23149 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23150 (nvptx_process_pars): Emit bar.sync asap and alap.
23152 2018-03-20 Tom de Vries <tom@codesourcery.com>
23155 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23156 seen_label if seen_label is already set.
23158 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23161 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23162 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23163 Use 1U instead of 1. Formatting fixes.
23166 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23167 instead of TREE_TYPE (s1) for the return value.
23169 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23171 PR tree-optimization/84946
23172 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23173 bitsize + bitsize in poly_uint64 rather than poly_int64.
23176 * dwarf2asm.c: Include fold-const.c.
23177 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23178 of decl rather than decl itself.
23180 PR rtl-optimization/84643
23181 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23183 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23186 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23187 calling assemble_variable.
23189 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23192 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23193 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23195 2018-03-19 Jim Wilson <jimw@sifive.com>
23198 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23199 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23200 (riscv_first_stack_step): Likewise.
23201 (riscv_option_override): Use STACK_BOUNDARY instead of
23202 MIN_STACK_BOUNDARY.
23203 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23204 MIN_STACK_BOUNDARY.
23205 (BIGGEST_ALIGNMENT): Set to 128.
23206 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23207 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23210 2018-03-19 Richard Biener <rguenther@suse.de>
23212 PR tree-optimization/84933
23213 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23214 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23216 2018-03-19 Richard Biener <rguenther@suse.de>
23218 PR tree-optimization/84859
23219 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23220 (cond_if_else_store_replacement): Perform sinking operation on
23221 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23222 Generalize what a BB with a single eligible store is.
23224 2018-03-19 Richard Biener <rguenther@suse.de>
23226 PR tree-optimization/84929
23227 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23228 chrec_is_positive against non-chrec arg.
23230 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23233 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23235 2018-03-18 Martin Liska <mliska@suse.cz>
23237 PR rtl-optimization/84635
23238 * regrename.c (build_def_use): Use matches_mode only when
23241 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23243 PR tree-optimization/84913
23244 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23245 vectorize chains of COND_EXPRs.
23247 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23249 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23251 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23253 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23255 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23257 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23259 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23260 Kito Cheng <kito.cheng@gmail.com>
23262 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23263 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23264 (nds32_adjust_reg_alloc_order): New function.
23265 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23267 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23269 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23270 nds32_print_operand, nds32_print_operand_address): Use
23271 HOST_WIDE_INT_PRINT_DEC instead.
23273 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23275 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23277 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23280 * config/i386/i386.c (initial_ix86_tune_features,
23281 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23282 unsigned long long.
23283 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23284 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23285 rather than 1u << ix86_tune. Formatting fix.
23286 (ix86_option_override_internal): Change ix86_arch_mask from
23287 unsigned int to unsigned HOST_WIDE_INT, initialize to
23288 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23289 (ix86_function_specific_restore): Likewise.
23291 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23294 * postreload.c (reload_combine_recognize_pattern): Perform
23295 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23296 truncate_int_for_mode the result for the destination's mode.
23299 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23300 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23302 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23305 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23308 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23309 regno_allocno_class_array and sorted_pseudos.
23310 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23311 insns where regno is used.
23313 2018-03-16 Martin Liska <mliska@suse.cz>
23316 * multiple_target.c (create_dispatcher_calls): Redirect
23317 reference in the symbol table.
23319 2018-03-16 Martin Liska <mliska@suse.cz>
23322 * multiple_target.c (create_dispatcher_calls): Redirect also
23325 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23329 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23330 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23331 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23333 2018-03-16 Julia Koval <julia.koval@intel.com>
23335 * doc/invoke.texi (Skylake Server): Add CLWB.
23336 Cannonlake): Remove CLWB.
23338 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23340 PR tree-optimization/84841
23341 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23343 (FLOAT_ONE_CONST_TYPE): Define.
23344 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23345 (sort_by_operand_rank): Put entries with higher constant_type last
23346 rather than first to match comments.
23348 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23350 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23353 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23356 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23357 check and use address of target always.
23359 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23362 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23363 (indirect_thunk_bnd_needed): Likewise.
23364 (indirect_thunks_used): Likewise.
23365 (indirect_thunks_bnd_used): Likewise.
23366 (indirect_return_needed): New.
23367 (indirect_return_bnd_needed): Likewise.
23368 (output_indirect_thunk_function): Add a bool argument for
23370 (output_indirect_thunk_function): Don't generate alias for
23371 function return thunk.
23372 (ix86_code_end): Call output_indirect_thunk_function to generate
23373 function return thunks.
23374 (ix86_output_function_return): Set indirect_return_bnd_needed
23375 and indirect_return_needed instead of indirect_thunk_bnd_needed
23376 and indirect_thunk_needed.
23378 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23380 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23381 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23382 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23384 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23385 Paul Hua <paul.hua.gm@gmail.com>
23388 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23390 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23392 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23393 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23394 resp. SFmode cases.
23396 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23399 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23400 instead of GET_MODE_SIZE when comparing Units.
23402 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23405 * varasm.c (hash_section): Return an unchangeble hash value
23406 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23407 Return !aarch64_can_use_per_function_literal_pools_p ().
23409 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23412 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23413 rather than address of cmode as last argument to prepare_cmp_insn.
23415 2018-03-15 Julia Koval <julia.koval@intel.com>
23417 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23418 F_AVX512VNNI, F_AVX512BITALG): New.
23420 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23423 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23424 insn for floating-point loads and stores.
23426 2018-03-14 Carl Love <cel@us.ibm.com>
23428 * config/rs6000/rs6000-c.c: Add macro definitions for
23429 ALTIVEC_BUILTIN_VEC_PERMXOR.
23430 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23431 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23432 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23433 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23435 * config/doc/extend.texi: Add prototypes for vec_permxor.
23437 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23440 * diagnostic-show-locus.c (class layout_point): Convert m_line
23441 from int to linenum_type.
23442 (line_span::comparator): Use linenum "compare" function when
23443 comparing line numbers.
23444 (test_line_span): New function.
23445 (layout_range::contains_point): Convert param "row" from int to
23447 (layout_range::intersects_line_p): Likewise.
23448 (layout::will_show_line_p): Likewise.
23449 (layout::print_source_line): Likewise.
23450 (layout::should_print_annotation_line_p): Likewise.
23451 (layout::print_annotation_line): Likewise.
23452 (layout::print_leading_fixits): Likewise.
23453 (layout::annotation_line_showed_range_p): Likewise.
23454 (struct line_corrections): Likewise for field m_row.
23455 (line_corrections::line_corrections): Likewise for param "row".
23456 (layout::print_trailing_fixits): Likewise.
23457 (layout::get_state_at_point): Likewise.
23458 (layout::get_x_bound_for_row): Likewise.
23459 (layout::print_line): Likewise.
23460 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23461 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23462 * input.c (selftest::test_linenum_comparisons): New function.
23463 (selftest::input_c_tests): Call it.
23464 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23465 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23466 * selftest.h (ASSERT_GT): New macro.
23467 (ASSERT_GT_AT): New macro.
23468 (ASSERT_LT): New macro.
23469 (ASSERT_LT_AT): New macro.
23471 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23473 PR rtl-optimization/84780
23474 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23476 2018-03-14 Martin Liska <mliska@suse.cz>
23478 * tree.c (record_node_allocation_statistics): Use
23479 get_stats_node_kind.
23480 (get_stats_node_kind): New function extracted from
23481 record_node_allocation_statistics.
23482 (free_node): Use get_stats_node_kind.
23484 2018-03-14 Richard Biener <rguenther@suse.de>
23486 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23487 that the value-set of ANTIC_IN doesn't grow.
23490 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23492 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23493 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23495 2018-03-14 Julia Koval <julia.koval@intel.com>
23497 * config.gcc (icelake-client, icelake-server): New.
23499 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23500 (initial_ix86_arch_features): Ditto.
23501 (PTA_SKYLAKE): Add SGX.
23502 (PTA_ICELAKE): Remove.
23503 (PTA_ICELAKE_CLIENT): New.
23504 (PTA_ICELAKE_SERVER): New.
23505 (ix86_option_override_internal): Split up icelake on icelake client and
23507 (get_builtin_code_for_version): Ditto.
23508 (fold_builtin_cpu): Ditto.
23509 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23510 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23511 * config/i386/i386.h (processor_type): Ditto.
23512 * doc/invoke.texi: Ditto.
23514 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23517 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23518 INTEGER_CST offset, add it together with bitpos / 8 and
23519 sign extend based on POINTER_SIZE.
23523 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23526 * config/i386/constraints.md (Yc): New register constraint.
23527 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23528 Use Yc constraint for alternative 2 of operand 0. Remove
23529 preferred_for_speed attribute.
23531 2018-03-14 Richard Biener <rguenther@suse.de>
23533 PR tree-optimization/84830
23534 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23535 with the old one to avoid oscillations.
23537 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23540 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23542 (assign_by_spills): Return a flag of reload assignment failure.
23543 Do not process the reload assignment failures. Do not spill other
23544 reload pseudos if they has the same reg class. Update n if
23546 (lra_assign): Add a return arg. Set up from the result of
23547 assign_by_spills call.
23548 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23549 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23550 usage_insns if it is not NULL.
23551 (spill_hard_reg_in_range): New function.
23552 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23553 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23554 function prototypes.
23555 (lra_assign): Change prototype.
23556 * lra.c (lra): Add code to deal with fails by splitting hard reg
23559 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23561 * config/riscv/riscv.opt (mrelax): New option.
23562 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23563 "norelax" when riscv_mrelax is disabled.
23564 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23566 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23569 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23570 reassociation for int modes.
23572 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23574 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23575 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23577 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23578 * config/aarch64/aarch64-sve.md
23579 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23580 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23581 (*extend<mode><Vwide>2): Rename to...
23582 (aarch64_sve_extend<mode><Vwide>2): ...this.
23583 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23584 renaming the old pattern to...
23585 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23587 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23588 define_expand, renaming the old pattern to...
23589 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23590 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23591 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23592 account when deciding which SVE instruction the optab should use.
23593 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23595 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23597 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23598 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23599 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23600 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23601 (tlsdesc_small_<mode>): Turn a define_expand and use
23602 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23603 (tlsdesc_small_advsimd_<mode>): ...this.
23604 (tlsdesc_small_sve_<mode>): New pattern.
23606 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23608 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23609 (UNSPEC_UMUL_HIGHPART): New constants.
23610 (MUL_HIGHPART): New int iteraor.
23611 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23612 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23614 (*<su>mul<mode>3_highpart): New define_insn.
23616 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23619 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23622 2018-03-13 Martin Liska <mliska@suse.cz>
23625 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23627 (sem_item_optimizer::~sem_item_optimizer): Release it.
23628 (sem_item_optimizer::merge_classes): Register variable aliases.
23629 (sem_item_optimizer::fixup_pt_set): New function.
23630 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23631 * ipa-icf.h: Declare new variables and functions.
23633 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23635 PR middle-end/84834
23636 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23637 integer_pow2p@2 and test integer_pow2p in condition.
23638 (A < 0 ? C : 0): Similarly for @1.
23640 PR middle-end/84831
23641 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23642 characters starting at p contain '\0' character, don't look beyond
23646 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23647 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23650 * reg-stack.c (change_stack): Change update_end var from int to
23651 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23652 also call set_block_for_insn on the newly added insns and rescan.
23655 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23656 on the last operand.
23659 * tree.c (stabilize_reference_1): Return save_expr (e) for
23660 STATEMENT_LIST even if it doesn't have side-effects.
23662 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23664 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23666 2018-03-12 Renlin Li <renlin.li@arm.com>
23668 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23669 aarch64_output_scalar_simd_mov_immediate.
23671 2018-03-12 Martin Sebor <msebor@redhat.com>
23673 PR tree-optimization/83456
23674 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23675 for perfectly overlapping calls to memcpy.
23676 (gimple_fold_builtin_memory_chk): Same.
23677 (gimple_fold_builtin_strcpy): Handle no-warning.
23678 (gimple_fold_builtin_stxcpy_chk): Same.
23679 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23681 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23683 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23684 parameter. Use it for SFmode.
23685 (rs6000_function_arg_advance_1): Adjust.
23686 (rs6000_function_arg): Adjust.
23687 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23689 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23691 PR rtl-optimization/84169
23692 PR rtl-optimization/84780
23693 * combine.c (can_combine_p): Check for a 2-insn combination whether
23694 the destination register is used between the two insns, too.
23696 2018-03-12 Richard Biener <rguenther@suse.de>
23698 PR tree-optimization/84803
23699 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23700 for refs DR analysis didn't process.
23702 2018-03-12 Richard Biener <rguenther@suse.de>
23704 PR tree-optimization/84777
23705 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23706 force-vectorize loops ignore whether we are optimizing for size.
23708 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23710 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23711 (TARGET_MD_ASM_ADJUST): Define.
23713 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23714 Kito Cheng <kito.cheng@gmail.com>
23715 Chung-Ju Wu <jasonwucj@gmail.com>
23717 * config/nds32/nds32.c (nds32_compute_stack_frame,
23718 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23719 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23720 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23721 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23722 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23723 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23724 * config/nds32/nds32.md (prologue, epilogue): Use macro
23725 NDS32_V3PUSH_AVAILABLE_P to do checking.
23727 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23730 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23731 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23732 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23733 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23734 addition of most attributes on !orig_type_die or the attribute not
23735 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23737 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23738 Chung-Ju Wu <jasonwucj@gmail.com>
23740 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23741 __NDS32_VH__ macro.
23742 * config/nds32/nds32.opt (mvh): New option.
23744 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23745 Chung-Ju Wu <jasonwucj@gmail.com>
23747 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23749 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23750 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23753 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23754 Chung-Ju Wu <jasonwucj@gmail.com>
23756 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23758 * config/nds32/nds32-multiple.md (strlensi): New pattern.
23759 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23761 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
23762 Kito Cheng <kito.cheng@gmail.com>
23763 Chung-Ju Wu <jasonwucj@gmail.com>
23765 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23766 UNSPEC_FFMISM and UNSPEC_FLMISM.
23767 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23768 for ffb, ffmism and flmism.
23769 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23770 (unspec_ffmism): Ditto.
23771 (unspec_flmism): Ditto.
23772 (nds32_expand_builtin_impl): Check if string extension is available.
23773 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23774 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23776 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
23779 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23782 * lra-assigns.c (assign_by_spills): Return a flag of reload
23783 assignment failure. Do not process the reload assignment
23784 failures. Do not spill other reload pseudos if they has the same
23786 (lra_assign): Add a return arg. Set up from the result of
23787 assign_by_spills call.
23788 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23789 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23790 usage_insns if it is not NULL.
23791 (spill_hard_reg_in_range): New function.
23792 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23793 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23794 function prototypes.
23795 (lra_assign): Change prototype.
23796 * lra.c (lra): Add code to deal with fails by splitting hard reg
23799 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
23802 * config/i386/i386.opt: Replace Enforcment with Enforcement.
23804 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
23807 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23808 (dw_val_node): Add val_symbolic_view.
23809 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23810 (symview_upper_bound): New.
23811 (new_line_info_table): Initialize symviews_since_reset.
23812 (dwarf2out_source_line): Count symviews_since_reset and set
23813 symview_upper_bound.
23814 (dw_val_equal_p): Handle symview.
23815 (add_AT_symview): New.
23816 (print_dw_val): Handle symview.
23817 (attr_checksum, attr_checksum_ordered): Likewise.
23818 (same_dw_val_p, size_of_die): Likewise.
23819 (value_format, output_die): Likewise.
23820 (add_high_low_attributes): Use add_AT_symview for entry_view.
23821 (dwarf2out_finish): Reset symview_upper_bound, clear
23824 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
23827 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23828 Add strict argument and use it.
23829 (rs6000_split_multireg_move): Update for new strict argument.
23830 (mem_operand_gpr): Disallow all non-offsettable addresses.
23831 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23833 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23836 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23837 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23838 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23841 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23842 decl, use remap_type if we want to use the type.
23844 2018-03-09 Martin Sebor <msebor@redhat.com>
23846 PR tree-optimization/84526
23847 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23849 (builtin_access::generic_overlap): Be prepared to handle non-array
23852 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23854 PR rtl-optimization/84682
23855 * lra-constraints.c (process_address_1): Check is_address flag
23856 for address constraints.
23857 (process_alt_operands): Likewise.
23858 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23859 preprocess_constraints.
23860 * recog.h (preprocess_constraints): Add oploc parameter.
23862 * recog.c (preprocess_constraints): Test address_operand for
23863 CT_ADDRESS constraints.
23865 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23868 * lra-assigns.c (assign_by_spills): Return a flag of reload
23869 assignment failure. Do not process the reload assignment
23870 failures. Do not spill other reload pseudos if they has the same
23872 (lra_assign): Add a return arg. Set up from the result of
23873 assign_by_spills call.
23874 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23875 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23876 usage_insns if it is not NULL.
23877 (spill_hard_reg_in_range): New function.
23878 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23879 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23880 function prototypes.
23881 (lra_assign): Change prototype.
23882 * lra.c (lra): Add code to deal with fails by splitting hard reg
23885 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23888 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23889 Accept complain bool parameter. Only emit errors if it is true.
23890 (arm_parse_cpu_option_name): Likewise.
23891 (arm_target_thumb_only): Adjust callers of the above.
23892 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23893 prototype to take a default true bool parameter.
23894 (arm_parse_arch_option_name): Likewise.
23896 2018-03-09 David Malcolm <dmalcolm@redhat.com>
23897 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
23901 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23902 * configure: Regenerate.
23903 * configure.ac ("linker --version-script option"): New.
23904 ("linker soname option"): New.
23906 2018-03-09 Richard Biener <rguenther@suse.de>
23908 PR tree-optimization/84775
23909 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23910 immediate uses of predicate stmts and mark them modified.
23913 PR tree-optimization/84178
23914 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23916 (version_loop_for_if_conversion): Delay update_ssa call.
23917 (tree_if_conversion): Delay update_ssa until after predicate
23920 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
23923 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23924 when the function accesses prior frames.
23926 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23929 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23930 gen_llsym, otherwise call maybe_gen_llsym.
23932 PR inline-asm/84742
23933 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23934 has ',' character inside of it.
23936 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23939 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23940 as clobbering CC_REGNUM.
23942 2018-03-08 Richard Biener <rguenther@suse.de>
23944 PR middle-end/84552
23945 * tree-scalar-evolution.c: Include tree-into-ssa.h.
23946 (follow_copies_to_constant): Do not follow SSA names registered
23949 2018-03-08 Richard Biener <rguenther@suse.de>
23951 PR tree-optimization/84178
23952 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23954 (version_loop_for_if_conversion): Delay update_ssa call.
23955 (tree_if_conversion): Delay update_ssa until after predicate
23958 2018-03-08 David Malcolm <dmalcolm@redhat.com>
23960 PR tree-optimization/84178
23961 * tree-if-conv.c (release_bb_predicate): Remove the
23962 the assertion that the stmts have NULL use_ops.
23963 Discard the statements, asserting that they haven't
23964 yet been added to a BB.
23966 2018-03-08 Richard Biener <rguenther@suse.de>
23968 PR tree-optimization/84746
23969 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23970 (phi_translate): Pass in destination ANTIC_OUT set.
23971 (phi_translate_1): Likewise. For a simplified result lookup
23972 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23973 (phi_translate_set): Adjust.
23974 (do_pre_regular_insertion): Likewise.
23975 (do_pre_partial_partial_insertion): Likewise.
23977 2018-03-08 Martin Liska <mliska@suse.cz>
23979 PR gcov-profile/84735
23980 * doc/gcov.texi: Document usage of profile files.
23981 * gcov-io.h: Document changes in the format.
23983 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23987 * dwarf2out.c (struct dw_line_info_table): Update comments for
23989 (FORCE_RESET_NEXT_VIEW): New.
23990 (FORCE_RESETTING_VIEW_P): New.
23991 (RESETTING_VIEW_P): Check for -1 too.
23992 (ZERO_VIEW_P): Likewise.
23993 (new_line_info_table): Force-reset next view.
23994 (dwarf2out_begin_function): Likewise.
23995 (dwarf2out_source_line): Simplify zero_view_p initialization.
23996 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23997 view directly. Omit view when omitting .loc at line 0.
23999 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24001 PR tree-optimization/84740
24002 * tree-switch-conversion.c (process_switch): Call build_constructors
24003 only if info.phi_count is non-zero.
24005 PR tree-optimization/84739
24006 * tree-tailcall.c (find_tail_calls): Check call arguments against
24007 DECL_ARGUMENTS (current_function_decl) rather than
24008 DECL_ARGUMENTS (func) when checking for tail recursion.
24010 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24012 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24013 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24014 Volker Reichelt's entry and add entries for people that perform
24015 GCC fuzzy testing and report numerous bugs.
24017 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24020 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24021 readonly data in sdata, if that is disabled.
24022 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24023 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24024 -mreadonly-in-sdata option.
24026 2018-03-07 Martin Sebor <msebor@redhat.com>
24028 PR tree-optimization/84468
24029 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24030 basic block when looking for nul assignment.
24032 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24035 * except.h (output_function_exception_table): Adjust prototype.
24036 * except.c (output_function_exception_table): Remove FNNAME parameter
24037 and add SECTION parameter. Ouput one part of the table at a time.
24038 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24039 the first part of the exception table and emit unwind directives.
24040 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24041 (i386_pe_seh_cold_init): Likewise.
24042 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24043 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24044 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24045 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24046 * config/i386/winnt.c: Include except.h.
24047 (struct seh_frame_state): Add reg_offset, after_prologue and
24048 in_cold_section fields.
24049 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24050 (i386_pe_seh_cold_init): New function.
24051 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24052 to seh->in_cold_section.
24053 (seh_emit_push): Record the offset of the push.
24054 (seh_emit_save): Record the offet of the save.
24055 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24056 Test seh->after_prologue to disregard the epilogue.
24057 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24058 (i386_pe_end_cold_function): New function.
24060 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24063 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24064 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24067 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24069 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24070 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24072 PR middle-end/84723
24073 * multiple_target.c: Include tree-inline.h and intl.h.
24074 (expand_target_clones): Diagnose and fail if node->definition and
24075 !tree_versionable_function_p (node->decl).
24077 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24079 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24081 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24082 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24083 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24085 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24088 * combine.c (try_combine): Use reg_or_subregno instead of handling
24089 just paradoxical SUBREGs and REGs.
24091 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24093 * config/arc/arc.c (arc_finalize_pic): Remove function.
24094 (arc_must_save_register): We use single base PIC register, remove
24095 checks to save/restore the PIC register.
24096 (arc_expand_prologue): Likewise.
24097 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24099 (arc_verify_short): Likewise.
24100 (arc_attr_type): Likewise.
24101 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24102 (walk_stores): Likewise.
24103 (arc_address_cost): Make it static.
24104 (arc_verify_short): Likewise.
24105 (branch_dest): Likewise.
24106 (arc_attr_type): Likewise.
24107 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24108 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24109 (arc_final_prescan_insn): Remove inserting the nops due to
24110 hardware hazards. It is done in reorg step.
24111 (insn_length_variant_t): Remove.
24112 (insn_length_parameters_t): Likewise.
24113 (arc_insn_length_parameters): Likewise.
24114 (arc_get_insn_variants): Likewise.
24115 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24117 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24119 PR inline-asm/84683
24120 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24123 PR tree-optimization/84687
24124 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24126 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24128 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24130 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24131 Rename to ppc_speculation_barrier.
24132 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24133 __builtin_ppc_speculation_barrier.
24135 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24138 * combine.c (combine_simplify_rtx): Don't try to simplify if
24139 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24142 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24144 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24145 to 32 bytes when compiling for POWER9.
24147 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24150 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24151 regparm >= 3 with no arg reg available also for calls with
24152 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24155 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24157 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24159 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24162 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24164 2018-03-05 Richard Biener <rguenther@suse.de>
24166 PR tree-optimization/84486
24167 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24168 When inserting a __builtin_assume_aligned call set the LHS
24169 SSA name alignment info accordingly.
24171 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24173 PR tree-optimization/84114
24174 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24175 Avoid reassociation of FLOAT_MODE addition.
24177 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24179 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24180 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24181 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24182 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24183 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24184 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24185 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24187 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24188 __builtin_ia32_wbinvd): New builtins.
24189 (SPECIAL_ARGS2): New.
24190 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24191 (SPECIAL_ARGS2): New.
24192 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24193 (ix86_valid_target_attribute_inner_p): Ditto.
24194 (ix86_init_mmx_sse_builtins): Add special_args2.
24195 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24196 TARGET_WBNOINVD_P): New.
24197 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24198 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24199 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24200 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24201 * config/i386/pconfigintrin.h: New file.
24202 * config/i386/wbnoinvdintrin.h: Ditto.
24203 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24205 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24207 2018-03-05 Richard Biener <rguenther@suse.de>
24209 PR tree-optimization/84670
24210 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24212 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24213 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24214 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24215 doesn't grow if all successors (recursively) were visited at least
24218 2018-03-05 Richard Biener <rguenther@suse.de>
24220 PR tree-optimization/84650
24221 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24222 if executed in the loop pipeline.
24224 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24226 * doc/configfiles.texi (Configuration Files): Move info about
24227 conditionalizing $target-protos.h to...
24228 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24229 differs from $target-protos.h.
24231 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24232 Chung-Ju Wu <jasonwucj@gmail.com>
24234 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24235 * config/nds32/nds32-multiple.md (setmemsi): Define.
24236 * config/nds32/nds32-memory-manipulation.c
24237 (nds32_gen_dup_4_byte_to_word_value): New.
24238 (emit_setmem_word_loop): New.
24239 (emit_setmem_byte_loop): New.
24240 (nds32_expand_setmem_loop): New.
24241 (nds32_expand_setmem_loop_v3m): New.
24242 (nds32_expand_setmem_unroll): New.
24243 (nds32_expand_setmem): New.
24245 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24246 Chung-Ju Wu <jasonwucj@gmail.com>
24248 * config/nds32/nds32-memory-manipulation.c
24249 (nds32_emit_load_store): New.
24250 (nds32_emit_post_inc_load_store): New.
24251 (nds32_emit_mem_move): New.
24252 (nds32_emit_mem_move_block): New.
24253 (nds32_expand_movmemsi_loop_unknown_size): New.
24254 (nds32_expand_movmemsi_loop_known_size): New.
24255 (nds32_expand_movmemsi_loop): New.
24256 (nds32_expand_movmemsi_unroll): New.
24257 (nds32_expand_movmemqi): Rename ...
24258 (nds32_expand_movmemsi): ... to this.
24259 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24260 (movmemsi): ... to this.
24261 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24262 (nds32_expand_movmemsi): ... to this.
24264 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24265 Monk Chiang <sh.chiang04@gmail.com>
24266 Chung-Ju Wu <jasonwucj@gmail.com>
24268 * config/nds32/nds32-protos.h
24269 (nds32_expand_load_multiple): New arguments.
24270 (nds32_expand_store_multiple): Ditto.
24271 (nds32_valid_multiple_load_store): Rename ...
24272 (nds32_valid_multiple_load_store_p): ... to this.
24273 * config/nds32/nds32-memory-manipulation.c
24274 (nds32_expand_load_multiple): Refine implementation.
24275 (nds32_expand_store_multiple): Ditto.
24276 * config/nds32/nds32-multiple.md
24277 (load_multiple): Update nds32_expand_load_multiple interface.
24278 (store_multiple): Update nds32_expand_store_multiple interface.
24279 * config/nds32/nds32-predicates.c
24280 (nds32_valid_multiple_load_store): Rename ...
24281 (nds32_valid_multiple_load_store_p): ... to this and refine
24283 * config/nds32/predicates.md
24284 (nds32_load_multiple_and_update_address_operation): New predicate.
24285 (nds32_store_multiple_and_update_address_operation): New predicate.
24287 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24288 Chung-Ju Wu <jasonwucj@gmail.com>
24290 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24291 (combo): New attribute.
24292 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24294 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24296 * config/nds32/nds32.opt: Change -mcmodel= default value.
24298 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24299 Monk Chiang <sh.chiang04@gmail.com>
24300 Chung-Ju Wu <jasonwucj@gmail.com>
24302 * config/nds32/constants.md (unspec_element): New enum.
24303 * config/nds32/constraints.md (Umw): New constraint.
24304 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24305 * config/nds32/nds32-intrinsic.md: Likewise.
24306 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24307 (nds32_valid_smw_lwm_base_p): New.
24308 (nds32_output_smw_single_word): New.
24309 (nds32_output_lmw_single_word): New.
24310 (nds32_expand_unaligned_load): New.
24311 (nds32_expand_unaligned_store): New.
24312 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24313 (nds32_output_smw_single_word): Declare.
24314 (nds32_output_lmw_single_word): Declare.
24315 (nds32_expand_unaligned_load): Declare.
24316 (nds32_expand_unaligned_store): Declare.
24317 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24318 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24319 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24320 NDS32_BUILTIN_UASTORE_DW.
24321 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24324 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24325 Kito Cheng <kito.cheng@gmail.com>
24326 Chung-Ju Wu <jasonwucj@gmail.com>
24328 * config/nds32/nds32-intrinsic.c
24329 (nds32_expand_builtin_null_ftype_reg): Delete.
24330 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24331 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24332 (nds32_read_argument): New.
24333 (nds32_legitimize_target): Ditto.
24334 (nds32_legitimize_argument): Ditto.
24335 (nds32_check_constant_argument): Ditto.
24336 (nds32_expand_unop_builtin): Ditto.
24337 (nds32_expand_unopimm_builtin): Ditto.
24338 (nds32_expand_binop_builtin): Ditto.
24339 (nds32_builtin_decl_impl): Ditto.
24340 (builtin_description): Ditto.
24341 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24342 (nds32_init_builtins_impl): Ditto.
24343 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24344 (nds32_builtin_decl): New.
24345 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24346 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24348 2018-03-02 Jeff Law <law@redhat.com>
24350 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24351 (redundant_insn, fill_simple_delay_slots): Likewise.
24352 (fill_slots_from_thread): Likewise.
24353 * resource.c (mark_referenced_resources): Likewise.
24354 (mark_set_resources, find_dead_or_set_registers): Likewise.
24356 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24358 * substring-locations.h (format_warning_va): Formatting fix for
24359 ATTRIBUTE_GCC_DIAG.
24360 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24362 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24363 * substring-locations.c: Include intl.h.
24364 (format_warning_va): Turned into small wrapper around
24365 format_warning_n_va, renamed to ...
24366 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24367 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24369 (format_warning_at_substring_n): New function.
24370 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24371 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24372 format_warning_at_substring with just a shorter name instead of
24373 const function pointer.
24374 (fmtwarn_n): New function.
24375 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24376 appropriate, get rid of all the fmtstr temporaries, move conditionals
24377 with G_() wrapped string literals directly into fmtwarn arguments,
24378 cast dir.len to (int), formatting fixes.
24380 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24382 * doc/invoke.texi: Remove "Cilk Plus" references.
24384 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24385 Richard Biener <rguenther@suse.de>
24388 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24389 for error or warning attributes if CALL_FROM_THUNK_P is set.
24392 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24395 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24396 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24399 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24400 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24402 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24403 instead of -1U in last predictors element's probability member.
24405 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24408 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24409 arguments if they are comparable.
24411 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24413 PR tree-optimization/84634
24414 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24415 masks and masked_loop_p with a single loop_masks, making sure it's
24416 null for bb vectorization.
24418 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24420 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24421 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24422 loop->force_vectorize to check whether there is no alias.
24424 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24427 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24429 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24431 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24432 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24433 instead of a loop around prev_real_insn.
24434 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24437 PR inline-asm/84625
24438 * config/i386/i386.c (ix86_print_operand): Use conditional
24439 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24442 2018-03-02 Richard Biener <rguenther@suse.de>
24444 PR tree-optimization/84427
24445 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24446 (bitmap_set_subtract_values): Rewrite to handle multiple
24449 (prune_clobbered_mems): Likewise.
24450 (phi_translate): Take edge instead of pred/phiblock.
24451 (phi_translate_1): Likewise.
24452 (phi_translate_set): Likewise. Insert all translated
24453 exprs for a value into the set, keeping possibly multiple
24454 expressions per value.
24455 (compute_antic_aux): Adjust for phi_translate changes.
24456 When intersecting union the expressions and prune those
24457 not in the final value set, keeping possibly multiple
24458 expressions per value. Do not use value-insertion
24459 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24460 all expressions. Add verification that the value-sets
24461 only shrink during iteration.
24462 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24463 (do_pre_regular_insertion): Likewise.
24464 (do_pre_partial_partial_insertion): Likewise.
24466 2018-03-02 Richard Biener <rguenther@suse.de>
24469 * config/darwin.c (saved_debug_info_level): New static global.
24470 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24471 (darwin_asm_lto_end): Restore debug info generation settings.
24473 2018-03-01 Martin Liska <mliska@suse.cz>
24476 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24477 volatile arguments.
24479 2018-03-01 Richard Biener <rguenther@suse.de>
24482 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24483 type annotation with LTO when debug was disabled at compile-time.
24485 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24487 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24489 (mips_final_postscan_insn): Likewise.
24491 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24493 PR rtl-optimization/84528
24494 * alias.c (init_alias_target): Add commentary.
24495 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24496 a unique base value if the frame pointer is not eliminated
24497 to the stack pointer.
24499 2018-03-01 Tom de Vries <tom@codesourcery.com>
24501 PR rtl-optimization/83327
24502 * lra-int.h (hard_regs_spilled_into): Declare.
24503 * lra.c (hard_regs_spilled_into): Define.
24504 (init_reg_info): Init hard_regs_spilled_into.
24505 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24506 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24507 (process_bb_lives): Handle hard_regs_spilled_into.
24508 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24509 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24511 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24513 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24514 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24515 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24516 * config/rs6000/aix72.h: New file.
24518 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24520 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24521 instead of warning_at with conditional singular and plural messages
24525 * stor-layout.c (update_alignment_for_field): For
24526 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24527 && !DECL_PACKED (field), do the alignment update, just use
24528 only desired_align instead of MAX (type_align, desired_align)
24530 (place_field): Don't do known_align < desired_align handling
24531 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24532 is non-NULL, instead do it after rli->prev_field handling and
24533 only if not within a bitfield word. For DECL_PACKED (field)
24534 use type_align of BITS_PER_UNIT.
24536 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24538 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24539 superfluous parentheses and trailing spaces.
24541 2018-02-28 Richard Biener <rguenther@suse.de>
24543 PR tree-optimization/84584
24544 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24545 SCoPs with fake exit edge.
24547 2018-02-28 Martin Liska <mliska@suse.cz>
24550 * timevar.c (timer::print): Fix format to properly print 100%
24553 2018-02-28 Richard Biener <rguenther@suse.de>
24555 PR middle-end/84607
24556 * genmatch.c (capture_info::walk_match): Do not mark
24557 captured expressions without operands as expr_p given
24558 they act more like predicates and should be subject to
24559 "lost tail" side-effect preserving.
24561 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24563 PR rtl-optimization/81611
24564 * auto-inc-dec.c (attempt_change): Move dead note from
24565 mem_insn if it's the next use of regno
24566 (find_address): Take address use of reg holding
24567 non-incremented value. Add parm to limit search to the named
24569 (merge_in_block): Attempt to use a mem insn that is the next
24570 use of the original regno.
24572 2018-02-27 Martin Sebor <msebor@redhat.com>
24575 * doc/invoke.texi (-Wmissing-attributes): New option.
24576 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24578 2018-02-27 Martin Sebor <msebor@redhat.com>
24580 PR translation/84207
24581 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24582 n argument to unsigned HOST_WIDE_INT.
24583 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24584 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24585 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24586 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24588 2018-02-27 Richard Biener <rguenther@suse.de>
24590 PR tree-optimization/84512
24591 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24592 Do not use the estimate returned from record_stmt_cost for
24593 the scalar iteration cost but sum properly using add_stmt_cost.
24595 2018-02-27 Richard Biener <rguenther@suse.de>
24597 PR tree-optimization/84466
24598 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24599 Adjust last change to less strictly validate use operands.
24601 2018-02-27 Martin Liska <mliska@suse.cz>
24603 PR gcov-profile/84548
24604 * gcov.c (process_file): Allow partial overlap and consider it
24605 also as group functions.
24606 (output_lines): Properly calculate range of lines for a group.
24608 2018-02-27 Martin Liska <mliska@suse.cz>
24610 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24611 'ggc' suffixes. Change first column width.
24612 (timer::print): Fix formatting of the column.
24614 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24616 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24617 preserve inline entry blocks for the sake of debug inline
24618 entry point markers alone.
24619 (remove_unused_locals): Suggest in comments a better place to
24620 force the preservation of inline entry blocks that are
24621 otherwise unused, but do not preserve them.
24623 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24625 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24627 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24630 * config/i386/constraints.md (Bs): Replace
24631 ix86_indirect_branch_register with
24632 TARGET_INDIRECT_BRANCH_REGISTER.
24634 * config/i386/i386.md (indirect_jump): Likewise.
24635 (tablejump): Likewise.
24636 (*sibcall_memory): Likewise.
24637 (*sibcall_value_memory): Likewise.
24638 Peepholes of indirect call and jump via memory: Likewise.
24639 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24640 (*sibcall_value_GOT_32): Likewise.
24641 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24642 (GOT_memory_operand): Likewise.
24643 (call_insn_operand): Likewise.
24644 (sibcall_insn_operand): Likewise.
24645 (GOT32_symbol_operand): Likewise.
24646 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24648 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24650 PR rtl-optimization/83496
24651 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24652 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24653 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24654 redundant insn, if any.
24655 (relax_delay_slots): Likewise.
24656 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24658 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24660 PR tree-optimization/83965
24661 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24662 that grouped statements are part of a reduction chain. Return
24663 true if the statement is not marked as a reduction itself but
24664 is part of a group.
24665 (vect_recog_dot_prod_pattern): Don't check whether the statement
24666 is part of a group here.
24667 (vect_recog_sad_pattern): Likewise.
24668 (vect_recog_widen_sum_pattern): Likewise.
24670 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24673 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24675 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24678 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24680 (ix86_output_indirect_function_return): New prototype.
24681 (ix86_split_simple_return_pop_internal): Likewise.
24682 * config/i386/i386.c (indirect_return_via_cx): New.
24683 (indirect_return_via_cx_bnd): Likewise.
24684 (indirect_thunk_name): Handle return va CX_REG.
24685 (output_indirect_thunk_function): Create alias for
24686 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24687 (ix86_output_indirect_jmp): Remove the bool argument.
24688 (ix86_output_indirect_function_return): New function.
24689 (ix86_split_simple_return_pop_internal): Likewise.
24690 * config/i386/i386.md (*indirect_jump): Don't pass false
24691 to ix86_output_indirect_jmp.
24692 (*tablejump_1): Likewise.
24693 (simple_return_pop_internal): Change it to define_insn_and_split.
24694 Call ix86_split_simple_return_pop_internal to split it for
24695 -mfunction-return=.
24696 (simple_return_indirect_internal): Call
24697 ix86_output_indirect_function_return instead of
24698 ix86_output_indirect_jmp.
24700 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24703 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24704 memset and value initialization afterwards.
24706 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24708 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24710 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24713 * common/config/aarch64/aarch64-common.c
24714 (aarch_option_optimization_table[]): Switch
24715 off fomit-frame-pointer
24717 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24718 Chung-Ju Wu <jasonwucj@gmail.com>
24720 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24722 (store_multiple): Ditto.
24724 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24726 * config.gcc: Add --with-cpu support for nds32 target.
24727 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24728 * config/nds32/nds32.opt: Add -mcpu= option.
24730 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24732 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24733 isel=yes): Warn for these deprecated options.
24735 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24737 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24738 ISA_2_5_MASKS_EMBEDDED.
24740 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24742 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24743 p->max as pointers rather than using iterative_hash_expr.
24745 2018-02-23 Carl Love <cel@us.ibm.com>
24747 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24748 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24750 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24751 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24752 P8V_BUILTIN_VEC_VUNSIGNED2.
24754 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
24757 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24758 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24760 * lra-constraints.c (curr_insn_transform): Set up
24761 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
24763 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24764 * lra-eliminations.c (spill_pseudos): Ditto.
24765 (process_insn_for_elimination): Ditto.
24766 * lra-lives.c (reg_early_clobber_p): Use the new macros.
24767 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24768 LRA_NON_CLOBBERED_ALT.
24770 2018-02-22 Martin Sebor <msebor@redhat.com>
24772 PR tree-optimization/84480
24773 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24774 to maybe_diag_stxncpy_trunc. Call it.
24775 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24776 from gimple_fold_builtin_strcpy. Print inlining stack.
24777 (handle_builtin_stxncpy): Print inlining stack.
24778 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24780 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
24783 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24784 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24785 and -fcheck-pointer-bounds are used together.
24786 (indirect_thunk_prefix): New enum.
24787 (indirect_thunk_need_prefix): New function.
24788 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
24789 "_nt" instead of "_bnd" for NOTRACK prefix.
24790 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24791 (output_indirect_thunk_function): Likewise.
24793 (ix86_code_end): Update output_indirect_thunk_function calls.
24794 (ix86_output_indirect_branch_via_reg): Replace
24795 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24796 (ix86_output_indirect_branch_via_push): Likewise.
24797 (ix86_output_function_return): Likewise.
24798 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24799 incompatible with -fcf-protection=branch and
24800 -fcheck-pointer-bounds.
24802 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24805 * config/aarch64/aarch64.c (aarch64_print_address_internal):
24806 Change gcc_assert call to output_operand_lossage.
24808 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24810 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24812 2018-02-22 DJ Delorie <dj@redhat.com>
24813 Sebastian Perta <sebastian.perta@renesas.com>
24814 Oleg Endo <olegendo@gcc.gnu.org>
24816 * config/rx/rx.c (rx_rtx_costs): New function.
24817 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24819 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
24821 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24823 2018-02-22 Martin Liska <mliska@suse.cz>
24826 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24827 Add "native" as a possible value.
24829 2018-02-22 Martin Liska <mliska@suse.cz>
24832 * config/i386/i386.c (ix86_option_override_internal):
24833 Add "native" as a possible value for -march and -mtune.
24835 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24838 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24839 to all type variants.
24841 PR tree-optimization/84503
24842 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24843 width as info->bitpos + info->bitsize - start.
24844 (merged_store_group::merge_overlapping): Simplify width computation.
24845 (check_no_overlap): New function.
24846 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24847 start + width and last_order of the group, fail if check_no_overlap
24849 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24850 to group if check_no_overlap fails.
24852 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24854 * config/rs6000/altivec.md: Delete contraint arguments to
24855 define_expand, define_split, and define_peephole2, and in
24856 define_insn_and_split if always unused.
24857 * config/rs6000/darwin.md: Ditto.
24858 * config/rs6000/dfp.md: Ditto.
24859 * config/rs6000/rs6000.md: Ditto.
24860 * config/rs6000/sync.md: Ditto.
24861 * config/rs6000/vector.md: Ditto.
24862 * config/rs6000/vsx.md: Ditto.
24864 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24866 * config/rs6000/altivec.md: Write output control strings as braced
24867 blocks instead of double-quoted strings.
24868 * config/rs6000/darwin.md: Ditto.
24869 * config/rs6000/rs6000.md: Ditto.
24870 * config/rs6000/vector.md: Ditto.
24871 * config/rs6000/vsx.md: Ditto.
24873 2018-02-21 Jason Merrill <jason@redhat.com>
24875 PR c++/84314 - ICE with templates and fastcall attribute.
24876 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24878 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24880 * ipa-cp.c (determine_versionability): Fix comment typos.
24882 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24885 * ipa-cp.c (determine_versionability): Do not version functions caling
24888 2018-02-21 Martin Liska <mliska@suse.cz>
24891 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24892 Add "native" as a possible value.
24893 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
24894 the macro when native cpu detection is available.
24896 2018-02-21 Martin Liska <mliska@suse.cz>
24899 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24900 Add "native" as a possible value.
24901 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24902 when native cpu detection is available.
24904 2018-02-21 Jakub Jelinek <jakub@redhat.com>
24905 Martin Sebor <msebor@redhat.com>
24907 PR tree-optimization/84478
24908 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24910 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24911 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24912 support which is conservatively correct, for 2 only stay conservative
24913 for maxlen. Formatting and comment capitalization fixes. Add STRICT
24914 argument to the 2 argument get_range_strlen, adjust 6 arg
24915 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24917 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24918 (gimple_fold_builtin_strlen): Pass true as last argument to
24921 2018-02-20 Martin Sebor <msebor@redhat.com>
24923 PR middle-end/84095
24924 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24925 (builtin_memref::set_base_and_offset): Same. Handle inner references.
24926 (builtin_memref::builtin_memref): Factor out parts into
24927 set_base_and_offset and call it.
24929 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24931 PR middle-end/84406
24932 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24933 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24934 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
24935 search at the associated MODE_INT.
24937 2018-02-20 Jeff Law <law@redhat.com>
24939 PR middle-end/82123
24940 PR tree-optimization/81592
24941 PR middle-end/79257
24942 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24943 for range data rather than using global data.
24944 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24945 range data rather than using global data.
24946 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24947 pass it to children as needed.
24948 (struct directive::fmtresult): Similarly.
24949 (struct directive::set_width): Similarly.
24950 (struct directive::set_precision): Similarly.
24951 (format_integer, format_directive, parse_directive): Similarly.
24952 (format_none): Accept unnamed vr_values parameter.
24953 (format_percent, format_floating, format_character): Similarly.
24954 (format_string, format_plain): Similarly.
24955 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24956 the EVRP range analyzer for range data rather than using global data.
24957 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24958 gimple-ssa-evrp-analyze.h
24959 (class sprintf_dom_walker): Add after_dom_children member function.
24960 Add evrp_range_analyzer member.
24961 (sprintf_dom_walker::before_dom_children): Call into the EVRP
24962 range analyzer as needed.
24963 (sprintf_dom_walker::after_dom_children): New member function.
24964 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24966 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24967 (evrp_range_analyzer::pop_to_marker): Likewise.
24969 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24971 PR tree-optimization/84419
24972 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24973 with the required type if its current type is compatible but
24976 2018-02-20 Jakub Jelinek <jakub@redhat.com>
24978 PR middle-end/82004
24979 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24980 after vectorization.
24982 2018-02-20 Martin Liska <mliska@suse.cz>
24985 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24986 possible values if we don't have a hint.
24988 2018-02-20 Martin Liska <mliska@suse.cz>
24992 * final.c (shorten_branches): Build align_tab array with one
24994 * opts.c (finish_options): Add alignment option limit check.
24995 (MAX_CODE_ALIGN): Likewise.
24996 (MAX_CODE_ALIGN_VALUE): Likewise.
24997 * doc/invoke.texi: Document maximum allowed option value for
24998 all -falign-* options.
25000 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25003 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25004 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25005 * var-tracking.c (emit_note_insn_var_location): Remove all references
25006 to NOTE_INSN_CALL_ARG_LOCATION.
25007 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25008 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25009 Use copy_rtx_if_shared.
25010 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25011 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25012 (dwarf2out_var_location): Remove handling of
25013 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25015 * final.c (final_scan_insn): Remove all references to
25016 NOTE_INSN_CALL_ARG_LOCATION.
25017 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25018 before dumping final insns.
25019 * except.c (emit_note_eh_region_end): Remove all references to
25020 NOTE_INSN_CALL_ARG_LOCATION.
25021 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25022 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25023 * config/arc/arc.c (hwloop_optimize): Likewise.
25024 * config/arm/arm.c (create_fix_barrier): Likewise.
25025 * config/s390/s390.c (s390_chunkify_start): Likewise.
25026 * config/sh/sh.c (find_barrier): Likewise.
25027 * config/i386/i386.c (rest_of_insert_endbranch,
25028 ix86_seh_fixup_eh_fallthru): Likewise.
25029 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25030 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25031 * config/frv/frv.c (frv_function_prologue): Likewise.
25032 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25034 (note_outside_basic_block_p): Remove all references to
25035 NOTE_INSN_CALL_ARG_LOCATION.
25036 * gengtype.c (adjust_field_rtx_def): Likewise.
25037 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25039 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25040 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25043 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25046 PR tree-optimization/84452
25047 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25048 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25051 2018-02-19 Martin Liska <mliska@suse.cz>
25054 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25056 2018-02-19 Martin Liska <mliska@suse.cz>
25057 Richard Sandiford <richard.sandiford@linaro.org>
25059 PR tree-optimization/82491
25060 * gimple-fold.c (get_base_constructor): Make earlier bail out
25063 2018-02-19 Carl Love <cel@us.ibm.com>
25065 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25066 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25068 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25069 P8V_BUILTIN_VEC_NEG.
25071 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25073 * config/rl78/rl78.md (movdf): New define expand.
25075 2018-02-19 Martin Liska <mliska@suse.cz>
25078 * doc/invoke.texi: Fix typo.
25079 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25081 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25083 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25084 handle rs6000_single_float and rs6000_double_float specially for
25087 2018-02-16 Jeff Law <law@redhat.com>
25089 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25090 (pop_regs): Use it.
25092 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25095 * ipa-inline.c (inline_small_functions): Fix a typo.
25097 2018-02-16 Nathan Sidwell <nathan@acm.org>
25099 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25101 2018-02-16 Carl Love <cel@us.ibm.com>
25103 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25104 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25105 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25106 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25107 expansion to P8V_BUILTIN_VEC_FLOAT2.
25109 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25111 PR rtl-optimization/70023
25112 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25113 src_regno into account.
25115 2018-02-16 Carl Love <cel@us.ibm.com>
25117 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25118 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25119 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25120 * config/rs6000/rs6000.c: Remove case statements for
25121 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25122 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25123 and P9V_BUILTIN_VEC_VINSERT4B.
25124 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25125 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25126 * config/rs6000/vsx.md:
25127 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25130 2018-02-16 Carl Love <cel@us.ibm.com>
25132 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25134 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25136 * config/rs6000/rs6000-c.c: Add the definitions for
25137 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25138 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25139 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25140 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25141 definition for insert4b and define insn *insert3b_internal.
25142 * doc/extend.texi: Add documentation for vec_extract4b.
25144 2018-02-16 Nathan Sidwell <nathan@acm.org>
25146 * doc/extend.texi (Backwards Compatibility): Mention friend
25147 injection. Note for-scope is deprecated.
25148 * doc/invoke.texi (-ffriend-injection): Deprecate.
25150 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25152 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25153 that moved to I2, also allow destinations that are a paradoxical
25154 subreg (instead of a normal reg).
25156 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25159 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25162 2018-02-16 Richard Biener <rguenther@suse.de>
25164 PR tree-optimization/84037
25165 PR tree-optimization/84016
25167 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25168 Adjust vec_construct for the fact we need additional higher latency
25169 128bit inserts for AVX256 and AVX512 vector builds.
25170 (ix86_add_stmt_cost): Scale vector construction cost for
25173 2018-02-16 Richard Biener <rguenther@suse.de>
25175 PR tree-optimization/84417
25176 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25177 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25178 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25180 2018-02-16 Martin Liska <mliska@suse.cz>
25183 * internal-fn.def (ASAN_CHECK): Set proper flags.
25184 (ASAN_MARK): Likewise.
25186 2018-02-16 Julia Koval <julia.koval@intel.com>
25188 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25189 from PTA_CANNONLAKE.
25191 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25194 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25195 Use ++iter rather than iter++ for std::list iterators.
25196 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25197 defer deleting them until all nodes in the forest are processed. Do
25198 free even leaf nodes. Change to_process into auto_vec.
25201 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25202 * vec.h (vec_default_construct): Use memset instead of placement new
25203 if BROKEN_VALUE_INITIALIZATION is defined.
25204 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25205 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25208 PR rtl-optimization/83723
25209 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25210 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25211 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25213 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25215 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25217 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25219 PR rtl-optimization/81443
25220 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25221 from inner REGs to paradoxical SUBREGs.
25223 2018-02-16 Richard Biener <rguenther@suse.de>
25225 PR tree-optimization/84399
25226 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25227 For operands we can analyze at their definition make sure we can
25228 analyze them at each use as well.
25230 2018-02-16 Richard Biener <rguenther@suse.de>
25232 PR tree-optimization/84190
25233 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25234 volatile accesses if the decl isn't volatile.
25236 2018-02-15 Jason Merrill <jason@redhat.com>
25238 PR c++/84314 - ICE with templates and fastcall attribute.
25239 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25240 TYPE_CANONICAL on an existing type.
25242 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25244 PR tree-optimization/84383
25245 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25246 dstoff nor call operand_equal_p if dstbase is NULL.
25248 PR tree-optimization/84334
25249 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25250 also a CONSTANT_CLASS_P, punt.
25252 2018-02-14 Jim Wilson <jimw@sifive.com>
25254 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25255 first SMALL_OPERAND check. New local min_second_step. Move assert
25256 to where locals are set. Add TARGET_RVC support.
25257 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25259 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25261 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25263 2018-02-14 Martin Sebor <msebor@redhat.com>
25265 PR tree-optimization/83698
25266 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25267 arrays constrain the offset range to their bounds.
25268 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25269 (builtin_access::overlap): Avoid setting the size of overlap if it's
25271 (maybe_diag_overlap): Also consider arrays when deciding what values
25272 of offsets to include in diagnostics.
25274 2018-02-14 Martin Sebor <msebor@redhat.com>
25277 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25278 that correspond to the kind of a declaration.
25280 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25283 * config/pa/pa.md: Load address of PIC label using the linkage table
25284 if the label is nonlocal.
25286 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25288 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25289 warning message if user requests -maltivec=be.
25290 * doc/invoke.texi: Document deprecation of -maltivec=be.
25292 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25295 * config/rs6000/rs6000-c.c: Update definitions for
25296 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25297 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25299 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25302 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25303 add _get_ssp intrinsics. Remove argument from
25304 __builtin_ia32_rdssp[d|q].
25305 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25306 * config/i386/i386-builtin.def: Remove argument from
25307 __builtin_ia32_rdssp[d|q].
25308 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25309 ix86_expand_special_args_builtin for _rdssp[d|q].
25310 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25311 Clear register before usage.
25312 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25313 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25315 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25317 PR tree-optimization/84357
25318 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25319 operand 1 of an ARRAY_REF too.
25321 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25324 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25325 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25327 (set_of_reg): New struct.
25328 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25329 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25330 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25332 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25333 Split into bitclr, bitset, bitinvert patterns if appropriate.
25334 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25335 use rx_fuse_in_memory_bitop.
25336 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25337 to named insn, correct maximum insn length.
25339 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25342 * machmode.def: Define a complex mode for PARTIAL_INT.
25343 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25345 * doc/rtl.texi: Document CSPImode.
25346 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25348 (msp430_hard_regno_nregs_with_padding): Likewise.
25350 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25353 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25355 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25357 PR rtl-optimization/84169
25358 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25359 we generated a parallel as new i3 and we split that to new i2 and i3
25360 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25361 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25362 those to i2, not i1. Partially rewrite this scan code.
25364 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25367 * stor-layout.c (place_field): For variable length fields, adjust
25368 offset_align afterwards not just based on the field's alignment,
25369 but also on the size.
25371 PR middle-end/84309
25372 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25373 of exps and logs in the use_exp2 case.
25375 2018-02-13 Jeff Law <law@redhat.com>
25377 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25378 entry for "vector".
25380 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25383 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25387 * common.opt (gas-loc-support, gas-locview-support): New.
25388 (ginline-points, ginternal-reset-location-views): New.
25389 * doc/invoke.texi: Document them. Use @itemx where intended.
25390 (gvariable-location-views): Adjust.
25391 * target.def (reset_location_view): New.
25392 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25393 (TARGET_RESET_LOCATION_VIEW): New.
25394 * doc/tm.texi: Rebuilt.
25395 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25396 (dwarf2out_default_as_locview_support): New.
25397 (output_asm_line_debug_info): Use option variables.
25398 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25399 (output_loc_list): Likewise.
25400 (add_high_low_attributes): Check option variables.
25401 Don't output entry view attribute in strict mode.
25402 (gen_inlined_subroutine_die): Check option variables.
25403 (dwarf2out_inline_entry): Likewise.
25404 (init_sections_and_labels): Likewise.
25405 (dwarf2out_early_finish): Likewise.
25406 (maybe_reset_location_view): New, from...
25407 (dwarf2out_var_location): ... here. Call it.
25408 * debug.h (dwarf2out_default_as_loc_support): Declare.
25409 (dwarf2out_default_as_locview_support): Declare.
25410 * hooks.c (hook_int_rtx_insn_0): New.
25411 * hooks.h (hook_int_rtx_insn_0): Declare.
25412 * toplev.c (process_options): Take -gas-loc-support and
25413 -gas-locview-support from dwarf2out. Enable
25414 -gvariable-location-views by default only with locview
25415 assembler support. Enable -ginternal-reset-location-views by
25416 default only if the target defines the corresponding hook.
25417 Enable -ginline-points by default if location views are
25418 enabled; force it disabled if statement frontiers are
25420 * tree-inline.c (expand_call_inline): Check option variables.
25421 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25423 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25425 PR tree-optimization/84321
25426 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25427 handling. Also check whether the anti-range contains any values
25428 that satisfy the mask; switch to a VR_RANGE if not.
25430 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25433 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25435 2018-02-13 Martin Jambor <mjambor@suse.cz>
25438 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25439 of call statements, also set location of a load to a temporary.
25441 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25443 * config/rl78/rl78.c (add_vector_labels): New function.
25444 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25445 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25446 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25447 which checks that no arguments are passed.
25448 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25449 * doc/extend.texi: Documentation for the new attribute.
25451 2018-02-13 Andreas Schwab <schwab@suse.de>
25453 * config/riscv/linux.h (CPP_SPEC): Define.
25455 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25458 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25459 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25460 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25461 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25462 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25463 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25464 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25465 temporarily for AES and PCLMUL builtins.
25467 PR tree-optimization/84339
25468 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25469 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25472 PR middle-end/84309
25473 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25474 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25475 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25477 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25479 * omp-simd-clone.h: New file.
25480 * omp-simd-clone.c: Include omp-simd-clone.h.
25481 (expand_simd_clones): No longer static.
25482 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25483 cgraph.h and omp-simd-clone.h.
25484 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25485 (vect_recog_widen_shift_pattern): Formatting fix.
25486 (vect_pattern_recog_1): Don't check optab for calls.
25489 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25490 operands[2] into a REG before using gen_lowpart on it.
25492 2018-02-12 Jeff Law <law@redhat.com>
25495 * config/sh/sh.c (find_barrier): Consider a sibling call
25498 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25499 successfully back substituting a reg.
25501 2018-02-12 Richard Biener <rguenther@suse.de>
25503 PR tree-optimization/84037
25504 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25505 parameter, move visited init to caller.
25506 (vect_slp_analyze_operations): Separate cost from validity
25507 check, initialize visited once for all instances.
25508 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25510 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25512 (vect_model_promotion_demotion_cost): Likewise.
25513 (vectorizable_bswap): Guard cost modeling with !slp_node
25514 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25516 (vectorizable_call): Likewise.
25517 (vectorizable_conversion): Likewise.
25518 (vectorizable_assignment): Likewise.
25519 (vectorizable_shift): Likewise.
25520 (vectorizable_operation): Likewise.
25521 (vectorizable_store): Likewise.
25522 (vectorizable_load): Likewise.
25523 (vectorizable_condition): Likewise.
25524 (vectorizable_comparison): Likewise.
25526 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25529 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25530 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25531 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25533 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25535 PR middle-end/83665
25536 * params.def (inline-min-speedup): Increase from 8 to 15.
25537 (max-inline-insns-auto): Decrease from 40 to 30.
25538 * ipa-split.c (consider_split): Add some buffer for function to
25539 be considered inlining candidate.
25540 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25543 2018-02-12 Richard Biener <rguenther@suse.de>
25545 PR tree-optimization/84037
25546 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25547 matched stmts if we cannot swap the non-matched ones.
25549 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25551 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25552 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25553 _mm_maskz_scalef_round_ss): New intrinsics.
25554 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25555 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25556 __builtin_ia32_scalefss_round): Remove.
25557 (__builtin_ia32_scalefsd_mask_round,
25558 __builtin_ia32_scalefss_mask_round): New intrinsics.
25559 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25560 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25561 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25562 "<round_constraint>")): Changed to ...
25563 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25564 "<round_scalar_constraint>")): ... this.
25565 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25566 %0, %1, %2<round_op3>}"): Changed to ...
25567 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25568 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25569 %2<round_scalar_mask_op3>}"): ... this.
25570 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25572 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25574 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25575 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25576 (_mm_maskz_sqrt_round_ss): New intrinsics.
25577 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25578 (__builtin_ia32_sqrtsd_mask_round)
25579 (__builtin_ia32_sqrtss_mask_round): New builtins.
25580 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25581 (__builtin_ia32_sqrtss_round): Remove.
25582 (__builtin_ia32_sqrtsd_mask_round)
25583 (__builtin_ia32_sqrtss_mask_round): New builtins.
25584 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25585 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25586 ((match_operand:VF_128 1 "vector_operand"
25587 "xBm,<round_constraint>")): Changed to ...
25588 ((match_operand:VF_128 1 "vector_operand"
25589 "xBm,<round_scalar_constraint>")): ... this.
25590 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25591 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25592 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25593 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25594 %<iptr>1<round_scalar_mask_op3>}): ... this.
25595 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25596 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25598 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25601 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25602 Cast vec_cmpeq result to correct type.
25603 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25604 Cast vec_cmpgt result to correct type.
25606 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25608 * final.c (final_scan_insn_1): Renamed from...
25609 (final_scan_insn): ... this. New wrapper, to recover
25610 seen from the outermost call in recursive ones.
25611 * config/sparc/sparc.c (output_return): Drop seen from call.
25612 (output_sibcall): Likewise.
25613 * config/visium/visium.c (output_branch): Likewise.
25615 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25617 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25620 2018-02-10 Alan Modra <amodra@gmail.com>
25623 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25624 Specify LR as an input.
25626 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25629 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25630 remove_member_access_dummy_vars): New functions.
25631 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25632 lower_omp_1, execute_lower_omp): Use them.
25634 PR rtl-optimization/84308
25635 * shrink-wrap.c (spread_components): Release todo vector.
25637 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25639 PR rtl-optimization/57193
25640 * ira-color.c (struct allocno_color_data): Add member
25641 conflict_allocno_hard_prefs.
25642 (update_conflict_allocno_hard_prefs): New.
25643 (bucket_allocno_compare_func): Add a preference based on
25644 conflict_allocno_hard_prefs.
25645 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25646 (color_allocnos): Remove a dead code. Initiate
25647 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25649 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25652 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25653 constraint from =wa to wa. Avoid a subreg on the output operand,
25654 instead use a pseudo and subreg it in a move.
25655 (p9_xxbrd_<mode>): Changed to ...
25656 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25657 (p9_xxbrd_v2df): New expander.
25658 (p9_xxbrw_<mode>): Changed to ...
25659 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25660 (p9_xxbrw_v4sf): New expander.
25662 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25664 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25666 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25669 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25670 multiply in 32-bit mode.
25671 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25672 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25675 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25677 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25678 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25679 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25680 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25682 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25685 * dwarf2out.c (is_trivial_indirect_ref): New function.
25686 (dwarf2out_late_global_decl): Do not generate a location
25687 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25688 and that are not defined in the current unit.
25690 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25692 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25693 instead of a libcall for UNORDERED.
25695 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25698 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25699 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25701 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25704 * config/s390/s390.c (s390_set_current_function): Invoke
25705 s390_indirect_branch_settings also if fndecl didn't change.
25707 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25709 * config/rs6000/rs6000.md (blockage): Set length to zero.
25711 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25713 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25715 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25718 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25719 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25723 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25724 PARALLEL incoming that failed vt_get_decl_and_offset check.
25726 PR middle-end/84237
25727 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25728 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25730 (get_variable_section): For decls in named .bss* sections pass true as
25731 second argument to bss_initializer_p.
25733 2018-02-09 Marek Polacek <polacek@redhat.com>
25734 Jakub Jelinek <jakub@redhat.com>
25737 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25738 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25739 Sync some changes from cxx_fold_indirect_ref.
25741 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25743 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25745 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25746 (BLOCK_INLINE_ENTRY_LABEL): New.
25747 (dwarf2out_var_location): Disregard inline entry markers.
25748 (inline_entry_data): New struct.
25749 (inline_entry_data_hasher): New hashtable type.
25750 (inline_entry_data_hasher::hash): New.
25751 (inline_entry_data_hasher::equal): New.
25752 (inline_entry_data_table): New variable.
25753 (add_high_low_attributes): Add DW_AT_entry_pc and
25754 DW_AT_GNU_entry_view attributes if a pending entry is found
25755 in inline_entry_data_table. Add old entry_pc attribute only
25756 if debug nonbinding markers are disabled.
25757 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25758 markers are enabled.
25759 (block_within_block_p, dwarf2out_inline_entry): New.
25760 (dwarf2out_finish): Check that no entries remained in
25761 inline_entry_data_table.
25762 * final.c (reemit_insn_block_notes): Handle inline entry notes.
25763 (final_scan_insn, notice_source_line): Likewise.
25764 (rest_of_clean_state): Skip inline entry markers.
25765 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25767 * gimple.c (gimple_build_debug_inline_entry): New.
25768 * gimple.h (enum gimple_debug_subcode): Add
25769 GIMPLE_DEBUG_INLINE_ENTRY.
25770 (gimple_build_debug_inline_entry): Declare.
25771 (gimple_debug_inline_entry_p): New.
25772 (gimple_debug_nonbind_marker_p): Adjust.
25773 * insn-notes.def (INLINE_ENTRY): New.
25774 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25775 inline entry marker notes.
25776 (print_insn): Likewise.
25777 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25778 (INSN_DEBUG_MARKER_KIND): Likewise.
25779 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25780 * tree-inline.c (expand_call_inline): Build and insert
25781 debug_inline_entry stmt.
25782 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25783 inline entry blocks early, if nonbind markers are enabled.
25784 (dump_scope_block): Dump fragment info.
25785 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25786 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25787 (gimple_build_debug_inline_entry): New.
25788 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25789 Enable/disable inline entry points too.
25790 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25791 (DEBUG_INSN): Describe inline entry markers.
25793 * common.opt (gvariable-location-views): New.
25794 (gvariable-location-views=incompat5): New.
25795 * config.in: Rebuilt.
25796 * configure: Rebuilt.
25797 * configure.ac: Test assembler for view support.
25798 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25799 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25800 * dwarf2out.c (var_loc_view): New typedef.
25801 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25802 (dwarf2out_locviews_in_attribute): New.
25803 (dwarf2out_locviews_in_loclist): New.
25804 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25805 (enum dw_line_info_opcode): Add LI_adv_address.
25806 (struct dw_line_info_table): Add view.
25807 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25808 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25809 (zero_view_p): New variable.
25810 (ZERO_VIEW_P): New macro.
25811 (output_asm_line_debug_info): New.
25812 (struct var_loc_node): Add view.
25813 (add_AT_view_list, AT_loc_list): New.
25814 (add_var_loc_to_decl): Add view param. Test it against last.
25815 (new_loc_list): Add view params. Record them.
25816 (AT_loc_list_ptr): Handle loc and view lists.
25817 (view_list_to_loc_list_val_node): New.
25818 (print_dw_val): Handle dw_val_class_view_list.
25819 (size_of_die): Likewise.
25820 (value_format): Likewise.
25821 (loc_list_has_views): New.
25822 (gen_llsym): Set vl_symbol too.
25823 (maybe_gen_llsym, skip_loc_list_entry): New.
25824 (dwarf2out_maybe_output_loclist_view_pair): New.
25825 (output_loc_list): Output view list or entries too.
25826 (output_view_list_offset): New.
25827 (output_die): Handle dw_val_class_view_list.
25828 (output_dwarf_version): New.
25829 (output_compilation_unit_header): Use it.
25830 (output_skeleton_debug_sections): Likewise.
25831 (output_rnglists, output_line_info): Likewise.
25832 (output_pubnames, output_aranges): Update version comments.
25833 (output_one_line_info_table): Output view numbers in asm comments.
25834 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25835 Call maybe_gen_llsym.
25836 (loc_list_from_tree_1): Adjust.
25837 (add_AT_location_description): Create view list attribute if
25838 needed, check it's absent otherwise.
25839 (convert_cfa_to_fb_loc_list): Adjust.
25840 (maybe_emit_file): Call output_asm_line_debug_info for test.
25841 (dwarf2out_var_location): Reset views as needed. Precompute
25842 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25843 attribute. Set view.
25844 (new_line_info_table): Reset next view.
25845 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25846 (dwarf2out_source_line): Likewise. Output view resets and labels to
25847 the assembler, or select appropriate line info opcodes.
25848 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25849 (optimize_string_length): Catch it. Adjust.
25850 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25851 dw_val_class_view_list, and remove it if no longer needed.
25852 (hash_loc_list): Hash view numbers.
25853 (loc_list_hasher::equal): Compare them.
25854 (optimize_location_lists): Check whether a view list symbol is
25855 needed, and whether the locview attribute is present, and
25856 whether they match. Remove the locview attribute if no longer
25858 (index_location_lists): Call skip_loc_list_entry for test.
25859 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25860 Use output_dwarf_version.
25861 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25862 (struct dw_val_node): Add val_view_list.
25863 * final.c (SEEN_NEXT_VIEW): New.
25864 (set_next_view_needed): New.
25865 (clear_next_view_needed): New.
25866 (maybe_output_next_view): New.
25867 (final_start_function): Rename to...
25868 (final_start_function_1): ... this. Take pointer to FIRST,
25869 add SEEN parameter. Emit param bindings in the initial view.
25870 (final_start_function): Reintroduce SEEN-less interface.
25871 (final): Rename to...
25872 (final_1): ... this. Take SEEN parameter. Output final pending
25873 next view at the end.
25874 (final): Reintroduce seen-less interface.
25875 (final_scan_insn): Output pending next view before switching
25876 sections or ending a block. Mark the next view as needed when
25877 outputting variable locations. Notify debug backend of section
25878 changes, and of location view changes.
25879 (rest_of_handle_final): Adjust.
25880 * toplev.c (process_options): Autodetect value for debug variable
25881 location views option. Warn on incompat5 without -gdwarf-5.
25882 * doc/invoke.texi (gvariable-location-views): New.
25883 (gvariable-location-views=incompat5): New.
25884 (gno-variable-location-views): New.
25886 2018-02-08 David Malcolm <dmalcolm@redhat.com>
25888 PR tree-optimization/84136
25889 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25890 that the result of find_edge is non-NULL.
25892 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25895 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25896 storing integer register in SImode. Fix cost of 256 and 512
25897 byte aligned SSE register store.
25899 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25901 * config/i386/i386.c (ix86_multiplication_cost): Fix
25902 multiplication cost for TARGET_AVX512DQ.
25904 2018-02-08 Marek Polacek <polacek@redhat.com>
25906 PR tree-optimization/84238
25907 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25910 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25912 PR tree-optimization/84265
25913 * tree-vect-stmts.c (vectorizable_store): Don't treat
25914 VMAT_CONTIGUOUS accesses as grouped.
25915 (vectorizable_load): Likewise.
25917 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25919 PR tree-optimization/81635
25920 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25921 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25922 (test_round_for_mask): New functions.
25923 (wide_int_cc_tests): Call test_round_for_mask.
25924 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25925 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25926 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25927 range returned by get_range_info.
25929 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25932 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25933 * symtab.c: Include builtins.h
25934 (symtab_node::output_to_lto_symbol_table_p): Move here
25935 from lto-streamer-out.c:output_symbol_p.
25936 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25937 (output_symbol_p): Move all logic to symtab.c
25938 (produce_symtab): Update.
25940 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25942 * config/s390/s390-opts.h (enum indirect_branch): Define.
25943 * config/s390/s390-protos.h (s390_return_addr_from_memory)
25944 (s390_indirect_branch_via_thunk)
25945 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25946 (enum s390_indirect_branch_type): Define.
25947 * config/s390/s390.c (struct s390_frame_layout, struct
25948 machine_function): Remove.
25949 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25950 (indirect_branch_table_label_no, indirect_branch_table_name):
25952 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25953 (enum s390_indirect_branch_option): Define.
25954 (s390_return_addr_from_memory): New function.
25955 (s390_handle_string_attribute): New function.
25956 (s390_attribute_table): Add new attribute handler.
25957 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25958 (s390_indirect_branch_via_thunk): New function.
25959 (s390_indirect_branch_via_inline_thunk): New function.
25960 (s390_function_ok_for_sibcall): When jumping via thunk disallow
25961 sibling call optimization for non z10 compiles.
25962 (s390_emit_call): Force indirect branch target to be a single
25963 register. Add r1 clobber for non-z10 compiles.
25964 (s390_emit_epilogue): Emit return jump via return_use expander.
25965 (s390_reorg): Handle JUMP_INSNs as execute targets.
25966 (s390_option_override_internal): Perform validity checks for the
25967 new command line options.
25968 (s390_indirect_branch_attrvalue): New function.
25969 (s390_indirect_branch_settings): New function.
25970 (s390_set_current_function): Invoke s390_indirect_branch_settings.
25971 (s390_output_indirect_thunk_function): New function.
25972 (s390_code_end): Implement target hook.
25973 (s390_case_values_threshold): Implement target hook.
25974 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25976 * config/s390/s390.h (struct s390_frame_layout)
25977 (struct machine_function): Move here from s390.c.
25978 (TARGET_INDIRECT_BRANCH_NOBP_RET)
25979 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25980 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25981 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25982 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25983 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25984 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25985 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25986 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25987 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25988 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25989 (mnemonic attribute): Add values which aren't recognized
25991 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25992 pattern for branch conversion. Fix mnemonic attribute.
25993 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25994 indirect branch via thunk if requested.
25995 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25996 ("*indirect_jump"): Disable for branch conversion using out of
25998 ("indirect_jump_via_thunk<mode>_z10")
25999 ("indirect_jump_via_thunk<mode>")
26000 ("indirect_jump_via_inlinethunk<mode>_z10")
26001 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26002 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26003 ("casesi_jump_via_inlinethunk<mode>_z10")
26004 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26005 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26006 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26007 ("*indirect2_jump"): Disable for branch conversion.
26008 ("casesi_jump"): Turn into expander and expand patterns for branch
26010 ("return_use"): New expander.
26011 ("*return"): Emit return via thunk and rename it to ...
26012 ("*return<mode>"): ... this one.
26013 * config/s390/s390.opt: Add new options and and enum for the
26016 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26018 * lra-constraints.c (match_reload): Unconditionally use
26019 gen_lowpart_SUBREG, rather than selecting between that
26020 and equivalent gen_rtx_SUBREG code.
26022 2018-02-08 Richard Biener <rguenther@suse.de>
26024 PR tree-optimization/84233
26025 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26026 changed flag instead of boguously re-using phi_inserted.
26028 2018-02-08 Martin Jambor <mjambor@suse.cz>
26030 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26031 static local variables.
26033 2018-02-08 Richard Biener <rguenther@suse.de>
26035 PR tree-optimization/84278
26036 * tree-vect-stmts.c (vectorizable_store): When looking for
26037 smaller vector types to perform grouped strided loads/stores
26038 make sure the mode is supported by the target.
26039 (vectorizable_load): Likewise.
26041 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26043 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26044 Increase LDP/STP opportunities by adding adjacent callee-saves.
26046 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26048 PR rtl-optimization/84068
26049 PR rtl-optimization/83459
26050 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26052 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26054 PR tree-optimization/84224
26055 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26056 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26057 non-zero arguments.
26059 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26062 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26063 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26064 count, remove one USE.
26066 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26068 * doc/install.texi (Configuration): Document the
26069 --with-long-double-format={ibm,ieee} PowerPC configuration
26073 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26074 Convert from define_expand to be define_insn_and_split. Rework
26075 float/double/_Float128 conversions to QI/HI/SImode to work with
26076 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26077 conversions to QI/HImode types did a store and then a load to
26078 truncate the value. For conversions to VSX registers, don't split
26079 the insn, instead emit the code directly. Use the code iterator
26080 any_fix to combine signed and unsigned conversions.
26081 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26082 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26083 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26084 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26085 (fix_<mode>di2_hw): Likewise.
26086 (fixuns_<mode>di2_hw): Likewise.
26087 (fix_<mode>si2_hw): Likewise.
26088 (fixuns_<mode>si2_hw): Likewise.
26089 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26090 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26091 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26092 fix<uns>_trunc<SFDF:mode>si2_p8.
26093 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26094 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26095 (fix<uns>_<mode>_mem): Likewise.
26096 (fctiw<u>z_<mode>_mem): Likewise.
26097 (fix<uns>_<mode>_mem): Likewise.
26098 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26099 the register allocator from doing a direct move to the GPRs to do
26100 a store, and instead use the ISA 3.0 store byte/half-word from
26101 vector register instruction. For IEEE 128-bit floating point,
26102 also optimize stores of 32-bit ints.
26103 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26105 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26107 * genextract.c (push_pathstr_operand): New function to support
26109 (walk_rtx): Call push_pathstr_operand.
26110 (print_path): Support [a-zA-Z].
26112 2018-02-07 Richard Biener <rguenther@suse.de>
26114 PR tree-optimization/84037
26115 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26116 (cse_and_gimplify_to_preheader): Declare.
26117 (vect_get_place_in_interleaving_chain): Likewise.
26118 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26120 (_loop_vec_info::~_loop_vec_info): Delete it.
26121 (cse_and_gimplify_to_preheader): New function.
26122 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26123 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26124 (vectorizable_load): Likewise. For grouped stores always base
26125 the IV on the first element.
26126 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26127 condition before gimplifying.
26129 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26131 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26132 *DIV_EXPR and *MOD_EXPR.
26134 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26137 * config/i386/i386.c (ix86_option_override_internal): Mask out
26138 the CF_SET bit when checking -fcf-protection.
26140 2018-02-07 Tom de Vries <tom@codesourcery.com>
26143 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26146 2018-02-07 Richard Biener <rguenther@suse.de>
26148 PR tree-optimization/84204
26149 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26152 PR tree-optimization/84205
26153 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26154 special-case isl_ast_op_zdiv_r.
26156 PR tree-optimization/84223
26157 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26158 Only add conditions from within the region.
26159 (gather_bbs::after_dom_children): Adjust.
26161 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26164 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26165 * config/avr/avr.md: Only post-reload split REG-REG moves if
26166 either register is GENERAL_REG_P.
26168 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26170 PR tree-optimization/84235
26171 * tree-ssa-scopedtables.c
26172 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26173 if the subtraction is performed in floating point type where NaNs are
26174 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26175 build 1. Formatting fix.
26177 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26180 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26181 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26182 and skip it regardless of bb boundaries. Use CALL_P macro,
26183 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26184 unnecessarily, formatting fix.
26186 2018-02-06 Michael Collison <michael.collison@arm.com>
26188 * config/arm/thumb2.md:
26189 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26190 (*thumb_mov_notscc): Ditto.
26192 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26195 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26196 unsigned_fix, not "s".
26198 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26200 * configure.ac (gcc_fn_eh_frame_ro): New function.
26201 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26202 correct .eh_frame permissions.
26203 * configure: Regenerate.
26205 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26207 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26208 irrelevant options.
26210 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26212 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26213 Display warning message for -mno-speculate-indirect-jumps.
26215 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26217 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26219 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26221 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26223 PR tree-optimization/84225
26224 * tree-eh.c (find_trapping_overflow): Only call
26225 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26227 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26230 * config/i386/i386.c: Reimplement the check of possible options
26231 -mibt/-mshstk conbination. Change error messages.
26232 * doc/invoke.texi: Fix a typo: remove extra '='.
26234 2018-02-06 Marek Polacek <polacek@redhat.com>
26236 PR tree-optimization/84228
26237 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26239 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26242 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26243 emitted arch directives.
26244 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26245 __ARM_FEATURE_COPROC before changing architectures.
26247 2018-02-06 Richard Biener <rguenther@suse.de>
26249 * config/i386/i386.c (print_reg): Fix typo.
26250 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26252 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26254 * configure: Regenerate.
26256 2018-02-05 Martin Sebor <msebor@redhat.com>
26258 PR tree-optimization/83369
26259 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26262 2018-02-05 Martin Liska <mliska@suse.cz>
26264 * doc/invoke.texi: Cherry-pick upstream r323995.
26266 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26268 * ira.c (ira_init_register_move_cost): Adjust comment.
26270 2018-02-05 Martin Liska <mliska@suse.cz>
26272 PR gcov-profile/84137
26273 * doc/gcov.texi: Fix typo in documentation.
26275 2018-02-05 Martin Liska <mliska@suse.cz>
26277 PR gcov-profile/83879
26278 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26279 using dlopen functionality.
26281 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26283 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26284 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26285 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26286 _mm_maskz_range_round_ss): New intrinsics.
26287 (__builtin_ia32_rangesd128_round)
26288 (__builtin_ia32_rangess128_round): Remove.
26289 (__builtin_ia32_rangesd128_mask_round,
26290 __builtin_ia32_rangess128_mask_round): New builtins.
26291 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26292 __builtin_ia32_rangess128_round): Remove.
26293 (__builtin_ia32_rangesd128_mask_round,
26294 __builtin_ia32_rangess128_mask_round): New builtins.
26295 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26296 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26297 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26298 "<round_saeonly_constraint>")): Changed to ...
26299 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26300 "<round_saeonly_scalar_constraint>")): ... this.
26301 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26302 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26303 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26304 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26305 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26307 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26309 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26311 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26312 Remove all values except native, 8540 and 8548.
26314 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26316 * config/i386/i386.c (ix86_output_function_return): Pass
26317 INVALID_REGNUM, instead of -1, as invalid register number to
26318 indirect_thunk_name and output_indirect_thunk.
26320 2018-02-02 Julia Koval <julia.koval@intel.com>
26322 * config.gcc: Add -march=icelake.
26323 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26324 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26325 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26326 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26327 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26328 (processor_target_table): Add icelake.
26329 (ix86_option_override_internal): Handle new PTAs.
26330 (get_builtin_code_for_version): Handle icelake.
26331 (M_INTEL_COREI7_ICELAKE): New.
26332 (fold_builtin_cpu): Handle icelake.
26333 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26334 * doc/invoke.texi: Add -march=icelake.
26336 2018-02-02 Julia Koval <julia.koval@intel.com>
26338 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26339 to wide_int_bitmask.
26340 * wide-int-bitmask.h: New.
26342 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26345 * config/i386/i386.md: Replace Pmode with word_mode in
26346 builtin_setjmp_setup and builtin_longjmp to support x32.
26348 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26352 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26354 (rs6000_supported_cpu_names): New static variable.
26355 (linux_cpu_translation_table): Likewise.
26356 (elf_platform) <cpu>: Define new static variable and use it.
26357 Translate kernel AT_PLATFORM name to canonical name if needed.
26358 Error if platform name is unknown.
26360 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26363 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26365 2018-02-01 Jeff Law <law@redhat.com>
26368 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26369 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26370 the scratch if RELEASE_VIA_POP is false.
26371 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26372 If we have to save a temporary register, decrement SIZE appropriately.
26373 Pass new arguments to release_scratch_register_on_entry.
26374 (ix86_adjust_stack_and_probe): Likewise.
26375 (ix86_emit_probe_stack_range): Pass new arguments to
26376 release_scratch_register_on_entry.
26378 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26380 PR rtl-optimization/84157
26381 * combine.c (change_zero_ext): Use REG_P predicate in
26382 front of HARD_REGISTER_P predicate.
26384 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26386 * config/avr/avr.c (avr_option_override): Move disabling of
26387 -fdelete-null-pointer-checks to...
26388 * common/config/avr/avr-common.c (avr_option_optimization_table):
26391 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26393 PR tree-optimization/81635
26394 * tree-data-ref.c (split_constant_offset_1): For types that
26395 wrap on overflow, try to use range info to prove that wrapping
26398 2018-02-01 Renlin Li <renlin.li@arm.com>
26401 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26402 TAILCALL_ADDR_REGS.
26403 (aarch64_register_move_cost): Likewise.
26404 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26405 TAILCALL_ADDR_REGS.
26406 (REG_CLASS_NAMES): Likewise.
26407 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26408 TAILCALL_ADDR_REGS. Remove IP registers.
26409 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26411 2018-02-01 Richard Biener <rguenther@suse.de>
26413 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26414 for specifying RPO order and allow NULL for that.
26415 * domwalk.c (dom_walker::dom_walker): Likewise.
26416 (dom_walker::walk): Handle NULL RPO order.
26417 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26419 (rewrite_update_dom_walker): Likewise.
26420 (mark_def_dom_walker): Likewise.
26422 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26424 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26425 (aarch64_maybe_expand_sve_subreg_move): Declare.
26426 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26427 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26429 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26430 that are semantically a reverse operation.
26431 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26432 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26433 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26435 (aarch64_can_change_mode_class): For big-endian, forbid changes
26436 between two SVE modes if they have different element sizes.
26438 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26440 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26441 the TImode handling for big-endian targets.
26443 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26445 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26446 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26448 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26449 Remove BSWAP handing for big-endian targets and use the form of
26450 LD1RQ appropariate for the mode.
26452 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26454 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26455 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26456 duplicated element.
26458 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26461 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26462 check for operands that need to go through aarch64_sve_reload_be.
26464 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26466 PR tree-optimization/81661
26467 PR tree-optimization/84117
26468 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26469 * tree-eh.c: Include gimplify.h.
26470 (find_trapping_overflow, replace_trapping_overflow,
26471 rewrite_to_non_trapping_overflow): New functions.
26472 * tree-vect-loop.c: Include tree-eh.h.
26473 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26474 * tree-data-ref.c: Include tree-eh.h.
26475 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26477 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26479 PR rtl-optimization/84123
26480 * combine.c (change_zero_ext): Check if hard register satisfies
26481 can_change_dest_mode before calling gen_lowpart_SUBREG.
26483 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26486 * ira.c (ira_init_register_move_cost): Remove assert.
26488 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26490 PR rtl-optimization/84071
26491 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26492 * doc/tm.texi: Regenerate.
26494 2018-01-31 Richard Biener <rguenther@suse.de>
26496 PR tree-optimization/84132
26497 * tree-data-ref.c (analyze_miv_subscript): Properly
26498 check whether evolution_function_is_affine_multivariate_p
26499 before calling gcd_of_steps_may_divide_p.
26501 2018-01-31 Julia Koval <julia.koval@intel.com>
26504 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26505 * config/i386/i386.md (rdpid_rex64) New.
26506 (rdpid): Make 32bit only.
26508 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26511 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26512 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26514 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26517 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26519 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26521 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26523 PR rtl-optimization/84071
26524 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26525 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26527 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26529 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26530 (arc_attribute_table): Add 'aux' attribute.
26531 (arc_in_small_data_p): Consider aux like variables.
26532 (arc_is_aux_reg_p): New function.
26533 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26534 (arc_get_aux_arg): New function.
26535 (prepare_move_operands): Handle aux-register access.
26536 (arc_handle_aux_attribute): New function.
26537 * doc/extend.texi (ARC Variable attributes): Add subsection.
26539 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26541 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26542 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26543 (arc_attribute_table): Add 'uncached' attribute.
26544 (arc_print_operand): Print '.di' flag for uncached memory
26546 (arc_in_small_data_p): Do not consider for small data the uncached
26548 (arc_is_uncached_mem_p): New function.
26549 * config/arc/predicates.md (compact_store_memory_operand): Check
26550 for uncached memory accesses.
26551 (nonvol_nonimm_operand): Likewise.
26552 * doc/extend.texi (ARC Type Attribute): New subsection.
26554 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26557 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26558 falign-loops=): Add Optimization flag.
26560 2018-01-30 Jeff Law <law@redhat.com>
26563 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26564 INT_REGISTERS_SAVED. Check it prior to calling
26565 get_scratch_register_on_entry.
26566 (ix86_adjust_stack_and_probe): Similarly.
26567 (ix86_emit_probe_stack_range): Similarly.
26568 (ix86_expand_prologue): Corresponding changes.
26570 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26573 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26574 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26576 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26579 * lra-constraints.c (curr_insn_transform): Process AND in the
26582 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26584 PR rtl-optimization/83986
26585 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26586 dependence against last_pending_memory_flush in addition to
26587 pending_jump_insns.
26589 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26591 PR tree-optimization/81611
26592 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26595 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26598 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26601 2018-01-30 Richard Biener <rguenther@suse.de>
26602 Jakub Jelinek <jakub@redhat.com>
26604 PR tree-optimization/84111
26605 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26606 inner loops added during recursion, as they don't have up-to-date
26609 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26612 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26613 (can_inline_edge_by_limits_p): ... here.
26614 (can_early_inline_edge_p, check_callers,
26615 update_caller_keys, update_callee_keys, recursive_inlining,
26616 add_new_edges_to_heap, speculation_useful_p,
26617 inline_small_functions,
26618 inline_small_functions, flatten_function,
26619 inline_to_all_callers_1): Update.
26621 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26623 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26626 2018-01-30 Richard Biener <rguenther@suse.de>
26628 PR tree-optimization/83008
26629 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26630 invariant and constant vector uses in stmts when they need
26631 more than one stmt.
26633 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26636 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26637 * configure: Regenerate.
26639 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26641 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26643 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26644 Use gen_rtx_REG rather than gen_lowpart.
26646 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26648 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26649 rather than 0 when creating partial subregs.
26651 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26653 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26656 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26659 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26660 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26661 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26662 flags. This restores the settings used before the 2017-07-24.
26663 Turning off pre increment/decrement/modify allows IVOPTS to
26664 optimize DF/SF loops where the index is an int.
26666 2018-01-29 Richard Biener <rguenther@suse.de>
26667 Kelvin Nilsen <kelvin@gcc.gnu.org>
26670 * tree-vect-stmts.c (vectorizable_call): Don't call
26671 targetm.vectorize_builtin_md_vectorized_function if callee is
26674 2018-01-22 Carl Love <cel@us.ibm.com>
26676 * doc/extend.tex: Fix typo in second arg in
26677 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26679 2018-01-29 Richard Biener <rguenther@suse.de>
26681 PR tree-optimization/84086
26682 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26683 (flush_ssaname_freelist): When SSA names were released reset
26684 the SCEV hash table.
26686 2018-01-29 Richard Biener <rguenther@suse.de>
26688 PR tree-optimization/84057
26689 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26690 removed paths when removing edges.
26692 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26694 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26695 -mfunction-return=@var{choice}.
26697 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26699 PR diagnostic/84034
26700 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26701 Handle CR like TAB.
26702 (layout::print_source_line): Likewise.
26703 (test_get_line_width_without_trailing_whitespace): Add test cases.
26705 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26707 PR middle-end/84040
26708 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26711 2018-01-26 Jim Wilson <jimw@sifive.com>
26713 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26715 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26718 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26720 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26721 and CMP + SUB-immediate -> SUBS.
26723 2018-01-26 Martin Sebor <msebor@redhat.com>
26725 PR tree-optimization/83896
26726 * tree-ssa-strlen.c (get_string_len): Rename...
26727 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26728 Avoid assuming length is constant.
26729 (handle_char_store): Use HOST_WIDE_INT for string length.
26731 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26734 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26735 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26737 2018-01-26 Richard Biener <rguenther@suse.de>
26739 PR rtl-optimization/84003
26740 * dse.c (record_store): Only record redundant stores when
26741 the earlier store aliases at least all accesses the later one does.
26743 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26745 PR rtl-optimization/83985
26746 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26747 REG_CFA_RESTORE insns.
26748 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26749 REG_CFA_RESTORE insns here.
26752 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26753 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26755 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26757 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26758 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26759 (arc_init): Likewise.
26760 (arc_override_options): Likewise.
26761 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26763 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26765 * config/arc/arc.h (TARGET_DBNZ): Define.
26766 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26767 properly set the tune attribute.
26768 (dbnz): Use TARGET_DBNZ guard.
26769 * config/arc/arc.opt (mtune): Add core3 option.
26771 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26773 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26774 recognize new pic like addresses.
26775 (arc_delegitimize_address): Clean up.
26777 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26779 * config/arc/arc-arches.def: Option mrf16 valid for all
26781 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26782 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26783 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26784 * config/arc/arc-tables.opt: Regenerate.
26785 * config/arc/arc.c (arc_conditional_register_usage): Handle
26786 reduced register file case.
26787 (arc_file_start): Set must have build attributes.
26788 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26789 mrf16 option value.
26790 * config/arc/arc.opt (mrf16): Add new option.
26791 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26792 * config/arc/genmultilib.awk: Handle new mrf16 option.
26793 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26794 * config/arc/t-multilib: Regenerate.
26795 * doc/invoke.texi (ARC Options): Document mrf16 option.
26797 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26799 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26800 * config/arc/arc.c (arc_handle_secure_attribute): New function.
26801 (arc_attribute_table): Add 'secure_call' attribute.
26802 (arc_print_operand): Print secure call operand.
26803 (arc_function_ok_for_sibcall): Don't optimize tail calls when
26805 (arc_is_secure_call_p): New function. * config/arc/arc.md
26806 (call_i): Add support for sjli instruction.
26807 (call_value_i): Likewise.
26808 * config/arc/constraints.md (Csc): New constraint.
26810 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26811 John Eric Martin <John.Martin@emmicro-us.com>
26813 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26814 * config/arc/arc.c (_arc_jli_section): New struct.
26815 (arc_jli_section): New type.
26816 (rc_jli_sections): New static variable.
26817 (arc_handle_jli_attribute): New function.
26818 (arc_attribute_table): Add jli_always and jli_fixed attribute.
26819 (arc_file_end): New function.
26820 (TARGET_ASM_FILE_END): Define.
26821 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26822 (arc_add_jli_section): New function.
26823 (jli_call_scan): Likewise.
26824 (arc_reorg): Call jli_call_scan.
26825 (arc_output_addsi): Remove 'S' from printing asm operand.
26826 (arc_is_jli_call_p): New function.
26827 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26829 (movhi_insn): Likewise.
26830 (movsi_insn): Likewise.
26831 (movsi_set_cc_insn): Likewise.
26832 (loadqi_update): Likewise.
26833 (load_zeroextendqisi_update): Likewise.
26834 (load_signextendqisi_update): Likewise.
26835 (loadhi_update): Likewise.
26836 (load_zeroextendhisi_update): Likewise.
26837 (load_signextendhisi_update): Likewise.
26838 (loadsi_update): Likewise.
26839 (loadsf_update): Likewise.
26840 (movsicc_insn): Likewise.
26841 (bset_insn): Likewise.
26842 (bxor_insn): Likewise.
26843 (bclr_insn): Likewise.
26844 (bmsk_insn): Likewise.
26845 (bicsi3_insn): Likewise.
26846 (cmpsi_cc_c_insn): Likewise.
26847 (movsi_ne): Likewise.
26848 (movsi_cond_exec): Likewise.
26849 (clrsbsi2): Likewise.
26850 (norm_f): Likewise.
26860 (call_i): Remove 'S' asm letter, add jli instruction.
26861 (call_value_i): Likewise.
26862 * config/arc/arc.op (mjli-always): New option.
26863 * config/arc/constraints.md (Cji): New constraint.
26864 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26866 (subsf3_fpx): Likewise.
26867 (mulsf3_fpx): Likewise.
26868 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26870 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26871 function attrbutes.
26872 * doc/invoke.texi (ARC): Document mjli-always option.
26874 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26876 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26877 avoid addition with 0 and use incw and decw where possible.
26879 2018-01-26 Richard Biener <rguenther@suse.de>
26881 PR tree-optimization/81082
26882 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26883 association if it requires casting to unsigned.
26884 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26885 from fold_plusminus_mult_expr to catch important cases late when
26886 range info is available.
26888 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26890 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26891 * configure.ac (hidden_linkonce): New test.
26892 * configure: Regenerate.
26893 * config.in: Regenerate.
26895 2018-01-26 Julia Koval <julia.koval@intel.com>
26897 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26898 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26899 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26900 _mm_mask_bitshuffle_epi64_mask): Fix type.
26901 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26902 USI_FTYPE_V4DI_V4DI_USI): Remove.
26903 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26904 __builtin_ia32_vpshufbitqmb256_mask,
26905 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26906 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26907 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26909 2018-01-26 Alan Modra <amodra@gmail.com>
26912 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26913 UNSPEC_VBPERMQ. Sort other unspecs.
26915 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
26917 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26919 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
26921 PR middle-end/83055
26922 * predict.c (drop_profile): Do not push/pop cfun; update also
26924 (handle_missing_profiles): Fix logic looking for zero profiles.
26926 2018-01-25 Jakub Jelinek <jakub@redhat.com>
26928 PR middle-end/83977
26929 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26930 on functions with #pragma omp declare simd or functions with simd
26932 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26933 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26934 Remove trailing \n from warning_at calls.
26936 2018-01-25 Tom de Vries <tom@codesourcery.com>
26939 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26940 for neutered workers.
26942 2018-01-24 Joseph Myers <joseph@codesourcery.com>
26945 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26946 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26948 2018-01-24 Jeff Law <law@redhat.com>
26951 * i386.c (get_probe_interval): Move to earlier point.
26952 (ix86_compute_frame_layout): If -fstack-clash-protection and
26953 the frame is larger than the probe interval, then use pushes
26954 to save registers rather than reg->mem moves.
26955 (ix86_expand_prologue): Remove conditional for int_registers_saved
26958 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
26961 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26962 min/max for never referenced object.
26964 2018-01-24 Jakub Jelinek <jakub@redhat.com>
26966 PR middle-end/83977
26967 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26969 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26970 attributes from DECL_ATTRIBUTES (decl) without affecting
26971 DECL_ATTRIBUTES (current_function_decl).
26972 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26973 functions with non-NULL DECL_ABSTRACT_ORIGIN.
26975 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
26977 PR tree-optimization/83979
26978 * fold-const.c (fold_comparison): Use constant_boolean_node
26979 instead of boolean_{true,false}_node.
26981 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
26983 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26986 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26988 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26989 Simplify the clause that sets the length attribute.
26990 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26991 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26992 clause that sets the length attribute.
26993 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26995 2018-01-24 Tom de Vries <tom@codesourcery.com>
26998 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26999 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27000 Add strict parameter.
27001 (prevent_branch_around_nothing): Insert dummy insn between branch to
27002 label and label with no ptx insn inbetween.
27003 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27005 2018-01-24 Tom de Vries <tom@codesourcery.com>
27008 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27009 for neutered threads in warp.
27010 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27012 2018-01-24 Richard Biener <rguenther@suse.de>
27014 PR tree-optimization/83176
27015 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27018 2018-01-24 Richard Biener <rguenther@suse.de>
27020 PR tree-optimization/82819
27021 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27022 code generating pluses that are no-ops in the target precision.
27024 2018-01-24 Richard Biener <rguenther@suse.de>
27026 PR middle-end/84000
27027 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27029 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27031 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27032 to merge probabilities.
27033 * predict.c (probably_never_executed): Also mark as cold functions
27034 with global 0 profile and guessed local profile.
27035 * profile-count.c (profile_probability::combine_with_count): New
27037 * profile-count.h (profile_probability::operator*,
27038 profile_probability::operator*=, profile_probability::operator/,
27039 profile_probability::operator/=): Reduce precision to adjusted
27040 and set value to guessed on contradictory divisions.
27041 (profile_probability::combine_with_freq): Remove.
27042 (profile_probability::combine_wiht_count): Declare.
27043 (profile_count::force_nonzero):: Set to adjusted.
27044 (profile_count::probability_in):: Set quality to adjusted.
27045 * tree-ssa-tail-merge.c (replace_block_by): Use
27046 combine_with_count.
27048 2018-01-23 Andrew Waterman <andrew@sifive.com>
27049 Jim Wilson <jimw@sifive.com>
27051 * config/riscv/riscv.c (riscv_stack_boundary): New.
27052 (riscv_option_override): Set riscv_stack_boundary. Handle
27053 riscv_preferred_stack_boundary_arg.
27054 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27055 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27056 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27057 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27058 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27059 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27061 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27064 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27065 of struct ix86_frame.
27066 (ix86_expand_epilogue): Likewise. Add a local variable for
27067 the reg_save_offset field in struct ix86_frame.
27069 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27071 PR tree-optimization/82604
27072 * tree-loop-distribution.c (enum partition_kind): New enum item
27073 PKIND_PARTIAL_MEMSET.
27074 (partition_builtin_p): Support above new enum item.
27075 (generate_code_for_partition): Ditto.
27076 (compute_access_range): Differentiate cases that equality can be
27077 proven at all loops, the innermost loops or no loops.
27078 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27079 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27080 (finalize_partitions, distribute_loop): Don't fuse partition of
27081 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27082 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27083 parloop is enabled.
27085 2018-01-23 Martin Liska <mliska@suse.cz>
27087 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27088 order to ignore the predictor.
27089 (PRED_POLYMORPHIC_CALL): Likewise.
27090 (PRED_RECURSIVE_CALL): Likewise.
27092 2018-01-23 Martin Liska <mliska@suse.cz>
27094 * tree-profile.c (tree_profiling): Print function header to
27095 aware reader which function we are working on.
27096 * value-prof.c (gimple_find_values_to_profile): Do not print
27097 not interesting value histograms.
27099 2018-01-23 Martin Liska <mliska@suse.cz>
27101 * profile-count.h (enum profile_quality): Add
27102 profile_uninitialized as the first value. Do not number values
27103 as they are zero based.
27104 (profile_count::verify): Update sanity check.
27105 (profile_probability::verify): Likewise.
27107 2018-01-23 Nathan Sidwell <nathan@acm.org>
27109 * doc/invoke.texi (ffor-scope): Deprecate.
27111 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27113 PR tree-optimization/83510
27114 * domwalk.c (set_all_edges_as_executable): New function.
27115 (dom_walker::dom_walker): Convert bool param
27116 "skip_unreachable_blocks" to enum reachability. Move setup of
27117 edge flags to set_all_edges_as_executable and only do it when
27118 reachability is REACHABLE_BLOCKS.
27119 * domwalk.h (enum dom_walker::reachability): New enum.
27120 (dom_walker::dom_walker): Convert bool param
27121 "skip_unreachable_blocks" to enum reachability.
27122 (set_all_edges_as_executable): New decl.
27123 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27124 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27126 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27127 but converting true to REACHABLE_BLOCKS.
27128 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27130 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27131 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27132 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27134 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27135 if check_all_array_refs will be called.
27137 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27139 * tree.c (selftest::test_location_wrappers): Add more test
27142 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27144 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27145 (selftest::test_bit_in_range): Likewise.
27147 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27150 * doc/sourcebuild.texi (vect_float): Say that the selector
27151 only describes the situation when -funsafe-math-optimizations is on.
27152 (vect_float_strict): Document.
27154 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27156 PR tree-optimization/83965
27157 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27158 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27159 instead of checking only for a reduction.
27160 (vect_recog_widen_sum_pattern): Likewise.
27162 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27164 * predict.c (probably_never_executed): Only use precise profile info.
27165 (compute_function_frequency): Skip after inlining hack since we now
27166 have quality checking.
27168 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27170 * profile-count.h (profile_probability::very_unlikely,
27171 profile_probability::unlikely, profile_probability::even): Set
27172 precision to guessed.
27174 2018-01-23 Richard Biener <rguenther@suse.de>
27176 PR tree-optimization/83963
27177 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27178 Properly terminate dominator walk when crossing the exit edge not
27179 when visiting its source block.
27181 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27184 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27185 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27187 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27189 PR tree-optimization/83957
27190 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27191 semicolon after for body surrounded by braces.
27193 PR tree-optimization/83081
27194 * profile-count.h (profile_probability::split): New method.
27195 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27196 Use profile_probability::split.
27197 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27198 when splitting a single conditional jump into 2.
27200 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27202 PR tree-optimization/69452
27203 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27206 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27208 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27209 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27210 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27212 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27214 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27216 * config/rl78/rl78.md (movdi): New define_expand.
27217 * config/rl78/rl78.c (rl78_split_movdi): New function.
27219 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27222 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27224 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27225 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27226 128-bit to produce an UNSPEC move to get the double word with the
27227 signbit and then a shift directly to do signbit.
27228 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27229 implementation with a new version that just does either a direct
27230 move or a regular move. Move memory interface to separate insns.
27231 Move insns so they are next to the expander.
27232 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27233 with signbit move. Split big and little endian case.
27234 (signbit<mode>2_dm_mem_le): Likewise.
27235 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27236 (signbit<mode>2_dm2): Likewise.
27238 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27240 * config/rl78/rl78.md (anddi3): New define_expand.
27242 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27244 * config/rl78/rl78.md (umindi3): New define_expand.
27246 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27248 * config/rl78/rl78.md (smindi3): New define_expand.
27250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27252 * config/rl78/rl78.md (smaxdi3): New define_expand.
27254 2018-01-22 Carl Love <cel@us.ibm.com>
27256 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27257 LVX_V1TI): Add macro expansion.
27258 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27259 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27260 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27261 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27262 Change check to determine if the instruction is a byte reversing
27263 entry. Fix typo in comment.
27264 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27265 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27266 Add def_builtin calls for new builtins.
27267 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27268 Add define_insn expansion.
27270 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27272 * config/rl78/rl78.md (umaxdi3): New define_expand.
27274 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27276 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27277 for non-QImode registers.
27279 2018-01-22 Richard Biener <rguenther@suse.de>
27281 PR tree-optimization/83963
27282 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27283 including the loop exit block.
27284 (scop_detection::merge_sese): Likewise.
27285 (scop_detection::add_scop): Do it here instead.
27287 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27289 * doc/sourcebuild.texi (arm_softfloat): Document.
27291 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27294 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27295 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27296 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27298 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27299 David Edelsohn <dje.gcc@gmail.com>
27302 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27303 Change "crset eq" to "crset 2".
27304 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27305 (*call_indirect_aix<mode>_nospec): Likewise.
27306 (*call_value_indirect_aix<mode>_nospec): Likewise.
27307 (*call_indirect_elfv2<mode>_nospec): Likewise.
27308 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27309 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27310 change assembly output from . to $.
27311 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27312 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27313 (*tablejump<mode>_internal1_nospec): Likewise.
27315 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27318 * config/sh/sh_optimize_sett_clrt.cc:
27319 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27321 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27323 PR tree-optimization/83940
27324 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27325 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27326 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27327 use it to pass back the definition type.
27328 (vect_check_store_rhs): Likewise rhs_dt_out.
27329 (vect_build_gather_load_calls): Add a mask_dt argument and use
27330 it instead of a call to vect_is_simple_use.
27331 (vectorizable_store): Update calls to vect_check_load_store_mask
27332 and vect_check_store_rhs. Use the dt returned by the latter instead
27333 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27334 instead of calls to vect_is_simple_use. Pass the scalar rather
27335 than the vector operand to vect_is_simple_use when handling
27336 second and subsequent copies of an rhs value.
27337 (vectorizable_load): Update calls to vect_check_load_store_mask
27338 and vect_build_gather_load_calls. Use the cached mask_dt and
27339 gs_info.offset_dt instead of calls to vect_is_simple_use.
27341 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27343 PR middle-end/83945
27344 * tree-emutls.c: Include gimplify.h.
27345 (lower_emutls_2): New function.
27346 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27347 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27348 it before further processing.
27351 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27352 UINTVAL (trueop1) instead of INTVAL (op1).
27354 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27358 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27359 INCOMING_FRAME_SP_OFFSET if not defined.
27360 (scan_trace): Add ENTRY argument. If true and
27361 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27362 emit a note to adjust the CFA offset.
27363 (create_cfi_notes): Adjust scan_trace callers.
27364 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27365 INCOMING_FRAME_SP_OFFSET in the CIE.
27366 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27367 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27369 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27370 * doc/tm.texi: Regenerated.
27372 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27374 PR rtl-optimization/83147
27375 * lra-constraints.c (remove_inheritance_pseudos): Use
27376 lra_substitute_pseudo_within_insn.
27378 2018-01-19 Tom de Vries <tom@codesourcery.com>
27379 Cesar Philippidis <cesar@codesourcery.com>
27382 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27384 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27387 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27388 spaces for function labels.
27390 2018-01-19 Martin Liska <mliska@suse.cz>
27392 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27393 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27394 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27395 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27396 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27397 (PRED_CONST_RETURN): Change from 69 to 65.
27398 (PRED_NULL_RETURN): Change from 91 to 71.
27399 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27400 (PRED_LOOP_GUARD): Change from 66 to 73.
27402 2018-01-19 Martin Liska <mliska@suse.cz>
27404 * predict.c (predict_insn_def): Add new assert.
27405 (struct branch_predictor): Change type to signed integer.
27406 (test_prediction_value_range): Amend test to cover
27407 PROB_UNINITIALIZED.
27408 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27409 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27410 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27411 (PRED_LOOP_IV_COMPARE): Likewise.
27412 * predict.h (PROB_UNINITIALIZED): Define new constant.
27414 2018-01-19 Martin Liska <mliska@suse.cz>
27416 * predict.c (dump_prediction): Add new format for
27417 analyze_brprob.py script which is enabled with -details
27419 * profile-count.h (precise_p): New function.
27421 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27423 PR tree-optimization/83922
27424 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27425 there are no statements that need masking.
27426 (vect_active_double_reduction_p): New function.
27427 (vect_analyze_loop_operations): Use it when handling phis that
27428 are not in the loop header.
27430 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27432 PR tree-optimization/83914
27433 * tree-vect-loop.c (vectorizable_induction): Don't convert
27434 init_expr or apply the peeling adjustment for inductions
27435 that are nested within the vectorized loop.
27437 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27439 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27442 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27446 * function.h (gimplify_parameters): Add gimple_seq * argument.
27447 * function.c: Include gimple.h and options.h.
27448 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27449 for the added local temporaries if needed.
27450 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27451 if there are any parameter cleanups, wrap whole body into a
27452 try/finally with the cleanups.
27454 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27457 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27458 Use GET_MODE_CLASS for scalar floating point.
27460 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27464 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27465 Fix call of call_cgraph_insertion_hooks.
27467 2018-01-18 Martin Sebor <msebor@redhat.com>
27469 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27471 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27474 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27477 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27480 * common.opt: (-ffile-prefix-map): New option.
27481 * opts.c (common_handle_option): Defer it.
27482 * opts-global.c (handle_common_deferred_options): Handle it.
27483 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27484 * file-prefix-map.h: New file.
27485 (remap_debug_filename, add_debug_prefix_map): ...here.
27486 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27487 * final.c (debug_prefix_map, add_debug_prefix_map
27488 remap_debug_filename): Move to...
27489 * file-prefix-map.c: New file.
27490 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27491 generalize, get rid of alloca(), use strrchr() instead of strchr().
27492 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27493 Implement in terms of add_prefix_map().
27494 (remap_macro_filename, remap_debug_filename): Implement in term of
27496 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27497 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27498 * dbxout.c: Include file-prefix-map.h.
27499 * varasm.c: Likewise.
27500 * vmsdbgout.c: Likewise.
27501 * xcoffout.c: Likewise.
27502 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27503 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27504 * doc/invoke.texi (-ffile-prefix-map): Document.
27505 (-fdebug-prefix-map): Update description.
27507 2018-01-18 Martin Liska <mliska@suse.cz>
27509 * config/i386/i386.c (indirect_thunk_name): Document that also
27511 (output_indirect_thunk): Document why both instructions
27512 (pause and lfence) are generated.
27514 2018-01-18 Richard Biener <rguenther@suse.de>
27516 PR tree-optimization/83887
27517 * graphite-scop-detection.c
27518 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27519 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27520 (scop_detection::merge_sese): Re-implement with a flood-fill
27521 algorithm that properly finds a SESE region if it exists.
27523 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27526 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27527 pointer_diff optimizations use view_convert instead of convert.
27529 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27531 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27532 Generate different code for -mno-speculate-indirect-jumps.
27533 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27534 (*call_indirect_aix<mode>): Disable for
27535 -mno-speculate-indirect-jumps.
27536 (*call_indirect_aix<mode>_nospec): New define_insn.
27537 (*call_value_indirect_aix<mode>): Disable for
27538 -mno-speculate-indirect-jumps.
27539 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27540 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27541 -mno-speculate-indirect-jumps.
27542 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27544 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27546 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27547 long double type, set the flags for noting the default long double
27548 type, even if we don't pass or return a long double type.
27550 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27553 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27556 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27558 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27559 support for merge[hl].
27560 (fold_mergehl_helper): New helper function.
27561 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27562 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27563 (altivec_vmrglw_direct): Add xxmrglw insn.
27565 2018-01-17 Andrew Waterman <andrew@sifive.com>
27567 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27568 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27570 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27573 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27574 call the lto_location_cache before reading the
27575 DECL_SOURCE_LOCATION of the types.
27577 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27578 Richard Sandiford <richard.sandiford@linaro.org>
27580 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27581 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27582 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27583 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27584 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27586 * config/aarch64/constraints.md (aarch64_movti_operand):
27588 * config/aarch64/predicates.md (Uti): Add new constraint.
27590 2018-01-17 Carl Love <cel@us.ibm.com>
27592 * config/rs6000/vsx.md (define_expand xl_len_r,
27593 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27594 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27596 (define_expand, define_insn): Move the shift left from the
27597 define_insn to the define_expand for lxvl and stxvl instructions.
27598 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27599 and XL_LEN_R definitions to PURE.
27601 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27603 * config/i386/i386.c (indirect_thunk_name): Declare regno
27604 as unsigned int. Compare regno with INVALID_REGNUM.
27605 (output_indirect_thunk): Ditto.
27606 (output_indirect_thunk_function): Ditto.
27607 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27608 in the call to output_indirect_thunk_function.
27610 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27612 PR middle-end/83884
27613 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27614 rather than the size of inner_type to determine the stack slot size
27615 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27617 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27620 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27623 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27625 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27626 endian Linux systems to optionally enable multilibs for selecting
27627 the long double type if the user configured an explicit type.
27628 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27629 have no long double multilibs if not defined.
27630 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27631 warn if the user used -mabi={ieee,ibm}longdouble and we built
27632 multilibs for long double.
27633 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27634 appropriate multilib option.
27635 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27637 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27638 for building long double multilibs.
27639 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27641 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27643 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27646 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27648 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27651 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27654 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27657 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27659 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27660 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27662 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27664 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27665 different rtl trees depending on TARGET_64BIT.
27666 (rs6000_gen_lvx): Likewise.
27668 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27670 * config/visium/visium.md (nop): Tweak comment.
27671 (hazard_nop): Likewise.
27673 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27675 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27676 -mspeculate-indirect-jumps.
27677 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27678 for -mno-speculate-indirect-jumps.
27679 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27680 (*call_value_indirect_elfv2<mode>): Disable for
27681 -mno-speculate-indirect-jumps.
27682 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27683 (indirect_jump): Emit different RTL for
27684 -mno-speculate-indirect-jumps.
27685 (*indirect_jump<mode>): Disable for
27686 -mno-speculate-indirect-jumps.
27687 (*indirect_jump<mode>_nospec): New define_insn.
27688 (tablejump): Emit different RTL for
27689 -mno-speculate-indirect-jumps.
27690 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27691 (tablejumpsi_nospec): New define_expand.
27692 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27693 (tablejumpdi_nospec): New define_expand.
27694 (*tablejump<mode>_internal1): Disable for
27695 -mno-speculate-indirect-jumps.
27696 (*tablejump<mode>_internal1_nospec): New define_insn.
27697 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27700 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27702 * caller-save.c (insert_save): Drop unnecessary parameter. All
27705 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27706 Richard Biener <rguenth@suse.de>
27709 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27710 return early, inline manually is_gimple_sizepos. Make sure if we
27711 call gimplify_expr we don't end up with a gimple constant.
27712 * tree.c (variably_modified_type_p): Don't return true for
27713 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27714 * gimplify.h (is_gimple_sizepos): Remove.
27716 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27718 PR tree-optimization/83857
27719 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27720 vectorizable_live_operation for pure SLP statements.
27721 (vectorizable_live_operation): Handle PHIs.
27723 2018-01-16 Richard Biener <rguenther@suse.de>
27725 PR tree-optimization/83867
27726 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27727 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27729 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27732 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27733 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27734 If off is not INTEGER_CST, issue a may not be aligned warning
27735 rather than isn't aligned. Use isn%'t rather than isn't.
27736 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27738 <case MULT_EXPR>: Improve the case when bottom and one of the
27739 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27740 operand, in that case check if the other operand is multiple of
27741 bottom divided by the INTEGER_CST operand.
27743 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27746 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27747 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27748 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27749 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27750 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27751 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27752 (pa_function_arg_size): New function.
27754 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27756 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27757 in a separate statement.
27759 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27761 PR tree-optimization/83847
27762 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27763 group gathers and scatters.
27765 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27767 PR rtl-optimization/86620
27768 * params.def (max-sched-ready-insns): Bump minimum value to 1.
27770 PR rtl-optimization/83213
27771 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27772 to last if both are JUMP_INSNs.
27774 PR tree-optimization/83843
27775 * gimple-ssa-store-merging.c
27776 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27777 store_immediate_info for bswap/nop orig_stores.
27779 2018-01-15 Andrew Waterman <andrew@sifive.com>
27781 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27783 <UDIV>: Increase cost if !TARGET_DIV.
27785 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
27787 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27788 (define_attr "cr_logical_3op"): New.
27789 (cceq_ior_compare): Adjust.
27790 (cceq_ior_compare_complement): Adjust.
27791 (*cceq_rev_compare): Adjust.
27792 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27793 (is_cracked_insn): Adjust.
27794 (insn_must_be_first_in_group): Adjust.
27795 * config/rs6000/40x.md: Adjust.
27796 * config/rs6000/440.md: Adjust.
27797 * config/rs6000/476.md: Adjust.
27798 * config/rs6000/601.md: Adjust.
27799 * config/rs6000/603.md: Adjust.
27800 * config/rs6000/6xx.md: Adjust.
27801 * config/rs6000/7450.md: Adjust.
27802 * config/rs6000/7xx.md: Adjust.
27803 * config/rs6000/8540.md: Adjust.
27804 * config/rs6000/cell.md: Adjust.
27805 * config/rs6000/e300c2c3.md: Adjust.
27806 * config/rs6000/e500mc.md: Adjust.
27807 * config/rs6000/e500mc64.md: Adjust.
27808 * config/rs6000/e5500.md: Adjust.
27809 * config/rs6000/e6500.md: Adjust.
27810 * config/rs6000/mpc.md: Adjust.
27811 * config/rs6000/power4.md: Adjust.
27812 * config/rs6000/power5.md: Adjust.
27813 * config/rs6000/power6.md: Adjust.
27814 * config/rs6000/power7.md: Adjust.
27815 * config/rs6000/power8.md: Adjust.
27816 * config/rs6000/power9.md: Adjust.
27817 * config/rs6000/rs64.md: Adjust.
27818 * config/rs6000/titan.md: Adjust.
27820 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27822 * config/i386/predicates.md (indirect_branch_operand): Rewrite
27823 ix86_indirect_branch_register logic.
27825 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27827 * config/i386/constraints.md (Bs): Update
27828 ix86_indirect_branch_register check. Don't check
27829 ix86_indirect_branch_register with GOT_memory_operand.
27831 * config/i386/predicates.md (GOT_memory_operand): Don't check
27832 ix86_indirect_branch_register here.
27833 (GOT32_symbol_operand): Likewise.
27835 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27837 * config/i386/predicates.md (constant_call_address_operand):
27838 Rewrite ix86_indirect_branch_register logic.
27839 (sibcall_insn_operand): Likewise.
27841 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27843 * config/i386/constraints.md (Bs): Replace
27844 ix86_indirect_branch_thunk_register with
27845 ix86_indirect_branch_register.
27847 * config/i386/i386.md (indirect_jump): Likewise.
27848 (tablejump): Likewise.
27849 (*sibcall_memory): Likewise.
27850 (*sibcall_value_memory): Likewise.
27851 Peepholes of indirect call and jump via memory: Likewise.
27852 * config/i386/i386.opt: Likewise.
27853 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27854 (GOT_memory_operand): Likewise.
27855 (call_insn_operand): Likewise.
27856 (sibcall_insn_operand): Likewise.
27857 (GOT32_symbol_operand): Likewise.
27859 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27861 PR middle-end/83837
27862 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27863 type rather than type addr's type points to.
27864 (expand_omp_atomic_mutex): Likewise.
27865 (expand_omp_atomic): Likewise.
27867 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27870 * config/i386/i386.c (output_indirect_thunk_function): Use
27871 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27872 for __x86_return_thunk.
27874 2018-01-15 Richard Biener <rguenther@suse.de>
27876 PR middle-end/83850
27877 * expmed.c (extract_bit_field_1): Fix typo.
27879 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27882 * config/arm/iterators.md (VF): New mode iterator.
27883 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27884 Remove integer-related logic from pattern.
27885 (neon_vabd<mode>_3): Likewise.
27887 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27889 PR middle-end/82694
27890 * common.opt (fstrict-overflow): No longer an alias.
27891 (fwrapv-pointer): New option.
27892 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27893 also for pointer types based on flag_wrapv_pointer.
27894 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27895 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27896 opts->x_flag_wrapv got set.
27897 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27898 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27899 POINTER_TYPE_OVERFLOW_UNDEFINED.
27900 * match.pd: Likewise in address comparison pattern.
27901 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27903 2018-01-15 Richard Biener <rguenther@suse.de>
27906 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27907 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
27908 Reset type names to their identifier if their TYPE_DECL doesn't
27909 have linkage (and thus is used for ODR and devirt).
27910 (save_debug_info_for_decl): Remove.
27911 (save_debug_info_for_type): Likewise.
27912 (add_tree_to_fld_list): Adjust.
27913 * tree-pretty-print.c (dump_generic_node): Make dumping of
27914 type names more robust.
27916 2018-01-15 Richard Biener <rguenther@suse.de>
27918 * BASE-VER: Bump to 8.0.1.
27920 2018-01-14 Martin Sebor <msebor@redhat.com>
27923 * builtins.c (check_access): Avoid warning when the no-warning bit
27926 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
27928 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27929 * ira-color (allocno_hard_regs_compare): Likewise.
27931 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
27934 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27935 Use .pushsection/.popsection.
27937 2018-01-14 Martin Sebor <msebor@redhat.com>
27940 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27942 2018-01-14 Jakub Jelinek <jakub@redhat.com>
27944 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27945 entry from extra_headers.
27946 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27947 extra_headers, make the list bitwise identical to the i?86-*-* one.
27949 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27951 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27952 -mcmodel=large with -mindirect-branch=thunk,
27953 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27954 -mfunction-return=thunk-extern.
27955 * doc/invoke.texi: Document -mcmodel=large is incompatible with
27956 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27957 -mfunction-return=thunk and -mfunction-return=thunk-extern.
27959 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27961 * config/i386/i386.c (print_reg): Print the name of the full
27962 integer register without '%'.
27963 (ix86_print_operand): Handle 'V'.
27964 * doc/extend.texi: Document 'V' modifier.
27966 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27968 * config/i386/constraints.md (Bs): Disallow memory operand for
27969 -mindirect-branch-register.
27971 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27972 (GOT_memory_operand): Likewise.
27973 (call_insn_operand): Likewise.
27974 (sibcall_insn_operand): Likewise.
27975 (GOT32_symbol_operand): Likewise.
27976 * config/i386/i386.md (indirect_jump): Call convert_memory_address
27977 for -mindirect-branch-register.
27978 (tablejump): Likewise.
27979 (*sibcall_memory): Likewise.
27980 (*sibcall_value_memory): Likewise.
27981 Disallow peepholes of indirect call and jump via memory for
27982 -mindirect-branch-register.
27983 (*call_pop): Replace m with Bw.
27984 (*call_value_pop): Likewise.
27985 (*sibcall_pop_memory): Replace m with Bs.
27986 * config/i386/i386.opt (mindirect-branch-register): New option.
27987 * doc/invoke.texi: Document -mindirect-branch-register option.
27989 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27991 * config/i386/i386-protos.h (ix86_output_function_return): New.
27992 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27993 set function_return_type.
27994 (indirect_thunk_name): Add ret_p to indicate thunk for function
27996 (output_indirect_thunk_function): Pass false to
27997 indirect_thunk_name.
27998 (ix86_output_indirect_branch_via_reg): Likewise.
27999 (ix86_output_indirect_branch_via_push): Likewise.
28000 (output_indirect_thunk_function): Create alias for function
28001 return thunk if regno < 0.
28002 (ix86_output_function_return): New function.
28003 (ix86_handle_fndecl_attribute): Handle function_return.
28004 (ix86_attribute_table): Add function_return.
28005 * config/i386/i386.h (machine_function): Add
28006 function_return_type.
28007 * config/i386/i386.md (simple_return_internal): Use
28008 ix86_output_function_return.
28009 (simple_return_internal_long): Likewise.
28010 * config/i386/i386.opt (mfunction-return=): New option.
28011 (indirect_branch): Mention -mfunction-return=.
28012 * doc/extend.texi: Document function_return function attribute.
28013 * doc/invoke.texi: Document -mfunction-return= option.
28015 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28017 * config/i386/i386-opts.h (indirect_branch): New.
28018 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28019 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28020 with local indirect jump when converting indirect call and jump.
28021 (ix86_set_indirect_branch_type): New.
28022 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28023 (indirectlabelno): New.
28024 (indirect_thunk_needed): Likewise.
28025 (indirect_thunk_bnd_needed): Likewise.
28026 (indirect_thunks_used): Likewise.
28027 (indirect_thunks_bnd_used): Likewise.
28028 (INDIRECT_LABEL): Likewise.
28029 (indirect_thunk_name): Likewise.
28030 (output_indirect_thunk): Likewise.
28031 (output_indirect_thunk_function): Likewise.
28032 (ix86_output_indirect_branch_via_reg): Likewise.
28033 (ix86_output_indirect_branch_via_push): Likewise.
28034 (ix86_output_indirect_branch): Likewise.
28035 (ix86_output_indirect_jmp): Likewise.
28036 (ix86_code_end): Call output_indirect_thunk_function if needed.
28037 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28039 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28040 (ix86_attribute_table): Add indirect_branch.
28041 * config/i386/i386.h (machine_function): Add indirect_branch_type
28042 and has_local_indirect_jump.
28043 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28045 (tablejump): Likewise.
28046 (*indirect_jump): Use ix86_output_indirect_jmp.
28047 (*tablejump_1): Likewise.
28048 (simple_return_indirect_internal): Likewise.
28049 * config/i386/i386.opt (mindirect-branch=): New option.
28050 (indirect_branch): New.
28053 (thunk-inline): Likewise.
28054 (thunk-extern): Likewise.
28055 * doc/extend.texi: Document indirect_branch function attribute.
28056 * doc/invoke.texi: Document -mindirect-branch= option.
28058 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28061 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28063 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28065 * ipa-inline.c (want_inline_small_function_p): Return false if
28066 inlining has already failed with CIF_FINAL_ERROR.
28067 (update_caller_keys): Call want_inline_small_function_p before
28069 (update_callee_keys): Likewise.
28071 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28073 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28075 (rs6000_quadword_masked_address_p): Likewise.
28076 (quad_aligned_load_p): Likewise.
28077 (quad_aligned_store_p): Likewise.
28078 (const_load_sequence_p): Add comment to describe the outer-most loop.
28079 (mimic_memory_attributes_and_flags): New function.
28080 (rs6000_gen_stvx): Likewise.
28081 (replace_swapped_aligned_store): Likewise.
28082 (rs6000_gen_lvx): Likewise.
28083 (replace_swapped_aligned_load): Likewise.
28084 (replace_swapped_load_constant): Capitalize argument name in
28085 comment describing this function.
28086 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28087 and stores that access quad-word aligned addresses and replace
28088 with stvx or lvx instructions when appropriate.
28089 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28090 New function prototype.
28091 (rs6000_quadword_masked_address_p): Likewise.
28092 (rs6000_gen_lvx): Likewise.
28093 (rs6000_gen_stvx): Likewise.
28094 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28095 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28096 when memory address is aligned.
28097 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28098 this split to select lvx instruction when memory address is aligned.
28099 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28100 instruction when memory address is aligned.
28101 (*vsx_le_perm_load_v16qi): Likewise.
28102 (four unnamed splitters): Modify to select the stvx instruction
28103 when memory is aligned.
28105 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28107 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28108 which appears in the queue multiple times.
28110 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28111 Alan Hayward <alan.hayward@arm.com>
28112 David Sherwood <david.sherwood@arm.com>
28114 * tree-vectorizer.h (vec_lower_bound): New structure.
28115 (_loop_vec_info): Add check_nonzero and lower_bounds.
28116 (LOOP_VINFO_CHECK_NONZERO): New macro.
28117 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28118 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28119 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28120 fields. Make seg_len the distance travelled, not including the
28122 (dr_direction_indicator): Declare.
28123 (dr_zero_step_indicator): Likewise.
28124 (dr_known_forward_stride_p): Likewise.
28125 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28127 (runtime_alias_check_p): Allow runtime alias checks with
28129 (operator ==): Compare access_size and align.
28130 (prune_runtime_alias_test_list): Rework for new distinction between
28131 the access_size and seg_len.
28132 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28134 (get_segment_min_max): New function.
28135 (create_intersect_range_checks): Use it.
28136 (dr_step_indicator): New function.
28137 (dr_direction_indicator): Likewise.
28138 (dr_zero_step_indicator): Likewise.
28139 (dr_known_forward_stride_p): Likewise.
28140 * tree-loop-distribution.c (data_ref_segment_size): Return
28141 DR_STEP * (niters - 1).
28142 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28144 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28145 (vect_preserves_scalar_order_p): New function, split out from...
28146 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28147 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28148 (vect_vfa_access_size): New function.
28149 (vect_vfa_align): Likewise.
28150 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28151 (dump_lower_bound): New function.
28152 (vect_check_lower_bound): Likewise.
28153 (vect_small_gap_p): Likewise.
28154 (vectorizable_with_step_bound_p): Likewise.
28155 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28156 depencies if the vectorization factor is 1. Convert the checks
28157 for nonzero steps into checks on the bounds of DR_STEP. Try using
28158 a bunds check for variable steps if the minimum required step is
28159 relatively small. Update calls to the dr_with_seg_len
28160 constructor and to vect_compile_time_alias.
28161 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28163 (vect_loop_versioning): Call it.
28164 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28166 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28169 Alan Hayward <alan.hayward@arm.com>
28170 David Sherwood <david.sherwood@arm.com>
28172 * doc/sourcebuild.texi (vect_scatter_store): Document.
28173 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28175 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28177 * genopinit.c (main): Add supports_vec_scatter_store and
28178 supports_vec_scatter_store_cached to target_optabs.
28179 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28180 IFN_MASK_SCATTER_STORE.
28181 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28183 * internal-fn.h (internal_store_fn_p): Declare.
28184 (internal_fn_stored_value_index): Likewise.
28185 * internal-fn.c (scatter_store_direct): New macro.
28186 (expand_scatter_store_optab_fn): New function.
28187 (direct_scatter_store_optab_supported_p): New macro.
28188 (internal_store_fn_p): New function.
28189 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28190 IFN_MASK_SCATTER_STORE.
28191 (internal_fn_mask_index): Likewise.
28192 (internal_fn_stored_value_index): New function.
28193 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28194 for scatter stores.
28195 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28196 * optabs-query.c (supports_vec_scatter_store_p): New function.
28197 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28198 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28199 true for scatter stores.
28200 (vect_gather_scatter_fn_p): Handle scatter stores too.
28201 (vect_check_gather_scatter): Consider using scatter stores if
28202 supports_vec_scatter_store_p.
28203 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28204 scatter stores too.
28205 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28206 internal_fn_stored_value_index.
28207 (check_load_store_masking): Handle scatter stores too.
28208 (vect_get_store_rhs): Make public.
28209 (vectorizable_call): Use internal_store_fn_p.
28210 (vectorizable_store): Handle scatter store internal functions.
28211 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28212 when deciding whether the end of the group has been reached.
28213 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28214 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28215 (mask_scatter_store<mode>): New insns.
28217 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28218 Alan Hayward <alan.hayward@arm.com>
28219 David Sherwood <david.sherwood@arm.com>
28221 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28222 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28223 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28225 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28226 Use vect_truncate_gather_scatter_offset if we can't treat the
28227 operation as a normal gather load or scatter store.
28228 (get_group_load_store_type): Take the gather_scatter_info
28229 as argument. Try using a gather load or scatter store for
28230 single-element groups.
28231 (get_load_store_type): Update calls to get_group_load_store_type
28232 and vect_use_strided_gather_scatters_p.
28234 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28235 Alan Hayward <alan.hayward@arm.com>
28236 David Sherwood <david.sherwood@arm.com>
28238 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28239 optional tree argument.
28240 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28242 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28243 but continue to use the current value as a fallback.
28244 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28245 to compare the updates.
28246 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28247 (get_load_store_type): Use it when handling a strided access.
28248 (vect_get_strided_load_store_ops): New function.
28249 (vect_get_data_ptr_increment): Likewise.
28250 (vectorizable_load): Handle strided gather loads. Always pass
28251 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28253 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28254 Alan Hayward <alan.hayward@arm.com>
28255 David Sherwood <david.sherwood@arm.com>
28257 * doc/md.texi (gather_load@var{m}): Document.
28258 (mask_gather_load@var{m}): Likewise.
28259 * genopinit.c (main): Add supports_vec_gather_load and
28260 supports_vec_gather_load_cached to target_optabs.
28261 * optabs-tree.c (init_tree_optimization_optabs): Use
28262 ggc_cleared_alloc to allocate target_optabs.
28263 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28264 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28266 * internal-fn.h (internal_load_fn_p): Declare.
28267 (internal_gather_scatter_fn_p): Likewise.
28268 (internal_fn_mask_index): Likewise.
28269 (internal_gather_scatter_fn_supported_p): Likewise.
28270 * internal-fn.c (gather_load_direct): New macro.
28271 (expand_gather_load_optab_fn): New function.
28272 (direct_gather_load_optab_supported_p): New macro.
28273 (direct_internal_fn_optab): New function.
28274 (internal_load_fn_p): Likewise.
28275 (internal_gather_scatter_fn_p): Likewise.
28276 (internal_fn_mask_index): Likewise.
28277 (internal_gather_scatter_fn_supported_p): Likewise.
28278 * optabs-query.c (supports_at_least_one_mode_p): New function.
28279 (supports_vec_gather_load_p): Likewise.
28280 * optabs-query.h (supports_vec_gather_load_p): Declare.
28281 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28282 and memory_type field.
28283 (NUM_PATTERNS): Bump to 15.
28284 * tree-vect-data-refs.c: Include internal-fn.h.
28285 (vect_gather_scatter_fn_p): New function.
28286 (vect_describe_gather_scatter_call): Likewise.
28287 (vect_check_gather_scatter): Try using internal functions for
28288 gather loads. Recognize existing calls to a gather load function.
28289 (vect_analyze_data_refs): Consider using gather loads if
28290 supports_vec_gather_load_p.
28291 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28292 (vect_get_gather_scatter_offset_type): Likewise.
28293 (vect_convert_mask_for_vectype): Likewise.
28294 (vect_add_conversion_to_patterm): Likewise.
28295 (vect_try_gather_scatter_pattern): Likewise.
28296 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28297 (vect_vect_recog_func_ptrs): Add it.
28298 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28299 internal_fn_mask_index and internal_gather_scatter_fn_p.
28300 (check_load_store_masking): Take the gather_scatter_info as an
28301 argument and handle gather loads.
28302 (vect_get_gather_scatter_ops): New function.
28303 (vectorizable_call): Check internal_load_fn_p.
28304 (vectorizable_load): Likewise. Handle gather load internal
28306 (vectorizable_store): Update call to check_load_store_masking.
28307 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28308 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28309 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28310 (aarch64_gather_scale_operand_d): New predicates.
28311 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28312 (mask_gather_load<mode>): New insns.
28314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28315 Alan Hayward <alan.hayward@arm.com>
28316 David Sherwood <david.sherwood@arm.com>
28318 * optabs.def (fold_left_plus_optab): New optab.
28319 * doc/md.texi (fold_left_plus_@var{m}): Document.
28320 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28321 * internal-fn.c (fold_left_direct): Define.
28322 (expand_fold_left_optab_fn): Likewise.
28323 (direct_fold_left_optab_supported_p): Likewise.
28324 * fold-const-call.c (fold_const_fold_left): New function.
28325 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28326 * tree-parloops.c (valid_reduction_p): New function.
28327 (gather_scalar_reductions): Use it.
28328 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28329 (vect_finish_replace_stmt): Declare.
28330 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28331 (needs_fold_left_reduction_p): New function, split out from...
28332 (vect_is_simple_reduction): ...here. Accept reductions that
28333 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28334 (vect_force_simple_reduction): Also store the reduction type in
28335 the assignment's STMT_VINFO_REDUC_TYPE.
28336 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28337 (merge_with_identity): New function.
28338 (vect_expand_fold_left): Likewise.
28339 (vectorize_fold_left_reduction): Likewise.
28340 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28341 scalar phi in place for it. Check for target support and reject
28342 cases that would reassociate the operation. Defer the transform
28343 phase to vectorize_fold_left_reduction.
28344 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28345 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28346 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28348 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28350 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28351 call to ifc_temp_var.
28353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28354 Alan Hayward <alan.hayward@arm.com>
28355 David Sherwood <david.sherwood@arm.com>
28357 * target.def (legitimize_address_displacement): Take the original
28358 offset as a poly_int.
28359 * targhooks.h (default_legitimize_address_displacement): Update
28361 * targhooks.c (default_legitimize_address_displacement): Likewise.
28362 * doc/tm.texi: Regenerate.
28363 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28364 as an argument, moving assert of ad->disp == ad->disp_term to...
28365 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28366 Try calling targetm.legitimize_address_displacement before expanding
28367 the address rather than afterwards, and adjust for the new interface.
28368 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28369 Match the new hook interface. Handle SVE addresses.
28370 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28371 new hook interface.
28373 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28375 * Makefile.in (OBJS): Add early-remat.o.
28376 * target.def (select_early_remat_modes): New hook.
28377 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28378 * doc/tm.texi: Regenerate.
28379 * targhooks.h (default_select_early_remat_modes): Declare.
28380 * targhooks.c (default_select_early_remat_modes): New function.
28381 * timevar.def (TV_EARLY_REMAT): New timevar.
28382 * passes.def (pass_early_remat): New pass.
28383 * tree-pass.h (make_pass_early_remat): Declare.
28384 * early-remat.c: New file.
28385 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28387 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28390 Alan Hayward <alan.hayward@arm.com>
28391 David Sherwood <david.sherwood@arm.com>
28393 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28394 vfm1 with a bound_epilog parameter.
28395 (vect_do_peeling): Update calls accordingly, and move the prologue
28396 call earlier in the function. Treat the base bound_epilog as 0 for
28397 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28398 this base when peeling for gaps.
28399 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28400 with fully-masked loops.
28401 (vect_estimate_min_profitable_iters): Handle the single peeled
28402 iteration in that case.
28404 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28405 Alan Hayward <alan.hayward@arm.com>
28406 David Sherwood <david.sherwood@arm.com>
28408 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28409 single-element interleaving even if the size is not a power of 2.
28410 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28411 accesses for single-element interleaving if the group size is
28414 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28415 Alan Hayward <alan.hayward@arm.com>
28416 David Sherwood <david.sherwood@arm.com>
28418 * doc/md.texi (fold_extract_last_@var{m}): Document.
28419 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28420 * optabs.def (fold_extract_last_optab): New optab.
28421 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28422 * internal-fn.c (fold_extract_direct): New macro.
28423 (expand_fold_extract_optab_fn): Likewise.
28424 (direct_fold_extract_optab_supported_p): Likewise.
28425 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28426 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28427 EXTRACT_LAST_REDUCTION.
28428 (get_initial_def_for_reduction): Do not create an initial vector
28429 for EXTRACT_LAST_REDUCTION reductions.
28430 (vectorizable_reduction): Leave the scalar phi in place for
28431 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28432 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28433 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28434 transform phase to vectorizable_condition.
28435 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28437 (vect_finish_stmt_generation): ...here.
28438 (vect_finish_replace_stmt): New function.
28439 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28440 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28442 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28444 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28445 Alan Hayward <alan.hayward@arm.com>
28446 David Sherwood <david.sherwood@arm.com>
28448 * doc/md.texi (extract_last_@var{m}): Document.
28449 * optabs.def (extract_last_optab): New optab.
28450 * internal-fn.def (EXTRACT_LAST): New internal function.
28451 * internal-fn.c (cond_unary_direct): New macro.
28452 (expand_cond_unary_optab_fn): Likewise.
28453 (direct_cond_unary_optab_supported_p): Likewise.
28454 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28455 loops using EXTRACT_LAST.
28456 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28457 (extract_last_<mode>): ...this optab.
28458 (vec_extract<mode><Vel>): Update accordingly.
28460 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28461 Alan Hayward <alan.hayward@arm.com>
28462 David Sherwood <david.sherwood@arm.com>
28464 * target.def (empty_mask_is_expensive): New hook.
28465 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28466 * doc/tm.texi: Regenerate.
28467 * targhooks.h (default_empty_mask_is_expensive): Declare.
28468 * targhooks.c (default_empty_mask_is_expensive): New function.
28469 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28470 if the target says that empty masks are expensive.
28471 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28473 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28475 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28476 Alan Hayward <alan.hayward@arm.com>
28477 David Sherwood <david.sherwood@arm.com>
28479 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28480 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28481 (vect_use_loop_mask_for_alignment_p): New function.
28482 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28483 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28484 niters_skip argument. Make sure that the first niters_skip elements
28485 of the first iteration are inactive.
28486 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28487 Update call to vect_set_loop_masks_directly.
28488 (get_misalign_in_elems): New function, split out from...
28489 (vect_gen_prolog_loop_niters): ...here.
28490 (vect_update_init_of_dr): Take a code argument that specifies whether
28491 the adjustment should be added or subtracted.
28492 (vect_update_init_of_drs): Likewise.
28493 (vect_prepare_for_masked_peels): New function.
28494 (vect_do_peeling): Skip prologue peeling if we're using a mask
28495 instead. Update call to vect_update_inits_of_drs.
28496 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28498 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28499 alignment. Do not include the number of peeled iterations in
28500 the minimum threshold in that case.
28501 (vectorizable_induction): Adjust the start value down by
28502 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28503 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28504 Take the number of skipped iterations into account when calculating
28506 * tree-vect-stmts.c (vect_gen_while_not): New function.
28508 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28509 Alan Hayward <alan.hayward@arm.com>
28510 David Sherwood <david.sherwood@arm.com>
28512 * doc/sourcebuild.texi (vect_fully_masked): Document.
28513 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28514 default value to 0.
28515 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28517 (vect_analyze_loop_2): ...here. Don't check the vectorization
28518 factor against the number of loop iterations if the loop is
28521 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28522 Alan Hayward <alan.hayward@arm.com>
28523 David Sherwood <david.sherwood@arm.com>
28525 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28526 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28527 (dump_groups): Update accordingly.
28528 (iv_use::mem_type): New member variable.
28529 (address_p): New function.
28530 (record_use): Add a mem_type argument and initialize the new
28532 (record_group_use): Add a mem_type argument. Use address_p.
28533 Remove obsolete null checks of base_object. Update call to record_use.
28534 (find_interesting_uses_op): Update call to record_group_use.
28535 (find_interesting_uses_cond): Likewise.
28536 (find_interesting_uses_address): Likewise.
28537 (get_mem_type_for_internal_fn): New function.
28538 (find_address_like_use): Likewise.
28539 (find_interesting_uses_stmt): Try find_address_like_use before
28540 calling find_interesting_uses_op.
28541 (addr_offset_valid_p): Use the iv mem_type field as the type
28542 of the addressed memory.
28543 (add_autoinc_candidates): Likewise.
28544 (get_address_cost): Likewise.
28545 (split_small_address_groups_p): Use address_p.
28546 (split_address_groups): Likewise.
28547 (add_iv_candidate_for_use): Likewise.
28548 (autoinc_possible_for_pair): Likewise.
28549 (rewrite_groups): Likewise.
28550 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28551 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28552 (get_alias_ptr_type_for_ptr_address): New function.
28553 (rewrite_use_address): Rewrite address uses in calls that were
28554 identified by find_address_like_use.
28556 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28557 Alan Hayward <alan.hayward@arm.com>
28558 David Sherwood <david.sherwood@arm.com>
28560 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28562 * gimple-expr.h (is_gimple_addressable: Likewise.
28563 * gimple-expr.c (is_gimple_address): Likewise.
28564 * internal-fn.c (expand_call_mem_ref): New function.
28565 (expand_mask_load_optab_fn): Use it.
28566 (expand_mask_store_optab_fn): Likewise.
28568 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28569 Alan Hayward <alan.hayward@arm.com>
28570 David Sherwood <david.sherwood@arm.com>
28572 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28573 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28574 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28575 (cond_umax@var{mode}): Document.
28576 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28577 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28578 (cond_umin_optab, cond_umax_optab): New optabs.
28579 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28580 (COND_IOR, COND_XOR): New internal functions.
28581 * internal-fn.h (get_conditional_internal_fn): Declare.
28582 * internal-fn.c (cond_binary_direct): New macro.
28583 (expand_cond_binary_optab_fn): Likewise.
28584 (direct_cond_binary_optab_supported_p): Likewise.
28585 (get_conditional_internal_fn): New function.
28586 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28587 Cope with reduction statements that are vectorized as calls rather
28589 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28590 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28591 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28592 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28593 (UNSPEC_COND_EOR): New unspecs.
28594 (optab): Add mappings for them.
28595 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28596 (sve_int_op, sve_fp_op): New int attributes.
28598 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28599 Alan Hayward <alan.hayward@arm.com>
28600 David Sherwood <david.sherwood@arm.com>
28602 * optabs.def (while_ult_optab): New optab.
28603 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28604 * internal-fn.def (WHILE_ULT): New internal function.
28605 * internal-fn.h (direct_internal_fn_supported_p): New override
28606 that takes two types as argument.
28607 * internal-fn.c (while_direct): New macro.
28608 (expand_while_optab_fn): New function.
28609 (convert_optab_supported_p): Likewise.
28610 (direct_while_optab_supported_p): New macro.
28611 * wide-int.h (wi::udiv_ceil): New function.
28612 * tree-vectorizer.h (rgroup_masks): New structure.
28613 (vec_loop_masks): New typedef.
28614 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28615 and fully_masked_p.
28616 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28617 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28618 (vect_max_vf): New function.
28619 (slpeel_make_loop_iterate_ntimes): Delete.
28620 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28621 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28622 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28623 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28624 internal-fn.h, stor-layout.h and optabs-query.h.
28625 (vect_set_loop_mask): New function.
28626 (add_preheader_seq): Likewise.
28627 (add_header_seq): Likewise.
28628 (interleave_supported_p): Likewise.
28629 (vect_maybe_permute_loop_masks): Likewise.
28630 (vect_set_loop_masks_directly): Likewise.
28631 (vect_set_loop_condition_masked): Likewise.
28632 (vect_set_loop_condition_unmasked): New function, split out from
28633 slpeel_make_loop_iterate_ntimes.
28634 (slpeel_make_loop_iterate_ntimes): Rename to..
28635 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28636 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28637 (vect_do_peeling): Update call accordingly.
28638 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28640 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28641 mask_compare_type, can_fully_mask_p and fully_masked_p.
28642 (release_vec_loop_masks): New function.
28643 (_loop_vec_info): Use it to free the loop masks.
28644 (can_produce_all_loop_masks_p): New function.
28645 (vect_get_max_nscalars_per_iter): Likewise.
28646 (vect_verify_full_masking): Likewise.
28647 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28648 retries, and free the mask rgroups before retrying. Check loop-wide
28649 reasons for disallowing fully-masked loops. Make the final decision
28650 about whether use a fully-masked loop or not.
28651 (vect_estimate_min_profitable_iters): Do not assume that peeling
28652 for the number of iterations will be needed for fully-masked loops.
28653 (vectorizable_reduction): Disable fully-masked loops.
28654 (vectorizable_live_operation): Likewise.
28655 (vect_halve_mask_nunits): New function.
28656 (vect_double_mask_nunits): Likewise.
28657 (vect_record_loop_mask): Likewise.
28658 (vect_get_loop_mask): Likewise.
28659 (vect_transform_loop): Handle the case in which the final loop
28660 iteration might handle a partial vector. Call vect_set_loop_condition
28661 instead of slpeel_make_loop_iterate_ntimes.
28662 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28663 (check_load_store_masking): New function.
28664 (prepare_load_store_mask): Likewise.
28665 (vectorizable_store): Handle fully-masked loops.
28666 (vectorizable_load): Likewise.
28667 (supportable_widening_operation): Use vect_halve_mask_nunits for
28669 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28670 (vect_gen_while): New function.
28671 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28672 (aarch64_uqdec<mode>): New insn.
28674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28675 Alan Hayward <alan.hayward@arm.com>
28676 David Sherwood <david.sherwood@arm.com>
28678 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28679 (reduc_xor_scal_optab): New optabs.
28680 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28681 (reduc_xor_scal_@var{m}): Document.
28682 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28683 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28684 internal functions.
28685 * fold-const-call.c (fold_const_call): Handle them.
28686 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28687 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28688 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28689 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28690 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28691 (UNSPEC_XORV): New unspecs.
28692 (optab): Add entries for them.
28693 (BITWISEV): New int iterator.
28694 (bit_reduc_op): New int attributes.
28696 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28697 Alan Hayward <alan.hayward@arm.com>
28698 David Sherwood <david.sherwood@arm.com>
28700 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28701 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28702 * optabs.def (vec_shl_insert_optab): New optab.
28703 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28704 (duplicate_and_interleave): Likewise.
28705 * tree-vect-loop.c: Include internal-fn.h.
28706 (neutral_op_for_slp_reduction): New function, split out from
28707 get_initial_defs_for_reduction.
28708 (get_initial_def_for_reduction): Handle option 2 for variable-length
28709 vectors by loading the neutral value into a vector and then shifting
28710 the initial value into element 0.
28711 (get_initial_defs_for_reduction): Replace the code argument with
28712 the neutral value calculated by neutral_op_for_slp_reduction.
28713 Use gimple_build_vector for constant-length vectors.
28714 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28715 but the first group_size elements have a neutral value.
28716 Use duplicate_and_interleave otherwise.
28717 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28718 Update call to get_initial_defs_for_reduction. Handle SLP
28719 reductions for variable-length vectors by creating one vector
28720 result for each scalar result, with the elements associated
28721 with other scalar results stubbed out with the neutral value.
28722 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28723 Require IFN_VEC_SHL_INSERT for double reductions on
28724 variable-length vectors, or SLP reductions that have
28725 a neutral value. Require can_duplicate_and_interleave_p
28726 support for variable-length unchained SLP reductions if there
28727 is no neutral value, such as for MIN/MAX reductions. Also require
28728 the number of vector elements to be a multiple of the number of
28729 SLP statements when doing variable-length unchained SLP reductions.
28730 Update call to vect_create_epilog_for_reduction.
28731 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28732 and remove initial values.
28733 (duplicate_and_interleave): Make public.
28734 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28735 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28738 Alan Hayward <alan.hayward@arm.com>
28739 David Sherwood <david.sherwood@arm.com>
28741 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28742 (can_duplicate_and_interleave_p): New function.
28743 (vect_get_and_check_slp_defs): Take the vector of statements
28744 rather than just the current one. Remove excess parentheses.
28745 Restriction rejectinon of vect_constant_def and vect_external_def
28746 for variable-length vectors to boolean types, or types for which
28747 can_duplicate_and_interleave_p is false.
28748 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28749 (duplicate_and_interleave): New function.
28750 (vect_get_constant_vectors): Use gimple_build_vector for
28751 constant-length vectors and suitable variable-length constant
28752 vectors. Use duplicate_and_interleave for other variable-length
28753 vectors. Don't defer the update when inserting new statements.
28755 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28756 Alan Hayward <alan.hayward@arm.com>
28757 David Sherwood <david.sherwood@arm.com>
28759 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28760 min_profitable_iters doesn't go negative.
28762 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28763 Alan Hayward <alan.hayward@arm.com>
28764 David Sherwood <david.sherwood@arm.com>
28766 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28767 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28768 * optabs.def (vec_mask_load_lanes_optab): New optab.
28769 (vec_mask_store_lanes_optab): Likewise.
28770 * internal-fn.def (MASK_LOAD_LANES): New internal function.
28771 (MASK_STORE_LANES): Likewise.
28772 * internal-fn.c (mask_load_lanes_direct): New macro.
28773 (mask_store_lanes_direct): Likewise.
28774 (expand_mask_load_optab_fn): Handle masked operations.
28775 (expand_mask_load_lanes_optab_fn): New macro.
28776 (expand_mask_store_optab_fn): Handle masked operations.
28777 (expand_mask_store_lanes_optab_fn): New macro.
28778 (direct_mask_load_lanes_optab_supported_p): Likewise.
28779 (direct_mask_store_lanes_optab_supported_p): Likewise.
28780 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28782 (vect_load_lanes_supported): Likewise.
28783 * tree-vect-data-refs.c (strip_conversion): New function.
28784 (can_group_stmts_p): Likewise.
28785 (vect_analyze_data_ref_accesses): Use it instead of checking
28786 for a pair of assignments.
28787 (vect_store_lanes_supported): Take a masked_p parameter.
28788 (vect_load_lanes_supported): Likewise.
28789 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28790 vect_store_lanes_supported and vect_load_lanes_supported.
28791 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28792 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28793 parameter. Don't allow gaps for masked accesses.
28794 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
28795 and vect_load_lanes_supported.
28796 (get_load_store_type): Take a masked_p parameter and update
28797 call to get_group_load_store_type.
28798 (vectorizable_store): Update call to get_load_store_type.
28799 Handle IFN_MASK_STORE_LANES.
28800 (vectorizable_load): Update call to get_load_store_type.
28801 Handle IFN_MASK_LOAD_LANES.
28803 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28804 Alan Hayward <alan.hayward@arm.com>
28805 David Sherwood <david.sherwood@arm.com>
28807 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28809 * config/aarch64/aarch64-protos.h
28810 (aarch64_sve_struct_memory_operand_p): Declare.
28811 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28812 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28813 (VPRED, vpred): Handle SVE structure modes.
28814 * config/aarch64/constraints.md (Utx): New constraint.
28815 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28816 (aarch64_sve_struct_nonimmediate_operand): New predicates.
28817 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28818 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28819 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28820 structure modes. Split into pieces after RA.
28821 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28822 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28824 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28825 SVE structure modes.
28826 (aarch64_classify_address): Likewise.
28827 (sizetochar): Move earlier in file.
28828 (aarch64_print_operand): Handle SVE register lists.
28829 (aarch64_array_mode): New function.
28830 (aarch64_sve_struct_memory_operand_p): Likewise.
28831 (TARGET_ARRAY_MODE): Redefine.
28833 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28834 Alan Hayward <alan.hayward@arm.com>
28835 David Sherwood <david.sherwood@arm.com>
28837 * target.def (array_mode): New target hook.
28838 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28839 * doc/tm.texi: Regenerate.
28840 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28841 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28842 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28843 targetm.array_mode.
28844 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28847 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28848 Alan Hayward <alan.hayward@arm.com>
28849 David Sherwood <david.sherwood@arm.com>
28851 * fold-const.c (fold_binary_loc): Check the argument types
28852 rather than the result type when testing for a vector operation.
28854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28856 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28857 * doc/tm.texi: Regenerate.
28859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28860 Alan Hayward <alan.hayward@arm.com>
28861 David Sherwood <david.sherwood@arm.com>
28863 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28864 (sve): Document new AArch64 extension.
28865 * doc/md.texi (w): Extend the description of the AArch64
28866 constraint to include SVE vectors.
28867 (Upl, Upa): Document new AArch64 predicate constraints.
28868 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28870 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28871 (msve-vector-bits=): New option.
28872 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28873 SVE when these are disabled.
28874 (sve): New extension.
28875 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28876 modes. Adjust their number of units based on aarch64_sve_vg.
28877 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28878 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28879 aarch64_addr_query_type.
28880 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28881 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28882 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28883 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28884 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28885 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28886 (aarch64_simd_imm_zero_p): Delete.
28887 (aarch64_check_zero_based_sve_index_immediate): Declare.
28888 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28889 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28890 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28891 (aarch64_sve_float_mul_immediate_p): Likewise.
28892 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28893 rather than an rtx.
28894 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28895 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28896 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28897 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28898 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28899 (aarch64_regmode_natural_size): Likewise.
28900 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28901 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28903 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28904 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28905 for VG and the SVE predicate registers.
28906 (V_ALIASES): Add a "z"-prefixed alias.
28907 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28908 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28909 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28910 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28911 (REG_CLASS_NAMES): Add entries for them.
28912 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
28913 and the predicate registers.
28914 (aarch64_sve_vg): Declare.
28915 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28916 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28917 (REGMODE_NATURAL_SIZE): Define.
28918 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28920 * config/aarch64/aarch64.c: Include cfgrtl.h.
28921 (simd_immediate_info): Add a constructor for series vectors,
28922 and an associated step field.
28923 (aarch64_sve_vg): New variable.
28924 (aarch64_dbx_register_number): Handle VG and the predicate registers.
28925 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28926 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28927 (VEC_ANY_DATA, VEC_STRUCT): New constants.
28928 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28929 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28930 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28931 (aarch64_get_mask_mode): New functions.
28932 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28933 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28934 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
28935 predicate modes and predicate registers. Explicitly restrict
28936 GPRs to modes of 16 bytes or smaller. Only allow FP registers
28937 to store a vector mode if it is recognized by
28938 aarch64_classify_vector_mode.
28939 (aarch64_regmode_natural_size): New function.
28940 (aarch64_hard_regno_caller_save_mode): Return the original mode
28942 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28943 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28944 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28945 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28947 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
28948 does not overlap dest if the function is frame-related. Handle
28950 (aarch64_split_add_offset): New function.
28951 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28952 them aarch64_add_offset.
28953 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28954 and update call to aarch64_sub_sp.
28955 (aarch64_add_cfa_expression): New function.
28956 (aarch64_expand_prologue): Pass extra temporary registers to the
28957 functions above. Handle the case in which we need to emit new
28958 DW_CFA_expressions for registers that were originally saved
28959 relative to the stack pointer, but now have to be expressed
28960 relative to the frame pointer.
28961 (aarch64_output_mi_thunk): Pass extra temporary registers to the
28963 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
28964 IP0 and IP1 values for SVE frames.
28965 (aarch64_expand_vec_series): New function.
28966 (aarch64_expand_sve_widened_duplicate): Likewise.
28967 (aarch64_expand_sve_const_vector): Likewise.
28968 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28969 Handle SVE constants. Use emit_move_insn to move a force_const_mem
28970 into the register, rather than emitting a SET directly.
28971 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28972 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28973 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28974 (offset_9bit_signed_scaled_p): New functions.
28975 (aarch64_replicate_bitmask_imm): New function.
28976 (aarch64_bitmask_imm): Use it.
28977 (aarch64_cannot_force_const_mem): Reject expressions involving
28978 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
28979 (aarch64_classify_index): Handle SVE indices, by requiring
28980 a plain register index with a scale that matches the element size.
28981 (aarch64_classify_address): Handle SVE addresses. Assert that
28982 the mode of the address is VOIDmode or an integer mode.
28983 Update call to aarch64_classify_symbol.
28984 (aarch64_classify_symbolic_expression): Update call to
28985 aarch64_classify_symbol.
28986 (aarch64_const_vec_all_in_range_p): New function.
28987 (aarch64_print_vector_float_operand): Likewise.
28988 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28989 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28990 and the FP immediates 1.0 and 0.5.
28991 (aarch64_print_address_internal): Handle SVE addresses.
28992 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28993 (aarch64_regno_regclass): Handle predicate registers.
28994 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28996 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28997 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28998 (aarch64_convert_sve_vector_bits): New function.
28999 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29000 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29001 rather than an rtx.
29002 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29003 Handle SVE vector and predicate modes. Accept VL-based constants
29004 that need only one temporary register, and VL offsets that require
29005 no temporary registers.
29006 (aarch64_conditional_register_usage): Mark the predicate registers
29007 as fixed if SVE isn't available.
29008 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29009 Return true for SVE vector and predicate modes.
29010 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29011 rather than an unsigned int. Handle SVE modes.
29012 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29014 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29016 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29017 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29018 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29019 (aarch64_sve_float_mul_immediate_p): New functions.
29020 (aarch64_sve_valid_immediate): New function.
29021 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29022 Explicitly reject structure modes. Check for INDEX constants.
29023 Handle PTRUE and PFALSE constants.
29024 (aarch64_check_zero_based_sve_index_immediate): New function.
29025 (aarch64_simd_imm_zero_p): Delete.
29026 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29027 vector modes. Accept constants in the range of CNT[BHWD].
29028 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29029 ask for an Advanced SIMD mode.
29030 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29031 (aarch64_simd_vector_alignment): Handle SVE predicates.
29032 (aarch64_vectorize_preferred_vector_alignment): New function.
29033 (aarch64_simd_vector_alignment_reachable): Use it instead of
29035 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29036 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29038 (MAX_VECT_LEN): Delete.
29039 (expand_vec_perm_d): Add a vec_flags field.
29040 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29041 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29042 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29044 (aarch64_evpc_rev): Rename to...
29045 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29046 (aarch64_evpc_rev_global): New function.
29047 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29048 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29050 (aarch64_evpc_sve_tbl): New function.
29051 (aarch64_expand_vec_perm_const_1): Update after rename of
29052 aarch64_evpc_rev. Handle SVE permutes too, trying
29053 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29054 than aarch64_evpc_tbl.
29055 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29056 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29057 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29058 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29059 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29060 (aarch64_expand_sve_vcond): New functions.
29061 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29062 of aarch64_vector_mode_p.
29063 (aarch64_dwarf_poly_indeterminate_value): New function.
29064 (aarch64_compute_pressure_classes): Likewise.
29065 (aarch64_can_change_mode_class): Likewise.
29066 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29067 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29068 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29069 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29070 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29071 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29072 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29073 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29075 (Dn, Dl, Dr): Accept const as well as const_vector.
29076 (Dz): Likewise. Compare against CONST0_RTX.
29077 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29078 of "vector" where appropriate.
29079 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29080 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29081 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29082 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29083 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29084 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29085 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29086 (v_int_equiv): Extend to SVE modes.
29087 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29089 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29090 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29091 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29092 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29093 (SVE_COND_FP_CMP): New int iterators.
29094 (perm_hilo): Handle the new unpack unspecs.
29095 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29097 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29098 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29099 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29100 (aarch64_equality_operator, aarch64_constant_vector_operand)
29101 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29102 (aarch64_sve_nonimmediate_operand): Likewise.
29103 (aarch64_sve_general_operand): Likewise.
29104 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29105 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29106 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29107 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29108 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29109 (aarch64_sve_float_arith_immediate): Likewise.
29110 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29111 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29112 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29113 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29114 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29115 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29116 (aarch64_sve_float_arith_operand): Likewise.
29117 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29118 (aarch64_sve_float_mul_operand): Likewise.
29119 (aarch64_sve_vec_perm_operand): Likewise.
29120 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29121 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29122 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29123 as well as const_vector.
29124 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29125 in file. Use CONST0_RTX and CONSTM1_RTX.
29126 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29127 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29128 Use aarch64_simd_imm_zero.
29129 * config/aarch64/aarch64-sve.md: New file.
29130 * config/aarch64/aarch64.md: Include it.
29131 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29132 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29133 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29134 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29135 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29136 (sve): New attribute.
29137 (enabled): Disable instructions with the sve attribute unless
29139 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29140 aarch64_expand_mov_immediate.
29141 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29142 CNT[BHSD] immediates.
29143 (movti): Split CONST_POLY_INT moves into two halves.
29144 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29145 Split additions that need a temporary here if the destination
29146 is the stack pointer.
29147 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29148 (*add<mode>3_poly_1): New instruction.
29149 (set_clobber_cc): New expander.
29151 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29153 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29154 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29155 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29156 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29157 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29158 Change innermode from fixed_mode_size to machine_mode.
29159 (simplify_subreg): Update call accordingly. Handle a constant-sized
29160 subreg of a variable-length CONST_VECTOR.
29162 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29163 Alan Hayward <alan.hayward@arm.com>
29164 David Sherwood <david.sherwood@arm.com>
29166 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29167 (add_offset_to_base): New function, split out from...
29168 (create_mem_ref): ...here. When handling a scale other than 1,
29169 check first whether the address is valid without the offset.
29170 Add it into the base if so, leaving the index and scale as-is.
29172 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29175 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29176 fold_for_warn before checking if arg2 is INTEGER_CST.
29178 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29180 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29181 (store_multiple_operation): Delete.
29182 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29183 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29184 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29185 guarded by TARGET_STRING.
29186 (rs6000_output_load_multiple): Delete.
29187 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29188 OPTION_MASK_STRING / TARGET_STRING handling.
29189 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29190 (const rs6000_opt_masks) <"string">: Change mask to 0.
29191 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29192 (MASK_STRING): Delete.
29193 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29195 (load_multiple): Delete.
29202 (store_multiple): Delete.
29209 (movmemsi_8reg): Delete.
29210 (corresponding unnamed define_insn): Delete.
29211 (movmemsi_6reg): Delete.
29212 (corresponding unnamed define_insn): Delete.
29213 (movmemsi_4reg): Delete.
29214 (corresponding unnamed define_insn): Delete.
29215 (movmemsi_2reg): Delete.
29216 (corresponding unnamed define_insn): Delete.
29217 (movmemsi_1reg): Delete.
29218 (corresponding unnamed define_insn): Delete.
29219 * config/rs6000/rs6000.opt (mno-string): New.
29220 (mstring): Replace by deprecation warning stub.
29221 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29223 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29225 * regrename.c (regrename_do_replace): If replacing the same
29226 reg multiple times, try to reuse last created gen_raw_REG.
29229 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29230 main to workaround a bug in GDB.
29232 2018-01-12 Tom de Vries <tom@codesourcery.com>
29235 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29237 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29239 PR rtl-optimization/80481
29240 * ira-color.c (get_cap_member): New function.
29241 (allocnos_conflict_by_live_ranges_p): Use it.
29242 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29243 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29245 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29248 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29249 (*saddl_se_1): Ditto.
29250 (*ssubsi_1): Ditto.
29251 (*ssubl_se_1): Ditto.
29253 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29255 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29256 rather than wi::to_widest for DR_INITs.
29257 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29258 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29259 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29261 (vect_analyze_group_access_1): Note that here.
29263 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29265 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29266 polynomial type sizes.
29268 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29270 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29271 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29272 (gimple_add_tmp_var): Likewise.
29274 2018-01-12 Martin Liska <mliska@suse.cz>
29276 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29277 (gimple_alloc_sizes): Likewise.
29278 (dump_gimple_statistics): Use PRIu64 in printf format.
29279 * gimple.h: Change uint64_t to int.
29281 2018-01-12 Martin Liska <mliska@suse.cz>
29283 * tree-core.h: Use uint64_t instead of int.
29284 * tree.c (tree_node_counts): Likewise.
29285 (tree_node_sizes): Likewise.
29286 (dump_tree_statistics): Use PRIu64 in printf format.
29288 2018-01-12 Martin Liska <mliska@suse.cz>
29290 * Makefile.in: As qsort_chk is implemented in vec.c, add
29291 vec.o to linkage of gencfn-macros.
29292 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29293 passing the info to record_node_allocation_statistics.
29294 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29296 * ggc-common.c (struct ggc_usage): Add operator== and use
29297 it in operator< and compare function.
29298 * mem-stats.h (struct mem_usage): Likewise.
29299 * vec.c (struct vec_usage): Remove operator< and compare
29300 function. Can be simply inherited.
29302 2018-01-12 Martin Jambor <mjambor@suse.cz>
29305 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29306 * tree-ssa-math-opts.c: Include domwalk.h.
29307 (convert_mult_to_fma_1): New function.
29308 (fma_transformation_info): New type.
29309 (fma_deferring_state): Likewise.
29310 (cancel_fma_deferring): New function.
29311 (result_of_phi): Likewise.
29312 (last_fma_candidate_feeds_initial_phi): Likewise.
29313 (convert_mult_to_fma): Added deferring logic, split actual
29314 transformation to convert_mult_to_fma_1.
29315 (math_opts_dom_walker): New type.
29316 (math_opts_dom_walker::after_dom_children): New method, body moved
29317 here from pass_optimize_widening_mul::execute, added deferring logic
29319 (pass_optimize_widening_mul::execute): Moved most of code to
29320 math_opts_dom_walker::after_dom_children.
29321 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29322 * config/i386/i386.c (ix86_option_override_internal): Added
29323 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29325 2018-01-12 Richard Biener <rguenther@suse.de>
29328 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29329 inline instance vars.
29331 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29334 * config/rx/rx.c (rx_is_restricted_memory_address):
29335 Handle SUBREG case.
29337 2018-01-12 Richard Biener <rguenther@suse.de>
29339 PR tree-optimization/80846
29340 * target.def (split_reduction): New target hook.
29341 * targhooks.c (default_split_reduction): New function.
29342 * targhooks.h (default_split_reduction): Declare.
29343 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29344 target requests first reduce vectors by combining low and high
29346 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29347 (get_vectype_for_scalar_type_and_size): Export.
29348 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29349 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29350 * doc/tm.texi: Regenerate.
29351 * config/i386/i386.c (ix86_split_reduction): Implement
29352 TARGET_VECTORIZE_SPLIT_REDUCTION.
29354 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29357 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29358 in PIC mode except for TARGET_VXWORKS_RTP.
29359 * config/sparc/sparc.c: Include cfgrtl.h.
29360 (TARGET_INIT_PIC_REG): Define.
29361 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29362 (sparc_pic_register_p): New predicate.
29363 (sparc_legitimate_address_p): Use it.
29364 (sparc_legitimize_pic_address): Likewise.
29365 (sparc_delegitimize_address): Likewise.
29366 (sparc_mode_dependent_address_p): Likewise.
29367 (gen_load_pcrel_sym): Remove 4th parameter.
29368 (load_got_register): Adjust call to above. Remove obsolete stuff.
29369 (sparc_expand_prologue): Do not call load_got_register here.
29370 (sparc_flat_expand_prologue): Likewise.
29371 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29372 (sparc_use_pseudo_pic_reg): New function.
29373 (sparc_init_pic_reg): Likewise.
29374 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29375 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29377 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29379 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29380 Add item for branch_cost.
29382 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29384 PR rtl-optimization/83565
29385 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29386 not extend the result to a larger mode for rotate operations.
29387 (num_sign_bit_copies1): Likewise.
29389 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29392 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29394 Use values-Xc.o for -pedantic.
29395 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29397 2018-01-12 Martin Liska <mliska@suse.cz>
29400 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29402 (possible_polymorphic_call_targets): Use it.
29403 (ipa_devirt): Likewise.
29405 2018-01-12 Martin Liska <mliska@suse.cz>
29407 * profile-count.h (enum profile_quality): Use 0 as invalid
29408 enum value of profile_quality.
29410 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29412 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29413 -mext-string options.
29415 2018-01-12 Richard Biener <rguenther@suse.de>
29417 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29418 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29419 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29421 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29423 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29425 * configure.ac (--with-long-double-format): Add support for the
29426 configuration option to change the default long double format on
29428 * config.gcc (powerpc*-linux*-*): Likewise.
29429 * configure: Regenerate.
29430 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29431 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29432 used without modification.
29434 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29436 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29437 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29438 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29439 MISC_BUILTIN_SPEC_BARRIER.
29440 (rs6000_init_builtins): Likewise.
29441 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29443 (speculation_barrier): New define_insn.
29444 * doc/extend.texi: Document __builtin_speculation_barrier.
29446 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29449 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29450 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29451 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29453 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29454 integral modes instead of "ss" and "sd".
29455 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29456 vectors with 32-bit and 64-bit elements.
29457 (vecdupssescalarmodesuffix): New mode attribute.
29458 (vec_dup<mode>): Use it.
29460 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29463 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29464 frame if argument is passed on stack.
29466 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29469 * ree.c (combine_reaching_defs): Optimize also
29470 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29471 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29473 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29475 PR middle-end/83189
29476 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29478 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29480 PR middle-end/83718
29481 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29482 after they are computed.
29484 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29486 PR tree-optimization/83695
29487 * gimple-loop-linterchange.cc
29488 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29489 reset cached scev information after interchange.
29490 (pass_linterchange::execute): Remove call to scev_reset_htab.
29492 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29494 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29495 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29496 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29497 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29498 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29499 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29500 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29501 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29502 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29503 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29504 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29505 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29506 (V_lane_reg): Likewise.
29507 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29509 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29510 (vfmal_lane_low<mode>_intrinsic,
29511 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29512 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29513 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29514 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29515 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29516 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29518 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29520 * config/arm/arm-cpus.in (fp16fml): New feature.
29521 (ALL_SIMD): Add fp16fml.
29522 (armv8.2-a): Add fp16fml as an option.
29523 (armv8.3-a): Likewise.
29524 (armv8.4-a): Add fp16fml as part of fp16.
29525 * config/arm/arm.h (TARGET_FP16FML): Define.
29526 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29528 * config/arm/arm-modes.def (V2HF): Define.
29529 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29530 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29531 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29532 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29533 vfmsl_low, vfmsl_high): New set of builtins.
29534 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29535 (vfml_op): New code attribute.
29536 (VFMLHALVES): New int iterator.
29537 (VFML, VFMLSEL): New mode attributes.
29538 (V_reg): Define mapping for V2HF.
29539 (V_hi, V_lo): New mode attributes.
29540 (VF_constraint): Likewise.
29541 (vfml_half, vfml_half_selector): New int attributes.
29542 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29544 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29545 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29547 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29548 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29549 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29550 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29552 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29553 Document new effective target and option set.
29555 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29557 * config/arm/arm-cpus.in (armv8_4): New feature.
29558 (ARMv8_4a): New fgroup.
29559 (armv8.4-a): New arch.
29560 * config/arm/arm-tables.opt: Regenerate.
29561 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29562 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29563 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29564 Add matching rules for -march=armv8.4-a and extensions.
29565 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29567 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29570 * config/rx/rx.md (BW): New mode attribute.
29571 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29573 2018-01-11 Richard Biener <rguenther@suse.de>
29575 PR tree-optimization/83435
29576 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29577 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29578 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29580 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29581 Alan Hayward <alan.hayward@arm.com>
29582 David Sherwood <david.sherwood@arm.com>
29584 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29586 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29587 (aarch64_print_address_internal): Use it to check for a zero offset.
29589 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29590 Alan Hayward <alan.hayward@arm.com>
29591 David Sherwood <david.sherwood@arm.com>
29593 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29594 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29595 Return a poly_int64 rather than a HOST_WIDE_INT.
29596 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29597 rather than a HOST_WIDE_INT.
29598 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29599 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29600 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29601 final_offset from HOST_WIDE_INT to poly_int64.
29602 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29603 to_constant when getting the number of units in an Advanced SIMD
29605 (aarch64_builtin_vectorized_function): Check for a constant number
29607 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29609 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29610 attribute instead of GET_MODE_NUNITS.
29611 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29612 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29613 GET_MODE_SIZE for fixed-size registers.
29614 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29615 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29616 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29617 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29618 (aarch64_print_operand, aarch64_print_address_internal)
29619 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29620 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29621 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29622 Handle polynomial GET_MODE_SIZE.
29623 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29624 wider than SImode without modification.
29625 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29626 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29627 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29628 passing and returning SVE modes.
29629 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29630 rather than GEN_INT.
29631 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29632 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29633 (aarch64_allocate_and_probe_stack_space): Likewise.
29634 (aarch64_layout_frame): Cope with polynomial offsets.
29635 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29636 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29637 polynomial offsets.
29638 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29639 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29640 poly_int64 rather than a HOST_WIDE_INT.
29641 (aarch64_get_separate_components, aarch64_process_components)
29642 (aarch64_expand_prologue, aarch64_expand_epilogue)
29643 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29644 (aarch64_anchor_offset): New function, split out from...
29645 (aarch64_legitimize_address): ...here.
29646 (aarch64_builtin_vectorization_cost): Handle polynomial
29647 TYPE_VECTOR_SUBPARTS.
29648 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29650 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29651 number of elements from the PARALLEL rather than the mode.
29652 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29653 rather than GET_MODE_BITSIZE.
29654 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29655 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29656 (aarch64_expand_vec_perm_const_1): Handle polynomial
29657 d->perm.length () and d->perm elements.
29658 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29659 Apply to_constant to d->perm elements.
29660 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29661 polynomial CONST_VECTOR_NUNITS.
29662 (aarch64_move_pointer): Take amount as a poly_int64 rather
29664 (aarch64_progress_pointer): Avoid temporary variable.
29665 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29666 the mode attribute instead of GET_MODE.
29668 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29669 Alan Hayward <alan.hayward@arm.com>
29670 David Sherwood <david.sherwood@arm.com>
29672 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29673 x exists before using it.
29674 (aarch64_add_constant_internal): Rename to...
29675 (aarch64_add_offset_1): ...this. Replace regnum with separate
29676 src and dest rtxes. Handle the case in which they're different,
29677 including when the offset is zero. Replace scratchreg with an rtx.
29678 Use 2 additions if there is no spare register into which we can
29679 move a 16-bit constant.
29680 (aarch64_add_constant): Delete.
29681 (aarch64_add_offset): Replace reg with separate src and dest
29682 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29683 Use aarch64_add_offset_1.
29684 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29685 an rtx rather than an int. Take the delta as a poly_int64
29686 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29687 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29688 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29689 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29690 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29691 and aarch64_add_sp.
29692 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29693 aarch64_add_constant.
29695 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29697 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29698 Use scalar_float_mode.
29700 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29702 * config/aarch64/aarch64-simd.md
29703 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29704 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29705 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29706 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29707 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29708 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29709 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29710 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29711 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29712 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29714 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29717 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29718 targ_options->x_arm_arch_string is non NULL.
29720 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29722 * config/aarch64/aarch64.h
29723 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29725 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29728 * expmed.c (emit_store_flag_force): Swap if const op0
29729 and change VOIDmode to mode of op0.
29731 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29733 PR rtl-optimization/83761
29734 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29735 than bytes to mode_for_size.
29737 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29739 PR middle-end/83189
29740 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29741 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29744 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29746 PR middle-end/83575
29747 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29748 when in layout mode.
29749 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29750 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29753 2018-01-10 Michael Collison <michael.collison@arm.com>
29755 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29756 * config/aarch64/aarch64-option-extension.def: Add
29757 AARCH64_OPT_EXTENSION of 'fp16fml'.
29758 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29759 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29760 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29761 * config/aarch64/constraints.md (Ui7): New constraint.
29762 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29763 (VFMLA_SEL_W): Ditto.
29766 (VFMLA16_LOW): New int iterator.
29767 (VFMLA16_HIGH): Ditto.
29768 (UNSPEC_FMLAL): New unspec.
29769 (UNSPEC_FMLSL): Ditto.
29770 (UNSPEC_FMLAL2): Ditto.
29771 (UNSPEC_FMLSL2): Ditto.
29772 (f16mac): New code attribute.
29773 * config/aarch64/aarch64-simd-builtins.def
29774 (aarch64_fmlal_lowv2sf): Ditto.
29775 (aarch64_fmlsl_lowv2sf): Ditto.
29776 (aarch64_fmlalq_lowv4sf): Ditto.
29777 (aarch64_fmlslq_lowv4sf): Ditto.
29778 (aarch64_fmlal_highv2sf): Ditto.
29779 (aarch64_fmlsl_highv2sf): Ditto.
29780 (aarch64_fmlalq_highv4sf): Ditto.
29781 (aarch64_fmlslq_highv4sf): Ditto.
29782 (aarch64_fmlal_lane_lowv2sf): Ditto.
29783 (aarch64_fmlsl_lane_lowv2sf): Ditto.
29784 (aarch64_fmlal_laneq_lowv2sf): Ditto.
29785 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29786 (aarch64_fmlalq_lane_lowv4sf): Ditto.
29787 (aarch64_fmlsl_lane_lowv4sf): Ditto.
29788 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29789 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29790 (aarch64_fmlal_lane_highv2sf): Ditto.
29791 (aarch64_fmlsl_lane_highv2sf): Ditto.
29792 (aarch64_fmlal_laneq_highv2sf): Ditto.
29793 (aarch64_fmlsl_laneq_highv2sf): Ditto.
29794 (aarch64_fmlalq_lane_highv4sf): Ditto.
29795 (aarch64_fmlsl_lane_highv4sf): Ditto.
29796 (aarch64_fmlalq_laneq_highv4sf): Ditto.
29797 (aarch64_fmlsl_laneq_highv4sf): Ditto.
29798 * config/aarch64/aarch64-simd.md:
29799 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29800 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29801 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29802 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29803 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29804 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29805 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29806 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29807 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29808 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29809 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29810 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29811 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29812 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29813 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29814 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29815 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29816 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29817 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29818 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29819 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29820 (vfmlsl_low_u32): Ditto.
29821 (vfmlalq_low_u32): Ditto.
29822 (vfmlslq_low_u32): Ditto.
29823 (vfmlal_high_u32): Ditto.
29824 (vfmlsl_high_u32): Ditto.
29825 (vfmlalq_high_u32): Ditto.
29826 (vfmlslq_high_u32): Ditto.
29827 (vfmlal_lane_low_u32): Ditto.
29828 (vfmlsl_lane_low_u32): Ditto.
29829 (vfmlal_laneq_low_u32): Ditto.
29830 (vfmlsl_laneq_low_u32): Ditto.
29831 (vfmlalq_lane_low_u32): Ditto.
29832 (vfmlslq_lane_low_u32): Ditto.
29833 (vfmlalq_laneq_low_u32): Ditto.
29834 (vfmlslq_laneq_low_u32): Ditto.
29835 (vfmlal_lane_high_u32): Ditto.
29836 (vfmlsl_lane_high_u32): Ditto.
29837 (vfmlal_laneq_high_u32): Ditto.
29838 (vfmlsl_laneq_high_u32): Ditto.
29839 (vfmlalq_lane_high_u32): Ditto.
29840 (vfmlslq_lane_high_u32): Ditto.
29841 (vfmlalq_laneq_high_u32): Ditto.
29842 (vfmlslq_laneq_high_u32): Ditto.
29843 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29844 (AARCH64_FL_FOR_ARCH8_4): New.
29845 (AARCH64_ISA_F16FML): New ISA flag.
29846 (TARGET_F16FML): New feature flag for fp16fml.
29847 (doc/invoke.texi): Document new fp16fml option.
29849 2018-01-10 Michael Collison <michael.collison@arm.com>
29851 * config/aarch64/aarch64-builtins.c:
29852 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29853 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29854 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29855 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29856 (AARCH64_ISA_SHA3): New ISA flag.
29857 (TARGET_SHA3): New feature flag for sha3.
29858 * config/aarch64/iterators.md (sha512_op): New int attribute.
29859 (CRYPTO_SHA512): New int iterator.
29860 (UNSPEC_SHA512H): New unspec.
29861 (UNSPEC_SHA512H2): Ditto.
29862 (UNSPEC_SHA512SU0): Ditto.
29863 (UNSPEC_SHA512SU1): Ditto.
29864 * config/aarch64/aarch64-simd-builtins.def
29865 (aarch64_crypto_sha512hqv2di): New builtin.
29866 (aarch64_crypto_sha512h2qv2di): Ditto.
29867 (aarch64_crypto_sha512su0qv2di): Ditto.
29868 (aarch64_crypto_sha512su1qv2di): Ditto.
29869 (aarch64_eor3qv8hi): Ditto.
29870 (aarch64_rax1qv2di): Ditto.
29871 (aarch64_xarqv2di): Ditto.
29872 (aarch64_bcaxqv8hi): Ditto.
29873 * config/aarch64/aarch64-simd.md:
29874 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29875 (aarch64_crypto_sha512su0qv2di): Ditto.
29876 (aarch64_crypto_sha512su1qv2di): Ditto.
29877 (aarch64_eor3qv8hi): Ditto.
29878 (aarch64_rax1qv2di): Ditto.
29879 (aarch64_xarqv2di): Ditto.
29880 (aarch64_bcaxqv8hi): Ditto.
29881 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29882 (vsha512h2q_u64): Ditto.
29883 (vsha512su0q_u64): Ditto.
29884 (vsha512su1q_u64): Ditto.
29885 (veor3q_u16): Ditto.
29886 (vrax1q_u64): Ditto.
29887 (vxarq_u64): Ditto.
29888 (vbcaxq_u16): Ditto.
29889 * config/arm/types.md (crypto_sha512): New type attribute.
29890 (crypto_sha3): Ditto.
29891 (doc/invoke.texi): Document new sha3 option.
29893 2018-01-10 Michael Collison <michael.collison@arm.com>
29895 * config/aarch64/aarch64-builtins.c:
29896 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29897 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29898 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29899 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29900 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29901 (AARCH64_ISA_SM4): New ISA flag.
29902 (TARGET_SM4): New feature flag for sm4.
29903 * config/aarch64/aarch64-simd-builtins.def
29904 (aarch64_sm3ss1qv4si): Ditto.
29905 (aarch64_sm3tt1aq4si): Ditto.
29906 (aarch64_sm3tt1bq4si): Ditto.
29907 (aarch64_sm3tt2aq4si): Ditto.
29908 (aarch64_sm3tt2bq4si): Ditto.
29909 (aarch64_sm3partw1qv4si): Ditto.
29910 (aarch64_sm3partw2qv4si): Ditto.
29911 (aarch64_sm4eqv4si): Ditto.
29912 (aarch64_sm4ekeyqv4si): Ditto.
29913 * config/aarch64/aarch64-simd.md:
29914 (aarch64_sm3ss1qv4si): Ditto.
29915 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29916 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29917 (aarch64_sm4eqv4si): Ditto.
29918 (aarch64_sm4ekeyqv4si): Ditto.
29919 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29920 (sm3part_op): Ditto.
29921 (CRYPTO_SM3TT): Ditto.
29922 (CRYPTO_SM3PART): Ditto.
29923 (UNSPEC_SM3SS1): New unspec.
29924 (UNSPEC_SM3TT1A): Ditto.
29925 (UNSPEC_SM3TT1B): Ditto.
29926 (UNSPEC_SM3TT2A): Ditto.
29927 (UNSPEC_SM3TT2B): Ditto.
29928 (UNSPEC_SM3PARTW1): Ditto.
29929 (UNSPEC_SM3PARTW2): Ditto.
29930 (UNSPEC_SM4E): Ditto.
29931 (UNSPEC_SM4EKEY): Ditto.
29932 * config/aarch64/constraints.md (Ui2): New constraint.
29933 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29934 * config/arm/types.md (crypto_sm3): New type attribute.
29935 (crypto_sm4): Ditto.
29936 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29937 (vsm3tt1aq_u32): Ditto.
29938 (vsm3tt1bq_u32): Ditto.
29939 (vsm3tt2aq_u32): Ditto.
29940 (vsm3tt2bq_u32): Ditto.
29941 (vsm3partw1q_u32): Ditto.
29942 (vsm3partw2q_u32): Ditto.
29943 (vsm4eq_u32): Ditto.
29944 (vsm4ekeyq_u32): Ditto.
29945 (doc/invoke.texi): Document new sm4 option.
29947 2018-01-10 Michael Collison <michael.collison@arm.com>
29949 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29950 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29951 (AARCH64_FL_FOR_ARCH8_4): New.
29952 (AARCH64_FL_V8_4): New flag.
29953 (doc/invoke.texi): Document new armv8.4-a option.
29955 2018-01-10 Michael Collison <michael.collison@arm.com>
29957 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29958 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29959 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29960 * config/aarch64/aarch64-option-extension.def: Add
29961 AARCH64_OPT_EXTENSION of 'sha2'.
29962 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29963 (crypto): Disable sha2 and aes if crypto disabled.
29964 (crypto): Enable aes and sha2 if enabled.
29965 (simd): Disable sha2 and aes if simd disabled.
29966 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29968 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29969 (TARGET_SHA2): New feature flag for sha2.
29970 (TARGET_AES): New feature flag for aes.
29971 * config/aarch64/aarch64-simd.md:
29972 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29973 conditional on TARGET_AES.
29974 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29975 (aarch64_crypto_sha1hsi): Make pattern conditional
29977 (aarch64_crypto_sha1hv4si): Ditto.
29978 (aarch64_be_crypto_sha1hv4si): Ditto.
29979 (aarch64_crypto_sha1su1v4si): Ditto.
29980 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29981 (aarch64_crypto_sha1su0v4si): Ditto.
29982 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29983 (aarch64_crypto_sha256su0v4si): Ditto.
29984 (aarch64_crypto_sha256su1v4si): Ditto.
29985 (doc/invoke.texi): Document new aes and sha2 options.
29987 2018-01-10 Martin Sebor <msebor@redhat.com>
29989 PR tree-optimization/83781
29990 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29993 2018-01-11 Martin Sebor <msebor@gmail.com>
29994 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29996 PR tree-optimization/83501
29997 PR tree-optimization/81703
29999 * tree-ssa-strlen.c (get_string_cst): Rename...
30000 (get_string_len): ...to this. Handle global constants.
30001 (handle_char_store): Adjust.
30003 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30004 Jim Wilson <jimw@sifive.com>
30006 * config/riscv/riscv-protos.h (riscv_output_return): New.
30007 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30008 (riscv_attribute_table, riscv_output_return),
30009 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30010 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30011 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30013 (riscv_expand_prologue): Add early return for naked function.
30014 (riscv_expand_epilogue): Likewise.
30015 (riscv_function_ok_for_sibcall): Return false for naked function.
30016 (riscv_set_current_function): New.
30017 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30018 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30019 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30020 * doc/extend.texi (RISC-V Function Attributes): New.
30022 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30024 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30025 check for 128-bit long double before checking TCmode.
30026 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30027 128-bit long doubles before checking TFmode or TCmode.
30028 (FLOAT128_IBM_P): Likewise.
30030 2018-01-10 Martin Sebor <msebor@redhat.com>
30032 PR tree-optimization/83671
30033 * builtins.c (c_strlen): Unconditionally return zero for the empty
30035 Use -Warray-bounds for warnings.
30036 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30037 for non-constant array indices with COMPONENT_REF, arrays of
30038 arrays, and pointers to arrays.
30039 (gimple_fold_builtin_strlen): Determine and set length range for
30040 non-constant character arrays.
30042 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30044 PR middle-end/81897
30045 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30048 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30050 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30052 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30055 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30056 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30057 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30058 indexed_or_indirect_operand predicate.
30059 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30060 (*vsx_le_perm_load_v8hi): Likewise.
30061 (*vsx_le_perm_load_v16qi): Likewise.
30062 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30063 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30064 (*vsx_le_perm_store_v8hi): Likewise.
30065 (*vsx_le_perm_store_v16qi): Likewise.
30066 (eight unnamed splitters): Likewise.
30068 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30070 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30071 * config/rs6000/emmintrin.h: Likewise.
30072 * config/rs6000/mmintrin.h: Likewise.
30073 * config/rs6000/xmmintrin.h: Likewise.
30075 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30078 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30080 * tree.c (tree_nop_conversion): Return true for location wrapper
30082 (maybe_wrap_with_location): New function.
30083 (selftest::check_strip_nops): New function.
30084 (selftest::test_location_wrappers): New function.
30085 (selftest::tree_c_tests): Call it.
30086 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30087 (maybe_wrap_with_location): New decl.
30088 (EXPR_LOCATION_WRAPPER_P): New macro.
30089 (location_wrapper_p): New inline function.
30090 (tree_strip_any_location_wrapper): New inline function.
30092 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30095 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30096 stack_realign_offset for the largest alignment of stack slot
30098 (ix86_find_max_used_stack_alignment): New function.
30099 (ix86_finalize_stack_frame_flags): Use it. Set
30100 max_used_stack_alignment if we don't realign stack.
30101 * config/i386/i386.h (machine_function): Add
30102 max_used_stack_alignment.
30104 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30106 * config/arm/arm.opt (-mbranch-cost): New option.
30107 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30110 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30113 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30114 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30116 2018-01-10 Richard Biener <rguenther@suse.de>
30119 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30120 early out so it also covers the case where we have a non-NULL
30123 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30125 PR tree-optimization/83753
30126 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30127 for non-strided grouped accesses if the number of elements is 1.
30129 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30132 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30133 * i386.h (TARGET_USE_GATHER): Define.
30134 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30136 2018-01-10 Martin Liska <mliska@suse.cz>
30139 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30140 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30142 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30143 CLEANUP_NO_PARTITIONING is not set.
30145 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30147 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30148 for vectors, as a partial revert of r254296.
30149 * rtl.h (const_vec_p): Delete.
30150 (const_vec_duplicate_p): Don't test for vector CONSTs.
30151 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30152 * expmed.c (make_tree): Likewise.
30155 * common.md (E, F): Use CONSTANT_P instead of checking for
30157 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30158 checking for CONST_VECTOR.
30160 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30162 PR middle-end/83575
30163 * predict.c (force_edge_cold): Handle in more sane way edges
30164 with no prediction.
30166 2018-01-09 Carl Love <cel@us.ibm.com>
30168 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30170 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30171 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30172 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30173 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30174 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30175 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30176 * config/rs6000/rs6000-protos.h: Add extern defition for
30177 rs6000_generate_float2_double_code.
30178 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30180 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30181 (float2_v2df): Add define_expand.
30183 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30186 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30187 op_mode in the force_to_mode call.
30189 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30191 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30192 instead of checking each element individually.
30193 (aarch64_evpc_uzp): Likewise.
30194 (aarch64_evpc_zip): Likewise.
30195 (aarch64_evpc_ext): Likewise.
30196 (aarch64_evpc_rev): Likewise.
30197 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30198 instead of checking each element individually. Return true without
30200 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30201 whether all selected elements come from the same input, instead of
30202 checking each element individually. Remove calls to gen_rtx_REG,
30203 start_sequence and end_sequence and instead assert that no rtl is
30206 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30208 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30209 order of HIGH and CONST checks.
30211 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30213 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30214 if the destination isn't an SSA_NAME.
30216 2018-01-09 Richard Biener <rguenther@suse.de>
30218 PR tree-optimization/83668
30219 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30221 (canonicalize_loop_form): ... here, renamed from ...
30222 (canonicalize_loop_closed_ssa_form): ... this and amended to
30223 swap successor edges for loop exit blocks to make us use
30224 the RPO order we need for initial schedule generation.
30226 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30228 PR tree-optimization/64811
30229 * match.pd: When optimizing comparisons with Inf, avoid
30230 introducing or losing exceptions from comparisons with NaN.
30232 2018-01-09 Martin Liska <mliska@suse.cz>
30235 * asan.c (shadow_mem_size): Add gcc_assert.
30237 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30239 Don't save registers in main().
30242 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30243 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30244 * config/avr/avr.c (avr_set_current_function): Don't error if
30245 naked, OS_task or OS_main are specified at the same time.
30246 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30248 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30250 * common/config/avr/avr-common.c (avr_option_optimization_table):
30251 Switch on -mmain-is-OS_task for optimizing compilations.
30253 2018-01-09 Richard Biener <rguenther@suse.de>
30255 PR tree-optimization/83572
30256 * graphite.c: Include cfganal.h.
30257 (graphite_transform_loops): Connect infinite loops to exit
30258 and remove fake edges at the end.
30260 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30262 * ipa-inline.c (edge_badness): Revert accidental checkin.
30264 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30267 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30268 symbols; not inline clones.
30270 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30273 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30274 hard registers. Formatting fixes.
30276 PR preprocessor/83722
30277 * gcc.c (try_generate_repro): Pass
30278 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30279 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30282 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30283 Kito Cheng <kito.cheng@gmail.com>
30285 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30286 (riscv_leaf_function_p): Delete.
30287 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30289 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30291 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30293 (do_ifelse): New function.
30294 (do_isel): New function.
30295 (do_sub3): New function.
30296 (do_add3): New function.
30297 (do_load_mask_compare): New function.
30298 (do_overlap_load_compare): New function.
30299 (expand_compare_loop): New function.
30300 (expand_block_compare): Call expand_compare_loop() when appropriate.
30301 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30302 option description.
30303 (-mblock-compare-inline-loop-limit): New option.
30305 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30308 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30309 Reverse order of second and third operands in first alternative.
30310 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30311 of first and second elements in UNSPEC_VPERMR vector.
30312 (altivec_expand_vec_perm_le): Likewise.
30314 2018-01-08 Jeff Law <law@redhat.com>
30316 PR rtl-optimizatin/81308
30317 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30318 (process_switch): If group_case_labels makes a change, then set
30320 (pass_convert_switch::execute): If a switch is converted, then
30321 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30323 PR rtl-optimization/81308
30324 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30327 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30329 PR target/83663 - Revert r255946
30330 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30331 generation for cases where splatting a value is not useful.
30332 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30333 across a vec_duplicate and a paradoxical subreg forming a vector
30334 mode to a vec_concat.
30336 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30338 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30339 -march=armv8.3-a variants.
30340 * config/arm/t-multilib: Likewise.
30341 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30343 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30345 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30347 (cceq_ior_compare_complement): Give it a name so I can use it, and
30348 change boolean_or_operator predicate to boolean_operator so it can
30349 be used to generate a crand.
30350 (eqne): New code iterator.
30351 (bd/bd_neg): New code_attrs.
30352 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30353 a single define_insn.
30354 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30355 decrement (bdnzt/bdnzf/bdzt/bdzf).
30356 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30357 with the new names of the branch decrement patterns, and added the
30358 names of the branch decrement conditional patterns.
30360 2018-01-08 Richard Biener <rguenther@suse.de>
30362 PR tree-optimization/83563
30363 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30366 2018-01-08 Richard Biener <rguenther@suse.de>
30368 PR middle-end/83713
30369 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30371 2018-01-08 Richard Biener <rguenther@suse.de>
30373 PR tree-optimization/83685
30374 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30375 references to abnormals.
30377 2018-01-08 Richard Biener <rguenther@suse.de>
30380 * dwarf2out.c (output_indirect_strings): Handle empty
30381 skeleton_debug_str_hash.
30382 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30384 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30386 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30387 (emit_store_direct): Likewise.
30388 (arc_trampoline_adjust_address): Likewise.
30389 (arc_asm_trampoline_template): New function.
30390 (arc_initialize_trampoline): Use asm_trampoline_template.
30391 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30392 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30393 * config/arc/arc.md (flush_icache): Delete pattern.
30395 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30397 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30398 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30401 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30404 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30405 by not USED_FOR_TARGET.
30406 (make_pass_resolve_sw_modes): Likewise.
30408 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30410 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30413 2018-01-08 Richard Biener <rguenther@suse.de>
30415 PR middle-end/83580
30416 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30418 2018-01-08 Richard Biener <rguenther@suse.de>
30420 PR middle-end/83517
30421 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30423 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30425 PR middle-end/81897
30426 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30427 basic blocks with a small number of successors.
30428 (convert_control_dep_chain_into_preds): Improve handling of
30430 (dump_predicates): Split apart into...
30431 (dump_pred_chain): ...here...
30432 (dump_pred_info): ...and here.
30433 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30434 (can_chain_union_be_invalidated_p): Improve check for invalidation
30436 (uninit_uses_cannot_happen): Avoid unnecessary if
30437 convert_control_dep_chain_into_preds yielded nothing.
30439 2018-01-06 Martin Sebor <msebor@redhat.com>
30441 PR tree-optimization/83640
30442 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30443 subtracting negative offset from size.
30444 (builtin_access::overlap): Adjust offset bounds of the access to fall
30445 within the size of the object if possible.
30447 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30449 PR rtl-optimization/83699
30450 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30451 extract_bit_field_as_subreg to cases in which the extracted
30452 value is also a vector.
30454 * lra-constraints.c (process_alt_operands): Test for the equivalence
30455 substitutions when detecting a possible reload cycle.
30457 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30460 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30461 by default if flag_selective_schedling{,2}. Formatting fixes.
30463 PR rtl-optimization/83682
30464 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30465 if it has non-VECTOR_MODE element mode.
30466 (vec_duplicate_p): Likewise.
30468 PR middle-end/83694
30469 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30470 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30472 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30475 * config/i386/i386-builtin.def
30476 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30477 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30478 Require also OPTION_MASK_ISA_AVX512F in addition to
30479 OPTION_MASK_ISA_GFNI.
30480 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30481 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30482 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30483 to OPTION_MASK_ISA_GFNI.
30484 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30485 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30486 OPTION_MASK_ISA_AVX512BW.
30487 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30488 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30489 addition to OPTION_MASK_ISA_GFNI.
30490 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30491 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30492 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30493 to OPTION_MASK_ISA_GFNI.
30494 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30495 a requirement for all ISAs rather than any of them with a few
30497 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30499 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30500 bitmasks to be enabled with 3 exceptions, instead of requiring any
30501 enabled ISA with lots of exceptions.
30502 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30503 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30504 Change avx512bw in isa attribute to avx512f.
30505 * config/i386/sgxintrin.h: Add license boilerplate.
30506 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30507 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30508 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30509 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30511 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30512 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30513 temporarily sse2 rather than sse if not enabled already.
30516 * config/i386/sse.md (VI248_VLBW): Rename to ...
30517 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30518 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30519 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30520 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30521 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30522 mode iterator instead of VI248_VLBW.
30524 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30526 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30527 (record_modified): Skip clobbers; add debug output.
30528 (param_change_prob): Use sreal frequencies.
30530 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30532 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30533 punt for user-aligned variables.
30535 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30537 * tree-chrec.c (chrec_contains_symbols): Return true for
30540 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30543 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30544 of (x|y) == x for BICS pattern.
30546 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30548 PR tree-optimization/83605
30549 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30550 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30553 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30555 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30556 * config/epiphany/rtems.h: New file.
30558 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30559 Uros Bizjak <ubizjak@gmail.com>
30562 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30563 QIreg_operand instead of register_operand predicate.
30564 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30565 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30566 comments instead of -fmitigate[-_]rop.
30568 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30571 * cgraphunit.c (symbol_table::compile): Switch to text_section
30572 before calling assembly_start debug hook.
30573 * run-rtl-passes.c (run_rtl_passes): Likewise.
30576 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30578 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30579 range_int_cst_p rather than !symbolic_range_p before calling
30580 extract_range_from_multiplicative_op_1.
30582 2018-01-04 Jeff Law <law@redhat.com>
30584 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30585 redundant test in assertion.
30587 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30589 * doc/rtl.texi: Document machine_mode wrapper classes.
30591 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30593 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30594 using tree_to_uhwi.
30596 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30598 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30599 the VEC_PERM_EXPR fold to fail.
30601 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30604 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30605 to switched_sections.
30607 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30610 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30611 test for d.testing.
30613 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30616 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30617 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30619 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30622 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30623 is BLKmode and bitpos not zero or mode change is needed.
30625 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30628 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30631 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30634 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30635 instead of MULT rtx. Update all corresponding splitters.
30636 (*saddl_se): Ditto.
30637 (*ssub<modesuffix>): Ditto.
30638 (*ssubl_se): Ditto.
30639 (*cmp_sadd_di): Update split patterns.
30640 (*cmp_sadd_si): Ditto.
30641 (*cmp_sadd_sidi): Ditto.
30642 (*cmp_ssub_di): Ditto.
30643 (*cmp_ssub_si): Ditto.
30644 (*cmp_ssub_sidi): Ditto.
30645 * config/alpha/predicates.md (const23_operand): New predicate.
30646 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30647 Look for ASHIFT, not MULT inner operand.
30648 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30650 2018-01-04 Martin Liska <mliska@suse.cz>
30652 PR gcov-profile/83669
30653 * gcov.c (output_intermediate_file): Add version to intermediate
30655 * doc/gcov.texi: Document new field 'version' in intermediate
30656 file format. Fix location of '-k' option of gcov command.
30658 2018-01-04 Martin Liska <mliska@suse.cz>
30661 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30663 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30665 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30667 2018-01-03 Martin Sebor <msebor@redhat.com>
30669 PR tree-optimization/83655
30670 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30671 checking calls with invalid arguments.
30673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30675 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30676 (vectorizable_mask_load_store): Delete.
30677 (vectorizable_call): Return false for masked loads and stores.
30678 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30679 instead of gimple_assign_rhs1.
30680 (vectorizable_load): Handle IFN_MASK_LOAD.
30681 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30685 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30687 (vectorizable_mask_load_store): ...here.
30688 (vectorizable_load): ...and here.
30690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30692 * tree-vect-stmts.c (vect_build_all_ones_mask)
30693 (vect_build_zero_merge_argument): New functions, split out from...
30694 (vectorizable_load): ...here.
30696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30698 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30700 (vectorizable_mask_load_store): ...here.
30701 (vectorizable_store): ...and here.
30703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30705 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30707 (vectorizable_mask_load_store): ...here.
30709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30711 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30712 (vect_model_store_cost): Take a vec_load_store_type instead of a
30714 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30715 (vect_model_store_cost): Take a vec_load_store_type instead of a
30717 (vectorizable_mask_load_store): Update accordingly.
30718 (vectorizable_store): Likewise.
30719 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30723 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30724 IFN_MASK_LOAD calls here rather than...
30725 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30728 Alan Hayward <alan.hayward@arm.com>
30729 David Sherwood <david.sherwood@arm.com>
30731 * expmed.c (extract_bit_field_1): For vector extracts,
30732 fall back to extract_bit_field_as_subreg if vec_extract
30735 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30736 Alan Hayward <alan.hayward@arm.com>
30737 David Sherwood <david.sherwood@arm.com>
30739 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30740 they are variable or constant sized.
30741 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30742 slots for constant-sized data.
30744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30745 Alan Hayward <alan.hayward@arm.com>
30746 David Sherwood <david.sherwood@arm.com>
30748 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30749 handling COND_EXPRs with boolean comparisons, try to find a better
30750 basis for the mask type than the boolean itself.
30752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30754 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30755 is calculated and how it can be overridden.
30756 * genmodes.c (max_bitsize_mode_any_mode): New variable.
30757 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30759 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30763 Alan Hayward <alan.hayward@arm.com>
30764 David Sherwood <david.sherwood@arm.com>
30766 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30767 Remove the mode argument.
30768 (aarch64_simd_valid_immediate): Remove the mode and inverse
30770 * config/aarch64/iterators.md (bitsize): New iterator.
30771 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30772 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30773 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30774 aarch64_simd_valid_immediate.
30775 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30776 (aarch64_reg_or_bic_imm): Likewise.
30777 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30778 with an insn_type enum and msl with a modifier_type enum.
30779 Replace element_width with a scalar_mode. Change the shift
30780 to unsigned int. Add constructors for scalar_float_mode and
30781 scalar_int_mode elements.
30782 (aarch64_vect_float_const_representable_p): Delete.
30783 (aarch64_can_const_movi_rtx_p)
30784 (aarch64_simd_scalar_immediate_valid_for_move)
30785 (aarch64_simd_make_constant): Update call to
30786 aarch64_simd_valid_immediate.
30787 (aarch64_advsimd_valid_immediate_hs): New function.
30788 (aarch64_advsimd_valid_immediate): Likewise.
30789 (aarch64_simd_valid_immediate): Remove mode and inverse
30790 arguments. Rewrite to use the above. Use const_vec_duplicate_p
30791 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30792 and aarch64_float_const_representable_p on the result.
30793 (aarch64_output_simd_mov_immediate): Remove mode argument.
30794 Update call to aarch64_simd_valid_immediate and use of
30795 simd_immediate_info.
30796 (aarch64_output_scalar_simd_mov_immediate): Update call
30799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30800 Alan Hayward <alan.hayward@arm.com>
30801 David Sherwood <david.sherwood@arm.com>
30803 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30804 (mode_nunits): Likewise CONST_MODE_NUNITS.
30805 * machmode.def (ADJUST_NUNITS): Document.
30806 * genmodes.c (mode_data::need_nunits_adj): New field.
30807 (blank_mode): Update accordingly.
30808 (adj_nunits): New variable.
30809 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30811 (emit_mode_size_inline): Set need_bytesize_adj for all modes
30812 listed in adj_nunits.
30813 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30814 listed in adj_nunits. Don't emit case statements for such modes.
30815 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30816 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
30817 nothing if adj_nunits is nonnull.
30818 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30819 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30820 (emit_mode_fbit): Update use of print_maybe_const_decl.
30821 (emit_move_size): Likewise. Treat the array as non-const
30823 (emit_mode_adjustments): Handle adj_nunits.
30825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30827 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30828 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30829 (VECTOR_MODES): Use it.
30830 (make_vector_modes): Take the prefix as an argument.
30832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30833 Alan Hayward <alan.hayward@arm.com>
30834 David Sherwood <david.sherwood@arm.com>
30836 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30837 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30838 for MODE_VECTOR_BOOL.
30839 * machmode.def (VECTOR_BOOL_MODE): Document.
30840 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30841 (make_vector_bool_mode): New function.
30842 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30844 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30845 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30847 * stor-layout.c (int_mode_for_mode): Likewise.
30848 * tree.c (build_vector_type_for_mode): Likewise.
30849 * varasm.c (output_constant_pool_2): Likewise.
30850 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30851 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30852 for MODE_VECTOR_BOOL.
30853 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30854 of mode class checks.
30855 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30856 instead of a list of mode class checks.
30857 (expand_vector_scalar_condition): Likewise.
30858 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30861 Alan Hayward <alan.hayward@arm.com>
30862 David Sherwood <david.sherwood@arm.com>
30864 * machmode.h (mode_size): Change from unsigned short to
30866 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30867 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30868 or if measurement_type is not polynomial.
30869 (fixed_size_mode::includes_p): Check for constant-sized modes.
30870 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30871 return a poly_uint16 rather than an unsigned short.
30872 (emit_mode_size): Change the type of mode_size from unsigned short
30873 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30874 (emit_mode_adjustments): Cope with polynomial vector sizes.
30875 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30877 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30879 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30880 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30881 * caller-save.c (setup_save_areas): Likewise.
30882 (replace_reg_with_saved_mem): Likewise.
30883 * calls.c (emit_library_call_value_1): Likewise.
30884 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30885 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30886 (gen_lowpart_for_combine): Likewise.
30887 * convert.c (convert_to_integer_1): Likewise.
30888 * cse.c (equiv_constant, cse_insn): Likewise.
30889 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30890 (cselib_subst_to_values): Likewise.
30891 * dce.c (word_dce_process_block): Likewise.
30892 * df-problems.c (df_word_lr_mark_ref): Likewise.
30893 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30894 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30895 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30896 (rtl_for_decl_location): Likewise.
30897 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30898 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30899 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30900 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30901 (expand_expr_real_1): Likewise.
30902 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30903 (pad_below): Likewise.
30904 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30905 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30906 * ira.c (get_subreg_tracking_sizes): Likewise.
30907 * ira-build.c (ira_create_allocno_objects): Likewise.
30908 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30909 (ira_sort_regnos_for_alter_reg): Likewise.
30910 * ira-costs.c (record_operand_costs): Likewise.
30911 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30912 (resolve_simple_move): Likewise.
30913 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30914 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30915 (lra_constraints): Likewise.
30916 (CONST_POOL_OK_P): Reject variable-sized modes.
30917 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30918 (add_pseudo_to_slot, lra_spill): Likewise.
30919 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30920 * optabs-query.c (get_best_extraction_insn): Likewise.
30921 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30922 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30923 (expand_mult_highpart, valid_multiword_target_p): Likewise.
30924 * recog.c (offsettable_address_addr_space_p): Likewise.
30925 * regcprop.c (maybe_mode_change): Likewise.
30926 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30927 * regrename.c (build_def_use): Likewise.
30928 * regstat.c (dump_reg_info): Likewise.
30929 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30930 (find_reloads, find_reloads_subreg_address): Likewise.
30931 * reload1.c (eliminate_regs_1): Likewise.
30932 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30933 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30934 (simplify_binary_operation_1, simplify_subreg): Likewise.
30935 * targhooks.c (default_function_arg_padding): Likewise.
30936 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30937 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30938 (verify_gimple_assign_ternary): Likewise.
30939 * tree-inline.c (estimate_move_cost): Likewise.
30940 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30941 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30942 (get_address_cost_ainc): Likewise.
30943 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30944 (vect_supportable_dr_alignment): Likewise.
30945 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30946 (vectorizable_reduction): Likewise.
30947 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30948 (vectorizable_operation, vectorizable_load): Likewise.
30949 * tree.c (build_same_sized_truth_vector_type): Likewise.
30950 * valtrack.c (cleanup_auto_inc_dec): Likewise.
30951 * var-tracking.c (emit_note_insn_var_location): Likewise.
30952 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30953 (ADDR_VEC_ALIGN): Likewise.
30955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30956 Alan Hayward <alan.hayward@arm.com>
30957 David Sherwood <david.sherwood@arm.com>
30959 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30961 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30962 or if measurement_type is polynomial.
30963 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30964 * combine.c (make_extraction): Likewise.
30965 * dse.c (find_shift_sequence): Likewise.
30966 * dwarf2out.c (mem_loc_descriptor): Likewise.
30967 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30968 (extract_bit_field, extract_low_bits): Likewise.
30969 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30970 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30971 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30972 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30973 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30974 * reload.c (find_reloads): Likewise.
30975 * reload1.c (alter_reg): Likewise.
30976 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30977 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30978 * tree-if-conv.c (predicate_mem_writes): Likewise.
30979 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30980 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30981 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30982 * valtrack.c (dead_debug_insert_temp): Likewise.
30983 * varasm.c (mergeable_constant_section): Likewise.
30984 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30987 Alan Hayward <alan.hayward@arm.com>
30988 David Sherwood <david.sherwood@arm.com>
30990 * expr.c (expand_assignment): Cope with polynomial mode sizes
30991 when assigning to a CONCAT.
30993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30994 Alan Hayward <alan.hayward@arm.com>
30995 David Sherwood <david.sherwood@arm.com>
30997 * machmode.h (mode_precision): Change from unsigned short to
30999 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31001 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31002 or if measurement_type is not polynomial.
31003 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31004 in which the mode is already known to be a scalar_int_mode.
31005 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31006 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31008 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31009 for GET_MODE_PRECISION.
31010 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31011 for GET_MODE_PRECISION.
31012 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31014 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31015 (expand_field_assignment, make_extraction): Likewise.
31016 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31017 (get_last_value): Likewise.
31018 * convert.c (convert_to_integer_1): Likewise.
31019 * cse.c (cse_insn): Likewise.
31020 * expr.c (expand_expr_real_1): Likewise.
31021 * lra-constraints.c (simplify_operand_subreg): Likewise.
31022 * optabs-query.c (can_atomic_load_p): Likewise.
31023 * optabs.c (expand_atomic_load): Likewise.
31024 (expand_atomic_store): Likewise.
31025 * ree.c (combine_reaching_defs): Likewise.
31026 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31027 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31028 * tree.h (type_has_mode_precision_p): Likewise.
31029 * ubsan.c (instrument_si_overflow): Likewise.
31031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31032 Alan Hayward <alan.hayward@arm.com>
31033 David Sherwood <david.sherwood@arm.com>
31035 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31036 polynomial numbers of units.
31037 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31038 (valid_vector_subparts_p): New function.
31039 (build_vector_type): Remove temporary shim and take the number
31040 of units as a poly_uint64 rather than an int.
31041 (build_opaque_vector_type): Take the number of units as a
31042 poly_uint64 rather than an int.
31043 * tree.c (build_vector_from_ctor): Handle polynomial
31044 TYPE_VECTOR_SUBPARTS.
31045 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31046 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31047 (build_vector_from_val): If the number of units is variable,
31048 use build_vec_duplicate_cst for constant operands and
31049 VEC_DUPLICATE_EXPR otherwise.
31050 (make_vector_type): Remove temporary is_constant ().
31051 (build_vector_type, build_opaque_vector_type): Take the number of
31052 units as a poly_uint64 rather than an int.
31053 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31055 * cfgexpand.c (expand_debug_expr): Likewise.
31056 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31057 (store_constructor, expand_expr_real_1): Likewise.
31058 (const_scalar_mask_from_tree): Likewise.
31059 * fold-const-call.c (fold_const_reduction): Likewise.
31060 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31061 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31062 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31063 (fold_relational_const): Likewise.
31064 (native_interpret_vector): Likewise. Change the size from an
31065 int to an unsigned int.
31066 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31067 TYPE_VECTOR_SUBPARTS.
31068 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31069 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31070 duplicating a non-constant operand into a variable-length vector.
31071 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31072 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31073 * ipa-icf.c (sem_variable::equals): Likewise.
31074 * match.pd: Likewise.
31075 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31076 * print-tree.c (print_node): Likewise.
31077 * stor-layout.c (layout_type): Likewise.
31078 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31079 * tree-cfg.c (verify_gimple_comparison): Likewise.
31080 (verify_gimple_assign_binary): Likewise.
31081 (verify_gimple_assign_ternary): Likewise.
31082 (verify_gimple_assign_single): Likewise.
31083 * tree-pretty-print.c (dump_generic_node): Likewise.
31084 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31085 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31086 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31087 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31088 (vect_shift_permute_load_chain): Likewise.
31089 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31090 (expand_vector_condition, optimize_vector_constructor): Likewise.
31091 (lower_vec_perm, get_compute_type): Likewise.
31092 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31093 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31094 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31095 (vect_recog_mask_conversion_pattern): Likewise.
31096 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31097 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31098 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31099 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31100 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31101 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31102 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31103 (supportable_widening_operation): Likewise.
31104 (supportable_narrowing_operation): Likewise.
31105 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31107 * varasm.c (output_constant): Likewise.
31109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31110 Alan Hayward <alan.hayward@arm.com>
31111 David Sherwood <david.sherwood@arm.com>
31113 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31114 so that both the length == 3 and length != 3 cases set up their
31115 own permute vectors. Add comments explaining why we know the
31116 number of elements is constant.
31117 (vect_permute_load_chain): Likewise.
31119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31120 Alan Hayward <alan.hayward@arm.com>
31121 David Sherwood <david.sherwood@arm.com>
31123 * machmode.h (mode_nunits): Change from unsigned char to
31125 (ONLY_FIXED_SIZE_MODES): New macro.
31126 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31127 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31128 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31130 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31131 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31132 or if measurement_type is not polynomial.
31133 * genmodes.c (ZERO_COEFFS): New macro.
31134 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31136 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31137 Use ZERO_COEFFS when emitting initializers.
31138 * data-streamer.h (bp_pack_poly_value): New function.
31139 (bp_unpack_poly_value): Likewise.
31140 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31141 for GET_MODE_NUNITS.
31142 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31143 for GET_MODE_NUNITS.
31144 * tree.c (make_vector_type): Remove temporary shim and make
31145 the real function take the number of units as a poly_uint64
31146 rather than an int.
31147 (build_vector_type_for_mode): Handle polynomial nunits.
31148 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31149 * emit-rtl.c (const_vec_series_p_1): Likewise.
31150 (gen_rtx_CONST_VECTOR): Likewise.
31151 * fold-const.c (test_vec_duplicate_folding): Likewise.
31152 * genrecog.c (validate_pattern): Likewise.
31153 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31154 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31155 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31156 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31157 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31158 * rtlanal.c (subreg_get_info): Likewise.
31159 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31160 (vect_grouped_load_supported): Likewise.
31161 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31162 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31163 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31164 (simplify_const_unary_operation, simplify_binary_operation_1)
31165 (simplify_const_binary_operation, simplify_ternary_operation)
31166 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31167 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31168 instead of CONST_VECTOR_NUNITS.
31169 * varasm.c (output_constant_pool_2): Likewise.
31170 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31171 explicit-encoded elements in the XVEC for variable-length vectors.
31173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31175 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31178 Alan Hayward <alan.hayward@arm.com>
31179 David Sherwood <david.sherwood@arm.com>
31181 * coretypes.h (fixed_size_mode): Declare.
31182 (fixed_size_mode_pod): New typedef.
31183 * builtins.h (target_builtins::x_apply_args_mode)
31184 (target_builtins::x_apply_result_mode): Change type to
31185 fixed_size_mode_pod.
31186 * builtins.c (apply_args_size, apply_result_size, result_vector)
31187 (expand_builtin_apply_args_1, expand_builtin_apply)
31188 (expand_builtin_return): Update accordingly.
31190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31192 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31193 * cselib.c (cselib_hash_rtx): Likewise.
31194 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31195 CONST_VECTOR encoding.
31197 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31198 Jeff Law <law@redhat.com>
31201 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31202 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31203 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31204 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31207 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31208 explicitly probe *sp in a noreturn function if there were any callee
31209 register saves or frame pointer is needed.
31211 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31214 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31215 BLKmode for ternary, binary or unary expressions.
31218 * var-tracking.c (delete_vta_debug_insn): New inline function.
31219 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31220 insns from get_insns () to NULL instead of each bb separately.
31221 Use delete_vta_debug_insn. No longer static.
31222 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31223 delete_vta_debug_insns callers.
31224 * rtl.h (delete_vta_debug_insns): Declare.
31225 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31226 instead of variable_tracking_main.
31228 2018-01-03 Martin Sebor <msebor@redhat.com>
31230 PR tree-optimization/83603
31231 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31232 arguments past the endof the argument list in functions declared
31233 without a prototype.
31234 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31235 Avoid checking when arguments are null.
31237 2018-01-03 Martin Sebor <msebor@redhat.com>
31240 * doc/extend.texi (attribute const): Fix a typo.
31241 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31242 issuing -Wsuggest-attribute for void functions.
31244 2018-01-03 Martin Sebor <msebor@redhat.com>
31246 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31247 offset_int::from instead of wide_int::to_shwi.
31248 (maybe_diag_overlap): Remove assertion.
31249 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31250 * gimple-ssa-sprintf.c (format_directive): Same.
31251 (parse_directive): Same.
31252 (sprintf_dom_walker::compute_format_length): Same.
31253 (try_substitute_return_value): Same.
31255 2018-01-03 Jeff Law <law@redhat.com>
31257 PR middle-end/83654
31258 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31259 non-constant residual for zero at runtime and avoid probing in
31260 that case. Reorganize code for trailing problem to mirror handling
31263 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31265 PR tree-optimization/83501
31266 * tree-ssa-strlen.c (get_string_cst): New.
31267 (handle_char_store): Call get_string_cst.
31269 2018-01-03 Martin Liska <mliska@suse.cz>
31271 PR tree-optimization/83593
31272 * tree-ssa-strlen.c: Include tree-cfg.h.
31273 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31274 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31275 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31277 (strlen_dom_walker::before_dom_children): Call
31278 gimple_purge_dead_eh_edges. Dump tranformation with details
31280 (strlen_dom_walker::before_dom_children): Update call by adding
31281 new argument cleanup_eh.
31282 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31284 2018-01-03 Martin Liska <mliska@suse.cz>
31287 * cif-code.def (VARIADIC_THUNK): New enum value.
31288 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31291 2018-01-03 Jan Beulich <jbeulich@suse.com>
31293 * sse.md (mov<mode>_internal): Tighten condition for when to use
31294 vmovdqu<ssescalarsize> for TI and OI modes.
31296 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31298 Update copyright years.
31300 2018-01-03 Martin Liska <mliska@suse.cz>
31303 * ipa-visibility.c (function_and_variable_visibility): Skip
31304 functions with noipa attribure.
31306 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31308 * gcc.c (process_command): Update copyright notice dates.
31309 * gcov-dump.c (print_version): Ditto.
31310 * gcov.c (print_version): Ditto.
31311 * gcov-tool.c (print_version): Ditto.
31312 * gengtype.c (create_file): Ditto.
31313 * doc/cpp.texi: Bump @copying's copyright year.
31314 * doc/cppinternals.texi: Ditto.
31315 * doc/gcc.texi: Ditto.
31316 * doc/gccint.texi: Ditto.
31317 * doc/gcov.texi: Ditto.
31318 * doc/install.texi: Ditto.
31319 * doc/invoke.texi: Ditto.
31321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31323 * vector-builder.h (vector_builder::m_full_nelts): Change from
31324 unsigned int to poly_uint64.
31325 (vector_builder::full_nelts): Update prototype accordingly.
31326 (vector_builder::new_vector): Likewise.
31327 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31328 (vector_builder::operator ==): Likewise.
31329 (vector_builder::finalize): Likewise.
31330 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31331 Take the number of elements as a poly_uint64 rather than an
31333 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31334 from unsigned int to poly_uint64.
31335 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31336 (vec_perm_indices::new_vector): Likewise.
31337 (vec_perm_indices::length): Likewise.
31338 (vec_perm_indices::nelts_per_input): Likewise.
31339 (vec_perm_indices::input_nelts): Likewise.
31340 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31341 number of elements per input as a poly_uint64 rather than an
31342 unsigned int. Use the original encoding for variable-length
31343 vectors, rather than clamping each individual element.
31344 For the second and subsequent elements in each pattern,
31345 clamp the step and base before clamping their sum.
31346 (vec_perm_indices::series_p): Handle polynomial element counts.
31347 (vec_perm_indices::all_in_range_p): Likewise.
31348 (vec_perm_indices_to_tree): Likewise.
31349 (vec_perm_indices_to_rtx): Likewise.
31350 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31351 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31352 (tree_vector_builder::new_binary_operation): Handle polynomial
31353 element counts. Return false if we need to know the number
31354 of elements at compile time.
31355 * fold-const.c (fold_vec_perm): Punt if the number of elements
31356 isn't known at compile time.
31358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31360 * vec-perm-indices.h (vec_perm_builder): Change element type
31361 from HOST_WIDE_INT to poly_int64.
31362 (vec_perm_indices::element_type): Update accordingly.
31363 (vec_perm_indices::clamp): Handle polynomial element_types.
31364 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31365 (vec_perm_indices::all_in_range_p): Likewise.
31366 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31368 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31369 polynomial vec_perm_indices element types.
31370 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31371 * fold-const.c (fold_vec_perm): Likewise.
31372 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31373 * tree-vect-generic.c (lower_vec_perm): Likewise.
31374 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31375 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31376 element type to HOST_WIDE_INT.
31378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31379 Alan Hayward <alan.hayward@arm.com>
31380 David Sherwood <david.sherwood@arm.com>
31382 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31383 rather than an int. Use plus_constant.
31384 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31385 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31388 Alan Hayward <alan.hayward@arm.com>
31389 David Sherwood <david.sherwood@arm.com>
31391 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31392 a HOST_WIDE_INT to a poly_int64.
31394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31395 Alan Hayward <alan.hayward@arm.com>
31396 David Sherwood <david.sherwood@arm.com>
31398 * calls.c (load_register_parameters): Cope with polynomial
31399 mode sizes. Require a constant size for BLKmode parameters
31400 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31401 forces a parameter to be padded at the lsb end in order to
31402 fill a complete number of words, require the parameter size
31403 to be ordered wrt UNITS_PER_WORD.
31405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31406 Alan Hayward <alan.hayward@arm.com>
31407 David Sherwood <david.sherwood@arm.com>
31409 * reload1.c (spill_stack_slot_width): Change element type
31410 from unsigned int to poly_uint64_pod.
31411 (alter_reg): Treat mode sizes as polynomial.
31413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31414 Alan Hayward <alan.hayward@arm.com>
31415 David Sherwood <david.sherwood@arm.com>
31417 * reload.c (complex_word_subreg_p): New function.
31418 (reload_inner_reg_of_subreg, push_reload): Use it.
31420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31421 Alan Hayward <alan.hayward@arm.com>
31422 David Sherwood <david.sherwood@arm.com>
31424 * lra-constraints.c (process_alt_operands): Reject matched
31425 operands whose sizes aren't ordered.
31426 (match_reload): Refer to this check here.
31428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31429 Alan Hayward <alan.hayward@arm.com>
31430 David Sherwood <david.sherwood@arm.com>
31432 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31433 that the mode size is in the set {1, 2, 4, 8, 16}.
31435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31436 Alan Hayward <alan.hayward@arm.com>
31437 David Sherwood <david.sherwood@arm.com>
31439 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31440 Use plus_constant instead of gen_rtx_PLUS.
31442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31443 Alan Hayward <alan.hayward@arm.com>
31444 David Sherwood <david.sherwood@arm.com>
31446 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31447 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31448 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31449 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31450 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31451 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31452 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31453 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31454 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31455 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31457 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31458 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31459 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31460 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31461 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31462 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31463 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31464 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31465 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31466 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31468 * expr.c (emit_move_resolve_push): Treat the input and result
31469 of PUSH_ROUNDING as a poly_int64.
31470 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31471 (emit_push_insn): Likewise.
31472 * lra-eliminations.c (mark_not_eliminable): Likewise.
31473 * recog.c (push_operand): Likewise.
31474 * reload1.c (elimination_effects): Likewise.
31475 * rtlanal.c (nonzero_bits1): Likewise.
31476 * calls.c (store_one_arg): Likewise. Require the padding to be
31477 known at compile time.
31479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31480 Alan Hayward <alan.hayward@arm.com>
31481 David Sherwood <david.sherwood@arm.com>
31483 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31484 Use plus_constant instead of gen_rtx_PLUS.
31486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31487 Alan Hayward <alan.hayward@arm.com>
31488 David Sherwood <david.sherwood@arm.com>
31490 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31491 rather than an int.
31493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31494 Alan Hayward <alan.hayward@arm.com>
31495 David Sherwood <david.sherwood@arm.com>
31497 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31498 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31499 via stack temporaries. Treat the mode size as polynomial too.
31501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31502 Alan Hayward <alan.hayward@arm.com>
31503 David Sherwood <david.sherwood@arm.com>
31505 * expr.c (expand_expr_real_2): When handling conversions involving
31506 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31507 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31508 as a poly_uint64 too.
31510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31511 Alan Hayward <alan.hayward@arm.com>
31512 David Sherwood <david.sherwood@arm.com>
31514 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31517 Alan Hayward <alan.hayward@arm.com>
31518 David Sherwood <david.sherwood@arm.com>
31520 * combine.c (can_change_dest_mode): Handle polynomial
31521 REGMODE_NATURAL_SIZE.
31522 * expmed.c (store_bit_field_1): Likewise.
31523 * expr.c (store_constructor): Likewise.
31524 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31525 and polynomial REGMODE_NATURAL_SIZE.
31526 (gen_lowpart_common): Likewise.
31527 * reginfo.c (record_subregs_of_mode): Likewise.
31528 * rtlanal.c (read_modify_subreg_p): Likewise.
31530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31531 Alan Hayward <alan.hayward@arm.com>
31532 David Sherwood <david.sherwood@arm.com>
31534 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31535 numbers of elements.
31537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31538 Alan Hayward <alan.hayward@arm.com>
31539 David Sherwood <david.sherwood@arm.com>
31541 * match.pd: Cope with polynomial numbers of vector elements.
31543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31544 Alan Hayward <alan.hayward@arm.com>
31545 David Sherwood <david.sherwood@arm.com>
31547 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31548 in a POINTER_PLUS_EXPR.
31550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31551 Alan Hayward <alan.hayward@arm.com>
31552 David Sherwood <david.sherwood@arm.com>
31554 * omp-simd-clone.c (simd_clone_subparts): New function.
31555 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31556 (ipa_simd_modify_function_body): Likewise.
31558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31559 Alan Hayward <alan.hayward@arm.com>
31560 David Sherwood <david.sherwood@arm.com>
31562 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31563 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31564 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31565 (expand_vector_condition, vector_element): Likewise.
31566 (subparts_gt): New function.
31567 (get_compute_type): Use subparts_gt.
31568 (count_type_subparts): Delete.
31569 (expand_vector_operations_1): Use subparts_gt instead of
31570 count_type_subparts.
31572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31573 Alan Hayward <alan.hayward@arm.com>
31574 David Sherwood <david.sherwood@arm.com>
31576 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31577 (vect_compile_time_alias): ...this new function. Do the calculation
31578 on poly_ints rather than trees.
31579 (vect_prune_runtime_alias_test_list): Update call accordingly.
31581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31582 Alan Hayward <alan.hayward@arm.com>
31583 David Sherwood <david.sherwood@arm.com>
31585 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31587 (vect_schedule_slp_instance): Likewise.
31589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31590 Alan Hayward <alan.hayward@arm.com>
31591 David Sherwood <david.sherwood@arm.com>
31593 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31594 constant and extern definitions for variable-length vectors.
31595 (vect_get_constant_vectors): Note that the number of units
31596 is known to be constant.
31598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31599 Alan Hayward <alan.hayward@arm.com>
31600 David Sherwood <david.sherwood@arm.com>
31602 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31603 of units as polynomial. Choose between WIDE and NARROW based
31606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31607 Alan Hayward <alan.hayward@arm.com>
31608 David Sherwood <david.sherwood@arm.com>
31610 * tree-vect-stmts.c (simd_clone_subparts): New function.
31611 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31614 Alan Hayward <alan.hayward@arm.com>
31615 David Sherwood <david.sherwood@arm.com>
31617 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31618 vectors as polynomial. Use build_index_vector for
31619 IFN_GOMP_SIMD_LANE.
31621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31622 Alan Hayward <alan.hayward@arm.com>
31623 David Sherwood <david.sherwood@arm.com>
31625 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31626 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31627 for variable-length vectors.
31628 (vectorizable_mask_load_store): Treat the number of units as
31629 polynomial, asserting that it is constant if the condition has
31630 already been enforced.
31631 (vectorizable_store, vectorizable_load): Likewise.
31633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31634 Alan Hayward <alan.hayward@arm.com>
31635 David Sherwood <david.sherwood@arm.com>
31637 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31638 of units as polynomial. Punt if we can't tell at compile time
31639 which vector contains the final result.
31641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31642 Alan Hayward <alan.hayward@arm.com>
31643 David Sherwood <david.sherwood@arm.com>
31645 * tree-vect-loop.c (vectorizable_induction): Treat the number
31646 of units as polynomial. Punt on SLP inductions. Use an integer
31647 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31648 cast of such a series for variable-length floating-point
31651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31652 Alan Hayward <alan.hayward@arm.com>
31653 David Sherwood <david.sherwood@arm.com>
31655 * tree.h (build_index_vector): Declare.
31656 * tree.c (build_index_vector): New function.
31657 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31658 of units as polynomial, forcibly converting it to a constant if
31659 vectorizable_reduction has already enforced the condition.
31660 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31661 to create a {1,2,3,...} vector.
31662 (vectorizable_reduction): Treat the number of units as polynomial.
31663 Choose vectype_in based on the largest scalar element size rather
31664 than the smallest number of units. Enforce the restrictions
31667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31668 Alan Hayward <alan.hayward@arm.com>
31669 David Sherwood <david.sherwood@arm.com>
31671 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31672 number of units as polynomial.
31674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31675 Alan Hayward <alan.hayward@arm.com>
31676 David Sherwood <david.sherwood@arm.com>
31678 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31679 * target.def (autovectorize_vector_sizes): Return the vector sizes
31680 by pointer, using vector_sizes rather than a bitmask.
31681 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31682 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31683 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31685 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31686 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31687 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31688 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31689 * omp-general.c (omp_max_vf): Likewise.
31690 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31691 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31692 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31693 * tree-vect-slp.c (vect_slp_bb): Likewise.
31694 * doc/tm.texi: Regenerate.
31695 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31697 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31698 the vector size as a poly_uint64 rather than an unsigned int.
31699 (current_vector_size): Change from an unsigned int to a poly_uint64.
31700 (get_vectype_for_scalar_type): Update accordingly.
31701 * tree.h (build_truth_vector_type): Take the size and number of
31702 units as a poly_uint64 rather than an unsigned int.
31703 (build_vector_type): Add a temporary overload that takes
31704 the number of units as a poly_uint64 rather than an unsigned int.
31705 * tree.c (make_vector_type): Likewise.
31706 (build_truth_vector_type): Take the number of units as a poly_uint64
31707 rather than an unsigned int.
31709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31710 Alan Hayward <alan.hayward@arm.com>
31711 David Sherwood <david.sherwood@arm.com>
31713 * target.def (get_mask_mode): Take the number of units and length
31714 as poly_uint64s rather than unsigned ints.
31715 * targhooks.h (default_get_mask_mode): Update accordingly.
31716 * targhooks.c (default_get_mask_mode): Likewise.
31717 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31718 * doc/tm.texi: Regenerate.
31720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31721 Alan Hayward <alan.hayward@arm.com>
31722 David Sherwood <david.sherwood@arm.com>
31724 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31725 * omp-general.c (omp_max_vf): Likewise.
31726 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31727 (expand_omp_simd): Handle polynomial safelen.
31728 * omp-low.c (omplow_simd_context): Add a default constructor.
31729 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31730 (lower_rec_simd_input_clauses): Update accordingly.
31731 (lower_rec_input_clauses): Likewise.
31733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31734 Alan Hayward <alan.hayward@arm.com>
31735 David Sherwood <david.sherwood@arm.com>
31737 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31738 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31739 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31740 (vect_analyze_slp_cost): Likewise.
31741 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31742 (vect_model_load_cost): Likewise.
31744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31745 Alan Hayward <alan.hayward@arm.com>
31746 David Sherwood <david.sherwood@arm.com>
31748 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31749 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31750 from an unsigned int * to a poly_uint64_pod *.
31751 (calculate_unrolling_factor): New function.
31752 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
31754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31755 Alan Hayward <alan.hayward@arm.com>
31756 David Sherwood <david.sherwood@arm.com>
31758 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31759 from an unsigned int to a poly_uint64.
31760 (_loop_vec_info::slp_unrolling_factor): Likewise.
31761 (_loop_vec_info::vectorization_factor): Change from an int
31763 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31764 (vect_get_num_vectors): New function.
31765 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31766 (vect_get_num_copies): Use vect_get_num_vectors.
31767 (vect_analyze_data_ref_dependences): Change max_vf from an int *
31768 to an unsigned int *.
31769 (vect_analyze_data_refs): Change min_vf from an int * to a
31771 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31772 than an unsigned HOST_WIDE_INT.
31773 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31774 (vect_analyze_data_ref_dependence): Change max_vf from an int *
31775 to an unsigned int *.
31776 (vect_analyze_data_ref_dependences): Likewise.
31777 (vect_compute_data_ref_alignment): Handle polynomial vf.
31778 (vect_enhance_data_refs_alignment): Likewise.
31779 (vect_prune_runtime_alias_test_list): Likewise.
31780 (vect_shift_permute_load_chain): Likewise.
31781 (vect_supportable_dr_alignment): Likewise.
31782 (dependence_distance_ge_vf): Take the vectorization factor as a
31783 poly_uint64 rather than an unsigned HOST_WIDE_INT.
31784 (vect_analyze_data_refs): Change min_vf from an int * to a
31786 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31787 vfm1 as a poly_uint64 rather than an int. Make the same change
31788 for the returned bound_scalar.
31789 (vect_gen_vector_loop_niters): Handle polynomial vf.
31790 (vect_do_peeling): Likewise. Update call to
31791 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31792 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31794 * tree-vect-loop.c (vect_determine_vectorization_factor)
31795 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31796 (vect_get_known_peeling_cost): Likewise.
31797 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31798 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31799 (vect_transform_loop): Likewise. Use the lowest possible VF when
31800 updating the upper bounds of the loop.
31801 (vect_min_worthwhile_factor): Make static. Return an unsigned int
31802 rather than an int.
31803 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31804 polynomial unroll factors.
31805 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31806 (vect_make_slp_decision): Likewise.
31807 (vect_supported_load_permutation_p): Likewise, and polynomial
31809 (vect_analyze_slp_cost): Handle polynomial vf.
31810 (vect_slp_analyze_node_operations): Likewise.
31811 (vect_slp_analyze_bb_1): Likewise.
31812 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31813 than an unsigned HOST_WIDE_INT.
31814 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31815 (vectorizable_load): Handle polynomial vf.
31816 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31818 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31821 Alan Hayward <alan.hayward@arm.com>
31822 David Sherwood <david.sherwood@arm.com>
31824 * match.pd: Handle bit operations involving three constants
31825 and try to fold one pair.
31827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31829 * tree-vect-loop-manip.c: Include gimple-fold.h.
31830 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31831 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31832 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31833 Add a path that uses a step of VF instead of 1, but disable it
31835 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31836 and niters_no_overflow parameters. Update calls to
31837 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31838 Create a new SSA name if the latter choses to use a ste other
31839 than zero, and return it via niters_vector_mult_vf_var.
31840 * tree-vect-loop.c (vect_transform_loop): Update calls to
31841 vect_do_peeling, vect_gen_vector_loop_niters and
31842 slpeel_make_loop_iterate_ntimes.
31843 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31844 (vect_gen_vector_loop_niters): Update declarations after above changes.
31846 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31848 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31849 128-bit round to integer instructions.
31850 (ceil<mode>2): Likewise.
31851 (btrunc<mode>2): Likewise.
31852 (round<mode>2): Likewise.
31854 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31856 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31857 unaligned VSX load/store on P8/P9.
31858 (expand_block_clear): Allow the use of unaligned VSX
31859 load/store on P8/P9.
31861 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31863 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31865 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31866 swap associated with both a load and a store.
31868 2018-01-02 Andrew Waterman <andrew@sifive.com>
31870 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31871 * config/riscv/riscv.md (clear_cache): Use it.
31873 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31875 * web.c: Remove out-of-date comment.
31877 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31879 * expr.c (fixup_args_size_notes): Check that any existing
31880 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31881 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31882 (emit_single_push_insn): ...here.
31884 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31886 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31887 (const_vector_encoded_nelts): New function.
31888 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31889 (const_vector_int_elt, const_vector_elt): Declare.
31890 * emit-rtl.c (const_vector_int_elt_1): New function.
31891 (const_vector_elt): Likewise.
31892 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31893 of CONST_VECTOR_ELT.
31895 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31897 * expr.c: Include rtx-vector-builder.h.
31898 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31899 directly on the tree encoding.
31900 (const_vector_from_tree): Likewise.
31901 * optabs.c: Include rtx-vector-builder.h.
31902 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31903 sequence of "u" values.
31904 * vec-perm-indices.c: Include rtx-vector-builder.h.
31905 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31906 directly on the vec_perm_indices encoding.
31908 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31910 * doc/rtl.texi (const_vector): Describe new encoding scheme.
31911 * Makefile.in (OBJS): Add rtx-vector-builder.o.
31912 * rtx-vector-builder.h: New file.
31913 * rtx-vector-builder.c: Likewise.
31914 * rtl.h (rtx_def::u2): Add a const_vector field.
31915 (CONST_VECTOR_NPATTERNS): New macro.
31916 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31917 (CONST_VECTOR_DUPLICATE_P): Likewise.
31918 (CONST_VECTOR_STEPPED_P): Likewise.
31919 (CONST_VECTOR_ENCODED_ELT): Likewise.
31920 (const_vec_duplicate_p): Check for a duplicated vector encoding.
31921 (unwrap_const_vec_duplicate): Likewise.
31922 (const_vec_series_p): Check for a non-duplicated vector encoding.
31923 Say that the function only returns true for integer vectors.
31924 * emit-rtl.c: Include rtx-vector-builder.h.
31925 (gen_const_vec_duplicate_1): Delete.
31926 (gen_const_vector): Call gen_const_vec_duplicate instead of
31927 gen_const_vec_duplicate_1.
31928 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31929 (gen_const_vec_duplicate): Use rtx_vector_builder.
31930 (gen_const_vec_series): Likewise.
31931 (gen_rtx_CONST_VECTOR): Likewise.
31932 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31933 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31934 Build a new vector rather than modifying a CONST_VECTOR in-place.
31935 (handle_special_swappables): Update call accordingly.
31936 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31937 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31938 Build a new vector rather than modifying a CONST_VECTOR in-place.
31939 (handle_special_swappables): Update call accordingly.
31941 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31943 * simplify-rtx.c (simplify_const_binary_operation): Use
31944 CONST_VECTOR_ELT instead of XVECEXP.
31946 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31948 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31949 the selector elements to be different from the data elements
31950 if the selector is a VECTOR_CST.
31951 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31952 ssizetype for the selector.
31954 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31956 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31957 before testing each element individually.
31958 * tree-vect-generic.c (lower_vec_perm): Likewise.
31960 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31962 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31963 * selftest-run-tests.c (selftest::run_tests): Call it.
31964 * vector-builder.h (vector_builder::operator ==): New function.
31965 (vector_builder::operator !=): Likewise.
31966 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31967 (vec_perm_indices::all_from_input_p): New function.
31968 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31969 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31970 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31971 instead of reading the VECTOR_CST directly. Detect whether both
31972 vector inputs are the same before constructing the vec_perm_indices,
31973 and update the number of inputs argument accordingly. Use the
31974 utility functions added above. Only construct sel2 if we need to.
31976 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31978 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31979 the broadcast of the low byte.
31980 (expand_mult_highpart): Use an explicit encoding for the permutes.
31981 * optabs-query.c (can_mult_highpart_p): Likewise.
31982 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31983 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31984 (vectorizable_bswap): Likewise.
31985 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31986 explicit encoding for the power-of-2 permutes.
31987 (vect_permute_store_chain): Likewise.
31988 (vect_grouped_load_supported): Likewise.
31989 (vect_permute_load_chain): Likewise.
31991 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31993 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31994 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31995 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31996 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31997 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31998 (vect_gen_perm_mask_any): Likewise.
32000 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32002 * int-vector-builder.h: New file.
32003 * vec-perm-indices.h: Include int-vector-builder.h.
32004 (vec_perm_indices): Redefine as an int_vector_builder.
32005 (auto_vec_perm_indices): Delete.
32006 (vec_perm_builder): Redefine as a stand-alone class.
32007 (vec_perm_indices::vec_perm_indices): New function.
32008 (vec_perm_indices::clamp): Likewise.
32009 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32010 (vec_perm_indices::new_vector): New function.
32011 (vec_perm_indices::new_expanded_vector): Update for new
32012 vec_perm_indices class.
32013 (vec_perm_indices::rotate_inputs): New function.
32014 (vec_perm_indices::all_in_range_p): Operate directly on the
32015 encoded form, without computing elided elements.
32016 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32017 encoding. Update for new vec_perm_indices class.
32018 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32019 the given vec_perm_builder.
32020 (expand_vec_perm_var): Update vec_perm_builder constructor.
32021 (expand_mult_highpart): Use vec_perm_builder instead of
32022 auto_vec_perm_indices.
32023 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32024 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32025 or double series encoding as appropriate.
32026 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32027 vec_perm_indices instead of auto_vec_perm_indices.
32028 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32029 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32030 (vect_permute_store_chain): Likewise.
32031 (vect_grouped_load_supported): Likewise.
32032 (vect_permute_load_chain): Likewise.
32033 (vect_shift_permute_load_chain): Likewise.
32034 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32035 (vect_transform_slp_perm_load): Likewise.
32036 (vect_schedule_slp_instance): Likewise.
32037 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32038 (vectorizable_mask_load_store): Likewise.
32039 (vectorizable_bswap): Likewise.
32040 (vectorizable_store): Likewise.
32041 (vectorizable_load): Likewise.
32042 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32043 vec_perm_indices instead of auto_vec_perm_indices. Use
32044 tree_to_vec_perm_builder to read the vector from a tree.
32045 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32046 vec_perm_builder instead of a vec_perm_indices.
32047 (have_whole_vector_shift): Use vec_perm_builder and
32048 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32049 truncation to calc_vec_perm_mask_for_shift.
32050 (vect_create_epilog_for_reduction): Likewise.
32051 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32052 from auto_vec_perm_indices to vec_perm_indices.
32053 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32054 instead of changing individual elements.
32055 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32056 the vector in d.perm.
32057 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32058 from auto_vec_perm_indices to vec_perm_indices.
32059 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32060 instead of changing individual elements.
32061 (arm_vectorize_vec_perm_const): Use new_vector to install
32062 the vector in d.perm.
32063 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32064 Update vec_perm_builder constructor.
32065 (rs6000_expand_interleave): Likewise.
32066 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32067 (rs6000_expand_interleave): Likewise.
32069 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32071 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32072 to qimode could truncate the indices.
32073 * optabs.c (expand_vec_perm_var): Likewise.
32075 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32077 * Makefile.in (OBJS): Add vec-perm-indices.o.
32078 * vec-perm-indices.h: New file.
32079 * vec-perm-indices.c: Likewise.
32080 * target.h (vec_perm_indices): Replace with a forward class
32082 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32083 * optabs.h: Include vec-perm-indices.h.
32084 (expand_vec_perm): Delete.
32085 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32086 (expand_vec_perm_const): Declare.
32087 * target.def (vec_perm_const_ok): Replace with...
32088 (vec_perm_const): ...this new hook.
32089 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32090 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32091 * doc/tm.texi: Regenerate.
32092 * optabs.def (vec_perm_const): Delete.
32093 * doc/md.texi (vec_perm_const): Likewise.
32094 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32095 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32096 expand_vec_perm for constant permutation vectors. Assert that
32097 the mode of variable permutation vectors is the integer equivalent
32098 of the mode that is being permuted.
32099 * optabs-query.h (selector_fits_mode_p): Declare.
32100 * optabs-query.c: Include vec-perm-indices.h.
32101 (selector_fits_mode_p): New function.
32102 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32103 is defined, instead of checking whether the vec_perm_const_optab
32104 exists. Use targetm.vectorize.vec_perm_const instead of
32105 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32106 fit in the vector mode before using a variable permute.
32107 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32108 vec_perm_indices instead of an rtx.
32109 (expand_vec_perm): Replace with...
32110 (expand_vec_perm_const): ...this new function. Take the selector
32111 as a vec_perm_indices rather than an rtx. Also take the mode of
32112 the selector. Update call to shift_amt_for_vec_perm_mask.
32113 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32114 Use vec_perm_indices::new_expanded_vector to expand the original
32115 selector into bytes. Check whether the indices fit in the vector
32116 mode before using a variable permute.
32117 (expand_vec_perm_var): Make global.
32118 (expand_mult_highpart): Use expand_vec_perm_const.
32119 * fold-const.c: Includes vec-perm-indices.h.
32120 * tree-ssa-forwprop.c: Likewise.
32121 * tree-vect-data-refs.c: Likewise.
32122 * tree-vect-generic.c: Likewise.
32123 * tree-vect-loop.c: Likewise.
32124 * tree-vect-slp.c: Likewise.
32125 * tree-vect-stmts.c: Likewise.
32126 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32128 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32129 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32130 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32131 (aarch64_vectorize_vec_perm_const): ...this new function.
32132 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32133 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32134 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32135 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32136 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32137 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32138 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32140 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32141 check for NEON modes.
32142 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32143 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32144 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32145 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32147 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32148 the old VEC_PERM_CONST conditions.
32149 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32150 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32151 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32152 (ia64_vectorize_vec_perm_const_ok): Merge into...
32153 (ia64_vectorize_vec_perm_const): ...this new function.
32154 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32155 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32156 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32157 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32158 * config/mips/mips.c (mips_expand_vec_perm_const)
32159 (mips_vectorize_vec_perm_const_ok): Merge into...
32160 (mips_vectorize_vec_perm_const): ...this new function.
32161 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32162 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32163 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32164 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32165 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32166 (rs6000_expand_vec_perm_const): Delete.
32167 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32169 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32170 (altivec_expand_vec_perm_const_le): Take each operand individually.
32171 Operate on constant selectors rather than rtxes.
32172 (altivec_expand_vec_perm_const): Likewise. Update call to
32173 altivec_expand_vec_perm_const_le.
32174 (rs6000_expand_vec_perm_const): Delete.
32175 (rs6000_vectorize_vec_perm_const_ok): Delete.
32176 (rs6000_vectorize_vec_perm_const): New function.
32177 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32178 an element count and rtx array.
32179 (rs6000_expand_extract_even): Update call accordingly.
32180 (rs6000_expand_interleave): Likewise.
32181 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32182 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32183 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32184 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32185 (rs6000_expand_vec_perm_const): Delete.
32186 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32187 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32188 (altivec_expand_vec_perm_const_le): Take each operand individually.
32189 Operate on constant selectors rather than rtxes.
32190 (altivec_expand_vec_perm_const): Likewise. Update call to
32191 altivec_expand_vec_perm_const_le.
32192 (rs6000_expand_vec_perm_const): Delete.
32193 (rs6000_vectorize_vec_perm_const_ok): Delete.
32194 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32195 reference to the SPE evmerge intructions.
32196 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32197 an element count and rtx array.
32198 (rs6000_expand_extract_even): Update call accordingly.
32199 (rs6000_expand_interleave): Likewise.
32200 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32201 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32203 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32205 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32207 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32208 vector mode and that that mode matches the mode of the data
32210 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32211 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32212 directly using expand_vec_perm_1 when forcing selectors into
32214 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32216 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32218 * optabs-query.h (can_vec_perm_p): Delete.
32219 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32220 * optabs-query.c (can_vec_perm_p): Split into...
32221 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32222 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32223 particular selector is valid.
32224 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32225 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32226 (vect_grouped_load_supported): Likewise.
32227 (vect_shift_permute_load_chain): Likewise.
32228 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32229 (vect_transform_slp_perm_load): Likewise.
32230 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32231 (vectorizable_bswap): Likewise.
32232 (vect_gen_perm_mask_checked): Likewise.
32233 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32234 implementations of variable permutation vectors into account
32235 when deciding which selector to use.
32236 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32237 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32238 with a false third argument.
32239 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32240 to test whether the constant selector is valid and can_vec_perm_var_p
32241 to test whether a variable selector is valid.
32243 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32245 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32246 * optabs-query.c (can_vec_perm_p): Likewise.
32247 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32248 instead of vec_perm_indices.
32249 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32250 (vect_gen_perm_mask_checked): Likewise,
32251 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32252 (vect_gen_perm_mask_checked): Likewise,
32254 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32256 * optabs-query.h (qimode_for_vec_perm): Declare.
32257 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32258 (qimode_for_vec_perm): ...this new function.
32259 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32261 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32263 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32264 does not have a conditional at the top.
32266 2018-01-02 Richard Biener <rguenther@suse.de>
32268 * ipa-inline.c (big_speedup_p): Fix expression.
32270 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32273 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32276 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32280 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32281 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32282 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32283 cond_taken_branch_cost 3->4.
32285 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32287 PR tree-optimization/83581
32288 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32289 TODO_cleanup_cfg if any changes have been made.
32291 PR middle-end/83608
32292 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32293 convert_modes if target mode has the right side, but different mode
32296 PR middle-end/83609
32297 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32298 last argument when extracting from CONCAT. If either from_real or
32299 from_imag is NULL, use expansion through memory. If result is not
32300 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32301 the parts directly to inner mode, if even that fails, use expansion
32304 PR middle-end/83623
32305 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32306 check for bswap in mode rather than HImode and use that in expand_unop
32309 Copyright (C) 2018 Free Software Foundation, Inc.
32311 Copying and distribution of this file, with or without modification,
32312 are permitted in any medium without royalty provided the copyright
32313 notice and this notice are preserved.