1 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
3 PR rtl-optimization/87507
4 * lower-subreg.c (operand_for_swap_move_operator): New function.
5 (simple_move): Strip simple operators.
6 (find_pseudo_copy): Likewise.
7 (resolve_operand_for_swap_move_operator): New function.
8 (resolve_simple_move): Strip simple operators and swap operands.
10 2018-11-13 Jakub Jelinek <jakub@redhat.com>
12 PR tree-optimization/87898
13 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
14 (ipa_simd_modify_function_body): Remove debug stmts where the first
15 argument was changed into a non-decl.
17 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
19 PR rtl-optimization/87899
20 * lra-lives.c (start_living): Update white space in comment.
21 (enum point_type): New.
22 (sparseset_contains_pseudos_p): New function.
23 (update_pseudo_point): Likewise.
24 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
25 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
26 handling. Move early exit after adding conflicts.
27 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
28 if regno is already live. Remove all handling of program points.
29 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
30 after adding conflicts. Remove all handling of program points and
31 ignore_reg_for_conflicts.
32 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
33 and do not guard call to mark_pseudo_live.
34 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
35 and do not guard call to mark_pseudo_dead.
36 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
37 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
38 Use new function update_pseudo_point. Handle register copies by
39 removing the source register from the live set. Handle INOUT operands.
40 Update to the next program point using the unused_set, dead_set and
42 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
44 2018-11-13 David Malcolm <dmalcolm@redhat.com>
46 * builtins.c: Replace "source_location" with "location_t".
47 * diagnostic-show-locus.c: Likewise.
48 * diagnostic.c: Likewise.
49 * dumpfile.c: Likewise.
50 * gcc-rich-location.h: Likewise.
51 * genmatch.c: Likewise.
53 * gimplify.c: Likewise.
55 * input.h: Likewise. Eliminate the typedef.
56 * omp-expand.c: Likewise.
57 * selftest.h: Likewise.
58 * substring-locations.h (get_source_location_for_substring):
60 (get_location_within_string): ...this.
61 * tree-cfg.c: Replace "source_location" with "location_t".
62 * tree-cfgcleanup.c: Likewise.
63 * tree-diagnostic.c: Likewise.
64 * tree-into-ssa.c: Likewise.
65 * tree-outof-ssa.c: Likewise.
66 * tree-parloops.c: Likewise.
67 * tree-phinodes.c: Likewise.
68 * tree-phinodes.h: Likewise.
69 * tree-ssa-loop-ivopts.c: Likewise.
70 * tree-ssa-loop-manip.c: Likewise.
71 * tree-ssa-phiopt.c: Likewise.
72 * tree-ssa-phiprop.c: Likewise.
73 * tree-ssa-threadupdate.c: Likewise.
74 * tree-ssa.c: Likewise.
75 * tree-ssa.h: Likewise.
76 * tree-vect-loop-manip.c: Likewise.
78 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
80 * doc/extend.texi: Fix typo in the weakref description.
82 2018-11-13 Richard Biener <rguenther@suse.de>
84 PR tree-optimization/86991
85 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
86 group building until we have successfully detected the SLP
88 (vect_is_simple_reduction): Remove fixup code here.
90 2018-11-13 David Malcolm <dmalcolm@redhat.com>
92 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
93 (dump_gimple_stmt): Use it.
94 (dump_gimple_stmt_loc): Likewise.
95 (dump_gimple_expr): Likewise.
96 (dump_gimple_expr_loc): Likewise.
97 (dump_generic_expr): Likewise.
98 (dump_generic_expr_loc): Likewise.
99 (dump_printf): Likewise.
100 (dump_printf_loc): Likewise.
101 (dump_dec): Likewise.
102 (dump_dec): Likewise.
103 (dump_hex): Likewise.
104 (dump_symtab_node): Likewise.
105 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
106 Guard dump call with dump_enabled_p.
107 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
108 * graphite-optimize-isl.c (optimize_isl): Likewise.
109 * graphite.c (graphite_transform_loops): Likewise.
110 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
111 * tree-parloops.c (parallelize_loops): Likewise.
112 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
113 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
114 (vect_prune_runtime_alias_test_list): Likewise.
115 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
116 (vect_estimate_min_profitable_iters): Likewise.
117 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
118 (vect_build_slp_tree_2): Likewise.
119 (vect_supported_load_permutation_p): Likewise.
120 (vect_slp_analyze_operations): Likewise.
121 (vect_slp_analyze_bb_1): Likewise.
122 (vect_slp_bb): Likewise.
123 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
124 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
125 (pass_slp_vectorize::execute): Likewise.
126 (increase_alignment): Likewise.
128 2018-11-13 David Malcolm <dmalcolm@redhat.com>
131 * ipa-inline.c (report_inline_failed_reason): Guard calls to
132 cl_target_option_print_diff and cl_optimization_print_diff with
135 2018-11-13 David Malcolm <dmalcolm@redhat.com>
137 * doc/invoke.texi (-fsave-optimization-record): Note that the
138 output is compressed.
139 * optinfo-emit-json.cc: Include <zlib.h>.
140 (optrecord_json_writer::write): Compress the output.
142 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
144 * tree-vrp.c (value_range_base::dump): Dump type.
145 Do not use INF nomenclature for 1-bit types.
146 (dump_value_range): Group all variants to common dumping code.
147 (debug): New overloaded functions for value_ranges.
148 (value_range_base::dump): Remove no argument version.
149 (value_range::dump): Same.
151 2018-11-13 Richard Biener <rguenther@suse.de>
153 PR tree-optimization/87931
154 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
155 nested cycles we support to latch computations vectorizable_reduction
158 2018-11-13 Martin Liska <mliska@suse.cz>
160 PR tree-optimization/87885
161 * cfghooks.c (account_profile_record): Rename
163 (profile_record_check_consistency): ... this.
164 Calculate missing num_mismatched_freq_in.
165 (profile_record_account_profile): New function
166 that calculates time and size of a function.
167 * cfghooks.h (struct profile_record): Remove
169 (struct cfg_hooks): Remove after_pass flag.
170 (account_profile_record): Rename to ...
171 (profile_record_check_consistency): ... this.
172 (profile_record_account_profile): New.
173 * cfgrtl.c (rtl_account_profile_record): Remove
175 * passes.c (check_profile_consistency): Do only
177 (account_profile): Calculate size and time of
179 (pass_manager::dump_profile_report): Reformat
181 (execute_one_ipa_transform_pass): Call
182 consistency check before clean upand call account_profile
183 after a clean up is done.
184 (execute_one_pass): Call check_profile_consistency and
185 account_profile instead of using after_pass flag..
186 * tree-cfg.c (gimple_account_profile_record): Likewise.
188 2018-11-13 Martin Liska <mliska@suse.cz>
191 * config/i386/i386.c (ix86_option_override_internal): Error
192 about usage -mabi=ms and -fsanitize={,kernel-}address.
194 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
196 * config/aarch64/aarch64.c
197 (aarch64_vectorize_preferred_vector_alignment): Change return type to
199 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
200 alignment being a poly int.
201 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
202 return type to poly_uint64.
203 * target.def (default_preferred_vector_alignment): Likewise.
204 * targhooks.c (default_preferred_vector_alignment): Likewise.
205 * targhooks.h (default_preferred_vector_alignment): Likewise.
206 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
207 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
209 (vect_update_misalignment_for_peel): Likewise.
210 (vect_enhance_data_refs_alignment): Likewise.
211 (vect_find_same_alignment_drs): Likewise.
212 (vect_duplicate_ssa_name_ptr_info): Likewise.
213 (vect_setup_realignment): Likewise.
214 (vect_can_force_dr_alignment_p): Change alignment parameter type to
216 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
217 mask with a compile time variable vector alignment.
218 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
220 (vect_do_peeling): Exit early if vector alignment is not constant.
221 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
223 (vectorizable_store): Likewise.
224 (vectorizable_load): Likweise.
225 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
227 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
229 (vect_can_force_dr_alignment_p): Change alignment parameter type to
232 2018-11-13 Richard Biener <rguenther@suse.de>
234 PR tree-optimization/87962
235 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
236 detect outer reduction for disqualifying in-loop uses.
238 2018-11-13 Richard Biener <rguenther@suse.de>
240 PR tree-optimization/87967
241 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
242 for constants for the scalar loop.
244 2018-11-13 Alan Modra <amodra@gmail.com>
246 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
247 integer constants when -mcmodel=medium.
249 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
251 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
252 * config/arc/elf.h (PROFILE_HOOK): Define.
253 * config/arc/linux.h (PROFILE_HOOK): Likewise.
255 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
257 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
258 jump table data in the text section.
260 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
262 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
263 to fit the eh_return pattern.
264 * config/arc/arc.md (eh_return): Define.
265 (VUNSPEC_ARC_EH_RETURN): Likewise.
266 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
268 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
271 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
273 * common/config/arc/arc-common.c (arc_option_optimization_table):
274 Millicode optimization is default on for size optimizations.
275 * config/arc/arc-protos.h (arc_check_multi): New function.
276 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
277 (ENTER_LEAVE_START_REG): Define.
278 (ENTER_LEAVE_END_REG): Likewise.
279 (arc_override_options): Disable millicode when long calls option
281 (arc_frame_info): Change it from int to bool.
282 (arc_compute_frame_size): Clean up.
283 (arc_save_restore): Remove.
284 (frame_save_reg): New function.
285 (frame_restore_reg): Likewise.
286 (arc_enter_leave_p): Likewise.
287 (arc_save_callee_saves): Likewise.
288 (arc_restore_callee_saves): Likewise.
289 (arc_save_callee_enter): Likewise.
290 (arc_restore_callee_leave): Likewise.
291 (arc_save_callee_milli): Likewise.
292 (arc_restore_callee_milli): Likewise.
293 (arc_expand_prologue): Reimplement to emit enter/leave
295 (arc_expand_epilogue): Likewise.
296 (arc_check_multi): New function.
297 * config/arc/arc.md (push_multi_fp): New pattern.
298 (push_multi_fp_blink): Likewise.
299 (pop_multi_fp): Likewise.
300 (pop_multi_fp_blink): Likewise.
301 (pop_multi_fp_ret): Likewise.
302 (pop_multi_fp_blink_ret): Likewise.
303 * config/arc/arc.opt (mmillicode): Update option.
304 (mcode-density-frame): New option.
305 * config/arc/predicates.md (push_multi_operand): New predicate.
306 (pop_multi_operand): Likewise.
307 * doc/invoke.texi (ARC): Update ARC options information.
310 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
312 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
313 * config/arc/arc.c (operands_ok_ldd_std): New function.
314 (mem_ok_for_ldd_std): Likewise.
315 (gen_operands_ldd_std): Likewise.
316 * config/arc/arc.md: Add peephole2 rules for std/ldd.
318 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
320 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
321 test on stack_usage_file.
322 (lang_dependent_init): Do not open the .su file if generating LTO.
324 2018-11-13 Jakub Jelinek <jakub@redhat.com>
326 PR rtl-optimization/87918
327 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
328 simplify_gen_relational rather than simplify_gen_binary.
330 2018-11-13 Richard Biener <rguenther@suse.de>
332 * tree-ssanames.h (set_range_info): Use value_range_base.
333 (get_range_info): Likewise.
334 * tree-ssanames.c (set_range_info): Likewise.
335 (get_range_info): Likewise.
336 * tree-vrp.c (value_range_base::union_helper): Split
337 out common parts of value_range[_base]::union_.
338 (value_range_base::union_): Update.
339 (value_range::union_): Likewise.
340 (determine_value_range_1): Use value_range_base.
341 (determine_value_range): Likewise.
342 * tree-vrp.h (value_range_base::union_helper): Move ...
343 (value_range::union_helper): ... from here.
345 2018-11-13 Alan Modra <amodra@gmail.com>
347 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
349 (rs6000_secondary_reload_gpr): Don't call find_replacement.
351 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
354 * doc/invoke.texi (Optimize Options): Clarify that the
355 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
356 apply to data cache size.
358 2018-11-13 Alan Modra <amodra@gmail.com>
360 * config/rs6000/predicates.md (logical_const_operand),
361 (logical_operand): Correct comment.
362 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
364 2018-11-13 Alan Modra <amodra@gmail.com>
366 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
368 2018-11-13 Alan Modra <amodra@gmail.com>
370 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
372 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
373 covered by alternative.
374 (movcc_internal1): Ignore h for register preference.
375 (mov<mode>_hardfloat64): Likewise.
376 (mov<mode>_softfloat): Ignore c, l, h for register preference.
378 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
380 PR preprocessor/47823
381 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
384 * doc/extend.texi (Pragmas): Note additional pragmas documented
387 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
391 * tree-scalar-evolution.c (expression_expensive_p): Make BUILTIN POPCOUNT
392 as expensive when backend does not define it.
394 2018-11-12 Fredrik Noring <noring@nocrew.org>
396 * config.gcc: Update with-llsc defaults for MIPS r5900.
398 2018-11-12 Martin Liska <mliska@suse.cz>
400 PR gcov-profile/87442
401 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
403 * doc/invoke.texi: Document them.
404 * tree-profile.c (parse_profile_filter): New.
405 (parse_profile_file_filtering): Likewise.
406 (release_profile_file_filtering): Likewise.
407 (include_source_file_for_profile): Likewise.
408 (tree_profiling): Filter source files based on the
411 2018-11-12 Martin Liska <mliska@suse.cz>
414 * doc/extend.texi: Add missing values for __builtin_cpu_is and
415 __builtin_cpu_supports for x86 target.
417 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
420 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
422 (Arithmetic): Likewise for "lo_sum".
424 2018-11-12 Renlin Li <renlin.li@arm.com>
427 * dse.c (get_stored_val): Add check for compile-time constantness
430 2018-11-12 Sudakshina Das <sudi.das@arm.com>
432 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
433 (ARMv8_5a): New fgroup.
434 (armv8.5-a): New arch.
435 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
437 * config/arm/arm-tables.opt: Regenerate.
438 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
439 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
440 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
441 Add matching rules for -march=armv8.5-a and extensions.
442 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
443 Add sb and predres to all armv8-a except armv8.5-a.
445 2018-11-12 Richard Biener <rguenther@suse.de>
447 * tree-vrp.h (value_range[_base]::set): Make public. Provide
448 overload for single value.
449 (value_range[_base]::set_nonnull): New.
450 (value_range[_base]::set_null): Likewise.
451 (value_range): Document bitmap copying behavior, mark
452 copy constructor and assignment operator deleted.
453 (value_range::move): New.
454 (value_range::set_and_canonicalize): Default bitmap to zero.
455 (set_value_range_to_nonnull): Remove.
456 (set_value_range_to_null): Likewise.
457 (set_value_range): Likewise.
458 (set_value_range_to_value): Likewise.
459 (extract_range_from_unary_expr): Work on value_range_base.
460 (extract_range_from_binary_expr_1): Likewise. Rename to...
461 (extract_range_from_binary_expr): ... this.
462 * tree-vrp.c (value_range::update): Clear equiv bitmap
464 (value_range::move): New, move equiv bitmap.
465 (value_range_base::set_undefined): Avoid assignment.
466 (value_range::set_undefined): Likewise.
467 (value_range_base::set_varying): Likewise.
468 (value_range::set_varying): Likewise.
469 (set_value_range): Remove.
470 (value_range_base::set): New overload for value.
471 (value_range::set): Likewise.
472 (set_value_range_to_nonnull): Remove.
473 (value_range_base::set_nonnull): New.
474 (value_range::set_nonnull): Likewise.
475 (set_value_range_to_null): Remove.
476 (value_range_base::set_null): New.
477 (value_range::set_null): Likewise.
478 (range_is_null): Work on value_range_base.
479 (range_is_nonnull): Likewise.
480 (ranges_from_anti_range): Likewise.
481 (extract_range_into_wide_ints): Likewise.
482 (extract_range_from_multiplicative_op): Likewise.
483 (extract_range_from_binary_expr): Likewise. Update for API changes.
484 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
486 (value_range::intersect_helper): Avoid copy and assignment.
487 (value_range::union_helper): Likewise.
488 (determine_value_range_1): Adjust.
489 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
490 Avoid assignment by using move.
491 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
492 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
494 * tree-ssanames.c (get_range_info): Likewise.
495 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
496 * vr-values.c (vr_values::get_value_range): Adjust.
497 (vr_values::update_value_range): Likewise.
498 (symbolic_range_based_on_p): Work on value_range_base.
499 (vr_values::extract_range_from_binary_expr): Use value_range_base.
500 (vr_values::extract_range_from_unary_expr): Likewise.
501 (vr_values::extract_range_from_cond_expr): Avoid assignment.
502 (vr_values::extract_range_from_comparison): Adjust.
503 (vr_values::check_for_binary_op_overflow): Use value_range_base.
504 (vr_values::extract_range_basic): Adjust.
505 (vr_values::adjust_range_with_scev): Likewise.
506 (vr_values::vrp_visit_assignment_or_call): Likewise.
507 (vr_values::get_vr_for_comparison): Change API to avoid
508 assignment and copy construction.
509 (vr_values::compare_name_with_value): Adjust accordingly.
510 (vr_values::compare_names): Likewise.
511 (vr_values::extract_range_from_phi_node): Avoid assignment and
512 bogus in-place modify of equiv bitmap.
513 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
514 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
515 for extract_range_from_unary_expr API change.
516 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
518 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
520 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
522 2018-11-12 Richard Biener <rguenther@suse.de>
524 * tree-vrp.h (value_range_base::symbolic_p,
525 value_range_base::constant_p, value_range_base::zero_p,
526 value_range_base::singleton_p): Move from value_range.
527 (value_range::dump): Add.
528 * gimple-ssa-evrp-analyze.c
529 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
530 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
531 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
533 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
534 (value_range::constant_p): Likewise.
535 (value_range::singleton_p): Likewise.
536 (value_range_base::dump): Add.
537 (set_value_range_to_undefined): Remove.
538 (set_value_range_to_varying): Likewise.
539 (range_int_cst_p): Take value_range_base argument.
540 (range_int_cst_singleton_p): Likewise.
541 (value_range_constant_singleton): Likewise.
542 (vrp_set_zero_nonzero_bits): Likewise.
543 (extract_range_from_multiplicative_op): Use set_varying.
544 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
545 (extract_range_from_unary_expr): Likewise.
546 (dump_value_range_base): Change to overload of dump_value_range.
547 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
548 (vrp_prop::visit_stmt): Likewise.
549 (value_range::intersect_helper): Likewise.
550 (value_range::union_helper): Likewise.
551 (determine_value_range_1): Likewise.
553 2018-11-12 Richard Biener <rguenther@suse.de>
555 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
556 (set_value_range_to_null): Likewise.
557 * vr-values.c (vr_values::extract_range_from_comparison):
558 Clear equiv for constant singleton ranges.
560 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
562 * config/i386/sse.md: Combine VFIXUPIMM* patterns
563 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
564 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
565 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
566 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
567 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
568 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
570 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
573 * doc/extend.texi (Common Type Attributes): For the align type
574 attribute, copy language about decreasing alignment from the
575 corresponding variable attribute.
577 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
579 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
582 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
585 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
586 -frtti and -fno-rtti code.
588 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
591 * doc/extend.texi (Other Builtins): Document probability associated
592 with __builtin_expect.
594 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
597 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
598 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
599 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
600 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
602 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
604 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
606 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
608 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
610 2018-11-11 Richard Biener <rguenther@suse.de>
612 * tree-vrp.h (class value_range_base): New base class for
613 value_range containing all but the m_equiv member.
614 (dump_value_range_base): Add.
615 (range_includes_zero_p): Work on value_range_base.
616 * tree-vrp.c (value_range_base::set): Split out base handling
618 (value_range::set): this.
619 (value_range::set_equiv): New.
620 (value_range_base::value_range_base): New constructors.
621 (value_range_base::check): Split out base handling from...
622 (value_range::check): this.
623 (value_range::equal_p): Refactor in terms of
624 ignore_equivs_equal_p which is now member of the base.
625 (value_range_base::set_undefined): New.
626 (value_range_base::set_varying): Likewise.
627 (value_range_base::dump):Split out base handling from...
628 (value_range::dump): this.
629 (value_range_base::set_and_canonicalize): Split out base handling
631 (value_range::set_and_canonicalize): this.
632 (value_range_base::union_): New.
633 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
635 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
636 instead of value_range everywhere.
637 (ipcp_vr_lattice::print): Use dump_value_range_base.
638 (ipcp_vr_lattice::meet_with): Adjust.
639 (ipcp_vr_lattice::meet_with_1): Likewise.
640 (ipa_vr_operation_and_type_effects): Likewise.
641 (propagate_vr_across_jump_function): Likewise.
642 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
643 (ipa_get_value_range): Likewise.
644 (ipa_set_jfunc_vr): Likewise.
645 (ipa_compute_jump_functions_for_edge): Likewise.
647 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
650 * doc/invoke.texi (Optimize Options): Add @opindex entries
651 for the positive forms of -fno-xxx and -mno-xxx options
652 that were lacking them.
654 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
656 * combine.c (make_more_copies): Only make an intermediate copy if the
657 dest of a move is a pseudo.
659 2018-11-09 Maya Rashish <coypu@sdf.org>
662 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
663 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
665 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
669 * doc/invoke.texi (Optimize Options): Clarify default behavior
670 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
672 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
674 PR tree-optimization/87940
675 * expr.c (string_constant): Don't strip NOPS in subexpressions.
676 Fold PLUS_EXPR correctly.
678 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
681 * config/s390/s390.c (s390_safe_relative_long_p): New function.
682 (annotate_constant_pool_refs): Skip insns which support
684 (annotate_constant_pool_refs_1): New helper function.
685 (find_constant_pool_ref): Skip insns which support relative
687 (find_constant_pool_ref_1): New helper function.
688 (replace_constant_pool_ref): Skip insns which support
690 (replace_constant_pool_ref_1): New helper function.
691 (s390_mainpool_start): Adapt to the new signature.
692 (s390_mainpool_finish): Likewise.
693 (s390_chunkify_start): Likewise.
694 (s390_chunkify_finish): Likewise.
695 (pass_s390_early_mach::execute): Likewise.
696 (s390_prologue_plus_offset): Likewise.
697 (s390_emit_prologue): Likewise.
698 (s390_emit_epilogue): Likewise.
700 2018-11-09 Jakub Jelinek <jakub@redhat.com>
702 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
703 but unsupported lastprivate with conditional modifier.
705 2018-11-09 Jeff Law <law@redhat.com>
707 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
708 unused argument better. Add gcc_unreachable to silence warning.
710 2018-11-09 Martin Sebor <msebor@redhat.com>
713 * attribs.c (has_attribute): New helper function.
714 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
715 * attribs.h (decls_mismatched_attributes): Declare.
716 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
717 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
718 * common.opt (-Wattribute-alias): Take an argument.
719 (-Wno-attribute-alias): New option.
720 * doc/extend.texi (Common Function Attributes): Document copy.
721 (Common Variable Attributes): Same.
722 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
723 (-Wattribute-alias): Document new option argument.
725 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
727 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
728 matching criteria. Remove unused array initializer.
730 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
731 Jinsong Ji <jji@us.ibm.com>
733 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
734 constraints by introducing a new temporary.
735 (_mm_cvtss_si64): Likewise.
737 2018-11-09 Martin Liska <mliska@suse.cz>
739 * common.opt: Add -fipa-stack-alignment flag.
740 * doc/invoke.texi: Document it.
741 * final.c (rest_of_clean_state): Guard stack
744 2018-11-09 Martin Liska <mliska@suse.cz>
746 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
748 (ipa_discover_variable_flags): ... this.
749 * common.opt: Come up with new flag -fipa-reference-addressable.
750 * doc/invoke.texi: Document it.
751 * ipa-reference.c (propagate): Call the renamed fn.
752 * ipa-visibility.c (whole_program_function_and_variable_visibility):
754 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
756 (ipa_discover_variable_flags): ... this. Discover
757 non-addressable variables only with the newly added flag.
758 * opts.c: Enable the newly added flag with -O1 and higher
761 2018-11-09 David Malcolm <dmalcolm@redhat.com>
763 * json.cc (selftest::test_writing_literals): Fix comment.
765 2018-11-09 Martin Liska <mliska@suse.cz>
767 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
768 string to a stack buffer.
769 (aarch64_parse_cpu): Likewise.
770 (aarch64_parse_tune): Likewise.
772 2018-11-09 Richard Biener <rguenther@suse.de>
774 PR tree-optimization/87953
775 * tree-vect-loop.c (vectorizable_reduction): For analysis
776 always pass ops[0] to vectorizable_condition.
778 2018-11-09 Stafford Horne <shorne@gmail.com>
779 Richard Henderson <rth@twiddle.net>
780 Joel Sherrill <joel@rtems.org>
782 * common/config/or1k/or1k-common.c: New file.
783 * config/or1k/*: New.
784 * config.gcc (or1k*-*-*): New.
785 * configure.ac (or1k*-*-*): New test for openrisc tls.
786 * configure: Regenerated.
787 * doc/install.texi: Document OpenRISC triplets.
788 * doc/invoke.texi: Document OpenRISC arguments.
789 * doc/md.texi: Document OpenRISC.
791 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
793 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
794 (arm7tdmi-s): Delete CPU.
795 (arm710t): Add aliases for arm720t and arm740t.
796 (arm720t, arm740t): Delete CPUs.
797 (arm920t): Add aliases for arm920, arm922t and arm940t.
798 (arm920, arm922t, arm940t): Delete CPUs.
799 (arm10tdmi): Add alias for arm1020t.
800 (arm1020t): Delete CPU.
801 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
802 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
803 (arm10e): Add aliases for arm1020e and arm1022e.
804 (arm1020e, arm1022e): Delete CPU.
805 * config/arm/arm.md (generic_sched): Remove entries that are now
807 (generic_vfp): Likewise.
808 * config/arm/arm1020e.md: Simplify tuning selection based on alias
810 * config/arm/arm-tune.md: Regenerated.
811 * config/arm/arm-tables.opt: Regenerated.
813 2018-11-09 Richard Biener <rguenther@suse.de>
815 PR tree-optimization/87621
816 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
817 op with only phi inputs.
818 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
819 (ch_base::copy_headers): Run CSE on copied loop headers.
820 (pass_ch_vect::process_loop_p): Simplify.
822 2018-11-09 Alexandre Oliva <oliva@adacore.com>
824 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
825 for non-w64 x86_64 biarch.
827 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
829 PR rtl-optimization/86438
830 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
831 of in_b for the compare if in_b is SET_DEST.
834 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
837 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
839 * tree-vrp.c (value_range::check): Do not access internals
841 (value_range::singleton_p): Same.
842 (value_range::type): Same.
843 (vrp_finalize): Use value_range API.
845 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
847 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
849 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
851 * vr-values.c (vr_values::get_value_range): Use value_range API
852 instead of piecing together ranges.
853 (vr_values::update_value_range): Same.
855 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
857 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
858 of performing ad-hoc calculations.
859 * tree-ssanames.c (set_range_info): New overloaded function
860 accepting value_range &.
861 (get_range_info): Same.
862 * tree-ssanames.h (set_range_info_raw): Remove.
863 (set_range_info): New prototype.
864 (get_range_info): Same.
865 * tree-vrp.h (value_range::null_p): Rename to zero_p.
866 * tree-vrp.c (value_range::null_p): Same.
868 2018-11-09 Jan Hubicka <jh@suse.cz>
870 * tree.c (fld_type_variant_equal_p): Test user align flag.
871 (flt_type_variant): Copy user align flag.
872 (fld_incomplete_type_of): Clear it.
874 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
876 * config/arm/neon.md (div<mode>3): New pattern.
878 2018-11-08 Andi Kleen <ak@linux.intel.com>
880 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
881 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
882 (ix86_handle_option): Handle OPT_mptwrite.
883 * config/i386/cpuid.h (bit_PTWRITE): Add.
884 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
885 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
886 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
887 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
888 (ix86_option_override_internal): Handle PTA_PTWRITE.
889 (ix86_valid_target_attribute_inner_p): Define ptwrite.
890 (def_builtin2): Force UINT64 to be 64bit only.
891 * config/i386/i386.h (TARGET_PTWRITE): Add.
892 (TARGET_PTWRITE_P): Add.
894 * config/i386/i386.md: Define ptwrite.
895 * config/i386/i386.opt: Add -mptwrite.
896 * config/i386/immintrin.h (_ptwrite64): Add.
898 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
899 * doc/invoke.texi: Document -mptwrite.
901 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
903 PR rtl-optimization/87600
904 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
905 * lra-constraints.c (process_alt_operands): Skip illegal hard
906 register usage. Prefer reloading non hard register operands.
908 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
911 * doc/invoke.texi (Optimize Options): Clarify default behavior
912 for -fno-sched-interblock and -fno-sched-spec.
914 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
916 * collect2.c (linker_select): Add USE_LLD_LD.
917 (ld_suffixes): Add ld.lld.
918 (main): Handle -fuse-ld=lld.
919 * common.opt (-fuse-ld=lld): New option.
920 * doc/invoke.texi (-fuse-ld=lld): Document.
921 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
923 2018-11-08 Paul Koning <ni1d@arrl.net>
925 * config/pdp11/constraints.md: Add "Z" series constraints for use
926 with pre-dec and post-inc addressing.
927 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
928 (pdp11_expand_operands): Add int argument (word count).
929 (pdp11_sp_frame_offset): Delete.
930 (pdp11_cmp_length): New function.
931 (pushpop_regeq): New function.
932 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
934 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
936 (pdp11_initial_elimination_offset): Ditto.
937 (pdp11_expand_operands): Add word count argument. Bugfixes.
938 (output_move_multiple): Change how pointer adjustment is done.
939 (pdp11_gen_int_label): Correct format.
940 (output_ascii): Ditto.
941 (pdp11_asm_output_var): Add code for DEC assembler case.
942 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
944 (legitimate_const_double_p): Ditto.
945 (pdp11_register_move_cost): Adjust for new register classes.
946 (pdp11_regno_reg_class): Ditto.
947 (expand_block_move): Delete.
948 (pushpop_regeq): New function.
949 (pdp11_legitimate_address_p): Bugfix in check for constant
951 (pdp11_sp_frame_offset): Delete.
952 (pdp11_reg_save_size): New helper function for new frame layout.
953 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
954 (pdp11_expand_shift): Bugfix in check for constant shift count.
955 (pdp11_shift_length): Ditto.
956 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
957 (pdp11_cmp_length): New function.
958 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
959 some compile options.
960 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
961 (CALL_USED_REGISTERS): Ditto.
962 (ELIMINABLE_REGS): Ditto.
963 (REGISTER_NAMES): Ditto.
964 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
966 (REG_CLASS_NAMES): Ditto.
967 (REG_CLASS_CONTENTS): Ditto. Also remove
968 HARD_FRAME_POINTER_REGNUM.
969 (CPU_REG_CLASS): New macro.
970 (CLASS_MAX_NREGS): Adjust for new register classes.
971 (FUNCTION_PROFILER): Make no-op.
972 (may_call_alloca): Remove unused declaration.
973 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
974 (ASM_OUTPUT_SKIP): Fix format.
975 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
976 (HARD_FRAME_POINTER_REGNUM): Remove.
978 (*rts): Rename. Remove epilogue related checks.
979 (cmpsi, cmpdi): New insn.
980 (cbranch<mode>4): Change to apply to SI and DI modes as well.
981 (mov<mode>): Change constraints to enforce that push/pop
982 destination cannot use the same register as source.
983 (*mov<mode><cc_cc>): Ditto.
984 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
985 at assembly output rather than as RTL expander.
986 (zero_extendqihi2): Bugfix in check for same registers.
987 (adddi3_nocc): Bugfix in check for constant operand.
988 (addsi3_nocc): Ditto.
989 (subdi3_nocc): Ditto.
990 (subsi3_nocc): Ditto.
991 (negdi2_nocc): Copy input to pdp11_expand_operands.
992 (negsi2_nocc): Ditto.
993 (bswap2_nocc): Ditto.
994 * config/pdp11/pdp11.opt (mlra): Fix documentation.
995 * config/pdp11/t-pdp11: Use -Os.
997 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
999 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1000 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1001 (gen_comm_data): Print out CPU alias tables.
1002 (check_cpu): Match aliases when checking the CPU name.
1003 * config/arm/arm-protos.h (cpu_alias): New structure.
1004 (cpu_option): Add entry for aliases.
1005 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1006 strongarm1100 and strongarm1110.
1007 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1008 (config/arm/arm-generic.md): Remove redundant references to
1009 strongarm110, strongarm1100 and strongarm1110.
1010 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1011 Scan aliases for additional hints.
1012 (arm_parse_cpu_option_name): Also match a cpu name against the list
1014 * config/arm/arm-tables.opt: Regenerated.
1015 * config/arm/arm-tune.md: Regenerated.
1017 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1019 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1020 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1021 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1022 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1023 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1024 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1025 * gengtype.c (open_base_files): Add omp-general.h.
1026 * gimple.c (gimple_build_omp_critical):
1027 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1028 gimple_omp_taskgroup_set_clauses.
1029 (gimple_build_omp_atomic_load): Add mo argument, call
1030 gimple_omp_atomic_set_memory_order.
1031 (gimple_build_omp_atomic_store): Likewise.
1032 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1033 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1035 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1036 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1037 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1038 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1039 different value for GF_OMP_ATOMIC_NEED_VALUE.
1040 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1042 (struct gimple_statement_omp_single_layout): And remove here.
1043 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1044 than gimple_statement_omp_single_layout.
1045 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1047 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1048 (gimple_omp_subcode): Formatting fix.
1049 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1050 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1051 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1052 gimple_omp_teams_host, gimple_omp_teams_set_host,
1053 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1054 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1055 gimple_omp_taskgroup_set_clauses): New inline functions.
1056 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1057 (gimple_build_omp_atomic_store): Likewise.
1058 (gimple_omp_atomic_seq_cst_p): Remove.
1059 (gimple_omp_atomic_memory_order): New function.
1060 (gimple_omp_atomic_set_seq_cst): Remove.
1061 (gimple_omp_atomic_set_memory_order): New function.
1062 (gimple_build_omp_taskgroup): Add clauses argument.
1063 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1064 (dump_gimple_omp_task): Print taskwait with depend clauses.
1065 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1066 dump_omp_atomic_memory_order.
1067 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1068 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1069 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1070 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1071 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1072 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1073 ORT_UNTIED_TASKLOOP enumerators.
1074 (enum gimplify_defaultmap_kind): New.
1075 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1076 target_map_pointers_as_0len_arrays members, add defaultmap.
1077 (new_omp_context): Initialize defaultmap member.
1078 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1079 (maybe_fold_stmt): Don't fold even in host teams regions.
1080 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1081 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1082 ctx->omp_firstprivatize_variable.
1083 (omp_add_variable): Don't add private/firstprivate for VLAs in
1085 (omp_default_clause): Print "taskloop" rather than "task" if
1087 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1088 Handle new defaultmap clause kinds.
1089 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1090 iterator to be lastprivate or private. Fix up diagnostics if linear
1091 is used on collapse>1 simd iterator.
1092 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1093 (gimplify_omp_depend): New function.
1094 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1095 combined parallel master taskloop{, simd} if taskloop has
1096 firstprivate, lastprivate or reduction clause. Handle
1097 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1098 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1099 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1100 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1101 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1103 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1104 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1105 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1106 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1107 (gimplify_omp_task): Handle taskwait with depend clauses.
1108 (gimplify_omp_for): Add shared clause on parallel for combined
1109 parallel master taskloop{, simd} if taskloop has firstprivate,
1110 lastprivate or reduction clause. Use ORT_TASKLOOP or
1111 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1112 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1113 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1114 __for_end and __for_range temporaries on OMP_PARALLEL for
1115 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1116 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1117 sandwiched in between two taskloops.
1118 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1119 instead of ctx->omp_firstprivatize_variable.
1120 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1121 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1122 host teams, use gimplify_and_return_first etc. for body like
1123 for target or target data constructs, and at the end call
1124 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1125 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1126 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1127 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1128 gimple_omp_atomic_set_seq_cst calls.
1129 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1130 case, handle taskgroup clauses.
1131 * lto-streamer-out.c (hash_tree): Handle
1132 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1133 * Makefile.in (GTFILES): Add omp-general.h.
1134 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1135 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1136 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1137 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1138 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1139 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1140 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1141 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1142 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1143 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1144 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1145 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1146 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1147 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1148 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1149 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1150 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1151 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1152 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1153 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1154 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1155 non-worksharing loops.
1156 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1157 (determine_parallel_type): Don't combine parallel with worksharing
1158 which has _reductemp_ clause.
1159 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1160 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1161 if there is nonmonotonic modifier or if there is no modifier and no
1162 ordered clause. For dynamic and guided schedule without monotonic
1163 and nonmonotonic modifier, default to nonmonotonic.
1164 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1165 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1167 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1168 there are any reduction clauses.
1169 (expand_taskwait_call): New function.
1170 (expand_teams_call): New function.
1171 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1172 expand_teams_call for it. Formatting fix. Handle taskwait with
1174 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1175 of worksharing loops with task reductions.
1176 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1177 expansion of worksharing loops with task reductions.
1178 (expand_omp_sections): Handle expansion of sections with task
1180 (expand_omp_synch): For host teams call expand_omp_taskreg.
1181 (omp_memory_order_to_memmodel): New function.
1182 (expand_omp_atomic_load, expand_omp_atomic_store,
1183 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1184 instead of gimple_omp_atomic_seq_cst_p.
1185 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1186 depend clauses as a standalone directive.
1187 * omp-general.c (enum omp_requires): New variable.
1188 (omp_extract_for_data): Initialize have_reductemp member. Allow
1189 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1190 GT_EXPR loops depending on incr sign. Formatting fixes.
1191 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1192 (enum omp_requires): New enum.
1193 (omp_requires_mask): Declare.
1194 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1196 * omp-low.c (struct omp_context): Add task_reductions and
1197 task_reduction_map fields.
1198 (is_host_teams_ctx): New function.
1199 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1200 (use_pointer_for_field): Use is_global_var instead of
1201 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1203 (build_outer_var_ref): Ignore taskgroup outer contexts.
1204 (delete_omp_context): Release task_reductions and task_reduction_map.
1205 (scan_sharing_clauses): Don't add any fields for reduction clause on
1206 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1207 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1208 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1209 Handle OMP_CLAUSE_NONTEMPORAL.
1210 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1212 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1213 clauses with task modifier.
1214 (scan_omp_task): Handle taskwait with depend clauses.
1215 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1216 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1217 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1218 (scan_omp_for): Fix comment formatting.
1219 (scan_omp_teams): Handle host teams constructs.
1220 (check_omp_nesting_restrictions): Allow teams with no outer
1221 OpenMP context. Adjust diagnostics for teams strictly nested into
1222 some explicit OpenMP construct other than target. Allow OpenMP atomics
1223 inside of simd regions.
1224 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1225 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1226 taskreg_nesting_level while scanning host teams construct.
1227 (task_reduction_read): New function.
1228 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1229 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1230 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1231 second argument create_tmp_var if it is NULL. Don't ignore shared
1232 clauses in is_host_teams_ctx contexts. Handle
1233 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1235 (lower_reduction_clauses): Ignore reduction clauses with task
1236 modifier. Remove second argument create_tmp_var if it is NULL.
1237 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1238 (lower_send_clauses): Ignore reduction clauses with task modifier.
1239 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1240 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1241 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1242 rely that it is the last stmt in body so far. Ignore outer taskgroup
1244 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1245 lower_omp_task_reductions): New functions.
1246 (lower_omp_sections): Handle reduction clauses with taskgroup
1247 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1248 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1249 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1251 (lower_omp_taskgroup): Handle taskgroup reductions.
1252 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1253 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1254 (lower_depend_clauses): If there are any
1255 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1256 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1257 seen, assume lowering is done already and return early. Set kind
1258 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1259 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1260 parallel construct. Handle reduction clause on taskloop construct.
1261 Handle taskwait with depend clauses.
1262 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1263 for host teams constructs.
1264 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1265 nontemporal and _reductemp_ clause entries.
1266 (omp_clause_code_name): Likewise.
1267 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1268 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1269 * tree-core.h (enum omp_clause_code): Add
1270 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1271 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1272 (struct tree_base): Add omp_atomic_memory_order field into union.
1273 Remove OMP_ATOMIC_SEQ_CST comment.
1274 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1275 and OMP_CLAUSE_DEPEND_DEPOBJ.
1276 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1277 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1278 OpenMP constructs with body and clauses operands.
1279 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1280 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1281 (OMP_TASKGROUP_CLAUSES): Define.
1282 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1283 OMP_CLAUSE__LOOPTEMP_.
1284 (OMP_ATOMIC_SEQ_CST): Remove.
1285 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1286 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1287 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1288 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1289 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1290 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1291 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1292 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1293 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1294 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1296 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1297 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1298 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1299 (convert_local_omp_clauses): Likewise. Remove useless test.
1300 * tree-parloops.c (create_call_for_reduction_1): Pass
1301 OMP_MEMORY_ORDER_RELAXED as new argument to
1302 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1303 * tree-pretty-print.c (dump_omp_iterators): New function.
1304 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1305 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1306 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1307 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1308 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1309 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1310 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1311 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1312 (dump_omp_atomic_memory_order): New function.
1313 (dump_generic_node): Use it. Print taskgroup clauses. Print
1314 taskwait with depend clauses.
1315 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1316 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1317 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1318 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1319 write_ts_omp_clause_tree_pointers): Likewise.
1321 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1324 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1325 "-missed", "-note", and "-all" sub-options.
1326 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1328 (can_early_inline_edge_p): Likewise.
1329 (want_early_inline_function_p): Likewise.
1330 (want_inline_self_recursive_call_p): Likewise.
1331 (recursive_inlining): Likewise.
1332 (inline_small_functions): Likewise.
1333 (flatten_function): Likewise.
1334 (ipa_inline): Likewise.
1335 (inline_always_inline_functions): Likewise.
1336 (early_inline_small_functions): Likewise.
1337 (early_inliner): Likewise.
1338 * tree-inline.c (expand_call_inline): Likewise.
1340 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1342 * pretty-print.c (pp_format): Handle %f.
1343 (selftest::test_pp_format): Add test of %f.
1344 * pretty-print.h (pp_double): New macro.
1346 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1348 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1349 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1350 (dump_pretty_printer::decode_format): Implement "%C" for
1352 (selftest::test_capture_of_dump_calls): Rename "where" to
1353 "stmt_loc". Convert test_decl to a function decl and set its
1354 location. Add a symbol_table_test RAII instance and a
1355 cgraph_node, using it to test "%C" and dump_symtab_node.
1357 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1360 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1362 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1364 * cgraph.c: Include "selftest.h".
1365 (saved_symtab): New variable.
1366 (selftest::symbol_table_test::symbol_table_test): New ctor.
1367 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1368 (selftest::test_symbol_table_test): New test.
1369 (selftest::cgraph_c_tests): New.
1370 * cgraph.h (saved_symtab): New decl.
1371 (selftest::symbol_table_test): New class.
1372 * selftest-run-tests.c (selftest::run_tests): Call
1373 selftest::cgraph_c_tests.
1374 * selftest.h (selftest::cgraph_c_tests): New decl.
1376 2018-11-08 Richard Biener <rguenther@suse.de>
1378 * tree-data-ref.h (lambda_int): New typedef.
1379 (lambda_vector_gcd): Adjust.
1380 (lambda_vector_new): Likewise.
1381 (lambda_matrix_new): Likewise.
1382 * tree-data-ref.c (print_lambda_vector): Adjust.
1384 2018-11-08 Richard Biener <rguenther@suse.de>
1386 PR tree-optimization/87929
1387 * tree-complex.c (expand_complex_comparison): Clean EH.
1389 2018-11-08 Martin Liska <mliska@suse.cz>
1391 * doc/extend.texi: Reword.
1392 * predict.c (expr_expected_value_1): Likewise.
1394 2018-11-08 Richard Biener <rguenther@suse.de>
1396 PR tree-optimization/87913
1397 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1398 of extreme values to ordered comparisons.
1400 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1403 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1405 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1407 * doc/invoke.texi: Remove leading dash from @opindex entries
1408 throughout the file.
1410 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1413 * doc/invoke.texi (Option Summary): Add -e and --entry.
1414 (Link Options): Likewise.
1416 2018-11-07 Nathan Sidwell <nathan@acm.org>
1419 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1420 --disable-checking bootstrap.
1422 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1424 * configure: Regenerated.
1426 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1429 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1430 to the mode of the widest field iff the widest field has mode class
1431 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1434 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1436 * common.opt: Add -Wattribute-warning.
1437 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1438 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1439 call to allow user configure behavior of "warning" attribute.
1441 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1443 * target.def: Put @: after every vs., e.g., and i.e. where it is
1444 followed by whitespace.
1445 * doc/extend.texi: Ditto.
1446 * doc/fragments.texi: Ditto.
1447 * doc/gimple.texi: Ditto.
1448 * doc/implement-c.texi: Ditto.
1449 * doc/install.texi: Ditto.
1450 * doc/invoke.texi: Ditto.
1451 * doc/md.texi: Ditto.
1452 * doc/plugins.texi: Ditto.
1453 * doc/rtl.texi: Ditto.
1454 * doc/sourcebuild.texi: Ditto.
1455 * doc/tm.texi.in: Ditto.
1456 * doc/ux.texi: Ditto.
1457 * doc/tm.texi: Regenerate.
1459 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1461 * config/arm/arm-cpus.in (ares): New entry.
1462 * config/arm/arm-tables.opt: Regenerate.
1463 * config/arm/arm-tune.md: Likewise.
1464 * doc/invoke.texi (ARM Options): Document ares.
1466 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1468 * config/aarch64/aarch64-cores.def (ares): Define.
1469 * config/aarch64/aarch64-tune.md: Regenerate.
1470 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1472 2018-11-07 Jan Hubicka <jh@suse.cz>
1474 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1475 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1476 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1479 2018-11-07 Richard Biener <rguenther@suse.de>
1481 PR tree-optimization/87914
1482 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1484 (vectorizable_reduction): Handle shifts and rotates by dispatching
1485 to vectorizable_shift.
1486 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1487 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1489 (vectorizable_shift): Export and handle being called as
1491 (vect_analyze_stmt): Call vectorizable_shift after
1492 vectorizable_reduction.
1493 * tree-vectorizer.h (vectorizable_shift): Declare.
1495 2018-11-07 Jan Hubicka <jh@suse.cz>
1497 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1498 than const decls in TREE_VALUE of enum.
1499 (dump_type_inheritance_graph): Improve duplicate dumping.
1500 (free_enum_values): New.
1501 (build_type_inheritance_graph): Use it.
1502 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1503 which are not main variants or not ODR types.
1504 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1506 2018-11-07 Richard Biener <rguenther@suse.de>
1508 * ipa-inline.c (want_inline_small_function_p): Compute
1509 big_speedup_p lazily and last.
1511 2018-11-07 Jan Hubicka <jh@suse.cz>
1513 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1514 building incomplete variant of complete type.
1515 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1516 variant of complete type.
1518 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1520 * config/mips/mips.c: Fix typo in documentation of
1521 mips_loongson_ext2_prefetch_cookie.
1522 (mips_option_override): fix brain twister logical.
1523 * config/mips/mips.h: Fix typo in documentation of
1524 ISA_HAS_CTZ_CTO and define pattern.
1525 * config/mips/mips.md (prefetch): Hoist EXT2 above
1527 (prefetch_indexed): Hoist EXT2 above the EXT block.
1529 2018-11-07 Jan Hubicka <jh@suse.cz>
1531 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1532 return and parameter types of function and method types.
1533 (free_lang_data_in_cgraph): Update.
1535 2018-11-07 Martin Liska <mliska@suse.cz>
1537 PR rtl-optimization/87868
1538 * postreload-gcse.c (eliminate_partially_redundant_load): Set
1539 threshold to max_count if we would overflow.
1540 * profile-count.h: Make max_count a public constant.
1542 2018-11-07 Martin Liska <mliska@suse.cz>
1544 * mem-stats.h: Fix GNU coding style.
1546 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1548 * config/mips/gs264e.md: New.
1549 * config/mips/mips-cpus.def: Define gs264e.
1550 * config/mips/mips-tables.opt: Regenerate.
1551 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1553 (mips_issue_rate): Add support for gs264e.
1554 (mips_multipass_dfa_lookahead): Likewise.
1555 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1556 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1557 (MIPS_ASE_MSA_SPEC): New.
1558 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1559 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1560 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1561 * config/mips/mips.md: Include gs264e.md.
1562 (processor): Add gs264e.
1563 * config/mips/mips.opt (MSA): Use Mask instead of Var.
1564 * doc/invoke.texi: Add gs264e to supported architectures.
1566 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1568 * config/mips/gs464e.md: New.
1569 * config/mips/mips-cpus.def: Define gs464e.
1570 * config/mips/mips-tables.opt: Regenerate.
1571 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1573 (mips_issue_rate): Add support for gs464e.
1574 (mips_multipass_dfa_lookahead): Likewise.
1575 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1576 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1577 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1578 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1579 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1580 * config/mips/mips.md: Include gs464e.md.
1581 (processor): Add gs464e.
1582 * doc/invoke.texi: Add gs464e to supported architectures.
1584 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1586 * config/mips/loongson3a.md: Rename to ...
1587 * config/mips/gs464.md: ... here.
1588 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1589 as an alias of gs464 processor.
1590 * config/mips/mips-tables.opt: Regenerate.
1591 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1592 instead of PROCESSOR_LOONGSON_3A.
1593 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1595 (mips_option_override): Enable MMI and EXT for gs464.
1596 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1597 Rename TUNE_LOONGSON_3A to TUNE_GS464.
1598 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1599 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1600 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1602 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1603 (processor): Add gs464;
1604 * doc/invoke.texi: Add gs464 to supported architectures.
1606 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1608 * config/mips/mips-protos.h
1609 (mips_loongson_ext2_prefetch_cookie): New prototype.
1610 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1611 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1612 TARGET_LOONGSON_EXT2 is true.
1613 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1614 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1615 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1616 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1617 TARGET_LOONGSON_EXT2.
1618 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1619 (define_insn "ctz<mode>2"): New insn pattern.
1620 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1621 (define_insn "prefetch_indexed_<mode>"): Include
1622 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1623 * config/mips/mips.opt (-mloongson-ext2): Add option.
1624 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1626 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1628 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1629 __mips_loongson_ext.
1630 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1631 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1633 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1634 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1635 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1636 instead of TARGET_LOONGSON_3A.
1637 * config/mips/mips.opt (-mloongson-ext): Add option.
1638 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1640 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1642 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1643 * config/mips/loongson.md: Move to ...
1644 * config/mips/loongson-mmi.md: here; Adjustment.
1645 * config/mips/loongson.h: Move to ...
1646 State as deprecated. Include loongson-mmiintrin.h for back
1647 compatibility and warning.
1648 * config/mips/loongson-mmiintrin.h: ... here.
1649 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1650 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1651 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1652 (mips_option_override): Make sure MMI use hard float;
1653 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1654 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1655 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1656 TARGET_LOONGSON_VECTORS.
1657 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1658 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1659 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1660 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1662 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1663 TARGET_LOONGSON_VECTORS.
1664 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1665 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1666 (Loongson MMI patterns): Include loongson-mmi.md instead of
1668 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1669 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1671 2018-11-07 Richard Biener <rguenther@suse.de>
1674 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1675 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1677 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
1679 PR rtl-optimization/87874
1680 * lra.c (lra_substitute_pseudo): Do not create a subreg for
1683 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
1685 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1686 if not in indexed or indirect form.
1687 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1688 (bswap<mode>2_store): Ditto.
1690 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
1692 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1695 2018-11-06 Richard Biener <rguenther@suse.de>
1697 PR tree-optimization/86850
1698 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1699 instead of src.m_vec.
1701 2018-11-06 Jan Hubicka <jh@suse.cz>
1703 * tree.c (fld_simplified_type_name): Break out form ...
1704 (free_lang_data_in_type): ... here.
1705 (fld_type_variant_equal_p): Use it.
1707 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1709 * config/default-d.c: Include memmodel.h.
1711 * config/sol2-d.c: New file.
1712 * config/t-sol2 (sol2-d.o): New rule.
1713 * config.gcc <*-*-solaris2*>: Set d_target_objs,
1714 target_has_targetdm.
1716 2018-11-06 Jan Hubicka <jh@suse.cz>
1718 * tree.c (fld_type_variant): Also copy alignment; be sure that
1719 new variant is equal.
1721 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
1724 * config/s390/s390.md: Add relative_long attribute.
1726 2018-11-06 Jan Hubicka <jh@suse.cz>
1728 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1729 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1730 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1731 stream TYPE_NEEDS_CONSTRUCTING.
1732 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1733 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1735 2018-11-06 Richard Biener <rguenther@suse.de>
1737 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1739 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1741 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1743 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1744 REG_CLASS_CONTENTS[GEN_REGS].
1745 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1747 2018-11-06 Jan Hubicka <jh@suse.cz>
1749 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1751 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1754 * config/sol2.h (ASAN_CC1_SPEC): Define.
1755 (LD_WHOLE_ARCHIVE_OPTION): Define.
1756 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1757 (ASAN_REJECT_SPEC): Provide default.
1758 (LIBASAN_EARLY_SPEC): Define.
1759 (LIBTSAN_EARLY_SPEC): Define.
1760 (LIBLSAN_EARLY_SPEC): Define.
1761 * config/i386/sol2.h (CC1_SPEC): Redefine.
1762 (ASAN_REJECT_SPEC): Define.
1764 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1765 (TARGET_ASAN_SHADOW_OFFSET): Define.
1766 (sparc_asan_shadow_offset): New function.
1767 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1768 (ASAN_REJECT_SPEC): Define.
1770 2018-11-06 Jan Hubicka <jh@suse.cz>
1772 * tree.c (fld_type_variant): Copy canonical type.
1773 (fld_incomplete_type_of): Check that canonical types looks sane;
1774 copy canonical type.
1775 (verify_type): Accept when incomplete type has complete canonical type.
1777 2018-11-06 Jan Hubicka <jh@suse.cz>
1779 * tree.c (free_lang_data): Reset overwite_assembler_name,
1780 print_xnode, print_decl, print_type and print_identifier of
1783 2018-11-06 Richard Biener <rguenther@suse.de>
1785 PR tree-optimization/87889
1786 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1787 Do nothing if old and new arg are the same
1789 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
1792 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1793 attributes for operands 3 and 4.
1795 2018-11-06 Richard Biener <rguenther@suse.de>
1798 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1799 matching bitfield insertion.
1801 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
1803 * auto-inc-dec.c: Include valtrack.h. Improve comments.
1804 (reg_next_debug_use): New.
1805 (attempt_change): Propagate adjusted expression into affected
1807 (merge_in_block): Track uses in debug insns.
1808 (pass_inc_dec::execute): Allocate and release
1811 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1813 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1814 (_mm512_fixupimm_round_pd): Update parameters and builtin.
1815 (_mm512_maskz_fixupimm_round_pd): Ditto.
1816 (_mm512_fixupimm_round_ps): Ditto.
1817 (_mm512_maskz_fixupimm_round_ps): Ditto.
1818 (_mm_fixupimm_round_sd): Ditto.
1819 (_mm_maskz_fixupimm_round_sd): Ditto.
1820 (_mm_fixupimm_round_ss): Ditto.
1821 (_mm_maskz_fixupimm_round_ss): Ditto.
1822 (_mm512_fixupimm_pd): Ditto.
1823 (_mm512_maskz_fixupimm_pd): Ditto.
1824 (_mm512_fixupimm_ps): Ditto.
1825 (_mm512_maskz_fixupimm_ps): Ditto.
1826 (_mm_fixupimm_sd): Ditto.
1827 (_mm_maskz_fixupimm_sd): Ditto.
1828 (_mm_fixupimm_ss): Ditto.
1829 (_mm_maskz_fixupimm_ss): Ditto.
1830 (_mm512_mask_fixupimm_round_pd): Update builtin.
1831 (_mm512_mask_fixupimm_round_ps): Ditto.
1832 (_mm_mask_fixupimm_round_sd): Ditto.
1833 (_mm_mask_fixupimm_round_ss): Ditto.
1834 (_mm512_mask_fixupimm_pd): Ditto.
1835 (_mm512_mask_fixupimm_ps): Ditto.
1836 (_mm_mask_fixupimm_sd): Ditto.
1837 (_mm_mask_fixupimm_ss): Ditto.
1838 * config/i386/avx512vlintrin.h:
1839 (_mm256_fixupimm_pd): Update parameters and builtin.
1840 (_mm256_maskz_fixupimm_pd): Ditto.
1841 (_mm256_fixupimm_ps): Ditto.
1842 (_mm256_maskz_fixupimm_ps): Ditto.
1843 (_mm_fixupimm_pd): Ditto.
1844 (_mm_maskz_fixupimm_pd): Ditto.
1845 (_mm_fixupimm_ps): Ditto.
1846 (_mm_maskz_fixupimm_ps): Ditto.
1847 (_mm256_mask_fixupimm_pd): Update builtin.
1848 (_mm256_mask_fixupimm_ps): Ditto.
1849 (_mm_mask_fixupimm_pd): Ditto.
1850 (_mm_mask_fixupimm_ps): Ditto.
1851 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1852 * config/i386/i386-builtin.def: Update builtin definitions.
1853 * config/i386/i386.c: Handle new builtin types and remove useless ones.
1854 * config/i386/sse.md: Update VFIXUPIMM* patterns.
1855 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1856 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1857 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1858 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1859 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1860 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1861 * config/i386/subst.md:
1862 (round_saeonly_sd_mask_operand4): Add new subst_attr.
1863 (round_saeonly_sd_mask_op4): Ditto.
1864 (round_saeonly_expand_operand5): Ditto.
1865 (round_saeonly_expand): Update.
1867 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
1869 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1871 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1873 PR rtl-optimization/87871
1874 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1876 2018-11-05 Paul Koning <ni1d@arrl.net>
1878 * doc/sourcebuild.texi (target attributes): Document new "inf"
1879 effective target keyword.
1881 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1883 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1884 moves involving the CC reg.
1886 2018-11-05 Richard Biener <rguenther@suse.de>
1888 PR tree-optimization/87873
1889 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1891 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1892 * tree-vect-loop.c (vect_transform_loop): When splitting the
1893 loop exit also create forwarder PHIs for constants.
1894 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1895 Handle constant to_arg, add extra checking we match up the correct
1898 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1900 * config/s390/s390.md: QImode and HImode for load on condition.
1902 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1904 * config/s390/predicates.md: Fix typo.
1905 * config/s390/s390.md: Allow immediates for load on condition.
1907 2018-11-05 Martin Liska <mliska@suse.cz>
1909 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1910 * bitmap.h (struct bitmap_usage): Likewise.
1911 * ggc-common.c (SCALE): Remove.
1913 (struct ggc_usage): Use SIZE_AMOUNT. And update
1915 * ggc-page.c (SCALE): Remove.
1916 (STAT_LABEL): Remove.
1917 (ggc_print_statistics): Use SIZE_AMOUNT.
1918 * gimple.h (SCALE): Remove.
1920 * input.c (ONE_K): Remove.
1923 (STAT_LABEL): Likewise.
1924 (FORMAT_AMOUNT): Likewise.
1925 (dump_line_table_statistics): Use SIZE_AMOUNT.
1926 * mem-stats.h (struct mem_usage): Likewise.
1927 * rtl.c (dump_rtx_statistics): Likewise.
1928 (rtx_alloc_counts): Change type to size_t.
1929 (rtx_alloc_sizes): Likewise.
1930 (rtx_count_cmp): New.
1931 (dump_rtx_statistics): Sort first based on counts.
1932 * tree.c (tree_nodes_cmp): New.
1933 (tree_codes_cmp): New.
1934 (dump_tree_statistics): Sort first based on counts.
1935 * system.h (ONE_K): New.
1937 (SIZE_SCALE): Likewise.
1938 (SIZE_LABEL): Likewise.
1939 (SIZE_AMOUNT): Likewise.
1940 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1941 * tree-dfa.c (dump_dfa_stats): Likewise.
1942 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1943 * tree-ssanames.c (ssanames_print_statistics): Likewise.
1944 * tree.c (dump_tree_statistics): Likewise.
1945 * vec.c (struct vec_usage): Likewise.
1946 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1947 trigger a -Werror=format-overflow with
1948 --enable-gather-detailed-stats.
1950 2018-11-05 Martin Liska <mliska@suse.cz>
1952 * mem-stats.h (mem_alloc_description::release_instance_overhead):
1954 * vec.c (struct vec_usage): Register m_element_size.
1955 (vec_prefix::register_overhead): New arguments: elements and
1957 (vec_prefix::release_overhead): Subtract elements.
1958 * vec.h (struct vec_prefix): Change signature.
1959 (va_heap::reserve): Pass proper arguments.
1960 (va_heap::release): Likewise.
1962 2018-11-05 Martin Liska <mliska@suse.cz>
1964 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1968 2018-11-05 Richard Biener <rguenther@suse.de>
1970 * tree-scalar-evolution.h (final_value_replacement_loop): Update
1972 * tree-scalar-evolution.c (final_value_replacement_loop): Return
1973 whether anything was done.
1974 (scev_const_prop): Remove constant propagation part, fold
1976 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1977 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1980 2018-11-05 Jakub Jelinek <jakub@redhat.com>
1982 PR tree-optimization/87859
1983 * gimple-ssa-store-merging.c (struct merged_store_group): Add
1984 only_constants and first_nonmergeable_order members.
1985 (merged_store_group::merged_store_group): Initialize them.
1986 (merged_store_group::do_merge): Clear only_constants member if
1987 adding something other than INTEGER_CST store.
1988 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1989 stores with order >= first_nonmergeable_order. Use
1990 merged_store->only_constants instead of always recomputing it.
1991 Set merged_store->first_nonmergeable_order if we've skipped any
1992 stores. Attempt to merge overlapping INTEGER_CST stores that
1993 we would otherwise skip.
1996 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1998 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2001 * config/i386/emmintrin.h (__v16qs): New to cope with option
2003 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2004 (_mm_cmplt_epi8): Likewise.
2005 (_mm_cmpgt_epi8): Likewise.
2007 2018-11-05 Richard Biener <rguenther@suse.de>
2009 PR rtl-optimization/87852
2010 * fwprop.c (use_killed_between): Only consider single-defs of the
2011 use whose definition statement dominates the use.
2013 2018-11-05 Martin Liska <mliska@suse.cz>
2016 * doc/invoke.texi: Remove options that are
2017 not disabled with -Os.
2019 2018-11-05 Martin Liska <mliska@suse.cz>
2022 * doc/extend.texi: Update constrain about the last argument
2023 of __builtin_expect_with_probability.
2025 2018-11-05 Martin Liska <mliska@suse.cz>
2028 * predict.c (expr_expected_value_1): Verify
2029 that last argument is a real constants and emit
2032 2018-11-05 Martin Liska <mliska@suse.cz>
2034 PR gcov-profile/77698
2035 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2038 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2040 PR tree-optimization/86572
2041 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2043 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2045 PR tree-optimization/87672
2046 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2047 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2049 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2052 * cfgexpand.c (pass_expand::execute): Move the call to
2053 finish_eh_generation in front of the call to expand_stack_alignment.
2055 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2057 * common/config/i386/i386-common.c (processor_alias_table): Add
2059 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2060 (case ${target}): Add znver2.
2061 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2062 -march=native recognize znver2 processors.
2063 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2064 * config/i386/i386.c (m_znver2): New definition.
2065 (m_ZNVER): New definition.
2066 (m_AMD_MULTIPLE): Includes m_znver2.
2067 (processor_cost_table): Add znver2 entry.
2068 (processor_target_table): Add znver2 entry.
2069 (get_builtin_code_for_version): Set priority for
2071 (processor_model): Add M_AMDFAM17H_ZNVER2.
2072 (arch_names_table): Ditto.
2073 (ix86_reassociation_width): Include znver2.
2074 * config/i386/i386.h (TARGET_znver2): New definition.
2075 (struct ix86_size_cost): Add TARGET_ZNVER2.
2076 (enum processor_type): Add PROCESSOR_ZNVER2.
2077 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2078 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2079 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2080 (ix86_adjust_cost): Add znver2.
2081 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2082 * gcc/doc/extend.texi: Add details about znver2.
2083 * gcc/doc/invoke.texi: Add details about znver2.
2085 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2089 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2092 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2094 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2095 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2097 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2099 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2100 shrink-wrapping when -mtrack-speculation.
2102 2018-11-02 Richard Biener <rguenther@suse.de>
2104 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2105 (pop_cost_one_pair): Do not free pair.
2106 (pop_best_coalesce): Likewise.
2107 (create_coalesce_list): Initialize obstack.
2108 (delete_coalesce_list): Free obstack.
2109 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2110 (add_cost_one_coalesce): Likewise.
2111 (struct live_track): Remove bitmap pointer indirections.
2112 (new_live_track): Adjust.
2113 (delete_live_track): Likewise.
2114 (live_track_remove_partition): Likewise.
2115 (live_track_add_partition): Likewise.
2116 (live_track_live_p): Likewise.
2117 (live_track_process_def): Likewise.
2118 (live_track_clear_base_vars): Likewise.
2120 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2122 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2123 * configure: Regenerate.
2124 * config.in: Regenerate.
2125 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2126 HAVE_AS_REGISTER_PSEUDO_OP guard.
2127 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2128 !HAVE_AS_REGISTER_PSEUDO_OP support.
2129 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2132 2018-11-02 Richard Biener <rguenther@suse.de>
2134 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2137 2018-11-02 Richard Biener <rguenther@suse.de>
2139 PR tree-optimization/87776
2140 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2141 executable when iterating but running into rpo-vn-max-loop-depth
2142 and not eliding the iteration.
2144 2018-11-30 Jan Hubicka <jh@suse.cz>
2146 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2149 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2151 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2153 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2154 Combine with rs6000_address_for_fpconvert.
2155 (rs6000_address_for_fpconvert): Combine with
2156 rs6000_force_indexed_or_indirect_mem.
2157 (rs6000_expand_vector_init): Change function call from
2158 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2159 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2160 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2161 (floatsi<mode>2_lfiwax_mem): Ditto.
2162 (floatunssi<mode>2_lfiwzx): Ditto.
2163 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2164 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2165 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2166 (fix_trunc<mode>si2_stfiwx): Ditto.
2167 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2168 (float_<mode>si2_hw): Ditto.
2169 (floatuns_<mode>si2_hw): Ditto.
2170 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2171 (vsx_splat_<mode>): Ditto.
2173 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2175 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2176 at end of assembler input text.
2177 * configure: Regenerate.
2179 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2181 PR tree-optimization/87826
2182 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2183 negative or larger or equal to type's precision.
2185 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2187 * opts.c (default_options_table): Do not enable
2188 OPT_fdelayed_branch at -Og.
2189 * doc/invoke.texi (-fdelayed-branch): Document it.
2191 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2193 * optabs-libfuncs.c (build_libfunc_function_visibility):
2194 New, split out from...
2195 (build_libfunc_function): ... here.
2196 (init_one_libfunc_visibility): New, split out from ...
2197 (init_one_libfunc): ... here.
2199 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2200 scratch register need not be early-clobber. Document the reason
2201 why we cannot use ST<OP>.
2203 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2206 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2207 line for second argument of AC_DEFINE_UNQUOTED.
2208 * doc/install.texi (Tools/packages necessary for modifying GCC):
2209 Update to autoconf 2.69 and automake 1.15.1.
2210 * aclocal.m4, config.in, configure: Regenerate.
2212 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2214 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2217 2018-10-31 Martin Liska <mliska@suse.cz>
2220 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2221 Add new argument invalid_extension.
2222 (aarch64_get_all_extension_candidates): New function.
2223 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2224 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2226 (aarch64_get_all_extension_candidates): New function.
2227 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2228 argument invalid_extension.
2229 (aarch64_parse_cpu): Likewise.
2230 (aarch64_print_hint_for_extensions): New function.
2231 (aarch64_validate_mcpu): Provide hint about invalid extension.
2232 (aarch64_validate_march): Likewise.
2233 (aarch64_handle_attr_arch): Pass new argument.
2234 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2235 (aarch64_handle_attr_isa_flags): Likewise.
2237 2018-10-31 Richard Biener <rguenther@suse.de>
2241 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2242 copy generation to useful cases. Place the copy before
2243 the definition of the backedge value when possible.
2245 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2247 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2248 * config/arc/arc.c (arc_active_insn): New function.
2249 (check_store_cacheline_hazard): Likewise.
2250 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2251 (arc_override_options): Disable delay slot scheduler for older
2253 (arc_store_addr_hazard_p): New implementation, old one renamed to
2255 (arc_store_addr_hazard_internal_p): Renamed.
2256 (arc_reorg): Don't combine into brcc instructions which are part
2257 of hardware hazard solution.
2258 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2259 (tune_arc700): Likewise.
2260 * config/arc/arc.opt (arc7xx): New tune value.
2261 * config/arc/arc700.md: Improve A7 scheduler.
2263 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2265 * config/arc/arc.c (arc_override_options): Remove
2266 TARGET_COMPACT_CASESI.
2267 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2268 (CASE_VECTOR_MODE): Likewise.
2269 (CASE_VECTOR_PC_RELATIVE): Likewise.
2270 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2271 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2272 (ADDR_VEC_ALIGN): Update.
2273 (ASM_OUTPUT_CASE_LABEL): Undefine.
2274 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2275 (TARGET_BI_BIH): Define.
2276 (DEFAULT_BRANCH_INDEX): Likewise.
2277 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2278 instructions, remove compact_casesi use case.
2279 (casesi_compact_jump): Remove.
2280 (casesi_dispatch): New pattern.
2281 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2282 compact_casesi option.
2283 * doc/invoke.texi: Document mbranch-index option.
2285 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2287 * config/arc/arc.c (arc_get_tp): Remove function.
2288 (arc_emit_call_tls_get_addr): Likewise.
2289 (arc_call_tls_get_addr): New function.
2290 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2291 * config/arc/arc.md (tls_load_tp_soft): Remove.
2292 (tls_gd_get_addr): Likewise.
2294 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2296 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2297 (mulsi3_600_lib): Remove pattern.
2298 (umulsi3_highpart_600_lib_le): Likewise.
2299 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2300 (umulsidi3): Remove call to umulsidi3_600_lib.
2301 (umulsidi3_600_lib): Remove pattern.
2302 (peephole2): Remove peephole using the above deprecated patterns.
2304 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2307 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2308 use of -mslow-flash-data and -mword-relocations.
2309 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2310 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2312 * doc/invoke.texi (-mword-relocations): Mention conflict with
2314 (-mslow-flash-data): Reciprocally.
2316 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2318 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2319 16-byte modes held in GP registers to use an even regno.
2321 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2322 (aarch64_atomic_ldop_supported_p): Remove.
2323 (aarch64_gen_atomic_ldop): Remove.
2324 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2325 Fully expand LSE operations here.
2326 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2327 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2328 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2329 and use ATOMIC_LDOP instead; use register_operand for the input;
2330 drop the split and emit insns directly.
2331 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2332 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2333 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2335 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2336 (aarch64_gen_atomic_ldop): Don't call it.
2337 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2338 Use aarch64_reg_or_zero.
2339 (aarch64_atomic_exchange<ALLI>): Likewise.
2340 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2341 operand 0; use aarch64_reg_or_zero for input; merge ...
2342 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2344 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2345 (aarch64_split_compare_and_swap): Use it.
2346 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2347 test oldval against the proper predicate.
2348 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2349 Use nonmemory_operand for expected.
2350 (cas_short_expected_pred): New.
2351 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2352 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2353 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2354 (aarch64_plushi_operand): New.
2356 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2357 Force oldval into the rval register for TARGET_LSE; emit the compare
2358 during initial expansion so that it may be deleted if unused.
2359 (aarch64_gen_atomic_cas): Remove.
2360 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2361 Change =&r to +r for operand 0; use match_dup for operand 2;
2362 remove is_weak and mod_f operands as unused. Drop the split
2364 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2365 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2366 (@aarch64_atomic_cas<GPI>): Similarly.
2368 2018-10-31 Richard Biener <rguenther@suse.de>
2370 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2373 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2375 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2376 * config/aarch64/aarch64.md: Include saphira.md
2377 * config/aarch64/saphira.md: New file for pipeline description.
2379 2018-10-30 Martin Sebor <msebor@redhat.com>
2382 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2384 (sprintf_dom_walker::compute_format_length):
2385 Avoid setting POSUNDER4K here.
2386 (get_destination_size): Handle null argument values.
2387 (get_user_idx_format): New function.
2388 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2389 functions, including user-defined with attribute format printf.
2390 Use %G to include inlining context.
2391 Set POSUNDER4K here.
2393 2018-10-30 Jan Hubicka <jh@suse.cz>
2395 * params.def (lto-partitions): Bump from 32 to 128.
2397 2018-10-30 Jan Hubicka <jh@suse.cz>
2400 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2402 (free_lang_data_in_type): Forward declare.
2403 (fld_type_variant_equal_p): New function.
2404 (fld_type_variant): New function
2405 (fld_incomplete_types): New hash.
2406 (fld_incomplete_type_of): New function
2407 (fld_simplfied-type): New function.
2408 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2409 (free_lang_data): Allocate and free fld_incomplete_type; update call
2410 of free_lang_data_in_decl.
2412 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2414 * gcov.c (output_lines): Remove duplicate line.
2416 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2418 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2419 if not in indexed or indirect form.
2420 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2421 (bswapdi2_store): Ditto.
2422 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2424 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2425 Prototype for helper function.
2427 2018-10-30 Martin Sebor <msebor@redhat.com>
2429 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2430 (target, pragma GCC optimize, pragma GCC target): Ditto.
2432 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2434 * doc/extend.texi: Fix prototype and description of
2435 __builtin_expect_with_probability.
2437 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2439 * cgraph.h (clone_function_name_1): Replaced by new
2440 clone_function_name_numbered that takes name as string; for
2441 privatize_symbol_name_1 use only.
2442 (clone_function_name): Renamed to
2443 clone_function_name_numbered to be explicit about numbering.
2444 (clone_function_name): New two-argument function that does
2445 not number its output.
2446 (clone_function_name): New three-argument function that
2447 takes a number to append to its output.
2448 * cgraphclones.c (duplicate_thunk_for_node):
2449 (clone_function_name_1): Renamed.
2450 (clone_function_name_numbered): Two new functions.
2451 (clone_function_name): Improved documentation.
2452 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2453 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2454 * final.c (final_scan_insn_1): Use the new clone_function_name
2456 * multiple_target.c (create_dispatcher_calls): Ditto.
2457 (create_target_clone): Ditto.
2458 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2459 * omp-low.c (create_omp_child_function_name): Ditto.
2460 * omp-simd-clone.c (simd_clone_create): Ditto.
2461 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2462 new clone_function_name without numbering.
2464 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2466 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2467 Assert that the allocation size is not zero.
2469 2018-10-30 Richard Biener <rguenther@suse.de>
2471 PR tree-optimization/87800
2472 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2473 non-induction or reduction PHIs.
2475 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2477 * config/aarch64/falkor-tag-collision-avoidance.c
2478 (execute_tag_collision_avoidance): Call df_note_add_problem.
2480 2018-10-30 Martin Liska <mliska@suse.cz>
2482 * doc/extend.texi: Fix typo in documentation
2483 of __builtin_expect_with_probability.
2485 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2488 * input.c (get_substring_ranges_for_loc): Detect if
2489 linemap_resolve_location gives us a NULL map, and reject
2492 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2494 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2496 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2497 Martin Sebor <msebor@redhat.com>
2498 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2500 * doc/ux.texi (Quoting): New subsection, adapted from material at
2501 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2502 MartinSebor and ManuelLopezIbanez.
2503 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2506 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2509 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2512 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2514 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2516 2018-10-29 Paul Koning <ni1d@arrl.net>
2518 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2520 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2522 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2523 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2524 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2525 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2526 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2527 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2528 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2529 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2530 Change 'vector' to '__vector'.
2531 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2532 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2533 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2534 _mm_avg_pu16): Likewise. And, whitespace corrections.
2536 2018-10-29 Richard Biener <rguenther@suse.de>
2538 PR tree-optimization/87785
2539 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2542 2018-10-29 Olivier Hainque <hainque@adacore.com>
2544 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2546 2018-10-29 Olivier Hainque <hainque@adacore.com>
2548 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2549 ports configuration macro, defaults to "gnu".
2550 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2551 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2553 2018-10-29 Olivier Hainque <hainque@adacore.com>
2555 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2557 2018-10-29 Richard Biener <rguenther@suse.de>
2559 PR tree-optimization/87790
2560 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2561 (vect_make_slp_decision): Adjust.
2562 (vect_slp_analyze_bb_1): Likewise.
2563 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2566 2018-10-29 Richard Biener <rguenther@suse.de>
2568 PR tree-optimization/87785
2569 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2571 (vect_build_slp_tree): Likewise.
2572 (vect_gather_slp_loads): New function.
2573 (vect_analyze_slp_instance): Gather loads separately from the
2576 2018-10-29 Martin Liska <mliska@suse.cz>
2578 * Makefile.in: Make dependency to json.o.
2579 * doc/gcov.texi: Document new JSON format, remove
2580 old intermediate format documentation.
2581 * gcov.c (struct function_info): Come up with m_name and
2583 (function_info::function_info): Initialize it.
2584 (function_info::~function_info): Release it.
2585 (main): Rename flag_intermediate_format to flag_json_format.
2586 (print_usage): Describe --json-format.
2587 (process_args): Set flag_json_format.
2588 (output_intermediate_line): Remove.
2589 (output_intermediate_json_line): Likewise.
2590 (get_gcov_intermediate_filename): Return new extension
2592 (output_intermediate_file): Implement JSON emission.
2593 (output_json_intermediate_file): Implement JSON emission.
2594 (generate_results): Use ::get_name for function name.
2595 Handle JSON output file.
2596 (read_graph_file): Use ::get_name instead of cplus_demangle.
2597 (read_count_file): Likewise.
2598 (solve_flow_graph): Likewise.
2599 (add_line_counts): Likewise.
2600 (accumulate_line_counts): Use new flag_json_format.
2601 (output_function_details): Use ::get_name instead of cplus_demangle.
2602 (output_lines): Likewise.
2603 * json.cc (test_writing_literals): Add new tests.
2604 * json.h (class literal): Add new boolean constructor.
2606 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
2608 PR rtl-optimization/87701
2609 PR rtl-optimization/87780
2610 * combine.c (make_more_copies): Rewrite.
2612 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2614 * doc/generic.texi (ABSU_EXPR): Document.
2615 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2616 (absu(absu(X)) -> absu(X)): Likewise.
2617 (absu(-X) -> absu(X)): Likewise.
2618 (absu(X) where X is nonnegative -> X): Likewise.
2620 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2622 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2623 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2624 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2625 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2626 (s-tm-texi): Also check timestamp on d-target.def.
2627 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2628 (build/genhooks.o): Also depend on D_TARGET_DEF.
2629 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2631 * config/aarch64/aarch64-d.c: New file.
2632 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2634 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2636 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2637 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2638 * config/arm/arm-d.c: New file.
2639 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2640 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2641 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2642 * config/arm/t-arm (arm-d.o): New rule.
2643 * config/default-d.c: New file.
2644 * config/glibc-d.c: New file.
2645 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2646 * config/i386/i386-d.c: New file.
2647 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2648 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2649 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2650 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2651 * config/i386/t-i386 (i386-d.o): New rule.
2652 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2653 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2654 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2655 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2656 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2657 * config/mips/mips-d.c: New file.
2658 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2659 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2660 * config/mips/t-mips (mips-d.o): New rule.
2661 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2662 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2663 * config/powerpcspe/powerpcspe-d.c: New file.
2664 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2666 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2667 Support GNU D by using 0 as the language type.
2668 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2669 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2670 * config/riscv/riscv-d.c: New file.
2671 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2673 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2674 * config/riscv/t-riscv (riscv-d.o): New rule.
2675 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2676 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2677 * config/rs6000/rs6000-d.c: New file.
2678 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2680 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2681 Support GNU D by using 0 as the language type.
2682 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2683 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2684 * config/s390/s390-d.c: New file.
2685 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2686 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2687 * config/s390/t-s390 (s390-d.o): New rule.
2688 * config/sparc/sparc-d.c: New file.
2689 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2691 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2692 * config/sparc/t-sparc (sparc-d.o): New rule.
2693 * config/t-glibc (glibc-d.o): New rule.
2694 * configure: Regenerated.
2695 * configure.ac (tm_d_file): New variable.
2696 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2697 * doc/contrib.texi (Contributors): Add self for the D frontend.
2698 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2699 * doc/install.texi (Configuration): Mention libphobos as an option for
2700 --enable-shared. Mention d as an option for --enable-languages.
2701 (Testing): Mention check-d as a target.
2702 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2703 name suffixes. Mention d as a -x option.
2704 * doc/sourcebuild.texi (Top Level): Mention libphobos.
2705 * doc/standards.texi (Standards): Add section on D language.
2706 * doc/tm.texi: Regenerated.
2707 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2708 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2709 * dwarf2out.c (is_dlang): New function.
2710 (gen_compile_unit_die): Use DW_LANG_D for D.
2711 (declare_in_namespace): Return module die for D, instead of adding
2712 extra declarations into the namespace.
2713 (gen_namespace_die): Generate DW_TAG_module for D.
2714 (gen_decl_die): Handle CONST_DECLSs for D.
2715 (dwarf2out_decl): Likewise.
2716 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2717 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2718 kinds of aggregates.
2719 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2720 * genhooks.c: Include d/d-target.def.
2722 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2725 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2726 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2727 (STACK_DYNAMIC_OFFSET): Likewise.
2729 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
2732 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2735 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2737 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2738 return type and other typos.
2740 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2742 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2743 a shorter sequence with fewer branches.
2744 (emit_final_str_compare_gpr): Ditto.
2746 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2748 * config/rs6000/tmmintrin.h: New file.
2749 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2751 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2753 * config/rs6000/mmintrin.h: Enable 32bit compilation.
2754 * config/rs6000/xmmintrin.h: Likewise.
2756 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2758 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2760 2018-10-26 Richard Biener <rguenther@suse.de>
2762 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2764 (vect_mark_slp_stmts_relevant): Likewise.
2765 (vect_detect_hybrid_slp_stmts): Likewise.
2766 (vect_bb_slp_scalar_cost): Likewise.
2767 (vect_remove_slp_scalar_calls): Likewise.
2769 2018-10-26 Jan Hubicka <jh@suse.cz>
2771 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2772 (warn_types_mismatch): Fix walk of DECL_NAME.
2773 (odr_types_equivalent_p): Fix overactive assert.
2775 2018-10-26 Richard Biener <rguenther@suse.de>
2777 PR tree-optimization/87105
2778 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2779 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2781 (vect_create_new_slp_node): Initialize refcnt to one.
2783 (scalar_stmts_set_t, bst_fail): Remove.
2784 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2785 (vect_build_slp_tree): Add bst_map argument and lookup
2786 already created SLP nodes.
2787 (vect_print_slp_tree): Handle a SLP graph, print SLP node
2789 (vect_slp_rearrange_stmts): Handle a SLP graph.
2790 (vect_analyze_slp_instance): Adjust and free SLP nodes from
2791 the CSE map. Fix indenting.
2792 (vect_schedule_slp_instance): Add short-cut.
2794 2018-10-26 Martin Liska <mliska@suse.cz>
2797 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2798 addr_expr and not with pointers.
2800 2018-10-26 Jan Hubicka <jh@suse.cz>
2802 * tree.c (free_lang_data_in_type): Only check main variants.
2803 * ipa-devirt.c (warn_odr): Make static.
2804 (types_same_for_odr): Drop strict variant.
2805 (types_odr_comparable): Likewise.
2806 (odr_or_derived_type_p): Look for main variants.
2807 (odr_name_hasher::equal): Cleanup comment.
2808 (odr_subtypes_equivalent): Add warn and warned arguments; check main
2810 (type_variants_equivalent_p): break out from ...
2811 (odr_types_equivalent): ... here; go for main variants where needed.
2812 (warn_odr): ... here; turn static.
2813 (warn_types_mismatch): Compare mangled names of main variants.
2814 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2815 (type_with_linkage_p): Sanity check that we look at main variant.
2816 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2817 * tree.h (types_same_for_odr): Drop strict argument.
2819 2018-10-26 Richard Biener <rguenther@suse.de>
2821 PR tree-optimization/87746
2822 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2823 Simplify and fix WRT strided store groups with size not
2824 equal to step in element count.
2825 (vect_analyze_group_access_1): Dump the whole group.
2827 2018-10-25 Carl Love <cel@us.ibm.com>
2829 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2830 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2831 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
2832 precicion entry for each overloaded builtin.
2833 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2834 VSCEDPUO): Rename overloaded name.
2835 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2836 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2837 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2838 define_expand for xscmpexqp instruction.
2839 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2841 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2842 Jinsong Ji <jji@us.ibm.com>
2844 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2845 function with vec_sl.
2846 (_mm_slli_epi32): Likewise.
2847 (_mm_slli_epi64): Likewise.
2848 (_mm_srai_epi16): Replace deprecated function with vec_sra.
2849 (_mm_srai_epi32): Likewise.
2850 (_mm_srli_epi16): Replace deprecated function with vec_sr.
2851 (_mm_srli_epi32): Likewise.
2852 (_mm_srli_epi64): Likewise.
2853 (_mm_sll_epi16): Replace deprecated function with vec_sl.
2854 (_mm_sll_epi32): Likewise.
2855 (_mm_sll_epi64): Likewise.
2856 (_mm_sra_epi16): Replace deprecated function with vec_sra.
2857 (_mm_sra_epi32): Likewise.
2858 (_mm_srl_epi16): Replace deprecated function with vec_sr.
2859 (_mm_srl_epi32): Likewise.
2860 (_mm_srl_epi64): Likewise.
2862 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2863 Jinsong Ji <jji@us.ibm.com>
2865 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2866 comparison operators with vec_cmp* for compatibility due to
2867 unfortunate history; clean up formatting and use types more
2869 (_mm_sll_epi32): Likewise.
2870 (_mm_sll_epi64): Likewise.
2871 (_mm_srl_epi16): Likewise.
2872 (_mm_srl_epi32): Likewise.
2873 (_mm_srl_epi64): Likewise.
2875 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2876 Jinsong Ji <jji@us.ibm.com>
2878 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2879 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2880 __vector __bool int. Use vec_cmpgt in preference to deprecated
2881 function vec_vcmpgtfp.
2882 (_mm_max_ps): Likewise.
2884 2018-10-25 Jeff Law <law@redhat.com>
2886 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2889 2018-10-25 Martin Sebor <msebor@redhat.com>
2891 * doc/extend.texi (aligned): Expand attribute description.
2892 (Alignment): Rename section. Discuss function arguments.
2894 2018-10-25 Jan Hubicka <jh@suse.cz>
2896 * ipa-devirt.c (main_odr_variant): Remove.
2897 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2898 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2899 Drop use of main_odr_variant.
2900 (add_type_duplicate): Silence confused warnings on integer types.
2901 (get_odr_type): Always look for main variant.
2902 (register_odr_type): Simplify.
2904 2018-10-25 Richard Biener <rguenther@suse.de>
2906 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2907 Initialize ng to silence error with release checking bootstrap.
2909 2018-10-25 Richard Biener <rguenther@suse.de>
2911 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2912 (tree_if_conversion): Run CSE on the if-converted loop body.
2914 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2916 * config/s390/constraints.md (ZL): New constraint.
2917 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2919 * config/s390/s390.md (movdi_larl): Remove.
2920 (movdi_64): Add the LARL alternative.
2922 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2925 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2926 (RTX_CODE_HWINT_P): New macro.
2927 (rtx_code_size): Use RTX_CODE_HWINT_P ().
2929 2018-10-25 Jan Hubicka <jh@suse.cz>
2931 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2934 2018-10-25 Richard Biener <rguenther@suse.de>
2936 PR tree-optimization/87665
2937 PR tree-optimization/87745
2938 * tree-vectorizer.h (get_earlier_stmt): Remove.
2939 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2941 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
2943 * options.texi (Deprecated): Move list to Var section.
2945 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
2946 Jinsong Ji <jji@us.ibm.com>
2948 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2949 __vector long to __vector long long.
2950 (_mm_cvtpd_ps): Likewise.
2951 (_mm_cvttpd_epi32): Likewise.
2952 (_mm_cvtpi32_pd): Likewise.
2953 (_mm_unpackhi_epi64): Likewise.
2954 (_mm_unpacklo_epi64): Likewise.
2956 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
2958 PR rtl-optimization/87720
2959 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2961 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
2963 * gimple-ssa-isolate-paths.c
2964 (find_implicit_erroneous_behavior): Do not change code if the
2965 pass is running for warnings only.
2966 (find_explicit_erroneous_behavior): Likewise.
2968 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
2970 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2971 Define as rs6000_mangle_decl_assembler_name.
2972 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2973 long double to IEEE long double, switch the names of the long
2974 double built-in functions to be <func>f128 instead of <func>l.
2976 2018-10-24 Martin Sebor <msebor@redhat.com>
2978 * doc/extend.texi (nonnull): List no-argument form. Reference
2979 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2981 2018-10-24 Richard Biener <rguenther@suse.de>
2983 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2985 2018-10-24 Martin Liska <mliska@suse.cz>
2987 PR tree-optimization/84436
2988 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2990 (switch_conversion::contains_linear_function_p): New.
2991 (switch_conversion::build_one_array): Support linear
2992 transformation on input.
2993 * tree-switch-conversion.h (struct switch_conversion): Add
2994 contains_linear_function_p declaration.
2996 2018-10-24 Richard Biener <rguenther@suse.de>
2998 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2999 if its argument is CONSTANT_CLASS_P.
3001 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3003 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3004 it is wrong for forward declarations.
3006 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3008 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3009 SYMBOL_REF_P () check.
3011 2018-10-24 Richard Biener <rguenther@suse.de>
3013 PR tree-optimization/87105
3014 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3015 dump classification.
3016 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3017 stores by splitting the affected group after the fact.
3018 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3019 fail the SLP build because of size constraints.
3021 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3023 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3024 * configure: Regenerate.
3025 * config.in: Regenerate.
3026 * varasm.c (mergeable_string_section): Use readonly_data_section
3027 if linker doesn't support SHF_MERGE with alignment > 8.
3028 (mergeable_constant_section): Likewise.
3030 2018-10-24 Richard Biener <rguenther@suse.de>
3032 PR tree-optimization/84013
3033 * tree-ssa-structalias.c (struct msdi_data): New struct for
3034 marshalling data to walk_stmt_load_store_ops.
3035 (maybe_set_dependence_info): Refactor as callback for
3036 walk_stmt_load_store_ops.
3037 (compute_dependence_clique): Set restrict info on all stmt kinds.
3039 2018-10-24 Martin Liska <mliska@suse.cz>
3041 * cgraph.c (cgraph_node::dump):
3042 Remove reduntant dumps and make tp_first_run dump more compact.
3044 2018-10-24 Richard Biener <rguenther@suse.de>
3046 PR tree-optimization/87665
3047 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3050 2018-10-12 Jeff Law <law@redhat.com>
3052 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3055 2018-10-23 Richard Biener <rguenther@suse.de>
3057 * tree-vrp.c (add_assert_info): Guard dump_printf with
3059 * gimple-ssa-evrp-analyze.c
3060 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3061 Use value_range::ignore_equivs_equal_p.
3063 2018-10-23 Richard Biener <rguenther@suse.de>
3065 PR tree-optimization/87105
3066 PR tree-optimization/87608
3067 * passes.def (pass_all_early_optimizations): Add early phi-opt
3069 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3070 addition to debug stmts.
3071 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3072 and abs replacement early.
3073 * tree-cfg.c (gimple_empty_block_p): Likewise.
3075 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3078 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3079 specified to configure.
3080 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3082 2018-10-23 Richard Biener <rguenther@suse.de>
3084 PR tree-optimization/87700
3085 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3087 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3090 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3091 second argument from __mmask16 to __mmask8.
3092 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3093 _mm_mask_packs_epi32): Likewise.
3094 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3096 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3098 2018-10-23 Richard Biener <rguenther@suse.de>
3100 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3102 2018-10-23 Richard Biener <rguenther@suse.de>
3104 PR tree-optimization/86144
3105 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3106 over simd attribute.
3108 2018-10-23 Richard Biener <rguenther@suse.de>
3110 PR tree-optimization/87693
3111 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3112 the case we do not find the taken edge.
3114 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3115 Jinsong Ji <jji@us.ibm.com>
3117 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3118 (_mm_store_pd): Use unaligned vector type for pointer cast.
3119 (_mm_maskmoveu_si128): Likewise.
3120 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3121 (_mm_store_ps): Use unaligned vector type for pointer cast.
3123 2018-10-22 Paul Koning <ni1d@arrl.net>
3125 * symtab.c (symtab_node::increase_alignment): Correct max
3128 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3130 PR tree-optimization/87633
3131 * match.pd: Do not generate unordered integer comparisons.
3133 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3135 PR rtl-optimization/87600
3136 * combine.c: Add include of expr.h.
3137 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3138 register to a pseudo.
3139 (make_more_copies): New function, add a copy to a new pseudo after
3140 the moves from hard registers into pseudos.
3141 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3142 later. Call make_more_copies.
3144 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3146 * lra-constraints.c (process_alt_operands): New local array,
3147 matching_early_clobber. Check matching_early_clobber before
3148 decrementing reject, and set matching_early_clobber after.
3150 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3153 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3154 call output_addr_const and hope for the best.
3156 2018-10-22 Richard Biener <rguenther@suse.de>
3158 * gimple-ssa-evrp-analyze.c
3159 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3160 smarter about what ranges to use.
3161 * tree-vrp.c (add_assert_info): Dump here.
3162 (register_edge_assert_for_2): Instead of here at multiple but
3165 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3166 * gcc.dg/predict-6.c: Adjust.
3167 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3168 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3169 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3171 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3172 Richard Biener <rguenther@suse.de>
3174 * bitmap.h: Update data structure documentation, including a
3175 description of bitmap views as either linked-lists or splay trees.
3176 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3177 (struct bitmap_head_def): Likewise.
3178 (bitmap_list_view, bitmap_tree_view): New prototypes.
3179 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3181 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3182 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3183 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3184 released bitmap element here.
3185 (bitmap_element_free): Remove.
3186 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3187 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3188 this function similar ones such that linked-list bitmap implementation
3189 functions are grouped.
3190 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3191 and moved for grouping.
3192 (bitmap_list_insert_element_after): Renamed from
3193 bitmap_elt_insert_after, and moved for grouping.
3194 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3195 (bitmap_tree_link_left, bitmap_tree_link_right,
3196 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3197 bitmap_tree_link_element, bitmap_tree_unlink_element,
3198 bitmap_tree_find_element): New functions for splay-tree bitmap
3200 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3201 Renamed and moved, see above entries.
3202 (bitmap_tree_listify_from): New function to convert part of a splay
3203 tree bitmap to a linked-list bitmap.
3204 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3205 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3206 (bitmap_find_bit): Remove.
3207 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3208 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3209 Handle splay tree bitmaps.
3210 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3211 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3212 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3213 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3214 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3215 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3216 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3217 corresponding changes to use linked-list specific bitmap_element
3218 manipulation functions as applicable for efficiency.
3219 (bitmap_tree_to_vec): New function.
3220 (debug_bitmap_elt_file): New function split out from ...
3221 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3222 (bitmap_print): Likewise.
3224 PR tree-optimization/63155
3225 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3227 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3230 2018-10-22 Martin Liska <mliska@suse.cz>
3232 PR tree-optimization/87686
3234 2018-08-29 Martin Liska <mliska@suse.cz>
3236 * tree-switch-conversion.c (switch_conversion::expand):
3237 Strenghten assumption about gswitch statements.
3239 2018-10-22 Martin Liska <mliska@suse.cz>
3241 * ipa-icf.c (sem_item::compare_attributes): Remove.
3242 (sem_item::compare_referenced_symbol_properties): Use
3243 attribute_list_equal instead.
3244 (sem_function::equals_wpa): Likewise.
3245 * ipa-icf.h: Remove compare_attributes.
3247 2018-10-22 Richard Biener <rguenther@suse.de>
3250 * mem-stats.h (mem_usage::operator==): Fix pasto.
3252 2018-10-22 Richard Biener <rguenther@suse.de>
3254 PR tree-optimization/87640
3255 * tree-vrp.c (set_value_range_with_overflow): Decompose
3257 (extract_range_from_binary_expr_1): Adjust.
3259 2018-10-22 Martin Jambor <mjambor@suse.cz>
3261 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3262 (stmt_can_throw_external): Likewise.
3263 (stmt_can_throw_internal): Likewise.
3264 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3265 (lower_eh_constructs_2): Likewise.
3266 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3267 (stmt_can_throw_external): Likewise.
3268 (stmt_can_throw_internal): Likewise.
3269 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3270 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3271 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3272 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3273 (pass_lower_eh_dispatch::execute): Pass cfun to
3274 stmt_can_throw_external.
3275 (cleanup_empty_eh): Likewise.
3276 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3277 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3278 stmt_can_throw_external instead of pushing it to cfun.
3279 (symbol_table::create_edge): Likewise.
3280 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3281 stmt_can_throw_internal.
3282 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3283 to stmt_could_throw_p.
3284 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3285 stmt_can_throw_internal.
3286 (pass_store_merging::execute): Likewise.
3287 * gimple-ssa-strength-reduction.c
3288 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3290 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3291 stmt_can_throw_internal.
3292 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3293 to stmt_can_throw_external.
3294 (check_stmt): Pass cfun to stmt_could_throw_p.
3295 (check_stmt): Pass cfun to stmt_can_throw_external.
3296 (pass_nothrow::execute): Likewise.
3297 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3298 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3299 stmt_can_throw_internal.
3300 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3301 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3302 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3303 * tree-complex.c (expand_complex_libcall): Pass cfun to
3304 stmt_could_throw_p and to stmt_can_throw_internal.
3305 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3306 * tree-inline.c (copy_edges_for_bb): Likewise.
3307 (maybe_move_debug_stmts_to_successors): Likewise.
3308 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3310 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3311 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3312 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3313 stmt_can_throw_internal.
3314 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3315 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3317 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3318 stmt_can_throw_internal.
3319 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3320 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3322 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3323 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3324 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3325 (convert_mult_to_fma_1): Likewise.
3326 (convert_to_divmod): Likewise.
3327 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3328 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3329 * tree-ssa-propagate.c
3330 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3331 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3332 (maybe_optimize_range_tests): Likewise.
3333 (linearize_expr_tree): Likewise.
3334 (reassociate_bb): Likewise.
3335 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3336 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3337 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3338 (handle_char_store): Likewise.
3339 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3340 stmt_can_throw_internal.
3341 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3343 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3344 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3345 (vectorizable_simd_clone_call): Likewise.
3346 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3347 (gimple_stringop_fixed_value): Likewise.
3349 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3351 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3352 literal pool references.
3353 (s390_check_qrst_address): Adapt to the new behavior of
3354 s390_loadrelative_operand_p ().
3356 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3359 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3361 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3364 * config/i386/sse.md (*<code><mode>3_bcst): New.
3366 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3369 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3370 V4DI, V16SI and V8DI.
3371 (*sub<mode>3<mask_name>_bcst): New.
3372 (*add<mode>3<mask_name>_bcst): Likewise.
3374 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3375 Jinsong Ji <jji@us.ibm.com>
3377 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3378 __m64 with __vector unsigned long long for compatibility.
3379 (_mm_movemask_epi8): Likewise.
3380 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3381 (_mm_cvttps_pi32): Likewise.
3382 (_mm_cvtpi32_ps): Likewise.
3383 (_mm_cvtps_pi16): Likewise.
3384 (_mm_loadh_pi): Likewise.
3385 (_mm_storeh_pi): Likewise.
3386 (_mm_movehl_ps): Likewise.
3387 (_mm_movelh_ps): Likewise.
3388 (_mm_loadl_pi): Likewise.
3389 (_mm_storel_pi): Likewise.
3390 (_mm_movemask_ps): Likewise.
3391 (_mm_shuffle_pi16): Likewise.
3393 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3396 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3397 __builtin_ia32_vfnmsubpd512_mask.
3398 (_mm512_mask_fnmsub_round_pd): Likewise.
3399 (_mm512_fnmsub_pd): Likewise.
3400 (_mm512_mask_fnmsub_pd): Likewise.
3401 (_mm512_maskz_fnmsub_round_pd): Use
3402 __builtin_ia32_vfnmsubpd512_maskz.
3403 (_mm512_maskz_fnmsub_pd): Likewise.
3404 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3405 (_mm512_mask_fnmsub_round_ps): Likewise.
3406 (_mm512_fnmsub_ps): Likewise.
3407 (_mm512_mask_fnmsub_ps): Likewise.
3408 (_mm512_maskz_fnmsub_round_ps): Use
3409 __builtin_ia32_vfnmsubps512_maskz.
3410 (_mm512_maskz_fnmsub_ps): Likewise.
3411 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3412 __builtin_ia32_vfnmsubpd256_mask.
3413 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3414 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3415 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3416 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3417 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3418 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3419 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3420 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3421 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3422 __builtin_ia32_vfnmsubpd.
3423 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3424 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3425 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3426 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3427 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3428 * config/i386/i386-builtin.def: Add
3429 __builtin_ia32_vfnmsubpd256_mask,
3430 __builtin_ia32_vfnmsubpd256_maskz,
3431 __builtin_ia32_vfnmsubpd128_mask,
3432 __builtin_ia32_vfnmsubpd128_maskz,
3433 __builtin_ia32_vfnmsubps256_mask,
3434 __builtin_ia32_vfnmsubps256_maskz,
3435 __builtin_ia32_vfnmsubps128_mask,
3436 __builtin_ia32_vfnmsubps128_maskz,
3437 __builtin_ia32_vfnmsubpd512_mask,
3438 __builtin_ia32_vfnmsubpd512_maskz,
3439 __builtin_ia32_vfnmsubps512_mask,
3440 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3441 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3442 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3443 __builtin_ia32_vfnmsubpd256.
3444 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3445 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3446 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3448 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3450 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3452 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3454 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3457 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3458 __builtin_ia32_vfnmaddpd512_mask.
3459 (_mm512_mask_fnmadd_round_pd): Likewise.
3460 (_mm512_fnmadd_pd): Likewise.
3461 (_mm512_mask_fnmadd_pd): Likewise.
3462 (_mm512_maskz_fnmadd_round_pd): Use
3463 __builtin_ia32_vfnmaddpd512_maskz.
3464 (_mm512_maskz_fnmadd_pd): Likewise.
3465 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3466 (_mm512_mask_fnmadd_round_ps): Likewise.
3467 (_mm512_fnmadd_ps): Likewise.
3468 (_mm512_mask_fnmadd_ps): Likewise.
3469 (_mm512_maskz_fnmadd_round_ps): Use
3470 __builtin_ia32_vfnmaddps512_maskz.
3471 (_mm512_maskz_fnmadd_ps): Likewise.
3472 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3473 __builtin_ia32_vfnmaddpd256_mask.
3474 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3475 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3476 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3477 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3478 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3479 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3480 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3481 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3482 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3483 __builtin_ia32_vfnmaddpd.
3484 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3485 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3486 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3487 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3488 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3489 * config/i386/i386-builtin.def: Add
3490 __builtin_ia32_vfnmaddpd256_mask,
3491 __builtin_ia32_vfnmaddpd256_maskz,
3492 __builtin_ia32_vfnmaddpd128_mask,
3493 __builtin_ia32_vfnmaddpd128_maskz,
3494 __builtin_ia32_vfnmaddps256_mask,
3495 __builtin_ia32_vfnmaddps256_maskz,
3496 __builtin_ia32_vfnmaddps128_mask,
3497 __builtin_ia32_vfnmaddps128_maskz,
3498 __builtin_ia32_vfnmaddpd512_mask,
3499 __builtin_ia32_vfnmaddpd512_maskz,
3500 __builtin_ia32_vfnmaddps512_mask,
3501 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3502 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3503 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3504 __builtin_ia32_vfnmaddpd256.
3505 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3506 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3507 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3509 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3511 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3513 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3515 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3518 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3519 __builtin_ia32_vfmsubpd512_mask.
3520 (_mm512_mask_fmsub_round_pd): Likewise.
3521 (_mm512_fmsub_pd): Likewise.
3522 (_mm512_mask_fmsub_pd): Likewise.
3523 (_mm512_maskz_fmsub_round_pd): Use
3524 __builtin_ia32_vfmsubpd512_maskz.
3525 (_mm512_maskz_fmsub_pd): Likewise.
3526 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3527 (_mm512_mask_fmsub_round_ps): Likewise.
3528 (_mm512_fmsub_ps): Likewise.
3529 (_mm512_mask_fmsub_ps): Likewise.
3530 (_mm512_maskz_fmsub_round_ps): Use
3531 __builtin_ia32_vfmsubps512_maskz.
3532 (_mm512_maskz_fmsub_ps): Likewise.
3533 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3534 __builtin_ia32_vfmsubpd256_mask.
3535 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3536 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3537 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3538 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3539 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3540 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3541 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3542 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3543 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3544 __builtin_ia32_vfmsubpd.
3545 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3546 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3547 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3548 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3549 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3550 * config/i386/i386-builtin.def: Add
3551 __builtin_ia32_vfmsubpd256_mask,
3552 __builtin_ia32_vfmsubpd256_maskz,
3553 __builtin_ia32_vfmsubpd128_mask,
3554 __builtin_ia32_vfmsubpd128_maskz,
3555 __builtin_ia32_vfmsubps256_mask,
3556 __builtin_ia32_vfmsubps256_maskz,
3557 __builtin_ia32_vfmsubps128_mask,
3558 __builtin_ia32_vfmsubps128_maskz,
3559 __builtin_ia32_vfmsubpd512_mask,
3560 __builtin_ia32_vfmsubpd512_maskz,
3561 __builtin_ia32_vfmsubps512_mask,
3562 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3563 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3564 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3565 __builtin_ia32_vfmsubpd256.
3566 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3567 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3568 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3570 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3572 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3574 (fmai_vmfmsub_<mode><round_name>): Likewise.
3576 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3578 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3579 Remove plus. Renamed to ...
3580 (*sub<mode>3<mask_name>_bcst): This.
3581 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3582 (*add<mode>3<mask_name>_bcst): This.
3584 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3587 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3589 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3592 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3593 (_mm_or_epi32): Likewise.
3594 (_mm256_xor_epi32): Likewise.
3595 (_mm_xor_epi32): Likewise.
3596 (_mm256_or_epi64): Likewise.
3597 (_mm_or_epi64): Likewise.
3598 (_mm256_xor_epi64): Likewise.
3599 (_mm_xor_epi64): Likewise.
3601 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
3604 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3606 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3609 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3611 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3613 * doc/ux.texi: Move @section directly after @node.
3615 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3619 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3620 depend closely nested inside of loop with ordered clause with
3623 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3625 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3626 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3627 * doc/ux.texi: New file.
3629 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3631 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3632 be the first CR field allocated.
3634 2018-10-19 Richard Biener <rguenther@suse.de>
3637 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3638 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3640 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3643 * config/i386/sse.md
3644 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3645 (*add<mode>3<mask_name>_bcst_2): Likewise.
3647 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3649 * config/i386/sse.md
3650 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3651 Replace nonimmediate_operand with register_operand.
3652 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3654 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3657 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3659 PR rtl-optimization/87596
3660 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3661 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3662 for instructions in FROM..TO range.
3664 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
3666 * cfgexpand.c (expand_one_var): Use specific wording in error message
3667 for non-local frame variables.
3668 * stor-layout.c (layout_decl): Do not issue a warning for them.
3670 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
3672 * haifa-sched.c (priority): Add force_recompute parameter.
3673 (apply_replacement): Call priority () with force_recompute = true.
3674 (restore_pattern): Likewise.
3676 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3678 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3679 HOST_BITS_PER_WIDE_INT.
3680 (test_vector_ops_duplicate): Likewise.
3682 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3685 * config/i386/sse.md (VF_AVX512): New.
3686 (avx512bcst): Likewise.
3687 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3689 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3691 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3694 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
3696 * doc/invoke.texi (-dumpversion): Improve grammar.
3697 (-dumpfullversion): Make more consistent with -dumpversion.
3699 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3701 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3702 Set JUMP_LABEL to the jump insn.
3703 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3704 Predict emitted jump and add label to jump insn.
3706 2018-10-18 David Malcolm <dmalcolm@redhat.com>
3708 PR tree-optimization/87562
3709 * input.c (get_substring_ranges_for_loc): Use
3710 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3711 getting the linemap for the endpoint. Verify that it's either
3712 in the same linemap as the start point's spelling location, or
3713 at least in the same file.
3715 2018-10-18 Richard Biener <rguenther@suse.de>
3717 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3718 feed width-specific load/store costs through ix86_vec_cost.
3719 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3720 (k8_cost): Likewise.
3721 (bdver_cost): Likewise.
3722 (znver1_cost): Likewise.
3723 (btver1_cost): Likewise.
3724 (btver2_cost): Likewise.
3726 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3728 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3729 to simplify subreg of vec_merge.
3731 2018-10-18 Richard Biener <rguenther@suse.de>
3733 * config/i386/i386.c: Fix costing of vector FMA.
3735 2018-10-18 Richard Biener <rguenther@suse.de>
3737 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3739 (ix86_builtin_vectorization_cost): For vec_construct properly
3740 cost insertion into SSE regs.
3741 (...): Adjust calls to ix86_vec_cost.
3743 2018-10-18 Richard Biener <rguenther@suse.de>
3747 2018-02-07 Richard Biener <rguenther@suse.de>
3749 PR tree-optimization/84204
3750 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3753 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3756 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3758 (test_vector_ops_duplicate): Add test for a scalar subreg of a
3759 VEC_MERGE of a VEC_DUPLICATE.
3761 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3763 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3764 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3765 * doc/standards.texi (C Language): Document C2X.
3766 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3767 (rl78_option_override): Handle "GNU C2X" language name.
3769 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3771 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3772 Document C17 as published in 2018.
3774 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3777 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3778 bail out if both sides do not have the same storage order.
3780 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3782 * bitmap.c (bitmap_head::dump): New.
3783 * bitmap.h (bitmap_head): Add dump().
3784 * gimple-ssa-evrp-analyze.c
3785 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3786 (evrp_range_analyzer::set_ssa_range_info): Same.
3787 (evrp_range_analyzer::record_ranges_from_phis): Same.
3788 (evrp_range_analyzer::record_ranges_from_stmt): Same.
3789 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3790 * gimple-ssa-sprintf.c (get_int_range): Same.
3791 (format_integer): Same.
3792 (sprintf_dom_walker::handle_gimple_call): Same.
3793 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3794 (ipcp_vr_lattice::top_p): Same.
3795 (ipcp_vr_lattice::bottom_p): Same.
3796 (ipcp_vr_lattice::set_to_bottom): Same.
3797 (ipa_vr_operation_and_type_effects): Same.
3798 (propagate_vr_across_jump_function): Same.
3799 (ipcp_store_vr_results): Same.
3800 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3801 (ipa_print_node_jump_functions_for_edge): Same.
3802 (ipa_get_value_range): Same.
3803 (ipa_compute_jump_functions_for_edge): Same.
3804 (ipa_write_jump_function): Same.
3805 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3806 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3808 * vr-values.c (set_value_range_to_nonnegative): Same.
3809 (set_value_range_to_truthvalue): Same.
3810 (vr_values::get_value_range): Same.
3811 (vr_values::set_defs_to_varying): Same.
3812 (vr_values::update_value_range): Same.
3813 (symbolic_range_based_on_p): Same.
3814 (vr_values::op_with_boolean_value_range_p): Same.
3815 (vr_values::extract_range_for_var_from_comparison_expr): Same.
3816 (vr_values::extract_range_from_ssa_name): Same.
3817 (vr_values::extract_range_from_binary_expr): Same.
3818 (vr_values::extract_range_from_unary_expr): Same.
3819 (vr_values::extract_range_from_cond_expr): Same.
3820 (vr_values::extract_range_from_comparison): Same.
3821 (vr_values::check_for_binary_op_overflow): Same.
3822 (vr_values::extract_range_basic): Same.
3823 (vr_values::extract_range_from_assignment): Same.
3824 (compare_ranges): Same.
3825 (compare_range_with_value): Same.
3826 (vr_values::adjust_range_with_scev): Same.
3827 (vrp_valueize): Same.
3828 (vrp_valueize_1): Same.
3829 (vr_values::get_vr_for_comparison): Same.
3830 (vr_values::compare_name_with_value): Same.
3831 (vr_values::compare_names): Same.
3832 (vr_values::vrp_evaluate_conditional): Same.
3833 (find_case_label_ranges): Same.
3834 (vr_values::vrp_visit_switch_stmt): Same.
3835 (vr_values::extract_range_from_phi_node): Same.
3836 (vr_values::simplify_div_or_mod_using_ranges): Same.
3837 (vr_values::simplify_bit_ops_using_ranges): Same.
3838 (test_for_singularity): Same.
3839 (range_fits_type_p): Same.
3840 (vr_values::simplify_cond_using_ranges_1): Same.
3841 (vr_values::simplify_switch_using_ranges): Same.
3842 (vr_values::simplify_float_conversion_using_ranges): Same.
3843 (vr_values::two_valued_val_range_p): Same.
3844 (vr_values::add_equivalence): Move to value_range::equiv_add.
3845 * vr-values.h (vr_values::add_equivalence): Remove.
3846 (VR_INITIALIZER): Remove.
3847 * tree-vrp.c (value_range::set): New.
3848 (value_range::equiv_add): New.
3849 (value_range::value_range): New.
3850 (value_range::deep_copy): New.
3851 (value_range::check): New.
3852 (value_range::equal_p): New.
3853 (value_range::ignore_equivs_equal_p): New.
3854 (value_range::operator==): New.
3855 (value_range::operator!=): New.
3856 (value_range::symbolic_p): New.
3857 (value_range::numeric_p): New.
3858 (value_range::set_undefined): New.
3859 (value_range::set_varying): New.
3860 (value_range::may_contain_p): New.
3861 (value_range::equiv_clear): New.
3862 (value_range::singleton_p): New.
3863 (value_range::intersect): New.
3864 (value_range::dump): New.
3865 (value_range::set_and_canonicalize): New.
3866 (set_value_range): Adjust for value_range API.
3867 (set_value_range_to_undefined): Same.
3868 (set_value_range_to_varying): Same.
3869 (set_and_canonicalize_value_range): Same.
3870 (set_value_range_to_nonnull): Same.
3871 (set_value_range_to_null): Same.
3872 (range_is_null): Same.
3873 (range_is_nonnull): Same.
3874 (range_int_cst_p): Same.
3875 (range_int_cst_singleton_p): Same.
3876 (symbolic_range_p): Same.
3877 (range_includes_zero_p): Same.
3878 (value_range_constant_singleton): Same.
3879 (vrp_set_zero_nonzero_bits): Same.
3880 (ranges_from_anti_range): Same.
3881 (extract_range_into_wide_ints): Same.
3882 (extract_range_from_multiplicative_op): Same.
3883 (set_value_range_with_overflow): Same.
3884 (extract_range_from_binary_expr_1): Same.
3885 (extract_range_from_unary_expr): Same.
3886 (dump_value_range): Same.
3887 (debug_value_range): Same.
3888 (vrp_prop::check_array_ref): Same.
3889 (vrp_prop::check_mem_ref): Same.
3890 (vrp_prop::vrp_initialize): Same.
3891 (vrp_prop::visit_stmt): Same.
3892 (intersect_ranges): Same.
3893 (vrp_prop::visit_phi): Same.
3894 (vrp_prop::vrp_finalize): Same.
3895 (determine_value_range_1): Same.
3896 (determine_value_range): Same.
3897 (vrp_intersect_ranges_1): Rename to...
3898 (vrp_intersect_1): this.
3899 (vrp_intersect_ranges): Rename to...
3900 (value_range::intersect_helper): ...this.
3901 (vrp_meet_1): Rename to...
3902 (value_range::union_helper): ...this.
3903 (vrp_meet): Rename to...
3904 (value_range::union_): ...this.
3905 (copy_value_range): Remove.
3906 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3907 (value_range::vrtype): New.
3908 (value_range::type): New.
3909 (value_range::equiv): New.
3910 (value_range::min): New.
3911 (value_range::max): New.
3912 (value_range::varying_p): New.
3913 (value_range::undefined_p): New.
3914 (value_range::null_p): New.
3915 (value_range::equiv_add): New.
3916 (copy_value_range): Remove.
3918 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3920 * Makefile.in (SELFTEST_TARGETS): New.
3921 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3922 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3923 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3925 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3926 (selftest-c++-gdb, selftest-c++-valgrind): Move to
3928 * configure: Regenerate.
3929 * configure.ac (selftest_languages): New.
3931 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3933 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3934 overflow wraps argument.
3935 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3936 wide_int_range_multiplicative_op.
3937 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3938 overflow wraps argument.
3939 (wide_int_range_multiplicative_op): Same.
3940 (wide_int_range_lshift): Same.
3941 (wide_int_range_div): Same.
3942 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3943 (wide_int_range_lshift): Same.
3944 (wide_int_range_div): Same.
3946 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3948 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3949 use sign as argument.
3950 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3951 wide_int_range_shift_undefined_p.
3953 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3955 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3957 (@despeculate_copy<ALLI_TI:mode>): ... This.
3958 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3961 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3963 * config.gcc: Obsolete *-*-solaris2.10*.
3964 * doc/install.texi (Specific, *-*-solaris2*): Document it.
3966 2018-10-12 Jeff Law <law@redhat.com>
3968 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3969 reg + sym +- const_int addressing modes.
3971 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3973 * common.opt (fdiagnostics-minimum-margin-width=): New option.
3974 * diagnostic-show-locus.c (layout::layout): Apply the minimum
3976 (layout::start_annotation_line): Only print up to 3 of the
3977 margin character, to avoid touching the left-hand side.
3978 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3979 minimum margin width, as set by test_diagnostic_context's ctor.
3980 (selftest::test_fixit_insert_containing_newline): Likewise.
3981 (selftest::test_fixit_insert_containing_newline_2): Likewise.
3982 (selftest::test_line_numbers_multiline_range): Clear
3983 dc.min_margin_width.
3984 * diagnostic.c (diagnostic_initialize): Initialize
3986 * diagnostic.h (struct diagnostic_context): Add field
3988 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3989 * opts.c (common_handle_option): Handle
3990 OPT_fdiagnostics_minimum_margin_width_.
3991 * selftest-diagnostic.c
3992 (selftest::test_diagnostic_context::test_diagnostic_context):
3993 Initialize min_margin_width to 6.
3994 * toplev.c (general_init): Initialize global_dc->min_margin_width.
3996 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3998 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3999 Fix usage of "error_at_rich_loc" in the comment.
4001 2018-10-15 Renlin Li <renlin.li@arm.com>
4004 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4005 if-conversioned loop when it contains ifn with types not
4006 supported by backend.
4007 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4008 (direct_internal_fn_supported_p): New helper function.
4009 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4011 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4014 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4015 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4016 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4018 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4020 PR tree-optimization/87022
4021 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4022 bits in dist vector rather than the first one.
4024 2018-10-15 Richard Biener <rguenther@suse.de>
4027 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4028 (visit_loadstore): When a used restrict tag escaped verify that
4029 the points-to solution of "other" pointers do not include
4031 (compute_dependence_clique): If a used restrict tag escaped
4032 communicated that down to visit_loadstore.
4034 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4036 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4037 into reg if it isn't a general operand.
4039 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4042 * config/i386/sse.md (*vec_dupv2di): Add register source to
4045 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4048 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4049 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4050 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4051 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4053 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4055 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4056 (notice_args_size): Set it in the current trace if no insn that can
4057 throw internally has been seen yet.
4058 (connect_traces): When connecting args_size between traces, allow the
4059 incoming values not to match if there is an insn setting it before the
4060 first insn that can throw internally; in that case, force the creation
4061 of a CFI note on this latter insn.
4063 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4065 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4066 the base class, because using the injected-class-name was not clearly
4067 specified until DR 176.
4069 2018-10-12 Paul Koning <ni1d@arrl.net>
4071 * config/pdp11/pdp11.md (doloop_end): New expander.
4072 (doloop_end_insn): renamed from "doloop_end".
4073 (addqi3): New pattern.
4074 (subqi3): New pattern.
4075 * config/pdp11/predicates.md (incdec_operand): New predicate.
4077 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4080 * real.c (format_helper::can_represent_integral_type_p): New function
4081 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4082 * match.pd: New pattern.
4084 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4086 * configure.ac: Introduce --enable-large-address-aware
4087 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4088 * doc/install.texi: Document it.
4089 * configure, config.in: Rebuilt.
4090 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4091 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4092 (LINK_SPEC): Insert it.
4093 * config/i386/mingw-w64.h: Likewise.
4095 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4097 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4099 PR rtl-optimization/87600
4100 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4102 2018-10-12 Paul Koning <ni1d@arrl.net>
4104 * doc/md.texi (doloop_end): Document that the pattern code may
4105 need to check operand mode.
4107 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4109 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4110 to zero-extend between int and floating-point registers.
4111 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4112 ldp into floating-point registers. Add type and arch attributes.
4113 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4114 Use f_loads for type attribute.
4116 2018-10-11 Martin Sebor <msebor@redhat.com>
4118 * doc/extend.texi (attribute packed): Correct typos.
4120 2018-10-11 Martin Sebor <msebor@redhat.com>
4122 * doc/extend.texi (attribute flatten): Mention interaction with
4125 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4128 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4129 Set new_decl virtual flag to zero.
4131 2018-10-11 Martin Sebor <msebor@redhat.com>
4134 * doc/extend.texi (attribute format_arg): Discuss using multiple
4135 attributes on a single function.
4137 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4139 PR tree-optimization/86829
4140 * match.pd (sin (atan (x))): New simplification rules.
4141 (cos (atan (x))): Likewise.
4142 * real.c (build_sinatan_real): New function.
4143 * real.h (build_sinatan_real): Prototype.
4145 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4147 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4149 (fold_mergeeo_helper): New helper function.
4150 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4151 intrinsics. Correct some whitespace indentation issues.
4153 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4156 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4157 Use HOST_WIDE_INT_1U for shift.
4159 2018-10-11 Doug Rupp <rupp@adacore.com>
4160 Olivier Hainque <hainque@adacore.com>
4162 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4163 Pass --relax to the linker for RTPs.
4164 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4166 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4167 Jan Hubicka <jh@suse.cz>
4168 Martin Jambor <mjambor@suse.cz>
4170 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4171 the same elements are repeated rather than printing all of them.
4172 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4173 "repeated" elements.
4174 * read-rtl-function.c (test_loading_repeat): New function.
4175 (read_rtl_function_c_tests): Call test_loading_repeat.
4176 * rtl-tests.c (test_dumping_repeat): New function.
4177 (rtl_tests_c_tests): Call test_dumping_repeat.
4179 2018-10-11 Richard Biener <rguenther@suse.de>
4181 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4182 bdver?_cost): Unify to ...
4183 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4184 * config/i386/i386.c (processor_cost_table): Adjust.
4186 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4189 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4190 the thunk when expanding to GIMPLE.
4192 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4194 * varasm.c (mergeable_string_section): Don't try to move zero-length
4195 strings to the merge section.
4197 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4200 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4202 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4205 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4206 to special_args set.
4208 2018-10-10 Richard Biener <rguenther@suse.de>
4210 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4211 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4212 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4213 and recursing and pattern terminating the recursion on SSE
4214 vector width using ix86_expand_reduc.
4215 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4216 width and recursing and SSE2 vector variant doing the final
4217 reduction with ix86_expand_reduc.
4218 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4219 with terminating the recursion at AVX level, splitting that
4222 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4224 * genmatch.c (error_cb): Rename to...
4225 (diagnostic_cb): ...this, converting int params to enums.
4226 (fatal_at): Update for renaming.
4227 (warning_at): Likewise.
4229 * input.c (selftest::ebcdic_execution_charset::apply):
4230 Update for renaming of...
4231 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4233 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4234 converting level and reason to enums.
4235 (class selftest::lexer_error_sink): Rename to...
4236 (class selftest::lexer_test_options): ...this, renaming field
4237 "m_errors" to "m_diagnostics".
4238 (selftest::lexer_test_options::apply): Update for renaming of...
4239 (selftest::lexer_test_options::on_error): ...this, renaming to...
4240 (selftest::lexer_test_options::on_diagnostic): ...this
4241 converting level and reason to enums.
4242 (selftest::test_lexer_string_locations_raw_string_unterminated):
4243 Update for renamings.
4244 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4247 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4249 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4250 * config/rs6000/pmmintrin.h: New file.
4252 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4254 PR tree-optimization/86659
4255 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4257 2018-10-09 Richard Biener <rguenther@suse.de>
4259 PR tree-optimization/63155
4260 * tree-ssa-structalias.c: Include tree-ssa.h.
4261 (get_constraint_for_ssa_var): For undefs return nothing_id.
4262 (find_func_aliases): Cleanup PHI handling.
4264 2018-10-09 Richard Biener <rguenther@suse.de>
4266 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4269 2018-10-09 Martin Liska <mliska@suse.cz>
4271 * asan.c (asan_emit_stack_protection): If a stack variable
4272 is located in a same file as current function, then emit
4273 line info into variable definition string.
4275 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4277 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4280 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4282 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4285 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4287 PR tree-optimization/86659
4288 * gimple-match.h (struct gimple_match_op): Add reverse field.
4289 (gimple_match_op::set_op): New overloaded method.
4290 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4291 the REF_REVERSE_STORAGE_ORDER flag on the value.
4292 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4293 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4295 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4298 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4299 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4301 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4304 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4305 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4307 2018-10-08 Richard Biener <rguenther@suse.de>
4309 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4310 cost the same as AVX128 ones.
4312 2018-10-08 Paul Koning <ni1d@arrl.net>
4314 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4315 (expand_block_move): New function.
4316 * config/pdp11/pdp11.c (output_block_move): Remove.
4317 (expand_block_move): New function.
4318 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4319 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4320 (*movmemhi1): Remove.
4322 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4324 * config/s390/2827.md: Increase latencies for some FP instructions.
4326 2018-10-08 Richard Biener <rguenther@suse.de>
4328 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4330 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4331 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4332 (add_stmt_cost): Dump return value of the hook.
4334 2018-10-08 Richard Biener <rguenther@suse.de>
4336 PR tree-optimization/63155
4337 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4338 (ssa_propagation_engine::ssa_propagate): Remove redundant
4339 bitmap bit clearing.
4341 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4343 PR rtl-optimization/86939
4344 PR rtl-optimization/87479
4345 * ira.h (non_conflicting_reg_copy_p): New prototype.
4346 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4347 (make_hard_regno_dead): Don't add conflicts for register
4348 ignore_reg_for_conflicts.
4349 (make_object_dead): Likewise.
4350 (non_conflicting_reg_copy_p): New function.
4351 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4352 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4353 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4354 (make_hard_regno_dead): Don't add conflicts for register
4355 ignore_reg_for_conflicts. Remove special conflict handling of
4356 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4357 check_pic_pseudo_p and update callers.
4358 (mark_pseudo_dead): Don't add conflicts for register
4359 ignore_reg_for_conflicts.
4360 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4362 2018-10-05 Andrew Waterman <andrew@sifive.com>
4363 Jim Wilson <jimw@sifive.com>
4365 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4366 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4367 new pattern using HONOR_SNANS that emits one extra instruction.
4369 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4371 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4372 patterns): Merge SI and DI patterns to a GPR pattern.
4373 (unnamed define_insn and define_split for record form of that): Merge
4374 to a single define_insn_and_split pattern.
4376 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4379 * input.c (expand_location_to_spelling_point): Add param "aspect"
4380 and use rather than hardcoding LOCATION_ASPECT_CARET.
4381 (get_substring_ranges_for_loc): Handle the case of a single token
4382 within a macro expansion.
4383 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4384 defaulting to LOCATION_ASPECT_CARET.
4386 2018-10-05 Paul Koning <ni1d@arrl.net>
4388 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4389 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4390 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4391 (pdp11_guard_type): New function.
4393 2018-10-05 Paul Koning <ni1d@arrl.net>
4395 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4396 * config/pdp11/pdp11.opt (mfloat32): Remove.
4398 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4399 (pdp11 -mfloat64): Remove.
4401 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4403 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4404 (*cmp<mode>_cc_i387): Ditto.
4405 (*cmpu<mode>_cc_i387): Ditto.
4406 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4407 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4409 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4410 Emit x86_sahf_1 pattern.
4411 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4412 (ix86_expand_carry_flag_compare): Ditto.
4414 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4416 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4417 to reg_or_0_operand. Add "C" constraint.
4418 (*cmpxf_cc_i387): Ditto.
4419 (*cmp<mode>_i387): Change operand 2 predicate
4420 to nonimm_or_0_operand. Add "C" constraint.
4421 (*cmp<mode>_cc_i387): Ditto.
4422 (*cmp<mode>_0_i387): Remove insn pattern.
4423 (*cmp<mode>_0_cc_i387): Ditto.
4425 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4427 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4428 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4429 from vector_move_operand. Update all uses.
4431 2018-10-05 Martin Sebor <msebor@redhat.com>
4433 PR tree-optimization/87490
4434 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4437 2018-10-05 Richard Biener <rguenther@suse.de>
4439 PR tree-optimization/63155
4440 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4441 vertical space in dumpfiles.
4442 * tree-ssa-propagate.h
4443 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4444 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4445 (ssa_edge_worklist_back): Likewise.
4446 (curr_order): Likewise.
4447 (cfg_blocks_get): Remove abstraction.
4448 (cfg_blocks_add): Likewise.
4449 (cfg_blocks_empty_p): Likewise.
4450 (add_ssa_edge): Add to current or next worklist based on
4452 (add_control_edge): Likewise.
4453 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4455 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4456 iteration from CFG and SSA edge worklist so we process
4457 everything in RPO order, prioritizing forward progress
4459 (ssa_prop_init): Allocate new worklists, do not dump
4461 (ssa_prop_fini): Free new worklists.
4463 2018-10-05 Richard Biener <rguenther@suse.de>
4465 * tree-core.h (tree_block::abstract_flag): Remove.
4466 (tree_block::block_num): Make full 32bits.
4467 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4468 * tree.h (BLOCK_ABSTRACT): Remove.
4469 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4470 resulting from BLOCK_ABSTRACT being always false.
4471 (gen_inlined_subroutine_die): Likewise.
4472 (gen_block_die): Likewise.
4473 * tree.c (block_ultimate_origin): Likewise.
4474 * tree-pretty-print.c (dump_block_node): Remove code dealing
4475 with BLOCK_ABSTRACT.
4476 * tree-ssa-live.c (dump_scope_block): Likewise.
4477 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4478 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4480 2018-10-05 Richard Biener <rguenther@suse.de>
4482 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4483 is asked for initialize mode to the component mode of the
4486 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4489 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4490 assembler for -mavx.
4491 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4493 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4496 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4498 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4499 to be DImode. When using mffscrn, force the operand to a register.
4501 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4503 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4504 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4505 X87MODEF mode iterator.
4506 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4507 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4508 X87MODEF mode iterator.
4510 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4512 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4513 -Wno-prio-ctor-dtor.
4515 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4517 * Makefile.in (OBJS): Add opt-problem.o.
4518 * dump-context.h: Include "selftest.h.
4519 (selftest::temp_dump_context): New forward decl.
4520 (class dump_context): Make friend of class
4521 selftest::temp_dump_context.
4522 (dump_context::dump_loc_immediate): New decl.
4523 (class dump_pretty_printer): Move here from dumpfile.c.
4524 (class temp_dump_context): Move to namespace selftest.
4525 (temp_dump_context::temp_dump_context): Add param
4526 "forcibly_enable_dumping".
4527 (selftest::verify_dumped_text):
4528 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4529 (selftest::verify_item):
4530 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4531 (ASSERT_IS_TREE): Likewise.
4532 (ASSERT_IS_GIMPLE): Likewise.
4533 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4535 (dump_context::dump_loc_immediate): ...this new function.
4536 (class dump_pretty_printer): Move to dump-context.h.
4537 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4538 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4539 (temp_dump_context::temp_dump_context): Move to "selftest"
4540 namespace. Add param "forcibly_enable_dumping", and use it to
4541 conditionalize the use of m_pp;
4542 (selftest::verify_dumped_text): Make non-static.
4543 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4544 (selftest::verify_item): Make non-static.
4545 (ASSERT_IS_TEXT): Move to dump-context.h.
4546 (ASSERT_IS_TREE): Likewise.
4547 (ASSERT_IS_GIMPLE): Likewise.
4548 (selftest::test_capture_of_dump_calls): Pass "true" for new
4549 param of temp_dump_context.
4550 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4551 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
4553 * opt-problem.cc: New file.
4554 * opt-problem.h: New file.
4555 * optinfo-emit-json.cc
4556 (selftest::test_building_json_from_dump_calls): Pass "true" for
4557 new param of temp_dump_context.
4558 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4559 (optinfo::emit_for_opt_problem): New function.
4560 (optinfo::emit): Clarity which emit_item is used.
4561 * optinfo.h (optinfo::get_dump_location): New accessor.
4562 (optinfo::emit_for_opt_problem): New decl.
4563 (optinfo::emit): Make const.
4564 * selftest-run-tests.c (selftest::run_tests): Call
4565 selftest::opt_problem_cc_tests.
4566 * selftest.h (selftest::opt_problem_cc_tests): New decl.
4567 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4568 bool to opt_result, converting fprintf messages to
4569 opt_result::failure_at calls. Add "stmt" param for use by the
4571 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4572 (runtime_alias_check_p): Convert return type from bool to
4573 opt_result, converting dump_printf calls to
4574 opt_result::failure_at, using the statement DDR_A for their
4576 (find_data_references_in_stmt): Convert return type from bool to
4577 opt_result, converting "return false" to opt_result::failure_at
4579 * tree-data-ref.h: Include "opt-problem.h".
4580 (dr_analyze_innermost): Convert return type from bool to opt_result,
4581 and add a const gimple * param.
4582 (find_data_references_in_stmt): Convert return type from bool to
4584 (runtime_alias_check_p): Likewise.
4585 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4586 dr_analyze_innermost.
4587 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4588 Convert return type from bool to opt_result, adding a message for
4589 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4590 (vect_analyze_data_ref_dependence): Convert return type from bool
4591 to opt_result. Change sense of return type from "false"
4592 effectively meaning "no problems" to "false" meaning a problem,
4593 so that "return false" becomes "return opt_result::success".
4594 Convert "return true" calls to opt_result::failure_at, using
4595 the location of statement A rather than vect_location.
4596 (vect_analyze_data_ref_dependences): Convert return type from bool
4598 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4599 calls to opt_result::failure_at, using the stmt location rather
4601 (vect_verify_datarefs_alignment): Convert return type from bool
4603 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
4604 into multiple more-tightly-scoped copies.
4605 (vect_analyze_data_refs_alignment): Convert return type from bool
4607 (vect_analyze_data_ref_accesses): Likewise, converting a
4608 "return false" to a "return opt_result::failure_at", adding a
4610 (vect_prune_runtime_alias_test_list): Convert return type from
4611 bool to opt_result, converting dump_printf_loc to
4612 opt_result::failure_at. Add a %G to show the pertinent statement,
4613 and use the stmt's location rather than vect_location.
4614 (vect_find_stmt_data_reference): Convert return type from
4615 bool to opt_result, converting dump_printf_loc to
4616 opt_result::failure_at, using stmt's location.
4617 (vect_analyze_data_refs): Convert return type from bool to
4618 opt_result. Convert "return false" to "return
4619 opt_result::failure_at", adding messages as needed.
4620 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4621 type from bool to opt_result.
4622 (vect_determine_vf_for_stmt): Likewise.
4623 (vect_determine_vectorization_factor): Likewise, converting
4624 dump_printf_loc to opt_result::failure_at, using location of phi
4625 rather than vect_location.
4626 (vect_analyze_loop_form_1): Convert return type from bool to
4627 opt_result, converting dump_printf_loc calls, retaining the use of
4629 (vect_analyze_loop_form): Convert return type from loop_vec_info
4630 to opt_loop_vec_info.
4631 (vect_analyze_loop_operations): Convert return type from bool to
4632 opt_result, converting dump_printf_loc calls, using the location
4633 of phi/stmt rather than vect_location where available. Convert
4634 various "return false" to "return opt_result::failure_at" with
4635 "unsupported phi" messages.
4636 (vect_get_datarefs_in_loop): Convert return type from bool to
4637 opt_result. Add a message for the
4638 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4639 (vect_analyze_loop_2): Convert return type from bool to
4640 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4641 each "goto again;", adding new messages where needed.
4642 Add "unsupported grouped {store|load}" messages.
4643 (vect_analyze_loop): Convert return type from loop_vec_info to
4645 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4647 * tree-vect-stmts.c (process_use): Likewise, converting
4648 dump_printf_loc call and using stmt location, rather than
4650 (vect_mark_stmts_to_be_vectorized): Likeise.
4651 (vect_analyze_stmt): Likewise, adding a %G.
4652 (vect_get_vector_types_for_stmt): Convert return type from bool to
4653 opt_result, converting dump_printf_loc calls and using stmt
4654 location, rather than vect_location.
4655 (vect_get_mask_type_for_stmt): Convert return type from tree to
4656 opt_tree, converting dump_printf_loc calls and using stmt location.
4657 * tree-vectorizer.c: Include "opt-problem.h.
4658 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4659 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4660 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4661 enabled, use it to report at the top level "couldn't vectorize
4662 loop" followed by the problem.
4663 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4664 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4666 (vect_analyze_stmt): Likewise.
4667 (vect_get_vector_types_for_stmt): Likewise.
4668 (tree vect_get_mask_type_for_stmt): Likewise.
4669 (vect_analyze_data_ref_dependences): Likewise.
4670 (vect_enhance_data_refs_alignment): Likewise.
4671 (vect_analyze_data_refs_alignment): Likewise.
4672 (vect_verify_datarefs_alignment): Likewise.
4673 (vect_analyze_data_ref_accesses): Likewise.
4674 (vect_prune_runtime_alias_test_list): Likewise.
4675 (vect_find_stmt_data_reference): Likewise.
4676 (vect_analyze_data_refs): Likewise.
4677 (vect_analyze_loop): Convert return type from loop_vec_info to
4679 (vect_analyze_loop_form): Likewise.
4680 (vect_analyze_slp): Convert return type from bool to opt_result.
4682 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4684 * doc/invoke.texi (-fopt-info): Document new "internals"
4686 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4687 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4689 (optinfo_verbosity_options): Add "internals".
4690 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4691 (dump_context::apply_dump_filter_p): New member function.
4692 (dump_context::dump_loc): Use apply_dump_filter_p rather than
4693 explicitly masking the dump_kind.
4694 (dump_context::begin_scope): Increment the scope depth first. Use
4695 apply_dump_filter_p rather than explicitly masking the dump_kind.
4696 (dump_context::emit_item): Use apply_dump_filter_p rather than
4697 explicitly masking the dump_kind.
4698 (dump_dec): Likewise.
4699 (dump_hex): Likewise.
4700 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4701 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4702 (opt_info_switch_p): Update handling of default
4703 MSG_OPTIMIZED_LOCATIONS to cope with default of
4704 MSG_PRIORITY_USER_FACING.
4705 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4706 masking the dump_kind.
4707 (selftest::test_capture_of_dump_calls): Update test_dump_context
4708 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4709 than MSG_ALL. Generalize scope test to be run at all four
4710 combinations of with/without MSG_PRIORITY_USER_FACING and
4711 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4712 for each of the two values.
4713 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4714 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
4715 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4716 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4717 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4718 with MSG_PRIORITY_*.
4719 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4720 dump messages as MSG_PRIORITY_USER_FACING.
4721 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4722 about the interaction with MSG_PRIORITY_*.
4724 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4726 * varasm.c (output_constant): Add new parameter merge_strings.
4727 Make strings properly zero terminated in merge string sections.
4728 (mergeable_string_section): Don't fail if the last char is non-zero.
4729 (assemble_variable_contents): Handle merge string sections.
4730 (assemble_variable): Likewise.
4731 (assemble_constant_contents): Likewise.
4732 (output_constant_def_contents): Likewise.
4733 (output_constructor_array_range,
4734 output_constructor_regular_field): Adjust call to output_constant.
4735 (output_object_block): Adjust call to assemble_constant_contents
4736 and assemble_variable_contents.
4738 2018-10-04 Martin Liska <mliska@suse.cz>
4741 * cgraphunit.c (process_function_and_variable_attributes):
4742 Warn about a function with alias attribute and a body.
4744 2018-10-04 Martin Liska <mliska@suse.cz>
4747 * multiple_target.c (redirect_to_specific_clone): New function.
4748 (ipa_target_clone): Use it.
4749 * tree-inline.c: Fix comment.
4751 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4753 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4755 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4756 (gcc::dump_manager::register_pass): New member function, adapted
4757 from loop body in gcc::pass_manager::register_pass, adding a
4758 call to update_dfi_for_opt_info.
4759 (gcc::dump_manager::opt_info_enable_passes): Store the
4760 -fopt-info options into the new fields. Move the loop
4762 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4764 * dumpfile.h (struct opt_pass): New forward decl.
4765 (gcc::dump_manager::register_pass): New decl.
4766 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4767 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4768 "m_optinfo_flags", and "m_optinfo_filename".
4769 * passes.c (gcc::pass_manager::register_pass): Move all of the
4770 dump-handling code to gcc::dump_manager::register_pass.
4772 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4774 PR rtl-optimization/87466
4775 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4776 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4777 * doc/tm.texi: Regenerate.
4778 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4779 * lra-lives.c (process_bb_lives): Likewise.
4780 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4783 2018-10-04 Tamar Christina <tamar.christina@arm.com>
4785 * params.c (add_params): Fix initialization.
4787 2018-10-04 Martin Liska <mliska@suse.cz>
4789 PR gcov-profile/84107
4790 * tree-profile.c (init_ic_make_global_vars):
4791 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4792 Come up with new ic_tuple* variables. Emit
4793 __gcov_indirect_call{,_topn} variables.
4794 (gimple_gen_ic_profiler): Access the variable
4796 (gimple_gen_ic_func_profiler): Access
4797 __gcov_indirect_call.callee field.
4798 (gimple_init_gcov_profiler): Use ptr_type_node.
4799 * value-prof.c (gimple_ic): Use ptr_type_node.
4801 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4803 PR tree-optimization/85787
4804 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4805 into this function and add support for detecting multiple phis.
4806 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4808 2018-10-04 Martin Liska <mliska@suse.cz>
4811 * ipa-inline.c (inline_to_all_callers_1):
4812 Call ultimate_alias_target for node being inlined.
4814 2018-10-03 Jeff Law <law@redhat.com>
4816 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4818 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4819 * tree.h (get_typenode_from_name): Prototype.
4821 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4823 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4824 Change operand 2 predicate to nonimmediate_operand.
4825 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4827 2018-10-03 Martin Sebor <msebor@redhat.com>
4828 Jeff Law <law@redhat.com>
4830 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4832 (get_string_length): Detect unterminated arrays.
4833 (format_string): Same.
4834 (format_directive): Warn about unterminated arrays.
4835 (handle_gimple_call): Mark statements with no_warning as needed.
4837 2018-10-03 Jim Wilson <jimw@sifive.com>
4839 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4840 also define __riscv_abi_rve. Delete trailing white space.
4842 2018-10-03 Paul Koning <ni1d@arrl.net>
4844 Enable LRA register allocator for PDP11.
4845 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4848 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4849 * config/pdp11/pdp11.opt (-mlra): New option.
4850 * doc/invoke.texi (PDP-11 Options): Document -mlra.
4852 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4854 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4855 (*<absneg:code>extend<mode>xf2): Ditto.
4857 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4859 PR tree-optimization/87415
4860 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4863 2018-10-02 Jeff Law <law@redhat.com>
4865 * gimple-fold.c (get_range_strlen): Only set *nonstr when
4866 an unterminated string is discovered. Bubble up range
4867 even for unterminated strings.
4868 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4869 indicates the string was not terminated via NONSTR.
4871 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4873 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4874 pointer conversions.
4875 Do not do anything special for anti-ranges.
4877 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4879 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4880 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4882 2018-10-03 Martin Liska <mliska@suse.cz>
4884 PR gcov-profile/86109
4885 * coverage.c (coverage_begin_function): Do not
4886 mark lambdas as artificial.
4887 * tree-core.h (struct GTY): Remove tm_clone_flag
4888 and introduce new lambda_function.
4889 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4891 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4894 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4895 P8_VECTOR and VSX are enabled.
4897 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4899 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4900 0x3907 as CPU model number.
4902 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4904 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4905 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4906 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4907 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4908 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4909 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4910 value from arch12 to z14.
4912 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4914 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4916 (isinf<mode>2): Ditto.
4918 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4920 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4921 before emitting fxam. Perform calculations in XFmode.
4923 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4925 * match.pd (((X /[ex] A) +- B) * A): New transformation.
4927 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4930 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4931 * tree.c (signed_or_unsigned_type_for): Handle complex.
4933 2018-10-02 Jeff Law <law@redhat.com>
4935 * gimple-fold.c (get_range_strlen): Remove dead code.
4937 2018-10-02 Martin Sebor <msebor@redhat.com>
4938 Jeff Law <law@redhat.com>
4940 * builtins.c (unterminated_array): Add new arguments.
4941 If argument is not terminated, bubble up size and exact
4943 (expand_builtin_strnlen): Detect, avoid expanding
4944 and diagnose unterminated arrays.
4945 (c_strlen): Fill in offset of start of unterminated strings.
4946 * builtins.h (unterminated_array): Update prototype.
4948 2018-10-02 Richard Biener <rguenther@suse.de>
4950 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4951 of haddv4df, first reduce to SSE width and exploit the fact
4952 that we only need element zero with the reduction result.
4953 (reduc_plus_scal_v2df): Likewise.
4955 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4957 * dojump.h (do_jump): Delete.
4958 (do_jump_1): Likewise.
4959 (split_comparison): Move around.
4960 * dojump.c (do_jump): Make static.
4961 (do_jump_1): Likewise.
4962 (jumpifnot): Move around.
4963 (jumpifnot_1): Likewise.
4965 (jumpif_1): Likewise.
4966 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4968 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4970 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4971 insns in the delay slot and add_insn_after for the jump insn.
4973 2018-10-02 Richard Biener <rguenther@suse.de>
4975 * tree-inline.c (expand_call_inline): Use the location of
4976 the callee declaration for the inline-entry marker.
4977 * final.c (notice_source_line): Remove special-casing of
4978 NOTE_INSN_INLINE_ENTRY.
4980 2018-10-01 Carl Love <cel@us.ibm.com>
4983 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4984 (__builtin_mtfsb0): New.
4985 (__builtin_mtfsb1): New.
4986 ( __builtin_set_fpscr_rn): New.
4987 (__builtin_set_fpscr_drn): New.
4988 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4989 (rs6000_expand_set_fpscr_rn_builtin): Add.
4990 (rs6000_expand_set_fpscr_drn_builtin): Add.
4991 (rs6000_expand_builtin): Add case statement entries for
4992 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4993 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4994 RS6000_BUILTIN_MFFSL.
4995 (rs6000_init_builtins): Add ftype initialization and def_builtin
4996 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4997 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4998 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4999 rs6000_mffscdrn): Add define_insn.
5000 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5001 * doc/extend.texi: Add documentation for the builtins.
5003 2018-10-01 Richard Biener <rguenther@suse.de>
5005 PR tree-optimization/87465
5006 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5007 causing branch miscounts.
5009 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5011 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5012 aarch64_option_default_param): New.
5013 (params.h): Include.
5014 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5015 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5016 stack-clash protection validation code.
5018 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5020 * params.c (validate_param): New.
5021 (add_params): Use it.
5022 (set_param_value): Refactor param validation into validate_param.
5023 (diagnostic.h): Include.
5024 * diagnostic.h (diagnostic_ready_p): New.
5026 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5028 * params.c (set_param_value):
5029 Add index of parameter being validated.
5030 * common/common-target.def (option_validate_param): New.
5031 * common/common-targhooks.h (default_option_validate_param): New.
5032 * common/common-targhooks.c (default_option_validate_param): New.
5033 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5034 * doc/tm.texi: Regenerate.
5036 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5039 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5040 Add validation for stack-clash parameters and set defaults.
5042 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5045 * configure.ac: Add stack-clash-protection-guard-size.
5046 * doc/install.texi: Document it.
5047 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5048 * params.def: Update comment for guard-size.
5049 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5050 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5051 * configure: Regenerate.
5053 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5056 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5057 STACK_DYNAMIC_OFFSET): New.
5058 * config/aarch64/aarch64.c (aarch64_layout_frame):
5059 Update outgoing args size.
5060 (aarch64_stack_clash_protection_alloca_probe_range,
5061 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5063 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5066 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5068 * target.def (stack_clash_protection_alloca_probe_range): New.
5069 (stack_clash_protection_final_dynamic_probe): Remove.
5070 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5071 (default_stack_clash_protection_final_dynamic_probe): Remove.
5072 * targhooks.c: Likewise.
5073 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5074 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5075 * doc/tm.texi: Regenerate.
5077 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5080 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5081 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5082 aarch64_clamp_to_uimm12_shift): New.
5083 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5084 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5086 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5089 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5091 2018-10-01 Jeff Law <law@redhat.com>
5092 Richard Sandiford <richard.sandiford@linaro.org>
5093 Tamar Christina <tamar.christina@arm.com>
5096 * config/aarch64/aarch64.md
5097 (probe_stack_range): Add k (SP) constraint.
5098 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5099 STACK_CLASH_MAX_UNROLL_PAGES): New.
5100 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5101 stack probes for stack clash.
5102 (aarch64_allocate_and_probe_stack_space): New.
5103 (aarch64_expand_prologue): Use it.
5104 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5105 (aarch64_sub_sp): Add emit_move_imm optional param.
5107 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5109 PR tree-optimization/87261
5110 * match.pd: Remove trailing whitespace.
5111 Add (x & y) | ~(x | y) -> ~(x ^ y),
5112 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5114 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5116 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5118 (ashlsi3_insn): Update instruction constraints.
5119 (ashrsi3_insn): Likewise.
5120 (rotrsi3): Likewise.
5121 (add_shift): Likewise.
5122 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5123 avoids placing in the limm field small constants which, otherwise,
5124 could end into a small instruction.
5126 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5128 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5129 destination register is not odd-even.
5130 (umaddsidi4_split): Likewise.
5132 2018-10-01 Richard Biener <rguenther@suse.de>
5134 * tree-inline.c (expand_call_inline): Store origin of fn
5135 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5136 * tree.c (block_ultimate_origin): Simplify and do some
5139 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5141 * config/i386/mmx.md (EMMS): New int iterator.
5142 (emms): New int attribute.
5143 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5144 EMMS int iterator. Explicitly declare clobbers.
5145 (mmx_emms): Remove expander.
5147 * config/i386/predicates.md (emms_operation): Remove predicate.
5148 (vzeroall_pattern): New predicate.
5149 (vzeroupper_pattern): Rename from vzeroupper_operation.
5150 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5151 vzeroupper_pattern and vzeroall_pattern predicates.
5153 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5155 PR rtl-optimization/86939
5156 * ira-lives.c (make_hard_regno_born): Rename from this...
5157 (make_hard_regno_live): ... to this. Remove update to conflict
5158 information. Update function comment.
5159 (make_hard_regno_dead): Add conflict information update. Update
5161 (make_object_born): Rename from this...
5162 (make_object_live): ... to this. Remove update to conflict information.
5163 Update function comment.
5164 (make_object_dead): Add conflict information update. Update function
5166 (mark_pseudo_regno_live): Call make_object_live.
5167 (mark_pseudo_regno_subword_live): Likewise.
5168 (mark_hard_reg_dead): Update function comment.
5169 (mark_hard_reg_live): Call make_hard_regno_live.
5170 (process_bb_node_lives): Likewise.
5171 * lra-lives.c (make_hard_regno_born): Rename from this...
5172 (make_hard_regno_live): ... to this. Remove update to conflict
5173 information. Remove now uneeded check_pic_pseudo_p argument.
5174 Update function comment.
5175 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5176 to conflict information. Update function comment.
5177 (mark_pseudo_live): Remove update to conflict information. Update
5179 (mark_pseudo_dead): Add conflict information update.
5180 (mark_regno_live): Call make_hard_regno_live.
5181 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5182 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5184 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5187 * config/i386/i386.c (construct_container): Use TImode for
5188 BLKmode values in 2 integer registers.
5190 2018-09-29 Jeff Law <law@redhat.com>
5192 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5193 c_strlen rather than just a tree *.
5194 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5195 Update recursive calls appropriately. If caller did not provide a
5196 suitable data pointer, create a local one. When a non-terminated
5197 string is discovered, bubble up information about the string via the
5198 c_strlen_data object.
5199 * builtins.h (c_strlen): Update prototype.
5200 (c_strlen_data): New structure.
5201 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5202 For a type 2 call, if c_strlen indicates a non-terminated string
5203 use the length of the non-terminated string.
5204 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5206 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5209 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5210 __m512d type for __A argument rather than __m512.
5212 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5214 * match.pd (simple_comparison): Don't optimize if either operand is
5215 a function pointer when target needs function pointer canonicalization.
5217 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5219 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5220 power5 .. power9 to remove indirection.
5221 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5222 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5223 ASM_CPU_476_SPEC): Delete.
5224 (ASM_CPU_SPEC): Adjust.
5225 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5226 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5228 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5230 * config.in: Delete HAVE_AS_DCI.
5231 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5232 * config/rs6000/rs6000.h: Ditto.
5233 * configure.ac: Delete HAVE_AS_DCI.
5234 * configure: Regenerate.
5236 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5238 * config.in (HAVE_AS_LWSYNC): Delete.
5239 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5240 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5242 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5243 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5245 * configure.ac: Delete HAVE_AS_LWSYNC.
5246 * configure: Regenerate.
5248 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5249 Pierre-Marie de Rodat <derodat@adacore.com>
5251 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5252 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5253 (cgraph_node::create_thunk): Add indirect_offset parameter.
5254 (thunk_adjust): Likewise.
5255 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5256 and initialize the corresponding field with it.
5257 (cgraph_node::dump): Dump indirect_offset field.
5258 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5259 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5260 (thunk_adjust): Add indirect_offset parameter and deal with it.
5261 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5262 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5263 or if the thunk is external or local. Fix formatting. Do not chain
5264 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5265 if any, in the GIMPLE representation.
5266 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5267 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5268 (input_node): Read indirect_offset field.
5269 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5270 call to thunk_adjust.
5271 * tree-nested.c (struct nesting_info): Add thunk_p field.
5272 (create_nesting_tree): Set it.
5273 (convert_all_function_calls): Copy static chain from targets to thunks.
5274 (finalize_nesting_tree_1): Return early for thunks.
5275 (unnest_nesting_tree_1): Do not finalize thunks.
5276 (gimplify_all_functions): Do not gimplify thunks.
5278 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5280 * opt-suggestions.c (option_proposer::build_option_suggestions):
5281 Release "option_values".
5283 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5285 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5286 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5287 * dumpfile.c (kind_as_string): New function.
5288 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5289 kind_as_string to vary the prefix based on dump_kind.
5290 (selftest::test_capture_of_dump_calls): Update for above.
5292 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5294 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5295 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5297 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5299 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5300 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5301 INVALID_REGNUM instead of FPSR_REG.
5302 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5303 * config/i386/i386.md: Update comment of FP compares.
5304 (fldenv): Do not clobber FPSR_REG.
5306 2018-09-28 Richard Biener <rguenther@suse.de>
5308 * tree.h (BLOCK_ORIGIN): New.
5309 * omp-expand.c (grid_expand_target_grid_body): Assign
5310 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5311 * tree-inline.c (remap_block): Likewise.
5312 * auto-profile.c (get_function_decl_from_block): Simplify
5313 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5314 * langhooks.c (lhd_print_error_function): Likewise.
5315 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5317 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5318 * tree.c (block_nonartificial_location): Likewise.
5319 (block_ultimate_origin): Likewise.
5320 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5321 no longer needed LTO case.
5323 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5324 Jan Hubicka <jh@suse.cz>
5325 Martin Jambor <mjambor@suse.cz>
5327 * simplify-rtx.c (simplify_merge_mask): New function.
5328 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5329 same masks are used in op1 or op2.
5330 (test_vec_merge): New function.
5331 (test_vector_ops): Call test_vec_merge.
5333 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5335 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5336 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5337 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5338 (cypress_costs): Set it.
5339 (supersparc_costs): Likewise.
5340 (hypersparc_costs): Likewise.
5341 (leon_cost): Likewise.
5342 (leon3_costs): Likewise.
5343 (sparclet_costs): Likewise.
5344 (ultrasparc_costs): Likewise.
5345 (ultrasparc_costs): Likewise.
5346 (niagara_costs): Likewise.
5347 (niagara2_costs): Likewise.
5348 (niagara3_costs): Likewise.
5349 (niagara4_costs): Likewise.
5350 (niagara7_costs): Likewise.
5351 (m8_costs): Likewise.
5352 (TARGET_CAN_FOLLOW_JUMP): Define.
5353 (pass_work_around_errata::gate): Minor tweak.
5354 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5355 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5356 Automaitcally clear MASK_FSMULD mask for V7 processors.
5357 (sparc_can_follow_jump): New static function.
5358 (output_ubranch): Deal with CROSSING_JUMP_P.
5359 (sparc_use_sched_lookahead): Rewrite using switch statement.
5360 (sparc_issue_rate): Reorder.
5361 (sparc_branch_cost): New function.
5363 2018-09-27 Martin Sebor <msebor@redhat.com>
5365 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5366 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5367 (int_fits_type_p): Same.
5369 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5371 * config/i386/i386.md (FPCR_REG): Remove.
5372 (UNSPEC_FLDCW): Remove.
5373 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5374 (x86_fldcw_1): Remove insn pattern.
5375 (fnstenv): Do not clobber FPCR_REG.
5377 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5378 (CALL_USED_REGISTERS): Ditto.
5379 (REG_ALLOC_ORDER): Ditto.
5380 (REG_CLASS_CONTENTS): Ditto.
5381 (HI_REGISTER_NAMES): Ditto.
5382 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5383 of numerical constants.
5384 * config/i386/i386.c (regclass_map): Remove fpsr register.
5385 (dbx_register_map): Ditto.
5386 (dbx64_register_map): Ditto.
5387 (svr4_dbx_register_map): Ditto.
5388 (print_reg): Do not handle FPCR_REG.
5390 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5393 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5394 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5395 Delete, always treat as true.
5396 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5397 Ditto. Simplify remaining code.
5398 * config/powerpcspe/powerpcspe.h: Ditto.
5399 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5400 Simplify remaining code.
5401 (rs6000_expand_builtin): Ditto.
5402 * config/rs6000/rs6000.h: Ditto.
5403 * configure.ac: Ditto.
5404 * configure: Regenerate.
5406 2018-09-27 Martin Liska <mliska@suse.cz>
5408 * coverage.c (get_coverage_counts): Revert the formatting
5409 of missing profile opt info.
5411 2018-09-27 Richard Biener <rguenther@suse.de>
5415 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5416 block as we do not output that.
5417 (gen_inlined_subroutine_die): Elide the originally outermost
5418 block, matching what we do for concrete instances.
5419 (decls_for_scope): Add parameter specifying whether to recurse
5422 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5423 Tom de Vries <tom@codesourcery.com>
5427 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5428 STORE_FLAG_VALUE == 1.
5430 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5432 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5433 constant definitions.
5434 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5435 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5436 ("speculation_barrier"): New expander definition.
5438 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5440 PR gcov-profile/86957
5441 * common.opt: New warning option -Wmissing-profile.
5442 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5443 * doc/invoke.texi: Document -Wmissing-profile.
5445 2018-09-26 Jim Wilson <jimw@sifive.com>
5447 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5448 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5450 2018-09-26 Martin Sebor <msebor@redhat.com>
5452 * tree.c (zerop): Change return type to bool.
5453 (integer_zerop, integer_onep, integer_each_onep): Same.
5454 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5455 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5456 (real_onep, real_minus_onep, chain_index): Same.
5457 (print_type_hash_statistics, type_list_equal): Same.
5458 * tree.h (zerop): Same.
5459 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5460 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5461 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5462 (real_onep, real_minus_onep, chain_index): Same.
5463 (print_type_hash_statistics, type_list_equal): Same.
5465 2018-09-26 Jim Wilson <jimw@sifive.com>
5467 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5469 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5472 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5473 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5476 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5478 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5480 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5482 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5483 and FP_SECOND_SSE_REGS.
5484 (REG_CLASS_NAMES): Ditto.
5485 (REG_CLASS_CONTENTS): Ditto.
5486 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5487 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5488 (ix86_preferred_output_reload_class): Ditto.
5489 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5490 clobber constraint to "=&f".
5491 (fix_truncdi_i387): Ditto.
5492 (lrintxfdi2): Ditto.
5493 (fistdi2_<rounding>): Ditto.
5494 (fpremxf4_i387): Change "=u" constraint to "=f".
5495 (fprem1xf4_i387): Ditto.
5497 (fptanxf4_i387): Ditto.
5498 (fxtractxf3_i387): Ditto.
5499 (fscalexf4_i387): Ditto.
5500 (atan2xf3): Change "u" constraint to "f".
5501 (fyl2xxf3_i387): Ditto.
5502 (fyl2xp1xf3_i387): Ditto.
5504 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5507 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5508 for removed I387_MASK_PM entity.
5511 2018-09-26 Jeff Law <law@redhat.com>
5513 2018-09-26 Alexey Neyman <stilor@att.net>
5515 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5516 headers are no longer pulled in by <isl/val.h>.
5518 2018-09-26 Richard Biener <rguenther@suse.de>
5521 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5522 or concrete instance DIE to the tree. Create abstract origin
5523 attributes also for concrete instances.
5525 2018-09-26 Alexey Neyman <stilor@att.net>
5527 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5528 headers are no longer pulled in by <isl/val.h>.
5530 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5532 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5533 Use new helper functions.
5534 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5535 Use new helper functions.
5536 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5537 aarch_mm_needs_release): New declarations.
5538 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5539 aarch_mm_needs_release): New.
5541 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
5543 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5544 (arm32_output_mi_thunk): Deal with long calls.
5546 2018-09-26 Richard Biener <rguenther@suse.de>
5550 * tree-inline.c (expand_call_inline): When the location
5551 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5552 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5553 the inserted BLOCK to make inlined_function_outer_scope_p
5555 * dwarf2out.c (add_call_src_coords_attributes): Do not add
5556 coords for reserved locations.
5558 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5560 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5561 (*call_indirect_nonlocal_sysv<mode>): Ditto.
5562 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5563 (*sibcall_nonlocal_sysv<mode>): Ditto.
5564 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5565 (<bd>_<mode>): Ditto.
5566 (<bd>tf_<mode>): Ditto.
5568 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5570 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5571 control string as a list of templates instead of as C code.
5572 (*altivec_movti): Ditto.
5573 * config/rs6000/darwin.md (movdf_low_di): Ditto.
5575 2018-09-25 Jim Wilson <jimw@sifive.com>
5577 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5578 when target symbol is weak.
5580 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5583 * builtins.c (unterminated_array): Simplify.
5584 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
5585 where pointer arithmetic is safe.
5587 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5590 * config/rs6000/altivec.md (altivec_vspltb): Use
5591 const_0_to_15_operand instead of u5bit_cint_operand.
5592 (*altivec_vspltb_internal): Ditto.
5593 (altivec_vspltb_direct): Ditto.
5594 (altivec_vsplth): Use const_0_to_7_operand instead of
5596 (*altivec_vsplth_internal): Ditto.
5597 (altivec_vsplth_direct): Ditto.
5598 (altivec_vspltw): Use const_0_to_3_operand instead of
5600 (*altivec_vspltw_internal): Ditto.
5601 (altivec_vspltw_direct): Ditto.
5602 (altivec_vspltsf): Ditto.
5603 (*altivec_vspltsf_internal): Ditto.
5604 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5605 various splats with the proper size immediate. Reorder the various
5606 cases by ascending size of immediate, and put all such together.
5608 2018-09-25 Richard Biener <rguenther@suse.de>
5611 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5613 (maybe_create_die_with_external_ref): Do not create
5614 DW_TAG_imported_unit here.
5615 (add_abstract_origin_attribute): Handle external BLOCK refs.
5616 (dwarf2out_abstract_function): Simplify LTO case.
5617 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5618 rather than using maybe_create_die_with_external_ref.
5620 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5623 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5624 (frndintxf2_mask_pm_i387): Ditto.
5625 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5626 Enable for !flag_trapping_math.
5627 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5628 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5629 Change operand 1 predicate to nonimmediate_operand.
5630 (attr "i387_cw"): Remove mask_pm.
5631 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5632 (enum ix86_entity): Remove I387_MASK_PM.
5633 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5634 handle I387_MASK_PM.
5635 (ix86_mode_needed): Ditto.
5636 (ix86_mode_after): Ditto.
5637 (ix86_mode_entry): Ditto.
5638 (ix86_mode_exit): Ditto.
5639 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5641 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5643 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5644 to_update_switch_stmts to vNULL instead of calling create on them
5647 2018-09-25 Richard Biener <rguenther@suse.de>
5649 PR tree-optimization/87402
5650 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5651 (visit_phi): Re-instantiate handling of supposed to be VARYING
5652 but non-VARYING backedge value.
5654 2018-09-25 Richard Biener <rguenther@suse.de>
5657 * dwarf2out.c (struct sym_off_pair): New.
5658 (external_die_map): New global.
5659 (lookup_decl_die): When in LTO create DIEs lazily from the
5661 (lookup_block_die): New function, create DIEs lazily in LTO.
5662 (equate_block_to_die): New function.
5663 (dwarf2out_die_ref_for_decl): During WPA get the association
5664 from the external DIE map.
5665 (dwarf2out_register_external_die): Record mapping into the
5667 (maybe_create_die_with_external_ref): New function split out from
5668 DIE generation part of old dwarf2out_register_external_die.
5669 (add_abstract_origin_attribute): Do not return the DIE. When
5670 in LTO reference externals directly.
5671 (dwarf2out_abstract_function): When in LTO ignore calls for
5672 decls with external DIEs (already present abstract instances).
5673 (gen_call_site_die): Adjust.
5674 (add_high_low_attributes): Likewise.
5675 (gen_lexical_block_die): Likewise.
5676 (gen_inlined_subroutine_die): Likewie.
5677 (gen_block_die): Likewise.
5678 (dwarf2out_inline_entry): Likewise.
5679 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5682 2018-09-25 Martin Liska <mliska@suse.cz>
5684 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5685 integers and not by a float value.
5687 2018-09-25 Martin Liska <mliska@suse.cz>
5690 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5692 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5693 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5694 * godump.c (go_format_type): Remove extra parenthesis.
5696 2018-09-25 Martin Liska <mliska@suse.cz>
5698 * alias.c (set_dest_equal_p): Remove unused function.
5699 * config/i386/i386.c (def_builtin_pure2): Likewise.
5700 * diagnostic-show-locus.c (class layout): Remove
5702 (layout::layout): Likewise here.
5703 * dump-context.h (class temp_dump_context): Likewise.
5704 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5705 (add_AT_loclistsptr): Likewise.
5706 (add_AT_offset): Likewise.
5707 (get_AT_hi_pc): Likewise.
5708 (is_comdat_die): Likewise.
5709 (type_is_enum): Likewise.
5710 (ceiling): Likewise.
5711 (add_AT_vms_delta): Likewise.
5712 (is_class_die): Likewise.
5713 * edit-context.c (class line_event): Remove unused field.
5714 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5716 * ipa-cp.c (ipa_get_vr_lat): Likewise.
5717 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5718 (ok_for_base_p_nonstrict): Likewise.
5719 * tree-chrec.c (is_not_constant_evolution): Likewise.
5720 (chrec_fold_poly_cst): Likewise.
5721 * tree-if-conv.c (has_pred_critical_p): Likewise.
5722 * tree-ssa-coalesce.c (print_exprs): Likewise.
5723 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5724 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5725 * tree-vrp.c (value_ranges_intersect_p): Likewise.
5726 (value_range_nonnegative_p): Likewise.
5728 2018-09-25 Martin Liska <mliska@suse.cz>
5730 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5731 Do not handle "GNU Pascal".
5732 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5734 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5735 from documentation. Likewise.
5736 * dbxout.c (dbxout_range_type): Likewise.
5737 * doc/cpp.texi: Likewise.
5738 * doc/extend.texi: Likewise.
5739 * doc/frontends.texi: Likewise.
5740 * doc/invoke.texi: Remove Pascal entry.
5741 * tree.def (CLEANUP_POINT_EXPR): Likewise.
5742 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5744 2018-09-25 Martin Liska <mliska@suse.cz>
5747 * doc/invoke.texi: Document all parameters and remove default
5750 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
5753 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5754 contains HOST_WIDE_INTs when computing its size.
5756 2018-09-24 Jim Wilson <jimw@sifive.com>
5759 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5761 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5763 2018-09-24 Andrew Pinski <apinski@marvell.com>
5765 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5766 access prev before checking it for NULLness in the
5767 AARCH64_FUSE_CMP_BRANCH case.
5769 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5772 * config/i386/i386.c (rest_of_insert_endbranch): Set
5773 endbr_queued_at_entrance to true and don't insert ENDBR if
5774 x86_function_profiler will be called.
5775 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5777 * config/i386/i386.h (machine_function): Add
5778 endbr_queued_at_entrance.
5780 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5782 * genattrtab.c (mk_attr_alt): Use alternative_mask.
5783 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5785 (check_attr_test): Use alternative_mask.
5786 (get_attr_value): Likewise.
5787 (compute_alternative_mask): Use alternative_mask and XWINT.
5788 (make_alternative_compare): Use alternative_mask.
5789 (attr_alt_subset_p): Use XWINT.
5790 (attr_alt_subset_of_compl_p): Likewise.
5791 (attr_alt_intersection): Use alternative_mask and XWINT.
5792 (attr_alt_union): Likewise.
5793 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5794 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5795 (simplify_test_exp): Use alternative_mask and XWINT.
5796 (write_test_expr): Use alternative_mask and XWINT, adjust bit
5797 number calculation to support 64 bits. Generate code that
5798 checks 64-bit masks.
5799 (main): Use alternative_mask.
5800 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5802 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5805 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5806 RETURN+USE when returning via %r14.
5808 2018-09-24 Martin Liska <mliska@suse.cz>
5810 * gcov.c (output_lines): Print colorization legend
5811 for both flag_use_colors and flag_use_hotness_colors.
5814 2018-09-24 Martin Liska <mliska@suse.cz>
5816 * coverage.c (get_coverage_counts): Use warning_at
5817 with current_function_decl location. Use %qD in warning
5820 2018-09-24 Martin Liska <mliska@suse.cz>
5822 * memory-block.h (memory_block_pool::release): Annotate with
5823 valgrind that the memory is not accessible.
5825 2018-09-24 Martin Liska <mliska@suse.cz>
5828 * asan.c: Make asan_handled_variables extern.
5830 * cfgexpand.c (expand_stack_vars): Make sure
5831 a representative is unpoison if another
5832 variable in the partition is handled by
5833 use-after-scope sanitization.
5835 2018-09-24 Richard Biener <rguenther@suse.de>
5837 PR tree-optimization/63155
5838 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5839 the worklist when the edge of the respective argument isn't
5842 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5844 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5845 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5846 (MASK_CLASS_P): Update for rename.
5847 (MAYBE_MASK_CLASS_P): Ditto.
5848 (REG_CLASS_NAMES): Update.
5849 (REG_CLASS_CONTENT): Update.
5850 * config/i386/i386.c (regclass_map): Update for MASK_REG
5851 and ALL_MASK_REGS rename.
5852 * config/i386/constraints.md (Yk): Update for rename.
5855 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5857 * config/i386/i386.h (enum reg_class): Remove
5858 EVEX_SSE_REGS and MOD4_SSE_REGS.
5859 (REG_CLASS_NAMES): Update.
5860 (REG_CLASS_CONTENT): Update.
5861 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5862 registers as ALL_SSE_REGS.
5863 (ix86_additional_allocno_class_p): Remove.
5864 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5865 (ix86_register_priority): Lower priority of EVEX SSE registers.
5866 Use IN_RANGE macro where appropriate.
5867 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5868 AVX-5124VNNIW checks.
5869 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5870 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5871 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5872 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5873 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5874 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5875 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5876 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5877 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5878 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5879 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5880 * config/i386/constraints.md (Yh): Remove.
5882 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5884 * config/i386/i386.c (regclass_map): Declare integer REX registers
5887 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5889 * doc/service.texi (Service): Switch the fsf.org link to https.
5891 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5894 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5895 Define to speculation_safe_value_not_needed.
5897 2018-09-21 Florian Weimer <fweimer@redhat.com>
5900 * doc/extend.texi (Common Function Attributes): Mention that
5901 noreturn suppresses tail call optimization.
5903 2018-09-21 Jeff Law <law@redhat.com>
5905 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5906 vr_values::cleanup_edges_and_switches.
5907 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5909 (identify_jump_threads): Remove EDGE_IGNORE handling.
5910 (execute_vrp): Move handling of to_remove_edges and
5911 to_update_switch_stmts into vr_values class member functions.
5912 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5913 (to_update_switch_stmts): Likewise.
5914 * vr-values.c: Include cfghooks.h.
5915 (vr_values::vr_values): Initialize to_remove_edges and
5916 to_update_switch_stmts.
5917 (vr_values::~vr_values): Verify to_remove_edges and
5918 to_update_switch_stmts are empty.
5919 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5920 (vr_values::cleanup_edges_and_switches): New member function.
5921 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5922 function. Add new data members.
5924 2018-09-21 David Malcolm <dmalcolm@redhat.com>
5926 PR tree-optimization/87309
5927 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5928 calls with pflags and alt_flags.
5929 (selftest::test_capture_of_dump_calls): Add test of interaction of
5930 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5932 2018-09-21 Olivier Hainque <hainque@adacore.com>
5934 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5936 2018-09-21 Olivier Hainque <hainque@adacore.com>
5938 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5940 2018-09-21 Olivier Hainque <hainque@adacore.com>
5942 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5943 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5944 (VXWORKS_LIBS_RTP): Minor reordering.
5946 2018-09-21 Olivier Hainque <hainque@adacore.com>
5948 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5949 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5951 2018-09-21 Olivier Hainque <hainque@adacore.com>
5953 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5954 (PTRDIFF_TYPE): Likewise.
5956 2018-09-21 Olivier Hainque <hainque@adacore.com>
5958 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5959 triplet, similar to support for VxWorks7.
5960 * config/vxworks-dummy.h: Provide a default definition
5961 of TARGET_VXWORKS64 to 0.
5963 2018-09-21 Olivier Hainque <hainque@adacore.com>
5965 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5966 * config/vxworks-dummy.h: here.
5968 2018-09-21 Olivier Hainque <hainque@adacore.com>
5970 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5972 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
5973 Bo Zhou <zbo.zhou@hisilicon.com>
5975 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5976 * config/aarch64/aarch64-tune.md: Regenerated.
5977 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5978 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5979 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5981 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
5982 Julian Brown <julian@codesourcery.com>
5984 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5986 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5988 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5989 if the call takes a static chain.
5991 2018-09-21 Martin Liska <mliska@suse.cz>
5993 * auto-profile.c (autofdo_source_profile::read): Do not
5995 (read_profile): Do not add working sets.
5996 (read_autofdo_file): Remove sum_all.
5997 (afdo_callsite_hot_enough_for_early_inline): Remove const
5999 * coverage.c (struct counts_entry): Remove gcov_summary.
6000 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6001 do not support GCOV_TAG_PROGRAM_SUMMARY.
6002 (get_coverage_counts): Remove summary and expected
6004 * coverage.h (get_coverage_counts): Likewise.
6005 * doc/gcov-dump.texi: Remove -w option.
6006 * gcov-dump.c (dump_working_sets): Remove.
6007 (main): Do not support '-w' option.
6008 (print_usage): Likewise.
6009 (tag_summary): Likewise.
6010 * gcov-io.c (gcov_write_summary): Do not dump
6012 (gcov_read_summary): Likewise.
6013 (gcov_histo_index): Remove.
6014 (gcov_histogram_merge): Likewise.
6015 (compute_working_sets): Likewise.
6016 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6018 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6019 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6020 (GCOV_HISTOGRAM_SIZE): Remove.
6021 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6022 (struct gcov_summary): Simplify rapidly just
6023 to runs and sum_max fields.
6024 (gcov_histo_index): Remove.
6025 (NUM_GCOV_WORKING_SETS): Likewise.
6026 (compute_working_sets): Likewise.
6027 * gcov-tool.c (print_overlap_usage_message): Remove
6028 trailing empty line.
6029 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6030 (output_lines): Remove program related line.
6031 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6032 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6034 (input_profile_summary): Do not read it.
6035 (merge_profile_summaries): And do not merge it.
6036 (input_symtab): Do not call removed function.
6037 * modulo-sched.c (sms_schedule): Do not print sum_max.
6038 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6039 removed when histogram method was invented.
6040 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6042 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6044 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6045 and dump selected value.
6046 * profile.c (add_working_set): Remove.
6047 (get_working_sets): Likewise.
6048 (find_working_set): Likewise.
6049 (get_exec_counts): Do not work with working sets.
6050 (read_profile_edge_counts): Do not inform as sum_max is removed.
6051 (compute_branch_probabilities): Likewise.
6052 (compute_value_histograms): Remove argument for call of
6053 get_coverage_counts.
6054 * profile.h: Do not make gcov_summary const.
6056 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6058 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6060 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6062 PR tree-optimization/86990
6063 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6064 Check that the entire merged store group is made of constants only for
6067 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6069 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6070 (VTABLE_VERIFICATION_SPEC): Likewise.
6071 (SANITIZER_EARLY_SPEC): Likewise.
6072 (SANITIZER_SPEC): Likewise.
6073 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6074 * doc/invoke.texi (Link Options): Document -r.
6076 2018-09-20 Richard Biener <rguenther@suse.de>
6079 * gimplify.c (gimplify_expr): Retain alignment of
6080 addressable lvalue in dereference.
6082 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6085 * configure.ac: Check for .loc is_stmt support.
6086 * configure, config.in: Rebuilt.
6087 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6090 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6092 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6093 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6096 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6098 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6100 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6103 2018-09-20 Marek Polacek <polacek@redhat.com>
6105 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6107 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6109 PR tree-optimization/87288
6110 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6111 into account when determining PEELING_FOR_NITERS.
6113 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6115 PR tree-optimization/86877
6116 * tree-vect-loop.c (vect_analyze_loop_2): Call
6117 vect_verify_datarefs_alignment.
6119 2018-09-19 Marek Polacek <polacek@redhat.com>
6121 * doc/invoke.texi: Document -Wclass-conversion.
6123 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6125 * config/pa/pa.c (pa_adjust_priority): Delete.
6126 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6128 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6129 (atomic_storehi): Likewise.
6130 (atomic_storesi): Likewise.
6131 (atomic_loaddi): Restore compare and swap exchange loop code.
6133 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6135 PR rtl-optimization/86902
6136 * combine.c (try_combine): When changing the CC mode used, don't change
6137 an unrelated mode in other_insn to that new CC mode.
6139 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6141 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6142 with %T in place of calls to dump_generic_expr.
6143 (prune_runtime_alias_test_list): Likewise.
6144 (create_runtime_alias_checks): Likewise.
6145 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6146 (vect_analyze_data_ref_dependence): Likewise.
6147 (vect_slp_analyze_data_ref_dependence): Likewise.
6148 (vect_record_base_alignment): Likewise. Use %G in place of call
6149 to dump_gimple_stmt.
6150 (vect_compute_data_ref_alignment): Likewise.
6151 (verify_data_ref_alignment): Likewise.
6152 (vect_find_same_alignment_drs): Likewise.
6153 (vect_analyze_group_access_1): Likewise.
6154 (vect_analyze_data_ref_accesses): Likewise.
6155 (dependence_distance_ge_vf): Likewise.
6156 (dump_lower_bound): Likewise.
6157 (vect_prune_runtime_alias_test_list): Likewise.
6158 (vect_find_stmt_data_reference): Likewise.
6159 (vect_analyze_data_refs): Likewise.
6160 (vect_create_addr_base_for_vector_ref): Likewise.
6161 (vect_create_data_ref_ptr): Likewise.
6162 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6163 (vect_can_advance_ivs_p): Likewise.
6164 (vect_update_ivs_after_vectorizer): Likewise.
6165 (vect_gen_prolog_loop_niters): Likewise.
6166 (vect_prepare_for_masked_peels): Likewise.
6167 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6168 (vect_determine_vectorization_factor): Likewise.
6169 (vect_is_simple_iv_evolution): Likewise.
6170 (vect_analyze_scalar_cycles_1): Likewise.
6171 (vect_analyze_loop_operations): Likewise.
6172 (report_vect_op): Likewise.
6173 (vect_is_slp_reduction): Likewise.
6174 (check_reduction_path): Likewise.
6175 (vect_is_simple_reduction): Likewise.
6176 (vect_create_epilog_for_reduction): Likewise.
6177 (vect_finalize_reduction:): Likewise.
6178 (vectorizable_induction): Likewise.
6179 (vect_transform_loop_stmt): Likewise.
6180 (vect_transform_loop): Likewise.
6181 (optimize_mask_stores): Likewise.
6182 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6183 (vect_split_statement): Likewise.
6184 (vect_recog_over_widening_pattern): Likewise.
6185 (vect_recog_average_pattern): Likewise.
6186 (vect_determine_min_output_precision_1): Likewise.
6187 (vect_determine_precisions_from_range): Likewise.
6188 (vect_determine_precisions_from_users): Likewise.
6189 (vect_mark_pattern_stmts): Likewise.
6190 (vect_pattern_recog_1): Likewise.
6191 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6192 (vect_record_max_nunits): Likewise.
6193 (vect_build_slp_tree_1): Likewise.
6194 (vect_build_slp_tree_2): Likewise.
6195 (vect_print_slp_tree): Likewise.
6196 (vect_analyze_slp_instance): Likewise.
6197 (vect_detect_hybrid_slp_stmts): Likewise.
6198 (vect_detect_hybrid_slp_1): Likewise.
6199 (vect_slp_analyze_operations): Likewise.
6200 (vect_slp_analyze_bb_1): Likewise.
6201 (vect_transform_slp_perm_load): Likewise.
6202 (vect_schedule_slp_instance): Likewise.
6203 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6204 (vect_mark_stmts_to_be_vectorized): Likewise.
6205 (vect_init_vector_1): Likewise.
6206 (vect_get_vec_def_for_operand): Likewise.
6207 (vect_finish_stmt_generation_1): Likewise.
6208 (vect_check_load_store_mask): Likewise.
6209 (vectorizable_call): Likewise.
6210 (vectorizable_conversion): Likewise.
6211 (vectorizable_operation): Likewise.
6212 (vectorizable_load): Likewise.
6213 (vect_analyze_stmt): Likewise.
6214 (vect_is_simple_use): Likewise.
6215 (vect_get_vector_types_for_stmt): Likewise.
6216 (vect_get_mask_type_for_stmt): Likewise.
6217 * tree-vectorizer.c (increase_alignment): Likewise.
6219 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6221 * doc/rtl.texi: Adjust vec_select description.
6222 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6223 non-constant selectors.
6225 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6227 * config/aarch64/aarch64-protos.h
6228 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6229 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6230 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6231 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6232 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6233 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6234 (AARCH64_ISA_RCPC8_4): New flag.
6235 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6236 to aarch64_offset_9bit_signed_unscaled_p.
6237 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6239 * config/aarch64/constraints.md (Ust): New constraint.
6240 * config/aarch64/predicates.md.
6241 (aarch64_9bit_offset_memory_operand): New predicate.
6242 (aarch64_rcpc_memory_operand): New predicate.
6244 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6246 PR rtl-optimization/87361
6247 * rtlanal.c (nonzero_bits1): Revert accidental change.
6249 2018-09-19 Richard Biener <rguenther@suse.de>
6251 PR tree-optimization/87349
6252 PR tree-optimization/87342
6253 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6255 2018-09-18 Marek Polacek <polacek@redhat.com>
6257 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6258 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6260 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6262 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6264 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6266 PR rtl-optimization/86882
6267 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6269 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6271 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6272 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6274 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6277 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6279 2018-09-18 Richard Biener <rguenther@suse.de>
6282 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6283 (compute_samebase_partition_bases): Likewise.
6284 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6285 (gimple_can_coalesce_p): Simplify.
6287 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6289 Handle a library implementation of ffs calling __builtin_ffs.
6290 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6291 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6294 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6296 * diagnostic-show-locus.c (class layout_range): Add field
6298 (layout_range::layout_range): Add "original_idx" param and use it
6299 to initialize new field.
6300 (make_range): Use 0 for original_idx.
6301 (layout::layout): Pass in index to calls to
6302 maybe_add_location_range.
6303 (layout::maybe_add_location_range): Add param "original_idx" and
6304 pass it on to layout_range.
6305 (layout::print_any_labels): Pass on range->m_original_idx to
6307 (gcc_rich_location::add_location_if_nearby): Use 0 for
6309 * gcc-rich-location.h (text_range_label::get_text): Update for new
6311 (range_label_for_type_mismatch::get_text): Likewise.
6313 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6315 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6317 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6319 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6320 format_string_diagnostic_t.
6321 (fmtwarn_n): Likewise.
6322 * substring-locations.c
6323 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6324 (format_warning_n_va): Convert to...
6325 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6326 (format_warning_va): Convert to...
6327 (format_string_diagnostic_t::emit_warning_va): ...this.
6328 (format_warning_at_substring): Convert to...
6329 (format_string_diagnostic_t::emit_warning): ...this.
6330 (format_warning_at_substring_n): Convert to...
6331 (format_string_diagnostic_t::emit_warning_n): ...this.
6332 * substring-locations.h (class format_string_diagnostic_t): New
6334 (format_warning_va): Convert to
6335 format_string_diagnostic_t::emit_warning_va.
6336 (format_warning_n_va): Convert to
6337 format_string_diagnostic_t::emit_warning_n_va.
6338 (format_warning_at_substring): Convert to
6339 format_string_diagnostic_t::emit_warning.
6340 (format_warning_at_substring_n): Convert to
6341 format_string_diagnostic_t::emit_warning_n.
6343 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6344 Bernd Schmidt <bernds_cb1@t-online.de>
6346 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6349 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6351 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6352 operand 0 predicate to nonimmediate operand.
6353 (rint<mode>2_frndint): Remove insn pattern.
6354 (rint<mode>2): Change operand 1 predicate to general_operand.
6355 Extend operand 1 to XFmode and generate rintxf2 insn.
6356 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6357 Do not use X87MODEF mode macro.
6358 (frndintxf2_<rounding>_i387): Rename from
6359 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6360 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6361 to XFmode and generate significandxf3 insn.
6363 2018-09-17 Richard Biener <rguenther@suse.de>
6365 PR tree-optimization/87328
6366 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6367 visiting unexecutable backedges when not iterating.
6368 (do_rpo_vn): Mark all edges not executable even when not
6371 2018-09-17 Martin Jambor <mjambor@suse.cz>
6374 * doc/invoke.texi (Warning Options): Likewise.
6376 2018-09-17 Richard Biener <rguenther@suse.de>
6378 PR tree-optimization/87301
6379 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6380 clean EH info from leftover copy assignments.
6382 2018-09-17 Martin Liska <mliska@suse.cz>
6384 PR gcov-profile/85871
6385 * gcov.c (output_intermediate_file): Fix out of bounds
6388 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6390 * config/arc/arc.c: Object attributes for core4 not reflected
6392 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6395 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6397 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6399 2018-09-17 Martin Liska <mliska@suse.cz>
6401 * doc/gcov.texi: Document new option --use-hotness-colors.
6402 * gcov.c (struct source_info): Declare new field.
6403 (source_info::source_info): Set default for maximum_count.
6404 (print_usage): Add new -q option.
6405 (process_args): Process it.
6406 (accumulate_line_info): Save src->maximum_count.
6407 (output_line_beginning): Make color line number if
6408 flag_use_hotness_colors is set.
6409 (output_line_details): Pass default argument value.
6410 (output_lines): Pass src->maximum_count.
6412 2018-09-17 Martin Liska <mliska@suse.cz>
6414 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6415 Use processor_names table.
6416 * config/i386/i386.c (ix86_default_align): Use
6417 processor_cost_table for alignment values.
6418 (ix86_option_override_internal): Use processor_names.
6419 (ix86_function_specific_print): Likewise.
6420 * config/i386/i386.h (struct processor_costs):
6421 Add alignment values.
6422 (struct ptt): Remove and replace with const char *.
6423 * config/i386/x86-tune-costs.h (struct processor_costs):
6424 Declare default alignments for all costs.
6426 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6428 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6429 symbolics or VR_VARYING ranges for ABS_EXPR.
6430 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6431 when range will wrap.
6433 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6436 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6437 before and after a JUMP_TABLE_DATA.
6439 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6442 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6443 when one operand is a function pointer. Use POINTER_TYPE_P and
6444 FUNC_OR_METHOD_TYPE_P.
6445 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6446 * fold-const.c (build_range_check): Likewise.
6447 * match.pd (simple_comparison): Likewise.
6449 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6452 * spellcheck.c (get_edit_distance_cutoff): New function.
6453 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6454 (selftest::test_get_edit_distance_one_way): ...this.
6455 (selftest::test_get_edit_distance_unit): Rename to...
6456 (selftest::test_get_edit_distance_both_ways): ...this.
6457 (selftest::test_edit_distances): Move tests to this new function,
6458 and test some more pairs of strings. Update for above renaming.
6459 (selftest::get_old_cutoff): New function.
6460 (selftest::test_get_edit_distance_cutoff): New function.
6461 (selftest::assert_suggested_for): New function.
6462 (ASSERT_SUGGESTED_FOR): New macro.
6463 (selftest::assert_not_suggested_for): New function.
6464 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6465 (selftest::test_suggestions): New function.
6466 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6467 tests to selftest::test_edit_distances and call it. Add calls to
6468 selftest::test_get_edit_distance_cutoff and
6469 selftest::test_suggestions.
6470 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6471 (best_match::consider): Replace hard-coded cutoff calculation with
6473 (best_match::get_cutoff): New declaration.
6474 (best_match::get_best_meaningful_candidate): Likewise.
6476 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6478 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6480 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6483 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6485 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6486 terminated string literal.
6488 2018-09-14 Martin Sebor <msebor@redhat.com>
6490 * builtins.c (unterminated_array): Handle ARRAY_REF.
6491 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6492 * builtins.h (unterminated_array): Declare extern.
6493 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6495 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6498 2018-09-14 Martin Sebor <msebor@redhat.com>
6499 Jeff Law <law@redhat.com>
6501 * builtins.c (unterminated_array): New.
6502 (expand_builtin_strcpy): Adjust.
6503 (expand_builtin_strcpy_args): Detect unterminated arrays.
6504 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6505 unterminated arrays.
6506 * gimple-fold.h (get_maxval_strlen): Add argument.
6507 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6509 * gimple-fold.c (get_range_strlen): Add argument.
6510 (get_maxval_strlen): Adjust.
6511 * gimple-fold.h (get_range_strlen): Add argument.
6513 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6515 * config/i386/movdirintrin.h: Fix copyright year.
6517 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6519 * reg-stack.c: Include regs.h.
6520 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6521 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6522 FIRST_STACK_REG, not DFmode.
6523 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6524 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6525 (change stack): Default register mode to the reg_raw_mode of
6526 FIRST_STACK_REG, not DFmode.
6527 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6528 (*swapxf): Rename from swapxf.
6530 2018-09-14 Carl Love <cel@us.ibm.com>
6532 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6533 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6535 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
6538 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6541 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
6544 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6546 2018-09-14 Jason Merrill <jason@redhat.com>
6548 Fix --enable-gather-detailed-mem-stats.
6549 * hash-table.c (hash_table_usage): Change from variable to function.
6550 * hash-table.h: Adjust.
6551 * Makefile.in: Add missing dependencies on hash-table.h.
6553 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6555 PR tree-optimization/87259
6557 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6558 execute_cse_reciprocals_1 has tried transforming.
6560 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
6562 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6563 VR_VARYING for PLUS/MINUS_EXPR.
6565 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
6567 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6570 2018-09-14 Richard Biener <rguenther@suse.de>
6573 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6574 bits for the merged partition.
6576 2018-09-13 Martin Sebor <msebor@redhat.com>
6577 Bernd Edlinger <bernd.edlinger@hotmail.de>
6579 * builtins.h (c_srlen): Add argument.
6580 * builtins.c (warn_string_no_nul): New function.
6581 (c_strlen): Add argument and use it. Update recursive calls.
6582 Pass DECL argument to string_constant to get info on non
6583 terminated strings. Update *NONSTR as needed.
6584 (fold_builtin_strlen): Add argument to calls to c_strlen.
6585 Warn for unterminated arrays.
6586 (warn_string_no_null): Add prototype.
6587 * expr.c (string_constant): Update arguments. Update recursive
6588 calls appropriately. Detect missing NUL terminator and outermost
6589 declaration its missing in.
6590 Improve checks for arrays with nonzero lower bound or elements
6591 that are not a single byte. Simplify offset computation.
6592 Simplify checks for non-NUL terminated strings.
6593 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6594 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6596 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6598 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6600 * fold-const.c (c_getstr): Fix function comment. Remove unused third
6601 argument. Fix range checks.
6602 * fold-const.h (c_getstr): Adjust protoype.
6603 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6604 string is constant but contains no NUL byte.
6606 * expr.c (string_constant): Adjust function comment.
6607 Remove bogus check for zero termination.
6609 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6611 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6612 (get_constant_size): Don't make STRING_CSTs larger than they are.
6613 (check_string_literal): New check function for STRING_CSTs.
6614 (output_constant): Use it.
6616 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6619 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6621 2018-09-13 Richard Biener <rguenther@suse.de>
6623 PR tree-optimization/87263
6624 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6625 (struct unwind_state): Add max_rpo field.
6626 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6627 Compute max_rpo, the max RPO number a block can be backwards reached
6628 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6629 separating it from the iterating mode.
6631 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6633 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6634 (rfs_decision): New scheduling decision.
6636 2018-09-13 Richard Biener <rguenther@suse.de>
6639 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6640 (vn_nary_op_insert_pieces_predicated): Do not write useless
6641 valid_dominated_by_p entry outside of the allocated storage.
6643 2018-09-13 Omar Sandoval <osandov@osandov.com>
6644 Tom de Vries <tdevries@suse.de>
6647 * dwarf2out.c (is_c): New function.
6648 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6650 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6653 * config/aarch64/aarch64.md (*aarch64_bfxil):
6655 * config/aarch64/constraints.md (Ulc): Define.
6656 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6658 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6661 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6663 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6664 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6665 aarch64_layout_frame call.
6666 (aarch64_expand_epilogue): Likewise.
6667 (aarch64_initial_elimination_offset): Likewise.
6668 (aarch64_get_separate_components): Likewise.
6669 (aarch64_use_return_insn_p): Likewise.
6670 (aarch64_layout_frame): Remove unneeded check.
6672 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6674 * configure.ac: Only append
6675 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6676 gcc_config_arguments if it was never reconfigured or last reconfigure
6677 was with different arguments.
6678 * configure: Regenerated.
6680 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6681 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6684 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6685 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6687 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6689 PR tree-optimization/87287
6690 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6691 X % C == 0 to X % (unsigned) C == 0 optimization to ...
6692 * match.pd (X % C == 0): ... here. New optimization.
6694 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6697 * expr.h (maybe_optimize_mod_cmp): Declare.
6698 * expr.c (mod_inv): New function.
6699 (maybe_optimize_mod_cmp): New function.
6700 (do_store_flag): Use it.
6701 * cfgexpand.c (expand_gimple_cond): Likewise.
6703 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
6704 Julian Brown <julian@codesourcery.com>
6707 * gimplify.c (gimplify_scan_omp_clauses): Set
6708 target_firstprivatize_array_bases in OpenACC parallel and kernels
6709 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6710 OpenACC data regions.
6712 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
6714 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6715 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6717 2018-09-12 Richard Biener <rguenther@suse.de>
6719 PR tree-optimization/87280
6720 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6721 edge but unreachable target.
6722 (do_rpo_vn): For conservatively handling a PHI only mark
6723 the backedge executable but not the block reachable.
6725 2018-09-12 Richard Biener <rguenther@suse.de>
6727 PR tree-optimization/87266
6728 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6731 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
6733 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6735 ("trunc<BFP:mode><DFP_ALL:mode>2")
6736 ("trunc<DFP_ALL:mode><BFP:mode>2")
6737 ("extend<BFP:mode><DFP_ALL:mode>2")
6738 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6739 according to the target operand type.
6741 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6742 Andreas Krebbel <krebbel@linux.ibm.com>
6744 PR tree-optimization/86844
6745 * gimple-ssa-store-merging.c
6746 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6747 there are any overlapping stores in between them, make sure they are
6748 also coalesced or we give up completely.
6750 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6753 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6754 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
6756 2018-09-12 Tom de Vries <tdevries@suse.de>
6758 * common.opt (gdescribe-dies): Add option.
6759 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6760 attribute for artifical and nameless decls.
6761 (dwarf2out_register_external_die): Add description attribute to
6762 external reference die.
6763 (add_desc_attribute): New functions.
6764 (gen_subprogram_die): Add description attribute to
6765 DW_TAG_call_site_parameter.
6766 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6767 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6768 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6770 (@item -gdescribe-dies): Add.
6772 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6774 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6775 (extract_range_from_binary_expr_1: Call
6776 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6777 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6780 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6782 * gimple-ssa-warn-alloca.c
6783 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6784 field for ALLOCA_BOUND_*_LARGE.
6786 2018-09-11 Nathan Sidwell <nathan@acm.org>
6788 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6790 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6792 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6793 for clobbers. Remove obsolete comment.
6795 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6797 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6798 mpxchk, mpxld and mpxst types.
6799 (define_attr length_immediate): Remove all processing of mpx types.
6800 (define_attr prefix_0f): Ditto.
6801 (define_attr memory): Ditto.
6803 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6805 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6806 (log<mode>2): Change operand 1 predicate to general_operand.
6807 Extend operand 1 to XFmode and generate logxf3 insn.
6808 (log10<mode>2): Change operand 1 predicate to general_operand.
6809 Extend operand 1 to XFmode and generate log10xf3 insn.
6810 (log2<mode>2): Change operand 1 predicate to general_operand.
6811 Extend operand 1 to XFmode and generate log2xf3 insn.
6812 (fyl2xp1_extend<mode>xf3_i387): Remove.
6813 (log1p<mode>2): Change operand 1 predicate to general_operand.
6814 Extend operand 1 to XFmode and generate log1pxf3 insn.
6815 (fxtract_extend<mode>xf3_i387): Remove.
6816 (logb<mode>2): Change operand 1 predicate to general_operand.
6817 Extend operand 1 to XFmode and generate logbxf3 insn.
6818 (ilogb<mode>2): Change operand 1 predicate to general_operand.
6819 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6820 (significand<mode>2): Change operand 1 predicate to general_operand.
6821 Extend operand 1 to XFmode and generate significandxf3 insn.
6823 2018-09-11 Nathan Sidwell <nathan@acm.org>
6825 * gcc.c (perror_with_name, pfatal_with_name): Delete.
6826 (load_specs): Use fatal_error.
6827 (DELETE_IF_ORDINARY, process_command): Use error.
6828 (execute, run_attempt): Use fatal_error.
6830 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
6832 * diagnostic-core.h (sorry_at): New prototype.
6833 * diagnostic.c (sorry_at): New function.
6835 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
6837 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6838 by zero as VR_UNDEFINED.
6840 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6842 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6843 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6844 (<sincos>mode2): New expander.
6845 (sincos_extend<mode>xf3_i387): Remove insn pattern.
6846 (sincos -> sin, cos splitters): Remove splitter patterns.
6847 (sincos<mode>3): Change operand 2 predicate to general_operand.
6848 Extend operand 2 to XFmode and generate sincosxf3 insn.
6849 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6850 Change operand 3 predicate to const1_operand.
6851 (fptan_extend<mode>xf4_i387): Remove insn pattern.
6852 (tanxf2): Update operands in the call to fptanxf4_i387.
6853 (tan<mode>2): Change operand 1 predicate to general_operand.
6854 Extend operand 1 to XFmode and generate tanxf3 insn.
6855 (atan2xf3): Rename from *fpatanxf3_i387.
6856 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6857 (atan2xf3): Remove expander.
6858 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
6859 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6860 (atan<mode>2): Change operand 1 predicate to general_operand.
6861 Extend operand 1 to XFmode and generate atanxf3 insn.
6863 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6865 * config/i386/i386.md (x87/SSE constant load splitter): Use
6866 memory_operand instead of nonimmediate_operand for input operand
6869 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6871 * config/i386/i386.md (float partial SSE register stall splitter): Move
6872 splitter near its instruction pattern.
6873 (float_extend partial SSE register stall splitter): Ditto.
6874 (float_truncate partial SSE register stall splitter): Ditto.
6876 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6879 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6880 to speculation_safe_value_not_needed.
6883 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6884 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6885 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6886 leaf_function_p, instead use has_hard_reg_initial_val.
6888 2018-09-09 Nathan Sidwell <nathan@acm.org>
6890 * gcc.h (pfatal_with_name): Don't declare here.
6891 * gcc.c (pfatal_with_name): Make static.
6893 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6895 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6898 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6900 PR rtl-optimization/85458
6901 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6902 priority hook to reduce the priority of EXPR.
6904 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6906 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6907 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6908 with X87_ENABLE_FLOAT. Remove preparation code.
6909 (*float<SWI48:mode><MODEF:mode>2): Rename from
6910 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6911 math using "enabled" attribute.
6912 (*floatdi<MODEF:mode>2_i387): Rename from
6913 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6914 enable for 32bit targets only.
6915 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6917 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6918 as operand 1 predicate. Rewrite as define_insn_and_split.
6919 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6921 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6923 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6924 to fallthru to FLOAT case.
6926 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6929 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6930 around folding of vec_sl to handle out of range shift values.
6932 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6934 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6935 Update callers to gen_fix_trunc<mode>_i387_fisttp
6936 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6937 nonimmediate_operand.
6938 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6939 and corresponding splitters.
6940 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6941 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6942 (fix_truncdi_i387_with_temp): Remove insn pattern
6943 and corresponding splitters.
6944 (fix_trunc<mode>_i387): Change operand 0 predicate to
6945 nonimmediate_operand.
6946 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6947 and corresponding splitters.
6948 (*fistdi2_1): Remove.
6950 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6951 (lrintxfdi2): Remove expander. Reimplement as define_insn.
6952 (*fist<mode>2_1): Remove.
6953 (fist<mode>2): Ditto.
6954 (fist<mode>2_with_temp): Remove insn pattern and corresponding
6956 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
6957 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6958 (fistdi2_<rounding>): Change operand 0 predicate to
6959 nonimmediate_operand.
6960 (fistdi2_<rounding>_with_temp): Remove insn pattern
6961 and corresponding splitters.
6962 (fist<mode>2_<rounding>): Change operand 0 predicate to
6963 nonimmediate_operand.
6964 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6965 and corresponding splitters.
6967 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6969 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6971 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6974 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6976 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6977 early gimple folding of vec_splat().
6978 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6979 * gimple-fold.h: Add an extern define for tree_vec_extract().
6981 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6983 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6984 wrappers around TREE_TYPE comparisons.
6986 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6989 * config/s390/predicates.md: Add nonsym_memory_operand.
6990 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6991 contains a SYMBOL_REF, load it into an intermediate pseudo.
6992 (s390_emit_compare_and_swap): Legitimize operand.
6993 * config/s390/s390.md: Use the new nonsym_memory_operand
6994 with UNSPECV_CAS patterns.
6996 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6999 * config/s390/s390-passes.def: New file.
7000 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7002 (make_pass_s390_early_mach): Add declaration.
7003 * config/s390/s390.c (make_pass_s390_early_mach):
7004 (s390_option_override): Remove dynamic registration.
7005 * config/s390/t-s390: Add s390-passes.def.
7007 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7009 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7010 Remove UNSPEC_LTREL_BASE check.
7011 (annotate_constant_pool_refs): Likewise.
7012 (find_constant_pool_ref): Likewise.
7013 (find_ltrel_base): Removed.
7014 (replace_ltrel_base): Removed.
7015 (s390_mainpool_finish): Remove replace_ltrel_base call.
7016 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7017 (s390_chunkify_finish): Remove replace_ltrel_base call.
7018 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7020 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7023 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7024 to speculation_safe_value_not_needed.
7026 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7027 Bernd Schmidt <bernds_cb1@t-online.de>
7029 * config/nvptx/nvptx-opts.h: New file.
7030 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7031 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7033 (TARGET_SM35): New macro.
7034 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7036 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7038 (misa=): New option.
7039 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7041 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7043 * config/i386/i386.md (truncdfsf2): Remove expander.
7044 (truncdfsf2_with_temp): Ditto.
7045 (truncxf<mode>2): Ditto.
7046 (*truncdfsf_fast_mixed): Remove insn pattern.
7047 (*truncdfsf_fast_i387): Ditto.
7048 (*truncdfsf_mixed): Ditto.
7049 (*truncdfsf_i387): Ditto.
7050 (*truncdfsf2_i387_1): Ditto.
7051 (*truncxfsf2_mixed): Ditto.
7052 (*truncxfdf2_mixed): Ditto.
7053 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7054 to call gen_truncxf<mode>2 instead.
7055 (*truncxf<mode>2_i387): Remove.
7056 (reg->reg splitters): Remove splitter pattern.
7057 (reg->mem splitters): Ditto.
7059 (truncdfsf2): New insn pattern.
7060 (truncxf<mode>2): Ditto.
7062 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7064 * tree-ssa-math-opts.c (is_mult_by): New function.
7065 (is_square_of): Use the above.
7066 (optimize_recip_sqrt): New function.
7067 (pass_cse_reciprocals::execute): Use the above.
7069 2018-09-05 Richard Biener <rguenther@suse.de>
7072 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7073 to zero-init the emplaced vec.
7075 2018-09-05 Martin Liska <mliska@suse.cz>
7077 PR tree-optimization/87205
7078 * tree-switch-conversion.c (pass_lower_switch::execute):
7079 Group cases for switch statements.
7081 2018-09-05 Richard Biener <rguenther@suse.de>
7083 PR tree-optimization/87217
7084 * tree-ssa-sccvn.c (vuse_valueize): New.
7085 (vn_reference_lookup_pieces): Use it.
7086 (vn_reference_lookup): Likewise.
7088 2018-09-05 Nathan Sidwell <nathan@acm.org>
7091 * stor-layout.c (place_field): Scan forwards to check last
7092 bitfield when ms_bitfield_placement is in effect.
7094 2018-09-05 Richard Biener <rguenther@suse.de>
7097 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7100 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7101 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7103 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7104 * config.gcc (extra_objs): Build it.
7105 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7107 * config/aarch64/aarch64-passes.def
7108 (pass_tag_collision_avoidance): New pass.
7109 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7110 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7111 (aarch64_classify_address): Remove static qualifier.
7112 (aarch64_address_info, aarch64_address_type): Move to...
7113 * config/aarch64/aarch64-protos.h: ... here.
7114 (make_pass_tag_collision_avoidance): New function.
7115 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7118 2018-09-05 Martin Liska <mliska@suse.cz>
7120 * doc/gcov.texi: Update documentation of humar
7122 * gcov.c (format_count): Print one decimal place, it provides
7123 more fine number of situations like '1G' vs. '1.4G'.
7125 2018-09-05 Martin Liska <mliska@suse.cz>
7128 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7129 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7130 to generate a MASK value.
7132 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7135 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7136 if frame pointer isn't used.
7137 (compute_frame_pointer_to_fb_displacement): Likewise.
7139 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7142 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7143 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7144 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7145 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7146 and OPTION_MASK_ISA_XSAVEC_UNSET.
7148 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7150 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7151 XOR operations in NAND case.
7153 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7155 * wide-int-range.cc (wide_int_range_convert): New.
7156 * wide-int-range.h (wide_int_range_convert): New.
7157 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7158 code into wide_int_range_convert.
7159 (extract_range_into_wide_ints): Do not munge anti range constants
7160 into the entire domain. Just return the range back.
7162 2018-09-04 Martin Liska <mliska@suse.cz>
7164 * genmatch.c (output_line_directive): Add new argument
7166 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7168 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7170 * doc/invoke.texi (Option Summary): Add whitespace.
7172 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7174 2018-09-04 Richard Biener <rguenther@suse.de>
7176 PR tree-optimization/87211
7177 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7178 backedge value we're supposed to treat as VARYING also number
7179 the PHI to VARYING in case it got a different value-number already.
7181 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7183 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7184 (extract_range_from_binary_expr_1): Do not call
7185 vrp_can_optimize_bit_op.
7186 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7188 (wide_int_range_get_mask_and_bounds): New.
7189 (wide_int_range_optimize_bit_op): New.
7190 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7191 (wide_int_range_bit_and): Same.
7192 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7193 (wide_int_range_optimize_bit_op): New.
7194 (wide_int_range_get_mask_and_bounds): New.
7196 2018-09-04 Richard Biener <rguenther@suse.de>
7198 PR tree-optimization/87176
7199 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7200 variable. When value-numbering a virtual PHI node make sure
7201 to not value-number to the backedge value.
7203 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7205 * doc/extend.texi (Long Long, Hex Floats): Document support for
7206 long long and hex floats in more recent versions of ISO C++.
7208 2018-09-03 Richard Biener <rguenther@suse.de>
7210 PR tree-optimization/87177
7211 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7214 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7216 * bb-reorder.c (edge_order): Convert to C-qsort-style
7217 tri-state comparator.
7218 (reorder_basic_blocks_simple): Change std::stable_sort to
7221 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7223 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7224 tri-state comparator.
7225 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7227 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7229 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7230 (mergesort): ... here as maximum count for using netsort.
7231 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7232 (gcc_stablesort): New.
7233 * system.h (gcc_stablesort): Declare.
7235 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7237 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7238 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7239 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7241 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7243 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7244 lxsdx and stxsdx alternatives.
7245 (*mov<mode>_hardfloat64): Ditto.
7246 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7248 2018-09-03 Richard Biener <rguenther@suse.de>
7250 PR tree-optimization/87200
7251 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7254 2018-09-03 Martin Liska <mliska@suse.cz>
7256 PR tree-optimization/87201
7257 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7258 Fix parenthesis in an expression.
7260 2018-09-03 Richard Biener <rguenther@suse.de>
7262 PR tree-optimization/87197
7263 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7264 visited. CSE the VN_INFO hashtable lookup.
7266 PR tree-optimization/87169
7267 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7268 iterating make sure there's no extra backedges from irreducible
7269 regions feeding the header. Mark the destination block
7272 2018-09-03 Martin Liska <mliska@suse.cz>
7275 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7276 * common/common-targhooks.c (default_get_valid_option_values):
7278 * common/common-targhooks.h (default_get_valid_option_values):
7280 * common/config/i386/i386-common.c: Move processor_target_table
7282 (ix86_get_valid_option_values): New function.
7283 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7284 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7285 (PTA_*): Move all defined masks into i386-common.c.
7286 (ix86_function_specific_restore): Use new processor_cost_table.
7287 * config/i386/i386.h (struct ptt): Moved from i386.c.
7288 (struct pta): Likewise.
7289 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7290 * doc/tm.texi.in: Likewise.
7291 * opt-suggestions.c (option_proposer::suggest_option):
7292 Pass prefix to build_option_suggestions.
7293 (option_proposer::get_completions): Likewise.
7294 (option_proposer::build_option_suggestions): Use the new target
7296 * opts.c (struct option_help_tuple): New struct.
7297 (print_filtered_help): Use the new target hook.
7299 2018-09-03 Martin Liska <mliska@suse.cz>
7302 * predict.c (set_even_probabilities): Add likely_edges
7303 argument and handle cases where we have precisely one
7305 (combine_predictions_for_bb): Catch also likely_edges.
7306 (tree_predict_by_opcode): Handle gswitch statements.
7307 * tree-cfg.h (find_case_label_for_value): New declaration.
7308 (find_taken_edge_switch_expr): Likewise.
7309 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7310 Find pivot in decision tree based on probabily, not by number of
7313 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7315 * doc/standards.texi (Standards): Update Objective-C reference.
7317 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7319 * doc/install.texi (Prerequisites): Update link for MPC.
7321 2018-09-01 Michael Matz <matz@suse.de>
7323 PR tree-optimization/87074
7324 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7325 PHIs for outer-loop uses.
7327 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7329 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7330 * doc/invoke.texi (C Dialect Options): Ditto.
7332 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7334 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7336 2018-08-31 Richard Biener <rguenther@suse.de>
7338 PR tree-optimization/87168
7339 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7340 (rpo_elim::eliminate_avail): When OP was not visited it must
7343 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7345 * tree-vrp.c (copy_value_range): Convert param "from" from
7346 "value_range *" to "const value_range *".
7347 (range_is_null): Likewise for param "vr".
7348 (range_int_cst_p): Likewise.
7349 (range_int_cst_singleton_p): Likewise.
7350 (symbolic_range_p): Likewise.
7351 (value_ranges_intersect_p): Likewise for both params.
7352 (value_range_nonnegative_p): Likewise for param "vr".
7353 (value_range_constant_singleton): Likewise.
7354 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7355 (extract_range_into_wide_ints): Likewise for param "vr".
7356 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7358 (vrp_can_optimize_bit_op): Likewise.
7359 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7361 (extract_range_from_unary_expr): Likewise.
7362 (debug_value_range): Likewise for param "vr".
7363 (value_range::dump): Add "const" qualifier.
7364 (vrp_prop::check_array_ref): Convert local "vr" from
7365 "value_range *" to "const value_range *".
7366 (vrp_prop::check_mem_ref): Likewise.
7367 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7368 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7369 (vrp_intersect_ranges): Likewise.
7370 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7371 (vrp_prop::vrp_finalize): Likewise.
7372 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7373 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7374 (extract_range_from_unary_expr): Likewise.
7375 (value_range_constant_singleton): Likewise.
7376 (symbolic_range_p): Likewise.
7377 (copy_value_range): Likewise.
7378 (extract_range_from_binary_expr_1): Likewise.
7379 (range_int_cst_p): Likewise.
7380 (vrp_set_zero_nonzero_bits): Likewise.
7381 (range_int_cst_singleton_p): Likewise.
7383 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7385 * config/aarch64/arm_neon.h (vabsd_s64): New.
7386 (vnegd_s64): Likewise.
7388 2018-08-31 Martin Jambor <mjambor@suse.cz>
7390 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7392 2018-08-31 Martin Liska <mliska@suse.cz>
7394 * ipa-icf.c (sem_item::add_type): Use
7395 sem_item::m_type_hash_cache.
7396 * ipa-icf.h: Move the cache from sem_item_optimizer
7399 2018-08-31 Nathan Sidwell <nathan@acm.org>
7401 * doc/extend.texi (Backwards Compatibility): Remove implicit
7402 extern C leeway of () being (...).
7404 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7406 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7408 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7412 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7414 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7417 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7418 gen_int_mode. Formatting fixes.
7420 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7422 * target.def (custom_function_descriptors): Improve documentation.
7423 * doc/tm.texi.in (Trampolines): Expand discussion of function
7424 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7425 beginning of the section.
7426 * doc/tm.texi: Regenerated.
7428 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7430 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7431 base class in the initializer list. This is a workaround for
7432 building with older GCC.
7433 (class auto_bb_flag): Likewise.
7435 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7437 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7438 (altivec_vcmpequ<VI_char>_p): Remove star.
7439 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7441 (expand_strncmp_vec_sequence): New function.
7442 (emit_final_str_compare_vec): New function.
7443 (expand_strn_compare): Add support for vector strncmp.
7444 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7445 length specification to bytes.
7446 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7447 (vcmpnezb_p): New pattern.
7448 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7449 for option -mstring-compare-inline-limit.
7451 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7453 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7454 (PTA_SKYLAKE): Add PTA_AES.
7455 (PTA_GOLDMONT): Likewise.
7457 2018-08-29 Jan Hubicka <jh@suse.cz>
7460 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7461 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7463 2018-08-29 Jan Hubicka <jh@suse.cz>
7465 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7467 (hash_tree): Do not visit TYPE_STUB_DECL.
7468 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7469 stream TYPE_STUB_DECL.
7470 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7471 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7472 after free_lang_data.
7473 (type_in_anonymous_namespace_p): Likewise.
7475 2018-08-29 Jan Hubicka <jh@suse.cz>
7477 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7478 comment that it has to be even number.
7479 (class sreal): Change m_sig type to int32_t.
7480 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7481 int64_t for temporary calculations.
7482 (sreal_verify_basics): Drop one bit from minimum and maximum.
7484 2018-08-30 Richard Biener <rguenther@suse.de>
7486 PR tree-optimization/87147
7487 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7488 (visit_phi): When the degenerate result is from the backedge and
7489 we didn't visit its definition yet drop to VARYING.
7490 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7492 2018-08-29 Jan Hubicka <jh@suse.cz>
7494 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7496 (hash_tree): Likewise.
7498 2018-08-29 Jan Hubicka <jh@suse.cz>
7500 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7501 and TYPE_NEXT_REF_TO.
7503 2018-08-29 Jan Hubicka <jh@suse.cz>
7505 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7506 comment that it has to be even number.
7507 (class sreal): Change m_sig type to int32_t.
7508 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7509 int64_t for temporary calculations.
7510 (sreal_verify_basics): Drop one bit from minimum and maximum.
7512 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7514 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7516 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7519 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7520 if to_add is negative.
7522 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7525 * builtins.c (c_strlen): Improve range checks.
7527 2018-08-29 Martin Sebor <msebor@redhat.com>
7528 Jeff Law <law@redhat.com>
7530 PR tree-optimization/86714
7531 PR tree-optimization/86711
7532 * builtins.c (c_strlen): Add arguments to call to string_constant.
7533 * expr.c (string_constant): Add argument. Detect missing nul
7534 terminator and outermost declaration it's missing in.
7535 * expr.h (string_constant): Add argument.
7536 * fold-const.c (read_from_constant_string): Add arguments to call to
7538 (c_getstr): Likewise.
7539 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7541 * tree-ssa-strlen.c (get_stridx): Likewise.
7543 2018-08-29 Jan Hubicka <jh@suse.cz>
7545 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7546 Do not stream DECL_VINDEX.
7547 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7548 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7549 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7551 2018-08-29 Richard Biener <rguenther@suse.de>
7553 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7554 virtual operands that are not default defs to honor region
7556 (rpo_vn_valueize): Remove ineffective code here.
7558 2018-08-29 Richard Biener <rguenther@suse.de>
7560 PR tree-optimization/87132
7561 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7562 when skipping defs reachable over backedges.
7564 2018-08-29 Richard Biener <rguenther@suse.de>
7566 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7567 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7568 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7569 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7570 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7571 (vn_reference_lookup_3): Remove use of const_parms.
7572 (free_rpo_vn): Do not free const_parms.
7573 (do_rpo_vn): Do not call init_const_parms.
7574 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7575 SSA_NAME_POINTS_TO_READONLY_MEMORY.
7576 (call_may_clobber_ref_p_1): Likewise.
7578 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
7581 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7583 (-ftree-scev-cprop): Document.
7585 2018-08-29 Jan Hubicka <jh@suse.cz>
7587 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7589 (sreal constructor): Update.
7590 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7591 sreal:operator/): Update.
7593 2018-08-29 Martin Liska <mliska@suse.cz>
7595 * tree-switch-conversion.c (switch_conversion::expand):
7596 Strenghten assumption about gswitch statements.
7598 2018-08-29 Richard Biener <rguenther@suse.de>
7600 PR tree-optimization/87117
7601 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7602 re-value-number released SSA VDEFs.
7604 2018-08-29 Richard Biener <rguenther@suse.de>
7606 PR tree-optimization/87126
7607 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7609 2018-08-28 Jim Wilson <jimw@sifive.com>
7611 * config/riscv/pic.md: Rewrite.
7612 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7614 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7615 (SOFTF, default_load, softload, softstore): New.
7617 2018-08-28 Jeff Law <law@redhat.com>
7619 * fold-const.c (fold_binary_loc): Remove recently added assert.
7621 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7623 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7624 to OP parmeter of generated function.
7626 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7628 PR tree-optimization/87009
7629 * match.pd: Add boolean optimizations.
7631 2018-08-28 Martin Sebor <msebor@redhat.com>
7634 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7635 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7636 (pass_walloca::gate): Use it.
7637 (alloca_call_type): Same.
7638 (pass_walloca::execute): Same.
7639 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7641 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7643 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7644 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7647 2018-08-28 Richard Biener <rguenther@suse.de>
7649 PR tree-optimization/87124
7650 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7651 constants before looking up avail.
7653 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7656 * calls.c (maybe_warn_nonstring_arg): Punt early if
7657 warn_stringop_overflow is zero. Don't call get_range_strlen
7658 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7659 Swap comparison operands to have constants on rhs. Only use
7660 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
7661 increment lenrng[0].
7663 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
7665 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7666 use of tree_to_shwi. Remove duplicated test for the size being
7667 a whole number of bytes.
7669 2018-08-28 Richard Biener <rguenther@suse.de>
7671 PR tree-optimization/87117
7672 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7673 Handle removed stmt without LHS (GIMPLE_NOP).
7675 2018-08-28 Richard Biener <rguenther@suse.de>
7677 PR tree-optimization/87117
7678 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7679 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7681 2018-08-28 Richard Biener <rguenther@suse.de>
7683 PR tree-optimization/87117
7684 * tree-ssa-pre.c (compute_avail): Do not make expressions
7685 with predicated values available.
7686 (get_expr_value_id): Assert we do not run into predicated value
7689 2018-08-28 Richard Biener <rguenther@suse.de>
7691 PR tree-optimization/87117
7692 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7693 get virtual operands.
7694 (get_expr_operands): Handle STRING_CST like other decls.
7696 2018-08-28 Martin Liska <mliska@suse.cz>
7698 * tree.h: Update documentation of fndecl_built_in_p
7702 2018-08-27 Jeff Law <law@redhat.com>
7703 PR tree-optimization/87110
7704 * tree-ssa-dse.c (compute_trims): Handle non-constant
7707 2018-08-27 Martin Sebor <msebor@redhat.com>
7709 PR tree-optimization/86914
7710 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7712 2018-08-27 Martin Sebor <msebor@redhat.com>
7714 PR tree-optimization/87112
7715 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7716 the type of the bound argument.
7718 2018-08-27 Jeff Law <law@redhat.com>
7720 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7721 type does not have a TYPE_SIZE_UNIT.
7723 2018-08-27 Steve Ellcey <sellcey@cavium.com>
7725 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7726 with include of backend.h.
7728 2018-08-27 Richard Biener <rguenther@suse.de>
7730 PR tree-optimization/86927
7731 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7732 use const cond reduction code.
7734 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
7736 PR tree-optimization/85758
7737 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7739 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7742 * diagnostic-show-locus.c (class layout_range): Update for
7743 conversion of show_caret_p to a tri-state.
7744 (layout_range::layout_range): Likewise.
7745 (make_range): Likewise.
7746 (layout::maybe_add_location_range): Likewise.
7747 (layout::should_print_annotation_line_p): Don't show annotation
7748 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7749 (layout::get_state_at_point): Update for conversion of
7750 show_caret_p to a tri-state. Bail out early for
7751 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7752 underlining or source colorization.
7753 (gcc_rich_location::add_location_if_nearby): Update for conversion
7754 of show_caret_p to a tri-state.
7755 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7756 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7758 (selftest::test_one_liner_labels): Likewise.
7759 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7760 conversion of show_caret_p to a tri-state.
7761 * pretty-print.c (text_info::set_location): Likewise.
7762 * pretty-print.h (text_info::set_location): Likewise.
7763 * substring-locations.c (format_warning_n_va): Likewise.
7764 * tree-diagnostic.c (default_tree_printer): Likewise.
7765 * tree-pretty-print.c (newline_and_indent): Likewise.
7767 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7770 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7771 line above for line-insertion fix-it hints.
7772 (selftest::test_fixit_insert_containing_newline): Update the
7773 expected results, and add a test with line-numbering enabled.
7775 2018-08-27 Martin Liska <mliska@suse.cz>
7778 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7779 params with DECL_HAS_VALUE_EXPR_P.
7781 2018-08-27 Martin Liska <mliska@suse.cz>
7783 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7784 selected expansion strategy.
7786 2018-08-27 Martin Liska <mliska@suse.cz>
7788 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7789 * builtins.c (is_builtin_fn): Likewise.
7790 * attribs.c (diag_attr_exclusions): Use new function
7791 fndecl_built_in_p and remove check for FUNCTION_DECL if
7793 (builtin_mathfn_code): Likewise.
7794 (fold_builtin_expect): Likewise.
7795 (fold_call_expr): Likewise.
7796 (fold_builtin_call_array): Likewise.
7797 (fold_call_stmt): Likewise.
7798 (set_builtin_user_assembler_name): Likewise.
7799 (is_simple_builtin): Likewise.
7800 * calls.c (gimple_alloca_call_p): Likewise.
7801 (maybe_warn_nonstring_arg): Likewise.
7802 * cfgexpand.c (expand_call_stmt): Likewise.
7803 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7804 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7805 (cgraph_node::verify_node): Likewise.
7806 * cgraphclones.c (build_function_decl_skip_args): Likewise.
7807 (cgraph_node::create_clone): Likewise.
7808 * config/arm/arm.c (arm_insert_attributes): Likewise.
7809 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7810 * dse.c (scan_insn): Likewise.
7811 * expr.c (expand_expr_real_1): Likewise.
7812 * fold-const.c (operand_equal_p): Likewise.
7813 (fold_binary_loc): Likewise.
7814 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7815 * gimple-low.c (lower_stmt): Likewise.
7816 * gimple-pretty-print.c (dump_gimple_call): Likewise.
7817 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7819 * gimple.c (gimple_build_call_from_tree): Likewise.
7820 (gimple_call_builtin_p): Likewise.
7821 (gimple_call_combined_fn): Likewise.
7822 * gimplify.c (gimplify_call_expr): Likewise.
7823 (gimple_boolify): Likewise.
7824 (gimplify_modify_expr): Likewise.
7825 (gimplify_addr_expr): Likewise.
7826 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7827 * ipa-cp.c (determine_versionability): Likewise.
7828 * ipa-fnsummary.c (compute_fn_summary): Likewise.
7829 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7830 * ipa-split.c (visit_bb): Likewise.
7831 (split_function): Likewise.
7832 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7833 * lto-cgraph.c (input_node): Likewise.
7834 * lto-streamer-out.c (write_symbol): Likewise.
7835 * omp-low.c (setjmp_or_longjmp_p): Likewise.
7836 (lower_omp_1): Likewise.
7837 * predict.c (strip_predict_hints): Likewise.
7838 * print-tree.c (print_node): Likewise.
7839 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7840 * trans-mem.c (is_tm_irrevocable): Likewise.
7841 (is_tm_load): Likewise.
7842 (is_tm_simple_load): Likewise.
7843 (is_tm_store): Likewise.
7844 (is_tm_simple_store): Likewise.
7845 (is_tm_abort): Likewise.
7846 (tm_region_init_1): Likewise.
7847 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7848 * tree-cfg.c (verify_gimple_call): Likewise.
7849 (move_stmt_r): Likewise.
7850 (stmt_can_terminate_bb_p): Likewise.
7851 * tree-eh.c (lower_eh_constructs_2): Likewise.
7852 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7853 * tree-inline.c (remap_gimple_stmt): Likewise.
7854 (copy_bb): Likewise.
7855 (estimate_num_insns): Likewise.
7856 (fold_marked_statements): Likewise.
7857 * tree-sra.c (scan_function): Likewise.
7858 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7859 (optimize_stack_restore): Likewise.
7860 (pass_fold_builtins::execute): Likewise.
7861 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7862 (mark_all_reaching_defs_necessary_1): Likewise.
7863 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7864 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7865 (pass_forwprop::execute): Likewise.
7866 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7867 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7868 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7869 * tree-ssa-strlen.c (get_string_length): Likewise.
7870 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7871 (find_func_aliases_for_call): Likewise.
7872 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7873 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7874 * tree-tailcall.c (find_tail_calls): Likewise.
7875 * tree.c (need_assembler_name_p): Likewise.
7876 (free_lang_data_in_decl): Likewise.
7877 (get_call_combined_fn): Likewise.
7878 * ubsan.c (is_ubsan_builtin_p): Likewise.
7879 * varasm.c (incorporeal_function_p): Likewise.
7880 * tree.h (DECL_BUILT_IN): Remove and replace with
7882 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7883 (fndecl_built_in_p): New.
7885 2018-08-27 Martin Liska <mliska@suse.cz>
7887 PR tree-optimization/86847
7888 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7889 Dump also subtree probability.
7890 (switch_decision_tree::do_jump_if_equal): New function.
7891 (switch_decision_tree::emit_case_nodes): Handle special
7892 situations in balanced tree that can be emitted much simpler.
7893 Fix calculation of probabilities that happen in tree expansion.
7894 * tree-switch-conversion.h (struct cluster): Add
7896 (struct simple_cluster): Likewise.
7897 (struct case_tree_node): Add new function has_child.
7898 (do_jump_if_equal): New.
7900 2018-08-27 Martin Liska <mliska@suse.cz>
7902 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7903 Add new argument to bit_test_cluster constructor.
7904 (bit_test_cluster::emit): Set bits really number of values
7906 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7907 probability argument.
7908 * tree-switch-conversion.h (struct bit_test_cluster):
7909 Add m_handles_entire_switch.
7911 2018-08-27 Martin Liska <mliska@suse.cz>
7913 PR tree-optimization/86702
7914 * tree-switch-conversion.c (jump_table_cluster::emit):
7915 Make probabilities even for values in jump table
7916 according to number of cases handled.
7917 (switch_decision_tree::compute_cases_per_edge): Pass
7918 argument to reset_out_edges_aux function.
7919 (switch_decision_tree::analyze_switch_statement): Likewise.
7920 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7923 2018-08-27 Martin Liska <mliska@suse.cz>
7925 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7926 cfun argument explicitly.
7927 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7928 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7929 function gimple_switch_default_bb.
7930 (convert_switch_statements):
7932 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7933 * stmt.c (label_to_block_fn): Use label_to_block and pass
7934 cfun argument explicitly and use gimple_switch_label_bb.
7935 (expand_case): Likewise.
7936 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7937 cfun argument explicitly. Likewise.
7938 (make_edges_bb): Likewise.
7939 (make_cond_expr_edges): Likewise.
7940 (get_cases_for_edge): Likewise.
7941 (make_gimple_switch_edges): Likewise.
7942 (label_to_block_fn): Likewise.
7943 (label_to_block): Likewise.
7944 (make_goto_expr_edges): Likewise.
7945 (make_gimple_asm_edges): Likewise.
7946 (main_block_label): Likewise.
7947 (group_case_labels_stmt): Likewise.
7948 (find_taken_edge_computed_goto): Likewise.
7949 (find_taken_edge_switch_expr): Likewise.
7950 (gimple_verify_flow_info): Likewise.
7951 (gimple_redirect_edge_and_branch): Likewise.
7952 (gimple_switch_label_bb): New function.
7953 (gimple_switch_default_bb): Likewise.
7954 (gimple_switch_edge): Likewise.
7955 (gimple_switch_default_edge): Likewise.
7956 * tree-cfg.h (label_to_block_fn): Remove and replace ...
7957 (label_to_block): ... with this.
7958 (gimple_switch_label_bb): New.
7959 (gimple_switch_default_bb): Likewise.
7960 (gimple_switch_edge): Likewise.
7961 (gimple_switch_default_edge): Likewise.
7962 * tree-cfgcleanup.c (convert_single_case_switch): Use
7963 new gimple functions and pass new argument to label_to_block.
7964 (cleanup_control_flow_bb):
7965 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7966 cfun argument explicitly.
7967 (make_eh_edges): Likewise.
7968 (redirect_eh_dispatch_edge): Likewise.
7969 (lower_resx): Likewise.
7970 (lower_eh_dispatch): Likewise.
7971 (maybe_remove_unreachable_handlers): Likewise.
7972 (unsplit_eh): Likewise.
7973 (cleanup_empty_eh): Likewise.
7974 (verify_eh_edges): Likewise.
7975 (verify_eh_dispatch_edge): Likewise.
7976 * tree-ssa-dom.c (record_edge_info): Likewise.
7977 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7978 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7979 (thread_through_normal_block): Likewise.
7980 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7981 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7982 * tree-switch-conversion.c (switch_conversion::collect): Use new
7984 (switch_conversion::check_final_bb): Likewise.
7985 (switch_conversion::gather_default_values): Pass new argument
7987 (switch_conversion::build_constructors): Likewise.
7988 (switch_decision_tree::compute_cases_per_edge): Use new
7989 gimple_switch_edge function.
7990 (switch_decision_tree::analyze_switch_statement): Pass new argument
7992 (switch_decision_tree::try_switch_expansion): Use
7993 gimple_switch_default_edge.
7994 * tree-vrp.c (find_switch_asserts): Pass new argument
7996 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7997 (vr_values::simplify_switch_using_ranges): Likewise.
7999 2018-08-27 Richard Biener <rguenther@suse.de>
8001 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8002 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8004 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8005 (struct vn_nary_op_s): Add unwind_to member. Add
8006 predicated_values flag and put result into a union together
8007 with a linked list of vn_pval.
8008 (struct vn_ssa_aux): Add name member to make maintaining
8009 a map of SSA name to vn_ssa_aux possible. Remove no longer
8010 needed info, dfsnum, low, visited, on_sccstack, use_processed
8011 and range_info_anti_range_p members.
8012 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8013 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8015 (vn_valueize): New global.
8016 (vn_context_bb): Likewise.
8017 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8018 VN_INFO_PTR_INFO): Remove.
8019 * tree-ssa-sccvn.c: ... (rewrite)
8020 (pass_fre::execute): For -O2+ initialize loops and run
8021 RPO VN in optimistic mode (iterating). For -O1 and -Og
8022 run RPO VN in non-optimistic mode.
8023 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8024 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8025 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8026 (rpo-vn-max-loop-depth): Document.
8027 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8028 when valuezing the VUSE signals we walked out of the region.
8029 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8030 (phi_translate): Set VN context block to use for availability
8032 (compute_avail): Likewise.
8033 (pre_valueize): New function.
8034 (pass_pre::execute): Adjust to the RPO VN API.
8036 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8037 (propagate_constants_for_unrolling): Remove.
8038 (tree_unroll_loops_completely): Perform value-numbering
8039 on the unrolled bodies loop parent.
8041 2018-08-27 Richard Biener <rguenther@suse.de>
8043 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8044 for partial antic compute.
8046 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8048 PR rtl-optimization/87065
8049 * combine.c (simplify_if_then_else): Formatting fix.
8050 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8052 (known_cond): Don't return const_true_rtx for vector modes. Use
8053 CONST0_RTX instead of const0_rtx. Formatting fixes.
8055 2018-08-27 Martin Liska <mliska@suse.cz>
8057 PR gcov-profile/87069
8058 * gcov.c (process_file): Record files already processed
8059 and warn about a file being processed multiple times.
8061 2018-08-27 Martin Liska <mliska@suse.cz>
8064 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8065 Set default values for x_aarch64_*_string strings.
8066 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8067 prefix. For -mabi do not print '=ABI' in help and use
8068 <option_value> format for -msve-vector-bits and -moverride
8071 2018-08-26 Jeff Law <law@redhat.com>
8073 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8076 2018-08-26 Marek Polacek <polacek@redhat.com>
8078 PR c++/87029, Implement -Wredundant-move.
8079 * doc/invoke.texi: Document -Wredundant-move.
8081 2018-08-25 Martin Sebor <msebor@redhat.com>
8083 PR tree-optimization/87059
8084 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8085 to the same type as the other.
8086 * fold-const.c (fold_binary_loc): Assert expectation.
8088 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8090 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8091 extraneous parentheses, dead code section and formatting.
8093 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8096 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8097 wide enough for jumps in the line-numbering to be visible.
8098 (layout::print_gap_in_line_numbering): New member function.
8099 (layout::calculate_line_spans): When using line numbering, merge
8100 line spans that are only 1 line apart.
8101 (diagnostic_show_locus): When printing line numbers, show gaps in
8102 line numbering directly, rather than printing headers.
8103 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8104 line-numbering with multiple line spans.
8105 (selftest::test_fixit_insert_containing_newline_2): Add test of
8106 line-numbering, in which the spans are close enough to be merged.
8108 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8110 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8111 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8112 * tree-vrp.c (range_is_nonnull): Remove.
8113 (range_includes_zero_p): Accept value_range instead of min/max.
8114 (extract_range_from_binary_expr_1): Do not early bail on
8116 Use range_includes_zero_p instead of range_is_nonnull.
8117 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8118 of range_is_nonnull.
8119 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8120 special case VR_ANTI_RANGE.
8121 (vrp_finalize): Same.
8122 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8124 (range_is_nonnull): Remove.
8125 * vr-values.c (vrp_stmt_computes_nonzero): Use
8126 range_includes_zero_p instead of range_is_nonnull.
8127 (extract_range_basic): Pass value_range to range_includes_zero_p
8128 instead of range_is_nonnull.
8130 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8132 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8133 * emit-rtl.h (rtl_data): Remove return_bnd.
8134 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8135 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8136 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8137 (POINTER_BOUNDS_MODE): Remove definition.
8138 (make_pointer_bounds_mode): Remove.
8139 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8140 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8141 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8142 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8143 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8144 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8145 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8147 * config/i386/i386-modes.def (BND32, BND64): Remove.
8148 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8149 (dbx64_register_map): Ditto.
8150 (svr4_dbx_register_map): Ditto.
8151 (indirect_thunk_bnd_needed): Remove.
8152 (indirect_thunks_bnd_used): Ditto.
8153 (indirect_return_bnd_needed): Ditto.
8154 (indirect_return_via_cx_bnd): Ditto.
8155 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8156 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8157 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8158 (output_indirect_thunk_function): Remove handling of
8159 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8160 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8161 (ix86_save_reg): Remove handling of crtl->return_bnd.
8162 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8163 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8164 and UNSPEC_BNDLX_ADDR.
8165 (ix86_output_indirect_branch_via_reg): Remove handling of
8166 indirect_thunk_prefix_bnd.
8167 (ix86_output_indirect_branch_via_push): Ditto.
8168 (ix86_output_function_return): Ditto.
8169 (ix86_output_indirect_function_return): Ditto.
8170 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8171 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8172 (CALL_USED_REGISTERS): Ditto.
8173 (REG_ALLOC_ORDER): Update for removal of bound registers.
8174 (HI_REGISTER_NAMES): Ditto.
8175 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8176 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8177 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8178 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8179 (FIRST_PSEUDO_REG): Update.
8180 (BND): Remove mode iterator.
8181 * config/i386/predicates.md (bnd_mem_operator): Remove.
8183 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8185 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8188 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8190 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8191 the case in which the permute needs only a single element and
8192 repeats for every vector of the result. Extend that case to
8193 handle variable-length vectors.
8194 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8196 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8199 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8200 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8202 2018-08-24 Richard Biener <rguenther@suse.de>
8204 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8205 bb_flags_allocated members.
8206 (auto_flag): New RAII class for allocating flags.
8207 (auto_edge_flag): New RAII class for allocating edge flags.
8208 (auto_bb_flag): New RAII class for allocating bb flags.
8209 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8211 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8212 in favor of temporarily allocated BB flag.
8213 * hsa-brig.c: Re-order includes.
8214 * hsa-dump.c: Likewise.
8215 * hsa-regalloc.c: Likewise.
8216 * print-rtl.c: Likewise.
8217 * profile-count.c: Likewise.
8219 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8222 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8225 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8228 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8229 from wide_int_range_multiplicative_op.
8231 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8233 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8236 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8238 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8241 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8243 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8244 full GENERIC expression used for replacement.
8246 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8248 * tree-vrp.c (abs_extent_range): Remove.
8249 (extract_range_into_wide_ints): Pass wide ints by reference.
8250 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8251 Pass wide ints by reference in all calls to
8252 extract_range_into_wide_ints.
8253 * wide-int-range.cc (wide_int_range_div): New.
8254 * wide-int-range.h (wide_int_range_div): New.
8255 (wide_int_range_includes_zero_p): New.
8256 (wide_int_range_zero_p): New.
8258 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8260 * config/aarch64/aarch64.md (arches): New enum.
8261 (arch): New enum attr.
8262 (arch_enabled): New attr.
8263 (enabled): Now uses arch_enabled only.
8264 (simd, sve, fp16): Removed attribute.
8265 (fp): Attr now defined in terms of 'arch'.
8266 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8267 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8268 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8269 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8270 attributes into 'arch'.
8271 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8272 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8273 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8274 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8275 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8276 'simd' attribute into 'arch'.
8277 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8278 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8279 Convert use of 'fp' attribute to 'arch'.
8280 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8281 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8283 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8284 (different modes) Merge 'fp' and 'simd' into 'arch'.
8285 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8288 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8290 PR rtl-optimization/87026
8291 * expmed.c (canonicalize_comparison): If we can no longer create
8292 pseudoregisters, don't.
8294 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8297 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8299 * config/arm/arm.c (speculation_barrier_libfunc): New static
8301 (arm_init_libfuncs): Initialize it.
8302 (arm_emit_speculation_barrier): New function.
8303 * config/arm/arm.md (speculation_barrier): Call
8304 arm_emit_speculation_barrier for architectures that do not have
8306 (speculation_barrier_insn): Only match on Armv7 or later.
8308 2018-08-23 Richard Biener <rguenther@suse.de>
8311 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8314 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8316 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8317 of single-vector TBLs.
8318 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8321 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8324 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8325 aarch64_evpc_tbl guard.
8327 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8329 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8332 2018-08-22 Martin Sebor <msebor@redhat.com>
8335 * tree-pretty-print.c (pretty_print_string): Add argument.
8336 (dump_generic_node): Call to pretty_print_string with string size.
8338 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8340 PR rtl-optimization/86771
8341 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8342 of two SETs into those two SETs, one to be placed at i2, if that SETs
8343 destination is modified between i2 and i3.
8345 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8347 PR tree-optimization/86725
8348 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8350 (vect_analyze_scalar_cycles_1): Check it.
8352 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8354 PR tree-optimization/86725
8355 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8356 an outer loop phi as a double reduction, make sure that the
8357 single user of the phi result is an inner loop phi.
8359 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8361 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8362 grouped stores with gaps to a strided group.
8364 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8366 * tree-vect-stmts.c (get_group_load_store_type)
8367 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8368 first statement in a group.
8370 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8372 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8373 the sequence used in gcc/gcc.c.
8375 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8378 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8381 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8383 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8384 Darwin10-specific unwinder-shim.
8385 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8386 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8387 New to cater for Darwin10 Rosetta.
8389 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8391 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8392 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8394 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8399 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8400 (dwarf2out_switch_text_section): Generate a local label for the
8401 second function sub-section and apply it as the second FDE start
8403 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8404 second sub-section start.
8406 2018-08-22 Richard Biener <rguenther@suse.de>
8408 PR tree-optimization/86988
8409 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8411 2018-08-22 Richard Biener <rguenther@suse.de>
8413 PR tree-optimization/86945
8414 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8416 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8418 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8419 a comment about how uses of r2 for .sdata2 come about.
8421 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8423 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8425 2018-08-21 Marek Polacek <polacek@redhat.com>
8427 PR c++/86981, Implement -Wpessimizing-move.
8428 * doc/invoke.texi: Document -Wpessimizing-move.
8430 2018-08-21 Jan Hubicka <jh@suse.cz>
8432 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8433 * tree.h (is_redundant_typedef): Remove.
8434 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8436 2018-08-21 Jan Hubicka <jh@suse.cz>
8438 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8441 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8443 * expmed.c (extract_low_bits): Reject invalid subregs early.
8445 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8448 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8451 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8453 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8454 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8455 * config/vxworks.c: Likewise.
8457 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8459 * config/vxworks.c: Set targetm.have_ctors_dtors
8460 if HAVE_INITFINI_ARRAY_SUPPORT.
8461 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8462 if HAVE_INITFINI_ARRAY_SUPPORT.
8464 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8466 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8467 default search path for VxWorks < 7.
8469 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8471 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8472 (get_format_string): Refer to c_getstr.
8474 2018-08-21 Tom de Vries <tdevries@suse.de>
8476 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8477 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8478 (debuginfo_early_stop): Declare.
8479 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8480 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8481 (debuginfo_early_stop): New function.
8482 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8483 and debuginfo_early_stop.
8484 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8485 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8486 (general_init): Call debuginfo_early_init.
8487 (finalize): Call debuginfo_fini.
8488 (do_compile): Call debuginfo_init.
8489 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8491 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8493 2018-08-21 Tom de Vries <tdevries@suse.de>
8495 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8496 flag_dump_noaddr and flag_dump_unnumbered.
8498 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8500 * wide-int-range.cc (wide_int_range_abs): New.
8501 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8502 * wide-int-range.h (wide_int_range_abs): New.
8503 (wide_int_range_min_max): New.
8504 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8505 case to call wide_int_range_abs.
8506 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8507 (extract_range_from_abs_expr): Delete.
8509 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8512 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8513 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8516 2018-08-20 Nathan Sidwell <nathan@acm.org>
8517 Jeff Law <law@redhat.com>
8519 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8520 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8522 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8525 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8526 (decl_attributes): Likewise.
8527 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8529 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8530 * diagnostic-core.h (class auto_diagnostic_group): New class.
8531 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8532 (diagnostic_report_diagnostic): Handle the first diagnostics within
8534 (emit_diagnostic): Add auto_diagnostic_group instance.
8536 (inform_n): Likewise.
8537 (warning): Likewise.
8538 (warning_at): Likewise.
8539 (warning_n): Likewise.
8540 (pedwarn): Likewise.
8541 (permerror): Likewise.
8543 (error_n): Likewise.
8544 (error_at): Likewise.
8546 (fatal_error): Likewise.
8547 (internal_error): Likewise.
8548 (internal_error_no_backtrace): Likewise.
8549 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8550 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8551 * diagnostic.h (struct diagnostic_context): Add fields
8552 "diagnostic_group_nesting_depth",
8553 "diagnostic_group_emission_count", "begin_group_cb",
8555 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8556 Add auto_diagnostic_group instance(s).
8557 (find_explicit_erroneous_behavior): Likewise.
8558 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8559 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8560 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8561 (gimplify_va_arg_expr): Likewise.
8562 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8563 (HSA_SORRY_AT): Likewise.
8564 * ipa-devirt.c (compare_virtual_tables): Likewise.
8565 (warn_odr): Likewise.
8566 * multiple_target.c (expand_target_clones): Likewise.
8567 * opts-common.c (cmdline_handle_error): Likewise.
8568 * reginfo.c (globalize_reg): Likewise.
8569 * substring-locations.c (format_warning_n_va): Likewise.
8570 * tree-inline.c (expand_call_inline): Likewise.
8571 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8572 * tree-ssa-loop-niter.c
8573 (do_warn_aggressive_loop_optimizations): Likewise.
8574 * tree-ssa-uninit.c (warn_uninit): Likewise.
8575 * tree.c (warn_deprecated_use): Likewise.
8577 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
8580 * config/i386/i386.md (eh_return): Always update EH return
8581 address in word_mode.
8583 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
8585 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8586 TARGET_SPLIT_COMPLEX_ARG is defined.
8588 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8590 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8592 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8595 * expr.c (expand_assignment): Assert that bitpos is positive.
8596 (store_field): Likewise
8597 (expand_expr_real_1): Make sure that bitpos is positive.
8598 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8601 2018-08-20 Nathan Sidwell <nathan@acm.org>
8603 * Makefile.in (CPP_ID_DATA_H): Delete.
8604 (CPP_INTERNAL_H): Don't add it.
8605 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8606 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8608 2018-08-20 Richard Biener <rguenther@suse.de>
8610 PR tree-optimization/78655
8611 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8612 pointer + offset nonnull if either operand is nonnull work.
8614 2018-08-20 Tom de Vries <tdevries@suse.de>
8616 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8617 unless the referenced die describes the added property using
8618 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8619 Otherwise, add a DW_AT_location to the referenced die.
8621 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8624 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8625 register_operand when calling ix86_set_reg_reg_cost.
8626 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8627 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8628 predicate and to 1 otherwise.
8630 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8632 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8633 emit a diagnostic that it is not supported and reset the option.
8634 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8635 supported and consume the option. (ASM_FINAL_SPEC): New.
8637 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8639 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8642 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8644 C-SKY port: Documentation
8646 * doc/extend.texi (C-SKY Function Attributes): New section.
8647 * doc/invoke.texi (Option Summary): Add C-SKY options.
8648 (C-SKY Options): New section.
8649 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8651 2018-08-17 Jojo <jijie_rong@c-sky.com>
8652 Huibin Wang <huibin_wang@c-sky.com>
8653 Sandra Loosemore <sandra@codesourcery.com>
8654 Chung-Lin Tang <cltang@codesourcery.com>
8656 C-SKY port: Backend implementation
8658 * config/csky/*: New.
8659 * common/config/csky/*: New.
8661 2018-08-17 Jojo <jijie_rong@c-sky.com>
8662 Huibin Wang <huibin_wang@c-sky.com>
8663 Sandra Loosemore <sandra@codesourcery.com>
8664 Chung-Lin Tang <cltang@codesourcery.com>
8665 Andrew Jenner <andrew@codesourcery.com>
8667 C-SKY port: Configury
8669 * config.gcc (csky-*-*): New.
8670 * configure.ac: Add csky to targets for dwarf2 debug_line support.
8671 * configure: Regenerated.
8673 2018-08-17 David Malcolm <dmalcolm@redhat.com>
8675 * dump-context.h: Include "dumpfile.h".
8676 (dump_context::dump_printf_va): Convert final param from va_list
8677 to va_list *. Convert from ATTRIBUTE_PRINTF to
8678 ATTRIBUTE_GCC_DUMP_PRINTF.
8679 (dump_context::dump_printf_loc_va): Likewise.
8680 * dumpfile.c: Include "stringpool.h".
8681 (make_item_for_dump_printf_va): Delete.
8682 (make_item_for_dump_printf): Delete.
8683 (class dump_pretty_printer): New class.
8684 (dump_pretty_printer::dump_pretty_printer): New ctor.
8685 (dump_pretty_printer::emit_items): New member function.
8686 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8688 (dump_pretty_printer::emit_item): New member function.
8689 (dump_pretty_printer::stash_item): New member function.
8690 (dump_pretty_printer::format_decoder_cb): New member function.
8691 (dump_pretty_printer::decode_format): New member function.
8692 (dump_context::dump_printf_va): Reimplement in terms of
8693 dump_pretty_printer.
8694 (dump_context::dump_printf_loc_va): Convert final param from va_list
8696 (dump_context::begin_scope): Reimplement call to
8697 make_item_for_dump_printf.
8698 (dump_printf): Update for change to dump_printf_va.
8699 (dump_printf_loc): Likewise.
8700 (selftest::test_capture_of_dump_calls): Convert "stmt" from
8701 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
8702 with %T, %E, and %G.
8703 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8704 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8705 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8706 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8707 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8708 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8709 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8710 within a dump_printf_loc call to "%wu".
8711 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8712 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
8713 missing space after "=".
8714 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8715 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8716 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8717 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8718 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
8719 duplicate "vectorized" from message.
8721 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
8723 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8724 polyNxK_t element's TYPE_STRING_FLAG.
8726 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8728 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8729 (they were unnamed before). Fix comments.
8731 2018-08-17 Nathan Sidwell <nathan@acm.org>
8733 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8735 2018-08-17 Richard Biener <rguenther@suse.de>
8737 PR tree-optimization/86841
8738 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8740 2018-08-17 Martin Liska <mliska@suse.cz>
8742 * common.opt: Remove Warn, Init and Report for options with
8743 Ignore/Deprecated flag. Warning is done automatically for
8745 * config/i386/i386.opt: Likewise.
8746 * config/ia64/ia64.opt: Likewise.
8747 * config/rs6000/rs6000.opt: Likewise.
8748 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8749 Remove usage of flag_check_pointer_bounds.
8750 * lto-wrapper.c (merge_and_complain): Do not handle
8751 OPT_fcheck_pointer_bounds.
8752 (append_compiler_options): Likewise.
8753 * opt-functions.awk: Do not handle Deprecated.
8754 * optc-gen.awk: Check that Var, Report and Init are not
8755 used for an option with Ignore/Deprecated flag.
8756 * opts-common.c (decode_cmdline_option): Do not report
8758 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8760 * opts.h (struct cl_option): Remove cl_deprecated flag.
8761 (CL_ERR_DEPRECATED): Remove error enum value.
8763 2018-08-17 Richard Biener <rguenther@suse.de>
8766 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8767 across a va-arg-pack using call adjust its return value accordingly.
8769 2018-08-16 Martin Sebor <msebor@redhat.com>
8771 PR tree-optimization/86853
8772 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8773 (struct fmtresult): Add member and initialize it in ctors.
8774 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8775 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8776 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8777 (parse_directive): Handle %C same as %c.
8778 (sprintf_dom_walker::compute_format_length): Adjust.
8779 (is_call_safe): Adjust.
8781 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8783 * builtins.c (c_strlen): Add new parameter eltsize. Use it
8784 for determining how to count the elements.
8785 * builtins.h (c_strlen): Adjust prototype.
8786 * expr.c (string_constant): Add new parameter mem_size.
8787 Set *mem_size appropriately.
8788 * expr.h (string_constant): Adjust protoype.
8789 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8790 * gimple-fold.h (get_range_strlen): Adjust prototype.
8791 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8792 (format_string): Call get_string_length with eltsize.
8794 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8796 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8797 to emit the span, rather than setting it as the prefix.
8799 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8801 * diagnostic-show-locus.c (layout::start_annotation_line): Add
8802 "margin_char" parameter, defaulting to space. Use it in place
8803 of pp_space for the initial part of the margin.
8804 (layout::print_leading_fixits): Use '+' when filling the margin
8805 of line-insertion fix-it hints.
8807 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8809 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8812 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8814 * config/rs6000/altivec.md: Don't set length attribute to the default
8816 * config/rs6000/darwin.md: Ditto.
8817 * config/rs6000/dfp.md: Ditto.
8818 * config/rs6000/htm.md: Ditto.
8819 * config/rs6000/rs6000.md: Ditto.
8820 * config/rs6000/sync.md: Ditto.
8821 * config/rs6000/vsx.md: Ditto.
8823 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8825 * config/rs6000/altivec.md: Don't set length attribute to the default
8826 value, for branch instructions.
8827 * config/rs6000/darwin.md: Ditto.
8828 * config/rs6000/rs6000.md: Ditto.
8830 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8832 * config/rs6000/rs6000.md (length): Always define as const_int 4.
8833 (unnamed conditional branch define_insn): Set length to 4 or 8
8834 depending on offset.
8835 (<bd>_<mode>): Similar, for alternative 0.
8836 (<bd>tf_<mode>): Ditto.
8838 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8840 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8842 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
8844 * doc/rtl.texi: Replace old RTX class names with new names.
8847 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
8849 * expmed.h (canonicalize_comparison): New declaration.
8850 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8851 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8852 * optabs.c (prepare_cmp_insn): Likewise.
8853 * rtl.h (unsigned_condition_p): New function which checks if a
8854 comparison operator is unsigned.
8856 2018-08-16 Nathan Sidwell <nathan@acm.org>
8858 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8859 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8861 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8864 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8865 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8866 (mov<mov>): ..this and enable unconditionally.
8868 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8870 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8872 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8874 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8875 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8876 "Common" with "Target".
8878 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8880 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8881 * doc/invoke.texi (mmitigate-rop): Remove.
8882 * config/i386/i386.c: Do not include "regrename.h".
8883 (ix86_rop_should_change_byte_p, reg_encoded_number)
8884 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8886 (ix86_reorg): Remove call to ix86_mitigate_rop.
8887 * config/i386/i386.md (attr "modrm_class"): Remove.
8888 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8889 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8890 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8892 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8894 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8895 allow folding of mergeh() and mergel() for the float and double types.
8896 (fold_mergehl_helper): Rework to handle building a permute tree
8899 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8901 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8904 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8906 * common.opt (fdiagnostics-show-labels): New option.
8907 * diagnostic-show-locus.c (class layout_range): Add field
8909 (class layout): Add field "m_show_labels_p".
8910 (layout_range::layout_range): Add param "label" and use it to
8912 (make_range): Pass in NULL for new "label" param of layout_range's
8914 (layout::layout): Initialize m_show_labels_p.
8915 (layout::maybe_add_location_range): Pass in loc_range->m_label
8916 when constructing layout_range instances.
8917 (struct line_label): New struct.
8918 (layout::print_any_labels): New member function.
8919 (layout::print_line): Call it if label-printing is enabled.
8920 (selftest::test_one_liner_labels): New test.
8921 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8922 * diagnostic.c (diagnostic_initialize): Initialize
8923 context->show_labels_p.
8924 * diagnostic.h (struct diagnostic_context): Add field
8926 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8927 -fno-diagnostics-show-labels.
8928 * dwarf2out.c (gen_producer_string): Add
8929 OPT_fdiagnostics_show_labels to the ignored options.
8930 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8932 (gcc_rich_location::maybe_add_expr): Likewise.
8933 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8934 label" param, defaulting to NULL.
8935 (gcc_rich_location::add_expr): Add "label" param.
8936 (gcc_rich_location::maybe_add_expr): Likewise.
8937 (class text_range_label): New class.
8938 (class range_label_for_type_mismatch): New class.
8939 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8940 of format_warning_va.
8941 (fmtwarn_n): Likewise for new params of format_warning_n_va.
8942 * lto-wrapper.c (merge_and_complain): Add
8943 OPT_fdiagnostics_show_labels to the "pick one setting" options.
8944 (append_compiler_options): Likewise to the dropped options.
8945 (append_diag_options): Likewise to the passed-on options.
8946 * opts.c (common_handle_option): Handle the new option.
8947 * selftest-diagnostic.c
8948 (test_diagnostic_context::test_diagnostic_context): Enable
8950 * substring-locations.c: Include "gcc-rich-location.h".
8951 (format_warning_n_va): Add "fmt_label" and "param_label" params
8952 and use them as appropriate.
8953 (format_warning_va): Add "fmt_label" and "param_label" params,
8954 passing them on to format_warning_n_va.
8955 (format_warning_at_substring): Likewise.
8956 (format_warning_at_substring_n): Likewise.
8957 * substring-locations.h (format_warning_va): Add "fmt_label" and
8958 "param_label" params.
8959 (format_warning_n_va): Likewise.
8960 (format_warning_at_substring): Likewise.
8961 (format_warning_at_substring_n): Likewise.
8962 * toplev.c (general_init): Initialize global_dc->show_labels_p.
8964 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
8967 * builtins.c (expand_builtin_memcmp): Do not expand the call
8968 when overflow is detected.
8970 2018-08-15 Martin Sebor <msebor@redhat.com>
8972 PR tree-optimization/71625
8973 * config/aarch64/aarch64-builtins.c
8974 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8976 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
8978 * config/s390/s390.c (s390_reorg): Remove loop.
8980 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8983 (darwin_function_switched_text_sections): Delete.
8984 * gcc/config/darwin.h
8985 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8987 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8990 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8991 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
8992 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8994 2018-08-15 Martin Liska <mliska@suse.cz>
8996 PR tree-optimization/86925
8997 * predict.c (expr_expected_value_1): When taking
8998 later predictor, assign also probability.
8999 Use fold_build2_initializer_loc in order to fold
9000 the expression in -frounding-math.
9002 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9004 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9006 (expand_vec_perm_1): Try the new method.
9008 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9011 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9012 Check whether lra_live_max_point is 0 before dividing.
9014 2018-08-14 Martin Sebor <msebor@redhat.com>
9016 PR tree-optimization/86650
9017 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9018 (vrp_prop::check_mem_ref): Same.
9020 2018-08-13 Liu Hao <lh_mouse@126.com>
9022 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9023 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9024 and clear it thereafter, as it only works for DBCS.
9026 2018-08-13 Liu Hao <lh_mouse@126.com>
9028 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9029 handle returned by _get_osf_handle().
9031 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9033 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9034 for folding vec_perm.
9036 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9038 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9039 Add support for gimple-folding of vec_pack() and vec_unpack()
9042 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9044 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9045 vec_xst variants to the list.
9046 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9047 vector loads and stores.
9049 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9051 * config.gcc (rs6000-ibm-aix4.x): Delete.
9052 (rs6000-ibm-aix5.1): Delete.
9053 (rs6000-ibm-aix5.2): Delete.
9054 (rs6000-ibm-aix5.3): Delete.
9055 * config/rs6000/aix43.h: Delete.
9056 * config/rs6000/aix51.h: Delete.
9057 * config/rs6000/aix52.h: Delete.
9058 * config/rs6000/t-aix43: Delete.
9060 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9062 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9064 (s390_decompose_address): Factor out constant pool ref
9067 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9069 * config/nds32/nds32-predicates.c
9070 (nds32_can_use_bclr_p): Change return type as bool.
9071 (nds32_can_use_bset_p): Ditto.
9072 (nds32_can_use_btgl_p): Ditto.
9073 (nds32_can_use_bitci_p): Ditto.
9074 * config/nds32/nds32-protos.h
9075 (nds32_can_use_bclr_p): Change declaration.
9076 (nds32_can_use_bset_p): Ditto.
9077 (nds32_can_use_btgl_p): Ditto.
9078 (nds32_can_use_bitci_p): Ditto.
9080 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9082 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9083 Support -msched-prolog-epilog option.
9084 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9086 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9088 * common/config/nds32/nds32-common.c
9089 (nds32_option_optimization_table): Enalbe -malways-align.
9091 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9093 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9095 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9096 OPT_misr_secure_ case.
9097 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9098 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9099 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9101 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9102 (nds32_isr_info): New field security_level.
9103 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9104 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9105 * config/nds32/nds32.opt (misr-secure): New option.
9106 * config/nds32/nds32_init.inc: New file.
9107 * config/nds32/nds32_isr.h: New file.
9109 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9111 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9112 Update comment for atomic instructions.
9113 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9114 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9116 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9117 load for __ATOMIC_SEQ_CST model.
9118 (atomic_loaddi_1): Remove float register target.
9119 (atomic_storedi): Handle CONST_INT values.
9120 (atomic_storedi_1): Remove float register source. Add special case
9122 (memory_barrier): New expander and insn.
9124 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9126 PR tree-optimization/86835
9127 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9128 new_stmt after def_gsi, make sure to insert new_square_stmt after
9129 that stmt, not 2 stmts before it.
9131 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9134 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9137 2018-08-10 Martin Liska <mliska@suse.cz>
9140 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9142 * builtins.c (expand_builtin_expect_with_probability):
9144 (expand_builtin_expect_with_probability): New function.
9145 (build_builtin_expect_predicate): Add new argumnet probability
9146 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9147 (fold_builtin_expect):
9150 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9151 * builtins.h (fold_builtin_expect): Set new argument.
9152 * doc/extend.texi: Document __builtin_expect_with_probability.
9153 * doc/invoke.texi: Likewise.
9154 * gimple-fold.c (gimple_fold_call): Pass new argument.
9155 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9156 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9157 * predict.c (get_predictor_value): New function.
9158 (expr_expected_value): Add new argument probability. Assume
9159 that predictor and probability are always non-null.
9160 (expr_expected_value_1): Likewise. For __builtin_expect and
9161 __builtin_expect_with_probability set probability. Handle
9162 combination in binary expressions.
9163 (tree_predict_by_opcode): Simplify code by simply calling
9164 get_predictor_value.
9165 (pass_strip_predict_hints::execute): Add handling of
9166 BUILT_IN_EXPECT_WITH_PROBABILITY.
9167 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9169 * tree.h (DECL_BUILT_IN_P): New function.
9171 2018-08-10 Martin Liska <mliska@suse.cz>
9173 PR tree-optimization/85799
9174 * passes.def: Add argument for pass_strip_predict_hints.
9175 * predict.c (class pass_strip_predict_hints): Add new argument
9177 (strip_predictor_early): New function.
9178 (pass_strip_predict_hints::execute): Call the function to
9180 (strip_predict_hints): New function.
9181 * predict.def: Fix comment.
9183 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9185 * Makefile.in: Clarify which tm.texi to copy over to assert the
9186 right to grant a GFDL license for all.
9188 2018-08-09 Jeff Law <law@redhat.com>
9190 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9193 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9195 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9198 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9200 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9201 reductions for variable-length vectors.
9203 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9206 * common.opt (fdiagnostics-show-line-numbers): New option.
9207 * diagnostic-show-locus.c (class layout): Add fields
9208 "m_show_line_numbers_p" and "m_linenum_width";
9209 (num_digits): New function.
9210 (test_num_digits): New function.
9211 (layout::layout): Initialize new fields. Update m_x_offset
9212 logic to handle any left margin.
9213 (layout::print_source_line): Print line number when requested.
9214 (layout::start_annotation_line): New member function.
9215 (layout::print_annotation_line): Call it.
9216 (layout::print_leading_fixits): Likewise.
9217 (layout::print_trailing_fixits): Likewise. Update calls to
9218 move_to_column for new parameter.
9219 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9220 it to potentially call start_annotation_line.
9221 (layout::show_ruler): Call start_annotation_line.
9222 (selftest::test_line_numbers_multiline_range): New selftest.
9223 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9224 and selftest::test_line_numbers_multiline_range.
9225 * diagnostic.c (diagnostic_initialize): Initialize
9226 show_line_numbers_p.
9227 * diagnostic.h (struct diagnostic_context): Add field
9228 "show_line_numbers_p".
9229 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9230 -fno-diagnostics-show-line-numbers.
9231 * dwarf2out.c (gen_producer_string): Add
9232 OPT_fdiagnostics_show_line_numbers to the ignored options.
9233 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9234 one setting" options.
9235 (append_compiler_options): Likewise to the dropped options.
9236 (append_diag_options): Likewise to the passed-on options.
9237 * opts.c (common_handle_option): Handle the new option.
9238 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9240 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9242 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9243 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9244 third argument of type "const signed char" to descriptions of
9245 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9246 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9247 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9248 __builtin_bcdsub_ov functions.
9250 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9252 PR tree-optimization/86858
9253 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9254 flow_bb_inside_loop_p calls.
9256 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9258 PR tree-optimization/86871
9259 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9260 instead of gimple_assign_lhs.
9262 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9265 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9266 register constraint to operand 0.
9267 (add<mode>3_carryinC): Likewise.
9268 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9270 2018-08-09 Martin Liska <mliska@suse.cz>
9273 * common.opt: Remove extra line.
9275 2018-08-09 Martin Liska <mliska@suse.cz>
9277 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9278 at the end of a line, make first letter capital and end up
9279 a sentence with a dot.
9280 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9281 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9282 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9283 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9284 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9285 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9286 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9287 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9288 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9289 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9290 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9291 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9292 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9293 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9294 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9295 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9296 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9297 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9299 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9302 * config/s390/s390.c (s390_option_override_internal): Reduce the
9303 stack-clash-protection-probe-interval param if it would be too big
9306 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9309 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9310 * config/m68k/m68k.c (handle_move_double): Don't call
9311 m68k_final_prescan_insn.
9312 (m68k_adjust_decorated_operand): Renamed from
9313 m68k_final_prescan_insn, remove first and third operand and
9315 (print_operand): Call it.
9316 (print_operand_address): Call it.
9318 2018-08-08 Nathan Sidwell <nathan@acm.org>
9320 * diagnostic.c (diagnostic_report_current_module): Use
9321 linemap_included_from & linemap_included_from_linemap.
9323 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9325 * config/aarch64/aarch64-cores.def: Add phecda core.
9326 * config/aarch64/aarch64-tune.md: Regenerate.
9327 * doc/invoke.texi: Add phecda core.
9329 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9332 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9334 * config/s390/s390.md ("movti"): Add more alternatives for
9335 constant to GPR copies.
9337 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9339 * config/s390/s390.c: Fix whitespace damage throughout the file.
9340 * config/s390/s390.h: Likewise.
9341 * config/s390/tpf.h: Likewise.
9343 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9345 * config/s390/s390.c (s390_loadrelative_operand_p):
9346 Remove TARGET_CPU_ZARCH usages.
9347 (s390_rtx_costs): Likewise.
9348 (s390_legitimate_constant_p): Likewise.
9349 (s390_cannot_force_const_mem): Likewise.
9350 (legitimate_reload_constant_p): Likewise.
9351 (s390_preferred_reload_class): Likewise.
9352 (legitimize_pic_address): Likewise.
9353 (legitimize_tls_address): Likewise.
9354 (s390_split_branches): Removed.
9355 (s390_add_execute): Removed.
9356 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9357 (s390_mainpool_start): Likewise.
9358 (s390_mainpool_finish): Likewise.
9359 (s390_mainpool_cancel): Removed.
9360 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9361 (s390_chunkify_cancel): Likewise.
9362 (s390_return_addr_rtx): Likewise.
9363 (s390_register_info): Remove split_branches_pending_p uages.
9364 (s390_optimize_register_info): Likewise.
9365 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9366 split_branches_pending_p usages.
9367 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9368 (s390_load_got): Likewise.
9369 (s390_expand_split_stack_prologue): Likewise.
9370 (output_asm_nops): Likewise.
9371 (s390_function_profiler): Likewise.
9372 (s390_emit_call): Likewise.
9373 (s390_conditional_register_usage): Likewise.
9374 (s390_optimize_prologue): Likewise.
9375 (s390_reorg): Remove TARGET_CPU_ZARCH and
9376 split_branches_pending_p usages.
9377 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9379 (s390_output_indirect_thunk_function): Likewise.
9380 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9381 (TARGET_CPU_ZARCH_P): Removed.
9382 (struct machine_function): Remove split_branches_pending_p.
9383 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9385 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9387 * common/config/s390/s390-common.c (processor_flags_table):
9389 * config.gcc: Remove with_arch/with_tune support.
9390 * config/s390/2064.md: Remove cpu attribute comparisons.
9391 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9393 * config/s390/linux.h (ASM_SPEC):
9394 Remove -march support.
9395 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9396 Use a table to get an arch level.
9397 * config/s390/s390-opts.h (enum processor_type):
9399 * config/s390/s390.c
9400 (processor_table): Remove entries, add arch_level values.
9401 (s390_issue_rate): Remove cases.
9402 (s390_option_override): Adjust
9403 s390_option_override_internal() call.
9404 (s390_option_override_internal): Remove deprecation warning.
9405 (s390_valid_target_attribute_tree): Adjust
9406 s390_option_override_internal() call.
9407 * config/s390/s390.h (struct s390_processor):
9408 Share with s390-c.c, add arch_level field.
9409 * config/s390/s390.md:
9410 Remove occurrences in cpu attribute.
9411 * config/s390/s390.opt: Remove -march/-mtune support.
9412 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9413 * doc/invoke.texi: Remove deprecation warning.
9415 2018-08-08 Luis Machado <luis.machado@linaro.org>
9417 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9419 (qdf24xx_tunings): Set vector cost structure to
9420 qdf24xx_vector_cost.
9422 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9423 <register_sextend>: Set to 3.
9425 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9428 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9429 * config/aarch64/aarch64-simd.md
9430 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9431 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9432 (aarch64_frecpx<mode>): ...this new pattern.
9433 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9434 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9436 2018-08-07 Martin Liska <mliska@suse.cz>
9439 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9440 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9441 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9442 * doc/extend.texi: Document that malloc attribute adds
9445 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9448 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9449 Define to speculation_safe_value_not_needed.
9451 2018-08-06 Jeff Law <law@redhat.com>
9453 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9454 the vr_values instance to cprop_into_stmt.
9455 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9456 (cprop_operand): Also query EVRP to determine if OP is a constant.
9458 2018-08-06 Nathan Sidwell <nathan@acm.org>
9460 * diagnostic.c (diagnostic_report_current_module): Reroll
9461 included-at loop. Translate text.
9463 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9465 * function-tests.c (selftest::test_expansion_to_rtl): Call
9466 free_after_compilation.
9468 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9470 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9472 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9474 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9475 loops with memory block operations from getting unrolled.
9477 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9480 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9481 Define to speculation_safe_value_not_needed.
9483 2018-08-06 Jeff Law <law@redhat.com>
9485 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9488 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9491 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9492 with all enabled __intN types.
9494 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9496 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9498 * alias.c (record_set): Check for clobber high.
9499 * cfgexpand.c (expand_gimple_stmt): Likewise.
9500 * combine-stack-adj.c (single_set_for_csa): Likewise.
9501 * combine.c (find_single_use_1): Likewise.
9502 (set_nonzero_bits_and_sign_copies): Likewise.
9503 (get_combine_src_dest): Likewise.
9504 (is_parallel_of_n_reg_sets): Likewise.
9505 (try_combine): Likewise.
9506 (record_dead_and_set_regs_1): Likewise.
9507 (reg_dead_at_p_1): Likewise.
9508 (reg_dead_at_p): Likewise.
9509 * dce.c (deletable_insn_p): Likewise.
9510 (mark_nonreg_stores_1): Likewise.
9511 (mark_nonreg_stores_2): Likewise.
9512 * df-scan.c (df_find_hard_reg_defs): Likewise.
9513 (df_uses_record): Likewise.
9514 (df_get_call_refs): Likewise.
9515 * dwarf2out.c (mem_loc_descriptor): Likewise.
9516 * haifa-sched.c (haifa_classify_rtx): Likewise.
9517 * ira-build.c (create_insn_allocnos): Likewise.
9518 * ira-costs.c (scan_one_insn): Likewise.
9519 * ira.c (equiv_init_movable_p): Likewise.
9520 (rtx_moveable_p): Likewise.
9521 (interesting_dest_for_shprep): Likewise.
9522 * jump.c (mark_jump_label_1): Likewise.
9523 * postreload-gcse.c (record_opr_changes): Likewise.
9524 * postreload.c (reload_cse_simplify): Likewise.
9525 (struct reg_use): Add source expr.
9526 (reload_combine): Check for clobber high.
9527 (reload_combine_note_use): Likewise.
9528 (reload_cse_move2add): Likewise.
9529 (move2add_note_store): Likewise.
9530 * print-rtl.c (print_pattern): Likewise.
9531 * recog.c (decode_asm_operands): Likewise.
9532 (store_data_bypass_p): Likewise.
9533 (if_test_bypass_p): Likewise.
9534 * regcprop.c (kill_clobbered_value): Likewise.
9535 (kill_set_value): Likewise.
9536 * reginfo.c (reg_scan_mark_refs): Likewise.
9537 * reload1.c (maybe_fix_stack_asms): Likewise.
9538 (eliminate_regs_1): Likewise.
9539 (elimination_effects): Likewise.
9540 (mark_not_eliminable): Likewise.
9541 (scan_paradoxical_subregs): Likewise.
9542 (forget_old_reloads_1): Likewise.
9543 * reorg.c (find_end_label): Likewise.
9544 (try_merge_delay_insns): Likewise.
9545 (redundant_insn): Likewise.
9546 (own_thread_p): Likewise.
9547 (fill_simple_delay_slots): Likewise.
9548 (fill_slots_from_thread): Likewise.
9549 (dbr_schedule): Likewise.
9550 * resource.c (update_live_status): Likewise.
9551 (mark_referenced_resources): Likewise.
9552 (mark_set_resources): Likewise.
9553 * rtl.c (copy_rtx): Likewise.
9554 * rtlanal.c (reg_referenced_p): Likewise.
9555 (single_set_2): Likewise.
9556 (noop_move_p): Likewise.
9557 (note_stores): Likewise.
9558 * sched-deps.c (sched_analyze_reg): Likewise.
9559 (sched_analyze_insn): Likewise.
9561 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9563 * cse.c (invalidate_reg): New function extracted from...
9564 (invalidate): ...here.
9565 (canonicalize_insn): Check for clobber high.
9566 (invalidate_from_clobbers): invalidate clobber highs.
9567 (invalidate_from_sets_and_clobbers): Likewise.
9568 (count_reg_usage): Check for clobber high.
9569 (insn_live_p): Likewise.
9570 * cselib.c (cselib_expand_value_rtx_1):Likewise.
9571 (cselib_invalidate_regno): Check for clobber in setter.
9572 (cselib_invalidate_rtx): Pass through setter.
9573 (cselib_invalidate_rtx_note_stores):
9574 (cselib_process_insn): Check for clobber high.
9575 * cselib.h (cselib_invalidate_rtx): Add operand.
9577 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9579 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9580 (mark_not_eliminable): Likewise.
9581 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9582 * lra-lives.c (process_bb_lives): Check for clobber high.
9583 * lra.c (new_insn_reg): Remember clobber highs.
9584 (collect_non_operand_hard_regs): Check for clobber high.
9585 (lra_set_insn_recog_data): Likewise.
9586 (add_regs_to_insn_regno_info): Likewise.
9587 (lra_update_insn_regno_info): Likewise.
9589 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9591 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9592 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9594 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9596 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9597 (copy_insn_1): Likewise.
9598 (gen_hard_reg_clobber_high): New gen function.
9599 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9600 * genemit.c (gen_exp): Likewise.
9601 (gen_emit_seq): Pass through info.
9602 (gen_insn): Check for CLOBBER_HIGH.
9603 (gen_expand): Pass through info.
9604 (gen_split): Likewise.
9605 (output_add_clobbers): Likewise.
9606 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9607 (remove_clobbers): Likewise.
9608 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9610 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9612 * doc/rtl.texi (clobber_high): Add.
9613 (parallel): Add in clobber high
9614 * rtl.c (rtl_check_failed_code3): Add function.
9615 * rtl.def (CLOBBER_HIGH): Add expression.
9616 * rtl.h (RTL_CHECKC3): Add macro.
9617 (rtl_check_failed_code3): Add declaration.
9618 (XC3EXP): Add macro.
9620 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9623 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9624 cfun->machine->max_used_stack_alignment if needed.
9626 2018-08-04 Martin Sebor <msebor@redhat.com>
9628 PR tree-optimization/86571
9629 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9632 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9635 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9638 2018-08-03 Jeff Law <law@redhat.com>
9641 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9642 Define to speculation_safe_value_not_needed.
9644 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9646 * doc/gcov.texi (-x): Remove duplicate "to".
9647 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9648 (-Wif-not-aligned): Remove duplicate "is".
9649 (-flto): Remove duplicate "the".
9650 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9651 duplicate "v5.00.b".
9652 (MSP430 Options): Remove duplicate "and" from the description
9653 of "-mgprel-sec=regexp".
9654 (x86 Options): Remove duplicate copies of "vmldLog102" and
9655 vmlsLog104 from description of "-mveclibabi=type".
9657 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9659 * internal-fn.h (first_commutative_argument): Declare.
9660 * internal-fn.c (first_commutative_argument): New function.
9661 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9662 restrictions for pattern statements. Use first_commutative_argument
9663 to look for commutative operands in calls to internal functions.
9665 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
9667 * Makefile.in (wide-int-range.o): New.
9668 * tree-vrp.c: Move all the wide_int_* functions to...
9669 * wide-int-range.cc: ...here.
9670 * tree-vrp.h: Move all the wide_int_* prototypes to...
9671 * wide-int-range.h: ...here.
9673 2018-08-03 Tom de Vries <tdevries@suse.de>
9675 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9677 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9678 * except.c (output_function_exception_table): Do early exit if
9679 targetm_common.except_unwind_info (&global_options) == UI_NONE.
9681 2018-08-03 Martin Liska <mliska@suse.cz>
9683 * predict.c (dump_prediction): Change to 2 digits
9686 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
9688 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9690 (falkor_am_1_gtov_gtov): ... a new insn reservation.
9692 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
9694 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9695 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9696 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9697 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9698 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9700 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9702 * diagnostic-show-locus.c (diagnostic_show_locus): Use
9703 pp_take_prefix when saving the existing prefix.
9704 * diagnostic.c (diagnostic_append_note): Likewise.
9705 * langhooks.c (lhd_print_error_function): Likewise.
9706 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9707 param's type. Free the existing prefix.
9708 (pp_take_prefix): New function.
9709 (pretty_printer::pretty_printer): Drop the prefix parameter.
9710 Rename the length parameter to match the comment.
9711 (pretty_printer::~pretty_printer): Free the prefix.
9712 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9714 (struct pretty_printer): Drop the "const" from "prefix" field's
9715 type and clarify memory management.
9716 (pp_set_prefix): Drop the "const" from the 2nd param.
9717 (pp_take_prefix): New decl.
9719 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9721 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9722 for word_mode_ok here instead of passing as argument.
9723 (expand_block_compare): Change select_block_compare_mode() call.
9724 (expand_strncmp_gpr_sequence): New function.
9725 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9727 2018-08-02 Jeff Law <law@redhat.com>
9730 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9731 Define to speculation_safe_value_not_needed.
9734 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9735 Define to speculation_safe_value_not_needed.
9737 2018-08-02 Tom de Vries <tdevries@suse.de>
9740 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9741 function. Return UI_TARGET unconditionally.
9742 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9743 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9745 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9747 * genemit.c (print_overload_test): Fix typo.
9749 2018-08-02 Richard Biener <rguenther@suse.de>
9751 PR tree-optimization/86816
9752 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9753 which checks for value availability before querying it.
9754 (gvn_uses_equal): Use it.
9755 (same_succ_hash): Likewise.
9756 (gimple_equal_p): Likewise.
9758 2018-08-02 Nick Clifton <nickc@redhat.com>
9761 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9762 Define to speculation_safe_value_not_needed.
9765 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9766 Define to speculation_safe_value_not_needed.
9769 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9770 Define to speculation_safe_value_not_needed.
9773 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9774 Define to speculation_safe_value_not_needed.
9777 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9778 Define to speculation_safe_value_not_needed.
9781 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9782 Define to speculation_safe_value_not_needed.
9785 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9786 Define to speculation_safe_value_not_needed.
9789 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9790 Define to speculation_safe_value_not_needed.
9793 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9794 speculation_safe_value_not_needed.
9797 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9798 to speculation_safe_value_not_needed.
9800 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9802 * doc/md.texi: Expand the documentation of instruction names
9803 to mention port-local uses. Document '@' in pattern names.
9804 * read-md.h (overloaded_instance, overloaded_name): New structs.
9806 (md_reader::handle_overloaded_name): New member function.
9807 (md_reader::get_overloads): Likewise.
9808 (md_reader::m_first_overload): New member variable.
9809 (md_reader::m_next_overload_ptr): Likewise.
9810 (md_reader::m_overloads_htab): Likewise.
9811 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9812 m_next_overload_ptr and m_overloads_htab.
9813 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9814 (get_mode_token, get_code_token, get_int_token): New functions.
9815 (map_attr_string): Add an optional argument that passes back
9816 the associated iterator.
9817 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9818 (md_reader::handle_overloaded_name, add_overload_instance): New
9820 (apply_iterators): Handle '@' names. Report an error if '@'
9821 is used without iterators.
9822 (initialize_iterators): Initialize the new iterator_group fields.
9823 * genopinit.c (handle_overloaded_code_for)
9824 (handle_overloaded_gen): New functions.
9825 (main): Use them to print declarations of maybe_code_for_* and
9826 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9827 * genemit.c (print_overload_arguments, print_overload_test)
9828 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9829 (main): Use it to print definitions of maybe_code_for_* and
9830 maybe_gen_* functions.
9831 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9832 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9833 instead of explicit mode checks.
9834 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9835 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9836 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9837 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9838 (aarch64_expand_compare_and_swap): Likewise
9839 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9840 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9841 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9842 (aarch64_constant_pool_reload_icode): Delete.
9843 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9844 instead of aarch64_constant_pool_reload_icode. Use
9845 code_for_aarch64_reload_mov instead of explicit mode checks.
9846 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9847 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9848 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9849 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9850 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9851 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9852 (aarch64_atomic_load_op_code): Delete.
9853 (aarch64_emit_atomic_load_op): Likewise.
9854 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9855 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
9856 instead of aarch64_emit_atomic_load_op.
9857 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9858 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9859 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9860 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9861 character before the pattern name.
9862 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9863 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9864 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9865 (aarch64_frecps<mode>): Likewise.
9866 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9867 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9868 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9869 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9870 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9872 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9874 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9875 Allow HFmode constants if TARGET_FP_F16INST.
9877 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9880 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9881 No longer check last store for clobber of address register.
9883 2018-08-02 Martin Liska <mliska@suse.cz>
9885 PR gcov-profile/86817
9886 * gcov.c (process_all_functions): New function.
9888 (process_file): Move functions processing to
9889 process_all_functions.
9891 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9893 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9894 "const" to the "gimple *" and "rtx_insn *" parameters.
9895 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9897 (dump_location_t::dump_location_t): Likewise.
9899 2018-08-01 Martin Sebor <msebor@redhat.com>
9901 PR tree-optimization/86650
9902 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9903 rather than a "gcall *". Directly pass the data of interest
9904 to percent_K_format, rather than building a temporary CALL_EXPR
9906 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9907 (gimple_fold_builtin_strncat): Adjust.
9908 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9909 gcall* argument with gimple*.
9910 * gimple-ssa-warn-restrict.c (check_call): Same.
9911 (wrestrict_dom_walker::before_dom_children): Same.
9912 (builtin_access::builtin_access): Same.
9913 (check_bounds_or_overlap): Same
9914 (maybe_diag_overlap): Same.
9915 (maybe_diag_offset_bounds): Same.
9916 * tree-diagnostic.c (default_tree_printer): Move usage of
9917 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9919 * tree-pretty-print.c (percent_K_format): Add argument.
9920 * tree-pretty-print.h: Add argument.
9921 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9922 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9923 (maybe_diag_stxncpy_trunc): Same.
9924 (handle_builtin_stxncpy): Same.
9925 (handle_builtin_strcat): Same.
9927 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9929 * match.pd: Optimise pointer range checks.
9931 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9933 PR tree-optimization/86758
9934 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9935 to remove pattern statements.
9937 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9939 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9940 result of dfs_enumerate_from when constructing stmt_vec_infos,
9941 instead of additionally calling get_loop_body.
9943 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9945 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9947 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9948 When creating an iv, assert that the step is not known to be zero.
9949 (vect_setup_realignment): Update call accordingly.
9950 * tree-vect-stmts.c (vectorizable_store): Likewise.
9951 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
9953 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9955 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9956 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9957 (vectorizable_reduction): Likewise.
9958 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9959 (vect_detect_hybrid_slp_stmts): Likewise.
9960 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9962 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
9964 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9965 (wide_int_set_zero_nonzero_bits): ...this.
9966 (zero_nonzero_bits_from_vr): Rename to...
9967 (vrp_set_zero_nonzero_bits): ...this.
9968 (extract_range_from_multiplicative_op_1): Abstract wide int
9970 (wide_int_range_multiplicative_op): ...here.
9971 (extract_range_from_binary_expr_1): Extract wide int binary
9972 operations into their own functions.
9973 (wide_int_range_lshift): New.
9974 (wide_int_range_can_optimize_bit_op): New.
9975 (wide_int_range_shift_undefined_p): New.
9976 (wide_int_range_bit_xor): New.
9977 (wide_int_range_bit_ior): New.
9978 (wide_int_range_bit_and): New.
9979 (wide_int_range_trunc_mod): New.
9980 (extract_range_into_wide_ints): New.
9981 (vrp_shift_undefined_p): New.
9982 (extract_range_from_multiplicative_op): New.
9983 (vrp_can_optimize_bit_op): New.
9984 * tree-vrp.h (value_range::dump): New.
9985 (wide_int_range_multiplicative_op): New.
9986 (wide_int_range_lshift):New.
9987 (wide_int_range_shift_undefined_p): New.
9988 (wide_int_range_bit_xor): New.
9989 (wide_int_range_bit_ior): New.
9990 (wide_int_range_bit_and): New.
9991 (wide_int_range_trunc_mod): New.
9992 (zero_nonzero_bits_from_bounds): Rename to...
9993 (wide_int_set_zero_nonzero_bits): ...this.
9994 (zero_nonzero_bits_from_vr): Rename to...
9995 (vrp_set_zero_nonzero_bits): ...this.
9996 (range_easy_mask_min_max): Rename to...
9997 (wide_int_range_can_optimize_bit_op): this.
9998 * vr-values.c (simplify_bit_ops_using_ranges): Rename
9999 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10001 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10003 * tree-vectorizer.h (vect_orig_stmt): New function.
10004 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10005 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10006 (vect_create_epilog_for_reduction): Likewise.
10007 (vectorizable_live_operation): Likewise.
10008 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10009 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10010 * tree-vect-stmts.c (vectorizable_call): Likewise.
10011 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10013 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10015 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10017 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10018 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10019 (vect_transform_loop): Likewise.
10020 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10022 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10024 * tree-vectorizer.h (vect_schedule_slp): Return void.
10025 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10026 (vect_schedule_slp): Likewise.
10028 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10030 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10032 (vect_transform_loop): Update calls accordingly. Schedule SLP
10033 instances before the main loop, if any exist.
10035 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10037 PR tree-optimization/86749
10038 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10039 If the lhs is used in a COND_EXPR, check that it is being used
10040 as the "then" or "else" value.
10042 2018-08-01 Tom de Vries <tdevries@suse.de>
10045 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10046 speculation_safe_value_not_needed.
10048 2018-08-01 Richard Biener <rguenther@suse.de>
10050 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10051 as base and offset.
10053 2018-08-01 Martin Liska <mliska@suse.cz>
10055 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10056 format how successful transformation is dumped.
10057 (gimple_mod_pow2_value_transform): Likewise.
10058 (gimple_mod_subtract_transform): Likewise.
10059 (gimple_stringops_transform): Likewise.
10061 2018-08-01 Martin Liska <mliska@suse.cz>
10063 PR value-prof/35543
10064 * value-prof.c (interesting_stringop_to_profile_p):
10065 Simplify the code and add BUILT_IN_MEMMOVE.
10066 (gimple_stringops_transform): Likewise.
10068 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10070 * config/aarch64/aarch64-simd.md
10071 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10072 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10073 use GPI iterator instead of SI mode.
10075 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10077 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10078 rs6000_speculation_barrier.
10079 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10080 new barrier pattern name.
10082 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10084 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10085 (speculation_barrier): New insn.
10087 2018-08-01 Richard Biener <rguenther@suse.de>
10090 * graphite.h: Include isl/id.h and isl/space.h to allow build
10093 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10096 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10097 mode for COFF targets.
10098 * defaults.h (TARGET_COFF): Define.
10099 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10100 TARGET_COFF): Define.
10101 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10102 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10103 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10105 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10107 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10108 * gimple-streamer-out.c (output_bb): Save it.
10109 * lto-streamer-in.c (input_struct_function_base): Restore
10110 instance discriminator if available. Create map on demand.
10111 * lto-streamer-out.c (output_struct_function_base): Save it if
10113 * final.c (decl_to_instance_map): Document LTO strategy.
10115 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10116 Olivier Hainque <hainque@adacore.com>
10118 * debug.h (decl_to_instance_map_t): New type.
10119 (decl_to_instance_map): Declare.
10120 (maybe_create_decl_to_instance_map): New inline function.
10121 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10122 to track basic block discriminators.
10123 (final_start_function_1): Initialize them.
10124 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10126 (decl_to_instance_map): New variable.
10127 (map_decl_to_instance, maybe_set_discriminator): New functions.
10128 (notice_source_line): Set discriminator.
10130 2018-07-31 Ian Lance Taylor <iant@golang.org>
10132 * targhooks.c (default_have_speculation_safe_value): Add
10135 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10137 * dump-context.h: Include "pretty-print.h".
10138 (dump_context::refresh_dumps_are_enabled): New decl.
10139 (dump_context::emit_item): New decl.
10140 (class dump_context): Add fields "m_test_pp" and
10142 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10143 (temp_dump_context::get_dumped_text): New decl.
10144 (class temp_dump_context): Add field "m_pp".
10145 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10146 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10148 (set_dump_file): Update for above change.
10149 (set_alt_dump_file): Likewise.
10150 (dump_loc): New overload, taking a pretty_printer *.
10151 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10152 to any test pretty-printer.
10153 (make_item_for_dump_gimple_stmt): New function, adapted from
10154 optinfo::add_gimple_stmt.
10155 (dump_context::dump_gimple_stmt): Call it, and use the result,
10156 eliminating the direct usage of dump_file and alt_dump_file in
10157 favor of indirectly using them via emit_item.
10158 (make_item_for_dump_gimple_expr): New function, adapted from
10159 optinfo::add_gimple_expr.
10160 (dump_context::dump_gimple_expr): Call it, and use the result,
10161 eliminating the direct usage of dump_file and alt_dump_file in
10162 favor of indirectly using them via emit_item.
10163 (make_item_for_dump_generic_expr): New function, adapted from
10165 (dump_context::dump_generic_expr): Call it, and use the result,
10166 eliminating the direct usage of dump_file and alt_dump_file in
10167 favor of indirectly using them via emit_item.
10168 (make_item_for_dump_printf_va): New function, adapted from
10169 optinfo::add_printf_va.
10170 (make_item_for_dump_printf): New function.
10171 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10172 and use the result, eliminating the direct usage of dump_file and
10173 alt_dump_file in favor of indirectly using them via emit_item.
10174 (make_item_for_dump_dec): New function.
10175 (dump_context::dump_dec): Call it, and use the result,
10176 eliminating the direct usage of dump_file and alt_dump_file in
10177 favor of indirectly using them via emit_item.
10178 (make_item_for_dump_symtab_node): New function, adapted from
10179 optinfo::add_symtab_node.
10180 (dump_context::dump_symtab_node): Call it, and use the result,
10181 eliminating the direct usage of dump_file and alt_dump_file in
10182 favor of indirectly using them via emit_item.
10183 (dump_context::begin_scope): Reimplement, avoiding direct usage
10184 of dump_file and alt_dump_file in favor of indirectly using them
10186 (dump_context::emit_item): New member function.
10187 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10188 Set up test pretty-printer on the underlying context. Call
10189 refresh_dumps_are_enabled.
10190 (temp_dump_context::~temp_dump_context): Call
10191 refresh_dumps_are_enabled.
10192 (temp_dump_context::get_dumped_text): New member function.
10193 (selftest::verify_dumped_text): New function.
10194 (ASSERT_DUMPED_TEXT_EQ): New macro.
10195 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10196 and then without optinfo enabled. Add uses of
10197 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10198 * dumpfile.h: Update comment for the dump_* API.
10199 * optinfo-emit-json.cc
10200 (selftest::test_building_json_from_dump_calls): Update for new
10201 param for temp_dump_context ctor.
10202 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10203 and "m_owned" field.
10204 (optinfo_item::~optinfo_item): Likewise.
10205 (optinfo::add_item): New member function.
10206 (optinfo::emit): Update comment.
10207 (optinfo::add_string): Delete.
10208 (optinfo::add_printf): Delete.
10209 (optinfo::add_printf_va): Delete.
10210 (optinfo::add_gimple_stmt): Delete.
10211 (optinfo::add_gimple_expr): Delete.
10212 (optinfo::add_tree): Delete.
10213 (optinfo::add_symtab_node): Delete.
10214 (optinfo::add_dec): Delete.
10215 * optinfo.h (class dump_context): New forward decl.
10216 (optinfo::add_item): New decl.
10217 (optinfo::add_string): Delete.
10218 (optinfo::add_printf): Delete.
10219 (optinfo::add_printf_va): Delete.
10220 (optinfo::add_gimple_stmt): Delete.
10221 (optinfo::add_gimple_expr): Delete.
10222 (optinfo::add_tree): Delete.
10223 (optinfo::add_symtab_node): Delete.
10224 (optinfo::add_dec): Delete.
10225 (optinfo::add_poly_int): Delete.
10226 (optinfo_item::optinfo_item): Remove "owned" param.
10227 (class optinfo_item): Remove field "m_owned".
10229 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10231 PR middle-end/86705
10232 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10233 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10234 requested variable alignment.
10235 (expand_one_ssa_partition): Likewise.
10236 (expand_one_var): Likewise.
10238 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10240 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10241 to speculation_safe_value_not_needed.
10243 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10245 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10246 * targhooks.c (speculation_safe_value_not_needed): New function.
10247 * target.def (have_speculation_safe_value): Update documentation.
10248 * doc/tm.texi: Regenerated.
10250 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10252 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10253 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10255 (despeculate_copy<ALLI:mode>_insn): New insn.
10256 (despeculate_copyti_insn): New insn.
10257 (despeculate_simple<ALLI:mode>): New insn
10258 (despeculate_simpleti): New insn.
10259 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10261 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10262 aarch64_speculation_safe_value.
10263 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10265 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10267 * config/aarch64/aarch64-speculation.cc: New file.
10268 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10269 before pass_reorder_blocks.
10270 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10272 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10273 X14 and X15 when tracking speculation.
10274 * config/aarch64/aarch64.md (register name constants): Add
10275 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10276 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10277 (speculation_barrier): New insn attribute.
10278 (cmp<mode>): Allow SP in comparisons.
10279 (speculation_tracker): New insn.
10280 (speculation_barrier): Add speculation_barrier attribute.
10281 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10282 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10283 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10285 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10287 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10288 aarch64_track_speculation is true.
10289 (tb<optab><mode>1): Likewise.
10290 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10291 generate CB[N]Z when tracking speculation.
10292 (aarch64_split_compare_and_swap): Likewise.
10293 (aarch64_split_atomic_op): Likewise.
10295 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10297 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10299 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10301 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10302 (speculation_barrier): New insn.
10304 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10306 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10307 * config/arm/arm.md (speculation_barrier): New expand.
10308 (speculation_barrier_insn): New pattern.
10310 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10312 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10313 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10314 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10315 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10317 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10318 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10319 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10320 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10321 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10322 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10323 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10324 * builtins.c (expand_speculation_safe_value): New function.
10325 (expand_builtin): Call it.
10326 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10327 * doc/extend.texi: Document __builtin_speculation_safe_value.
10328 * doc/md.texi: Document "speculation_barrier" pattern.
10329 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10330 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10331 * doc/tm.texi: Regenerated.
10332 * target.def (have_speculation_safe_value, speculation_safe_value): New
10334 * targhooks.c (default_have_speculation_safe_value): New function.
10335 (default_speculation_safe_value): New function.
10336 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10337 (default_speculation_safe_value): Add prototype.
10339 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10341 * dump-context.h (dump_context::dump_loc): New decl.
10342 * dumpfile.c (dump_context::dump_loc): New member function.
10343 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10344 and dump_gimple_stmt.
10345 (dump_context::dump_gimple_expr_loc): Likewise, using
10347 (dump_context::dump_generic_expr_loc): Likewise, using
10349 (dump_context::dump_printf_loc_va): Likewise, using
10351 (dump_context::begin_scope): Explicitly using the global function
10352 "dump_loc", rather than the member function.
10354 2018-07-31 Martin Sebor <msebor@redhat.com>
10356 PR tree-optimization/86741
10357 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10359 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10361 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10362 depend on whether prefetch instructions will be emitted or not.
10363 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10364 will be emitted or not.
10365 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10366 (TARGET_SETMEM_PFD): New macros.
10368 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10370 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10371 (NULL_STMT_VEC_INFO): Delete.
10372 (stmt_vec_info::operator*): Likewise.
10373 (stmt_vec_info::operator gimple *): Likewise.
10374 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10375 of NULL_STMT_VEC_INFO.
10376 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10377 (vect_reassociating_reduction_p): Likewise.
10378 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10379 (vectorizable_store): Likewise.
10380 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10381 (vec_info::free_stmt_vec_infos): Likewise.
10383 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10385 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10386 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10390 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10391 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10392 (vec_info::free_stmt_vec_info): New private member functions.
10393 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10394 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10395 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10396 set_stmt_vec_info_vec and free_stmt_vec_infos.
10397 * tree-vect-loop.c (_loop_vec_info): Remove call to
10398 set_stmt_vec_info_vec.
10399 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10400 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10401 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10402 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10403 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10404 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10405 with the clearing in the xcalloc.
10406 (stmt_vec_info_vec): Delete.
10407 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10408 (vectorize_loops): Likewise.
10409 (vec_info::~vec_info): Remove argument from call to
10410 free_stmt_vec_infos.
10411 (vec_info::add_stmt): Remove vinfo argument from call to
10414 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10416 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10417 rather than a gimple stmt.
10418 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10419 information for pattern statements when passed the original
10420 statement; instead wait to be passed the pattern statement itself.
10421 Don't call set_vinfo_for_stmt here.
10422 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10423 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10424 stmt_vec_infos here.
10425 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10426 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10427 stmt_vec_infos entry.
10429 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10431 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10432 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10433 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10434 * tree-vect-stmts.c (vectorizable_call): Likewise.
10435 (vectorizable_simd_clone_call): Likewise.
10437 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10439 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10440 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10441 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10442 * tree-vect-loop.c (vect_transform_loop): Likewise.
10443 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10444 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10448 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10449 (vect_dr_stmt): Delete.
10450 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10451 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10453 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10454 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10455 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10456 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10457 (vect_analyze_data_refs): Likewise.
10458 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10460 (vect_find_same_alignment_drs): Likewise.
10461 (vect_slp_analyze_node_dependences): Update calls accordingly.
10462 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10463 instead of DR_VECT_AUX.
10464 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10465 of a vector data references. Use vec_info::lookup_dr instead of
10467 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10468 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10469 instead of DR_VECT_AUX.
10471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10473 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10475 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10477 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10478 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10479 (vect_gen_prolog_loop_niters): Likewise.
10481 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10483 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10484 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10485 (vect_known_alignment_in_bytes, vect_dr_behavior)
10486 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10487 instead of data_references. Update calls to other routines for
10488 which the same change has been made.
10489 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10490 dr_vec_infos instead of stmt_vec_infos.
10491 (vect_analyze_data_ref_dependence): Update call accordingly.
10492 (vect_slp_analyze_data_ref_dependence)
10493 (vect_record_base_alignments): Use DR_VECT_AUX.
10494 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10495 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10496 (vector_alignment_reachable_p, vect_get_data_access_cost)
10497 (vect_peeling_supportable, vect_analyze_group_access_1)
10498 (vect_analyze_group_access, vect_analyze_data_ref_access)
10499 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10500 (vect_compile_time_alias, vect_small_gap_p)
10501 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10502 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10503 instead of data_references. Update calls to other routines for
10504 which the same change has been made.
10505 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10506 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10507 (vect_slp_analyze_and_verify_node_alignment)
10508 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10509 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10510 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10512 (_vect_peel_info::dr): Replace with...
10513 (_vect_peel_info::dr_info): ...this new field.
10514 (vect_peeling_hash_get_most_frequent)
10515 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10516 (vect_peeling_hash_get_lowest_cost):
10517 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10518 routines for which the same change has been made.
10519 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10521 * tree-vect-loop-manip.c (get_misalign_in_elems)
10522 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10524 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10525 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10526 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10527 (get_group_load_store_type, get_negative_load_store_type)
10528 (vect_get_data_ptr_increment, vectorizable_store)
10529 (vectorizable_load): Likewise.
10530 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10531 Update calls to other routines for which the same change has been made.
10533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10535 * tree-vectorizer.h (vec_info::move_dr): New member function.
10536 (dataref_aux): Rename to...
10537 (dr_vec_info): ...this and add "dr" and "stmt" fields.
10538 (_stmt_vec_info::dr_aux): Update accordingly.
10539 (_stmt_vec_info::data_ref_info): Delete.
10540 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10541 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10542 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10543 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10545 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
10546 (STMT_VINFO_DR_INFO): New macro.
10547 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10548 (set_dr_misalignment): Update after rename of dataref_aux.
10549 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
10550 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10551 initialization of STMT_VINFO_DATA_REF.
10552 * tree-vectorizer.c (vec_info::move_dr): New function.
10553 * tree-vect-patterns.c (vect_recog_bool_pattern)
10554 (vect_recog_mask_conversion_pattern)
10555 (vect_recog_gather_scatter_pattern): Use it.
10556 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10557 the "dr" and "stmt" fields of dr_vec_info instead of
10558 STMT_VINFO_DATA_REF.
10560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10562 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10563 (is_pattern_stmt_p): Use it.
10564 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10565 on pattern statements.
10567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10569 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10570 original stmt as a stmt_vec_info rather than a gimple stmt.
10571 (vect_pattern_recog_1): Take the statement directly as a
10572 stmt_vec_info, rather than via a gimple_stmt_iterator.
10573 Update call to vect_mark_pattern_stmts.
10574 (vect_pattern_recog): Update calls accordingly.
10576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10578 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10579 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10580 a vect_def_type for the first argument.
10581 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10582 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
10583 operand if it isn't defined by a vectorized statement.
10584 (vect_build_gather_load_calls): Remove the mask_dt argument and
10585 update calls to vect_get_vec_def_for_stmt_copy.
10586 (vectorizable_bswap): Likewise the dt argument.
10587 (vectorizable_call): Update calls to vectorizable_bswap and
10588 vect_get_vec_def_for_stmt_copy.
10589 (vectorizable_simd_clone_call, vectorizable_assignment)
10590 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10591 (vectorizable_comparison): Update calls to
10592 vect_get_vec_def_for_stmt_copy.
10593 (vectorizable_store): Likewise. Remove now-unnecessary calls to
10594 vect_is_simple_use.
10595 (vect_get_loop_based_defs): Remove dt argument and update call
10596 to vect_get_vec_def_for_stmt_copy.
10597 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10598 and vect_get_vec_def_for_stmt_copy.
10599 (vectorizable_load): Update calls to vect_build_gather_load_calls
10600 and vect_get_vec_def_for_stmt_copy.
10601 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10602 (vectorizable_reduction, vectorizable_live_operation): Update calls
10603 to vect_get_vec_def_for_stmt_copy.
10605 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10607 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10608 and gimple stmt arguments with a stmt_vec_info.
10609 (vect_record_base_alignments): Update calls accordingly.
10610 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10611 and gimple stmt arguments with a stmt_vec_info.
10612 (vect_build_slp_tree_1): Remove vinfo argument and update call
10613 to vect_record_max_nunits.
10614 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10615 and vect_record_max_nunits.
10617 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10619 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10620 file and take a stmt_vec_info instead of a gimple stmt.
10621 (supportable_widening_operation, vect_finish_replace_stmt)
10622 (vect_finish_stmt_generation, vect_get_store_rhs)
10623 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10624 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10625 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10626 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10627 (vect_create_data_ref_ptr, bump_vector_ptr)
10628 (vect_permute_store_chain, vect_setup_realignment)
10629 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10630 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10631 (vectorizable_reduction, vectorizable_induction)
10632 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10633 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10634 than gimple stmts as arguments.
10635 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10636 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10637 (can_group_stmts_p, vect_check_gather_scatter)
10638 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10639 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10640 (vect_permute_load_chain, vect_shift_permute_load_chain)
10641 (vect_transform_grouped_load)
10642 (vect_record_grouped_load_vectors): Likewise.
10643 * tree-vect-loop.c (vect_fixup_reduc_chain)
10644 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10645 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10646 (vectorizable_reduction, vectorizable_induction)
10647 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10648 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10649 (vect_get_load_store_mask): Likewise.
10650 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10651 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10652 * tree-vect-stmts.c (vect_mark_relevant)
10653 (is_simple_and_all_uses_invariant)
10654 (exist_non_indexing_operands_for_use_p, process_use)
10655 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10656 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10657 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10658 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10659 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10660 (get_negative_load_store_type, get_load_store_type)
10661 (vect_check_load_store_mask, vect_check_store_rhs)
10662 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10663 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10664 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10665 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10666 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10667 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10668 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10669 (supportable_widening_operation): Likewise.
10671 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10673 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10674 a stmt_vec_info instead of a gcall.
10675 (vect_check_gather_scatter): Update call accordingly.
10676 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10678 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10679 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10680 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10681 instead of a gimple stmt.
10682 (vect_transform_loop): Update calls accordingly.
10683 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10684 stmt_vec_infos instead of gimple stmts.
10685 (vect_analyze_slp_instance): Update use accordingly.
10686 * tree-vect-stmts.c (read_vector_array, write_vector_array)
10687 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10688 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10689 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10690 (vect_gen_widened_results_half, vect_get_loop_based_defs)
10691 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10692 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10693 down to subroutines.
10695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10697 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10698 of the worklist from a vector of gimple stmts to a vector of
10700 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10701 (vect_mark_stmts_to_be_vectorized): Likewise
10703 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10705 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10706 statement before passing it to vect_analyze_stmt.
10707 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10708 the chain of phi vector definitions. Track the exit phi via its
10710 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10711 STMT_VINFO_REDUC_DEF.
10712 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10713 stmt_vec_infos to handle the statement chains.
10714 (vect_get_slp_defs): Record the first statement in the node
10715 using a stmt_vec_info.
10716 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10717 statements here and pass their stmt_vec_info down to subroutines.
10718 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10719 down to vect_finish_stmt_generation.
10720 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10721 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10722 stmt_vec_infos to subroutines.
10723 (vect_remove_stores): Use stmt_vec_infos to handle the statement
10726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10728 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10729 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10730 (vect_permute_store_chain, vect_setup_realignment)
10731 (vect_permute_load_chain, vect_shift_permute_load_chain)
10732 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10733 stmts internally, and when passing values to other vectorizer routines.
10734 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10735 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10736 (vect_analyze_loop_operations, get_initial_def_for_reduction)
10737 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10738 (vectorizable_reduction, vectorizable_induction)
10739 (vectorizable_live_operation, vect_transform_loop_stmt)
10740 (vect_transform_loop): Likewise.
10741 * tree-vect-patterns.c (vect_reassociating_reduction_p)
10742 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10743 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10744 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10745 (vect_slp_analyze_node_operations_1): Likewise.
10746 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10747 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10748 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10749 (vect_finish_stmt_generation_1, get_group_load_store_type)
10750 (get_load_store_type, vect_build_gather_load_calls)
10751 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10752 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10753 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10754 (vectorizable_store, vectorizable_load, vectorizable_condition)
10755 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10756 (supportable_widening_operation): Likewise.
10757 (vect_get_vector_types_for_stmt): Likewise.
10758 * tree-vectorizer.h (vect_dr_behavior): Likewise.
10760 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10762 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10763 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10764 (vect_permute_store_chain, vect_permute_load_chain)
10765 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10766 repeated stmt_vec_info lookups.
10767 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10768 (vect_update_ivs_after_vectorizer): Likewise.
10769 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10770 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10771 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10772 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10773 (vect_bb_slp_scalar_cost): Likewise.
10774 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10778 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10779 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10780 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10781 to get gassigns and gcalls, rather than operating on generc gimple
10783 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10784 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10785 (vectorizable_load, vect_analyze_stmt): Likewise.
10786 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10790 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10791 return stmt_vec_infos rather than gimple stmts. Do not accept
10793 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10795 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10796 Update use of get_later_stmt.
10797 (vect_get_constant_vectors): Update call accordingly.
10798 (vect_schedule_slp_instance): Likewise
10799 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10800 (vect_slp_analyze_instance_dependence): Likewise.
10801 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10805 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10806 (stmt_info_for_cost::stmt_info): ...this new field.
10807 (add_stmt_costs): Update accordingly.
10808 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10809 (vect_get_known_peeling_cost): Likewise.
10810 (vect_estimate_min_profitable_iters): Likewise.
10811 * tree-vect-stmts.c (record_stmt_cost): Likewise.
10813 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10815 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10816 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10817 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10819 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10823 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10824 a gimple stmt to a stmt_vec_info.
10825 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10829 * tree-vectorizer.h (vec_info::grouped_stores): Change from
10830 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10831 (_loop_vec_info::reduction_chains): Likewise.
10832 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10834 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10836 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10838 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10839 a gimple stmt to a stmt_vec_info.
10840 (_stmt_vec_info::next_element): Likewise.
10841 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10842 (vect_slp_analyze_and_verify_node_alignment)
10843 (vect_analyze_group_access_1, vect_analyze_group_access)
10844 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10845 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10846 (vect_supportable_dr_alignment): Update accordingly.
10847 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10848 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10849 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10850 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10851 * tree-vect-slp.c (vect_build_slp_tree_1)
10852 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10853 (vect_split_slp_store_group, vect_analyze_slp_instance)
10854 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10855 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10856 (get_group_load_store_type, get_load_store_type)
10857 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10858 (vect_transform_stmt, vect_remove_stores): Likewise.
10860 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10862 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10863 than a gimple stmt.
10864 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10865 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10866 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10867 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10868 (vector_alignment_reachable_p, vect_get_data_access_cost)
10869 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10870 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10871 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10872 (vect_analyze_group_access_1, vect_analyze_group_access)
10873 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10874 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10875 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10876 result of vect_dr_stmt and use the stmt_vec_info instead of
10877 the associated gimple stmt.
10878 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10879 (vect_gen_prolog_loop_niters): Likewise.
10880 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10882 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10884 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10885 to a vec<stmt_vec_info>.
10886 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10887 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10888 vec<stmt_vec_info>.
10889 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10890 to a vec<stmt_vec_info>.
10891 (bst_traits::value_type, bst_traits::value_type): Likewise.
10892 (bst_traits::hash): Update accordingly.
10893 (vect_get_and_check_slp_defs): Change the stmts parameter from
10894 a vec<gimple *> to a vec<stmt_vec_info>.
10895 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10896 (vect_build_slp_tree): Likewise.
10897 (vect_build_slp_tree_2): Likewise. Update uses of
10898 SLP_TREE_SCALAR_STMTS.
10899 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10900 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10901 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10902 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10903 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10904 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10905 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10906 (vect_get_constant_vectors, vect_get_slp_defs)
10907 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10908 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10909 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10910 instead of gimple stmts.
10911 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10912 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10913 (vect_slp_analyze_instance_dependence): Update uses of
10914 SLP_TREE_SCALAR_STMTS.
10915 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10916 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10917 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10918 (get_initial_defs_for_reduction): Likewise.
10919 (vect_create_epilog_for_reduction): Likewise.
10920 (vectorize_fold_left_reduction): Likewise.
10921 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10922 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10923 (can_vectorize_live_stmts): Likewise.
10925 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10927 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10928 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10929 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10931 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10933 (gather_scalar_reductions): Update after above interface changes.
10934 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10935 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10937 (vect_force_simple_reduction): Likewise.
10938 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10939 LOOP_VINFO_REDUCTIONS.
10940 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10944 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10945 a gimple stmt to a stmt_vec_info.
10946 * tree-vect-loop.c (vect_active_double_reduction_p)
10947 (vect_force_simple_reduction, vectorizable_reduction): Update
10950 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10952 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10953 vec<gimple *> to a vec<stmt_vec_info>.
10954 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10955 the reduction_phis argument from a vec<gimple *> to a
10956 vec<stmt_vec_info>.
10957 (vectorizable_reduction): Likewise the phis local variable that
10958 is passed to vect_create_epilog_for_reduction. Update for new type
10959 of SLP_TREE_VEC_STMTS.
10960 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10961 (vectorizable_live_operation): Likewise.
10962 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10963 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10967 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10968 a gimple stmt to a stmt_vec_info.
10969 (vectorizable_condition, vectorizable_live_operation)
10970 (vectorizable_reduction, vectorizable_induction): Pass back the
10971 vectorized statement as a stmt_vec_info.
10972 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10973 use of STMT_VINFO_VEC_STMT.
10974 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10975 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10976 as stmt_vec_infos rather than gimple stmts.
10977 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10978 to a stmt_vec_info.
10979 (vectorizable_live_operation): Likewise.
10980 (vectorizable_reduction, vectorizable_induction): Likewise,
10981 updating use of STMT_VINFO_VEC_STMT.
10982 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10983 of STMT_VINFO_VEC_STMT.
10984 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10985 (vectorizable_simd_clone_call, vectorizable_conversion)
10986 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10987 (vectorizable_store, vectorizable_load, vectorizable_condition)
10988 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10989 from a gimple stmt to a stmt_vec_info.
10990 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
10991 pointer to a stmt_vec_info to the vectorizable_* routines.
10993 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10995 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10996 a gimple stmt to a stmt_vec_info.
10997 (is_pattern_stmt_p): Update accordingly.
10998 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10999 (vect_record_grouped_load_vectors): Likewise.
11000 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11001 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11002 (vect_model_reduction_cost): Likewise.
11003 (vect_create_epilog_for_reduction): Likewise.
11004 (vectorizable_reduction, vectorizable_induction): Likewise.
11005 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11006 Return the stmt_vec_info for the pattern statement.
11007 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11008 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11009 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11010 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11011 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11012 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11013 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11014 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11018 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11019 (vect_finish_stmt_generation): Likewise.
11020 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11021 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11022 (vect_build_gather_load_calls): Use the return value of the above
11023 functions instead of a separate call to vinfo_for_stmt. Use narrow
11024 scopes for the input gimple stmt and wider scopes for the associated
11025 stmt_vec_info. Use vec_info::lookup_def when setting these
11026 stmt_vec_infos from an SSA_NAME definition.
11027 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11028 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11029 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11030 (vectorizable_store, vectorizable_load, vectorizable_condition)
11031 (vectorizable_comparison): Likewise.
11032 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11033 (vectorizable_reduction): Likewise.
11035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11037 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11038 stmt_vec_info * parameter before the optional gimple **.
11039 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11040 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11041 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11042 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11043 (vectorizable_live_operation): Likewise.
11044 * tree-vect-patterns.c (type_conversion_p): Likewise.
11045 (vect_look_through_possible_promotion): Likewise.
11046 (vect_recog_rotate_pattern): Likewise.
11047 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11051 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11052 a typedef to a wrapper class.
11053 (NULL_STMT_VEC_INFO): New macro.
11054 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11055 (stmt_vec_info::operator*): New function.
11056 (stmt_vec_info::operator gimple *): Likewise.
11057 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11058 (add_stmt_costs): Likewise.
11059 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11060 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11061 (vect_get_known_peeling_cost): Likewise.
11062 (vect_estimate_min_profitable_iters): Likewise.
11063 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11064 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11065 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11066 (vectorizable_store, free_stmt_vec_infos): Likewise.
11067 (new_stmt_vec_info): Change return type of xcalloc to
11070 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11072 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11073 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11074 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11075 a single_imm_use-based sequence.
11076 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11080 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11081 * tree-vectorizer.c (vec_info::lookup_def): New function.
11082 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11083 (vect_widened_op_tree): Likewise.
11084 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11085 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11086 (vectorizable_reduction): Likewise.
11087 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11089 (vect_is_slp_reduction): Update calls accordingly. Use
11090 vec_info::lookup_def.
11091 (vect_is_simple_reduction): Likewise
11092 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11096 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11097 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11098 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11100 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11101 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11102 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11103 (vect_is_slp_reduction, vectorizable_induction)
11104 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11105 * tree-vect-patterns.c (vect_init_pattern_stmt):
11106 (vect_determine_min_output_precision_1, vect_determine_precisions)
11107 (vect_pattern_recog): Likewise.
11108 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11109 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11110 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11111 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11112 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11113 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11114 info field from a loop to a loop_vec_info.
11116 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11118 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11119 (vec_info::add_stmt): Declare.
11120 * tree-vectorizer.c (vec_info::add_stmt): New function.
11121 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11122 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11123 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11124 (vectorizable_induction): Likewise.
11125 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11126 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11127 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11128 (vectorizable_load): Likewise.
11129 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11130 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11131 (vect_recog_gather_scatter_pattern): Likewise.
11132 (append_pattern_def_seq): Likewise. Remove a check that is
11133 performed by add_stmt itself.
11135 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11137 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11138 which make_ssa_name was called with new_stmt before new_stmt
11141 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11143 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11145 (vect_is_slp_reduction): ...here...
11146 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11147 that are already known to be false.
11149 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11151 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11152 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11153 STMT_VINFO_NUM_SLP_USES when it's true.
11154 (vect_free_slp_instance): Add a final_p parameter and pass it to
11155 vect_free_slp_tree.
11156 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11157 (vect_analyze_slp_instance): Likewise.
11158 (vect_slp_analyze_operations): Likewise.
11159 (vect_slp_analyze_bb_1): Likewise.
11160 * tree-vectorizer.c (vec_info): Likewise.
11161 * tree-vect-loop.c (vect_transform_loop): Likewise.
11163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11165 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11166 function is not called for second and subsequent members of
11169 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11171 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11172 cases for nested loops from here to ...
11173 (vect_create_epilog_for_reduction): ...here. Only call
11174 vect_is_simple_use for inner-loop reductions.
11176 2018-07-31 Martin Liska <mliska@suse.cz>
11178 PR gcov-profile/85338
11179 PR gcov-profile/85350
11180 PR gcov-profile/85372
11181 * profile.c (struct location_triplet): New.
11182 (struct location_triplet_hash): Likewise.
11183 (output_location): Do not output a BB that
11184 is already recorded for a line.
11185 (branch_prob): Use streamed_locations.
11187 2018-07-31 Martin Liska <mliska@suse.cz>
11189 PR gcov-profile/85370
11190 * coverage.c (coverage_begin_function): Do not mark target
11191 clones as artificial functions.
11193 2018-07-31 Martin Liska <mliska@suse.cz>
11195 PR gcov-profile/83813
11196 PR gcov-profile/84758
11197 PR gcov-profile/85217
11198 PR gcov-profile/85332
11199 * profile.c (branch_prob): Do not record GOTO expressions
11200 for GIMPLE statements which locations are already streamed.
11202 2018-07-31 Olivier Hainque <hainque@adacore.com>
11204 * gcc.c (handle_spec_function): Accept a soft_matched_part
11205 argument, as do_spec_1. Pass it down to ...
11206 (eval_spec_function): Accept a soft_matched_part argument,
11207 and pass it down to ...
11208 (do_spec_2): Accept a soft_matched_part argument, and pass
11209 it down to do_spec_1.
11210 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11211 (handle_braces): Update call to handle_spec_function.
11212 (driver::set_up_specs): Update calls to do_spec_2.
11213 (compare_debug_dump_opt_spec_function): Likewise.
11214 (compare_debug_self_opt_spec_function): Likewise.
11216 2018-07-31 Olivier Hainque <hainque@adacore.com>
11218 * common.opt (nolibc): New option.
11219 * doc/invoke.texi (Link Options): Document it.
11220 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11221 * config/alpha/linux.h: Likewise.
11222 * config/arc/elf.h: Likewise.
11223 * config/arm/uclinux-elf.h: Likewise.
11224 * config/arm/unknown-elf.h: Likewise.
11225 * config/avr/avrlibc.h: Likewise.
11226 * config/bfin/bfin.h: Likewise.
11227 * config/bfin/linux.h: Likewise.
11228 * config/bfin/uclinux.h: Likewise.
11229 * config/darwin.h: Likewise.
11230 * config/darwin10.h: Likewise.
11231 * config/darwin12.h: Likewise.
11232 * config/gnu-user.h: Likewise.
11233 * config/lm32/uclinux-elf.h: Likewise.
11234 * config/pa/pa-hpux11.h: Likewise.
11235 * config/pa/pa64-hpux.h: Likewise.
11236 * config/sparc/sparc.h: Likewise.
11238 2018-07-31 Olivier Hainque <hainque@adacore.com>
11240 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11241 undefined variables.
11243 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11246 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11247 instead of GEN_INT.
11249 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11251 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11252 terminated string literal.
11254 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11256 PR rtl-optimization/85160
11257 * combine.c (is_just_move): New function.
11258 (try_combine): Allow combining two instructions into two if neither of
11259 the original instructions was a move.
11261 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11264 * doc/extend.texi (Global Register Variables): Discourage use of type
11266 (Local Register Variables): Likewise.
11268 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11270 PR tree-optimization/86506
11271 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11273 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11276 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11277 hard_regno, make sure no insn between `from` and `to` clobbers it.
11279 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11280 Tom de Vries <tdevries@suse.de>
11282 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11283 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11284 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11285 PTX_DEFAULT_RUNTIME_DIM.
11286 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11288 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11290 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11291 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11292 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11294 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11296 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11298 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11299 predicate to reflect toc fusion has been deleted.
11300 (toc_fusion_mem_raw): Delete, no longer used.
11301 (toc_fusion_mem_wrapped): Likewise.
11302 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11304 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11305 Delete, no longer used.
11306 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11307 meant to be used for toc fusion.
11308 (rs6000_debug_print_mode): Delete toc fusion debugging.
11309 (rs6000_debug_reg_global): Likewise.
11310 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11311 fusion and secondary reload support that were never used.
11312 (rs6000_option_override_internal): Delete TOC fusion, that was only
11313 partially defined, and it did not work unless you also used the
11315 (rs6000_legitimate_address_p): Delete TOC fusion support.
11316 (rs6000_opt_masks): Likewise.
11317 (fusion_wrap_memory_address): Delete function, no longer used.
11318 (fusion_split_address); Delete TOC fusion support.
11319 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11320 longer used with toc fusion being deleted.
11321 (TARGET_TOC_FUSION_FP): Likewise.
11322 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11324 (toc fusion spliter): Delete TOC fusion support.
11325 (toc_fusionload_<mode>): Likewise.
11326 (toc_fusionload_di): Likewise.
11327 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11328 longer needs to be named. Rename predicate to delete TOC fusion.
11329 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11330 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11331 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11332 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11333 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11335 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11337 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11338 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11339 __int128 in built-in function prototypes.
11340 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11341 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11343 2018-07-27 Martin Sebor <msebor@redhat.com>
11345 PR tree-optimization/86696
11346 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11347 types, including enums.
11348 (handle_char_store): Be prepared for the above function to fail.
11350 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11352 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11353 when optimization level is lower than 2 or optimize for size.
11355 2018-07-26 Martin Sebor <msebor@redhat.com>
11357 PR tree-optimization/86043
11358 PR tree-optimization/86042
11359 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11360 (get_string_cst_length): Rename...
11361 (get_min_string_length): ...to this. Add argument.
11362 (handle_char_store): Extend to handle multi-character stores by
11364 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11365 * tree.h (initializer_zerop): Add argument.
11367 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11369 PR middle-end/86660
11370 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11371 declare target to variables if they have always,{to,from,tofrom} map
11374 2018-07-26 Martin Liska <mliska@suse.cz>
11377 * lto-wrapper.c: Add linker_output as prefix
11378 for ltrans_output_file.
11380 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11382 PR rtl-optimization/85805
11383 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11384 value for hard registers if that was written in the same mode.
11386 2018-07-26 Martin Liska <mliska@suse.cz>
11388 PR gcov-profile/86536
11389 * gcov.c (format_gcov): Use printf format %.*f directly
11390 and do not handle special values.
11392 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11394 * common/config/arc/arc-common.c (arc_option_optimization_table):
11395 Update default optimizations for size.
11397 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11399 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11400 * config/arc/constraints.md (CfZ): New constraint.
11401 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11402 (subsf3_fpu): Likewise.
11403 (cmpsf_fpu): Likewise.
11404 (cmpsf_fpu_uneq): Likewise.
11406 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11408 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11410 (arc_is_uncached_mem_p): uncached applies to both the variable and
11413 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11415 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11418 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11420 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11421 field "m_scopes" from vec to auto_vec.
11423 2018-07-25 Martin Liska <mliska@suse.cz>
11425 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11428 2018-07-25 Richard Biener <rguenther@suse.de>
11431 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11432 special wrt context_die late.
11433 (gen_subprogram_die): Re-use DIEs in local scope.
11435 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11437 PR tree-optimization/86644
11438 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11440 2018-07-25 Martin Liska <mliska@suse.cz>
11442 PR middle-end/86645
11443 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11444 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11446 2018-07-25 Martin Liska <mliska@suse.cz>
11449 * params.def: Explain ASan abbreviation and provide
11450 a documentation link.
11452 2018-07-24 Martin Sebor <msebor@redhat.com>
11454 PR tree-optimization/86622
11455 PR tree-optimization/86532
11456 * builtins.h (string_length): Declare.
11457 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11458 (check_access): Be prepared for non-constant length ranges.
11459 (string_length): Make extern.
11460 * expr.c (string_constant): Only handle the minor non-constant
11461 array index. Use string_constant to compute the length of
11462 a generic string constant.
11464 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11466 PR tree-optimization/86618
11467 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11468 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11470 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11472 PR tree-optimization/86636
11473 * json.cc (json::object::set): Fix comment. Add assertions.
11474 (json::array::append): Move here from json.h. Add comment and an
11476 (json::string::string): Likewise.
11477 * json.h (json::array::append): Move to json.cc.
11478 (json::string::string): Likewise.
11479 * optinfo-emit-json.cc
11480 (optrecord_json_writer::impl_location_to_json): Assert that we
11481 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11482 wrapper around it. Expand the location once, rather than three
11484 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11485 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11487 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11488 places. Fix some overlong lines.
11490 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11492 * config/aarch64/aarch64-simd.md
11493 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11494 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11495 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11496 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11497 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11498 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11499 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11500 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11501 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11503 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11505 PR middle-end/86627
11506 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11507 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11508 and abs_d == d, do the power of two handling if profitable.
11510 2018-07-24 Richard Biener <rguenther@suse.de>
11512 * match.pd: Add BIT_FIELD_REF canonicalizations.
11514 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11517 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11519 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11521 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11522 terminated STRING_CST object.
11524 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11526 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11528 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11530 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11531 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11532 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11533 the elements into a register.
11534 (rs6000_split_v4si_init_di_reg): Delete.
11535 (rs6000_split_v4si_init): Delete.
11536 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11537 (vsx_init_v4si): Rewrite as a define_expand.
11539 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11541 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11542 zero_extend argument from memory): New.
11544 2018-07-22 Martin Sebor <msebor@redhat.com>
11547 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11548 diagnosing calls with unknown arguments unless -Walloca-larger-than
11549 is restricted to less than PTRDIFF_MAX bytes.
11551 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
11553 * doc/gcov.texi (Invoking Gcov): Editorial changes.
11555 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11557 * pretty-print.c (text_info::set_location): Remove redundant
11558 "line_table" parameter from call to rich_location::set_range.
11560 2018-07-20 Martin Sebor <msebor@redhat.com>
11562 PR middle-end/82063
11563 * builtins.c (expand_builtin_alloca): Adjust.
11564 * calls.c (alloc_max_size): Simplify.
11565 * cgraphunit.c (cgraph_node::expand): Adjust.
11566 * common.opt (larger_than_size, warn_frame_larger_than): Remove
11568 (frame_larger_than_size): Same.
11569 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11570 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11572 * doc/invoke.texi (GCC Command Options): Document option arguments.
11573 Explain byte-size arguments and suffixes.
11574 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11575 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11576 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11577 * doc/options.texi (UInteger): Expand.
11578 (Host_Wide_Int, ByteSize): Document new properties.
11579 * final.c (final_start_function_1): Include sizes in an error message.
11580 * function.c (frame_offset_overflow): Same.
11581 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11582 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11583 Diagnose unbounded alloca calls only for limits of less than
11585 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
11586 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
11588 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
11589 only for limits of less than PTRDIFF_MAX.
11590 * langhooks-def.h (lhd_handle_option): Change function argument
11592 * langhooks.c (lhd_handle_option): Same.
11593 * langhooks.h (handle_option): Same.
11594 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11596 (var_type, var_type_struct): Same.
11597 (var_set): Handle ByteSize flag.
11598 * optc-gen.awk: Add comments to output to ease debugging. Make
11599 use of HOST_WIDE_INT where appropriate.
11600 * opts-gen-save.awk: Use %lx to format unsigned long.
11601 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11602 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11603 arguments. Parse bytes-size suffixes.
11604 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11605 (enum_value_to_arg): Same.
11606 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
11607 (handle_option): Adjust.
11608 (generate_option): Change function argument to HOST_WIDE_INT.
11609 (cmdline_handle_error): Adjust.
11610 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11611 (set_option): Change function argument to HOST_WIDE_INT.
11612 (option_enabled): Handle cl_host_wide_int.
11613 (get_option_state): Handle CLVC_SIZE.
11614 (control_warning_option): Same.
11615 * opts.c (common_handle_option): Change function argument to
11616 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11617 OPT_Wvla_larger_than_.
11618 * opts.h (enum cl_var_type): Add an enumerator.
11619 * stor-layout.c (layout_decl): Print a more meaningful warning.
11620 * toplev.c (output_stack_usage): Adjust.
11622 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11624 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11625 call to inline_expand_builtin_string_cmp.
11626 (expand_builtin_strcmp): Likewise.
11627 (expand_builtin_strncmp): Likewise.
11628 (inline_string_cmp): Delete the last parameter, change char_type_node
11629 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11631 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11632 the inlining expansion on target where the type of the call has same or
11633 narrower precision than unsigned char.
11635 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11637 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11638 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11639 * common.opt (fsave-optimization-record): New option.
11640 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11641 * doc/invoke.texi (-fsave-optimization-record): New option.
11642 * dumpfile.c: Include "optinfo-emit-json.h".
11643 (struct kv_pair): Move to coretypes.h.
11644 (optgroup_options): Make non-static.
11645 (dump_context::end_scope): Call
11646 optimization_records_maybe_pop_dump_scope.
11647 * dumpfile.h (optgroup_options): New decl.
11648 * json.cc: New file.
11649 * json.h: New file.
11650 * optinfo-emit-json.cc: New file.
11651 * optinfo-emit-json.h: New file.
11652 * optinfo.cc: Include "optinfo-emit-json.h".
11653 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11654 (optinfo_enabled_p): Check optimization_records_enabled_p.
11655 (optinfo_wants_inlining_info_p): Likewise.
11656 * optinfo.h: Update comment.
11657 * profile-count.c (profile_quality_as_string): New function.
11658 * profile-count.h (profile_quality_as_string): New decl.
11659 (profile_count::quality): New accessor.
11660 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11661 and optinfo_emit_json_cc_tests.
11662 * selftest.h (selftest::json_cc_tests): New decl.
11663 (selftest::optinfo_emit_json_cc_tests): New decl.
11664 * toplev.c: Include "optinfo-emit-json.h".
11665 (compile_file): Call optimization_records_finish.
11666 (do_compile): Call optimization_records_start.
11667 * tree-ssa-live.c: Include optinfo.h.
11668 (remove_unused_scope_block_p): Retain inlining information if
11669 optinfo_wants_inlining_info_p returns true.
11671 2018-07-20 Richard Biener <rguenther@suse.de>
11674 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11675 to cover -flto-partition=none.
11677 2018-07-20 Martin Liska <mliska@suse.cz>
11679 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11680 (get_decl_source_range): Remove unused function.
11682 2018-07-20 Richard Biener <rguenther@suse.de>
11684 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11685 (struct vn_phi_s): Likewise.
11686 (struct vn_reference_s): Likewise.
11687 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11688 for searching the slot of an entry known to be in the hash itself.
11689 (vn_phi_hasher::equal): Likewise.
11690 (vn_reference_hasher::equal): Likewise.
11691 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11693 (optimistic_info, current_info): Remove, keeping only valid_info.
11694 (vn_reference_lookup_1): Remove fallback lookup.
11695 (vn_reference_lookup_2): Likewise.
11696 (vn_nary_op_lookup_1): Likewise.
11697 (vn_phi_lookup): Likewise.
11698 (vn_nary_build_or_lookup_1): Make sure to not chain the built
11700 (vn_reference_insert): Adjust, chain the inserted hash element
11701 at last_inserted_ref.
11702 (vn_reference_insert_pieces): Likewise.
11703 (visit_reference_op_call): Likewise.
11704 (vn_nary_op_insert_into): Chain the inserted hash element at
11705 last_inserted_nary.
11706 (vn_nary_op_insert_pieces): Adjust.
11707 (vn_nary_op_insert): Likewise.
11708 (vn_nary_op_insert_stmt): Likewise.
11709 (vn_phi_insert): Adjust, chain the inserted hash element at
11711 (process_scc): Remove clearing and copying the optimistic
11712 table. Instead remove elements inserted during an optimistic
11713 iteration from the single table we maintain.
11714 (init_scc_vn): Adjust.
11715 (free_scc_vn): Likewise.
11716 (sccvn_dom_walker::record_cond): Likewise.
11717 (sccvn_dom_walker::after_dom_children): Likewise.
11719 2018-07-19 Martin Sebor <msebor@redhat.com>
11721 PR tree-optimization/84047
11722 PR tree-optimization/83776
11723 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11724 (check_array_bounds): Call it.
11726 2018-07-19 Martin Sebor <msebor@redhat.com>
11728 * align.h (align_flags): Use member initialization.
11730 2018-07-19 David Malcolm <dmalcolm@redhat.com>
11732 * Makefile.in (OBJS): Add optinfo.o.
11733 * coretypes.h (class symtab_node): New forward decl.
11734 (struct cgraph_node): New forward decl.
11735 (class varpool_node): New forward decl.
11736 * dump-context.h: New file.
11737 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11739 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11740 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11741 (set_alt_dump_file): Likewise.
11742 (dump_context::~dump_context): New dtor.
11743 (dump_gimple_stmt): Move implementation to...
11744 (dump_context::dump_gimple_stmt): ...this new member function.
11745 Add the stmt to any pending optinfo, creating one if need be.
11746 (dump_gimple_stmt_loc): Move implementation to...
11747 (dump_context::dump_gimple_stmt_loc): ...this new member function.
11748 Start a new optinfo and add the stmt to it.
11749 (dump_gimple_expr): Move implementation to...
11750 (dump_context::dump_gimple_expr): ...this new member function.
11751 Add the stmt to any pending optinfo, creating one if need be.
11752 (dump_gimple_expr_loc): Move implementation to...
11753 (dump_context::dump_gimple_expr_loc): ...this new member function.
11754 Start a new optinfo and add the stmt to it.
11755 (dump_generic_expr): Move implementation to...
11756 (dump_context::dump_generic_expr): ...this new member function.
11757 Add the tree to any pending optinfo, creating one if need be.
11758 (dump_generic_expr_loc): Move implementation to...
11759 (dump_context::dump_generic_expr_loc): ...this new member
11760 function. Add the tree to any pending optinfo, creating one if
11762 (dump_printf): Move implementation to...
11763 (dump_context::dump_printf_va): ...this new member function. Add
11764 the text to any pending optinfo, creating one if need be.
11765 (dump_printf_loc): Move implementation to...
11766 (dump_context::dump_printf_loc_va): ...this new member function.
11767 Start a new optinfo and add the stmt to it.
11768 (dump_dec): Move implementation to...
11769 (dump_context::dump_dec): ...this new member function. Add the
11770 value to any pending optinfo, creating one if need be.
11771 (dump_context::dump_symtab_node): New member function.
11772 (dump_context::get_scope_depth): New member function.
11773 (dump_context::begin_scope): New member function.
11774 (dump_context::end_scope): New member function.
11775 (dump_context::ensure_pending_optinfo): New member function.
11776 (dump_context::begin_next_optinfo): New member function.
11777 (dump_context::end_any_optinfo): New member function.
11778 (dump_context::s_current): New global.
11779 (dump_context::s_default): New global.
11780 (dump_scope_depth): Delete global.
11781 (dumpfile_ensure_any_optinfo_are_flushed): New function.
11782 (dump_symtab_node): New function.
11783 (get_dump_scope_depth): Reimplement in terms of dump_context.
11784 (dump_begin_scope): Likewise.
11785 (dump_end_scope): Likewise.
11786 (selftest::temp_dump_context::temp_dump_context): New ctor.
11787 (selftest::temp_dump_context::~temp_dump_context): New dtor.
11788 (selftest::verify_item): New function.
11789 (ASSERT_IS_TEXT): New macro.
11790 (ASSERT_IS_TREE): New macro.
11791 (ASSERT_IS_GIMPLE): New macro.
11792 (selftest::test_capture_of_dump_calls): New test.
11793 (selftest::dumpfile_c_tests): Call it.
11794 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11795 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11796 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11797 descriptive comment.
11798 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11799 (dump_node, dump_bb): Move these unrelated decls.
11800 (class dump_manager): Add leading comment.
11801 * optinfo.cc: New file.
11802 * optinfo.h: New file.
11804 2018-07-19 Michael Collison <michael.collison@arm.com>
11805 Richard Henderson <rth@redhat.com>
11807 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11808 (subti): Handle op1 zero.
11809 (subvti4, usub4ti4): New.
11810 (*sub<GPI>3_compare1_imm): New.
11811 (sub<GPI>3_carryinCV): New.
11812 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11813 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11815 2018-07-19 Michael Collison <michael.collison@arm.com>
11816 Richard Henderson <rth@redhat.com>
11818 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11819 (addti3): Create simpler code if low part is already known to be 0.
11820 (addvti4, uaddvti4): New.
11821 (*add<GPI>3_compareC_cconly_imm): New.
11822 (*add<GPI>3_compareC_cconly): New.
11823 (*add<GPI>3_compareC_imm): New.
11824 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11825 handle constants within this pattern..
11826 (*add<GPI>3_compareV_cconly_imm): New.
11827 (*add<GPI>3_compareV_cconly): New.
11828 (*add<GPI>3_compareV_imm): New.
11829 (add<GPI>3_compareV): New.
11830 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11831 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11832 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11833 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11834 with 'comparison' operator.
11835 (*add<GPI>3_compareV_cconly_imm): Ditto.
11836 (*add<GPI>3_compareV_cconly): Ditto.
11837 (*add<GPI>3_compareV_imm): Ditto.
11838 (add<GPI>3_compareV): Ditto.
11839 (add<mode>3_carryinC): Ditto.
11840 (*add<mode>3_carryinC_zero): Ditto.
11841 (*add<mode>3_carryinC): Ditto.
11842 (add<mode>3_carryinV): Ditto.
11843 (*add<mode>3_carryinV_zero): Ditto.
11844 (*add<mode>3_carryinV): Ditto.
11846 2018-07-19 Michael Collison <michael.collison@arm.com>
11847 Richard Henderson <rth@redhat.com>
11849 * config/aarch64/aarch64-modes.def (CC_V): New.
11850 * config/aarch64/aarch64-protos.h
11851 (aarch64_addti_scratch_regs): Declare
11852 (aarch64_subvti_scratch_regs): Declare.
11853 (aarch64_expand_subvti): Declare.
11854 (aarch64_gen_unlikely_cbranch): Declare
11855 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11856 for signed overflow using CC_Vmode.
11857 (aarch64_get_condition_code_1): Handle CC_Vmode.
11858 (aarch64_gen_unlikely_cbranch): New function.
11859 (aarch64_addti_scratch_regs): New function.
11860 (aarch64_subvti_scratch_regs): New function.
11861 (aarch64_expand_subvti): New function.
11863 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11865 * config/aarch64/aarch64-option-extensions.def: New entry for profile
11867 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11868 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11871 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11874 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11875 address check not strict.
11877 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11879 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11881 (store_pair_lanes<mode>): Likewise.
11882 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11883 enum value 'ADDR_QUERY_LDP_STP_N'.
11884 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11885 (aarch64_print_address_internal): Add declaration.
11886 (aarch64_print_ldpstp_address): Remove.
11887 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11888 (aarch64_print_operand): Change printing of 'y'.
11889 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11890 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11891 'true' rather than '1'.
11892 * config/aarch64/constraints.md (Uml): Likewise.
11893 (Uml): Rename to Umn.
11896 2018-07-19 Richard Biener <rguenther@suse.de>
11898 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11900 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11901 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11902 (vn_reference_hasher): Likewise.
11903 (struct vn_tables_s): Remove obstack and alloc-pool members.
11904 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11905 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11906 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11907 (vn_reference_insert_pieces): Likewise.
11908 (alloc_vn_nary_op_noinit): Adjust.
11909 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11910 (vn_phi_eq): Adjust.
11911 (shared_lookup_phiargs): Remove.
11912 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11913 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11914 (visit_reference_op_call): Likewise.
11915 (copy_nary, copy_phi, copy_reference): Remove.
11916 (process_scc): Rewind the obstack when iterating. Do not
11917 copy the elements to valid_info but just move them from one
11918 hashtable to the other.
11919 (allocate_vn_table): Adjust.
11920 (free_vn_table): Likewise.
11921 (init_scc_vn): Likewise.
11922 (free_scc_vn): Likewise.
11924 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
11927 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11928 indirect_return as function type attribute.
11929 (ix86_attribute_table): Change indirect_return to function
11931 * doc/extend.texi: Update indirect_return attribute.
11933 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
11935 * wide-int.h (widest2_int): New.
11936 * gimple-fold.c (arith_overflowed_p): Use it.
11937 * tree.h (widest2_int_cst): New.
11938 * tree-vrp.c (wide_int_binop_overflow): Rename from
11939 vrp_int_const_binop.
11940 Rewrite to work on trees.
11941 (extract_range_from_multiplicative_op_1): Abstract code to...
11942 (wide_int_range_min_max): ...here.
11943 (wide_int_range_cross_product): ...and here.
11944 (extract_range_from_binary_expr_1): Abstract overflow code to...
11945 (wide_int_range_mult_wrapping): ...here.
11946 * tree-vrp.h (wide_int_range_cross_product): New.
11947 (wide_int_range_mult_wrapping): New.
11949 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
11950 Julia Koval <julia.koval@intel.com>
11952 * config/i386/x86-tune-costs.h (skylake_memcpy,
11953 skylake_memset): Replace rep_prefix with unrolling for size 512.
11955 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
11957 PR middle-end/86544
11958 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11959 comparision with EQ_EXPR in last stmt.
11961 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
11963 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11964 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11965 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11966 previously known as "PowerPC AltiVec Built-in Functions". Move
11967 some material to new subsubsections "PowerPC AltiVec Built-in
11968 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11970 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11971 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11972 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11973 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11975 2018-07-18 Richard Biener <rguenther@suse.de>
11977 PR tree-optimization/86557
11978 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11981 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
11983 * config/s390/s390.c (s390_function_profiler): Generate CFI.
11985 2018-07-17 Jeff Law <law@redhat.com>
11987 * config/arm/arm.c (get_label_padding): Update for recent
11988 changes to label_to_alignment.
11990 PR tree-optimization/86010
11991 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11993 * config/mips/mips.c (vr4130_align_insns): Update for recent
11994 changes to label_to_alignment.
11996 * config/frv/frv.c (frv_label_align): Update for recent changes
11997 to label_to_alignment.
11999 * config/nios2/nios2.c (nios2_label_align): Update for recent
12000 changes which dropped ALIGN_LABELS_LOG.
12002 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12004 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12005 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12007 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12009 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12010 deprecated align_labels_log.
12012 2018-07-17 Richard Biener <rguenther@suse.de>
12015 * dwarf2out.c (init_sections_and_labels): Always generate
12016 a debug_line_str_section for early LTO debug.
12017 (dwarf2out_finish): Reset debug_line_str_hash output early.
12018 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12020 (dwarf2out_early_finish): Output debug_line_str.
12022 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12024 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12025 index register on z196 or later.
12027 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12029 * config/s390/s390.c (s390_default_align): Set default function
12031 (s390_override_options_after_change): Call s390_default align.
12032 (s390_option_override_internal): Call s390_default_align.
12033 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12035 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12037 PR middle-end/86542
12038 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12039 to _looptemp_ clauses, other than the first two.
12041 2018-07-17 Martin Liska <mliska@suse.cz>
12043 * opts.c: Do not enable OPT_falign_* for -Os.
12045 2018-07-17 Martin Liska <mliska@suse.cz>
12047 * align.h (MAX_CODE_ALIGN): New.
12048 (MAX_CODE_ALIGN_VALUE): New.
12049 * common/config/i386/i386-common.c (ix86_handle_option):
12050 (MAX_CODE_ALIGN): Moved to align.h.
12051 * final.c (MAX_CODE_ALIGN): Likewise.
12052 * opts.c (parse_and_check_align_values):
12053 (MAX_CODE_ALIGN): Likewise.
12054 (MAX_CODE_ALIGN_VALUE): Likewise.
12056 2018-07-17 Martin Liska <mliska@suse.cz>
12058 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12059 in order to fulfil coding style.
12060 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12061 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12062 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12063 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12064 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12065 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12066 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12067 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12068 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12070 2018-07-17 Martin Liska <mliska@suse.cz>
12072 * align.h: New file.
12073 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12075 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12076 align_flags of label_to_alignment.
12077 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12079 * config/m68k/m68k.c: Do not use removed align_labels_value and
12081 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12082 (LOOP_ALIGN): Likewise.
12083 (LABEL_ALIGN): Likewise.
12084 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12085 Remove not used macro.
12086 (rs6000_loop_align): Change return type to align_flags.
12087 (rs6000_loop_align_max_skip): Remove.
12088 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12089 Change return type to align_flags.
12090 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12091 Remove not used macro.
12092 (rs6000_loop_align): Change return type to align_flags.
12093 (rs6000_loop_align_max_skip): Remove.
12094 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12095 * config/rx/rx-protos.h (rx_align_for_label): Make it
12097 * config/rx/rx.c (rx_align_for_label): Change return type
12099 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12101 into align_flags class.
12102 (LABEL_ALIGN): Likewise.
12103 (LOOP_ALIGN): Likewise.
12104 * config/s390/s390.c (s390_label_align): Use align_flags
12106 (s390_asm_output_function_label): Likewise.
12107 * config/sh/sh.c (sh_override_options_after_change):
12108 Use align_flags class directly without macros.
12109 (find_barrier): Likewise.
12110 (barrier_align): Likewise.
12111 (sh_loop_align): Likewise.
12112 * config/spu/spu.c (spu_option_override):
12113 Use align_flags_tuple::get_value instead of removed macros.
12114 (spu_sched_init): Likewise.
12115 * config/spu/spu.h (GTY): Likewise.
12116 * config/visium/visium.c (visium_option_override):
12117 Set "8" as default secondary alignment.
12118 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12119 in order to guarantee secondary alignment of 8.
12120 * coretypes.h: Include align.h header file.
12121 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12122 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12123 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12124 * doc/tm.texi.in: Likewise.
12125 * final.c (struct label_alignment): Remove not used structure.
12126 (LABEL_ALIGN): Change type to align_flags.
12127 (LOOP_ALIGN): Likewise.
12128 (JUMP_ALIGN): Likewise.
12129 (default_loop_align_max_skip): Remove.
12130 (default_label_align_max_skip): Likewise.
12131 (default_jump_align_max_skip): Likewise.
12132 (default_label_align_after_barrier_max_skip):
12133 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12134 (LABEL_TO_MAX_SKIP): Remove.
12135 (label_to_alignment): Return align_flags type instead of integer.
12136 (label_to_max_skip): Remove.
12137 (align_fuzz): Use align_flags type.
12138 (compute_alignments): Use align_flags type and use align_flags::max
12139 to combine multiple alignments.
12140 (grow_label_align): Grow vec instead of C array.
12141 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12142 (shorten_branches): Use align_flags type and use align_flags::max
12143 to combine multiple alignments.
12144 (final_scan_insn_1): Remove usage of secondary alignment that comes
12145 from label alignment, but instead use proper secondary alignment
12146 which is computed in grow_label_align.
12147 * flags.h (struct align_flags_tuple): Move to align.h.
12148 (struct align_flags): Likewise.
12149 (state_align_loops): Rename to align_loops.
12150 (state_align_jumps): Rename to align_jumps.
12151 (state_align_labels): Rename to align_labels.
12152 (state_align_functions): Rename to align_functions.
12153 (align_loops_log): Remove.
12154 (align_jumps_log): Remove.
12155 (align_labels_log): Remove.
12156 (align_functions_log): Remove.
12157 (align_loops_max_skip): Remove.
12158 (align_jumps_max_skip): Remove.
12159 (align_labels_max_skip): Remove.
12160 (align_functions_max_skip): Remove.
12161 (align_loops_value): Remove.
12162 (align_jumps_value): Remove.
12163 (align_labels_value): Remove.
12164 (align_functions_value): Remove.
12165 * output.h (label_to_alignment): Change return type to align_flags.
12166 (label_to_max_skip): Remove.
12167 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12168 jump_align_max_skip macros.
12169 * targhooks.h (default_loop_align_max_skip): Remove.
12170 (default_label_align_max_skip): Likewise.
12171 (default_jump_align_max_skip): Likewise.
12172 (default_label_align_after_barrier_max_skip): Remove.
12173 * toplev.c (read_log_maxskip): Use ::normalize function.
12174 (parse_N_M): Remove not used argument and also call ::normalize.
12175 (parse_alignment_opts): Do not pass unused arguments.
12176 * varasm.c (assemble_start_function): Use directly align_functions
12177 instead of removed macros.
12178 * system.h: Do not poison removed macros.
12180 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12182 PR middle-end/86539
12183 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12184 and cond temporaries don't have reference type if iterator has
12185 pointer type. For init use &for_pre_body instead of pre_p if
12186 for_pre_body is non-empty.
12188 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12190 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12191 double-double modes to SFmode directly directly.
12192 (trunc<mode>sf2_fprs): Delete.
12194 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12196 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12197 for conversions between IFmode and the decimal floating point modes.
12198 (init_float128_ieee): Use the correct names for conversions between
12199 KFmode and the decimal floating point modes.
12201 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12203 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12204 for the conversions between TDmode and IFmode.
12205 (init_float128_ieee): Use more correct names for the conversions
12206 between TDmode and KFmode.
12208 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12210 PR tree-optimization/86526
12211 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12212 (inline_expand_builtin_string_cmp): Likewise.
12213 (inline_string_cmp): Likewise. Use c_readstr instead of
12214 builtin_memcpy_read_str. Add unit_mode temporary.
12216 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12218 PR middle-end/86528
12219 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12220 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12222 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12224 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12225 Alphabetize prototypes of built-in functions, separating out
12226 built-in functions that are listed in this section but should be
12227 described elsewhere.
12229 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12232 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12233 conditional move when trapping comparison was split to a
12234 non-trapping one (and vice versa).
12236 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12238 * config/s390/s390.c (s390_function_profiler): Generate nops
12239 instead of profiler call sequences.
12240 * config/s390/s390.opt: Add the new option.
12242 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12244 * config/s390/s390.c (s390_function_profiler): Generate
12245 __mcount_loc section.
12246 * config/s390/s390.opt: Add the new option.
12248 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12250 * common.opt: Add the new warning.
12251 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12252 %r0,__fentry__" when -mfentry is specified.
12253 (s390_option_override_internal): Disallow -mfentry for 31-bit
12255 * config/s390/s390.opt: Add the new option.
12257 2018-07-16 Richard Biener <rguenther@suse.de>
12260 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12261 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12263 2018-07-16 Martin Liska <mliska@suse.cz>
12266 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12269 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12271 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12273 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12275 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12277 * config/arc/arc-cpus.def (hs4x): New cpu.
12279 * config/arc/arc-tables.opt: Regenerate.
12280 * config/arc/arc.c (arc_sched_issue_rate): New function.
12281 (TARGET_SCHED_ISSUE_RATE): Define.
12282 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12283 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12285 (attr tune): Add ARCHS4x tune values.
12286 (attr tune_dspmpy): Define.
12287 (*tst): Correct instruction type.
12288 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12289 * config/arc/arcHS4x.md: New file.
12290 * config/arc/fpu.md: Update instruction type attributes.
12291 * config/arc/t-multilib: Regenerate.
12293 2018-07-16 Tom de Vries <tdevries@suse.de>
12296 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12298 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12300 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12303 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12305 PR tree-optimization/86514
12306 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12307 conversion to a boolean type from a type with greater precision.
12309 2018-07-16 Tom de Vries <tdevries@suse.de>
12311 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12312 dump_flags request TDF_SLIM.
12314 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12316 * fold-const.c (int_const_binop_1): Abstract...
12317 (wide_int_binop): ...wide int code here.
12318 (poly_int_binop): ...poly int code here.
12319 Abstract the rest of int_const_binop_1 into int_const_binop.
12320 * fold-const.h (wide_int_binop): New.
12321 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12322 Remove useless PLUS/MINUS_EXPR case.
12323 (zero_nonzero_bits_from_vr): Move wide int code...
12324 (zero_nonzero_bits_from_bounds): ...here.
12325 (extract_range_from_binary_expr_1): Move mask optimization code...
12326 (range_easy_mask_min_max): ...here.
12327 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12328 (range_easy_mask_min_max): New.
12330 2018-07-15 Jeff Law <law@redhat.com>
12333 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12336 2018-07-14 Jim Wilson <jimw@sifive.com>
12338 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12340 2018-07-14 Paul Koning <ni1d@arrl.net>
12342 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12344 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12346 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12349 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12350 Steve Munroe <munroesj52@gmail.com>
12352 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12353 (_mm_andnot_si128): Likewise.
12354 (_mm_or_si128): Likewise.
12355 (_mm_xor_si128): Likewise.
12357 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12359 PR middle-end/78809
12360 * builtins.c (expand_builtin_memcmp): Inline the calls first
12361 when result_eq is false.
12362 (expand_builtin_strcmp): Inline the calls first.
12363 (expand_builtin_strncmp): Likewise.
12364 (inline_string_cmp): New routine. Expand a string compare
12365 call by using a sequence of char comparison.
12366 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12367 a call to str(n)cmp/memcmp.
12368 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12370 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12372 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12374 * config/arm/driver-arm.c: Include arm-native.h.
12375 (host_detect_local_cpu): Use auto-generated data tables.
12376 (vendors, arm_cpu_table): Delete. Move part information to ...
12377 * config/arm/arm-cpus.in: ... here.
12378 * config/arm/parsecpu.awk (gen_native): New function.
12379 (vendor, part): New CPU fields.
12380 (END): Add support for building the native CPU detection tables.
12381 * config/arm/t-arm (arm-native.h): Add build rule.
12382 (driver-arm.o): Add dependency on arm-native.h.
12384 2018-07-13 Richard Biener <rguenther@suse.de>
12386 PR middle-end/85974
12387 * match.pd (addr1 - addr2): Allow either of the operand to
12390 2018-07-13 Tom de Vries <tdevries@suse.de>
12392 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12395 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12397 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12398 arrays instead of numbered variables.
12400 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12402 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12403 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12405 2018-07-13 Richard Biener <rguenther@suse.de>
12408 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12409 instead of get_context_die.
12411 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12412 Richard Biener <rguenther@suse.de>
12414 PR middle-end/86489
12415 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12416 that the loop latch destination where phi is defined.
12418 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12420 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12421 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12422 (riscv_set_current_function): Extract getting interrupt type to new
12424 (riscv_get_interrupt_type): New function.
12425 (riscv_merge_decl_attributes): New function, checking interrupt type is
12427 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12429 2018-07-12 Paul Koning <ni1d@arrl.net>
12431 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12434 2018-07-12 Paul Koning <ni1d@arrl.net>
12436 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12437 zero reference, add doloop_end instead.
12438 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12439 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12440 detail for doloop_end.
12442 2018-07-12 Martin Sebor <msebor@redhat.com>
12445 * attribs.c (decl_attributes): Reject conflicting attributes before
12446 calling attribute handlers.
12448 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12450 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12452 (gcc::dump_manager::get_dump_file_name): likewise.
12453 (dump_begin): Likewise.
12454 * dumpfile.h (dump_begin): Update prototype.
12455 (gcc::dump_manager::get_dump_file_name,
12456 gcc::dump_manager::get_dump_file_name): Update prototype.
12458 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12460 * internal-fn.h (vectorizable_internal_fn_p): New function.
12461 * tree-vect-slp.c (compatible_calls_p): Likewise.
12462 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12463 to internal functions.
12464 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12466 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12468 * fold-const.h (inverse_conditions_p): Declare.
12469 * fold-const.c (inverse_conditions_p): New function.
12470 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12471 that test the inverse condition of a conditional internal function.
12472 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12473 * internal-fn.c (internal_fn_mask_index): Handle conditional
12474 internal functions.
12475 (vectorized_internal_fn_supported_p): New function.
12476 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12477 (any_pred_load_store): Replace with...
12478 (need_to_predicate): ...this new variable.
12479 (redundant_ssa_names): New variable.
12480 (ifcvt_can_use_mask_load_store): Move initial checks to...
12481 (ifcvt_can_predicate): ...this new function. Handle tree codes
12482 for which a conditional internal function exists.
12483 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12484 instead of ifcvt_can_use_mask_load_store. Update after variable
12486 (predicate_load_or_store): New function, split out from
12487 predicate_mem_writes.
12488 (check_redundant_cond_expr): New function.
12489 (value_available_p): Likewise.
12490 (predicate_rhs_code): Likewise.
12491 (predicate_mem_writes): Rename to...
12492 (predicate_statements): ...this. Use predicate_load_or_store
12493 and predicate_rhs_code.
12494 (combine_blocks, tree_if_conversion): Update after above name changes.
12495 (ifcvt_local_dce): Handle redundant_ssa_names.
12496 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12497 general conditional functions.
12498 * tree-vect-stmts.c (vectorizable_call): Likewise.
12500 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12501 Alan Hayward <alan.hayward@arm.com>
12502 David Sherwood <david.sherwood@arm.com>
12504 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12505 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12506 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12507 plus and minus and convert them into IFN_COND_FMA-based sequences.
12508 (convert_mult_to_fma): Handle conditional plus and minus.
12510 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12512 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12513 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12514 (cond_fnms_optab): New optabs.
12515 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12516 internal functions.
12517 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12518 * internal-fn.h (get_conditional_internal_fn): Declare.
12519 (get_unconditional_internal_fn): Likewise.
12520 * internal-fn.c (cond_ternary_direct): New macro.
12521 (expand_cond_ternary_optab_fn): Likewise.
12522 (direct_cond_ternary_optab_supported_p): Likewise.
12523 (FOR_EACH_COND_FN_PAIR): Likewise.
12524 (get_conditional_internal_fn): New function.
12525 (get_unconditional_internal_fn): Likewise.
12526 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12527 (gimple_match_op::gimple_match_op): Add a new overload for 5
12529 (gimple_match_op::set_op): Likewise.
12530 (gimple_resimplify5): Declare.
12531 * genmatch.c (decision_tree::gen): Generate simplifications for
12533 * gimple-match-head.c (gimple_simplify): Define an overload for
12534 5 operands. Handle calls with 5 arguments in the top-level overload.
12535 (convert_conditional_op): Handle conversions from unconditional
12536 internal functions to conditional ones.
12537 (gimple_resimplify5): New function.
12538 (build_call_internal): Pass a fifth operand.
12539 (maybe_push_res_to_seq): Likewise.
12540 (try_conditional_simplification): Try converting conditional
12541 internal functions to unconditional internal functions.
12542 Handle 3-operand unconditional forms.
12543 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12544 Define ternary equivalents of the current rules for binary conditional
12545 internal functions.
12546 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12547 ternary operations.
12548 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12549 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12550 (optab): Handle them.
12551 (SVE_COND_FP_TERNARY): New int iterator.
12552 (sve_fmla_op, sve_fmad_op): New int attributes.
12553 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12554 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12555 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12557 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12559 * target.def (preferred_else_value): New target hook.
12560 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12561 * doc/tm.texi: Regenerate.
12562 * targhooks.h (default_preferred_else_value): Declare.
12563 * targhooks.c (default_preferred_else_value): New function.
12564 * internal-fn.h (conditional_internal_fn_code): Declare.
12565 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12566 (get_conditional_internal_fn): Use it.
12567 (conditional_internal_fn_code): New function.
12568 * gimple-match.h (gimple_match_cond): New struct.
12569 (gimple_match_op): Add a cond member function.
12570 (gimple_match_op::gimple_match_op): Update all forms to take a
12572 * genmatch.c (expr::gen_transform): Use the same condition as res_op
12573 for the suboperation, but don't specify a particular else_value.
12574 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12575 (visit_nary_op, visit_reference_op_load): Pass
12576 gimple_match_cond::UNCOND to the gimple_match_op constructor.
12577 * gimple-match-head.c: Include tree-eh.h
12578 (convert_conditional_op): New function.
12579 (maybe_resimplify_conditional_op): Likewise.
12580 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12581 (gimple_resimplify2): Likewise.
12582 (gimple_resimplify3): Likewise.
12583 (gimple_resimplify4): Likewise.
12584 (maybe_push_res_to_seq): Return null for conditional operations.
12585 (try_conditional_simplification): New function.
12586 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
12588 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12590 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12592 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12594 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12596 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12598 (hash_tree): Do not hash DECL_FCONTEXT
12599 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12600 Do not stream DECL_FCONTEXT.
12601 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12602 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12604 2018-07-12 Richard Biener <rguenther@suse.de>
12607 * dwarf2out.c (gen_block_die): Only output blocks when they have
12608 at least one !DECL_IGNORED_P variable.
12610 2018-07-12 Richard Biener <rguenther@suse.de>
12613 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12614 Remove -mieee-fp handling.
12616 2018-07-12 Richard Biener <rguenther@suse.de>
12618 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12619 left-over from last patch.
12621 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12623 PR tree-optimization/86492
12624 * gimple-ssa-store-merging.c
12625 (imm_store_chain_info::coalesce_immediate_stores): Call
12626 check_no_overlap even for the merge_overlapping case. Formatting fix.
12628 2018-07-12 Richard Biener <rguenther@suse.de>
12630 PR middle-end/86479
12631 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12632 move possibly trapping operations into the conditional.
12634 2018-07-12 Richard Biener <rguenther@suse.de>
12636 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12637 (vn_lookup_simplify_result): Remove recursion limit applied
12639 (vn_nary_build_or_lookup_1): Adjust.
12640 (try_to_simplify): Likewise.
12641 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12643 (gimple_resimplify2): Likewise.
12644 (gimple_resimplify3): Likewise.
12645 (gimple_resimplify4): Likewise.
12647 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12649 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12650 Use __mmask64 type instead of __mmask8 for __M argument.
12651 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12652 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12654 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12655 __mmask16 for __M argument.
12656 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12657 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12658 to __mmask16 instead of __mmask8.
12659 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12660 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12661 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12662 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12663 instead of __mmask16 for __U argument.
12664 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12665 __mmask16 instead of __mmask8 for __U argument.
12666 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12668 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12670 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12672 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12674 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12676 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12678 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12680 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12682 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12684 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12686 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12687 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12688 return type as well as __M argument type and all casts from __mmask8
12690 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12691 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12692 return type as well as __M argument type and all casts from __mmask8
12694 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12695 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12696 return type as well as __M argument type and all casts from __mmask8
12698 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12699 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12700 return type as well as __M argument type and all casts from __mmask8
12702 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12703 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12706 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
12708 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12709 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12712 2018-07-11 Paul Koning <ni1d@arrl.net>
12714 * doc/md.texi (define_subst): Document how multiple occurrences of
12715 the same argument in the replacement pattern are handled.
12717 2018-07-11 Paul Koning <ni1d@arrl.net>
12719 * doc/extend.texi (Common Variable Attributes): Move "mode" into
12720 alphabetical order.
12721 (Common Type Attributes): Add "mode" attribute.
12723 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
12725 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12726 stream DECL_ORIGINAL_TYPE.
12727 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12728 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12729 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12730 Do not walk original type.
12731 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12733 (write_ts_decl_non_common_tree_pointers): Do not stream
12735 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12736 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12738 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12740 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12741 thread twice from the same starting edge.
12743 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12745 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12746 * gimple.c (gimple_call_nonnull_result_p): ...here...
12747 (gimple_call_nonnull_arg): ...and here.
12748 * gimple.h (gimple_call_nonnull_result_p): New.
12749 (gimple_call_nonnull_arg): New.
12751 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
12753 * config/arm/arm-cpus.in: Move information from fpu field of each
12754 cpu definition to the isa field.
12755 * config/arm/parsecpu.awk (fpu): Delete match rule.
12756 (gen_comm_data): Don't add bits from the CPU's FPU entry.
12758 2018-07-11 Richard Biener <rguenther@suse.de>
12761 * dwarf2out.c (init_sections_and_labels): Use
12762 output_asm_line_debug_info consistently.
12763 (dwarf2out_early_finish): Likewise.
12764 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12767 2018-07-11 Richard Biener <rguenther@suse.de>
12769 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12770 Rework father_bb setting in a way to avoid propagating constants
12771 multiple times on a loop body.
12773 2018-07-10 Mark Wielaard <mark@klomp.org>
12776 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12778 2018-07-10 Richard Biener <rguenther@suse.de>
12780 * hash-map.h (hash_map::iterator::operator*): Return
12781 references to key and value.
12783 2018-07-10 Jakub Jelinek <jakub@redhat.com>
12786 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12787 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12788 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12789 (gimplify_omp_for): For composite loops, move outer
12790 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12791 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
12792 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
12793 TREE_LIST for both the original class iterator and the "last" helper
12794 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
12795 loop, remember has_decl_expr from outer composite loops for the
12796 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12798 2018-07-09 Martin Sebor <msebor@redhat.com>
12800 PR middle-end/77357
12801 PR middle-end/86428
12802 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12803 accessing implicitly initialized array elements.
12804 * expr.c (string_constant): Handle string initializers of
12805 character arrays within aggregates.
12806 * gimple-fold.c (fold_array_ctor_reference): Add argument.
12807 Store element offset. As a special case, handle zero size.
12808 (fold_nonarray_ctor_reference): Same.
12809 (fold_ctor_reference): Add argument. Store subobject offset.
12810 * gimple-fold.h (fold_ctor_reference): Add argument.
12812 2018-07-09 Paul Koning <ni1d@arrl.net>
12814 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12815 (pdp11_insn_cost): New function.
12816 (pdp11_md_asm_adjust): New function.
12817 (TARGET_INVALID_WITHIN_DOLOOP): Define.
12818 (pdp11_rtx_costs): Update to match machine better.
12819 (output_addr_const_pdp11): Correct format mismatch warnings.
12820 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12821 * config/pdp11/pdp11.md: General change to add base_cost and/or
12822 length attributes for use by new pdp11_insn_cost function.
12823 (MIN_BRANCH): Correct definition.
12825 (doloop_end): Use standard pattern name for looping pattern.
12826 (doloop_end_nocc): New.
12827 (movsf): Add another constraint alternative.
12828 (zero_extendqihi2): Add constraint alternatives for not in place
12830 (zero_extendhisi2): Remove.
12831 (shift patterns): Add CC handling variants.
12835 (define_peephole2): New peephole to recognize mov that sets CC for
12838 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12840 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12841 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12844 2018-07-09 Jakub Jelinek <jakub@redhat.com>
12847 * real.c (real_nextafter): Return true if result is denormal.
12849 2018-07-09 Martin Liska <mliska@suse.cz>
12851 * common.opt: Add back wrongly removed attribute.
12853 2018-07-09 Richard Biener <rguenther@suse.de>
12856 * dwarf2out.c (gen_block_die): For an early generated DIE
12857 always output high/low PC attributes.
12859 2018-07-09 Tom de Vries <tdevries@suse.de>
12861 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12862 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12863 onto VAR_DECL with abstract origin.
12865 2018-07-07 Jim Wilson <jimw@sifive.com>
12867 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12869 2018-07-07 Tom de Vries <tdevries@suse.de>
12871 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12873 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12875 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12877 (combine_bound): Use wide-int overflow calculation instead of
12879 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12881 * fold-const.c (int_const_binop_2): Same.
12882 (extract_muldiv_1): Same.
12883 (fold_div_compare): Same.
12884 (fold_abs_const): Same.
12886 * poly-int.h (add): Same.
12890 * predict.c (predict_iv_comparison): Same.
12891 * profile-count.c (slow_safe_scale_64bit): Same.
12892 * simplify-rtx.c (simplify_const_binary_operation): Same.
12893 * tree-chrec.c (tree_fold_binomial): Same.
12894 * tree-data-ref.c (split_constant_offset_1): Same.
12895 * tree-if-conv.c (idx_within_array_bound): Same.
12896 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12897 * tree-ssa-phiopt.c (minmax_replacement): Same.
12898 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12899 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12900 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12901 * wide-int.cc (wi::add_large): Same.
12902 (wi::mul_internal): Same.
12903 (wi::sub_large): Same.
12904 (wi::divmod_internal): Same.
12905 * wide-int.h: Change overflow type to overflow_type for neg, add,
12906 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12907 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12908 mul_internal, divmod_internal.
12909 (overflow_type): New enum.
12910 (accumulate_overflow): New.
12912 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12914 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12915 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12917 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12919 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12920 argument is checked for zero before entering loop, avoid checking again.
12922 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12924 * gimplify.h (generic_expr_could_trap_p): Set as global function.
12925 * gimplify.h (generic_expr_could_trap_p): Likwise.
12926 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12928 2018-07-06 Jakub Jelinek <jakub@redhat.com>
12930 PR tree-optimization/86401
12931 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12932 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12933 (fold_bit_and_mask): ... here. New helper function for match.pd.
12934 * fold-const.h (fold_bit_and_mask): Declare.
12935 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12937 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
12940 * target.def (translate_mode_attribute): New hook.
12941 * targhooks.h (default_translate_mode_attribute): Declare.
12942 * targhooks.c (default_translate_mode_attribute): New function.
12943 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12944 * doc/tm.texi: Regenerate.
12945 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12946 (rs6000_translate_mode_attribute): New function.
12948 2018-07-06 Paul Koning <ni1d@arrl.net>
12950 * doc/md.texi (define_split): Document DONE and FAIL.
12951 (define_peephole2): Ditto.
12953 2018-07-05 Jeff Law <law@redhat.com>
12955 PR tree-optimization/86010
12956 * tree-ssa-dse.c (compute_trims): More aggressively trim at
12957 both the head and tail of mem* and str* calls.
12959 2018-07-05 Jim Wilson <jimw@sifive.com>
12961 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12963 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
12965 * config/aarch64/aarch64-simd.md: correct flags text for
12966 MIN_EXPR replacement.
12968 2018-07-05 James Clarke <jrtc27@jrtc27.com>
12970 * configure: Regenerated.
12972 2018-07-05 Carl Love <cel@us.ibm.com>
12974 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12975 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12976 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12977 VSX_BUILTIN_DOUBLEL_V4SF.
12979 2018-07-05 Martin Sebor <msebor@redhat.com>
12982 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12983 than its domain to compute its the upper bound of a char array.
12985 2018-07-05 Nathan Sidwell <nathan@acm.org>
12987 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12988 * doc/cpp.texi: Update comment.
12989 * doc/tm.texi: Rebuilt.
12990 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12991 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12992 * doc/extend.texi (Backwards Compatibility): Clarify it is system
12993 headers affected by extern "C".
12994 * system.h: Poison NO_IMPLICIT_EXTERN_C.
12995 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12996 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12997 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12998 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12999 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13000 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13001 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13002 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13003 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13004 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13005 config/sparc/sp64-elf.h, config/spu/spu.h,
13006 config/stormy16/stormy16.h, config/v850/v850.h,
13007 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13008 define NO_IMPLICIT_EXTERN_C.
13009 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13011 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13014 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13015 instead of GET_MODE_SIZE when comparing Units.
13017 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13020 * rtlanal.c (set_noop_p): Constrain on mode change,
13021 include hard-reg-set.h
13023 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13025 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13027 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13030 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13033 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13035 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13037 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13040 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13042 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13044 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13046 PR middle-end/86380
13047 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13049 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13051 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13052 neg_*_op* variables.
13054 2018-07-04 Martin Liska <mliska@suse.cz>
13056 * tree-switch-conversion.c: Define
13057 max_ratio_for_speed and max_ratio_for_size constants.
13059 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13060 Martin Liska <mliska@suse.cz>
13062 PR middle-end/66240
13065 * common.opt: Rename align options with 'str_' prefix.
13066 * common/config/i386/i386-common.c (set_malign_value): New
13068 (ix86_handle_option): Use it to set -falign-* options/
13069 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13070 type from int to string.
13071 * config/aarch64/aarch64.c: Update default values from int
13073 * config/alpha/alpha.c (alpha_override_options_after_change):
13075 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13076 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13077 max skip conditionally.
13078 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13079 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13080 max skip conditionally.
13081 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13082 max skip conditionally.
13083 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13084 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13085 max skip conditionally.
13086 * config/i386/i386.c (struct ptt): Change type from int to
13088 (ix86_default_align): Set default values.
13089 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13090 max skip conditionally.
13091 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13092 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13093 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13094 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13095 max skip conditionally.
13096 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13097 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13098 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13099 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13100 max skip conditionally.
13101 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13102 * config/ia64/ia64.c (ia64_option_override): Set default values
13103 for alignment options.
13104 * config/m68k/m68k.c: Handle new str_align_* options.
13105 * config/mips/mips.c (mips_set_compression_mode): Change
13107 (mips_option_override): Set default values for options.
13108 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13110 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13112 * config/rx/rx.c (rx_option_override): Likewise.
13113 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13114 (LABEL_ALIGN): Use align_labels_log.
13115 (LOOP_ALIGN): Use align_loops_align.
13116 * config/s390/s390.c (s390_asm_output_function_label): Use new
13118 * config/sh/sh.c (sh_override_options_after_change):
13119 Change type of constants.
13120 * config/spu/spu.c (spu_sched_init): Likewise.
13121 * config/sparc/sparc.c (sparc_option_override): Set default
13122 values for options.
13123 * config/visium/visium.c (visium_option_override): Likewise.
13124 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13125 emit p2align format with last argument if it's not needed.
13126 * doc/invoke.texi: Document extended format of -falign-*.
13127 * final.c: Use align_labels alignment.
13128 * flags.h (struct target_flag_state): Change type to use
13130 (struct align_flags_tuple): New.
13131 (struct align_flags): Likewise.
13132 (align_loops_log): Redefine macro to use new types.
13133 (align_loops_max_skip): Redefine macro to use new types.
13134 (align_jumps_log): Redefine macro to use new types.
13135 (align_jumps_max_skip): Redefine macro to use new types.
13136 (align_labels_log): Redefine macro to use new types.
13137 (align_labels_max_skip): Redefine macro to use new types.
13138 (align_functions_log): Redefine macro to use new types.
13139 (align_loops): Redefine macro to use new types.
13140 (align_jumps): Redefine macro to use new types.
13141 (align_labels): Redefine macro to use new types.
13142 (align_functions): Redefine macro to use new types.
13143 (align_functions_max_skip): Redefine macro to use new types.
13144 (align_loops_value): New macro.
13145 (align_jumps_value): New macro.
13146 (align_labels_value): New macro.
13147 (align_functions_value): New macro.
13148 * function.c (invoke_set_current_function_hook): Propagate
13149 alignment values from flags to global variables default in
13151 * ipa-icf.c (sem_function::equals_wpa): Use
13152 cl_optimization_option_eq instead of memcmp.
13153 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13155 (cl_optimization_stream_in): Likewise.
13156 * optc-save-gen.awk: Support strings in cl_optimization.
13157 * opth-gen.awk: Likewise.
13158 * opts.c (finish_options): Remove error checking of invalid
13160 (MAX_CODE_ALIGN): Remove.
13161 (MAX_CODE_ALIGN_VALUE): Likewise.
13162 (parse_and_check_align_values): New function.
13163 (check_alignment_argument): Likewise.
13164 (common_handle_option): Use check_alignment_argument.
13165 * opts.h (parse_and_check_align_values): Declare.
13166 * toplev.c (init_alignments): Remove.
13167 (read_log_maxskip): New.
13168 (parse_N_M): Likewise.
13169 (parse_alignment_opts): Likewise.
13170 (backend_init_target): Remove usage of init_alignments.
13171 * toplev.h (parse_alignment_opts): Declare.
13172 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13174 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13175 * tree.c (cl_option_hasher::equal): New.
13176 * varasm.c: Use new global macros.
13178 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13180 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13181 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13182 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13183 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13184 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13185 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13186 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13187 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13188 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13189 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13190 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13191 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13192 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13194 2018-07-04 Martin Liska <mliska@suse.cz>
13195 Jonathan Wakely <jwakely@redhat.com>
13197 * coverage.c: Use correct type.
13198 * doc/invoke.texi: Language correction.
13200 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13203 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13204 ENDBRANCH for non-tail call which may return via indirect branch.
13205 * doc/extend.texi: Document indirect_return attribute.
13207 2018-07-03 Martin Sebor <msebor@redhat.com>
13209 PR tree-optimization/86274
13210 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13212 (format_floating): Correct handling of infinities and NaNs.
13214 2018-07-03 Martin Sebor <msebor@redhat.com>
13216 * print-tree.c (print_real_cst): New function.
13217 (print_node_brief): Call it.
13218 (print_node): Ditto.
13220 2018-07-03 Jeff Law <law@redhat.com>
13222 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13223 into a single pattern.
13225 * config/h8300/h8300.md (ors code_iterator): New.
13226 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13227 a single pattern and single splitter.
13228 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13229 (iorqi3_1, xorqi3_1): Likewise.
13230 (iorqi3, xorqi3 expanders): Similarly.
13232 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13233 (movmd_internal) into a single pattern using the P mode iterator.
13234 (movmd splitters): Similarly.
13235 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13236 (movsd splitters): Similarly.
13238 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13239 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13240 right table based on the size of the operand.
13241 * config/h8300/h8300.md (length_table): Corresponding changes. All
13242 references to "addb", "addw" and "addl" changed to "add".
13243 (btst patterns): Merge two variants into a single pattern.
13244 (tstqi, tsthi): Likewise.
13245 (addhi3_incdec, addsi3_incdec): Likewise.
13246 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13247 (mulhi3, mulsi3): Likewise.
13248 (udivhi3, udivsi3): Likewise.
13249 (divhi3, divsi3): Likewise.
13250 (andorqi3, andorhi3, andorsi3): Likewise.
13252 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13255 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13256 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13258 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13260 PR tree-optimization/85694
13261 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13262 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13264 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13265 (<u>avg<mode>3_ceil): New patterns.
13267 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13269 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13270 scan-tree-dump directive.
13271 * gcc.dg/vect/slp-perm-2.c: Likewise.
13272 * gcc.dg/vect/slp-perm-3.c: Likewise.
13273 * gcc.dg/vect/slp-perm-5.c: Likewise.
13274 * gcc.dg/vect/slp-perm-6.c: Likewise.
13275 * gcc.dg/vect/slp-perm-7.c: Likewise.
13276 * gcc.dg/vect/slp-perm-8.c: Likewise.
13278 2018-07-03 Marek Polacek <polacek@redhat.com>
13280 PR middle-end/86202
13281 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13283 2018-07-03 Richard Biener <rguenther@suse.de>
13286 * tree-ssa-structalias.c (find_func_clobbers): Properly
13287 handle indirect calls.
13289 2018-07-03 Jeff Law <law@redhat.com>
13291 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13292 (shifts): New code iterator.
13293 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13294 expander. Fix HImode handling on H8/SX.
13295 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13296 (subqi3, subhi3, subsi3 expanders): Likewise.
13297 (andqi3, andhi3, andsi3 expanders): Likewise.
13298 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13299 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13300 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13301 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13302 (zero_extendqihi2, zero_extendqisi2): Likewise.
13303 (extendqihi2, extendqisi2): Likewise.
13304 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13305 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13306 (rotlqi3_1, rotlhi3_1): Likewise.
13307 (logicalhi3_sn, logicalsi3_sn): Likewise.
13308 (logicalhi3, logicalsi3): Likewise.
13310 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13312 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13313 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13314 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13315 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13316 type to append_pattern_def_seq instead of creating a stmt_vec_info
13318 (build_mask_conversion): Likewise. Remove vinfo argument.
13319 (vect_add_conversion_to_patterm): Likewise, renaming to...
13320 (vect_add_conversion_to_pattern): ...this.
13321 (vect_recog_mask_conversion_pattern): Update call to
13322 build_mask_conversion. Pass the vector type to
13323 append_pattern_def_seq here too.
13324 (vect_recog_gather_scatter_pattern): Update call to
13325 vect_add_conversion_to_pattern.
13327 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13329 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13330 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13331 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13332 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13333 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13334 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13335 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13336 append_pattern_def_seq instead of new_pattern_def_seq.
13337 (vect_recog_divmod_pattern): Do both of the above.
13338 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13341 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13343 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13344 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13345 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13346 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13347 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13348 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13349 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13350 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13351 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13352 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13353 parameter with a single stmt_vec_info.
13354 (vect_recog_func_ptr): Likewise.
13355 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13356 (vect_try_gather_scatter_pattern): ...this.
13357 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13358 the stmt_vec_info of the statement to be matched. Don't clear
13359 STMT_VINFO_RELATED_STMT.
13360 (vect_pattern_recog): Update call accordingly.
13362 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13364 PR tree-optimization/85694
13365 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13366 (uavgM3_ceil): Document new optabs.
13367 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13368 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13370 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13371 (savg_ceil_optab): New optabs.
13372 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13373 (vect_vect_recog_func_ptrs): Add it.
13374 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13375 constant directly from the associated lhs.
13377 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13379 * tree-vect-patterns.c (vect_split_statement): New function.
13380 (vect_convert_input): Use it to try to split an existing cast.
13382 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13384 * poly-int.h (print_hex): New function.
13385 * dumpfile.h (dump_dec, dump_hex): Declare.
13386 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13387 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13388 min_input_precision, operation_precision and operation_sign.
13389 * tree-vect-patterns.c (vect_get_range_info): New function.
13390 (vect_same_loop_or_bb_p, vect_single_imm_use)
13391 (vect_operation_fits_smaller_type): Delete.
13392 (vect_look_through_possible_promotion): Add an optional
13393 single_use_p parameter.
13394 (vect_recog_over_widening_pattern): Rewrite to use new
13395 stmt_vec_info infomration. Handle one operation at a time.
13396 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13397 (vect_truncatable_operation_p, vect_set_operation_type)
13398 (vect_set_min_input_precision): New functions.
13399 (vect_determine_min_output_precision_1): Likewise.
13400 (vect_determine_min_output_precision): Likewise.
13401 (vect_determine_precisions_from_range): Likewise.
13402 (vect_determine_precisions_from_users): Likewise.
13403 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13404 (vect_vect_recog_func_ptrs): Put over_widening first.
13406 (vect_pattern_recog): Call vect_determine_precisions.
13408 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13410 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13411 statements that have been replaced by further pattern statements.
13412 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13414 2018-07-03 Richard Biener <rguenther@suse.de>
13416 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13417 always set *dt. Dump vectype in vectype overload.
13418 * dumpfile.h (dump_gimple_expr): New function.
13419 (dump_gimple_expr_loc): Likewise.
13420 * dumpfile.c (dump_gimple_expr): New function.
13421 (dump_gimple_expr_loc): Likewise.
13423 2018-07-02 Jeff Law <law@redhat.com>
13425 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13426 the H8/300, H8/300H and H8/S variants into a single pattern.
13427 (movhi_h8300, movqi_h8300hs): Similarly.
13428 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13429 (QHI mode iterator): New.
13431 * config/h8300/h8300.md: Remove trailing whitespace.
13433 2018-07-02 Jim Wilson <jimw@sifive.com>
13435 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13436 instead of emit_insn for interrupt returns.
13437 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13438 (riscv_sret, riscv_uret): Likewise.
13440 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13442 * pretty-print.c (selftest::test_pp_format): Move save and restore
13443 of quotes to class auto_fix_quotes, and add an instance.
13444 * selftest.c: Include "intl.h".
13445 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13446 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13447 * selftest.h (selftest::auto_fix_quotes): New class.
13449 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13451 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13452 (aarch64_sve_prepare_conditional_op): Remove.
13453 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13454 Allow aarch64_simd_reg_or_zero as select operand; remove
13455 the aarch64_sve_prepare_conditional_op call.
13456 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13457 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13458 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13459 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13460 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13461 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13462 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13463 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13464 and a splitters to match all of the *_any patterns.
13465 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13467 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13468 (SVE_COND_FP_BINARY_REV): Remove.
13469 (sve_int_op_rev, sve_fp_op_rev): New.
13470 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13471 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13472 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13473 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13474 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13475 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13476 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13477 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13478 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13480 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13481 Remove match_dup 1 from the inner unspec.
13482 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13484 * config/aarch64/aarch64.md (movprfx): New attr.
13485 (length): Default movprfx to 8.
13486 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13487 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13488 (*<su>mul<SVE_I>3_highpart): Likewise.
13489 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13490 (*v<ASHIFT><SVE_I>3): Likewise.
13491 (*<su><MAXMIN><SVE_I>3): Likewise.
13492 (*<su><MAXMIN><SVE_F>3): Likewise.
13493 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13494 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13495 (*div<SVE_F>4): Likewise.
13497 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13499 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13502 2018-07-02 Richard Biener <rguenther@suse.de>
13504 PR tree-optimization/86363
13505 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13506 memset argument refers to a non-variable address.
13508 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13510 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13511 {PLUS,MINUS}_EXPR code to...
13512 (adjust_symbolic_bound): ...here,
13513 (combine_bound): ...here,
13514 (set_value_range_with_overflow): ...and here.
13516 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13518 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13520 (extract_range_from_abs_expr): ...here.
13522 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13524 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13525 -fno-omit-frame-pointer when not optimizing.
13527 2018-07-02 Martin Liska <mliska@suse.cz>
13530 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13531 (propagate_nothrow): Likewise.
13533 2018-07-02 Martin Liska <mliska@suse.cz>
13536 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13538 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13540 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13541 function in r262149, changing "loc" param from source_location to
13542 const dump_location_t &.
13543 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13544 declaration, as above.
13546 2018-07-01 Paul Koning <ni1d@arrl.net>
13548 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13549 -munit-asm, -mgnu-asm, -mdec-asm.
13550 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13551 (pdp11_output_labelref): New.
13552 (pdp11_output_def): New.
13553 (pdp11_output_addr_vec_elt): New.
13554 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
13555 %# and %@ format codes.
13556 (pdp11_option_override): New.
13557 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13558 (pdp11_output_ident): New.
13559 (pdp11_asm_named_section): New.
13560 (pdp11_asm_init_sections): New.
13561 (pdp11_file_start): New.
13562 (pdp11_file_end): New.
13563 (output_ascii): Use .ascii/.asciz for -mdec-asm.
13564 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
13565 %o, like %c but octal.
13566 (pdp11_option_override): New.
13567 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13569 (DATA_SECTION_ASM_OP): Ditto.
13570 (READONLY_DATA_SECTION_ASM_OP): New.
13571 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13572 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13573 (ASM_OUTPUT_LABELREF): Ditto.
13574 (ASM_OUTPUT_DEF): Ditto.
13575 (ASM_OUTPUT_EXTERNAL): New.
13576 (ASM_OUTPUT_SOURCE_FILENAME): New.
13577 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13578 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13579 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
13580 %# and %@ format codes.
13581 * config/pdp11/pdp11.opt (mgnu-asm): New.
13582 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13583 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13584 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13586 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
13588 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13589 dereferencing path[] beyond its length.
13591 (debug_all_paths): New.
13592 (rewire_first_differing_edge): New.
13593 (adjust_paths_after_duplication): New.
13594 (duplicate_thread_path): Call adjust_paths_after_duplication.
13596 (thread_through_all_blocks): Add new argument to
13597 duplicate_thread_path.
13599 2018-06-30 Jim Wilson <jimw@sifive.com>
13601 * config/riscv/predicates.md (p2m1_shift_operand): New.
13602 (high_mask_shift_operand): New.
13603 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13604 pattern using p2m1_shift_operand.
13605 (lshsi3_zero_extend_3+2): New combiner pattern using
13606 high_mask_shift_operand.
13608 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13610 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13612 (vect_recog_rotate_pattern): ...here.
13613 (vect_convert_input): Try to insert casts of invariants in the
13615 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13616 preheader to be empty.
13618 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13620 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13621 vector type. If given, install it in the new statement's
13622 STMT_VINFO_VECTYPE.
13623 (vect_element_precision): New function.
13624 (vect_unpromoted_value): New struct.
13625 (vect_unpromoted_value::vect_unpromoted_value): New function.
13626 (vect_unpromoted_value::set_op): Likewise.
13627 (vect_look_through_possible_promotion): Likewise.
13628 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13629 (vect_widened_op_tree, vect_convert_input): Likewise.
13630 (vect_convert_inputs, vect_convert_output): Likewise.
13631 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13632 to handle the optional cast of the multiplication result and
13633 vect_widened_op_tree to detect the widened multiplication itself.
13634 Do not require the input and output of promotion casts to have
13635 the same sign, but base the signedness of the operation on the
13636 input rather than the result. If the pattern includes two
13637 promotions, check that those promotions have the same sign.
13638 Do not restrict the MULT_EXPR handling to a double-width result;
13639 handle quadruple-width results and wider. Use vect_convert_inputs
13640 to convert the inputs to the common type.
13641 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13642 to handle the optional cast of the ABS result. Also allow a sign
13643 change or a sign extension between the ABS and MINUS.
13644 Use vect_widened_op_tree to detect the widened subtraction and use
13645 vect_convert_inputs to convert the inputs to the common type.
13646 (vect_handle_widen_op_by_const): Delete.
13647 (vect_recog_widen_op_pattern): New function.
13648 (vect_recog_widen_mult_pattern): Use it.
13649 (vect_recog_widen_shift_pattern): Likewise.
13650 (vect_recog_widen_sum_pattern): Use
13651 vect_look_through_possible_promotion to handle the promoted
13654 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13656 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13657 the containing gimple_seq *.
13658 * gimple-iterator.h (gsi_for_stmt): Declare it.
13659 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13660 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13661 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13662 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13663 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13665 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13667 (vect_mark_pattern_stmts): ...here. Handle cases in which the
13668 statement being replaced is part of an existing pattern
13669 definition sequence, inserting the new pattern statements before
13671 (vect_pattern_recog_1): Don't return a bool. If the statement
13672 is already part of a pattern, instead apply pattern matching
13673 to the pattern definition statements. Don't clear the
13674 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13675 (vect_pattern_recog): Don't break after the first match;
13676 continue processing the pattern definition statements instead.
13677 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13679 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13681 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13682 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13683 (vect_recog_widen_sum_pattern): Use it.
13685 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13687 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13688 phi is not a pattern statement and has not been replaced by
13689 a pattern statement.
13690 * tree-vect-patterns.c (type_conversion_p): Don't check
13691 STMT_VINFO_IN_PATTERN_P.
13692 (vect_recog_vector_vector_shift_pattern): Likewise.
13693 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13694 the pattern statement rather than the original statement; check
13695 directly for a WIDEN_MULT_EXPR here.
13696 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13697 vect_is_simple_use to return the pattern statement rather
13698 than the original statement; use is_pattern_stmt_p to check
13699 for such a pattern statement.
13700 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13701 to return the pattern statement rather than the original statement;
13702 don't do the same transformation here.
13703 (vect_is_simple_use): If the defining statement has been replaced
13704 by a pattern statement, return the pattern statement instead.
13705 Remove the corresponding (local) transformation from the vectype
13708 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13710 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13711 end and default to null.
13712 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13713 (vectorizable_reduction): Update calls accordingly, dropping the
13714 gimple ** argument if the passed-back statement isn't needed.
13715 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13716 (vect_recog_rotate_pattern): Likewise.
13717 (vect_recog_mask_conversion_pattern): Likewise.
13718 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13719 (vect_mask_constant_operand_p): Likewise.
13720 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13721 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13722 (get_group_load_store_type, get_load_store_type): Likewise.
13723 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13724 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13725 (vectorizable_conversion, vectorizable_assignment): Likewise.
13726 (vectorizable_shift, vectorizable_operation): Likewise.
13727 (vectorizable_store, vect_is_simple_cond): Likewise.
13728 (vectorizable_condition, vectorizable_comparison): Likewise.
13729 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13730 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13731 and move it to the end. Cope with null def_stmt_outs.
13733 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13735 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13737 2018-06-29 Jeff Law <law@redhat.com>
13739 * config/v850/v850.c (v850_legitimate_address_p): Handle large
13740 displacements for TARGET_V850E2V3 and newer.
13741 (TARGET_LRA_P): Remove. Defaults to LRA now.
13742 * config/v850/v850.md (sign23byte_load): Remove.
13743 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13744 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13746 2018-06-29 Martin Liska <mliska@suse.cz>
13749 * coverage.c (coverage_init): Mangle full path name.
13750 * doc/invoke.texi: Document the change.
13751 * gcov-io.c (mangle_path): New.
13752 * gcov-io.h (mangle_path): Likewise.
13753 * gcov.c (mangle_name): Use mangle_path for path mangling.
13755 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13757 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13758 if starting source register is not even.
13760 2018-06-29 Martin Liska <mliska@suse.cz>
13762 PR tree-optimization/86263
13763 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13764 Make edge redirection.
13766 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13768 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13769 (dump_scope_depth): New variable.
13770 (get_dump_scope_depth): New function.
13771 (dump_begin_scope): New function.
13772 (dump_end_scope): New function.
13773 * dumpfile.h (get_dump_scope_depth): New declaration.
13774 (dump_begin_scope): New declaration.
13775 (dump_end_scope): New declaration.
13776 (class auto_dump_scope): New class.
13777 (AUTO_DUMP_SCOPE): New macro.
13778 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13781 2018-06-29 Richard Biener <rguenther@suse.de>
13783 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13784 compute_all_dependences succeeds.
13785 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13786 exceed --param loop-max-datarefs-for-datadeps.
13788 2018-06-29 Jakub Jelinek <jakub@redhat.com>
13790 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13792 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
13795 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13796 alternative 0 in preferred_for_speed attribute.
13798 2018-06-28 Paul Koning <ni1d@arrl.net>
13800 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13801 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13802 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13803 * config/pdp11/pdp11.md: Correct "length" attribute calculation
13804 for shift insn patterns.
13806 2018-06-28 David Malcolm <dmalcolm@redhat.com>
13808 * cgraph.c (cgraph_node::get_body): Replace assignments to
13809 "dump_file" with calls to set_dump_file.
13810 * dumpfile.c (alt_dump_file): Make static, and group with...
13811 (alt_flags): ...this definition.
13812 (dumps_are_enabled): New variable.
13813 (refresh_dumps_are_enabled): New function.
13814 (set_dump_file): New function.
13815 (set_alt_dump_file): New function.
13816 (gcc::dump_manager::dump_start): Replace assignments to
13817 "dump_file" and "alt_dump_file" with calls to set_dump_file and
13819 (gcc::dump_manager::dump_finish): Likewise.
13820 * dumpfile.h (alt_dump_file): Delete decl.
13821 (dumps_are_enabled): New variable decl.
13822 (set_dump_file): New function decl.
13823 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13825 * tree-nested.c (lower_nested_functions): Replace assignments to
13826 "dump_file" with calls to set_dump_file.
13828 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13830 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13831 goto_locus of each outgoing edge of each basic block.
13833 2018-06-28 Richard Biener <rguenther@suse.de>
13835 * dwarf2out.c (decl_scope_table): Remove.
13836 (push_decl_scope): Likewise.
13837 (pop_decl_scope): Likewise.
13838 (gen_type_die_for_member): Do not call push/pop_decl_scope.
13839 (gen_struct_or_union_type_die): Likewise.
13840 (gen_tagged_type_die): Likewise.
13841 (dwarf2out_init): Do not initialize decl_scope_table.
13842 (dwarf2out_c_finalize): Do not free it.
13844 2018-06-28 Richard Biener <rguenther@suse.de>
13846 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13847 deciding whether to not re-use a DIE.
13849 2018-06-28 Richard Biener <rguenther@suse.de>
13851 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13852 DW_AT_abstract_origin attribute.
13854 2018-06-28 Martin Liska <mliska@suse.cz>
13856 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13857 Use newly introduced constants.
13858 * tree-switch-conversion.h (struct jump_table_cluster):
13859 Define max_ratio_for_size and max_ratio_for_speed.
13861 2018-06-28 Martin Liska <mliska@suse.cz>
13863 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13864 Add new checking assert to catch invalid state.
13865 (jump_table_cluster::can_be_handled): Handle single case
13867 (jump_table_cluster::is_beneficial): Bail out for such case.
13868 (bit_test_cluster::find_bit_tests):
13869 Add new checking assert to catch invalid state.
13870 (bit_test_cluster::can_be_handled): Handle single case
13872 (bit_test_cluster::is_beneficial): Bail out for such case.
13873 (switch_decision_tree::analyze_switch_statement):
13876 2018-06-28 Martin Liska <mliska@suse.cz>
13878 * common.opt: Introduce -completion option.
13879 * gcc.c (driver_handle_option): Handle it.
13880 (driver::main): Print completions if completion
13882 * opt-suggestions.c (option_proposer::get_completions):
13884 (option_proposer::suggest_completion): Likewise.
13885 (option_proposer::find_param_completions): Likewise.
13886 (verify_autocompletions): Likewise.
13887 (test_completion_valid_options): Likewise.
13888 (test_completion_valid_params): Likewise.
13889 (in_completion_p): Likewise.
13890 (empty_completion_p): Likewise.
13891 (test_completion_partial_match): Likewise.
13892 (test_completion_garbage): Likewise.
13893 (opt_proposer_c_tests): Likewise.
13894 * opt-suggestions.h: Declare new functions.
13895 * opts.c (common_handle_option): Handle OPT__completion_.
13896 * selftest-run-tests.c (selftest::run_tests): Add
13897 opt_proposer_c_tests.
13898 * selftest.c (assert_str_startswith): New.
13899 * selftest.h (assert_str_startswith): Likewise.
13900 (opt_proposer_c_tests): New.
13901 (ASSERT_STR_STARTSWITH): Likewise.
13903 2018-06-28 Martin Liska <mliska@suse.cz>
13905 * Makefile.in: Add opt-suggestions.o.
13906 * gcc-main.c: Include opt-suggestions.h.
13907 * gcc.c (driver::driver): Likewise.
13908 (driver::~driver): Remove m_option_suggestions.
13909 (driver::build_option_suggestions): Moved to option_proposer.
13910 (driver::suggest_option): Likewise.
13911 (driver::handle_unrecognized_options): Use option_proposer.
13912 * gcc.h (class driver): Add new memver m_option_proposer.
13913 * opt-suggestions.c: New file.
13914 * opt-suggestions.h: New file.
13916 2018-06-28 Martin Liska <mliska@suse.cz>
13918 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13919 (auto_string_vec::~auto_string_vec): Likewise.
13921 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13923 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13924 prevent_decl_creation_for_types fields up and add reset_location field.
13925 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13926 statement if id->reset_location is true.
13927 (copy_edges_for_bb): Do not set goto_locus on the new edges if
13928 id->reset_location is true.
13929 (copy_phis_for_bb): Force input_location on the arguments if
13930 id->reset_location is true.
13931 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13932 is set on the function to be inlined.
13934 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
13936 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13938 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
13940 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13941 registers for Pmode.
13942 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13943 hard registers for the clobbered pseudo.
13945 2018-06-27 Paul Koning <ni1d@arrl.net>
13947 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13948 mutually exclusive options.
13949 * config/pdp11/constraints.md (h): New constraint.
13950 (O): Update definition to match shift code generation.
13951 (D): New constraint.
13952 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13954 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13956 (output_jump): Change arguments.
13957 (pdp11_fixed_cc_regs): New function.
13958 (pdp11_cc_mode): Ditto.
13959 (pdp11_expand_shift): Ditto.
13960 (pdp11_assemble_shift): Ditto.
13961 (pdp11_small_shift): Ditto.
13962 (pdp11_branch_cost): Remove.
13963 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13965 (pdp11_register_move_cost): Update for CC registers.
13966 (pdp11_rtx_costs): Add case for LSHIFTRT.
13967 (pdp11_output_jump): Add CCNZ mode conditional branches.
13968 (notice_update_cc_on_set): Remove.
13969 (pdp11_cc_mode): New function.
13970 (simple_memory_operand): Correct pre/post decrement case.
13971 (no_side_effect_operand): New function.
13972 (pdp11_regno_reg_class): Add CC_REGS class.
13973 (pdp11_fixed_cc_regs): New function.
13974 (pdp11_small_shift): New function.
13975 (pdp11_expand_shift): New function to expand shift insns.
13976 (pdp11_assemble_shift): New function to output shifts.
13977 (pdp11_branch_cost): Remove.
13978 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13979 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13980 (WCHAR_TYPE): Ditto.
13981 (PTRDIFF_TYPE): Ditto.
13982 (ADJUST_INSN_LENGTH): New macro.
13983 (FIXED_REGISTERS): Add CC registers.
13984 (CALL_USED_REGISTERS): Ditto.
13985 (reg_class): Ditto.
13986 (REG_CLASS_NAMES): Ditto.
13987 (REG_CLASS_CONTENTS): Ditto.
13988 (SELECT_CC_MODE): Use new function.
13989 (TARGET_FLAGS_REGNUM): New macro.
13990 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13991 (cc0_reg_rtx): Remove.
13992 (CC_STATUS_MDEP): Remove.
13993 (CC_STATUS_MDEFP_INIT): Remove.
13994 (CC_IN_FPU): Remove.
13995 (NOTICE_UPDATE_CC): Remove.
13996 (REGISTER_NAMES): Add CC registers.
13997 (BRANCH_COST): Change to constant 1.
13998 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14000 * config/pdp11/pdp11.opt (mbcopy): Remove.
14001 (mbcopy-builtin): Remove.
14002 (mbranch-cheap): Remove.
14003 (mbranch-expensive): Remove.
14004 * config/pdp11/predicates.md (expand_shift_operand): Update to
14005 match shift code generation.
14006 (ccnz_operator): New predicate.
14007 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14008 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14009 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14011 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14012 description of O constraint.
14014 2018-06-27 Jeff Law <law@redhat.com>
14015 Austin Law <austinklaw@gmail.com>
14017 * config/v850/v850.md (addsi3_set_flags): New pattern.
14018 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14019 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14020 (zero_extendhisi2_v850_set_flags): Likewise.
14021 (zero_extendqisi2_v850_set_flags): Likewise.
14022 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14023 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14024 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14026 * config/v850/v850-protos.h (notice_update_cc): Remove.
14027 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14028 (v850_print_operand): Handle 'D' and "d".
14029 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14030 Add handling of arithmetic/logical operations compared against zero.
14031 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14032 Do not look at v850_compare_op, instead get mode from last argument.
14033 (v850_gen_compare): Remove
14034 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14035 after reload for prologue insns.
14036 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14038 (construct_save_jarl): Likewise.
14039 (TARGET_FLAGS_REGNUM): Define.
14040 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14041 (NOTICE_UPDATE_CC): Remove.
14042 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14043 than cc0. Conditionalize on reload_completed.
14044 (cmpsi_insn, setfcc_insn): Likewise.
14045 (tst1 splitter): Turn into define_and_split which sets the flags
14047 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14048 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14049 (cstoresf4, cstoredf4): Clobber the flags.
14050 (cmpsi, cmpsf, cmpdf): Remove expanders.
14051 (setf_insn): Remove pattern.
14052 (addsi3): Turn into define_and_split which clobbers the flags after
14053 reload and a suitable pattern (addsi3_clobber_flags) for use after
14055 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14056 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14057 (ashrsi3, ashrsi3_v850e2): Likewise.
14058 (bins): Clobber the flags.
14059 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14060 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14061 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14062 (call_value_internal_short, call_value_internal_long): Likewise.
14063 (callt_save_interrupt, callt_return_interrupt): Likewise.
14064 (save_interrupt, return_interrupt): Likewise.
14065 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14066 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14067 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14068 (All FP comparisons): Only allow after reload has completed.
14070 (divh, divhu): Tweak output template.
14071 (branch_z_normal, branch_z_invert): Remove
14072 (branch_nz_normal, branch_nz_invert): Likewise.
14073 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14075 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14076 * config/v850/v850.c (notice_update_cc): Remove.
14077 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14078 (CC_NO_CARRY): Likewise.
14079 (NOTICE_UPDATE_CC): Define to nothing.
14080 * config/v850/v850.md: Remove block comment on cc0 handling
14081 Remove "cc" attribute from all patterns. Remove cc_status handling
14082 from all patterns. Minor formatting fixes.
14084 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14086 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14087 (cortex-a76.cortex-a55): Likewise.
14088 * config/aarch64/aarch64-tune.md: Regenerate.
14089 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14090 cortex-a76.cortex-a55.
14092 2018-06-27 Jeff Law <law@redhat.com>
14094 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14095 (MULTILIB_DIRNAMES): Similarly.
14097 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14099 * gimple.h (gimple_return_retbnd): Delete.
14100 (gimple_return_set_retbnd): Likewise.
14101 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14102 gimple_return_set_retbnd.
14103 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14104 gimple_return_retbnd and adjust.
14105 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14106 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14107 Explicitly return NULL in a couple more cases. Move assertion
14108 on debug statements and remove unreachable code.
14109 (reset_debug_binding): Do not test id->retbnd.
14110 (expand_call_inline): Do not set it.
14112 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14114 * configure.ac: Add --disable-gcov option.
14115 * configure: Regenerate.
14116 * Makefile.in: Honour @enable_gcov@.
14117 * doc/install.texi: Document --disable-gcov.
14119 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14121 * config/arm/arm-cpus.in (cortex-a76): New entry.
14122 (cortex-a76.cortex-a55): Likewise.
14123 * config/arm/arm-tables.opt: Regenerate.
14124 * config/arm/arm-tune.md: Likewise.
14125 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14126 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14127 cortex-a76.cortex-a55.
14129 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14132 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14134 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14136 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14138 (EPILOGUE_USES): Likewise.
14140 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14142 * tree-inline.c (remap_location): New function extracted from...
14143 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14144 (copy_phis_for_bb): ...here. Call remap_location.
14145 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14147 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14149 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14150 unaligned vsx for 16B memset.
14152 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14155 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14156 ieee128_float_type_node to long_double_type_node unless
14157 TARGET_LONG_DOUBLE_128 is set.
14159 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14161 * cfgloop.c (get_loop_location): Convert return type from
14162 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14163 by implicit construction from rtx_insn *, and using
14164 dump_user_location_t::from_function_decl for the fallback case.
14165 * cfgloop.h (get_loop_location): Convert return type from
14166 location_t to dump_user_location_t.
14167 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14168 dump_printf_loc to pass in a dump_location_t rather than a
14169 location_t, via the gimple stmt.
14170 * coverage.c (get_coverage_counts): Update calls to
14171 dump_printf_loc to pass in dump_location_t rather than a
14173 * doc/optinfo.texi (Dump types): Convert example of
14174 dump_printf_loc from taking "locus" to taking "insn". Update
14175 description of the "_loc" calls to cover dump_location_t.
14176 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14178 (dump_user_location_t::dump_user_location_t): New constructors,
14179 from gimple *stmt and rtx_insn *.
14180 (dump_user_location_t::from_function_decl): New function.
14181 (dump_loc): Make static.
14182 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14183 const dump_location_t &.
14184 (dump_generic_expr_loc): Delete.
14185 (dump_printf_loc): Convert param "loc" from location_t to
14186 const dump_location_t &.
14187 (selftest::test_impl_location): New function.
14188 (selftest::dumpfile_c_tests): New function.
14189 * dumpfile.h: Include "profile-count.h".
14190 (class dump_user_location_t): New class.
14191 (struct dump_impl_location_t): New struct.
14192 (class dump_location_t): New class.
14193 (dump_printf_loc): Convert 2nd param from source_location to
14194 const dump_location_t &.
14195 (dump_generic_expr_loc): Delete.
14196 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14197 const dump_location_t &.
14198 * gimple-fold.c (fold_gimple_assign): Update call to
14199 dump_printf_loc to pass in a dump_location_t rather than a
14200 location_t, via the gimple stmt.
14201 (gimple_fold_call): Likewise.
14202 * gimple-loop-interchange.cc
14203 (loop_cand::analyze_iloop_reduction_var): Update for change to
14204 check_reduction_path.
14205 (tree_loop_interchange::interchange): Update for change to
14206 find_loop_location.
14207 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14208 change in return-type of find_loop_location.
14209 (graphite_regenerate_ast_isl): Likewise.
14210 * graphite-optimize-isl.c (optimize_isl): Likewise.
14211 * graphite.c (graphite_transform_loops): Likewise.
14212 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14213 pass in a dump_location_t rather than a location_t, via the
14215 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14216 * ipa.c (walk_polymorphic_call_targets): Likewise.
14217 * loop-unroll.c (report_unroll): Convert "locus" param from
14218 location_t to dump_location_t.
14219 (decide_unrolling): Update for change to get_loop_location's
14221 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14222 location_t to dump_user_location_t.
14223 (grid_find_single_omp_among_assignments_1): Updates calls to
14224 dump_printf_loc to pass in a dump_location_t rather than a
14225 location_t, via the gimple stmt.
14226 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14227 location_t to dump_location_t. Updates calls to dump_printf_loc
14228 to pass in a dump_location_t rather than a location_t, via the
14230 (grid_inner_loop_gridifiable_p): Likewise.
14231 (grid_dist_follows_simple_pattern): Likewise.
14232 (grid_gfor_follows_tiling_pattern): Likewise.
14233 (grid_target_follows_gridifiable_pattern): Likewise.
14234 (grid_attempt_target_gridification): Convert initialization
14235 of local "grid" from memset to zero-initialization; FIXME: does
14236 this require C++11? Update call to dump_printf_loc to pass in a
14237 optinfo_location rather than a location_t, via the gimple stmt.
14238 * profile.c (read_profile_edge_counts): Updates call to
14239 dump_printf_loc to pass in a dump_location_t rather than a
14241 (compute_branch_probabilities): Likewise.
14242 * selftest-run-tests.c (selftest::run_tests): Call
14244 * selftest.h (dumpfile_c_tests): New decl.
14245 * tree-loop-distribution.c (pass_loop_distribution::execute):
14246 Update for change in return type of find_loop_location.
14247 * tree-parloops.c (parallelize_loops): Likewise.
14248 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14249 "locus" from location_t to dump_user_location_t.
14250 (canonicalize_loop_induction_variables): Likewise.
14251 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14252 for change in return type of find_loop_location.
14253 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14254 to dump_printf_loc to pass in a dump_location_t rather than a
14255 location_t, via the stmt.
14256 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14258 * tree-vect-loop-manip.c (find_loop_location): Convert return
14259 type from source_location to dump_user_location_t.
14260 (vect_do_peeling): Update for above change.
14261 (vect_loop_versioning): Update for change in type of
14263 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14264 from location_t to dump_user_location_t.
14265 (vect_estimate_min_profitable_iters): Update for change in type
14267 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14268 location_t to dump_location_t.
14269 (vect_slp_bb): Update for change in type of vect_location.
14270 * tree-vectorizer.c (vect_location): Convert from source_location
14271 to dump_user_location_t.
14272 (try_vectorize_loop_1): Update for change in vect_location's type.
14273 (vectorize_loops): Likewise.
14274 (increase_alignment): Likewise.
14275 * tree-vectorizer.h (vect_location): Convert from source_location
14276 to dump_user_location_t.
14277 (find_loop_location): Convert return type from source_location to
14278 dump_user_location_t.
14279 (check_reduction_path): Convert 1st param from location_t to
14280 dump_user_location_t.
14281 * value-prof.c (check_counter): Update call to dump_printf_loc to
14282 pass in a dump_user_location_t rather than a location_t; update
14283 call to error_at for change in type of "locus".
14284 (check_ic_target): Update call to dump_printf_loc to
14285 pass in a dump_user_location_t rather than a location_t, via the
14288 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14290 * config/s390/s390.h (enum processor_flags): Do not use
14291 default tune parameter when -march was specified.
14293 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14296 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14297 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14300 2018-06-26 Richard Biener <rguenther@suse.de>
14302 PR tree-optimization/86287
14304 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14305 (vect_analyze_loop): Initialize n_stmts.
14307 2018-06-26 Richard Biener <rguenther@suse.de>
14309 PR middle-end/86271
14310 * fold-const.c (fold_convertible_p): Pointer extension
14313 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14316 * dwarf2out.c (loc_list_has_views): Adjust comments.
14317 (dw_loc_list): Split single cross-partition range with
14320 2018-06-25 Jeff Law <law@redhat.com>
14322 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14323 on -mbig-switch by default.
14325 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14327 (const_float_0_operand): Remove unused predicate.
14328 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14329 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14330 (recipsf2): New expander. Original pattern now called
14332 (recipdf2, recipdf2_insn): Similarly.
14333 (rsqrtsf2, rsqrtsf2_insn): Similarly
14334 (rsqrtdf2, rsqrtdf2_insn): Similarly
14336 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14338 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14339 Simplify logic for FreeBSD (twice).
14341 2018-06-25 Martin Sebor <msebor@redhat.com>
14343 PR tree-optimization/86204
14344 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14345 a strnlen result if it's less than the length of the string.
14347 2018-06-25 Martin Sebor <msebor@redhat.com>
14349 PR tree-optimization/85700
14350 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14351 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14352 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14354 2018-06-25 Martin Sebor <msebor@redhat.com>
14356 * doc/extend.texi (Zero-length arrays): Update and clarify.
14358 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14360 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14361 added IEEE/IBM long double multilib support on PowerPC little
14362 endian Linux systems.
14363 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14364 (MULTILIB_DEFAULTS): Likewise.
14365 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14367 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14368 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14369 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14371 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14373 PR middle-end/86311
14374 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14375 (REORDER_45): Likewise.
14377 2018-06-25 Jeff Law <law@redhat.com>
14379 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14380 dividend to 32 bits. Adjust length.
14381 (udivmodhi4): Cleanup output template. Fix length.
14383 2018-06-25 Carl Love <cel@us.ibm.com>
14385 * config/rs6000/vsx.md: Change word selector to prefered location.
14387 2018-06-25 Richard Biener <rguenther@suse.de>
14389 PR tree-optimization/86304
14390 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14391 epilogue-if-converted loops as well.
14393 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14395 * lto-section-out.c (lto_begin_section): Do not print section
14396 name for noaddr and unnumbered dumps.
14398 2018-06-25 Richard Biener <rguenther@suse.de>
14400 * tree-vectorizer.h (struct vec_info_shared): New structure
14401 with parts split out from struct vec_info and loop_nest from
14402 struct _loop_vec_info.
14403 (struct vec_info): Adjust accordingly.
14404 (struct _loop_vec_info): Likewise.
14405 (LOOP_VINFO_LOOP_NEST): Adjust.
14406 (LOOP_VINFO_DATAREFS): Likewise.
14407 (LOOP_VINFO_DDRS): Likewise.
14408 (struct _bb_vec_info): Likewise.
14409 (BB_VINFO_DATAREFS): Likewise.
14410 (BB_VINFO_DDRS): Likewise.
14411 (struct _stmt_vec_info): Add dr_aux member.
14412 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14413 (DR_MISALIGNMENT_UNINITIALIZED): New.
14414 (set_dr_misalignment): Adjust.
14415 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14416 (vect_analyze_loop): Adjust prototype.
14417 (vect_analyze_loop_form): Likewise.
14418 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14419 Compute dependences lazily.
14420 (vect_record_base_alignments): Use shared datarefs/ddrs.
14421 (vect_verify_datarefs_alignment): Likewise.
14422 (vect_analyze_data_refs_alignment): Likewise.
14423 (vect_analyze_data_ref_accesses): Likewise.
14424 (vect_analyze_data_refs): Likewise.
14425 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14426 constructor parameter for shared part.
14427 (vect_analyze_loop_form): Pass in shared part and adjust.
14428 (vect_analyze_loop_2): Pass in storage for the number of
14429 stmts. Move loop nest finding to the caller. Compute
14431 (vect_analyze_loop): Pass in shared part.
14432 (vect_transform_loop): Verify shared datarefs are unchanged.
14433 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14434 constructor parameter for shared part.
14435 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14436 (vect_slp_bb): Verify shared datarefs are unchanged before
14438 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14440 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14441 DR_MISALIGNMENT_UNINITIALIZED.
14442 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14443 parameter for shared part.
14444 (vec_info::~vec_info): Adjust.
14445 (vec_info_shared::vec_info_shared): New.
14446 (vec_info_shared::~vec_info_shared): Likewise.
14447 (vec_info_shared::save_datarefs): Likewise.
14448 (vec_info_shared::check_datarefs): Likewise.
14449 (try_vectorize_loop_1): Construct shared part live for analyses
14450 of a single loop for multiple vector sizes.
14451 * tree-parloops.c (gather_scalar_reductions): Adjust.
14453 2018-06-25 Richard Biener <rguenther@suse.de>
14455 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14456 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14457 (vect_analyze_data_refs): Remove similar code from here and
14458 simplify accordingly.
14460 2018-06-25 Richard Biener <rguenther@suse.de>
14462 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14463 for reverse storage order accesses rather than asserting
14464 they cannot happen here.
14466 2018-06-25 Tom de Vries <tdevries@suse.de>
14469 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14470 Use data16 instead of .byte for insn prefix.
14472 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14475 * parser.c (make_char_string_pack): Pass this literal chars
14476 through cpp_interpret_string.
14477 (cp_parser_userdef_numeric_literal): Check the result of
14478 make_char_string_pack.
14480 2018-06-24 Maya Rashish <coypu@sdf.org>
14482 * ginclude/stddef.h: Simplify conditions around avoiding
14483 re-definition of __size_t.
14485 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14487 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14488 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14490 2018-06-22 Maya Rashish <coypu@sdf.org>
14492 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14493 made to OpenBSD and NetBSD through the years.
14495 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14497 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14498 behavior of vec_pack (vector double, vector double) to match
14499 behavior of vec_float2 (vector double, vector double).
14501 2018-06-22 Olivier Hainque <hainque@adacore.com>
14503 * gimplify.c (gimplify_function_tree): Prevent creation
14504 of a trampoline for the address of the current function
14505 passed to entry/exit instrumentation hooks.
14507 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14510 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14513 2018-06-22 Martin Liska <mliska@suse.cz>
14515 PR tree-optimization/86263
14516 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14517 Bail out if is_enabled is false.
14518 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14520 (jump_table_cluster::is_enabled): New function.
14522 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14524 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14525 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14526 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14527 (lto_input_ts_binfo_tree_pointers): Likewise.
14528 * tree-streamer-out.c (streamer_write_tree_bitfields,
14529 write_ts_binfo_tree_pointers): Likewise.
14530 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14532 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14534 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14536 2018-06-22 Martin Liska <mliska@suse.cz>
14538 * symbol-summary.h (get): Make it pure and inline move
14539 functionality from ::get function.
14540 (get): Remove and inline into ::get and ::get_create.
14541 (get_create): Move code from ::get function.
14543 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14546 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14547 -x assembler-with-cpp.
14549 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14551 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14552 _FILE_OFFSET_BITS=64 for C++.
14554 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
14556 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14557 conversion insn that shows up when pr85657-3.c is compiled using
14558 IEEE 128-bit long double.
14559 (neg<mode>2_internal): Use the correct mode to check whether the
14560 mode is IBM extended.
14561 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14562 multiply and divide external functions from being created more
14565 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14567 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14569 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
14570 the edge can be forwarded.
14571 (cfg_layout_merge_blocks): Likewise.
14573 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14575 * except.c (finish_eh_generation): Commit edge insertions only after
14576 the EH edges have been redirected from post-landing to landing pads.
14578 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14580 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14581 create_tmp_var_for to create the FRAME decl.
14582 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14584 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14586 * tree-inline.c (copy_edges_for_bb): Minor tweak.
14587 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14588 debug statement when resetting its value.
14589 (expand_call_inline): Copy the locus of the call onto the assignment
14590 of the return value, if any. Use local variable in more cases.
14592 2018-06-21 Martin Liska <mliska@suse.cz>
14594 * ipa-pure-const.c (propagate_nothrow): Use
14595 funct_state_summaries->get.
14596 (dump_malloc_lattice): Likewise.
14597 (propagate_malloc): Likewise.
14599 2018-06-21 Richard Biener <rguenther@suse.de>
14601 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14602 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14603 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14605 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14606 BLOCK_ABSTRACT_ORIGIN unconditionally.
14608 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14610 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14612 * ipa-reference.c (ipa_reference_c_finalize): Delete
14613 ipa_ref_opt_sum_summaries and set it to NULL.
14615 2018-06-21 Tom de Vries <tdevries@suse.de>
14617 PR tree-optimization/85859
14618 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14619 test with comment from bb_no_side_effects_p.
14621 2018-06-21 Richard Biener <rguenther@suse.de>
14623 PR tree-optimization/86232
14624 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14625 max for constant niter.
14627 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14629 * config/aarch64/aarch64-simd.md
14630 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14632 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14634 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14635 Make opernads of the unspec commutative.
14637 2018-06-21 Richard Biener <rguenther@suse.de>
14639 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14640 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14641 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14642 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14644 (vect_record_base_alignments): Do not record base alignment
14645 for gathers or scatters.
14646 (vect_compute_data_ref_alignment): Drop return value that is always
14647 true. Bail out early for gathers or scatters.
14648 (vect_enhance_data_refs_alignment): Bail out early for gathers
14650 (vect_find_same_alignment_drs): Likewise.
14651 (vect_analyze_data_refs_alignment): Remove dead code.
14652 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14653 (vect_analyze_data_refs): For possible gathers or scatters do
14654 not create an alternate DR, just check their possible validity
14655 and mark them. Adjust DECL_NONALIASED handling to not rely
14656 on DR_BASE_ADDRESS.
14657 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14658 update inits of gathers or scatters.
14659 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14660 Also copy gather/scatter flag to pattern vinfo.
14662 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
14664 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14665 behavior of vec_packsu (vector unsigned long long, vector unsigned
14666 long long) to match behavior of vec_packs with same signature.
14668 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
14669 Thomas Schwinge <thomas@codesourcery.com>
14670 Cesar Philippidis <cesar@codesourcery.com>
14672 * gimplify.c (gimplify_scan_omp_clauses): Add support for
14673 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14674 (gimplify_adjust_omp_clauses): Likewise.
14675 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14676 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14677 (gimplify_omp_target_update): Update handling of acc update and
14679 * omp-low.c (install_var_field): Remove unused parameter
14680 base_pointers_restrict.
14681 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14682 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14684 (omp_target_base_pointers_restrict_p): Delete.
14685 (scan_omp_target): Update call to scan_sharing_clauses.
14686 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14688 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14689 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14690 (convert_local_omp_clauses): Likewise.
14691 * tree-pretty-print.c (dump_omp_clause): Likewise.
14692 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
14694 (omp_clause_code_name): Likewise.
14696 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14699 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14702 PR tree-optimization/86231
14703 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
14704 anti-range don't overwrite *vr0min before using it to compute *vr0max.
14706 2018-06-20 Tom de Vries <tdevries@suse.de>
14708 PR tree-optimization/86097
14709 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14710 iv type if signedness of iv type is not the same as that of *nit.
14712 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14714 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
14715 EDGE_EH edges, verify they are all EDGE_EH.
14717 2018-06-20 Maya Rashish <coypu@sdf.org>
14719 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14721 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14723 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14724 * config/aarch64/aarch64.c (xgene1_tunings): Add
14725 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14726 (aarch64_mode_valid_for_sched_fusion_p):
14727 Allow 16-byte modes.
14728 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14729 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14731 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14733 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14734 * config/aarch64/iterators.md (VQ2): New mode iterator.
14736 2018-06-20 Martin Liska <mliska@suse.cz>
14738 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14739 Change default ratio from 10 to 8.
14741 2018-06-20 Martin Liska <mliska@suse.cz>
14743 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14745 (bit_test_cluster::find_bit_tests): Likewise.
14746 (switch_decision_tree::analyze_switch_statement): Find clusters.
14747 * tree-switch-conversion.h (struct jump_table_cluster): Document
14750 2018-06-20 Martin Liska <mliska@suse.cz>
14752 * tree-switch-conversion.c (switch_conversion::collect):
14753 Record m_uniq property.
14754 (switch_conversion::expand): Bail out for special conditions.
14755 (group_cluster::~group_cluster): New.
14756 (group_cluster::group_cluster): Likewise.
14757 (group_cluster::dump): Likewise.
14758 (jump_table_cluster::emit): New.
14759 (switch_decision_tree::fix_phi_operands_for_edges): New.
14760 (struct case_node): Remove struct.
14761 (jump_table_cluster::can_be_handled): New.
14762 (case_values_threshold): Moved to header.
14763 (reset_out_edges_aux): Likewise.
14764 (jump_table_cluster::is_beneficial): New.
14765 (bit_test_cluster::can_be_handled): Likewise.
14766 (add_case_node): Remove.
14767 (bit_test_cluster::is_beneficial): New.
14768 (case_bit_test::cmp): New.
14769 (bit_test_cluster::emit): New.
14770 (expand_switch_as_decision_tree_p): Remove.
14771 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14772 (fix_phi_operands_for_edge): Likewise.
14773 (switch_decision_tree::analyze_switch_statement): New.
14774 (compute_cases_per_edge): Move ...
14775 (switch_decision_tree::compute_cases_per_edge): ... here.
14776 (try_switch_expansion): Likewise.
14777 (switch_decision_tree::try_switch_expansion): Likewise.
14778 (record_phi_operand_mapping): Likewise.
14779 (switch_decision_tree::record_phi_operand_mapping): Likewise.
14780 (emit_case_decision_tree): Likewise.
14781 (switch_decision_tree::emit): Likewise.
14782 (balance_case_nodes): Likewise.
14783 (switch_decision_tree::balance_case_nodes): Likewise.
14784 (dump_case_nodes): Likewise.
14785 (switch_decision_tree::dump_case_nodes): Likewise.
14786 (emit_jump): Likewise.
14787 (switch_decision_tree::emit_jump): Likewise.
14788 (emit_cmp_and_jump_insns): Likewise.
14789 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14790 (emit_case_nodes): Likewise.
14791 (switch_decision_tree::emit_case_nodes): Likewise.
14792 (conditional_probability): Remove.
14793 * tree-switch-conversion.h (enum cluster_type): New.
14795 (struct cluster): Likewise.
14796 (cluster::cluster): Likewise.
14797 (struct simple_cluster): Likewise.
14798 (simple_cluster::simple_cluster): Likewise.
14799 (struct group_cluster): Likewise.
14800 (struct jump_table_cluster): Likewise.
14801 (struct bit_test_cluster): Likewise.
14802 (struct min_cluster_item): Likewise.
14803 (struct case_tree_node): Likewise.
14804 (case_tree_node::case_tree_node): Likewise.
14805 (jump_table_cluster::case_values_threshold): Likewise.
14806 (struct case_bit_test): Likewise.
14807 (struct switch_decision_tree): Likewise.
14808 (struct switch_conversion): Likewise.
14809 (switch_decision_tree::reset_out_edges_aux): Likewise.
14811 2018-06-20 Martin Liska <mliska@suse.cz>
14813 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14814 (hoist_edge_and_branch_if_true): Likewise.
14815 (expand_switch_using_bit_tests_p): Likewise.
14816 (struct case_bit_test): Likewise.
14817 (case_bit_test_cmp): Likewise.
14818 (emit_case_bit_tests): Likewise.
14819 (switch_conversion::switch_conversion): New class.
14820 (struct switch_conv_info): Remove old struct.
14821 (collect_switch_conv_info): More to ...
14822 (switch_conversion::collect): ... this.
14823 (check_range): Likewise.
14824 (switch_conversion::check_range): Likewise.
14825 (check_all_empty_except_final): Likewise.
14826 (switch_conversion::check_all_empty_except_final): Likewise.
14827 (check_final_bb): Likewise.
14828 (switch_conversion::check_final_bb): Likewise.
14829 (create_temp_arrays): Likewise.
14830 (switch_conversion::create_temp_arrays): Likewise.
14831 (free_temp_arrays): Likewise.
14832 (gather_default_values): Likewise.
14833 (switch_conversion::gather_default_values): Likewise.
14834 (build_constructors): Likewise.
14835 (switch_conversion::build_constructors): Likewise.
14836 (constructor_contains_same_values_p): Likewise.
14837 (switch_conversion::contains_same_values_p): Likewise.
14838 (array_value_type): Likewise.
14839 (switch_conversion::array_value_type): Likewise.
14840 (build_one_array): Likewise.
14841 (switch_conversion::build_one_array): Likewise.
14842 (build_arrays): Likewise.
14843 (switch_conversion::build_arrays): Likewise.
14844 (gen_def_assigns): Likewise.
14845 (switch_conversion::gen_def_assigns): Likewise.
14846 (prune_bbs): Likewise.
14847 (switch_conversion::prune_bbs): Likewise.
14848 (fix_phi_nodes): Likewise.
14849 (switch_conversion::fix_phi_nodes): Likewise.
14850 (gen_inbound_check): Likewise.
14851 (switch_conversion::gen_inbound_check): Likewise.
14852 (process_switch): Use the newly created class.
14853 (switch_conversion::expand): New.
14854 (switch_conversion::~switch_conversion): New.
14855 * tree-switch-conversion.h: New file.
14857 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14859 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14860 tree-vect-patterns.c.
14861 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14862 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
14863 (vect_recog_sad_pattern): Likewise.
14864 (vect_recog_widen_sum_pattern): Likewise.
14865 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
14866 (vect_recog_widen_shift_pattern): Remove the type_in argument.
14867 (vect_recog_rotate_pattern): Likewise.
14868 (vect_recog_mult_pattern): Likewise.
14869 (vect_recog_vector_vector_shift_pattern): Likewise.
14870 (vect_recog_divmod_pattern): Likewise.
14871 (vect_recog_mixed_size_cond_pattern): Likewise.
14872 (vect_recog_bool_pattern): Likewise.
14873 (vect_recog_mask_conversion_pattern): Likewise.
14874 (vect_try_gather_scatter_pattern): Likewise.
14875 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14876 (vect_recog_over_widening_pattern): Likewise.
14877 (vect_recog_gather_scatter_pattern): Likewise.
14878 (vect_recog_func_ptr): Move from tree-vectorizer.h
14879 (vect_vect_recog_func_ptrs): Move further down the file.
14880 (vect_recog_func): Likewise. Remove the third argument.
14881 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14882 (vect_pattern_recog_1): Expect the pattern function to do any
14883 necessary target tests. Also expect it to provide a vector type.
14884 Remove the type_in handling.
14886 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14888 * tree-vect-patterns.c (vect_pattern_detected): New function.
14889 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14890 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14891 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14892 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14893 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14894 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14895 (vect_recog_mask_conversion_pattern)
14896 (vect_try_gather_scatter_pattern): Likewise.
14898 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14900 * tree-vect-patterns.c (vect_get_internal_def): New function.
14901 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14902 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14903 (search_type_for_mask_1): Use it.
14905 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14907 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14908 redundant WIDEN_SUM_EXPR handling.
14909 (vect_recog_sad_pattern): Likewise.
14911 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14913 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14914 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14915 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14916 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14917 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14919 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14921 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14922 use the stmt_vec_info of the original bb statement for the
14923 new zero assignment, even if the call is part of a pattern.
14925 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14927 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14928 that the sequence is attached to the original statement rather
14929 than the pattern statement.
14930 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14931 PATTERN_DEF_SEQ from the original statement rather than
14932 the main pattern statement.
14933 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14934 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14935 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14937 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14939 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14940 definition statements before the early exit for statements that aren't
14942 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14944 (vect_transform_loop): ...here. Process pattern definition
14945 statements without first checking whether the main pattern
14946 statement is live or relevant.
14948 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14950 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14951 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14953 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
14955 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14956 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14957 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14958 (expand_block_compare): Change select_block_compare_mode call.
14959 (expand_strncmp_align_check): Use new functions, fix comment.
14960 (emit_final_str_compare_gpr): New function.
14961 (expand_strn_compare): Refactor and clean up code.
14962 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14964 2018-06-19 Tony Reix <tony.reix@atos.com>
14965 Damien Bergamini <damien.bergamini@atos.com>
14966 David Edelsohn <dje.gcc@gmail.com>
14968 * collect2.c (static_obj): New variable.
14969 (static_libs): New variable.
14970 (is_in_list): Uncomment declaration.
14971 (main): Track AIX libraries linked statically.
14972 (is_in_list): Uncomment definition.
14973 (scan_prog_file): Don't add AIX shared libraries initializer
14974 to constructor list if linking statically.
14976 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
14978 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14980 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14982 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
14984 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14987 2018-06-19 Martin Liska <mliska@suse.cz>
14989 * config/i386/i386.c (ix86_can_inline_p): Do not use
14990 ipa_fn_summaries::get_create.
14991 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14993 (devirtualization_time_bonus): Likewise.
14994 (ipcp_propagate_stage): Likewise.
14995 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14996 (edge_set_predicate): Likewise.
14997 (evaluate_conditions_for_known_args): Likewise.
14998 (evaluate_properties_for_edge): Likewise.
14999 (ipa_call_summary::reset): Tranform to ...
15000 (ipa_call_summary::~ipa_call_summary): ... this.
15001 (ipa_fn_summary::reset): Transform to ...
15002 (ipa_fn_summary::~ipa_fn_summary): ... this.
15003 (ipa_fn_summary_t::remove): Rename to ...
15004 (ipa_fn_summary_t::remove_callees): ... this.
15005 (ipa_fn_summary_t::duplicate): Use placement new
15006 instead of memory copy.
15007 (ipa_call_summary_t::duplicate): Likewise.
15008 (ipa_call_summary_t::remove): Remove.
15009 (dump_ipa_call_summary): Change get_create to get.
15010 (ipa_dump_fn_summary): Dump only when summary exists.
15011 (analyze_function_body): Use symbol_summary::get instead
15013 (compute_fn_summary): Likewise.
15014 (estimate_edge_devirt_benefit): Likewise.
15015 (estimate_edge_size_and_time): Likewise.
15016 (inline_update_callee_summaries): Likewise.
15017 (remap_edge_change_prob): Likewise.
15018 (remap_edge_summaries): Likewise.
15019 (ipa_merge_fn_summary_after_inlining): Likewise.
15020 (write_ipa_call_summary): Likewise.
15021 (ipa_fn_summary_write): Likewise.
15022 (ipa_free_fn_summary): Likewise.
15023 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15024 (struct ipa_call_summary): Likewise.
15025 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15027 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15028 (estimate_size_after_inlining): Likewise.
15029 (estimate_growth): Likewise.
15030 (growth_likely_positive): Likewise.
15031 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15032 (inline_call): Likewise.
15033 * ipa-inline.c (caller_growth_limits): Likewise.
15034 (can_inline_edge_p): Likewise.
15035 (can_inline_edge_by_limits_p): Likewise.
15036 (compute_uninlined_call_time): Likewise.
15037 (compute_inlined_call_time): Likewise.
15038 (want_inline_small_function_p): Likewise.
15039 (edge_badness): Likewise.
15040 (update_caller_keys): Likewise.
15041 (update_callee_keys): Likewise.
15042 (inline_small_functions): Likewise.
15043 (inline_to_all_callers_1): Likewise.
15044 (dump_overall_stats): Likewise.
15045 (early_inline_small_functions): Likewise.
15046 (early_inliner): Likewise.
15047 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15048 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15049 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15050 * ipa-split.c (execute_split_functions): Likewise.
15051 * symbol-summary.h: Likewise.
15052 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15054 2018-06-19 Richard Biener <rguenther@suse.de>
15056 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15057 (vectorize_loops): ... here. Fix dbgcnt handling.
15058 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15060 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15063 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15064 ieee128 argument takes up only one (vector) register, not two (floating
15067 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15069 * gimplify.c (gimplify_init_constructor): Really never clear for an
15070 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15072 2018-06-19 Richard Biener <rguenther@suse.de>
15074 PR tree-optimization/86179
15075 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15076 after failed recognition.
15078 2018-06-18 Martin Sebor <msebor@redhat.com>
15080 PR middle-end/85602
15081 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15082 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15083 Handle integer subtraction.
15084 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15085 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15087 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15089 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15090 param from rtx to rtx_insn *.
15091 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15093 (frv_ifcvt_modify_insn): Likwise.
15094 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15095 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15096 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15097 as_a <rtx_insn *> cast to local "unprotected_region" once
15098 it's been established that it's not NULL or pc_rtx.
15099 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15100 param "sethi" from rtx to rtx_insn *.
15101 (nds32_group_float_insns): Likewise for param "insn".
15102 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15104 (vax_output_int_subtract): Likewise.
15105 * config/vax/vax.c (vax_output_int_add): Likewise for param
15107 (vax_output_int_subtract): Likewise.
15108 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15109 (emit_pattern_after): Likewise for param "after".
15110 (emit_insn_after): Likewise.
15111 (emit_jump_insn_after): Likewise.
15112 (emit_call_insn_after): Likewise.
15113 (emit_debug_insn_after): Likewise.
15114 (emit_pattern_before): Likewise for param "before".
15115 (emit_insn_before): Likewise.
15116 (emit_jump_insn_before): Likewise.
15117 * final.c (get_insn_template): Likewise for param "insn", removing
15119 * output.h (get_insn_template): Likewise for 2nd param.
15120 * rtl.h (emit_insn_before): Likewise.
15121 (emit_jump_insn_before): Likewise.
15122 (emit_debug_insn_before_noloc): Likewise.
15123 (emit_insn_after): Likewise.
15124 (emit_jump_insn_after): Likewise.
15125 (emit_call_insn_after): Likewise.
15126 (emit_debug_insn_after): Likewise.
15127 (set_insn_deleted): Likewise for param.
15129 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15132 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15133 floating point modes, so that IFmode is numerically greater than
15134 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15135 to declare the ordering. This prevents IFmode from being
15136 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15137 machine. Include rs6000-modes.h to share the fractional values
15138 between genmodes* and the rest of the compiler.
15139 (IFmode): Likewise.
15140 (KFmode): Likewise.
15141 (TFmode): Likewise.
15142 * config/rs6000/rs6000-modes.h: New file.
15143 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15144 meaning of rs6000_long_double_size so that 126..128 selects an
15145 appropriate 128-bit floating point type.
15146 (rs6000_option_override_internal): Likewise.
15147 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15148 (TARGET_LONG_DOUBLE_128): Change the meaning of
15149 rs6000_long_double_size so that 126..128 selects an appropriate
15150 128-bit floating point type.
15151 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15152 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15153 source and destination to match the standard usage.
15154 (truncifkf2): Likewise.
15155 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15156 ISA 2.07 to use an explicit clobber, instead of passing in a
15158 (copysign<mode>3_soft): Likewise.
15160 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15162 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15163 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15164 (vect_slp_analyze_instance_dependence): Likewise.
15165 (vect_enhance_data_refs_alignment): Likewise.
15166 (vect_analyze_data_refs_alignment): Likewise.
15167 (vect_slp_analyze_and_verify_instance_alignment
15168 (vect_analyze_data_ref_accesses): Likewise.
15169 (vect_prune_runtime_alias_test_list): Likewise.
15170 (vect_analyze_data_refs): Likewise.
15171 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15172 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15173 (vect_analyze_scalar_cycles_1): Likewise.
15174 (vect_get_loop_niters): Likewise.
15175 (vect_analyze_loop_form_1): Likewise.
15176 (vect_update_vf_for_slp): Likewise.
15177 (vect_analyze_loop_operations): Likewise.
15178 (vect_analyze_loop): Likewise.
15179 (vectorizable_induction): Likewise.
15180 (vect_transform_loop): Likewise.
15181 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15182 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15183 (vect_make_slp_decision): Likewise.
15184 (vect_detect_hybrid_slp): Likewise.
15185 (vect_slp_analyze_operations): Likewise.
15186 (vect_slp_bb): Likewise.
15187 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15188 (vectorizable_bswap): Likewise.
15189 (vectorizable_call): Likewise.
15190 (vectorizable_simd_clone_call): Likewise.
15191 (vectorizable_conversion): Likewise.
15192 (vectorizable_assignment): Likewise.
15193 (vectorizable_shift): Likewise.
15194 (vectorizable_operation): Likewise.
15195 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15197 2018-06-18 Martin Sebor <msebor@redhat.com>
15199 PR tree-optimization/81384
15200 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15201 * builtins.c (expand_builtin_strnlen): New function.
15202 (expand_builtin): Call it.
15203 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15204 * builtins.def (BUILT_IN_STRNLEN): New.
15205 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15206 Warn for bounds in excess of maximum object size.
15207 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15208 single-value ranges. Handle strnlen.
15209 (handle_builtin_strlen): Handle strnlen.
15210 (strlen_check_and_optimize_stmt): Same.
15211 * doc/extend.texi (Other Builtins): Document strnlen.
15213 2018-06-18 Maya Rashish <coypu@sdf.org>
15215 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15216 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15217 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15219 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15221 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15223 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15225 * tree.c (escaped_string::escape): Replace cast to char * by
15226 const_cast<char *> (unescaped).
15228 2018-06-18 Nick Clifton <nickc@redhat.com>
15231 * tree.c (escaped_string): New class. Converts an unescaped
15232 string into its escaped equivalent.
15233 (warn_deprecated_use): Use the new class to convert the
15234 deprecation message, if present.
15235 (test_escaped_strings): New self test.
15236 (test_c_tests): Add test_escaped_strings.
15237 * doc/extend.texi (deprecated): Add a note that the
15238 deprecation message is affected by the -fmessage-length
15239 option, and that control characters will be escaped.
15240 (#pragma GCC error): Document this pragma.
15241 (#pragma GCC warning): Likewise.
15242 * doc/invoke.texi (-fmessage-length): Document this option's
15243 effect on the #warning and #error preprocessor directives and
15244 the deprecated attribute.
15246 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15248 * tree.c (decl_value_expr_lookup): Revert latest change.
15249 (decl_value_expr_insert): Likewise.
15251 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15253 * gimplify.c (nonlocal_vlas): Delete.
15254 (nonlocal_vla_vars): Likewise.
15255 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15257 (gimplify_body): Do not create and destroy nonlocal_vlas.
15258 * tree-nested.c: Include diagnostic.h.
15259 (use_pointer_in_frame): Tweak.
15260 (lookup_field_for_decl): Add assertion and declare the transformation.
15261 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15262 internal error when the reference is in a wrong context. Do not
15263 create a debug decl by default.
15264 (note_nonlocal_block_vlas): Delete.
15265 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15266 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15267 create a debug decl by default.
15268 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15269 call is in a wrong context.
15270 (fixup_vla_decls): New function.
15271 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15272 debug variables were created.
15273 * tree.c (decl_value_expr_lookup): Add checking assertion.
15274 (decl_value_expr_insert): Likewise.
15276 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15278 PR middle-end/82479
15279 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15280 * tree-scalar-evolution.c (interpret_expr): Likewise.
15281 (expression_expensive_p): Likewise.
15282 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15283 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15284 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15285 (ssa_defined_by_minus_one_stmt_p): New.
15287 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15289 PR middle-end/64946
15290 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15291 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15292 * dojump.c (do_jump): Likewise.
15293 * expr.c (expand_expr_real_2): Check operand type's sign.
15294 * fold-const.c (const_unop): Handle ABSU_EXPR.
15295 (fold_abs_const): Likewise.
15296 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15297 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15298 (strip_sign_op_1): Likesise.
15299 * match.pd: Add new pattern to generate ABSU_EXPR.
15300 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15301 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15302 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15303 * tree-inline.c (estimate_operator_cost): Likewise.
15304 * tree-pretty-print.c (dump_generic_node): Likewise.
15305 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15306 * tree.def (ABSU_EXPR): New.
15308 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15310 PR middle-end/86095
15311 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15312 documented as preserved for backward compatibility only.
15313 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15315 PR rtl-optimization/86108
15316 * bb-reorder.c (create_forwarder_block): Renamed to ...
15317 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15318 jump from new landing pad to the second part.
15319 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15322 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15324 PR middle-end/85878
15325 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15326 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15327 Only call store_expr for halves if the mode is the same.
15329 PR middle-end/86123
15330 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15331 Fix up comment formatting.
15333 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15335 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15336 (typed_splay_tree::closure,
15337 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15338 (typed_splay_tree::typed_splay_tree,
15339 typed_splay_tree::operator =): Declared private.
15340 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15341 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15342 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15343 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15344 typed_splay_tree::splay_tree_splay,
15345 typed_splay_tree::splay_tree_foreach_helper,
15346 typed_splay_tree::splay_tree_insert,
15347 typed_splay_tree::splay_tree_remove,
15348 typed_splay_tree::splay_tree_lookup,
15349 typed_splay_tree::splay_tree_predecessor,
15350 typed_splay_tree::splay_tree_successor,
15351 typed_splay_tree::splay_tree_min,
15352 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15353 (typed_splay_tree::root, typed_splay_tree::comp,
15354 typed_splay_tree::delete_key,
15355 typed_splay_tree::delete_value): New data members.
15356 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15357 typed_splay_tree::remove.
15359 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15361 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15362 -mginv and -mno-ginv to the assembler.
15363 * config/mips/mips.opt (-mcrc): New option.
15364 (-mginv): Likewise.
15365 * doc/invoke.text (-mcrc): Document.
15366 (-mginv): Likewise.
15368 2018-06-15 Nick Clifton <nickc@redhat.com>
15371 * tree.c (escaped_string): New class. Converts an unescaped
15372 string into its escaped equivalent.
15373 (warn_deprecated_use): Use the new class to convert the
15374 deprecation message, if present.
15375 (test_escaped_strings): New self test.
15376 (test_c_tests): Add test_escaped_strings.
15377 * doc/extend.texi (deprecated): Add a note that the
15378 deprecation message is affected by the -fmessage-length
15379 option, and that control characters will be escaped.
15380 (#pragma GCC error): Document this pragma.
15381 (#pragma GCC warning): Likewise.
15382 * doc/invoke.texi (-fmessage-length): Document this option's
15383 effect on the #warning and #error preprocessor directives and
15384 the deprecated attribute.
15386 2018-06-15 Richard Biener <rguenther@suse.de>
15388 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15389 here, also noting vector size used.
15390 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15391 size used in MSG_OPTIMIZED_LOCATIONS dump.
15392 (pass_slp_vectorize::execute): Adjust.
15394 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15397 * config/arc/arc.c (arc_return_address_register): Fix
15400 2018-06-15 Richard Biener <rguenther@suse.de>
15402 PR middle-end/86159
15403 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15404 leave useless conversion stripping to force_gimple_operand_gsi.
15405 (gimplify_build2): Likewise.
15406 (gimplify_build1): Likewise.
15408 2018-06-15 Richard Biener <rguenther@suse.de>
15410 PR middle-end/86076
15411 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15412 before adjusting their block.
15414 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15416 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15417 multilibs for *-*-rtems*.
15418 * config/riscv/t-rtems: New file.
15420 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15422 PR middle-end/86122
15423 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15424 unsigned_type_for returns NULL.
15427 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15428 subregs of multi-word pseudos unless the float mode has word size.
15430 2018-06-14 Richard Biener <rguenther@suse.de>
15432 PR middle-end/86139
15433 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15434 duplicate and harmful type_hash_canon.
15435 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15437 2018-06-14 Richard Biener <rguenther@suse.de>
15440 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15443 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15445 * config/rtems.h (STDINT_LONG32): Define.
15447 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15448 Prachi Godbole <prachi.godbole@imgtec.com>
15450 * config/mips/mips-cpus.def: Define P6600.
15451 * config/mips/mips-tables.opt: Regenerate.
15452 * config/mips/mips.c (mips_ucbranch_type): New enum.
15453 (mips_rtx_cost_data): Add support for P6600.
15454 (mips_issue_rate): Likewise.
15455 (mips_multipass_dfa_lookahead): Likewise.
15456 (mips_avoid_hazard): Likewise.
15457 (mips_reorg_process_insns): Likewise.
15458 (mips_classify_branch_p6600): New function.
15459 * config/mips/mips.h (TUNE_P6600): New define.
15460 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15461 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15462 * config/mips/mips.md: Include p6600.md.
15463 (processor): Add p6600.
15464 * config/mips/p6600.md: New file.
15465 * doc/invoke.texi: Add p6600 to supported architectures.
15467 2018-06-13 Martin Sebor <msebor@redhat.com>
15469 PR tree-optimization/86114
15470 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15472 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15474 2018-06-13 Richard Biener <rguenther@suse.de>
15476 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15477 Properly set vector type of the intermediate stmt.
15478 * tree-vect-stmts.c (vectorizable_operation): The destination
15479 var always has vectype_out type.
15481 2018-06-13 Jeff Law <law@redhat.com>
15483 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15484 integer 0 for argument to print_rtl_with_bb.
15485 (rl78_reorg): Likewise.
15487 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15489 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15490 from rtx to rtx_insn *.
15491 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15493 (add_sched_insns_for_speculation): Likewise for local "target",
15494 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15495 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15496 from rtx_insn ** to rtx_code_label **.
15497 (reorg_emit_nops): Likewise.
15498 (c6x_reorg): Likewise for local "call_labels".
15499 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15501 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15502 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15503 the loops over LABEL_REFS.
15504 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15506 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15507 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15508 (split_branches): Strengthen local "olabel" from rtx to
15509 rtx_insn *, adding a safe_as_a cast.
15510 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15512 (add_insn_after): Likewise for first two params.
15513 (add_insn_before): Likewise.
15514 (remove_insn): Likewise for param.
15515 (emit_pattern_before_noloc): Likewise for second and third params.
15516 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15517 (emit_call_insn_before_noloc): Likewise.
15518 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15520 (emit_barrier_before): Likewise.
15521 (emit_label_before): Strengthen "label" param from "rtx" to
15522 "rtx_code_label *". Strengthen "before" param from "rtx" to
15524 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15526 (emit_pattern_after_noloc): Likewise.
15527 (emit_insn_after_noloc): Likewise.
15528 (emit_jump_insn_after_noloc): Likewise.
15529 (emit_call_insn_after_noloc): Likewise.
15530 (emit_debug_insn_after_noloc): Likewise.
15531 (emit_barrier_after): Likewise.
15532 (emit_label_after): Likewise for both params.
15533 (emit_pattern_after_setloc): Likewise for "after" param. Convert
15534 "loc" param from "int" to "location_t".
15535 (emit_insn_after_setloc): Likewise.
15536 (emit_jump_insn_after_setloc): Likewise.
15537 (emit_call_insn_after_setloc): Likewise.
15538 (emit_debug_insn_after_setloc): Likewise.
15539 (emit_pattern_before_setloc): Likewise for "before" param. Convert
15540 "loc" param from "int" to "location_t".
15541 (emit_pattern_before): Convert NULL_RTX to NULL.
15542 (emit_insn_before_setloc): Convert "loc" param from "int" to
15544 (emit_jump_insn_before_setloc): Likewise.
15545 (emit_call_insn_before_setloc): Likewise.
15546 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15547 rtx_insn *. Convert "loc" param from "int" to "location_t".
15548 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15549 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15550 Convert 3rd param from "int" to "location_t".
15551 (emit_barrier_before, emit_barrier_after, next_real_insn):
15552 Strengthen param from rtx to rtx_insn *.
15553 (emit_label_before): Strengthen 1st param from "rtx" to
15554 "rtx_code_label *". Strengthen 2nd param from "rtx" to
15556 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15557 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15558 Strengthen 2nd param from "rtx" to "rtx_insn *".
15559 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15560 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15561 Likewise. Convert 3rd param from "int" to "location_t".
15562 (emit_label_after): Strengthen 1st param from "rtx" to
15563 "rtx_code_label *".
15564 (next_real_insn, remove_insn): Strengthen param from "rtx" to
15566 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15567 from "rtx" to "rtx_insn *".
15569 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
15571 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15572 bodies streamed in with -Q.
15573 * dumpfile.c (dump_files): Add lto-stream-out dump file.
15574 * dumpfile.h (tree_dump_index): Add lto_stream_out.
15575 * gimple-streamer-out.c: Include gimple-pretty-print.h
15576 (output_bb): Dump stmts streamed.
15577 * lto-section-out.c: Include print-tree.h
15578 (lto_begin_section): Dump sections created.
15579 (lto_output_decl_index): Dump decl encoded.
15580 * lto-streamer-out.c: Include print-tree.h
15581 (create_output_block): Dump output block created.
15582 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15583 (output_function): Dump function output.
15584 (output_constructor): Dump constructor streamed.
15585 (write_global_stream): Output indexes encoded.
15586 (produce_asm_for_decls): Dump streams encoded.
15587 * lto-streamer.c (streamer_dump_file): New global var.
15588 * lto-streamer.h (streamer_dump_file): Declare.
15589 * passes.c (ipa_write_summaries): Initialize streamer dump.
15590 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15593 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
15596 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15597 offsets for register save directives. Emit a second batch of save
15598 directives, if need be, when the function accesses prior frames.
15600 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15602 * config/arc/fpu.md (fmasf4): Force operand to register.
15603 (fnmasf4): Likewise.
15605 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15607 * config/arc/arc-protos.h (arc_pad_return): Remove.
15608 * config/arc/arc.c (machine_function): Remove force_short_suffix
15610 (arc_print_operand): Adjust printing of '&'.
15611 (arc_verify_short): Remove conditional printing of short suffix.
15612 (arc_final_prescan_insn): Remove reference to size_reason.
15613 (pad_return): New function.
15614 (arc_reorg): Call pad_return.
15615 (arc_pad_return): Remove.
15616 (arc_init_machine_status): Remove reference to force_short_suffix.
15617 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15618 (attr length): When attribute iscompact is true force to 2
15619 regardless; in the case of maybe check if we want to force the
15620 instruction to have 4 bytes length.
15621 (nopv): Change it to generate 4 byte long nop as well.
15622 (blockage): New pattern.
15623 (simple_return): Remove call to arc_pad_return.
15624 (p_return_i): Likewise.
15626 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15628 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15630 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15632 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15635 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15637 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15638 for ARC700 and ARCv2.
15640 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15643 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15644 operands[2] instead of operands[1].
15647 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15649 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15650 case, check whether the outer register overlaps an unallocatable
15651 register, not just whether it fits the required class.
15653 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15655 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15657 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15658 (memrefs_conflict_p): Likewise.
15659 (init_alias_analysis): Likewise.
15660 * cfgexpand.c (expand_debug_expr): Likewise.
15661 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15662 * cse.c (fold_rtx): Likewise.
15663 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15664 * expr.c (emit_block_move_hints): Likewise.
15665 (clear_storage_hints, push_block, emit_push_insn): Likewise.
15666 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15667 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15668 (emit_group_store): Likewise.
15669 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
15670 to read the PRE/POST_MODIFY increment.
15671 * calls.c (store_one_arg): Use strip_offset.
15672 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15674 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15676 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15677 (simplify_binary_operation_1): Extend CONST_INT handling to
15679 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15680 than a HOST_WIDE_INT.
15681 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15683 (adjust_mems, add_stores): Update accodingly.
15684 (vt_canonicalize_addr): Track polynomial offsets.
15685 (emit_note_insn_var_location): Likewise.
15686 (vt_add_function_parameter): Likewise.
15687 (vt_initialize): Likewise.
15689 2018-06-12 Jeff Law <law@redhat.com>
15691 * config.gcc (alpha*-*-freebsd*): Remove.
15692 * config/alpha/freebsd.h: Remove.
15694 2018-06-12 David Malcolm <dmalcolm@redhat.com>
15697 * spellcheck-tree.c (levenshtein_distance): Rename to...
15698 (get_edit_distance): ...this, and update for underlying renaming.
15699 * spellcheck-tree.h (levenshtein_distance): Rename to...
15700 (get_edit_distance): ...this.
15701 * spellcheck.c (levenshtein_distance): Rename to...
15702 (get_edit_distance): ...this. Convert from Levenshtein distance
15703 to Damerau-Levenshtein distance by supporting transpositions of
15704 adjacent characters. Rename "v1" to "v_next" and "v0" to
15706 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15707 (selftest::test_edit_distance_unit_test_oneway): ...this, and
15708 update for underlying renaming.
15709 (selftest::levenshtein_distance_unit_test): Rename to...
15710 (selftest::test_get_edit_distance_unit): ...this, and update for
15711 underlying renaming.
15712 (selftest::test_find_closest_string): Add example from PR 69968
15713 where transposition helps
15714 (selftest::test_metric_conditions): Update for renaming.
15715 (selftest::test_metric_conditions): Likewise.
15716 (selftest::spellcheck_c_tests): Likewise.
15717 * spellcheck.h (levenshtein_distance): Rename both overloads to...
15718 (get_edit_distance): ...this.
15719 (best_match::consider): Update for renaming.
15721 2018-06-12 Martin Sebor <msebor@redhat.com>
15723 PR tree-optimization/85259
15724 * builtins.c (compute_objsize): Handle constant offsets.
15725 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15726 true iff a warning has been issued.
15727 * gimple.h (gimple_nonartificial_location): New function.
15728 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15729 gimple_nonartificial_location and handle -Wno-system-headers.
15730 (handle_builtin_stxncpy): Same.
15732 2018-06-12 Martin Sebor <msebor@redhat.com>
15735 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15737 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
15739 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15740 BUILTIN_VEC_XST entries for pointer to double and long long.
15742 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
15745 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15747 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15750 2018-06-12 Martin Liska <mliska@suse.cz>
15752 * doc/options.texi: Document IntegerRange.
15754 2018-06-12 Martin Liska <mliska@suse.cz>
15756 * config/i386/i386.opt: Make MPX-related options as Deprecated.
15757 * opt-functions.awk: Handle Deprecated flag.
15758 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15760 (read_cmdline_option): Report warning for a deprecated option.
15761 * opts.h (struct cl_option): Add new field cl_deprecated.
15762 (CL_ERR_DEPRECATED): New.
15764 2018-06-12 Martin Liska <mliska@suse.cz>
15766 * doc/options.texi: Document Deprecated option flag.
15768 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15770 * config/arc/arc-arch.h (arc_extras): New enum.
15771 (arc_cpu_t):Add field extra.
15772 (arc_cpu_types): Consider the extras.
15773 * config/arc/arc-cpus.def: Add extras info.
15774 * config/arc/arc-opts.h (processor_type): Consider extra field.
15775 * config/arc/arc.c (arc_override_options): Handle extra field.
15777 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15779 * config/arc/arc-arch.h: Update ARC_OPTX macro.
15780 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15782 * config/arc/arc.c (arc_init): Update pic warning.
15783 (irq_range): Update irq range parsing warnings.
15784 (arc_override_options): Update various warning messages.
15785 (arc_handle_aux_attribute): Likewise.
15787 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
15789 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15791 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15793 * doc/sourcebuild.texi: Document usage of line number 0 in verify
15794 compiler messages directives.
15796 2018-06-12 Matthew Fortune <mfortune@gmail.com>
15798 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15799 * config/mips/mips-tables.opt: Regenerate.
15800 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15802 * doc/invoke.texi: Document -march=i6500.
15804 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
15806 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15807 (i6400_gpmul): Add cpu_unit.
15808 (i6400_gpdiv): Likewise.
15809 (i6400_msa_add_d): Update reservations.
15810 (i6400_msa_int_add) Likewise.
15811 (i6400_msa_short_logic3) Likewise.
15812 (i6400_msa_short_logic2) Likewise.
15813 (i6400_msa_short_logic) Likewise.
15814 (i6400_msa_move) Likewise.
15815 (i6400_msa_cmp) Likewise.
15816 (i6400_msa_short_float2) Likewise.
15817 (i6400_msa_div_d) Likewise.
15818 (i6400_msa_long_logic1) Likewise.
15819 (i6400_msa_long_logic2) Likewise.
15820 (i6400_msa_mult) Likewise.
15821 (i6400_msa_long_float2) Likewise.
15822 (i6400_msa_long_float4) Likewise.
15823 (i6400_msa_long_float5) Likewise.
15824 (i6400_msa_long_float8) Likewise.
15825 (i6400_fpu_fadd): Include frint type.
15826 (i6400_fpu_store): New define_insn_reservation.
15827 (i6400_fpu_load): Likewise.
15828 (i6400_fpu_move): Likewise.
15829 (i6400_fpu_fcmp): Likewise.
15830 (i6400_fpu_fmadd): Likewise.
15831 (i6400_int_mult): Include imul3nc type and update reservation.
15832 (i6400_int_div): Include idiv3 type and update reservation.
15833 (i6400_int_load): Update to check type not move_type.
15834 (i6400_int_store): Likewise.
15835 (i6400_int_prefetch): Set zero latency.
15837 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
15839 * gcc.c: Document new %@{...} sequence.
15840 (LINK_COMMAND_SPEC): Use it for the -L switches.
15841 (cpp_unique_options): Use it for the -I switches.
15842 (at_file_argbuf): New global variable.
15843 (in_at_file): Likewise.
15844 (alloc_args): Create at_file_argbuf.
15845 (clear_args): Truncate at_file_argbuf.
15846 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15847 (open_at_file): New function.
15848 (close_at_file): Likewise.
15849 (create_at_file): Delete.
15850 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15853 (validate_switches_from_spec): Deal with %@{...} sequence.
15854 (validate_switches): Likewise.
15855 (driver::finalize): Call clear_args.
15857 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
15859 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15861 2018-06-11 Martin Sebor <msebor@redhat.com>
15863 * doc/invoke.texi (-Wall): List -Wc++17-compat.
15864 (Wno-class-memaccess): Add @opindex.
15865 (Wno-templates, Wno-multiple-inheritance): Same.
15866 (Wno-virtual-inheritance, Wno-namespaces): Same.
15867 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15868 (Wno-format-overflow, Wno-format-truncation): Same.
15869 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15870 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15871 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15872 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15873 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15874 (Wno-misspelled-isr): Same.
15876 2018-06-11 Martin Sebor <msebor@redhat.com>
15878 * PR tree-optimization/86083
15879 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15881 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15883 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15885 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15888 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15889 on the correct operand.
15890 (*movdi_internal64): Ditto.
15892 2018-06-11 Martin Liska <mliska@suse.cz>
15894 PR tree-optimization/86089
15895 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15897 2018-06-11 Julia Koval <julia.koval@intel.com>
15899 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15900 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15901 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15903 2018-06-11 Olivier Hainque <hainque@adacore.com>
15905 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15906 for Ada with strict dwarf2.
15908 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15911 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15914 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15916 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15918 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15920 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15923 2018-06-08 Martin Liska <mliska@suse.cz>
15925 * tree-cfg.h (debug_function): Fix argument type to match
15928 2018-06-08 Martin Liska <mliska@suse.cz>
15930 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15931 Remove usage of MPX-related (and removed) fields.
15932 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15934 2018-06-08 David Malcolm <dmalcolm@redhat.com>
15936 * cfg.c (debug): Use TDF_NONE rather than 0.
15937 * cfghooks.c (debug): Likewise.
15938 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15939 (struct dump_option_value_info): Convert to...
15940 (struct kv_pair): ...this template type.
15941 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15943 (optinfo_verbosity_options): Likewise.
15944 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15946 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15947 than int for "optgroup_flags" param.
15948 (dump_generic_expr_loc): Use dump_flags_t rather than int for
15950 (dump_dec): Likewise.
15951 (dump_finish): Use TDF_NONE rather than 0.
15952 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15953 rather than int for "optgroup_flags" param. Use TDF_NONE rather
15954 than 0. Update for change to option_ptr.
15955 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15956 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
15957 0. Update for changes to optinfo_verbosity_options and
15959 (opt_info_switch_p): Convert optgroup_flags from int to
15961 (dump_basic_block): Use dump_flags_t rather than int
15962 for "dump_kind" param.
15963 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15964 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15965 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15966 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15967 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15968 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15969 TDF_NONE): Convert from macros to...
15970 (enum dump_flag): ...this new enum.
15971 (dump_flags_t): Update to use enum.
15972 (operator|, operator&, operator~, operator|=, operator&=):
15973 Implement for dump_flags_t.
15974 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15975 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15976 Convert from macros to...
15977 (enum optgroup_flag): ...this new enum.
15978 (optgroup_flags_t): New typedef.
15979 (operator|, operator|=): Implement for optgroup_flags_t.
15980 (struct dump_file_info): Convert field "alt_flags" to
15981 dump_flags_t. Convert field "optgroup_flags" to
15983 (dump_basic_block): Use dump_flags_t rather than int for param.
15984 (dump_generic_expr_loc): Likewise.
15985 (dump_dec): Likewise.
15986 (dump_register): Convert param "optgroup_flags" to
15988 (opt_info_enable_passes): Likewise.
15989 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15991 * gimple-pretty-print.c (debug): Likewise.
15992 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15993 (merged_store_group::apply_stores): Likewise.
15994 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15995 * gimple.c (verify_gimple_pp): Likewise.
15996 * graphite-poly.c (print_pbb_body): Likewise.
15997 * passes.c (pass_manager::register_one_dump_file): Convert
15998 local "optgroup_flags" to optgroup_flags_t.
15999 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16001 (debug_body): Likewise.
16002 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16003 to optgroup_flags_t.
16004 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16006 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16007 (convert_mult_to_fma): Likewise.
16008 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16009 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16010 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16011 "dump_kind" to dump_flags_t.
16013 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16015 * config/rs6000/rs6000.c (min, max): Delete.
16017 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16019 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16020 -mabi=spe and -mabi=no-spe.
16022 2018-06-08 Martin Liska <mliska@suse.cz>
16024 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16025 where we expect an existing summary.
16027 2018-06-08 Martin Liska <mliska@suse.cz>
16029 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16030 * ipa-inline.h (estimate_edge_growth): Likewise.
16032 2018-06-08 Martin Liska <mliska@suse.cz>
16034 * cgraph.c (function_version_hasher::hash): Use
16035 cgraph_node::get_uid ().
16036 (function_version_hasher::equal):
16037 * cgraph.h (cgraph_node::get_uid): New method.
16038 * ipa-inline.c (update_caller_keys): Use
16039 cgraph_node::get_uid ().
16040 (update_callee_keys): Likewise.
16041 * ipa-utils.c (searchc): Likewise.
16042 (ipa_reduced_postorder): Likewise.
16043 * lto-cgraph.c (input_node): Likewise.
16044 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16045 * symbol-summary.h (symtab_insertion): Likewise.
16046 (symtab_removal): Likewise.
16047 (symtab_duplication): Likewise.
16048 * tree-pretty-print.c (dump_function_header): Likewise.
16049 * tree-sra.c (convert_callers_for_node): Likewise.
16051 2018-06-08 Martin Liska <mliska@suse.cz>
16053 * cgraph.c (symbol_table::create_edge): Always assign a new
16055 (symbol_table::free_edge): Do not recycle numbers.
16056 * cgraph.h (cgraph_edge::get): New method.
16057 * symbol-summary.h (symtab_removal): Use it.
16058 (symtab_duplication): Likewise.
16059 (call_summary::hashable_uid): Remove.
16061 2018-06-08 Martin Liska <mliska@suse.cz>
16063 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16064 (initialize_growth_caches): Remove.
16065 (free_growth_caches): Likewise.
16066 (do_estimate_edge_time): Use edge_growth_cache.
16067 (do_estimate_edge_size): Likewise.
16068 (do_estimate_edge_hints): Likewise.
16069 * ipa-inline.c (reset_edge_caches): Likewise.
16070 (recursive_inlining): Likewise.
16071 (inline_small_functions): Likewise.
16072 * ipa-inline.h (initialize_growth_caches): Remove.
16073 (estimate_edge_size): Likewise.
16074 (estimate_edge_time): Likewise.
16075 (estimate_edge_hints): Likewise.
16076 (reset_edge_growth_cache): Likewise.
16077 * symbol-summary.h (call_summary::remove): New method.
16079 2018-06-08 Martin Liska <mliska@suse.cz>
16081 * ipa-cp.c (class edge_clone_summary): New summary.
16082 (grow_edge_clone_vectors): Remove.
16083 (ipcp_edge_duplication_hook): Remove.
16084 (class edge_clone_summary_t): New call_summary class.
16085 (ipcp_edge_removal_hook): Remove.
16086 (edge_clone_summary_t::duplicate): New function.
16087 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16088 (create_specialized_node): Likewise.
16089 (ipcp_driver): Initialize edge_clone_summaries and do not
16092 2018-06-08 Martin Liska <mliska@suse.cz>
16094 * symbol-summary.h (get): New function.
16095 (call_summary::m_initialize_when_cloning): New class member.
16097 2018-06-08 Martin Liska <mliska@suse.cz>
16099 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16100 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16101 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16102 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16103 (remove_cgraph_node_from_order): Use the removed_nodes set.
16104 (do_per_function_toporder): Likwise.
16105 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16106 instead of summary_uid.
16107 (symtab_removal): Likewise.
16108 (symtab_duplication): Likewise.
16110 2018-06-08 Martin Liska <mliska@suse.cz>
16112 * ipa-cp.c (ipcp_store_bits_results): Use
16113 ipcp_transformation_sum.
16114 (ipcp_store_vr_results): Likewise.
16115 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16117 (ipcp_transformation_initialize): ... this.
16118 (ipa_set_node_agg_value_chain):
16119 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16120 (write_ipcp_transformation_info): Likewise.
16121 (read_ipcp_transformation_info): Likewise.
16122 (ipcp_update_bits): Likewise.
16123 (ipcp_update_vr): Likewise.
16124 (ipcp_transform_function): Likewise.
16125 * ipa-prop.h: Rename ipcp_transformation_summary to
16126 ipcp_transformation.
16127 (class ipcp_transformation_t): New function summary.
16128 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16129 (ipa_get_agg_replacements_for_node): Likewise.
16131 2018-06-08 Martin Liska <mliska@suse.cz>
16133 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16135 (class funct_state_summary_t): New function_summary class.
16136 (has_function_state): Remove.
16137 (get_function_state): Likewise.
16138 (set_function_state): Likewise.
16139 (add_new_function): Likewise.
16140 (funct_state_summary_t::insert): New function.
16141 (duplicate_node_data): Remove.
16142 (remove_node_data): Remove.
16143 (funct_state_summary_t::duplicate): New function.
16144 (register_hooks): Create new funct_state_summaries.
16145 (pure_const_generate_summary): Use it.
16146 (pure_const_write_summary): Likewise.
16147 (pure_const_read_summary): Likewise.
16148 (propagate_pure_const): Likewise.
16149 (propagate_nothrow): Likewise.
16150 (dump_malloc_lattice): Likewise.
16151 (propagate_malloc): Likewise.
16152 (execute): Do not register hooks, just remove summary
16154 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16157 2018-06-08 Martin Liska <mliska@suse.cz>
16159 * ipa-reference.c (remove_node_data): Remove.
16160 (duplicate_node_data): Likewise.
16161 (class ipa_ref_var_info_summary_t): New class.
16162 (class ipa_ref_opt_summary_t): Likewise.
16163 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16164 (get_reference_optimization_summary): Use
16165 ipa_ref_opt_sum_summaries.
16166 (set_reference_vars_info): Remove.
16167 (set_reference_optimization_summary): Likewise.
16168 (ipa_init): Create summaries.
16169 (init_function_info): Use function summary.
16170 (ipa_ref_opt_summary_t::duplicate): New function.
16171 (ipa_ref_opt_summary_t::remove): New function.
16172 (get_read_write_all_from_node): Fix GNU coding style.
16173 (propagate): Use function summary.
16174 (write_node_summary_p): Fix GNU coding style.
16175 (stream_out_bitmap): Likewise.
16176 (ipa_reference_read_optimization_summary): Use function summary.
16177 (ipa_reference_c_finalize): Do not release hooks.
16179 2018-06-08 Martin Liska <mliska@suse.cz>
16181 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16182 (analyze_function_body): Extract multiple calls of get_create.
16183 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16184 * ipa-inline.c (recursive_inlining): Use ::get method.
16185 * ipa-inline.h (estimate_edge_growth): Likewise.
16187 2018-06-08 Martin Liska <mliska@suse.cz>
16189 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16191 (hsa_function_summary::hsa_function_summary): Use the new enum
16193 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16194 * hsa-gen.c (hsa_get_host_function): Likewise.
16195 (get_brig_function_name): Likewise.
16196 * ipa-hsa.c (process_hsa_functions): Likewise.
16197 (ipa_hsa_write_summary): Likewise.
16198 * symbol-summary.h (symtab_duplication): Use ::get function/
16199 (get): New function.
16201 2018-06-08 Martin Liska <mliska@suse.cz>
16203 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16205 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16206 (hsa_register_kernel): Likewise.
16207 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16208 * hsa-gen.c (hsa_get_host_function): Likewise.
16209 (get_brig_function_name): Likewise.
16210 (generate_hsa): Likewise.
16211 (pass_gen_hsail::execute): Likewise.
16212 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16213 (devirtualization_time_bonus): Likewise.
16214 (ipcp_propagate_stage): Likewise.
16215 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16216 (edge_set_predicate): Likewise.
16217 (evaluate_conditions_for_known_args): Likewise.
16218 (evaluate_properties_for_edge): Likewise.
16219 (ipa_fn_summary::reset): Likewise.
16220 (ipa_fn_summary_t::duplicate): Likewise.
16221 (dump_ipa_call_summary): Likewise.
16222 (ipa_dump_fn_summary): Likewise.
16223 (analyze_function_body): Likewise.
16224 (compute_fn_summary): Likewise.
16225 (estimate_edge_devirt_benefit): Likewise.
16226 (estimate_edge_size_and_time): Likewise.
16227 (estimate_calls_size_and_time): Likewise.
16228 (estimate_node_size_and_time): Likewise.
16229 (inline_update_callee_summaries): Likewise.
16230 (remap_edge_change_prob): Likewise.
16231 (remap_edge_summaries): Likewise.
16232 (ipa_merge_fn_summary_after_inlining): Likewise.
16233 (ipa_update_overall_fn_summary): Likewise.
16234 (read_ipa_call_summary): Likewise.
16235 (inline_read_section): Likewise.
16236 (write_ipa_call_summary): Likewise.
16237 (ipa_fn_summary_write): Likewise.
16238 (ipa_free_fn_summary): Likewise.
16239 * ipa-hsa.c (process_hsa_functions): Likewise.
16240 (ipa_hsa_write_summary): Likewise.
16241 (ipa_hsa_read_section): Likewise.
16242 * ipa-icf.c (sem_function::merge): Likewise.
16243 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16244 (do_estimate_edge_time): Likewise.
16245 (estimate_size_after_inlining): Likewise.
16246 (estimate_growth): Likewise.
16247 (growth_likely_positive): Likewise.
16248 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16249 (inline_call): Likewise.
16250 * ipa-inline.c (caller_growth_limits): Likewise.
16251 (can_inline_edge_p): Likewise.
16252 (can_inline_edge_by_limits_p): Likewise.
16253 (compute_uninlined_call_time): Likewise.
16254 (compute_inlined_call_time): Likewise.
16255 (want_inline_small_function_p): Likewise.
16256 (edge_badness): Likewise.
16257 (update_caller_keys): Likewise.
16258 (update_callee_keys): Likewise.
16259 (recursive_inlining): Likewise.
16260 (inline_small_functions): Likewise.
16261 (inline_to_all_callers_1): Likewise.
16262 (dump_overall_stats): Likewise.
16263 (early_inline_small_functions): Likewise.
16264 (early_inliner): Likewise.
16265 * ipa-inline.h (estimate_edge_growth): Likewise.
16266 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16267 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16268 * ipa-prop.h (IPA_NODE_REF): Likewise.
16269 (IPA_EDGE_REF): Likewise.
16270 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16271 (propagate_malloc): Likewise.
16272 * ipa-split.c (execute_split_functions): Likewise.
16273 * symbol-summary.h: Rename get to get_create.
16275 (get_create): Likewise.
16276 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16278 2018-06-08 Martin Liska <mliska@suse.cz>
16280 * symbol-summary.h (release): Move definition out of class
16282 (symtab_removal): Likewise.
16283 (symtab_duplication): Likewise.
16285 2018-06-08 Martin Liska <mliska@suse.cz>
16287 * symbol-summary.h (function_summary): Move constructor
16288 implementation out of class declaration.
16289 (release): Likewise.
16290 (symtab_insertion): Likewise.
16291 (symtab_removal): Likewise.
16292 (symtab_duplication): Likewise.
16295 2018-06-08 Martin Liska <mliska@suse.cz>
16297 * Makefile.in: Remove support for MPX (macros, related functions,
16298 fields in cgraph_node, ...).
16299 * builtin-types.def (BT_BND): Likewise.
16300 (BT_FN_BND_CONST_PTR): Likewise.
16301 (BT_FN_CONST_PTR_BND): Likewise.
16302 (BT_FN_VOID_PTR_BND): Likewise.
16303 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16304 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16305 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16306 (expand_builtin_mempcpy_with_bounds): Likewise.
16307 (expand_builtin_memset_with_bounds): Likewise.
16308 (expand_builtin_memset_args): Likewise.
16309 (std_expand_builtin_va_start): Likewise.
16310 (expand_builtin): Likewise.
16311 (expand_builtin_with_bounds): Likewise.
16312 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16313 (DEF_LIB_BUILTIN_CHKP): Likewise.
16314 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16315 (DEF_CHKP_BUILTIN): Likewise.
16316 (BUILT_IN_MEMCPY): Likewise.
16317 (BUILT_IN_MEMMOVE): Likewise.
16318 (BUILT_IN_MEMPCPY): Likewise.
16319 (BUILT_IN_MEMSET): Likewise.
16320 (BUILT_IN_STPCPY): Likewise.
16321 (BUILT_IN_STRCAT): Likewise.
16322 (BUILT_IN_STRCHR): Likewise.
16323 (BUILT_IN_STRCPY): Likewise.
16324 (BUILT_IN_STRLEN): Likewise.
16325 (BUILT_IN_MEMCPY_CHK): Likewise.
16326 (BUILT_IN_MEMMOVE_CHK): Likewise.
16327 (BUILT_IN_MEMPCPY_CHK): Likewise.
16328 (BUILT_IN_MEMSET_CHK): Likewise.
16329 (BUILT_IN_STPCPY_CHK): Likewise.
16330 (BUILT_IN_STRCAT_CHK): Likewise.
16331 (BUILT_IN_STRCPY_CHK): Likewise.
16332 * calls.c (store_bounds): Likewise.
16333 (emit_call_1): Likewise.
16334 (special_function_p): Likewise.
16335 (maybe_warn_nonstring_arg): Likewise.
16336 (initialize_argument_information): Likewise.
16337 (finalize_must_preallocate): Likewise.
16338 (compute_argument_addresses): Likewise.
16339 (expand_call): Likewise.
16340 * cfgexpand.c (expand_call_stmt): Likewise.
16341 (expand_return): Likewise.
16342 (expand_gimple_stmt_1): Likewise.
16343 (pass_expand::execute): Likewise.
16344 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16345 (cgraph_node::remove): Likewise.
16346 (cgraph_node::dump): Likewise.
16347 (cgraph_node::verify_node): Likewise.
16348 * cgraph.h (chkp_function_instrumented_p): Likewise.
16349 (symtab_node::get_alias_target): Likewise.
16350 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16351 (cgraph_local_p): Likewise.
16352 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16353 (cgraph_edge::rebuild_references): Likewise.
16354 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16355 (walk_polymorphic_call_targets): Likewise.
16356 (cgraph_node::expand_thunk): Likewise.
16357 (symbol_table::output_weakrefs): Likewise.
16358 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16359 (ix86_handle_option): Likewise.
16360 * config/i386/constraints.md: Likewise.
16361 * config/i386/i386-builtin-types.def (BND): Likewise.
16365 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16366 (BDESC_FIRST): Likewise.
16368 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16369 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16370 * config/i386/i386.c (enum reg_class): Likewise.
16371 (ix86_target_string): Likewise.
16372 (ix86_option_override_internal): Likewise.
16373 (ix86_conditional_register_usage): Likewise.
16374 (ix86_valid_target_attribute_inner_p): Likewise.
16375 (ix86_set_indirect_branch_type): Likewise.
16376 (ix86_set_current_function): Likewise.
16377 (ix86_function_arg_regno_p): Likewise.
16378 (init_cumulative_args): Likewise.
16379 (ix86_function_arg_advance): Likewise.
16380 (ix86_function_arg): Likewise.
16381 (ix86_pass_by_reference): Likewise.
16382 (ix86_function_value_regno_p): Likewise.
16383 (ix86_function_value_1): Likewise.
16384 (ix86_function_value_bounds): Likewise.
16385 (ix86_return_in_memory): Likewise.
16386 (ix86_setup_incoming_vararg_bounds): Likewise.
16387 (ix86_va_start): Likewise.
16388 (indirect_thunk_need_prefix): Likewise.
16389 (print_reg): Likewise.
16390 (ix86_print_operand): Likewise.
16391 (ix86_expand_call): Likewise.
16392 (ix86_output_function_return): Likewise.
16393 (reg_encoded_number): Likewise.
16394 (BDESC_VERIFYS): Likewise.
16395 (ix86_init_mpx_builtins): Likewise.
16396 (ix86_init_builtins): Likewise.
16397 (ix86_emit_cmove): Likewise.
16398 (ix86_emit_move_max): Likewise.
16399 (ix86_expand_builtin): Likewise.
16400 (ix86_builtin_mpx_function): Likewise.
16401 (ix86_get_arg_address_for_bt): Likewise.
16402 (ix86_load_bounds): Likewise.
16403 (ix86_store_bounds): Likewise.
16404 (ix86_load_returned_bounds): Likewise.
16405 (ix86_store_returned_bounds): Likewise.
16406 (ix86_class_likely_spilled_p): Likewise.
16407 (ix86_hard_regno_mode_ok): Likewise.
16408 (x86_order_regs_for_local_alloc): Likewise.
16409 (ix86_mitigate_rop): Likewise.
16410 (ix86_bnd_prefixed_insn_p): Likewise.
16411 (ix86_mpx_bound_mode): Likewise.
16412 (ix86_make_bounds_constant): Likewise.
16413 (ix86_initialize_bounds): Likewise.
16414 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16415 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16416 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16417 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16418 (TARGET_CHKP_BOUND_MODE): Likewise.
16419 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16420 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16421 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16422 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16423 * config/i386/i386.h (TARGET_MPX): Likewise.
16424 (TARGET_MPX_P): Likewise.
16425 (VALID_BND_REG_MODE): Likewise.
16426 (FIRST_BND_REG): Likewise.
16427 (LAST_BND_REG): Likewise.
16428 (enum reg_class): Likewise.
16429 (BND_REG_P): Likewise.
16430 (BND_REGNO_P): Likewise.
16431 (BNDmode): Likewise.
16432 (ADJUST_INSN_LENGTH): Likewise.
16433 * config/i386/i386.md: Likewise.
16434 * config/i386/i386.opt: Likewise.
16435 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16436 (defined): Likewise.
16437 (LINK_MPX): Likewise.
16438 (MPX_SPEC): Likewise.
16439 (LIBMPX_SPEC): Likewise.
16440 (LIBMPXWRAPPERS_SPEC): Likewise.
16441 (CHKP_SPEC): Likewise.
16442 * config/i386/predicates.md: Likewise.
16443 * dbxout.c (dbxout_type): Likewise.
16444 * doc/extend.texi: Likewise.
16445 * doc/invoke.texi: Likewise.
16446 * doc/md.texi: Likewise.
16447 * doc/tm.texi: Likewise.
16448 * doc/tm.texi.in: Likewise.
16449 * dwarf2out.c (is_base_type): Likewise.
16450 (gen_formal_types_die): Likewise.
16451 (gen_subprogram_die): Likewise.
16452 (gen_type_die_with_usage): Likewise.
16453 (gen_decl_die): Likewise.
16454 (dwarf2out_late_global_decl): Likewise.
16455 * expr.c (expand_assignment): Likewise.
16456 (emit_storent_insn): Likewise.
16457 (store_expr_with_bounds): Likewise.
16458 (store_expr): Likewise.
16459 (expand_expr_real_1): Likewise.
16460 * expr.h (store_expr_with_bounds): Likewise.
16461 * function.c (use_register_for_decl): Likewise.
16462 (struct bounds_parm_data): Likewise.
16463 (assign_parms_augmented_arg_list): Likewise.
16464 (assign_parm_find_entry_rtl): Likewise.
16465 (assign_parm_is_stack_parm): Likewise.
16466 (assign_parm_load_bounds): Likewise.
16467 (assign_bounds): Likewise.
16468 (assign_parms): Likewise.
16469 (expand_function_start): Likewise.
16470 * gcc.c (CHKP_SPEC): Likewise.
16471 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16472 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16473 (wrestrict_dom_walker::check_call): Likewise.
16474 * gimple.c (gimple_build_call_from_tree): Likewise.
16475 * gimple.h (enum gf_mask): Likewise.
16476 (gimple_call_with_bounds_p): Likewise.
16477 (gimple_call_set_with_bounds): Likewise.
16478 * gimplify.c (gimplify_init_constructor): Likewise.
16479 * ipa-cp.c (initialize_node_lattices): Likewise.
16480 (propagate_constants_across_call): Likewise.
16481 (find_more_scalar_values_for_callers_subset): Likewise.
16482 * ipa-hsa.c (process_hsa_functions): Likewise.
16483 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16484 * ipa-icf.c (sem_function::merge): Likewise.
16485 * ipa-inline.c (early_inliner): Likewise.
16486 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16487 (warn_function_cold): Likewise.
16488 (propagate_pure_const): Likewise.
16489 * ipa-ref.h (enum GTY): Likewise.
16490 * ipa-split.c (find_retbnd): Likewise.
16491 (consider_split): Likewise.
16492 (split_function): Likewise.
16493 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16494 * ipa.c (walk_polymorphic_call_targets): Likewise.
16495 (symbol_table::remove_unreachable_nodes): Likewise.
16496 (process_references): Likewise.
16497 (cgraph_build_static_cdtor_1): Likewise.
16498 * lto-cgraph.c (lto_output_node): Likewise.
16499 (output_refs): Likewise.
16500 (compute_ltrans_boundary): Likewise.
16501 (input_overwrite_node): Likewise.
16502 (input_node): Likewise.
16503 (input_cgraph_1): Likewise.
16504 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16505 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16506 (class pass_chkp_instrumentation_passes): Likewise.
16507 (make_pass_chkp_instrumentation_passes): Likewise.
16508 * passes.def: Likewise.
16509 * rtl.h (struct GTY): Likewise.
16510 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16511 * stor-layout.c (layout_type): Likewise.
16512 * symtab.c: Likewise.
16513 * target.def: Likewise.
16514 * targhooks.c (default_chkp_bound_type): Likewise.
16515 (default_chkp_bound_mode): Likewise.
16516 (default_builtin_chkp_function): Likewise.
16517 (default_chkp_function_value_bounds): Likewise.
16518 (default_chkp_make_bounds_constant): Likewise.
16519 (default_chkp_initialize_bounds): Likewise.
16520 * targhooks.h (default_chkp_bound_type): Likewise.
16521 (default_chkp_bound_mode): Likewise.
16522 (default_builtin_chkp_function): Likewise.
16523 (default_chkp_function_value_bounds): Likewise.
16524 (default_chkp_make_bounds_constant): Likewise.
16525 (default_chkp_initialize_bounds): Likewise.
16526 * toplev.c (compile_file): Likewise.
16527 (process_options): Likewise.
16528 * tree-core.h (DEF_BUILTIN): Likewise.
16529 (DEF_BUILTIN_CHKP): Likewise.
16530 * tree-inline.c (declare_return_variable): Likewise.
16531 (remap_gimple_stmt): Likewise.
16532 (copy_bb): Likewise.
16533 (initialize_inlined_parameters): Likewise.
16534 (expand_call_inline): Likewise.
16535 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16536 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16537 (make_pass_ipa_chkp_produce_thunks): Likewise.
16538 (make_pass_chkp): Likewise.
16539 (make_pass_chkp_opt): Likewise.
16540 (make_pass_chkp_instrumentation_passes): Likewise.
16541 * tree-pretty-print.c (dump_generic_node): Likewise.
16542 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16543 * tree-ssa-dce.c (propagate_necessity): Likewise.
16544 (eliminate_unnecessary_stmts): Likewise.
16545 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16546 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16547 * tree-ssa-sccvn.h: Likewise.
16548 * tree-ssa-strlen.c (get_string_length): Likewise.
16549 (valid_builtin_call): Likewise.
16550 (adjust_last_stmt): Likewise.
16551 (handle_builtin_strchr): Likewise.
16552 (handle_builtin_strcpy): Likewise.
16553 (handle_builtin_stxncpy): Likewise.
16554 (handle_builtin_memcpy): Likewise.
16555 (handle_builtin_strcat): Likewise.
16556 (strlen_check_and_optimize_stmt): Likewise.
16557 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16558 * tree-streamer-in.c: Likewise.
16559 * tree-streamer.c (record_common_node): Likewise.
16560 * tree.c (tree_code_size): Likewise.
16561 (wide_int_to_tree_1): Likewise.
16562 (type_contains_placeholder_1): Likewise.
16563 (build_common_tree_nodes): Likewise.
16564 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16565 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16566 (POINTER_BOUNDS_P): Likewise.
16567 (BOUNDED_TYPE_P): Likewise.
16568 (BOUNDED_P): Likewise.
16569 (CALL_WITH_BOUNDS_P): Likewise.
16570 (pointer_bounds_type_node): Likewise.
16571 * value-prof.c (gimple_ic): Likewise.
16572 * var-tracking.c (vt_add_function_parameters): Likewise.
16573 * varasm.c (make_decl_rtl): Likewise.
16574 (assemble_start_function): Likewise.
16575 (output_constant): Likewise.
16576 (maybe_assemble_visibility): Likewise.
16577 * varpool.c (ctor_for_folding): Likewise.
16578 * chkp-builtins.def: Remove.
16579 * ipa-chkp.c: Remove.
16580 * ipa-chkp.h: Remove.
16581 * rtl-chkp.c: Remove.
16582 * rtl-chkp.h: Remove.
16583 * tree-chkp-opt.c: Remove.
16584 * tree-chkp.c: Remove.
16585 * tree-chkp.h: Remove.
16587 2018-06-07 Carl Love <cel@us.ibm.com>
16589 * config/rs6000/vsx.md (vextract_fp_from_shorth,
16590 vextract_fp_from_shortl): Add BE support.
16592 2018-06-07 Paul Koning <ni1d@arrl.net>
16594 * compare-elim.c (try_merge_compare): Don't merge compare if
16595 address contains a side effect.
16596 (try_eliminate_compare): Likewise.
16598 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
16600 * config.gcc: Support "tremont".
16601 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16602 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16604 * config/i386/i386.c (m_TREMONT): Define.
16605 (processor_target_table): Add "tremont".
16606 (PTA_TREMONT): Define.
16607 (ix86_lea_outperforms): Add TARGET_TREMONT.
16608 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16609 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16610 and M_INTEL_GOLDMONT_PLUS.
16611 (fold_builtin_cpu): Add "tremont".
16612 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16613 (ix86_option_override_internal): Add "tremont".
16614 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16615 (processor_type): Add PROCESSOR_TREMONT.
16616 * config/i386/x86-tune.def: Add m_TREMONT.
16617 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16619 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16621 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16622 symbol defined for msp430i* devices to be lower case.
16624 2018-06-07 Richard Biener <rguenther@suse.de>
16626 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16627 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16628 Properly wrap signed arithmetic if overflow wraps.
16630 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16632 PR tree-optimization/69615
16633 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16634 of a cast from a same precision integral SSA_NAME in a bb dominated
16635 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16636 cast to utype if rhs2 has already a compatible type.
16638 2018-06-07 Richard Biener <rguenther@suse.de>
16640 PR tree-optimization/85935
16641 * graphite-scop-detection.c (find_params_in_bb): Analyze
16642 condition operands with respect to the correct loop. Assert
16643 the analysis doesn't fail.
16645 2018-06-04 Carl Love <cel@us.ibm.com>
16647 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16648 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16649 as it is slightly cheaper.
16650 (first_match_or_eos_index_<mode>):
16651 Calculate index using natural element order.
16652 (first_match_index_<mode>):
16653 Calculate index using natural element order.
16654 (first_match_or_eos_index_<mode>):
16655 Calculate index using natural order.
16656 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16657 for BE and LE modes.
16658 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16659 P9V_BUILTIN_VCLZLSBB_V16QI.
16660 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16663 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16665 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16666 indentation and line wrap for many prototypes. Add missing
16667 @smallexample directives around block of prototypes for vec_xl and
16670 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
16672 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16673 track if we pass or return IEEE 128-bit floating point.
16674 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16675 C++ mangling that is compatible with GCC 8.1.
16676 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16677 (init_cumulative_args): Note if we pass or return IEEE 128-bit
16678 floating point types.
16679 (rs6000_function_arg_advance_1): Likewise.
16680 (rs6000_mangle_type): Optionally generate mangled names that match
16681 what GCC 8.1 generated for IEEE 128-bit floating point types.
16682 (rs6000_globalize_decl_name): If we have an external function that
16683 passes or returns IEEE 128-bit types, generate a weak reference
16684 from the mangled name used in GCC 8.1 to the current mangled
16686 (rs6000_init_builtins): Make __ibm128 use the long double type if
16687 long double is IBM extended double. Make __float128 use the long
16688 double type if long double is IEEE 128-bit.
16691 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16692 macro for __ibm128 built-in functions.
16693 (PACK_IF): Add __ibm128 pack/unpack functions.
16694 (UNPACK_IF): Likewise.
16695 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16696 enable long double built-in functions if long double is IEEE
16697 128-bit floating point.
16698 (rs6000_invalid_builtin): Update long double built-in function
16700 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16701 functions, adjust the built-in function to use the long double
16702 built-in function if __ibm128 and long double are the same type.
16703 * doc/extend.texi (PowerPC builtins): Update documention for
16704 __builtin_{,un}pack_longdouble. Add documentation for
16705 __builtin_{,un}pack_ibm128.
16707 2018-06-06 Jim Wilson <jimw@sifive.com>
16709 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16710 (struct machine_function): New field interrupt_mode.
16711 (riscv_handle_type_attribute): New function. Add forward declaration.
16712 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16713 (riscv_expand_epilogue): Check interrupt_mode field.
16714 (riscv_set_current_function): Check interrupt attribute args and
16715 set interrupt_mode field.
16716 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16717 (riscv_sret, riscv_uret): New.
16718 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16719 new arguments to interrupt attribute.
16721 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
16724 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16725 Don't handle -mcpu=power8 if -mpower9-vector is also used.
16727 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16729 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16730 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16731 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16732 several redundant entries.
16734 2018-06-06 David Malcolm <dmalcolm@redhat.com>
16736 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16737 type from "rtx" to "rtx_insn *".
16738 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16739 for local "call_insn", removing cast.
16740 (ix86_expand_call): Likewise, introducing a "call_insn" local.
16742 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
16744 PR tree-optimization/86066
16745 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16746 for BIT_INSERT_EXPR stores.
16748 2018-06-06 Richard Biener <rguenther@suse.de>
16750 PR tree-optimization/86062
16751 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16752 component refs ontop
16753 of to be offsetted base.
16755 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16757 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16758 to be static and remove check on interrupt attribute name.
16760 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
16762 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16763 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16765 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16768 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16770 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16771 Remove second argument, change how error is called.
16772 (aarch64_layout_arg): Remove second argument from
16773 aarch64_err_no_fpadvsimd call.
16774 (aarch64_init_cumulative_args): Ditto.
16775 (aarch64_gimplify_va_arg_expr): Ditto.
16776 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16778 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
16780 * config/i386/i386.md (simple_return_indirect_internal): New expander.
16781 (*simple_return_indirect_internal<mode>): Rename from
16782 simple_return_indirect_internal. Use W mode iterator.
16783 (rstorssp): New expander.
16784 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
16785 (clrssbsy): New expander.
16786 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
16788 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
16790 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16792 (cmse_check_pointed_object): Likewise.
16794 2018-06-05 Martin Liska <mliska@suse.cz>
16796 PR gcov-profile/47618
16797 * doc/invoke.texi: Document how -fprofile-dir format
16800 2018-06-05 Richard Biener <rguenther@suse.de>
16802 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16803 removal pretend DOM info isn't available so we do not update
16804 it and only remove edges, not dominated blocks. Actually free
16805 DOM info in case we removed something. Remove unreachable blocks.
16806 (mfb_keep_latches): Work with either DOM info or marked backedges.
16807 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16808 first. Mark backedges if DOM info isn't available.
16809 (Re-)compute DOM info after cleanup_control_flow_pre.
16811 2018-06-05 Richard Biener <rguenther@suse.de>
16813 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16814 (locus_discrim_hasher::hash): Adjust.
16815 (locus_discrim_hasher::equal): Likewise.
16816 (next_discriminator_for_locus): Work on line directly.
16817 (same_line_p): Pass in expanded locus1 as well.
16818 (assign_discriminators): Avoid redundant location expansions.
16820 2018-06-05 Richard Biener <rguenther@suse.de>
16822 PR tree-optimization/86046
16823 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16824 if required after clearing TREE_ADDRESSABLE.
16826 2018-06-05 Richard Biener <rguenther@suse.de>
16828 PR tree-optimization/86047
16829 * tree-ssa-loop.c (for_each_index): Glob handling of all
16830 decls and constants and really handle all of them.
16832 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16835 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16836 qualifier_void_pointer and qualifier_const_void_pointer.
16837 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16838 (arm_init_builtins): Handle the above.
16839 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16840 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16841 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16844 2018-06-05 Martin Liska <mliska@suse.cz>
16846 * auto-profile.c (read_autofdo_file): Do not use
16847 gcov_ctr_summary struct.
16848 (afdo_callsite_hot_enough_for_early_inline): Likewise.
16849 * coverage.c (struct counts_entry): Likewise.
16850 (read_counts_file): Read just single summary entry.
16851 (get_coverage_counts): Use gcov_summary struct.
16852 * coverage.h (get_coverage_counts): Likewise.
16853 * gcov-dump.c (dump_working_sets): Likewise.
16854 (tag_summary): Dump just single summary.
16855 * gcov-io.c (gcov_write_summary): Write just histogram
16857 (gcov_read_summary): Read just single summary.
16858 (compute_working_sets): Use gcov_summary struct.
16859 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16860 of GCOV_COUNTERS_SUMMABLE.
16861 (GCOV_COUNTERS_SUMMABLE): Remove.
16862 (GCOV_FIRST_VALUE_COUNTER): Replace with
16863 GCOV_COUNTER_V_INTERVAL.
16864 (struct gcov_ctr_summary): Remove.
16865 (struct gcov_summary): Directly use fields of former
16867 (compute_working_sets): Use gcov_summary struct.
16868 * gcov.c (read_count_file): Do not use ctrs fields.
16869 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16871 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16873 * profile.c: Likewise.
16874 * profile.h: Likewise.
16876 2018-06-05 Martin Liska <mliska@suse.cz>
16878 PR gcov-profile/84846
16879 * gcov.c (output_lines): Print working directory only
16880 in intermediate format.
16882 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16884 * config/s390/s390-builtin-types.def: Add void function type.
16885 * config/s390/s390-builtins.def: Use the function type for the
16888 2018-06-04 Jim Wilson <jimw@sifive.com>
16890 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16892 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16893 and maybe_eh_return. Change regno to unsigned int. Use new args to
16894 handle EH_RETURN_DATA_REGNO registers properly.
16895 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16896 (riscv_expand_epilogue): Update comment. Change argument name and
16897 type. Update code to use new name and type. Pass new args to
16898 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16900 * config/riscv/riscv.md (NORMAL_RETURN): New.
16901 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16902 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16903 (eh_return): Call gen_eh_return_internal and emit barrier.
16904 (eh_return_internal): Call riscv_expand_epilogue.
16906 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16908 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16909 bit_insertion field and declare can_be_merged_into method.
16910 (merged_store_group::can_be_merged_into): New method.
16911 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16912 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16913 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16915 2018-06-04 Richard Biener <rguenther@suse.de>
16917 PR tree-optimization/85955
16918 * builtins.c (fold_builtin_sincos): Convert pointers to
16919 destination to appropriate type before dereferencing.
16921 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
16923 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16925 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
16927 * expr.c (expand_expr_real_1): Force the operand into memory if
16928 its TYPE_MODE is BLKmode and if there is no integer mode for
16929 the number of bits being extracted.
16931 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16935 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16936 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16938 2018-06-04 Richard Biener <rguenther@suse.de>
16940 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16941 (cleanup_tree_cfg_noloop): ... single caller. Do
16942 start_recording_case_labels later.
16944 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
16946 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16947 to _IMMINTRIN_H_INCLUDED.
16948 * config/i386/pconfigintrin.h: Ditto.
16949 * config/i386/waitpkgintrin.h: Ditto.
16950 * config/i386/immintrin.h: Add includes for sgxintrin.h,
16951 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16952 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16953 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16954 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16955 waitpkgintrin.h and cldemoteintrin.h.
16957 2018-06-04 Richard Biener <rguenther@suse.de>
16959 PR tree-optimization/86038
16960 * tracer.c (find_best_successor): Check probability for
16961 being initialized, bail out if not.
16963 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
16966 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16967 of bits to ignore when comparing architectures.
16969 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16971 PR tree-optimization/69615
16972 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16973 maximum or minimum of the type, try to merge it also as if
16974 range1 is + [-, x - 1] or + [x + 1, -].
16977 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16979 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
16981 PR tree-optimization/86034
16982 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16983 the unsigned bitfield type in a bit insertion sequence if it does not
16984 have a larger precision than the bitfield size.
16985 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16987 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
16989 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16991 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16993 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16994 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16995 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16996 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16998 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17000 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17001 Disable -fdelete-null-pointer-checks for ELF toolchain.
17003 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17004 Kito Cheng <kito.cheng@gmail.com>
17006 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17007 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17008 (nds32*-*-*): Add glibc and uclibc conditions.
17009 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17010 (TARGET_EXCEPT_UNWIND_INFO): Define.
17011 * config/nds32/elf.h: New file.
17012 * config/nds32/linux.h: New file.
17013 * config/nds32/nds32-elf.opt: New file.
17014 * config/nds32/nds32-linux.opt: New file.
17015 * config/nds32/nds32-fp-as-gp.c
17016 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17017 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17019 (nds32_asm_file_end): Ditto.
17020 (nds32_print_operand): Ditto.
17021 (nds32_insert_attributes): Ditto.
17022 (nds32_init_libfuncs): New function.
17023 (TARGET_HAVE_TLS): Define.
17024 (TARGET_INIT_LIBFUNCS): Define.
17025 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17027 (TARGET_ELF): Apply different mcmodel setting.
17028 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17029 been migrated into elf.h and linux.h files.
17030 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17031 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17032 (mcmodel): The content has been migrated into nds32-elf.opt and
17033 nds32-linux.opt files.
17034 * config/nds32/t-elf: New file.
17035 * config/nds32/t-linux: New file.
17037 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17038 Shiva Chen <shiva0217@gmail.com>
17040 * config/nds32/constants.md (unspec_volatile_element): Add
17041 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17042 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17044 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17045 (make_pass_nds32_fp_as_gp): Declare.
17046 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17048 (nds32_asm_function_end_prologue): Remove unused asm output.
17049 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17050 (nds32_asm_file_start): Output necessary fp_as_gp information.
17051 (nds32_option_override): Adjust register usage.
17052 (nds32_expand_prologue): Consider fp_as_gp situation.
17053 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17054 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17057 (simple_return): Ditto.
17058 (omit_fp_begin): Output special directive for fp_as_gp.
17059 (omit_fp_end): Output special directive for fp_as_gp.
17060 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17061 mforbid-fp-as-gp): New options.
17063 2018-06-01 Mark Wielaard <mark@klomp.org>
17065 * dwarf2out.c (dwarf2out_finish): Remove generation of
17066 DW_AT_loclists_base.
17068 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17070 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17071 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17072 (struct merged_store_group): Add bit_insertion field.
17073 (dump_char_array): Use standard hexadecimal format.
17074 (merged_store_group::merged_store_group): Set bit_insertion to false.
17075 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17076 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17077 also print the mask in the dump file.
17078 (pass_store_merging::gate): Minor tweak.
17079 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17080 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17081 stores with INTEGER_CST stores.
17082 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17083 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17084 and use it throughout. Generate bit insertion sequences if need be.
17085 (pass_store_merging::process_store): Remove redundant condition.
17086 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17088 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17090 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17091 the 128-bit floating point types. Fix function comment.
17093 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17095 * config/aarch64/aarch64-simd.md
17096 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17098 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17101 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17103 PR tree-optimization/85989
17104 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17106 (backprop::intersect_uses): Check it when deciding whether this
17107 is a backedge reference.
17108 (backprop::process_block): Add each phi to m_visited_phis
17109 after visiting it, then clear it at the end.
17111 2018-06-01 Richard Biener <rguenther@suse.de>
17113 * tree-vectorizer.h (vect_dr_stmt): New function.
17114 (vect_get_load_cost): Adjust.
17115 (vect_get_store_cost): Likewise.
17116 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17117 Use vect_dr_stmt instead of DR_SMTT.
17118 (vect_record_base_alignments): Likewise.
17119 (vect_calculate_target_alignment): Likewise.
17120 (vect_compute_data_ref_alignment): Likewise and make static.
17121 (vect_update_misalignment_for_peel): Likewise.
17122 (vect_verify_datarefs_alignment): Likewise.
17123 (vector_alignment_reachable_p): Likewise.
17124 (vect_get_data_access_cost): Likewise. Pass down
17125 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17126 (vect_get_peeling_costs_all_drs): Likewise.
17127 (vect_peeling_hash_get_lowest_cost): Likewise.
17128 (vect_enhance_data_refs_alignment): Likewise.
17129 (vect_find_same_alignment_drs): Likewise.
17130 (vect_analyze_data_refs_alignment): Likewise.
17131 (vect_analyze_group_access_1): Likewise.
17132 (vect_analyze_group_access): Likewise.
17133 (vect_analyze_data_ref_access): Likewise.
17134 (vect_analyze_data_ref_accesses): Likewise.
17135 (vect_vfa_segment_size): Likewise.
17136 (vect_small_gap_p): Likewise.
17137 (vectorizable_with_step_bound_p): Likewise.
17138 (vect_prune_runtime_alias_test_list): Likewise.
17139 (vect_analyze_data_refs): Likewise.
17140 (vect_supportable_dr_alignment): Likewise.
17141 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17142 (vect_gen_prolog_loop_niters): Likewise.
17143 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17144 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17146 (vect_recog_mask_conversion_pattern): Likewise.
17147 (vect_try_gather_scatter_pattern): Likewise.
17148 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17149 to vect_get_store_cost.
17150 (vect_get_store_cost): Get stmt_info instead of DR.
17151 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17152 (vect_get_load_cost): Get stmt_info instead of DR.
17154 2018-06-01 Richard Biener <rguenther@suse.de>
17156 PR middle-end/86017
17157 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17158 vars wrapped in MEM_REFs.
17160 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17162 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17163 Fix subreg tests so that we only return a choice between
17164 GENERAL_REGS and FP_REGS if the original classes included both.
17166 2018-06-01 Richard Biener <rguenther@suse.de>
17169 * tree-ssa-structalias.c (get_function_part_constraint):
17170 Handle NULL fi->decl.
17171 (find_func_aliases_for_call): Properly handle indirect
17172 fi from direct call.
17173 (find_func_clobbers): Likewise.
17174 (ipa_pta_execute): Likewise.
17175 (create_variable_info_for): For functions that are ifunc_resolver
17176 resolve to a varinfo that contains the result of the resolver call.
17177 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17180 2018-05-31 Michael Collison <michael.collison@arm.com>
17182 * config/aarch64/aarch64.md:
17183 (*fix_to_zero_extenddfdi2): New pattern.
17184 * gcc.target/aarch64/fix_extend1.c: New testcase.
17186 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17188 PR middle-end/78809
17189 PR middle-end/83026
17190 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17191 and BUILT_IN_STRNCMP_EQ.
17192 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17193 BUILT_IN_STRNCMP_EQ.
17194 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17195 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17196 (gimple_fold_builtin): Likewise.
17197 * tree-ssa-strlen.c (compute_string_length): New function.
17198 (determine_min_obsize): New function.
17199 (handle_builtin_string_cmp): New function to handle calls to
17200 string compare functions.
17201 (strlen_optimize_stmt): Add handling to builtin string compare
17203 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17204 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17205 * tree.c (build_common_builtin_nodes): Add new defines of
17206 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17208 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17211 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17212 functions with naked attribute.
17214 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17216 * config/i386/sse.md (avx_vec_concat<mode>):
17217 Substitute concat_tg_mode mode attribute with xtg_mode.
17218 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17219 (concat_tg_mode): Remove mode attribute.
17221 2018-05-31 Martin Sebor <msebor@redhat.com>
17224 * calls.c (alloc_max_size): Correct a logic error/typo.
17225 Treat excessive arguments as infinite. Warn for invalid arguments.
17226 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17228 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17231 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17232 and movx for Haswell.
17234 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17235 Cesar Philippidis <cesar@codesourcery.com>
17237 PR middle-end/85879
17238 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17239 when emitting error on private/firstprivate reductions.
17240 * omp-low.c (lower_omp_target): Avoid reference-type processing
17241 on pointers for firstprivate clause.
17243 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17245 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17248 * config/aarch64/aarch64-simd.md
17249 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17250 (aarch64_ld1_x3_<mode>): Likewise
17251 (aarch64_st1x2<VALLDIF:mode>): Likewise
17252 (aarch64_st1_x2_<mode>): Likewise
17253 (aarch64_st1x3<VALLDIF:mode>): Likewise
17254 (aarch64_st1_x3_<mode>): Likewise
17255 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17256 (vld1_s8_x3): Likewise.
17257 (vld1_u16_x3): Likewise.
17258 (vld1_s16_x3): Likewise.
17259 (vld1_u32_x3): Likewise.
17260 (vld1_s32_x3): Likewise.
17261 (vld1_u64_x3): Likewise.
17262 (vld1_s64_x3): Likewise.
17263 (vld1_f16_x3): Likewise.
17264 (vld1_f32_x3): Likewise.
17265 (vld1_f64_x3): Likewise.
17266 (vld1_p8_x3): Likewise.
17267 (vld1_p16_x3): Likewise.
17268 (vld1_p64_x3): Likewise.
17269 (vld1q_u8_x3): Likewise.
17270 (vld1q_s8_x3): Likewise.
17271 (vld1q_u16_x3): Likewise.
17272 (vld1q_s16_x3): Likewise.
17273 (vld1q_u32_x3): Likewise.
17274 (vld1q_s32_x3): Likewise.
17275 (vld1q_u64_x3): Likewise.
17276 (vld1q_s64_x3): Likewise.
17277 (vld1q_f16_x3): Likewise.
17278 (vld1q_f32_x3): Likewise.
17279 (vld1q_f64_x3): Likewise.
17280 (vld1q_p8_x3): Likewise.
17281 (vld1q_p16_x3): Likewise.
17282 (vld1q_p64_x3): Likewise.
17283 (vst1_s64_x2): Likewise.
17284 (vst1_u64_x2): Likewise.
17285 (vst1_f64_x2): Likewise.
17286 (vst1_s8_x2): Likewise.
17287 (vst1_p8_x2): Likewise.
17288 (vst1_s16_x2): Likewise.
17289 (vst1_p16_x2): Likewise.
17290 (vst1_s32_x2): Likewise.
17291 (vst1_u8_x2): Likewise.
17292 (vst1_u16_x2): Likewise.
17293 (vst1_u32_x2): Likewise.
17294 (vst1_f16_x2): Likewise.
17295 (vst1_f32_x2): Likewise.
17296 (vst1_p64_x2): Likewise.
17297 (vst1q_s8_x2): Likewise.
17298 (vst1q_p8_x2): Likewise.
17299 (vst1q_s16_x2): Likewise.
17300 (vst1q_p16_x2): Likewise.
17301 (vst1q_s32_x2): Likewise.
17302 (vst1q_s64_x2): Likewise.
17303 (vst1q_u8_x2): Likewise.
17304 (vst1q_u16_x2): Likewise.
17305 (vst1q_u32_x2): Likewise.
17306 (vst1q_u64_x2): Likewise.
17307 (vst1q_f16_x2): Likewise.
17308 (vst1q_f32_x2): Likewise.
17309 (vst1q_f64_x2): Likewise.
17310 (vst1q_p64_x2): Likewise.
17311 (vst1_s64_x3): Likewise.
17312 (vst1_u64_x3): Likewise.
17313 (vst1_f64_x3): Likewise.
17314 (vst1_s8_x3): Likewise.
17315 (vst1_p8_x3): Likewise.
17316 (vst1_s16_x3): Likewise.
17317 (vst1_p16_x3): Likewise.
17318 (vst1_s32_x3): Likewise.
17319 (vst1_u8_x3): Likewise.
17320 (vst1_u16_x3): Likewise.
17321 (vst1_u32_x3): Likewise.
17322 (vst1_f16_x3): Likewise.
17323 (vst1_f32_x3): Likewise.
17324 (vst1_p64_x3): Likewise.
17325 (vst1q_s8_x3): Likewise.
17326 (vst1q_p8_x3): Likewise.
17327 (vst1q_s16_x3): Likewise.
17328 (vst1q_p16_x3): Likewise.
17329 (vst1q_s32_x3): Likewise.
17330 (vst1q_s64_x3): Likewise.
17331 (vst1q_u8_x3): Likewise.
17332 (vst1q_u16_x3): Likewise.
17333 (vst1q_u32_x3): Likewise.
17334 (vst1q_u64_x3): Likewise.
17335 (vst1q_f16_x3): Likewise.
17336 (vst1q_f32_x3): Likewise.
17337 (vst1q_f64_x3): Likewise.
17338 (vst1q_p64_x3): Likewise.
17340 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17342 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17343 user_label_prefix to name.
17345 * tree-core.h: Update comment about the format of NAME string
17346 passed to handler in attribute_spec.
17348 * config/msp430/msp430.md: Remove erroneous subreg expression from
17349 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17350 zero_extend{q,h}isi2.
17352 2018-05-30 Borislav Petkov <bp@suse.de>
17354 * doc/extend.texi: Document some architecture specific
17355 constraints and sort entries.
17357 2018-05-30 Martin Sebor <msebor@redhat.com>
17359 PR middle-end/85369
17360 * builtins.c (expand_builtin_stpcpy_1): New function.
17361 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17362 only if the former succeeds.
17364 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17366 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17369 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17371 * doc/invoke.texi (-flinker-output): Document
17373 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17375 * passes.c (ipa_write_summaries): Only modify statements if body
17377 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17378 incrementally linking.
17379 (ipa_passes): Likewise.
17380 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17381 pass down resolution info.
17382 * common.opt (flag_incremental_link): Update info.
17383 * gcc.c (plugin specs): Turn flinker-output=* to
17384 -plugin-opt=-linker-output-known
17385 * toplev.c (compile_file): Also cut compilation when doing incremental
17387 * flag-types. (enum lto_partition_model): Add
17388 LTO_LINKER_OUTPUT_NOLTOREL.
17389 (invoke.texi): Add -flinker-output docs.
17390 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17391 link same way as WPA; do not stream in dead initializers.
17393 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17394 darf2out_register_external_decl): Support incremental link.
17396 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17398 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17400 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17402 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17403 it down to simple_object_copy_lto_debug_sections.
17404 (run_gcc): Determine incremental LTO link time and configure
17405 lto1 into non-wpa mode, disable renaming of debug sections.
17407 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17409 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17410 descriptions of various incorrectly documented functions.
17412 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17415 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17416 address check not strict.
17418 2018-05-30 Richard Biener <rguenther@suse.de>
17420 PR tree-optimization/85964
17421 * tracer.c (better_p): Drop initialized count check, we only
17422 call the function with initialized counts now.
17423 (find_best_successor): Do find a best edge if one
17424 has uninitialized count.
17425 (find_best_predecessor): Likewise. Do BB frequency check only
17426 if count is initialized.
17428 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17430 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17431 (aarch64_ldrstr_offset_compare): New.
17432 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17433 load/store orderings.
17434 (aarch64_gen_adjusted_ldpstp): Likewise.
17436 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17438 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17439 Check for subset of GENERAL_REGS and FP_REGS.
17440 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17443 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17445 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17446 and wi::to_poly_offset. Add the current offset and then check
17447 whether the sum fits, rather than using an unchecked addition of
17448 a checked term. Check for a shwi rather than a uhwi.
17449 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17450 (store_constructor): Use poly_int_tree_p.
17451 (expand_expr_real_1): Likewise.
17452 * function.c (assign_temp): Likewise.
17453 * fold-const.c (const_binop): Use poly_int_tree_p and
17454 wi::to_poly_offset.
17455 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17457 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17458 to_poly_offset for MEM offsets.
17459 * ipa-icf.c (sem_variable::equals): Likewise.
17460 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17461 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17462 wi::to_poly_offset for BIT_FIELD_REF offsets.
17463 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17464 wi::to_poly_offset.
17465 * var-tracking.c (emit_note_insn_var_location): Use
17466 tree_to_poly_uint64.
17468 2018-05-29 Jim Wilson <jimw@sifive.com>
17470 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17472 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17475 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17476 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17478 (sse4_1_round<mode>2): Use nonimmediate_operand
17479 for operand 1 predicate.
17481 2018-05-29 Martin Sebor <msebor@redhat.com>
17482 Richard Biener <rguenther@suse.de>
17485 * calls.c (get_size_range): Call determine_value_range instead
17486 of get_value_range..
17487 * tree-vrp.h (determine_value_range): Declared new function.
17488 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17490 2018-05-29 Richard Biener <rguenther@suse.de>
17492 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17493 sure to use non-pattern stmts for get_earlier_stmt arguments.
17494 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17495 called on pattern stmts.
17496 (get_later_stmt): Likewise.
17498 2018-05-29 Martin Liska <mliska@suse.cz>
17500 PR gcov-profile/85759
17501 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17504 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17506 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17508 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17512 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17513 VEC_PACK_FLOAT_EXPR): New tree codes.
17514 * tree-pretty-print.c (op_code_prio): Handle
17515 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17516 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17517 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17518 * tree-inline.c (estimate_operator_cost): Likewise.
17519 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17520 * fold-const.c (const_binop): Likewise.
17521 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17522 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17523 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17524 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17525 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17526 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17527 * expr.c (expand_expr_real_2): Likewise.
17528 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17529 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17530 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17532 * optabs.c (expand_widen_pattern_expr): For
17533 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17534 sign from result type rather than operand's type.
17535 (expand_binop_directly): For vec_packu_float_optab and
17536 vec_packs_float_optab allow result type to be different from operand's
17538 * optabs-tree.c (optab_for_tree_code): Handle
17539 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17540 VEC_PACK_FLOAT_EXPR. Formatting fixes.
17541 * tree-vect-generic.c (expand_vector_operations_1): Handle
17542 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17543 VEC_PACK_FLOAT_EXPR.
17544 * tree-vect-stmts.c (supportable_widening_operation): Handle
17546 (supportable_narrowing_operation): Handle FLOAT_EXPR.
17547 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17548 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17549 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
17550 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17552 (vec_pack<floatprefix>_float_<mode>): New expander.
17553 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17555 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17556 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17557 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17558 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17559 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17561 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17562 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17563 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17564 VEC_PACK_FLOAT_EXPR): Document.
17566 2018-05-29 Richard Biener <rguenther@suse.de>
17568 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17570 (stmt_vec_info_vec): Make pointer.
17571 (init_stmt_vec_info_vec): Remove.
17572 (free_stmt_vec_info_vec): Likewise.
17573 (set_stmt_vec_info_vec): New function.
17574 (free_stmt_vec_infos): Likewise.
17575 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17576 (set_vinfo_for_stmt): Likewise.
17577 (get_earlier_stmt): Likewise.
17578 (get_later_stmt): Likewise.
17579 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17580 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17581 (vec_info::~vec_info): Free stmt_vec_infos.
17582 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17583 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17584 (pass_slp_vectorize::execute): Likewise.
17585 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17586 (free_stmt_vec_info_vec): Likewise.
17587 (set_stmt_vec_info_vec): New function.
17588 (free_stmt_vec_infos): Likewise.
17589 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17590 the global stmt_vec_info_vec.
17591 * tree-parloops.c (gather_scalar_reductions): Use
17592 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17595 2018-05-29 Richard Biener <rguenther@suse.de>
17597 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17599 2018-05-29 Martin Liska <mliska@suse.cz>
17600 David Malcolm <dmalcolm@redhat.com>
17602 * vec.c (test_reverse): New.
17603 (vec_c_tests): Add new test.
17604 * vec.h (vl_ptr>::reverse): New function.
17606 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
17608 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17610 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17613 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17615 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17617 2018-05-28 Richard Biener <rguenther@suse.de>
17619 PR tree-optimization/85933
17620 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17621 look at stmts marked as vectorizable.
17623 2018-05-28 Richard Biener <rguenther@suse.de>
17625 PR tree-optimization/85934
17626 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17627 vector boolean check before scalar optimization.
17629 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17631 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17634 2018-05-28 Mark Wielaard <mark@klomp.org>
17636 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17637 if it is an expression containing a minus sign.
17639 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17641 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17643 2018-05-27 Paul Koning <ni1d@arrl.net>
17645 * config/pdp11/pdp11.md (truncsihi2): Remove.
17647 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17648 Chung-Ju Wu <jasonwucj@gmail.com>
17650 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17652 (unaligned_store_dw): Ditto.
17653 * config/nds32/nds32-memory-manipulation.c
17654 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17655 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17656 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17657 (emit_setmem_word_loop): Rename to ...
17658 (emit_setmem_doubleword_loop): ... this.
17659 (nds32_gen_dup_4_byte_to_word_value): New function.
17660 (nds32_gen_dup_8_byte_to_double_word_value): New function.
17661 (nds32_expand_setmem_loop): Refine implementation.
17662 (nds32_expand_setmem_loop_v3m): Ditto.
17663 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17666 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17668 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17670 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17672 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17673 (nds32_init_machine_status): Initialize machine->attr_naked_p and
17674 machine->attr_no_prologue_p.
17675 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17676 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17677 (nds32_expand_epilogue): Consider attr_naked_p.
17678 (nds32_expand_epilogue_v3pop): Likewise.
17679 (nds32_can_use_return_insn): Likewise.
17680 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17681 attr_no_prologue_p fields.
17682 * config/nds32/nds32.opt (mret-in-naked-func): New option.
17684 2018-05-27 Jakub Jelinek <jakub@redhat.com>
17687 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17689 * config/i386/sse.md
17690 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17692 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17694 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17696 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17698 (*<floatsuffix>floatv2div2sf2): Rename to ...
17699 (*float<floatunssuffix>v2div2sf2): ... this.
17700 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17701 (float<floatunssuffix>v2div2sf2_mask): ... this.
17702 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17703 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17704 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17706 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17708 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17710 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17712 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17714 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17716 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17717 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17718 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17719 gen_ufix_truncv8dfv8si2.
17720 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17721 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17722 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17723 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17724 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17725 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17726 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17727 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17729 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17733 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17735 2018-05-25 Jim Wilson <jimw@sifive.com>
17737 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17738 * config/riscv/riscv.c (struct machine_function): Add
17739 interrupt_handler_p and attribute_checked_p fields.
17740 (riscv_attribute_table): Add interrupt.
17741 (riscv_interrupt_type_p): New.
17742 (riscv_save_reg_p): Save extra regs for interrupt handler.
17743 (riscv_use_save_libcall): Return false for interrupt handler.
17744 (riscv_first_stack_step): Add forward declaration.
17745 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
17746 for interrupt handler with large frame. Use it for saved reg list.
17747 (riscv_expand_prologue): Move flag_stack_usage_info support to
17748 eliminate duplication.
17749 (riscv_expand_epilogue): Generate mret for interrupt handler.
17750 (riscv_epilogue_uses): New.
17751 (riscv_can_use_return_insn): Return false for interrupt handler.
17752 (riscv_function_ok_for_sibcall): Likewise.
17753 (riscv_set_current_function): Add interrupt handler support.
17754 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17755 * config/riscv/riscv.md (UNSPECV_MRET): New.
17757 (riscv_frflags, riscv_fsflags): Use tab after opcode.
17759 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17761 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
17763 PR tree-optimization/85712
17764 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17765 this candidate has already been replaced in-situ by a copy.
17767 2018-05-25 Jason Merrill <jason@redhat.com>
17769 PR c++/80485 - inline function non-zero address.
17770 * symtab.c (nonzero_address): Check DECL_COMDAT.
17772 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17775 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17776 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17777 extension of SImode operation. Use const123_operand predicate.
17778 (*saddsi_1): Remove.
17779 (*saddl_se_1): Ditto.
17780 (*ssubsi_1): Ditto.
17781 (*ssubl_se_1): Ditto.
17782 * config/alpha/predicates.md (const123_operand): New predicate.
17783 * config/alpha/constraints.md (P): Use IN_RANGE.
17785 2018-05-25 Richard Biener <rguenther@suse.de>
17787 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17789 (ref_maybe_used_by_stmt_p): Likewise.
17790 (stmt_may_clobber_ref_p): Likewise.
17791 (stmt_may_clobber_ref_p_1): Likewise.
17792 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17794 (ref_maybe_used_by_stmt_p): Likewise.
17795 (stmt_may_clobber_ref_p): Likewise.
17796 (stmt_may_clobber_ref_p_1): Likewise.
17797 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17798 the alias oracle to disambiguate DRs with stmts DR analysis
17800 (vect_analyze_data_refs): Do not give up on not analyzable
17801 DRs for BB vectorization. Remove code truncating the dataref
17804 2018-05-25 Jakub Jelinek <jakub@redhat.com>
17807 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17808 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
17809 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17811 2018-05-25 Richard Biener <rguenther@suse.de>
17813 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17814 function, combining stmt data ref gathering and fatal analysis
17816 (vect_analyze_data_refs): Remove now redudnant code and simplify.
17817 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17818 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17819 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17820 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17822 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17824 PR tree-optimization/85720
17825 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17826 SCC if all partitions are builtins.
17827 (version_loop_by_alias_check): New parameter. Generate cancelable
17828 runtime alias check if all partitions are builtins.
17829 (distribute_loop): Update call to above function.
17831 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17833 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17834 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17835 (parm_default_def_partition_arg): Ditto.
17836 (set_parm_default_def_partition): Ditto.
17837 (get_parm_default_def_partitions): Ditto and make it static.
17838 (get_undefined_value_partitions): Ditto and make it static.
17839 (remove_ssa_form): Refactor call to init_var_map here.
17840 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17841 computation for loop region.
17842 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17843 (register_default_def): Delete.
17844 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17845 (parm_default_def_partition_arg): Ditto.
17846 (set_parm_default_def_partition): Ditto.
17847 (get_parm_default_def_partitions): Ditto and make it static.
17848 (get_undefined_value_partitions): Ditto and make it static.
17849 (coalesce_with_default, coalesce_with_default): Update comment.
17850 (create_coalesce_list_for_region): New func factored out from
17851 create_outofssa_var_map.
17852 (populate_coalesce_list_for_outofssa): New func factored out from
17853 create_outofssa_var_map and coalesce_ssa_name.
17854 (create_outofssa_var_map): Delete.
17855 (coalesce_ssa_name): Refactor to support live range computation.
17856 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17857 (get_parm_default_def_partitions): Delete.
17858 (get_undefined_value_partitions): Ditto.
17859 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17860 computation for loop region.
17861 (new_tree_live_info, loe_visit_block): Ditto.
17862 (live_worklist, set_var_live_on_entry): Ditto.
17863 (calculate_live_on_exit, verify_live_on_entry): Ditto.
17864 * tree-ssa-live.h (struct _var_map): New fields.
17865 (init_var_map): Change decl.
17866 (region_contains_p): New.
17868 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17870 * tree-ssa-live.h (live_merge_and_clear): Delete.
17872 2018-05-25 Richard Biener <rguenther@suse.de>
17875 * tree-dump.c (dequeue_and_dump): Remove access to removed
17876 operand 2 of a SWITCH_EXPR.
17878 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17880 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17881 multiplication and division.
17882 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17883 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17884 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17885 (cond_udiv_optab, cond_umod_optab): New optabs.
17886 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17887 (IFN_COND_RDIV): New internal functions.
17888 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17889 TRUNC_MOD_EXPR and RDIV_EXPR.
17890 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17891 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17893 (SVE_INT_BINARY): Include mult.
17894 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17895 (optab, sve_int_op): Handle mult.
17896 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17898 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17899 for SVE_INT_BINARY_SD.
17901 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17903 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17904 (optab, sve_int_op): Handle div and udiv.
17905 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17906 for SVE_INT_BINARY_SD.
17907 (*<optab><mode>3): New insn for the same.
17909 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17911 * tree-vect-patterns.c: Include predict.h.
17912 (vect_recog_divmod_pattern): Restrict check for division support
17913 to when optimizing for size.
17915 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17917 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17918 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17919 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17920 (gimple_match_op::set_op): Likewise.
17921 (gimple_resimplify4): Declare.
17922 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17923 (expr::gen_transform): Likewise.
17924 (decision_tree::gen): Generate a simplification routine for 4 operands.
17925 * gimple-match-head.c (gimple_simplify): Add an overload for
17926 4 operands. In the top-level function, handle up to 4 call
17927 arguments and call gimple_resimplify4.
17928 (gimple_resimplify4): New function.
17929 (build_call_internal): Pass a fourth operand.
17930 (maybe_push_to_seq): Likewise.
17931 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17932 Fold VEC_COND_EXPRs of an operation and a default value into
17933 an IFN_COND_* function if possible.
17934 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17936 (SVE_COND_FP_BINARY): Include them.
17937 (optab, sve_fp_op): Handle them.
17938 (SVE_INT_BINARY_REV): New code iterator.
17939 (SVE_COND_FP_BINARY_REV): New int iterator.
17940 (commutative): New int attribute.
17941 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17943 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17945 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17946 (*cond_<optab><mode>): New patterns for reversed operands.
17948 2018-05-25 Richard Biener <rguenther@suse.de>
17950 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17951 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17952 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17953 (STMT_VINFO_GROUPED_ACCESS): Adjust.
17954 * tree-vect-data-refs.c (everywhere): Adjust users.
17955 * tree-vect-loop.c (everywhere): Likewise.
17956 * tree-vect-slp.c (everywhere): Likewise.
17957 * tree-vect-stmts.c (everywhere): Likewise.
17958 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17960 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17962 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17964 (gcc_cv_as_section_exclude): ... this.
17965 Try Solaris as #exclude syntax.
17966 * configure: Regenerate.
17967 * config.in: Regenerate.
17968 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17970 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17971 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17973 * varasm.c (default_elf_asm_named_section): Don't check if
17974 HAVE_GAS_SECTION_EXCLUDE is defined.
17976 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17978 * doc/md.texi: Update the documentation of the cond_* optabs
17979 to mention the new final operand. Fix GET_MODE_NUNITS call.
17980 Describe the scalar case too.
17981 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17982 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17984 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17985 (get_conditional_internal_fn): Update comment.
17986 * tree-vect-loop.c (vectorizable_reduction): Pass the original
17987 accumulator value as a final argument to conditional functions.
17988 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17989 a define_expand and add an "else" operand. Assert for now that
17990 the else operand is equal to operand 2. Use SVE_INT_BINARY and
17991 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17992 (*cond_<optab><mode>): New patterns.
17993 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17994 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17995 (UNSPEC_COND_EOR): Delete.
17996 (optab): Remove associated mappings.
17997 (SVE_INT_BINARY): New code iterator.
17998 (sve_int_op): Remove int attribute and add "minus" to the code
18000 (SVE_COND_INT_OP): Delete.
18001 (SVE_COND_FP_OP): Rename to...
18002 (SVE_COND_FP_BINARY): ...this.
18004 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18006 * optabs.c (can_reuse_operands_p): New function.
18007 (maybe_legitimize_operands): Try to reuse the results for
18010 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18012 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18013 Add {q} suffix to insn mnemonic.
18015 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18017 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18018 (msp430_warn_func_return): New.
18020 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18022 * fold-const.c (tree_nonzero_bits): New function.
18023 * fold-const.h (tree_nonzero_bits): Likewise.
18024 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18025 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18027 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18031 * varasm.c (assemble_alias): Check ifunc_resolver only on
18034 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18037 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18038 when memory input operand is handled.
18040 2018-05-24 Luis Machado <luis.machado@linaro.org>
18042 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18044 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18046 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18048 * match.pd: Delay FMA folds until after vectorization.
18050 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18053 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18054 address check not strict.
18056 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18058 * gimple-match.h (gimple_match_op): New class.
18059 (mprts_hook): Replace parameters with a gimple_match_op *.
18060 (maybe_build_generic_op): Likewise.
18061 (gimple_simplified_result_is_gimple_val): Replace parameters with
18062 a const gimple_match_op *.
18063 (gimple_simplify): Replace code_helper * and tree * parameters with
18064 a gimple_match_op * parameter.
18065 (gimple_resimplify1): Replace code_helper *, tree and tree *
18066 parameters with a gimple_match_op * parameter.
18067 (gimple_resimplify2): Likewise.
18068 (gimple_resimplify3): Likewise.
18069 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18070 parameters with a gimple_match_op * parameter.
18071 * gimple-match-head.c (gimple_simplify): Change prototypes of
18072 auto-generated functions to take a gimple_match_op * instead of
18073 separate code_helper * and tree * parameters. Make the same
18074 change in the top-level overload and update calls to the
18075 gimple_resimplify routines. Update calls to the auto-generated
18076 functions and to maybe_push_res_to_seq in the publicly-facing
18077 operation-specific gimple_simplify overloads.
18078 (gimple_match_op::MAX_NUM_OPS): Define.
18079 (gimple_resimplify1): Replace rcode and ops with a single res_op
18080 parameter. Update call to gimple_simplify.
18081 (gimple_resimplify2): Likewise.
18082 (gimple_resimplify3): Likewise.
18083 (mprts_hook): Replace parameters with a gimple_match_op *.
18084 (maybe_build_generic_op): Likewise.
18085 (build_call_internal): Replace type, nargs and ops with
18086 a gimple_match_op *.
18087 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18088 with a single gimple_match_op *. Update calls to mprts_hook,
18089 build_call_internal and gimple_simplified_result_is_gimple_val.
18090 Factor out code that is common to the tree_code and combined_fn cases.
18091 * genmatch.c (expr::gen_transform): Replace tem_code and
18092 tem_ops with a gimple_match_op called tem_op. Update calls
18093 to the gimple_resimplify functions and maybe_push_res_to_seq.
18094 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18095 res_ops. Update call to the gimple_resimplify functions.
18096 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18097 (decision_tree::gen): Make the functions take a gimple_match_op *
18098 called res_op instead of separate res_code and res_ops parameters.
18099 Update call accordingly.
18100 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18101 and ops with a single res_op parameter. Update calls to
18102 maybe_build_generic_op and maybe_push_res_to_seq.
18103 (fold_stmt_1): Update calls to gimple_simplify and
18104 replace_stmt_with_simplification.
18105 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18106 and gimple_simplified_result_is_gimple_val.
18107 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18109 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18110 with a gimple_match_op *.
18111 (vn_nary_build_or_lookup): Likewise. Update call to
18112 vn_nary_build_or_lookup_1.
18113 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18114 gimple_match_op *. Update calls to the gimple_resimplify routines
18115 and to gimple_simplified_result_is_gimple_val.
18116 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18117 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18118 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18119 (visit_nary_op): Likewise.
18120 (visit_reference_op_load): Likewise.
18122 2018-05-23 Luis Machado <luis.machado@linaro.org>
18124 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18125 modifier for printing the step amount.
18127 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18130 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18133 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18135 * doc/sourcebuild.texi (Endianness): New subsubsection.
18137 2018-05-23 Luis Machado <luis.machado@linaro.org>
18139 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18140 <prefetch_dynamic_strides>: New const bool field.
18141 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18142 prefetch_dynamic_strides.
18143 (exynosm1_prefetch_tune): Likewise.
18144 (thunderxt88_prefetch_tune): Likewise.
18145 (thunderx_prefetch_tune): Likewise.
18146 (thunderx2t99_prefetch_tune): Likewise.
18147 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18149 (aarch64_override_options_internal): Update to set
18150 PARAM_PREFETCH_DYNAMIC_STRIDES.
18151 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18152 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18153 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18154 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18155 prefetch-dynamic-strides setting.
18157 2018-05-23 Luis Machado <luis.machado@linaro.org>
18159 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18160 <minimum_stride>: New const int field.
18161 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18162 minimum_stride field defaulting to -1.
18163 (exynosm1_prefetch_tune): Likewise.
18164 (thunderxt88_prefetch_tune): Likewise.
18165 (thunderx_prefetch_tune): Likewise.
18166 (thunderx2t99_prefetch_tune): Likewise.
18167 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18168 <default_opt_level>: Set to 3.
18169 (aarch64_override_options_internal): Update to set
18170 PARAM_PREFETCH_MINIMUM_STRIDE.
18171 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18172 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18173 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18174 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18175 stride is constant and is below the minimum stride threshold.
18177 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18179 * config/arm/arm-cpus.in (mode26): Delete.
18180 (armv4): Delete mode26 reference.
18181 * config/arm/arm.c (arm_configure_build_target): Delete use of
18184 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18186 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18188 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18189 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18191 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18192 (floatunsdidf2): Ditto.
18194 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18196 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18197 (fixuns_trunc<mode>si2_avx512f): Ditto.
18198 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18199 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18200 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18202 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18204 PR rtl-optimization/79985
18205 * df-scan.c (df_insn_refs_collect): Remove special case for
18206 global registers and asm statements.
18208 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18210 * extend.texi (Global Register Variables): Rewrite the bullet list.
18211 Note that the register is available for allocation. Note that access
18212 via inline asm must use constraints. Add note about async-signal
18213 handlers. Remove paragraph about automagic register selection.
18215 2018-05-23 Richard Biener <rguenther@suse.de>
18217 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18218 of fixed offset from memset VN.
18220 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18222 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18223 first_interp field.
18224 (alloc_cand_and_find_basis): Initialize first_interp field.
18225 (slsr_process_mul): Modify first_interp field.
18226 (slsr_process_add): Likewise.
18227 (slsr_process_cast): Modify first_interp field for each new
18229 (slsr_process_copy): Likewise.
18230 (dump_candidate): Dump first_interp field.
18231 (replace_mult_candidate): Process all interpretations, not just
18233 (replace_rhs_if_not_dup): Likewise.
18234 (replace_one_candidate): Likewise.
18236 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18238 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18240 (aarch64_needs_frame_chain): New function.
18241 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18243 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18246 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18247 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18248 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18249 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18250 as true for strict-align.
18251 (aarch64_can_inline_p): Perform checks even when callee has no
18252 attributes to check for strict alignment.
18253 * doc/extend.texi (AArch64 Function Attributes): Document
18255 * doc/invoke.texi: (AArch64 Options): Likewise.
18257 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18259 PR tree-optimization/85853
18260 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18261 the handling of the root of the node to...
18262 (vect_slp_analyze_node_operations_1): ...this new function,
18263 and run the whole thing with the child nodes' def types
18264 set according to their SLP node's def type.
18266 2018-05-23 Richard Biener <rguenther@suse.de>
18268 PR middle-end/85874
18269 * tree-data-ref.c (create_runtime_alias_checks): Defer
18270 and ignore overflow warnings.
18272 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18274 PR tree-optimization/85822
18275 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18278 2018-05-23 Richard Biener <rguenther@suse.de>
18280 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18281 memset constants via native_interpret_expr.
18283 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18286 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18288 (cgraph_node::create_alias): Likewise.
18289 (cgraph_node::get_availability): Check ifunc_resolver instead
18290 of looking up ifunc attribute.
18291 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18292 * varasm.c (do_assemble_alias): Likewise.
18293 (assemble_alias): Likewise.
18294 (default_binds_local_p_3): Likewise.
18295 * cgraph.h (cgraph_node): Add ifunc_resolver.
18296 (cgraph_node::only_called_directly_or_aliased_p): Return false
18297 for IFUNC resolver.
18298 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18300 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18301 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18302 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18303 instead of looking up ifunc attribute.
18305 2018-05-22 Luis Machado <luis.machado@linaro.org>
18307 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18309 2018-05-22 Martin Sebor <msebor@redhat.com>
18311 PR middle-end/85359
18312 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18313 only when expasion succeeds.
18314 (expand_builtin_strcmp): Same.
18315 (expand_builtin_strncmp): Same.
18317 2018-05-22 Martin Sebor <msebor@redhat.com>
18319 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18321 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18322 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18324 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18325 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18327 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18328 Add check for legitimate_address.
18329 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18330 (aarch64_swap_ldrstr_operands): New.
18331 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18334 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18335 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18337 * config/aarch64/aarch64.md: New patterns to generate stp
18339 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18340 single words and double words.
18341 (load_pair_sw, load_pair_dw): Likewise.
18342 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18344 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18346 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18347 for different mode ldpstp and add peephole for merged zero stores.
18348 Likewise for loads.
18349 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18351 (aarch64_gen_store_pair): Rename calls to match new patterns.
18352 (aarch64_gen_load_pair): Rename calls to match new patterns.
18353 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18354 (load_pair<DREG:mode><DREG2:mode>): ... This.
18355 (store_pair<mode>): Rename to...
18356 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18357 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18358 New mode iterators.
18359 (V_INT_EQUIV): Handle SImode.
18360 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18363 2018-05-22 Martin Sebor <msebor@redhat.com>
18366 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18367 or ajust the presumed bound on an operation to avoid unnecessary
18370 2018-05-22 Martin Sebor <msebor@redhat.com>
18372 PR tree-optimization/85826
18373 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18374 assuming that a DECL necesarily has a constant size.
18376 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18378 PR middle-end/85862
18379 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18381 2018-05-22 Richard Biener <rguenther@suse.de>
18383 PR tree-optimization/85834
18384 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18385 non-constant and non-zero memset arguments.
18387 2018-05-22 Martin Liska <mliska@suse.cz>
18390 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18392 2018-05-22 Richard Biener <rguenther@suse.de>
18394 PR tree-optimization/85863
18395 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18396 comparisons when vectype is specified.
18397 (vectorizable_condition): Do not specify vectype for
18398 vect_is_simple_cond when SLP vectorizing.
18400 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18403 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18404 define __ibm128 as long double.
18405 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18406 as a distinct type when IEEE 128-bit support is enabled.
18407 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18408 128-bit types to use the correct functions.
18409 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18410 convert between 128-bit floating point types that have different
18411 modes but the same representation, instead of using gen_lowpart to
18413 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18415 (IFKF_reg): New attributes to give the register constraints for
18417 (extend<mode>tf2_internal): New insns to mark an explicit
18418 conversion between 128-bit floating point types that have a
18419 different mode but share the same representation.
18421 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18423 PR tree-optimization/85814
18424 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18425 a null return from get_strinfo when unsharing the next
18426 strinfo in the chain.
18428 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18431 * varasm.c (weak_finish): Clean up weak_decls.
18433 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18435 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18436 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18437 UNSPEC_UADALP values.
18438 * config/aarch64/iterators.md (ABAL): New int iterator.
18441 (sur): Add mappings for the above.
18442 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18444 (aarch64_<sur>abal<mode>_4): Likewise.
18445 (aarch64_<sur>adalp<mode>_3): Likewise.
18446 (<sur>sadv16qi): New define_expand.
18448 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18450 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18451 (*movdf_internal): Ditto.
18452 (*rcpsf2_sse): Ditto.
18453 (*rsqrtsf2_sse): Ditto.
18454 (*sqrt<mode>2_sse): Ditto.
18456 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18458 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18460 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18461 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18462 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18463 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18465 * config/aarch64/arm_neon.h: Likewise.
18466 * config/aarch64/iterators.md (VQ_I): New.
18468 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18470 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18472 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18475 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18477 * config/nds32/constraints.md (S): New constraint.
18478 * config/nds32/nds32.md (call_internal): Use constraint S.
18479 (call_value_internal): Likewise.
18480 (sibcall_internal): Likewise.
18481 (sibcall_value_internal): Likewise.
18483 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18484 Chung-Ju Wu <jasonwucj@gmail.com>
18486 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18487 into consideration.
18489 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18490 Chung-Ju Wu <jasonwucj@gmail.com>
18492 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18493 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18494 (nds32_rtx_costs_impl): Simplify.
18495 (nds32_address_cost_impl): Simplify.
18496 (nds32_init_rtx_costs): New function.
18497 (nds32_rtx_costs_speed_prefer): Likewise.
18498 (nds32_rtx_costs_size_prefer): Likewise.
18499 (nds32_address_cost_speed_prefer): Likewise.
18500 (nds32_address_cost_speed_fwprop): Likewise.
18501 (nds32_address_cost_size_prefer): Likewise.
18502 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18503 * config/nds32/nds32.c (nds32_option_override): Use
18504 nds32_init_rtx_costs function.
18506 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18508 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18509 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18510 (TARGET_PIPELINE_N8): Likewise.
18511 (TARGET_PIPELINE_N10): Likewise.
18512 (TARGET_PIPELINE_N13): Likewise.
18513 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18515 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18517 * config/nds32/nds32-fpu.md: Update copyright year.
18519 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18521 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18523 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18525 * config/nds32/nds32.c
18526 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18527 * config/nds32/nds32.opt (minline-asm-r15): New option.
18529 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18531 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18533 * config/nds32/nds32.md (abssi2): New pattern.
18535 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
18537 * config/i386/i386.md (rex64namesuffix): New mode attribute.
18538 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18539 Merge insn pattern from sse_cvtsi2ss<round_name> and
18540 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18541 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18542 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18543 using SWI48 mode iterator.
18544 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18545 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18546 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18547 pattern from sse_cvttss2si<round_saeonly_name>
18548 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18549 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18550 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18551 using SWI48 mode iterator.
18552 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18553 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18554 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18555 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18556 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18557 using SWI48 mode iterator.
18558 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18559 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18560 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18561 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18562 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18563 SWI48 mode iterator.
18564 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18565 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18566 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18567 pattern from sse_cvttsd2si<round_saeonly_name>
18568 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18570 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18572 * config/nds32/nds32-md-auxiliary.c
18573 (nds32_valid_smw_lwm_base_p): Refine.
18574 (nds32_output_smw_single_word): Refine.
18575 (nds32_output_smw_double_word): New.
18576 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18578 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18580 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18581 (nds32_output_stack_pop): Refine.
18582 (nds32_expand_unaligned_load): Refine.
18583 (nds32_expand_unaligned_store): Refine.
18585 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18586 Chung-Ju Wu <jasonwucj@gmail.com>
18588 * config/nds32/constants.md: Add TP_REGNUM constant.
18589 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18590 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18592 * config/nds32/nds32-doubleword.md: Consider flag_pic.
18593 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18594 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18595 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18596 and PIC code generation.
18597 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18599 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18601 * config/nds32/nds32.md: Support TLS and PIC.
18602 * config/nds32/nds32.c: Support TLS and PIC.
18603 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18604 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18607 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18609 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18610 mode with E_ prefix.
18612 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18613 Chung-Ju Wu <jasonwucj@gmail.com>
18615 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18616 * config/nds32/nds32-md-auxiliary.c
18617 (symbolic_reference_mentioned_p): New.
18618 (nds32_legitimize_ict_address): New.
18619 (nds32_expand_ict_move): New.
18620 (nds32_indirect_call_referenced_p): New.
18621 (nds32_symbol_binds_local_p): Delete.
18622 (nds32_long_call_p): Modify.
18623 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18624 * config/nds32/nds32-protos.h
18625 (symbolic_reference_mentioned_p): Declare.
18626 (nds32_legitimize_ict_address): Declare.
18627 (nds32_expand_ict_move): Declare.
18628 (nds32_indirect_call_referenced_p): Declare.
18629 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18630 (nds32_relax_group): Use nds32_ict_const_p as condition.
18631 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18632 (nds32_asm_file_start): Output ict_model directive in asm code.
18633 (nds32_legitimate_address_p): Consider indirect call.
18634 (nds32_print_operand): Consider indirect call.
18635 (nds32_print_operand_address): Consider indirect call.
18636 (nds32_insert_attributes): Handle "indirect_call" attribute.
18637 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18638 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18639 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18640 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18641 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18642 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18643 (TARGET_ICT_MODEL_SMALL): Define.
18644 (TARGET_ICT_MODEL_LARGE): Define.
18645 * config/nds32/nds32.md (movsi): Consider ict model.
18646 (call, call_value): Consider ict model.
18647 (sibcall, sibcall_value): Consider ict model.
18648 * config/nds32/nds32.opt (mict-model): New option.
18649 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18652 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18653 Monk Chiang <sh.chiang04@gmail.com>
18654 Jim Wilson <jimw@sifive.com>
18656 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18657 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18658 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18659 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18660 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
18661 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18662 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18663 compute save_libcall_adjustment properly.
18664 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18665 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18666 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18667 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18668 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18669 (ABI_SPEC): Handle mabi=ilp32e.
18670 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18671 (RVE): Add RVE mask.
18672 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18673 <-march>: Add rv32e as an example.
18675 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
18678 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18679 (intra_create_variable_infos): Handle C++ constructors.
18681 2018-05-18 Martin Liska <mliska@suse.cz>
18683 * passes.def: Remove a redundant pass.
18685 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
18688 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18690 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18692 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18694 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18696 (armv2, armv2a, armv3, armv3m): Delete architectures.
18697 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18698 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18699 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18701 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18702 (*mulsidi3adddi): Likewise.
18703 (mulsidi3): Likewise.
18704 (*mulsidi3_nov6): Likewise.
18705 (umulsidi3): Likewise.
18706 (umulsidi3_nov6): Likewise.
18707 (umaddsidi4): Likewise.
18708 (*umulsidi3adddi): Likewise.
18709 (smulsi3_highpart): Likewise.
18710 (*smulsi3_highpart_nov6): Likewise.
18711 (umulsi3_highpart): Likewise.
18712 (*umulsi3_highpart_nov6): Likewise.
18713 * config/arm/arm.h (arm_arch3m): Delete.
18714 * config/arm/arm.c (arm_arch3m): Delete.
18715 (arm_option_override_internal): Update armv3-related comment.
18716 (arm_configure_build_target): Delete use of isa_bit_mode32.
18717 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18718 (arm_rtx_costs_internal): Delete check of arm_arch3m.
18719 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18720 (mulsa3): Likewise.
18721 (mulusa3): Likewise.
18722 * config/arm/arm-protos.h (arm_arch3m): Delete.
18723 * config/arm/arm-tables.opt: Regenerate.
18724 * config/arm/arm-tune.md: Likewise.
18725 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18726 deleted architectures.
18728 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18730 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18731 (armv5t, armv5te): New features.
18732 (ARMv5, ARMv5e): Delete fgroups.
18733 (ARMv5t, ARMv5te): Adjust for above changes.
18734 (ARMv6m): Likewise.
18735 (armv5, armv5e): Delete arches.
18736 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18738 (*call_reg_arm): Likewise.
18739 (*call_value_reg_armv5): Likewise.
18740 (*call_value_reg_arm): Likewise.
18741 (*call_symbol): Likewise.
18742 (*call_value_symbol): Likewise.
18743 (*sibcall_insn): Likewise.
18744 (*sibcall_value_insn): Likewise.
18745 (clzsi2): Likewise.
18746 (prefetch): Likewise.
18747 (define_split and define_peephole2 dependent on arm_arch5):
18749 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18751 (TARGET_ARM_QBIT): Likewise.
18752 (TARGET_DSP_MULTIPLY): Likewise.
18753 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18754 (arm_arch5, arm_arch5e): Delete.
18755 (arm_arch5t, arm_arch5te): Declare.
18756 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18757 (arm_arch5t): Declare.
18758 (arm_option_reconfigure_globals): Update for the above.
18759 (arm_options_perform_arch_sanity_checks): Update comment, replace
18760 use of arm_arch5 with arm_arch5t.
18761 (use_return_insn): Likewise.
18762 (arm_emit_call_insn): Likewise.
18763 (output_return_instruction): Likewise.
18764 (arm_final_prescan_insn): Likewise.
18765 (arm_coproc_builtin_available): Likewise.
18766 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18767 arm_arch5e with arm_arch5t and arm_arch5te.
18768 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18769 (arm_arch5t, arm_arch5te): Declare.
18770 * config/arm/arm-tables.opt: Regenerate.
18771 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18772 * config/arm/t-multilib: Likewise.
18773 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18774 instead of arm_arch5.
18775 (*call_reg_thumb1): Likewise.
18776 (*call_value_reg_thumb1_v5): Likewise.
18777 (*call_value_reg_thumb1): Likewise.
18778 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18780 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18782 2018-05-18 Martin Liska <mliska@suse.cz>
18784 PR gcov-profile/84846
18785 * doc/gcov.texi: Document -t option of gcov tool.
18787 2018-05-18 Martin Liska <mliska@suse.cz>
18789 PR gcov-profile/84846
18790 * gcov.c (print_usage): Add new -t option.
18791 (process_args): Handle the option.
18792 (generate_results): Use stdout as output when requested by
18795 2018-05-18 Martin Liska <mliska@suse.cz>
18797 PR gcov-profile/84846
18798 * coverage.c (coverage_init): Write PWD to .gcno file.
18799 * doc/gcov.texi: Document how working directory is printed.
18800 * gcov-dump.c (dump_gcov_file): Print PWD.
18801 * gcov.c (output_intermediate_file): Likewise.
18802 (read_graph_file): Read PWD string.
18803 (output_lines): Print PWD.
18805 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18807 PR middle-end/85817
18808 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18809 for retval and return false if all args to phi are zero.
18811 2018-05-18 Richard Biener <rguenther@suse.de>
18813 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18815 (evrp_dom_walker::before_dom_children): Call it.
18817 2018-05-18 Richard Biener <rguenther@suse.de>
18819 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18820 results when processing array refs with variable index.
18822 2018-05-18 Toon Moene <toon@moene.org>
18824 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18825 directly after that of -floop-interchange. Indicate that both
18826 options are enabled by default when specifying -O3.
18828 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18830 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18831 iterator. Delete separate integer-mode vec_set<mode> expander.
18832 (aarch64_simd_vec_setv2di): Delete.
18833 (vec_setv2di): Delete.
18834 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18835 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
18836 the "w, r" alternative.
18838 2018-05-18 Martin Liska <mliska@suse.cz>
18840 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18841 * tree-pass.h (make_pass_lower_switch_O0): New function.
18842 * tree-switch-conversion.c (node_has_low_bound): Remove.
18843 (node_has_high_bound): Likewise.
18844 (node_is_bounded): Likewise.
18845 (class pass_lower_switch): Make it a template type and create
18847 (pass_lower_switch::execute): Add template argument.
18848 (make_pass_lower_switch): New function.
18849 (make_pass_lower_switch_O0): New function.
18850 (do_jump_if_equal): Remove.
18851 (emit_case_nodes): Simplify to just handle all 3 cases and leave
18852 all the hard work to tree optimization passes.
18854 2018-05-18 Martin Liska <mliska@suse.cz>
18856 * dbgcnt.c (limit_low): Renamed from limit.
18857 (limit_high): New variable.
18858 (dbg_cnt_is_enabled): Check for upper limit.
18859 (dbg_cnt): Adjust dumping.
18860 (dbg_cnt_set_limit_by_index): Add new argument for high
18862 (dbg_cnt_set_limit_by_name): Likewise.
18863 (dbg_cnt_process_single_pair): Parse new format.
18864 (dbg_cnt_process_opt): Use strtok.
18865 (dbg_cnt_list_all_counters): Remove 'value' and add
18867 * doc/invoke.texi: Document changes.
18869 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18871 * doc/sourcebuild.texi (scalar_all_fma): Document.
18872 * tree.def (FMA_EXPR): Delete.
18873 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18874 * internal-fn.c (ternary_direct): New macro.
18875 (expand_ternary_optab_fn): Likewise.
18876 (direct_ternary_optab_supported_p): Likewise.
18877 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18878 * builtins.c (fold_builtin_fma): Delete.
18879 (fold_builtin_3): Don't call it.
18880 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18881 * expr.c (expand_expr_real_2): Likewise.
18882 * fold-const.c (operand_equal_p): Likewise.
18883 (fold_ternary_loc): Likewise.
18884 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18885 * gimple.c (DEFTREECODE): Likewise.
18886 * gimplify.c (gimplify_expr): Likewise.
18887 * optabs-tree.c (optab_for_tree_code): Likewise.
18888 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18889 * tree-eh.c (operation_could_trap_p): Likewise.
18890 (stmt_could_throw_1_p): Likewise.
18891 * tree-inline.c (estimate_operator_cost): Likewise.
18892 * tree-pretty-print.c (dump_generic_node): Likewise.
18893 (op_code_prio): Likewise.
18894 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18895 * tree-ssa-operands.c (get_expr_operands): Likewise.
18896 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18897 * fold-const-call.h (fold_fma): Delete.
18898 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18899 CFN_FNMA and CFN_FNMS.
18900 (fold_fma): Delete.
18901 * genmatch.c (combined_fn): New enum.
18902 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18903 (commutative_op): New function.
18904 (commutate): Use it. Handle more than 2 operands.
18905 (dt_operand::gen_gimple_expr): Use commutative_op.
18906 (parser::parse_expr): Allow :c to be used with non-binary
18907 operators if the commutative operand is known.
18908 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18909 CFN_FMS, CFN_FNMA and CFN_FNMS.
18910 (backprop::process_assign_use): Remove FMA_EXPR handling.
18911 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18912 (gen_hsa_fma): New function.
18913 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18914 IFN_FNMA and IFN_FNMS.
18915 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18916 * gimple-fold.h (follow_all_ssa_edges): Declare.
18917 * gimple-fold.c (follow_all_ssa_edges): New function.
18918 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18919 gimple_build interface and use follow_all_ssa_edges to fold the result.
18920 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18921 instead of checking for optabs directly.
18922 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18923 rather than FMA_EXPRs.
18924 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18925 call to IFN_FMA instead of an FMA_EXPR.
18927 2018-05-17 Jim Wilson <jimw@sifive.com>
18929 * expr.c (do_tablejump): When converting index to Pmode, if we have a
18930 sign extended promoted subreg, and the range does not have the sign bit
18931 set, then do a sign extend.
18933 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18934 test, check for sign extended subreg and/or constant operands, and
18935 do a sign extend in that case.
18937 2018-05-17 Steve Ellcey <sellcey@cavium.com>
18939 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18940 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18942 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18943 Change logics_shift_reg to logics_shift_imm.
18944 (thunderx2t99_fp_loadpair_basic): Delete.
18945 (thunderx2t99_fp_storepair_basic): Delete.
18946 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18947 (thunderx2t99_asimd_polynomial): Delete.
18948 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18949 and neon_fp_mul_d_scalar_q.
18950 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18951 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18952 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18953 (thunderx2t99_asimd_lut): Add missing tbl types.
18954 (thunderx2t99_asimd_ext): Delete.
18955 (thunderx2t99_asimd_load1_1_mult): Delete.
18956 (thunderx2t99_asimd_load1_2_mult): Delete.
18957 (thunderx2t99_asimd_load1_ldp): New.
18958 (thunderx2t99_asimd_load1): New.
18959 (thunderx2t99_asimd_load2): Add missing *load2* types.
18960 (thunderx2t99_asimd_load3): New.
18961 (thunderx2t99_asimd_load4): New.
18962 (thunderx2t99_asimd_store1_1_mult): Delete.
18963 (thunderx2t99_asimd_store1_2_mult): Delete.
18964 (thunderx2t99_asimd_store2_mult): Delete.
18965 (thunderx2t99_asimd_store2_onelane): Delete.
18966 (thunderx2t99_asimd_store_stp): New.
18967 (thunderx2t99_asimd_store1): New.
18968 (thunderx2t99_asimd_store2): New.
18969 (thunderx2t99_asimd_store3): New.
18970 (thunderx2t99_asimd_store4): New.
18972 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
18974 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18975 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
18977 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
18978 Segher Boessenkool <segher@kernel.crashing.org>
18981 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18984 2018-05-17 Richard Biener <rguenther@suse.de>
18986 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18987 for pruning loop and prune defs feeding only already visited PHIs.
18989 2018-05-17 Richard Biener <rguenther@suse.de>
18991 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18993 2018-05-17 Bin Cheng <bin.cheng@arm.com>
18994 Richard Biener <rguenther@suse.de>
18996 PR tree-optimization/85793
18997 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18998 for VMAT_ELEMENTWISE.
19000 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19002 * internal-fn.h (lookup_internal_fn): Declare
19003 * internal-fn.c (lookup_internal_fn): New function.
19004 * gimple.c (gimple_build_call_from_tree): Handle calls to
19005 internal functions.
19006 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19007 internal function names.
19008 * tree-pretty-print.c (dump_generic_node): Likewise.
19009 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19011 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19013 * gimple-fold.h (gimple_build): Make the function forms take
19014 combined_fn rather than built_in_function.
19015 (gimple_simplify): Likewise.
19016 * gimple-match-head.c (gimple_simplify): Likewise.
19017 * gimple-fold.c (gimple_build): Likewise.
19018 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19019 rather than gimple_build_call_internal.
19020 (get_initial_defs_for_reduction): Likewise.
19021 (vect_create_epilog_for_reduction): Likewise.
19022 (vectorizable_live_operation): Likewise.
19024 2018-05-17 Martin Liska <mliska@suse.cz>
19026 * gimple-ssa-sprintf.c (format_directive): Do not use
19027 space in between 'G_' and '('.
19029 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19032 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19033 even if the mask is not all ones.
19036 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19038 (ix86_gimple_fold_builtin): Likewise.
19041 * config/i386/i386.c: Include tree-vector-builder.h.
19042 (ix86_vector_shift_count): New function.
19043 (ix86_fold_builtin): Fold shift builtins by scalar count.
19044 (ix86_gimple_fold_builtin): Likewise.
19046 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19047 _mm512_setzero): New intrinsics.
19049 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19050 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19052 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19053 code generation for cases where splatting a value is not useful.
19054 * simplify-rtx.c (simplify_ternary_operation): Simplify
19055 vec_merge across a vec_duplicate and a paradoxical subreg forming
19056 a vector mode to a vec_concat.
19058 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19060 * config.gcc: Support "goldmont-plus".
19061 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19063 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19064 PROCESSOR_GOLDMONT_PLUS.
19065 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19066 (processor_target_table): Add "goldmont-plus".
19067 (PTA_GOLDMONT_PLUS): Define.
19068 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19069 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19070 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19071 (fold_builtin_cpu): Add "goldmont-plus".
19072 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19073 (ix86_option_override_internal): Add "goldmont-plus".
19074 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19075 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19076 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19077 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19079 2018-05-17 Richard Biener <rguenther@suse.de>
19081 PR tree-optimization/85757
19082 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19083 remove defs that only feed that PHI from further processing.
19085 2018-05-16 Jim Wilson <jimw@sifive.com>
19087 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19089 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19091 2018-05-16 Mark Wielaard <mark@klomp.org>
19093 * dwarf2out.c (count_index_strings): New function.
19094 (output_indirect_strings): Call count_index_strings and generate
19095 header for dwarf_version >= 5.
19097 2018-05-16 Mark Wielaard <mark@klomp.org>
19099 * dwarf2out.c (dwarf_FORM): New function.
19100 (set_indirect_string): Use dwarf_FORM.
19101 (reset_indirect_string): Likewise.
19102 (size_of_die): Likewise.
19103 (value_format): Likewise.
19104 (output_die): Likewise.
19105 (add_skeleton_AT_string): Likewise.
19106 (output_macinfo_op): Likewise.
19107 (index_string): Likewise.
19108 (output_index_string_offset): Likewise.
19109 (output_index_string): Likewise.
19110 (count_index_strings): Likewise.
19112 2018-05-16 Carl Love <cel@us.ibm.com>
19114 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19115 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19117 2018-05-16 Martin Jambor <mjambor@suse.cz>
19119 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19120 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19122 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19124 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19125 (fnma<mode>4): Likewise.
19126 (fms<mode>4): Likewise.
19127 (fnms<mode>4): Likewise.
19128 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19129 (aarch64_fnma<mode>4): Likewise.
19130 (aarch64_fms<mode>4): Likewise.
19131 (aarch64_fnms<mode>4): Likewise.
19132 (aarch64_fnmadd<mode>4): Likewise.
19134 2018-05-16 Jason Merrill <jason@redhat.com>
19136 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19138 2018-05-16 Richard Biener <rguenther@suse.de>
19140 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19141 (dump_stmt_cost): Declare.
19142 (add_stmt_cost): Dump cost we add.
19143 (add_stmt_costs): New function.
19144 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19145 No longer exported.
19146 (vect_analyze_stmt): Adjust prototype.
19147 (vectorizable_condition): Likewise.
19148 (vectorizable_live_operation): Likewise.
19149 (vectorizable_reduction): Likewise.
19150 (vectorizable_induction): Likewise.
19151 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19152 cost vector to pass to vectorizable_ and record afterwards.
19153 (vect_model_reduction_cost): Take cost vector argument and adjust.
19154 (vect_model_induction_cost): Likewise.
19155 (vectorizable_reduction): Likewise.
19156 (vectorizable_induction): Likewise.
19157 (vectorizable_live_operation): Likewise.
19158 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19159 SLP_TREE_NUMBER_OF_VEC_STMTS.
19160 (vect_analyze_slp_cost_1): Remove.
19161 (vect_analyze_slp_cost): Likewise.
19162 (vect_slp_analyze_node_operations): Take visited args and
19163 a target cost vector. Avoid processing already visited stmt sets.
19164 (vect_slp_analyze_operations): Use a local cost vector to gather
19165 costs and register those of non-discarded instances.
19166 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19167 (vect_schedule_slp_instance): Remove copying of
19168 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19170 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19171 adding cost. Record cost entry location.
19172 (vect_prologue_cost_for_slp_op): Function to compute cost of
19173 a constant or invariant generated for SLP vect in the prologue,
19174 split out from vect_analyze_slp_cost_1.
19175 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19176 (vect_model_promotion_demotion_cost): Likewise.
19177 (vect_model_store_cost): Likewise, make static.
19178 (vect_model_load_cost): Likewise.
19179 (vectorizable_bswap): Add cost vector arg and adjust.
19180 (vectorizable_call): Likewise.
19181 (vectorizable_simd_clone_call): Likewise.
19182 (vectorizable_conversion): Likewise.
19183 (vectorizable_assignment): Likewise.
19184 (vectorizable_shift): Likewise.
19185 (vectorizable_operation): Likewise.
19186 (vectorizable_store): Likewise.
19187 (vectorizable_load): Likewise.
19188 (vectorizable_condition): Likewise.
19189 (vectorizable_comparison): Likewise.
19190 (can_vectorize_live_stmts): Likewise.
19191 (vect_analyze_stmt): Likewise.
19192 (vect_transform_stmt): Adjust calls to vectorizable_*.
19193 * tree-vectorizer.c: Include gimple-pretty-print.h.
19194 (dump_stmt_cost): New function.
19196 2018-05-16 Richard Biener <rguenther@suse.de>
19198 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19199 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19200 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19201 (check_name): New callback.
19202 (dse_classify_store): Track cycles via a visited bitmap of PHI
19203 defs and simplify handling of in-loop and across loop dead stores
19204 and properly fail for loop-variant refs. Handle byte-tracking with
19205 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19208 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19210 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19211 (vect_get_mask_type_for_stmt): Likewise.
19212 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19214 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19215 to determine the statement's vector type and the vector type that
19216 should be used for calculating nunits. Deal with cases in which
19217 the type has to be deferred.
19218 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19219 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19220 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19221 (vect_determine_vf_for_stmt): New functions, split out from...
19222 (vect_determine_vectorization_factor): ...here.
19223 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19224 (vect_get_mask_type_for_stmt): New functions, split out from
19225 vect_determine_vectorization_factor.
19227 2018-05-16 Richard Biener <rguenther@suse.de>
19229 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19230 verify the [VEC_]COND_EXPR embedded comparison.
19232 2018-05-15 Martin Sebor <msebor@redhat.com>
19234 PR tree-optimization/85753
19235 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19236 RECORD_TYPE in addition to ARRAY_TYPE.
19238 2018-05-15 Martin Sebor <msebor@redhat.com>
19240 PR middle-end/85643
19241 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19243 2018-05-15 Richard Biener <rguenther@suse.de>
19245 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19246 add by_clobber_p one. Change algorithm to collect all defs
19247 representing uses we need to walk and try reducing them to
19248 a single one before failing.
19249 (dse_dom_walker::dse_optimize_stmt): Adjust.
19251 2018-05-13 Mark Wielaard <mark@klomp.org>
19253 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19254 (size_of_loc_descr): Likewise.
19255 (output_loc_operands): Likewise.
19256 (output_loc_operands_raw): Likewise.
19257 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19258 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19259 (hash_loc_operands): Likewise.
19260 (compare_loc_operands): Likewise.
19262 2018-05-14 Mark Wielaard <mark@klomp.org>
19264 * dwarf2out.c (count_index_addrs): New function.
19265 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19267 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19269 PR tree-optimization/83648
19270 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19271 return value as malloc candidate.
19273 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19276 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19277 param as true in call to suggest_attribute.
19279 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19281 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19282 -mreadonly-in-sdata.
19284 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19286 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19288 (aarch64_crypto_aesd_fused): Likewise.
19290 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19292 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19293 (movsi_aarch64): Likewise.
19294 (load_pairsi): Likewise.
19295 (load_pairdi): Likewise.
19296 (store_pairsi): Likewise.
19297 (store_pairdi): Likewise.
19298 (load_pairsf): Likewise.
19299 (load_pairdf): Likewise.
19300 (store_pairsf): Likewise.
19301 (store_pairdf): Likewise.
19302 (zero_extend): Likewise.
19303 (trunc): Swap alternatives.
19304 (fcvt_target): Add '?' to prefer w over r.
19306 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19309 * config/i386/i386.md: Disallow non-commutative arithmetics in
19310 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19311 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19312 in the peephole2 before it.
19314 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19316 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19317 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19318 (ix86_handle_option): Handle -mcldemote.
19319 * config.gcc: New header.
19320 * config/i386/cldemoteintrin.h: New file.
19321 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19322 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19324 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19325 OPTION_MASK_ISA_CLDEMOTE.
19326 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19327 (ix86_valid_target_attribute_inner_p): Ditto.
19328 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19329 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19330 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19331 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19332 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19334 * config/i386/i386.opt: Add -mcldemote.
19335 * config/i386/x86intrin.h: New header.
19336 * doc/invoke.texi: Add -mcldemote.
19338 2018-05-14 Richard Biener <rguenther@suse.de>
19340 * doc/match-and-simplify.texi: Adjust :s documentation.
19342 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19344 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19345 intended memcpy size.
19346 (REORDER_45): Likewise.
19348 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19350 * sort.cc: New file.
19351 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19352 * vec.c (qsort_chk): Use gcc_qsort.
19353 * Makefile.in (OBJS-libcommon): Add sort.o.
19354 (build/sort.o): New target. Use it...
19355 (BUILD_RTL): ... here, and...
19356 (build/gencfn-macros): ... here, and...
19357 (build/genmatch): ... here.
19359 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19360 Chung-Ju Wu <jasonwucj@gmail.com>
19362 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19363 * config/nds32/nds32-graywolf.md: New file.
19364 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19365 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19367 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19368 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19369 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19370 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19371 * config/nds32/pipelines.md: Include n15 settings.
19373 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19374 Chung-Ju Wu <jasonwucj@gmail.com>
19376 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19377 * config/nds32/nds32-n13.md: New file.
19378 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19379 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19381 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19382 * config/nds32/nds32.md (pipeline_model): Add n13.
19383 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19384 * config/nds32/pipelines.md: Include n13 settings.
19386 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19387 Chung-Ju Wu <jasonwucj@gmail.com>
19389 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19390 * config/nds32/nds32-n10.md: New file.
19391 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19392 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19394 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19395 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19396 * config/nds32/nds32.md (pipeline_model): Add n10.
19397 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19398 * config/nds32/pipelines.md: Include n10 settings.
19400 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19401 Kito Cheng <kito.cheng@gmail.com>
19402 Chung-Ju Wu <jasonwucj@gmail.com>
19404 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19405 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19406 Add enum values for DSP extension instructions.
19407 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19409 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19410 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19411 New code iterators.
19412 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19413 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19414 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19415 * config/nds32/nds32-intrinsic.md: Likewise.
19416 * config/nds32/nds32_intrinsic.h: Likewise.
19417 * config/nds32/nds32-md-auxiliary.c: Likewise.
19418 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19419 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19420 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19421 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19422 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19423 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19424 TYPE_DMAC in switch statement.
19425 * config/nds32/nds32.c: New checking and implementation for DSP
19426 extension instructions.
19427 * config/nds32/nds32.h: Likewise.
19428 * config/nds32/nds32.md: Likewise.
19429 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19430 * config/nds32/predicates.md: Implement new predicates for DSP
19433 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19435 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19436 Reformat alternatives and attributes so it is easier to identify
19437 which constraints/attributes go with which instruction.
19438 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19439 (mov<mode>_softfloat32, FMOVE64): Likewise.
19440 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19441 (mov<mode>_softfloat64, FMOVE64): Likewise.
19443 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19445 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19447 (Basic PowerPC Built-in Functions): The new name of the
19448 subsection previously known as "PowerPC Built-in Functions".
19449 (Basic PowerPC Built-in Functions Available on all Configurations):
19451 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19452 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19453 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19454 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19456 2018-05-11 Martin Jambor <mjambor@suse.cz>
19459 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19462 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19465 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19467 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19469 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19470 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19471 (ix86_handle_option): Handle -mwaitpkg.
19472 * config.gcc: New header.
19473 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19474 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19475 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19477 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19478 OPTION_MASK_ISA_WAITPKG.
19479 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19480 (ix86_option_override_internal): Add PTA_WAITPKG.
19481 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19482 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19483 IX86_BUILTIN_TPAUSE.
19484 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19485 __builtin_ia32_umwait and __builtin_ia32_tpause.
19486 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19487 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19488 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19489 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19490 UNSPECV_TPAUSE): New.
19491 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19492 * config/i386/i386.opt: Add -mwaitpkg.
19493 * config/i386/waitpkgintrin.h: New file.
19494 * config/i386/x86intrin.h: New header.
19495 * doc/invoke.texi: Add -mwaitpkg.
19497 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19500 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19502 (cortex-m0): Use armv6s-m isa.
19503 (cortex-m0plus): Likewise.
19504 (cortex-m1): Likewise.
19505 (cortex-m0.small-multiply): Likewise.
19506 (cortex-m0plus.small-multiply): Likewise.
19507 (cortex-m1.small-multiply): Likewise.
19509 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19510 Jakub Jelinek <jakub@redhat.com>
19512 PR tree-optimization/85692
19513 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19514 source permute as well.
19516 2018-05-11 Martin Liska <mliska@suse.cz>
19519 * doc/extend.texi: Document LLVM style format for no_sanitize
19522 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19524 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19525 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19526 (mode_supports_vsx_dform_quad): Likewise.
19527 (mode_supports_vmx_dform): Move these functions to be next to the
19528 other mode_supports functions.
19529 (mode_supports_dq_form): Likewise.
19530 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19531 mode_supports_dq_form.
19532 (reg_offset_addressing_ok_p): Likewise.
19533 (offsettable_ok_by_alignment): Likewise.
19534 (rs6000_legitimate_offset_address_p): Likewise.
19535 (legitimate_lo_sum_address_p): Likewise.
19536 (rs6000_legitimize_address): Likewise.
19537 (rs6000_legitimize_reload_address): Likewise.
19538 (rs6000_secondary_reload_inner): Likewise.
19539 (rs6000_preferred_reload_class): Likewise.
19540 (rs6000_output_move_128bit): Likewise.
19542 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19544 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19545 Generate SImode target register for null target.
19546 <case IX86_BUILTIN_XGETBV>: Ditto.
19547 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19548 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19550 2018-05-10 Carl Love <cel@us.ibm.com>
19552 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19553 dcbtt and dcbtstt if operands[2] is 0.
19555 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19558 * config/i386/sse.md (usadv64qi): New expander.
19560 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
19562 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19563 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19564 -maltivec=be support.
19565 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19566 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19567 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19568 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19569 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19570 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19571 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19572 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19573 altivec_vsumsws): Adjust.
19574 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19575 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19576 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19578 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19579 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19580 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19581 (altivec_lve<VI_char>x): Delete expand.
19582 (*altivec_lve<VI_char>x_internal): Rename to...
19583 (altivec_lve<VI_char>x): ... this.
19584 (altivec_lvxl_<mode>): Delete expand.
19585 (*altivec_lvxl_<mode>_internal): Rename to ...
19586 (altivec_lvxl_<mode>): ... this.
19587 (altivec_stvxl_<mode>): Delete expand.
19588 (*altivec_stvxl_<mode>_internal): Rename to ...
19589 (altivec_stvxl_<mode>): ... this.
19590 (altivec_stve<VI_char>x): Delete expand.
19591 (*altivec_stve<VI_char>x_internal): Rename to ...
19592 (altivec_stve<VI_char>x): ... this.
19593 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19594 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19595 reduc_plus_scal_<mode>): Adjust.
19596 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19598 (rs6000_cpu_cpp_builtins): Adjust.
19599 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19600 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19601 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19602 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19603 -maltivec=be support.
19604 (rs6000_split_vec_extract_var): Adjust.
19605 (rs6000_split_v4si_init): Adjust.
19606 (swap_selector_for_mode): Delete.
19607 (altivec_expand_lvx_be, altivec_expand_stvx_be,
19608 altivec_expand_stvex_be): Delete.
19609 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19610 -maltivec=be support.
19611 (rs6000_gimple_fold_builtin): Ditto.
19612 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19614 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19615 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19616 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19617 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19618 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19619 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19620 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19621 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19622 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19623 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19624 anonymous split): Adjust.
19625 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19626 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19628 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19630 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19631 when --with-gxx-include-dir is also specified.
19632 * configure: Regenerate.
19634 2018-05-09 Jim Wilson <jimw@sifive.com>
19637 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19638 * config/riscv/t-withmultilib: New.
19639 * config/riscv/withmultilib.h: New.
19640 * doc/install.texi: Document RISC-V --with-multilib-list support.
19642 2018-05-09 Richard Biener <rguenther@suse.de>
19644 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19646 (vect_bb_vectorization_profitable_p): Adjust. Compute
19647 actual scalar cost using the cost vector and the add_stmt_cost
19650 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19652 PR rtl-optimization/85645
19653 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19654 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19656 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19658 PR rtl-optimization/85645
19659 * shrink-wrap.c (spread_components): Return a boolean saying if
19660 anything was changed.
19661 (try_shrink_wrapping_separate): Iterate spread_components until
19662 nothing changes anymore.
19664 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19666 PR rtl-optimization/85645
19667 * regrename.c (build_def_use): Also kill the chains that include the
19668 destination of a REG_CFA_REGISTER note.
19670 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19672 PR rtl-optimization/85645
19673 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19674 insn that has a REG_CFA_REGISTER note.
19676 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
19678 * cfgexpand.c (expand_clobber): New function.
19679 (expand_gimple_stmt_1): Use it.
19680 * tree-vect-stmts.c (vect_clobber_variable): New function,
19682 (vectorizable_simd_clone_call): ...here.
19683 (vectorizable_store): Emit a clobber either side of an
19684 IFN_STORE_LANES sequence.
19685 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19687 2018-05-09 Tom de Vries <tom@codesourcery.com>
19690 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19691 (define_insn "trap_if_false"): Add exit after trap.
19693 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
19695 PR rtl-optimization/85638
19696 * bb-reorder.c: Include common/common-target.h.
19697 (create_forwarder_block): New function extracted from...
19698 (fix_up_crossing_landing_pad): ...here. Rename into...
19699 (dw2_fix_up_crossing_landing_pad): ...this.
19700 (sjlj_fix_up_crossing_landing_pad): New function.
19701 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19702 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19703 from both partitions and exit the loop after one iteration.
19705 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19708 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19710 (Basic PowerPC Built-in Functions): The new name of the
19711 subsection previously known as "PowerPC Built-in Functions".
19712 (Basic PowerPC Built-in Functions Available on all Configurations):
19714 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19716 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19718 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19720 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19723 2018-05-08 Jim Wilson <jimw@sifive.com>
19725 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19726 (LD_EMUL_SUFFIX): New.
19727 (LINK_SPEC): Use it.
19729 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19731 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19733 (Basic PowerPC Built-in Functions): The new name of the
19734 subsection previously known as "PowerPC Built-in Functions".
19735 (Basic PowerPC Built-in Functions Available on all Configurations):
19737 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19739 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19741 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19743 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19746 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19749 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19750 after cmpelim optimization.
19752 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
19754 * config.gcc: Support "goldmont".
19755 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19756 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19757 PROCESSOR_GOLDMONT.
19758 * config/i386/i386.c (m_GOLDMONT): Define.
19759 (processor_target_table): Add "goldmont".
19760 (PTA_GOLDMONT): Define.
19761 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19762 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19763 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19764 (fold_builtin_cpu): Add "goldmont".
19765 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19766 (ix86_option_override_internal): Add "goldmont".
19767 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19768 (processor_type): Add PROCESSOR_GOLDMONT.
19769 * config/i386/i386.md: Add CPU "glm".
19770 * config/i386/glm.md: New file.
19771 * config/i386/x86-tune.def: Add m_GOLDMONT.
19772 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19774 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19777 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19779 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19780 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
19781 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
19784 * config/i386/i386.c (ix86_fold_builtin): Handle
19785 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19788 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19789 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19791 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
19794 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19795 (check_arch): Likewise.
19796 (check_fpu): Return the result rather than printing it.
19797 (end arch): Fix operator precedence.
19798 (end cpu): Likewise.
19799 (END): Print the result from check_fpu.
19801 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19802 Alan Hayward <alan.hayward@arm.com>
19803 David Sherwood <david.sherwood@arm.com>
19805 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19806 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19807 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19808 (*fcmuo<mode>_and): New patterns.
19810 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19812 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19813 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19814 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19815 (cmp_op, sve_imm_con): New code attributes.
19816 (SVE_COND_INT_CMP, imm_con): Delete.
19817 (cmp_op): Remove above unspecs from int attribute.
19818 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19820 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
19821 comparison-specific unspecs.
19822 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19823 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19824 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19825 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19826 (*vec_fcm<cmp_op><mode>): Rename to...
19827 (*fcm<cmp_op><mode>): ...this and adjust likewise.
19828 (*vec_fcmuo<mode>): Rename to...
19829 (*fcmuo<mode>): ...this and adjust likewise.
19830 (*pred_fcm<cmp_op><mode>): New pattern.
19831 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19832 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19834 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19836 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19837 (aarch64_emit_sve_predicated_cond): New function.
19838 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19839 (aarch64_emit_unspec_cond_or): Replace with...
19840 (aarch64_emit_sve_or_conds): ...this new function. Use
19841 aarch64_emit_sve_ptrue_op for the individual comparisons and
19842 aarch64_emit_binop to OR them together.
19843 (aarch64_emit_inverted_unspec_cond): Replace with...
19844 (aarch64_emit_sve_inverted_cond): ...this new function. Use
19845 aarch64_emit_sve_ptrue_op for the comparison and
19846 aarch64_emit_unop to invert the result.
19847 (aarch64_expand_sve_vec_cmp_float): Update after the above
19848 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
19850 2018-05-07 Nathan Sidwell <nathan@acm.org>
19852 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19853 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19854 (Backwards Compatibility): Likewise.
19856 2018-05-07 Luis Machado <luis.machado@linaro.org>
19860 2018-05-07 Luis Machado <luis.machado@linaro.org>
19862 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19863 <prefetch_dynamic_strides>: New const bool field.
19864 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19865 prefetch_dynamic_strides.
19866 (exynosm1_prefetch_tune): Likewise.
19867 (thunderxt88_prefetch_tune): Likewise.
19868 (thunderx_prefetch_tune): Likewise.
19869 (thunderx2t99_prefetch_tune): Likewise.
19870 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19872 (aarch64_override_options_internal): Update to set
19873 PARAM_PREFETCH_DYNAMIC_STRIDES.
19874 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19875 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19876 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19877 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19878 prefetch-dynamic-strides setting.
19880 2018-05-07 Luis Machado <luis.machado@linaro.org>
19882 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19883 <minimum_stride>: New const int field.
19884 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19885 minimum_stride field.
19886 (exynosm1_prefetch_tune): Likewise.
19887 (thunderxt88_prefetch_tune): Likewise.
19888 (thunderx_prefetch_tune): Likewise.
19889 (thunderx2t99_prefetch_tune): Likewise.
19890 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19891 (aarch64_override_options_internal): Update to set
19892 PARAM_PREFETCH_MINIMUM_STRIDE.
19893 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19894 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19895 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19896 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19897 stride is constant and is below the minimum stride threshold.
19899 2018-05-07 Luis Machado <luis.machado@linaro.org>
19901 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19904 2018-05-07 Luis Machado <luis.machado@linaro.org>
19906 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19907 <prefetch_dynamic_strides>: New const bool field.
19908 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19909 prefetch_dynamic_strides.
19910 (exynosm1_prefetch_tune): Likewise.
19911 (thunderxt88_prefetch_tune): Likewise.
19912 (thunderx_prefetch_tune): Likewise.
19913 (thunderx2t99_prefetch_tune): Likewise.
19914 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19916 (aarch64_override_options_internal): Update to set
19917 PARAM_PREFETCH_DYNAMIC_STRIDES.
19918 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19919 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19920 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19921 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19922 prefetch-dynamic-strides setting.
19924 2018-05-07 Luis Machado <luis.machado@linaro.org>
19926 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19927 <minimum_stride>: New const int field.
19928 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19929 minimum_stride field.
19930 (exynosm1_prefetch_tune): Likewise.
19931 (thunderxt88_prefetch_tune): Likewise.
19932 (thunderx_prefetch_tune): Likewise.
19933 (thunderx2t99_prefetch_tune): Likewise.
19934 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19935 (aarch64_override_options_internal): Update to set
19936 PARAM_PREFETCH_MINIMUM_STRIDE.
19937 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19938 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19939 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19940 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19941 stride is constant and is below the minimum stride threshold.
19943 2018-05-06 Jakub Jelinek <jakub@redhat.com>
19946 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19947 the type is addressable. Don't force op into register if it has
19950 2018-05-05 Roland McGrath <mcgrathr@google.com>
19953 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19954 any section for which we don't know a specific type it should have,
19955 regardless of name. Previously this was done only for the exact
19956 names ".init_array", ".fini_array", and ".preinit_array".
19957 (default_elf_asm_named_section): Add comment about
19958 relationship with default_section_type_flags and SECTION_NOTYPE.
19959 (get_section): Don't consider it a type conflict if one side has
19960 SECTION_NOTYPE and the other doesn't, as long as neither has the
19961 SECTION_BSS et al used in the default_section_type_flags logic.
19963 2018-05-05 Tom de Vries <tom@codesourcery.com>
19966 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19967 (workaround_barsyncs): New function.
19968 (nvptx_reorg): Use workaround_barsyncs.
19969 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19970 (define_expand "nvptx_membar_cta"): New define_expand.
19971 (define_insn "*nvptx_membar_cta"): New insn.
19973 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
19975 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19976 To improve optimization opportunities.
19977 * builtin-types.def: The new needed builtin types for the above.
19979 2018-05-04 Richard Biener <rguenther@suse.de>
19981 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19982 * gimple-ssa-store-merging.c
19983 (imm_store_chain_info::output_merged_store): Remove redundant create,
19984 release split_store vector contents on failure.
19985 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19986 scalar stmt vector on cache hit.
19988 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
19990 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19992 * config.gcc (powerpc-xilinx-eabi*): Remove.
19993 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19995 (fusion_addis_mem_combo_load): Ditto.
19996 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19998 (rs6000_cpu_cpp_builtins): Ditto.
19999 * config/rs6000/rs6000-linux.c
20000 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20001 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20002 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20004 (rs6000_setup_reg_addr_masks): Ditto.
20005 (rs6000_init_hard_regno_mode_ok): Ditto.
20006 (rs6000_option_override_internal): Ditto.
20007 (legitimate_lo_sum_address_p): Ditto.
20008 (rs6000_legitimize_address): Ditto.
20009 (rs6000_legitimize_reload_address): Ditto.
20010 (rs6000_legitimate_address_p): Ditto.
20011 (abi_v4_pass_in_fpr): Ditto.
20012 (setup_incoming_varargs): Ditto.
20013 (rs6000_gimplify_va_arg): Ditto.
20014 (rs6000_split_multireg_move): Ditto.
20015 (rs6000_savres_strategy): Ditto.
20016 (rs6000_emit_prologue_components): Ditto.
20017 (rs6000_emit_epilogue_components): Ditto.
20018 (rs6000_emit_prologue): Ditto.
20019 (rs6000_emit_epilogue): Ditto.
20020 (rs6000_elf_file_end): Ditto.
20021 (rs6000_function_value): Ditto.
20022 (rs6000_libcall_value): Ditto.
20023 * config/rs6000/rs6000.h: Ditto.
20024 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20025 (TARGET_MINMAX): ... this. New.
20026 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20027 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20028 (*movsi_internal1_single): Delete.
20029 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20030 mfpu=, mxilinx-fpu): Delete.
20031 * config/rs6000/singlefp.h: Delete.
20032 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20033 * config/rs6000/t-rs6000: Ditto.
20034 * config/rs6000/t-xilinx: Delete.
20035 * config/rs6000/titan.md: Adjust for fp_type removal.
20036 * config/rs6000/vsx.md: Remove Xilinx FP support.
20037 (VStype_simple): Delete.
20038 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20039 * config/rs6000/xfpu.h: Delete.
20040 * config/rs6000/xfpu.md: Delete.
20041 * config/rs6000/xilinx.h: Delete.
20042 * config/rs6000/xilinx.opt: Delete.
20043 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20044 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20046 2018-05-04 Tom de Vries <tom@codesourcery.com>
20049 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20052 2018-05-04 Richard Biener <rguenther@suse.de>
20054 PR middle-end/85627
20055 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20056 (expand_complex_div_wide): Likewise.
20057 (expand_complex_operations_1): Likewise.
20058 (expand_complex_libcall): Preserve EH info of the original stmt.
20059 (tree_lower_complex): Handle removed blocks.
20060 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20061 on complex multiplication and division libcall builtins.
20063 2018-05-04 Richard Biener <rguenther@suse.de>
20065 PR middle-end/85574
20066 * fold-const.c (negate_expr_p): Restrict negation of operand
20067 zero of a division to when we know that can happen without
20069 (fold_negate_expr_1): Likewise.
20071 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20074 * real.h (real_nextafter): Declare.
20075 * real.c (real_nextafter): New function.
20076 * fold-const-call.c (fold_const_nextafter): New function.
20077 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20078 CASE_CFN_NEXTTOWARD.
20079 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20080 even when arg1_mode is different from arg0_mode.
20082 2018-05-03 Nathan Sidwell <nathan@acm.org>
20084 * doc/extend.texi (Deprecated Features): Remove
20085 -ffriend-injection.
20086 (Backwards Compatibility): Likewise.
20087 * doc/invoke.texi (C++ Language Options): Likewise.
20088 (C++ Dialect Options): Likewise.
20090 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20093 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20094 _mm512_mask_mullox_epi64): New intrinsics.
20096 2018-05-03 Tom de Vries <tom@codesourcery.com>
20099 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20100 dump files): Add offload-tree.
20102 2018-05-03 Richard Biener <rguenther@suse.de>
20104 PR tree-optimization/85615
20105 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20106 to loops not nested in BBs loop father to avoid creating multi-entry
20109 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20111 PR tree-optimization/70291
20112 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20113 arguments. Change return type to tree. Emit libcall as a new
20114 statement rather than replacing existing one when inplace_p is true.
20115 (expand_complex_multiplication_components): New function.
20116 (expand_complex_multiplication): Expand floating-point complex
20117 multiplication using the above.
20118 (expand_complex_division): Rename inner_type parameter to type.
20119 Update expand_complex_libcall call-site.
20120 (expand_complex_operations_1): Update expand_complex_multiplication
20121 and expand_complex_division call-sites.
20123 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20126 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20127 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20128 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20129 the highest significant bit of the shift count mask is clear. In
20130 check whether and[sq]i3 is needed verify that all significant bits
20131 of the shift count other than the highest are set.
20133 2018-05-02 Tom de Vries <tom@codesourcery.com>
20136 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20137 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20138 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20139 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20140 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20141 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20142 __builtin_goacc_parlevel_size.
20144 2018-05-02 Richard Biener <rguenther@suse.de>
20146 PR tree-optimization/85597
20147 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20148 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20151 2018-05-02 Tom de Vries <tom@codesourcery.com>
20154 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20155 dump files): Add ltrans-tree.
20157 2018-05-02 Tom de Vries <tom@codesourcery.com>
20160 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20161 dump files): Add wpa-ipa.
20163 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20165 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20166 powerpc*-*-linux*paired* target.
20167 * config/rs6000/750cl.h: Delete.
20168 * config/rs6000/paired.h: Delete.
20169 * config/rs6000/paired.md: Delete.
20170 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20172 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20173 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20174 comment. Remove paired float support.
20175 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20176 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20178 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20179 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20181 * config/rs6000/rs6000.c: Remove paired float support.
20182 (paired_expand_vector_init, paired_expand_vector_move,
20183 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20184 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20185 paired_expand_builtin, paired_expand_predicate_builtin,
20186 paired_init_builtins): Delete.
20187 * config/rs6000/rs6000.h: Remove paired float support.
20188 * config/rs6000/rs6000.md: Remove paired float support.
20189 (move_from_CR_ov_bit): Delete.
20190 * config/rs6000/rs6000.opt (mpaired): Delete.
20191 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20192 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20194 2018-05-02 Richard Biener <rguenther@suse.de>
20196 PR middle-end/85567
20197 * gimplify.c (gimplify_save_expr): When in SSA form allow
20198 SAVE_EXPRs to compute to SSA vars.
20200 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20203 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20204 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20205 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20206 clobber operands[2], instead use a new pseudo. Formatting fixes.
20208 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20210 PR tree-optimization/85586
20211 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20212 exit early for statements in the same group if the accesses are
20215 2018-05-02 Tom de Vries <tom@codesourcery.com>
20218 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20221 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20223 PR tree-optimization/85143
20224 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20226 2018-05-01 Tom de Vries <tom@codesourcery.com>
20229 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20230 not found" error message.
20232 2018-05-01 Tom de Vries <tom@codesourcery.com>
20235 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20236 * vec.c (test_ordered_remove_if): New function.
20237 (vec_c_tests): Call test_ordered_remove_if.
20238 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20239 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20240 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20241 VEC_ORDERED_REMOVE_IF.
20243 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20245 PR tree-optimization/82665
20246 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20247 pointer subtraction where arguments come from a memchr call.
20249 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20251 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20252 --push-state --as-needed and --pop-state instead of --as-needed and
20253 --no-as-needed if ld supports it.
20254 * configure: Regenerated.
20257 * doc/install.texi2html: Replace _002d with - and _002a with * in
20258 generated html files using sed.
20260 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20263 * gcc-rich-location.c (blank_line_before_p): New function.
20264 (use_new_line): New function.
20265 (gcc_rich_location::add_fixit_insert_formatted): New function.
20266 * gcc-rich-location.h
20267 (gcc_rich_location::add_fixit_insert_formatted): New function.
20269 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20271 * selftest.c (assert_streq): Rename "expected" and "actual" to
20272 "val1" and "val2". Extend NULL-handling to cover both inputs
20273 symmetrically, while still requiring both to be non-NULL for a pass.
20274 * selftest.h (assert_streq): Rename "expected" and "actual" to
20276 (ASSERT_EQ): Likewise.
20277 (ASSERT_EQ_AT): Likewise.
20278 (ASSERT_KNOWN_EQ): Likewise.
20279 (ASSERT_KNOWN_EQ_AT): Likewise.
20280 (ASSERT_NE): Likewise.
20281 (ASSERT_MAYBE_NE): Likewise.
20282 (ASSERT_MAYBE_NE_AT): Likewise.
20283 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20284 the assertion to pass.
20285 (ASSERT_STREQ_AT): Likewise.
20287 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20289 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20290 interaction with -pie.
20292 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20294 * selftest.h: Fix alphabetization of per-source-file selftest
20297 2018-04-30 Jason Merrill <jason@redhat.com>
20299 PR c++/61982 - dead stores to destroyed objects.
20300 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20303 2018-04-30 Jason Merrill <jason@redhat.com>
20305 * tree.c (build_clobber): New.
20306 * tree.h: Declare it.
20307 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20309 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20311 * diagnostic-show-locus.c (layout::layout): Update for
20312 location_get_source_line returning a char_span.
20313 (struct char_span): Move to input.h.
20314 (struct correction): Update for fields in char_span becoming
20316 (struct source_line): Update for location_get_source_line
20317 returning a char_span.
20318 (layout::print_line): Likewise.
20319 * edit-context.c (edited_file::print_content): Likewise.
20320 (edited_file::print_diff_hunk): Likewise.
20321 (edited_file::print_run_of_changed_lines): Likewise.
20322 (edited_file::get_num_lines): Likewise.
20323 (edited_line::edited_line): Likewise.
20324 * final.c (asm_show_source): Likewise.
20325 * input.c (location_get_source_line): Convert return type
20326 from const char * to char_span, losing the final "line_len"
20328 (dump_location_info): Update for the above.
20329 (get_substring_ranges_for_loc): Likewise. Use a char_span
20330 when handling the literal within the line.
20331 (test_reading_source_line): Update for location_get_source_line
20332 returning a char_span.
20333 * input.h (class char_span): Move here from
20334 diagnostic-show-locus.c, converting from a struct to a class.
20335 Make data members private.
20336 (char_span::operator bool): New.
20337 (char_span::length): New.
20338 (char_span::get_buffer): New.
20339 (char_span::operator[]): New.
20340 (char_span::subspan): Make const.
20341 (char_span::xstrdup): New.
20342 (location_get_source_line): Convert return type from const char *
20343 to char_span, losing the final "line_size" param.
20345 2018-04-30 Jan Hubicka <jh@suse.cz>
20347 * lto-wrapper.c (ltrans_priorities): New static var.
20348 (cmp_priority): New.
20349 (run_gcc): Read priorities and if doing parallel build order
20350 the Makefile by them.
20352 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20354 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20356 2018-04-30 Richard Biener <rguenther@suse.de>
20358 * tree-cfg.c (verify_address): Remove base argument, add
20359 flag whether to check TREE_ADDRESSABLE and do that.
20360 (verify_expr): Remove.
20361 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20362 (verify_gimple_assign_single): Likewise.
20363 (verify_gimple_switch): Likewise.
20364 (verify_expr_location_1): Dereference tp once. Add (disabled)
20365 piece from verify_expr.
20366 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20368 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20370 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20372 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20374 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20375 (small_data_pattern): Likewise.
20376 (arc_rewrite_small_data): Likewise.
20377 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20378 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20379 (get_symbol_alignment): New function.
20380 (legitimate_small_data_address_p): Likewise.
20381 (legitimate_scaled_address): Update, call
20382 legitimate_small_data_address_p.
20383 (output_sdata): New static variable.
20384 (arc_print_operand): Update how we handle small data operands.
20385 (arc_print_operand_address): Likewise.
20386 (arc_legitimate_address_p): Update, use
20387 legitimate_small_data_address_p.
20388 (arc_rewrite_small_data_p): Remove.
20389 (arc_rewrite_small_data_1): Likewise.
20390 (arc_rewrite_small_data): Likewise.
20391 (small_data_pattern): Likewise.
20392 (compact_sda_memory_operand): Update to use
20393 legitimate_small_data_address_p and get_symbol_alignment.
20394 (prepare_move_operands): Don't rewite sdata pattern.
20395 (prepare_extend_operands): Remove.
20396 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20398 (zero_extendqisi2): Likewise.
20399 (zero_extendhisi2): Likewise.
20400 (extendqihi2): Likewise.
20401 (extendqisi2): Likewise.
20402 (extendhisi2): Likewise.
20403 (addsi3): Likewise.
20404 (subsi3): Likewise.
20405 (andsi3): Likewise.
20406 * config/arc/constraints.md (Usd): Change it to memory constraint.
20408 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20410 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20411 as source of std instructions.
20412 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20413 allow 6-bit constants as source for store instructions.
20414 (movdi_insn): Update instruction pattern to allow 6-bit constants
20415 as source for store instructions.
20417 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20419 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20421 2018-04-30 Nathan Sidwell <nathan@acm.org>
20422 Sandra Loosemore <sandra@codesourcery.com>
20424 * dumpfile.c (dump_open): Allow '-' for stdout.
20425 * doc/invoke.texi (Developer Options): Document dump filename
20426 determination early. Document stdin/stdout selection.
20428 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20430 Microblaze Target: PIC data text relative
20432 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20433 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20435 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20436 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20437 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20438 New addressing mode for data-text relative position indepenedent code.
20439 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20440 'ADDRESS_SYMBOLIC_TXT_REL'.
20441 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20442 (microblaze_legitimate_pic_operand): Exclude function calls from
20443 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20444 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20446 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20447 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20448 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20449 for 'address + offset'.
20450 (microblaze_expand_prologue): Add new function prologue call for
20452 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20453 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20454 table in case of TARGET_PIC_DATA_TEXT_REL.
20455 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20456 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20457 Add new macros 'UNSPEC_TEXT',
20458 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20459 + exclude function calls from 'UNSPEC_PLT' in case of data text
20461 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20462 new target hook for generating address diff vector tables in case of
20464 * doc/tm.texi : Regenerate.
20465 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20466 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20467 of addr diff vector generation.
20468 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20469 target hook definition.
20470 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20471 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20472 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20473 option for data text relative.
20475 2018-04-30 Richard Biener <rguenther@suse.de>
20477 * tree-chrec.h (evolution_function_is_constant_p): Remove
20479 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20481 2018-04-30 Richard Biener <rguenther@suse.de>
20484 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20486 2018-04-30 Richard Biener <rguenther@suse.de>
20488 PR tree-optimization/28364
20489 PR tree-optimization/85275
20490 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20491 copying first exit test.
20493 2018-04-28 Mark Wielaard <mark@klomp.org>
20495 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20496 dwarf_version >= 5.
20497 (dwarf_AT): Handle DW_AT_addr_base.
20498 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20500 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20503 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20504 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20505 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20506 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20508 2018-04-28 Richard Biener <rguenther@suse.de>
20510 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20511 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20512 to reflect use. Only add interesting stmts.
20514 2018-04-27 Martin Jambor <mjambor@suse.cz>
20517 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20518 the jump function allows for passing through aggregate values.
20520 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20522 * input.h (in_system_header_at): Convert from macro to inline
20524 (from_macro_expansion_at): Likewise.
20525 (from_macro_definition_at): Likewise.
20527 2018-04-27 Jeff Law <law@redhat.com>
20529 * config.gcc: Mark tile* targets as deprecated/obsolete.
20531 2018-04-27 Richard Biener <rguenther@suse.de>
20533 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20536 2018-04-27 Richard Biener <rguenther@suse.de>
20538 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20540 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
20542 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20543 with Yd constraint. Set "preferred_for_speed" attribute from
20544 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20545 with Yd constraint.
20546 (*movdi_internal): Ditto.
20547 (movti_interunit splitters): Remove
20548 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20549 (movdi_interunit splitters): Ditto.
20550 * config/i386/constraints.md (Ye): Remove.
20551 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20553 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20556 * config/aarch64/constraints.md (Usg): Limit to 31.
20557 (Usj): Limit to 63.
20559 2018-04-27 Jakub Jelinek <jakub@redhat.com>
20561 PR tree-optimization/85529
20562 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20563 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20564 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20565 zero extension or masking of the MSB bit.
20566 (optimize_range_tests): Add FIRST_BB argument, pass it through
20567 to optimize_range_tests_var_bound.
20568 (maybe_optimize_range_tests, reassociate_bb): Adjust
20569 optimize_range_tests callers.
20571 2018-04-26 Richard Biener <rguenther@suse.de>
20572 Jakub Jelinek <jakub@redhat.com>
20574 * cgraph.h (symbol_table): Just declare debug method here.
20575 * symtab.c (symbol_table::debug): Define.
20577 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
20579 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20581 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
20583 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20584 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20585 (*movdi_internal): Substitute Yi and Yj constraint with x
20586 and Ym and Yn constraint with y constraint. Update "isa"
20587 attribute and set "preferred_for_speed" attribute from
20588 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20589 (*movsi_internal): Ditto.
20590 (*movdf_internal): Ditto.
20591 (*movsf_internal): Ditto.
20592 (*zero_extendsidi2): Ditto.
20593 * config/i386/sse.md (vec_set<mode>_0): Ditto.
20594 (sse2_loadld): Ditto.
20595 (*vec_extract<ssevecmodelower>_0): Ditto.
20596 (*vec_extractv4si_0_zext_sse4): Ditto.
20597 (vec_concatv2di): Ditto.
20598 (*vec_dup<mode>): Ditto.
20599 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20600 * config/i386/constraints.md (Yi): Remove.
20605 2018-04-26 Nathan Sidwell <nathan@acm.org>
20607 * dumpfile.c (dump_open): New.
20608 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20609 (dump_finish): Detect stdio/stderr by value not name.
20611 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20613 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20615 2018-04-26 Tom de Vries <tom@codesourcery.com>
20618 * config/nvptx/nvptx.c (verify_neutering_jumps)
20619 (verify_neutering_labels): New function
20620 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20622 2018-04-26 Tom de Vries <tom@codesourcery.com>
20625 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20626 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20629 2018-04-26 Richard Biener <rguenther@suse.de>
20630 Tom de Vries <tom@codesourcery.com>
20633 * lto-streamer-out.c (output_function): Fixup loops if required to match
20634 discovery done in the reader.
20636 2018-04-26 Richard Biener <rguenther@suse.de>
20638 PR tree-optimization/85116
20639 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20640 have a loop exit from the single latch predecessor. Remove
20641 case of header with just condition.
20642 (ch_base::copy_headers): Exclude infinite loops from any
20644 (pass_ch::execute): Record exits.
20646 2018-04-26 Richard Biener <rguenther@suse.de>
20648 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20649 prologue cost vector and pass it to vect_get_load_cost.
20650 (vect_get_peeling_costs_all_drs): Likewise.
20651 (vect_peeling_hash_get_lowest_cost): Likewise.
20652 (vect_enhance_data_refs_alignment): Likewise.
20654 2018-04-26 Richard Biener <rguenther@suse.de>
20656 PR middle-end/85450
20657 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20658 checking of integer<->pointer conversions.
20659 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20660 sign-/zero-extending pointer types.
20661 (expand_omp_for_static_chunk): Likewise.
20663 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
20664 Jean Lee <xiaoyur347@gmail.com>
20666 * config/mips/mips.c (mips_asan_shadow_offset): New function.
20667 (TARGET_ASAN_SHADOW_OFFSET): Define.
20668 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20669 true for -fsanitize=address.
20671 2018-04-25 Mark Wielaard <mark@klomp.org>
20673 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20676 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20678 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20679 than "alu", remove explicit "memory" and "imm_disp" attributes.
20680 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20682 PR middle-end/85414
20683 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20684 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20685 gen_lowpart_no_emit.
20687 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
20690 * config/i386/i386.c (ix86_expand_builtin): Change memory
20691 operand to XI, extend p0 to Pmode.
20692 * config/i386/i386.md: Change unspec volatile and operand
20693 1 mode to XI, change operand 0 mode to P.
20695 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20697 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20698 GET_MODE_MASK before any checking.
20699 (nds32_can_use_bset_p): Likewise.
20700 (nds32_can_use_btgl_p): Likewise.
20702 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20704 * config/nds32/nds32-doubleword.md: New define_split pattern for
20705 illegal register number.
20707 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20709 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20711 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20713 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20715 2018-04-25 Richard Biener <rguenther@suse.de>
20717 * lto-streamer.h (LTO_major_version): Bump to 8.
20719 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20721 * BASE-VER: Set to 9.0.0.
20723 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
20725 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20726 in __abskf2 and __powikf2.
20728 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20731 * config/aarch64/constraints.md (Usg, Usj): New constraints.
20732 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20733 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20734 Use the above on operand 2. Reindent.
20735 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20737 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20740 * common/config/i386/i386-common.c (ix86_handle_option): Don't
20742 * config/i386/i386.opt (mcet): Removed.
20743 * doc/install.texi: Remove -mcet documentation.
20744 * doc/invoke.texi: Likewise.
20746 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20749 * doc/install.texi: Remove -mcet from bootstrap-cet.
20751 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20754 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20755 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20759 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20760 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20761 containing a CONST_VECTOR.
20763 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20765 * doc/install.texi: Update newlib dependency for nvptx.
20767 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20770 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20771 instead of INTVAL when shifting x left.
20773 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20775 PR tree-optimization/85478
20776 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20777 vect_grouped_store_supported for single element vectors.
20779 2018-04-24 Richard Biener <rguenther@suse.de>
20782 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20783 load cost increase to the case of non-constant step.
20785 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20788 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20789 destination if any_malformed_asm.
20791 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
20793 PR middle-end/85496
20794 * expr.c (store_field): In the bitfield case, if the value comes from
20795 a function call and is returned in registers by means of a PARALLEL,
20796 do not change the mode of the temporary unless BLKmode and VOIDmode.
20798 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
20800 PR rtl-optimization/85423
20801 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20802 dependencies to debug insns when the previous insn is non-debug.
20804 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20806 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20807 enums into a single definition.
20808 (fls): Fix predicates and printing.
20811 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20813 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20814 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20815 and short u6 immediate.
20816 (check_if_valid_sleep_operand): Remove.
20817 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20819 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20821 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20822 flag_always_save_lp condition.
20823 * config/nds32/nds32.opt (malways-save-lp): New option.
20825 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20827 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20828 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20829 * config/nds32/nds32.h
20830 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20831 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20833 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20835 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20836 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20838 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20839 Chung-Ju Wu <jasonwucj@gmail.com>
20841 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20843 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20844 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20846 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20848 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20850 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20852 * config/nds32/nds32-protos.h (nds32_data_alignment,
20853 nds32_local_alignment): Declare.
20854 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20855 nds32_local_alignment): New functions.
20856 (TARGET_CONSTANT_ALIGNMENT): Define.
20857 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20859 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20861 * config/nds32/nds32.c
20862 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20863 (TARGET_MODES_TIEABLE_P): Likewise.
20865 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20867 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20868 level Ofast and Og.
20870 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20871 Chung-Ju Wu <jasonwucj@gmail.com>
20873 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20874 for unaligned access.
20875 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20877 * config/nds32/nds32-intrinsic.md: Likewise.
20878 * config/nds32/nds32_intrinsic.h: Likewise.
20879 * config/nds32/nds32.h (nds32_builtins): Likewise.
20880 * config/nds32/nds32.opt (munaligned-access): New option.
20881 * config/nds32/nds32.c (nds32_asm_file_start): Display
20882 flag_unaligned_access status.
20884 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20886 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20887 -mno-relax is present.
20888 * config/riscv/linux.h (LINK_SPEC): Ditto.
20890 2018-04-20 Martin Sebor <msebor@redhat.com>
20893 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20895 (gimple_fold_builtin_stxcpy_chk): Same.
20896 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20898 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20901 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20902 __powikf2 when long double is IEEE 128-bit.
20904 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20906 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20907 step to make sure stack always aligned.
20909 2018-04-20 Carl Love <cel@us.ibm.com>
20912 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20913 size check for arg0.
20915 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20916 Tom de Vries <tom@codesourcery.com>
20919 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20920 Emit insns for calls too.
20921 (nvptx_find_par): Always look for worker-level predecessor insn.
20922 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
20924 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20925 (nvptx_process_pars): Propagate frames for calls.
20927 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
20930 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20932 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20933 (ix86_handle_option): Don't handle OPT_mibt.
20934 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20936 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20938 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20939 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20940 (ix86_target_macros): Define __CET__ with flag_cf_protection
20941 for -fcf-protection.
20942 * config/i386/i386.c (isa2_opts): Remove -mibt.
20943 * config/i386/i386.h (TARGET_IBT): Removed.
20944 (TARGET_IBT_P): Likewise.
20945 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20946 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20947 * config/i386/i386.opt (mcet): Update help message.
20948 (mshstk): Likewise.
20950 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
20951 -mcet as an alias for -mshstk.
20953 2018-04-20 Richard Biener <rguenther@suse.de>
20955 PR middle-end/85475
20956 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20957 complexity by forcing a single use of the multiply operand.
20959 2018-04-20 Martin Jambor <mjambor@suse.cz>
20962 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20963 recursion dependency to only apply to non-clones.
20965 2018-04-20 Martin Jambor <mjambor@suse.cz>
20968 * ipa-cp.c (create_specialized_node): Check that clones of
20969 self-recursive edges exist during IPA-CP.
20971 2018-04-19 Toon Moene <toon@moene.org>
20973 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20976 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20978 PR tree-optimization/85467
20979 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20980 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
20981 VECTOR_CST element to type.
20983 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20986 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20987 * config/i386/i386.md (builtin_setjmp_setup): Removed.
20988 (builtin_longjmp): Likewise.
20989 (save_stack_nonlocal): New pattern.
20990 (restore_stack_nonlocal): Likewise.
20992 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20995 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20996 Replace ASM_OUTPUT_LABEL with fprintf.
20998 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21001 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21002 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21003 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21004 define __IBT__ and __SHSTK__ for -fcf-protection.
21005 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21007 (ix86_trampoline_init): Likewise.
21008 (x86_output_mi_thunk): Likewise.
21009 (ix86_notrack_prefixed_insn_p): Likewise.
21010 (ix86_option_override_internal): Don't disallow -fcf-protection.
21011 * config/i386/i386.md (rdssp<mode>): Also enable for
21013 (incssp<mode>): Likewise.
21014 (nop_endbr): Likewise.
21015 * config/i386/i386.opt (mcet): Change help message to built-in
21018 (mshstk): Likewise.
21019 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21020 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21021 enable CET built-in functions.
21023 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21025 * common/config/i386/i386-common.c
21026 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21027 OPTION_MASK_ISA_MOVDIRI_UNSET,
21028 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21029 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21030 * config.gcc (movdirintrin.h): New header.
21031 * config/i386/cpuid.h (bit_MOVDIRI,
21032 bit_MOVDIR64B): New bits.
21033 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21035 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21036 (VOID, PVOID, PCVOID)): New function types.
21037 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21038 __builtin_ia32_directstoreu_u64,
21039 __builtin_ia32_movdir64b): New builtins.
21040 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21041 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21043 (ix86_valid_target_attribute_inner_p): Ditto.
21044 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21045 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21046 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21047 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21048 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21049 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21050 (movdiri<mode>, movdir64b_<mode>): New.
21051 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21052 * config/i386/immintrin.h: Include movdirintrin.h.
21053 * config/i386/movdirintrin.h: New file.
21054 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21056 2018-04-19 Richard Biener <rguenther@suse.de>
21058 PR middle-end/85455
21059 * cfg.c (clear_bb_flags): When loop state says we have
21060 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21062 2018-04-19 Richard Biener <rguenther@suse.de>
21064 PR tree-optimization/84737
21065 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21066 copying restrict info.
21067 (vect_setup_realignment): Use it.
21068 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21069 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21070 the first DR to all generated stores.
21071 (vectorizable_load): Likewise for loads.
21073 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21075 PR tree-optimization/85446
21076 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21077 the integral and pointer types to have the same precision.
21079 * doc/install.texi: Document --disable-cet being the default and
21082 2018-04-18 Martin Liska <mliska@suse.cz>
21084 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21087 2018-04-18 Martin Liska <mliska@suse.cz>
21090 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21093 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21094 arguments if they are comparable.
21096 2018-04-18 Martin Liska <mliska@suse.cz>
21099 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21102 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21105 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21108 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21109 ENDBR after calling __morestack.
21111 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21114 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21115 by using gcc_base_ver to generate a gcc_driver_version, and use
21116 it when generating GCC_DRIVER_NAME.
21117 * configure: Regenerate.
21119 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21122 * config.gcc: Obsolete powerpc*-*-*spe*.
21124 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21127 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21128 (stabstr_D): Change type of unum from unsigned int to
21129 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21132 2018-04-17 Jim Wilson <jimw@sifive.com>
21135 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21136 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21137 Set arg_pointer_offset after using pretend_args_size.
21139 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21141 PR rtl-optimization/85431
21142 * dse.c (record_store): Ignore zero width stores.
21145 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21146 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21147 __builtin_stack_restore rather than after it.
21148 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21149 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21150 argument instead of virtual_dynamic_stack_rtx.
21152 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21154 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21156 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21157 Add note to error message to explain internal mapping of overloaded
21158 built-in function name to non-overloaded built-in function name.
21159 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21162 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21165 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21166 where the inputs overlap with the output.
21168 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21170 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21171 (=v, v) alternative and explicit "memory" attribute.
21172 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21173 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21175 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21176 "sselog1" type instead of "sselog".
21177 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21178 "sselog". Remove explicit "memory" attribute.
21179 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21180 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21182 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21183 "sselog1" type instead of "sselog". Remove explicit "memory"
21185 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21186 use "sselog1" type instead of "sselog". Remove explicit "memory"
21188 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21189 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21191 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21192 "sselog1" type instead of "sselog". Remove explicit "memory"
21194 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21195 use "sselog1" type instead of "sselog". Remove explicit "memory"
21199 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21201 PR middle-end/85414
21202 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21205 2018-04-17 Martin Jambor <mjambor@suse.cz>
21208 * ipa-cp.c (create_specialized_node): Call
21209 expand_all_artificial_thunks if necessary.
21211 2018-04-17 Martin Liska <mliska@suse.cz>
21214 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21215 in message, remote space in between '_G' and '('.
21217 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21220 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21221 avx512f_vmcmp<mode>3<round_saeonly_name>,
21222 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21223 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21224 avx512f_rndscale<mode><round_saeonly_name>,
21225 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21226 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21227 Use %<iptr>2 instead of %2 for -masm=intel.
21228 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21229 avx512f_vcvttss2usi<round_saeonly_name>,
21230 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21232 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21233 avx512f_vcvttsd2usi<round_saeonly_name>,
21234 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21235 Use %q1 instead of %1 for -masm=intel.
21236 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21237 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21238 of %3 for -masm=intel.
21239 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21241 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21243 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21245 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21246 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21248 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21250 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21251 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21252 %g1 and one with %0 and %1.
21253 (avx512er_vmrcp28<mode><round_saeonly_name>,
21254 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21255 %1 for -masm=intel.
21256 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21257 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21258 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21259 of %0 and %{%4%} for -masm=intel.
21260 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21261 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21262 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21263 order of %0 and %{%5%}%{z%} for -masm=intel.
21265 2018-04-17 Jan Hubicka <jh@suse.cz>
21268 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21270 2018-04-17 Martin Liska <mliska@suse.cz>
21273 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21274 for target_clone error message. Make default implementation
21275 clone to be a local declaration.
21276 (separate_attrs): Add new argument and check for an empty
21278 (expand_target_clones): Handle it.
21279 (ipa_target_clone): Make redirection just for target_clones
21282 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21283 Tom de Vries <tom@codesourcery.com>
21285 PR middle-end/84955
21286 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21287 tiled basic blocks without omp continue statements.
21289 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21292 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21293 vec_extract expression as having side effects to make sure it gets
21296 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21299 * config/i386/i386.c (get_builtin_code_for_version): Check
21302 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21305 * config.gcc: Support "skylake".
21306 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21308 * config/i386/i386.c (m_SKYLAKE): Define.
21309 (processor_target_table): Add "skylake".
21310 (ix86_option_override_internal): Add "skylake".
21311 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21312 PROCESSOR_CANNONLAKE.
21313 (get_builtin_code_for_version): Fix priority for
21314 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21315 PROCESSOR_SKYLAKE-AVX512.
21316 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21317 (processor_type): Add PROCESSOR_SKYLAKE.
21319 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21320 Jason Merrill <jason@redhat.com>
21323 * convert.c (convert_to_integer_1): Use direct recursion for
21324 enumeral types and types with a precision less than the number
21325 of bits in their mode.
21327 2018-04-16 Julia Koval <julia.koval@intel.com>
21330 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21331 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21333 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21336 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21337 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21338 and -mno-direct-move.
21340 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21343 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21344 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21345 Ensure negative shifts result in {0}.
21347 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21349 PR rtl-optimization/79916
21350 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21351 regs (if any) to define how to gnerate SD moves when LRA is in
21354 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21356 PR rtl-optimization/85393
21357 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21358 * except.c (expand_dw2_landing_pad_for_region): Make static.
21359 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21360 a label and unconditional jump to old_bb, rather than
21361 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21364 PR rtl-optimization/85376
21365 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21366 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21367 instead of a specific value.
21369 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21370 Bin Cheng <bin.cheng@arm.com>
21372 PR tree-optimization/82965
21373 PR tree-optimization/83991
21374 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21375 by_profile_only parameter.
21376 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21377 information if the loop was predicted to iterate too many times.
21378 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21380 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21383 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21386 2018-04-13 Martin Liska <mliska@suse.cz>
21387 Jakub Jelinek <jakub@redhat.com>
21389 PR middle-end/81657
21390 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21391 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21392 * builtins.c (expand_builtin_memory_copy_args): Use
21393 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21394 handle dest_addr == pc_rtx.
21396 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21399 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21400 asked to not generate direct moves.
21401 (fix_trunc<mode>si2_stfiwx): Similar.
21402 (fix_trunc<mode>si2_internal): Similar.
21404 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21407 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21408 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21409 lookup if dest in some wider mode is known to be const0_rtx and
21410 if so, record permanent equivalence for it to be ZERO_EXTEND of
21411 the narrower mode destination.
21413 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21415 * lto-streamer-out.c (output_function): Revert 259346.
21416 * omp-expand.c (expand_oacc_for): Likewise.
21418 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21420 PR rtl-optimization/85354
21421 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21422 * sel-sched.c (sel_global_init): ... here.
21424 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21427 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21428 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21429 mode for PE-COFF targets.
21430 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21431 (i386_pe_asm_lto_end): Likewise.
21432 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21433 (TARGET_ASM_LTO_END): Likewise.
21434 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21435 (i386_pe_asm_lto_start): New function.
21436 (i386_pe_asm_lto_end): Likewise.
21438 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21439 Richard Biener <rguenther@suse.de>
21441 PR middle-end/84955
21442 * lto-streamer-out.c (output_function): Fix CFG loop state before
21444 * omp-expand.c (expand_oacc_for): Handle calls to internal
21445 functions like regular functions.
21447 2018-04-12 Richard Biener <rguenther@suse.de>
21450 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21451 for the early LTO debug to properly generate references to it
21452 during DIE emission. Do not re-use that for the skeleton for
21454 (dwarf2out_early_finish): Likewise.
21456 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21459 * config/i386/sse.md
21460 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21461 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21462 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21463 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21464 and output is a reg, avoid creating invalid lowpart subreg, but
21465 instead split into a 512-bit move. Don't split if not AVX512VL,
21466 input is xmm16+ reg and output is a mem.
21467 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21468 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21469 xmm16+ reg and output is a mem.
21471 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21473 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21474 also for flag_dwarf2_cfi_asm.
21476 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21478 PR rtl-optimization/85342
21479 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21480 a bool scalar var inside of the loop instead. Don't try to update
21481 recog_data.operand after failed apply_change_group.
21483 2018-04-12 Tom de Vries <tom@codesourcery.com>
21486 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21487 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21488 array with flexible array member as array without given dimension.
21489 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21490 argument for undefined param to true.
21492 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21495 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21496 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21497 from PowerPC section.
21498 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21499 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21500 help text that is too long.
21501 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21502 help text that is too long.
21503 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21504 help text that is too long.
21506 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21508 * config/alpha/alpha.md (stack_probe_internal): Rename
21509 from "probe_stack". Update all callers.
21511 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21513 PR rtl-optimization/84566
21514 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21515 sched_macro_fuse_insns.
21517 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21520 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21521 (compute_block_dependences): ... from here.
21523 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21525 PR tree-optimization/85331
21526 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21527 from int to HOST_WIDE_INT.
21529 2018-04-11 Martin Jambor <mjambor@suse.cz>
21532 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21533 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21534 not the same as the source val.
21535 (cgraph_edge_brings_value_p): New parameter.
21536 (gather_edges_for_value): Pass destination value to
21537 cgraph_edge_brings_value_p.
21538 (perhaps_add_new_callers): Likewise.
21539 (get_info_about_necessary_edges): Likewise and exclude values brought
21540 only by self-recursive edges.
21541 (create_specialized_node): Redirect only clones of self-calling edges.
21542 (+self_recursive_pass_through_p): New function.
21543 (find_more_scalar_values_for_callers_subset): Use it.
21544 (find_aggregate_values_for_callers_subset): Likewise.
21545 (known_aggs_to_agg_replacement_list): Removed.
21546 (decide_whether_version_node): Re-calculate known constants for all
21547 remaining context clones.
21549 2018-04-11 Richard Biener <rguenther@suse.de>
21552 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21553 from early DWARF output.
21554 (dwarf2out_early_finish): Output line info unconditionally into
21555 early DWARF and add reference to it.
21557 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21560 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21561 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21562 other than V2DFmode using iptr mode attribute.
21563 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21565 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21567 PR rtl-optimization/84659
21568 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21570 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21573 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21575 (output_loc_list): Pass address of a dummy size variable even in the
21576 locview handling loop.
21577 (index_location_lists): Add comment on why skip_loc_list_entry can't
21580 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
21583 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21586 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
21589 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21590 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21591 and -mstring-compare-inline-limit.
21593 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21596 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21597 for stack clash protection in a register whenever we need it to be in
21600 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21602 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21603 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21605 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21608 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21610 (mlong-double-): Ditto.
21611 * config/rs6000/sysv4.opt (msdata=): Ditto.
21612 (mtls-size=): Ditto.
21614 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21616 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21617 erroneous entries for
21618 "vector int vec_ldl (int, long int *)", and
21619 "vector unsigned int vec_ldl (int, unsigned long int *)".
21620 Add comments and entries for
21621 "vector bool char vec_ldl (int, bool char *)",
21622 "vector bool short vec_ldl (int, bool short *)",
21623 "vector bool int vec_ldl (int, bool int *)",
21624 "vector bool long long vec_ldl (int, bool long long *)",
21625 "vector pixel vec_ldl (int, pixel *)",
21626 "vector long long vec_ldl (int, long long *)",
21627 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21628 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21629 type tree bool_long_long_type_node and correct definition of
21630 bool_V2DI_type_node to make reference to this new type tree.
21631 (rs6000_mangle_type): Replace erroneous reference to
21632 bool_long_type_node with bool_long_long_type_node.
21633 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21634 comments to emphasize sign distinctions for char and int types and
21635 replace RS6000_BTI_bool_long constant with
21636 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21637 use of RS6000_BTI_pixel.
21638 (bool_long_type_node): Remove this macro definition.
21639 (bool_long_long_type_node): New macro definition
21641 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21643 PR rtl-optimization/85300
21644 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21645 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21646 simplify_unary_operation fails.
21648 2018-04-10 Martin Liska <mliska@suse.cz>
21650 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21651 cgraph_edge and ipa_ref.
21653 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21657 * config/i386/sse.md
21658 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21659 computation of the VEC_MERGE selector from mask.
21660 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21661 Fix decoding of the VEC_MERGE selector into mask.
21663 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21665 PR tree-optimization/85286
21666 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21668 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21670 * final.c (final_1): Set insn_last_address as well as
21671 insn_current_address.
21673 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21676 * explow.c (emit_stack_probe): Call validize_mem on memory location
21677 before passing it to gen_probe_stack. Create address operand and
21678 legitimize it for the probe_stack_address case.
21680 2018-04-09 Jan Hubicka <jh@suse.cz>
21683 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21684 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21685 * tree.c (free_lang_data_in_type): Fix handling of binfos;
21687 (free_lang_data): Rebuild type inheritance graph.
21689 2018-04-09 Martin Sebor <msebor@redhat.com>
21691 * invoke.texi (-finline-small-functions): Mention other optimization
21693 (-findirect-inlining, -fpartial-inlining): Same.
21694 (-finline-functions-called-once): Same.
21695 (-freorder-blocks-and-partition): Same.
21697 2018-04-09 Jan Hubicka <jh@suse.cz>
21700 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21701 jumps; choose last target that matches the criteria (i.e.
21702 no partition changes for non-crossing jumps).
21703 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21704 support for redirecting crossing jumps to non-crossing.
21706 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
21708 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21709 also for naked functions.
21711 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
21713 * config/arc/arc.md (add_shift): New pattern.
21714 (add_shift2): Likewise.
21715 (sub_shift): Likewise.
21716 (sub_shift_cmp0_noout): Likewise.
21717 (compare_si_ashiftsi): Likewise.
21718 (xbfu_cmp0_noout): New combine pattern.
21719 (xbfu_cmp0"): Likewise.
21720 (movsi_set_cc_insn): Place the predicable variant first.
21721 (commutative_binary_cmp0_noout): Remove clobber.
21722 (commutative_binary_cmp0): New pattern.
21723 (noncommutative_binary_cmp0): Likewise.
21724 (noncommutative_binary_cmp0_noout): Likewise.
21725 (noncommutative_binary_comparison_result_used): Removed.
21726 (rsub_cmp0): New pattern.
21727 (rsub_cmp0_noout): Likewise.
21728 (extzvsi): Changed, keep only meaningful variants.
21729 (SQH, SEZ): New iterators.
21730 (SQH_postfix): New mode attribute.
21731 (SEZ_prefix): New code attribute.
21732 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21733 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21734 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21735 of numerical value.
21736 (noncommutative_operator): Check the availability of barrel
21739 2018-04-09 Richard Biener <rguenther@suse.de>
21741 PR tree-optimization/85284
21742 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21743 Only use the niter constraining form of simple_iv when the exit
21744 is always executed.
21746 2018-04-09 Tom de Vries <tom@codesourcery.com>
21749 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21750 (define_expand "*memory_barrier"): New define_expand.
21751 (define_insn "memory_barrier"): New insn.
21753 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21755 PR rtl-optimization/80463
21756 PR rtl-optimization/83972
21757 PR rtl-optimization/83480
21759 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21760 correct producer for the insn.
21761 (tidy_control_flow): Fixup seqnos in case of debug insns.
21763 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21765 PR rtl-optimization/83913
21767 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21768 different sched-times when merging exprs.
21770 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21772 PR rtl-optimization/83962
21774 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21775 tidy_fallthru_edge and tidy_control_flow.
21777 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21779 PR rtl-optimization/83530
21781 * sel-sched.c (force_next_insn): New global variable.
21782 (remove_insn_for_debug): When force_next_insn is true, also leave only
21783 next insn in the ready list.
21784 (sel_sched_region): When the region wasn't scheduled, make another pass
21785 over it with force_next_insn set to 1.
21787 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21789 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21791 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21792 for interrupt control.
21793 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21794 functions for interrupt control.
21795 * config/nds32/nds32-intrinsic.md: Likewise.
21796 * config/nds32/nds32_intrinsic.h: Likewise.
21797 * config/nds32/nds32.h (nds32_builtins): Likewise.
21799 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21801 * config/nds32/nds32.c (nds32_init_machine_status,
21802 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21803 strict_aligned_p field.
21804 (nds32_expand_to_rtl_hook): New function.
21805 (TARGET_EXPAND_TO_RTL_HOOK): Define.
21806 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21808 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21809 Chung-Ju Wu <jasonwucj@gmail.com>
21811 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21812 * config/nds32/nds32-n7.md: New file.
21813 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21814 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21816 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21817 * config/nds32/nds32.md (pipeline_model): Add n7.
21818 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21819 * config/nds32/pipelines.md: Include n7 settings.
21821 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21822 Chung-Ju Wu <jasonwucj@gmail.com>
21824 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21825 * config/nds32/nds32-e8.md: New file.
21826 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21827 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21829 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21830 * config/nds32/nds32.md (pipeline_model): Add e8.
21831 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21832 * config/nds32/pipelines.md: Include e8 settings.
21834 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21835 Chung-Ju Wu <jasonwucj@gmail.com>
21837 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21838 * config/nds32/nds32-n8.md: New file.
21839 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21840 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21842 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21843 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21844 * config/nds32/nds32.md (pipeline_model): Add n8.
21845 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21846 * config/nds32/pipelines.md: Include n8 settings.
21848 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21849 Chung-Ju Wu <jasonwucj@gmail.com>
21851 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21852 * config/nds32/nds32-n9-2r1w.md: New file.
21853 * config/nds32/nds32-n9-3r2w.md: New file.
21854 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21855 nds32_register_ports): New or modify for cpu n9.
21856 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21858 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21859 * config/nds32/nds32-utils.c: New file.
21860 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21861 TARGET_MUL_SLOW): Define.
21862 * config/nds32/nds32.md (pipeline_model): New attribute.
21863 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21864 New options that support cpu n9.
21865 * config/nds32/pipelines.md: Include n9 settings.
21866 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21868 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21870 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21871 information if necessary.
21872 (output_cond_branch_compare_zero): Likewise.
21873 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21874 (nds32_target_alignment): Refine for alignment.
21875 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21876 (FUNCTION_BOUNDARY): Modify.
21877 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21879 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21881 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21883 * config/nds32/constants.md (unspec_volatile_element): Add values for
21884 TLB operation and data prefetch.
21885 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21886 functions for TLB operation and data prefetch.
21887 * config/nds32/nds32-intrinsic.md: Likewise.
21888 * config/nds32/nds32_intrinsic.h: Likewise.
21889 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21890 (nds32_print_operand): Likewise.
21891 * config/nds32/nds32.h (nds32_builtins): Likewise.
21893 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21894 Andrew Pinski <pinsika@gcc.gnu.org>
21896 PR middle-end/82976
21897 * match.pd: Use constant_boolean_node of correct type instead of
21898 boolean_true_node or boolean_false_node for simplifying
21899 pointer comparisons to zero.
21901 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21903 PR tree-optimization/80021
21904 * tree.c (verify_type_variant): Make error call in verify_variant_match
21905 translatable and remove final full stop.
21907 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21909 * config/nds32/constants.md (unspec_volatile_element): Add
21910 UNSPEC_VOLATILE_EH_RETURN.
21911 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21912 nds32_output_stack_pop): Support dwarf exception handling process.
21913 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21914 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21915 exception handling process.
21916 (nds32_compute_stack_frame): Likewise.
21917 (nds32_return_addr_rtx): Likewise.
21918 (nds32_initial_elimination_offset): Likewise.
21919 (nds32_expand_prologue): Likewise.
21920 (nds32_expand_epilogue): Likewise.
21921 (nds32_dynamic_chain_address): New function.
21922 * config/nds32/nds32.h (machine_function): Add fields for dwarf
21923 exception handling.
21924 (DYNAMIC_CHAIN_ADDRESS): Define.
21925 (EH_RETURN_DATA_REGNO): Define.
21926 (EH_RETURN_STACKADJ_RTX): Define.
21927 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21928 patterns for dwarf exception handling.
21930 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21932 * config/nds32/nds32.h: Clean up obsolete macros.
21934 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21936 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21937 Add enum values for particular instructions.
21938 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21939 particular intrinsic functions.
21940 * config/nds32/nds32-intrinsic.md: Likewise.
21941 * config/nds32/nds32_intrinsic.h: Likewise.
21942 * config/nds32/nds32.h (nds32_builtins): Likewise.
21943 * config/nds32/nds32.md (type): Add pbsad and pbsada.
21944 (btst, ave): New patterns for particular instructions.
21946 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21948 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21949 Add enum values for atomic load/store and memory sync.
21950 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21952 * config/nds32/nds32-intrinsic.md: Likewise.
21953 * config/nds32/nds32_intrinsic.h: Likewise.
21954 * config/nds32/nds32.h (nds32_builtins): Likewise.
21956 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21958 PR tree-optimization/85257
21959 * fold-const.c (native_encode_vector): If not all elts could fit
21960 and off is -1, return 0 rather than offset.
21961 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21962 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21963 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
21964 adjust buffer in native_interpret_expr call.
21966 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21968 * config/nds32/constants.md (unspec_volatile_element): Add cache
21969 control enum values.
21970 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21971 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21972 * config/nds32/nds32.c (nds32_cctl_names): New.
21973 (nds32_print_operand): Handle cache control register names.
21974 * config/nds32/nds32.h (nds32_builtins): New enum values.
21975 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21977 * config/nds32/nds32.md (type): Add mmu.
21978 * config/nds32/pipelines.md (simple_insn): Add mmu.
21980 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21982 * config/nds32/nds32.md (type): Remove call.
21983 * config/nds32/pipelines.md (simple_insn): Likewise.
21985 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21987 * config/nds32/constants.md (unspec_volatile_element): Add
21988 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21989 UNSPEC_VOLATILE_FMFCFG.
21990 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21991 description for fmfcfg and fmfcsr.
21992 (bdesc_1arg): Add fmtcsr.
21993 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21994 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21995 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21996 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21997 unspec_fmfcfg): New patterns.
21998 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21999 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22000 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22001 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22002 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22003 __nds32__fmfcfg): Define.
22005 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22007 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22008 intrinsic register names.
22009 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22010 intrinsic register enum values and macros.
22012 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22014 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22015 for load/store addressing form.
22016 (nds32_print_operand_address): Likewise.
22018 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22021 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22022 based on LABEL_REF. Remove useless assertion.
22023 (pic_address_needs_scratch): Fix formatting.
22024 (sparc_legitimize_pic_address): Minor tweaks.
22025 (sparc_delegitimize_address): Adjust assertion accordingly.
22026 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22027 into symbolic_operand.
22028 (movsi_high_pic_label_ref): Likewise.
22029 (movsi_lo_sum_pic_label_ref): Likewise.
22030 (movdi_pic_label_ref): Likewise.
22031 (movdi_high_pic_label_ref): Likewise.
22032 (movdi_lo_sum_pic_label_ref): Likewise.
22034 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22036 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22037 custom LIB_SPEC setup.
22039 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22040 Kito Cheng <kito.cheng@gmail.com>
22042 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22043 * config/riscv/freebsd.h: New.
22045 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22047 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22048 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22051 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22052 Kito Cheng <kito.cheng@gmail.com>
22054 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22055 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22056 * config/nds32/nds32-protos.h (nds32_output_call,
22057 nds32_output_return): Declare.
22058 * config/nds32/nds32.md: Refine all the call and return patterns.
22060 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22063 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22064 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22066 PR rtl-optimization/84872
22067 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22068 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22069 EDGE_CROSSING edge.
22071 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22073 * expr.c (copy_blkmode_to_reg): Revert 254862.
22074 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22076 2018-04-06 Richard Biener <rguenther@suse.de>
22078 PR middle-end/85244
22079 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22080 after seeing a component reference with an adjacent field. Treat
22081 refs to arrays at struct end of external decls similar to
22082 refs to unconstrained commons.
22084 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22087 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22088 look through SAVE_EXPRs with non-side-effects argument. Adjust
22090 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22093 2018-04-06 Richard Biener <rguenther@suse.de>
22095 PR middle-end/85180
22096 * alias.c (find_base_term): New wrapper around find_base_term
22097 unwinding CSELIB_VAL_PTR changes.
22098 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22101 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22103 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22105 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22106 constant definitions.
22107 ("nop"): lr 0,0 -> nopr r0
22108 ("nop_lr0", "nop_lr1"): New insn definitions.
22110 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22112 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22113 NDS32_V3PUSH_AVAILABLE_P macro.
22115 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22116 Chung-Ju Wu <jasonwucj@gmail.com>
22118 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22119 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22120 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22121 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22122 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22123 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22124 * config/nds32/constraints.md: New constraints and checking for hard
22125 float configuration.
22126 * config/nds32/iterators.md: New mode iterator and attribute for hard
22127 float configuration.
22128 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22130 * config/nds32/nds32-fpu.md: New file.
22131 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22132 deal with hard float code generation.
22133 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22135 (abi_type, float_reg_number): New enum type.
22136 * config/nds32/nds32-predicates.c: New predicates for hard float.
22137 * config/nds32/nds32-protos.h: Declare functions for hard float.
22138 * config/nds32/nds32.c: Implementation for hard float configuration.
22139 * config/nds32/nds32.h: Definitions for hard float configuration.
22140 * config/nds32/nds32.md: Include hard float machine description and
22141 modify patterns for hard float configuration.
22142 * config/nds32/nds32.opt: New options for hard float configuration.
22143 * config/nds32/predicates.md: New predicates for hard float
22146 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22148 * common/config/nds32/nds32-common.c
22149 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22151 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22153 PR middle-end/85195
22154 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22155 CONSTRUCTOR_ELT (ctor, ...)->value.
22157 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22160 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22162 2018-04-05 Tom de Vries <tom@codesourcery.com>
22165 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22168 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22169 Kito Cheng <kito.cheng@gmail.com>
22171 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22172 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22173 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22174 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22176 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22177 Kito Cheng <kito.cheng@gmail.com>
22179 * config/nds32/constraints.md (Ufe): New memory constraint.
22180 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22181 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22182 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22184 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22185 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22187 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22189 * config/nds32/nds32.md: Use optimize_size in the condition for
22190 alu-shift instructions.
22192 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22194 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22196 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22198 * config/nds32/nds32.md (negsi2): Refine pattern.
22200 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22201 Chung-Ju Wu <jasonwucj@gmail.com>
22203 * config/nds32/iterators.md (shift_rotate): New code iterator.
22204 (shift): New code attribute.
22205 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22206 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22207 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22208 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22209 bit-wise operations.
22210 (andsi3, *andsi3): Ditto.
22211 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22212 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22213 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22214 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22215 nds32_ior_operand, nds32_xor_operand): New predicates.
22217 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22219 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22220 (addsi3, subsi3): ... this.
22222 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22224 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22226 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22228 * config/nds32/nds32.md: Adjust indention.
22230 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22232 * config/nds32/nds32.md (feature): New attribute.
22234 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22236 * config/nds32/nds32.md (subtype): New attribute.
22238 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22241 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22242 expansion to perform a bitwise AND of the argument followed by a
22243 boolean negation of the result.
22245 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22247 PR rtl-optimization/84878
22248 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22249 the basic block. Assert the use reference is not artificial and that
22250 it has an associated insn.
22252 2018-04-04 Michael Matz <matz@suse.de>
22254 * builtins.c (compute_objsize): Pass correct operand
22255 to array_at_struct_end_p.
22257 2018-04-04 Richard Biener <rguenther@suse.de>
22260 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22261 from contexts for DINFO_LEVEL_TERSE and below.
22263 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22265 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22266 resiter_operand condition.
22267 * config/nds32/nds32.md (*move<mode>): Ditto.
22269 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22270 Monk Chiang <sh.chiang04@gmail.com>
22272 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22274 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22276 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22278 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22279 Kito Cheng <kito.cheng@gmail.com>
22281 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22282 nds32_cond_code_str, output_cond_branch,
22283 output_cond_branch_compare_zero, nds32_expand_cbranch,
22284 nds32_expand_cstore, nds32_expand_movcc,
22285 nds32_output_cbranchsi4_equality_zero,
22286 nds32_output_cbranchsi4_equality_reg,
22287 nds32_output_cbranchsi4_equality_reg_or_const_int,
22288 nds32_output_cbranchsi4_greater_less_zero: New functions.
22289 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22290 nds32_expand_cstore, nds32_expand_movcc,
22291 nds32_output_cbranchsi4_equality_zero,
22292 nds32_output_cbranchsi4_equality_reg,
22293 nds32_output_cbranchsi4_equality_reg_or_const_int,
22294 nds32_output_cbranchsi4_greater_less_zero): Declare.
22295 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22296 nds32_rimm11s_operand): New predicates.
22297 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22298 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22301 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22303 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22304 * config/nds32/nds32.md: Ditto.
22305 * config/nds32/pipelines.md: Ditto.
22307 2018-04-04 Richard Biener <rguenther@suse.de>
22309 PR tree-optimization/85168
22310 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22311 propagating abnormals.
22313 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22315 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22317 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22318 Kito Cheng <kito.cheng@gmail.com>
22320 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22321 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22322 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22323 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22324 * config/nds32/nds32.md (sibcall_internal): New.
22325 (sibcall_register): Remove.
22326 (sibcall_immediate): Remove.
22327 (sibcall_value_internal): New.
22328 (sibcall_value_register): Remove.
22329 (sibcall_value_immediate): Remove.
22330 * config/nds32/predicates.md (nds32_general_register_operand): New.
22331 (nds32_call_address_operand): New.
22333 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22335 PR rtl-optimization/85167
22336 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22337 bb_defs if *split_p, instead preinitialize it to NULL.
22339 PR tree-optimization/85156
22340 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22341 evaluating the argument multiple times.
22343 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22345 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22347 (_mm_cvtpd_ps): Likewise.
22348 (_mm_cvttpd_epi32): Likewise.
22349 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22350 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22351 vector, pixel, and bool following altivec.h include.
22353 2018-04-03 Martin Sebor <msebor@redhat.com>
22355 * doc/extend.texi (Common Function Attributes): Clarify.
22356 (const attribute): Likewise.
22357 (pure attribute): Likewise.
22359 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22362 * config/i386/i386.c (ix86_expand_vector_set): Use
22363 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22365 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22367 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22368 instructions when changing rounding bits to preserve precision bits
22369 in the x87 control word.
22371 2018-04-03 Martin Liska <mliska@suse.cz>
22373 PR tree-optimization/82491
22374 * rtl.h (strip_offset_and_add): Replace += suboffset with
22375 poly_uint64 () + suboffset.
22377 2018-03-29 Martin Liska <mliska@suse.cz>
22378 Martin Jambor <mjambor@suse.cz>
22381 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22382 param_type is not an integral or pointer type.
22384 2018-04-03 Richard Biener <rguenther@suse.de>
22386 * sese.h (recompute_all_dominators): Remove.
22388 2018-04-02 Martin Sebor <msebor@redhat.com>
22390 * doc/invoke.texi (-Wrestrict): Fix typos.
22392 2018-04-02 Jim Wilson <jimw@sifive.com>
22394 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22395 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22396 (<optab>di3, <optab>si3_extend): Likewise.
22397 (<optab>si3_mask, <optab>si3_mask_1): New.
22398 (<optab>di3_mask, <optab>di3_mask_1): New.
22399 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22400 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22401 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22403 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22405 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22408 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22410 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22411 (nds32_canonicalize_comparison): New function.
22413 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22414 Kito Cheng <kito.cheng@gmail.com>
22415 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22417 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22418 * config/nds32/constants.md (unspec_volatile_element): Add
22419 UNSPEC_VOLATILE_RELAX_GROUP.
22420 * config/nds32/nds32-relax-opt.c: New file.
22421 * config/nds32/nds32-predicates.c
22422 (nds32_symbol_load_store_p): New function.
22423 * config/nds32/nds32-protos.h
22424 (nds32_symbol_load_store_p): Declare function.
22425 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22426 * config/nds32/nds32.c
22427 (nds32_register_pass): New function to register pass.
22428 (nds32_register_passes): New function to register passes.
22429 * config/nds32/nds32.md (relax_group): New pattern.
22430 * config/nds32/nds32.opt (mrelax-hint): New option.
22431 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22433 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22435 * config/nds32/t-nds32: Modify files dependency.
22437 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22439 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22440 (PROFILE_HOOK): Define its implementation.
22442 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22444 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22445 type and 32-bit size.
22447 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22449 PR middle-end/85090
22450 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22451 (V_128_256): New mode iterator.
22452 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22453 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22454 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22456 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22457 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22459 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22462 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22463 NaN inputs correctly.
22465 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22468 * config/rs6000/vsx.md (??r): New mode attribute.
22469 (*vsx_mov<mode>_64bit): Use it.
22470 (*vsx_mov<mode>_32bit): Likewise.
22472 2018-03-30 Martin Sebor <msebor@redhat.com>
22474 PR tree-optimization/84818
22475 * builtins.c (check_access): Use warning_n.
22477 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22480 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22482 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22485 2018-03-30 Julia Koval <julia.koval@intel.com>
22488 * x86-tune.def (movx, partial_reg_dependency): Enable for
22491 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22493 PR inline-asm/84985
22494 * lra-constraints.c (process_alt_operands): Move setting
22495 this_alternative_matches below.
22497 2018-03-29 Martin Liska <mliska@suse.cz>
22500 * doc/invoke.texi: Document how LTO works with debug info.
22501 Describe auto-load support of binutils. Mention 'x86-64'
22502 as valid option value of -march option.
22504 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22506 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22509 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22510 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22511 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22514 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22517 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22518 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22519 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22520 for RS6000_BTM_POWERPC64.
22521 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22522 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22523 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22526 (DIVDEU): Likewise.
22528 2018-03-28 Carl Love <cel@us.ibm.com>
22531 2017-09-27 Carl Love <cel@us.ibm.com>
22533 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22534 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22535 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22538 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22540 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22541 instead of __vector bool.
22542 (_mm_max_pu8): Likewise.
22543 (_mm_min_pi16): Likewise.
22545 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22548 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22549 (DIVWEUO): Likewise.
22550 (DIVDEO): Likewise.
22551 (DIVDEUO): Likewise.
22552 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22553 DIVWEUO and DIVDEUO.
22554 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22555 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22556 (div_extend): Likewise.
22557 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22559 (__builtin_divweuo): Likewise.
22560 (__builtin_divdeo): Likewise.
22561 (__builtin_divdeuo): Likewise.
22563 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22566 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22567 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22569 PR tree-optimization/82004
22570 * gimple-match-head.c (optimize_pow_to_exp): New function.
22571 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22572 Don't fold to exp if optimize_pow_to_exp is false.
22574 2018-03-28 Martin Liska <mliska@suse.cz>
22577 * calls.c (initialize_argument_information): Fix trailing space.
22578 * common.opt: Fix typo and provide better explanation for
22579 -fsanitize-coverage option.
22580 * config/i386/i386.opt: Fix typo.
22582 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22583 Martin Liska <mliska@suse.cz>
22586 * gimplify.c (asan_poison_variable): Don't do the check for
22587 gimplify_omp_ctxp here.
22588 (gimplify_decl_expr): Do it here.
22589 (gimplify_target_expr): Likewise.
22591 2018-03-28 Martin Liska <mliska@suse.cz>
22594 * config/i386/i386.c (ix86_function_arg_advance): Do not call
22595 chkp_type_bounds_count if MPX is not enabled.
22597 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
22599 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22601 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
22604 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22605 function to create the function decl for complex long double
22606 multiply and divide for -mabi=ieeelongdouble.
22607 (init_float128_ieee): Call it.
22609 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22612 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22613 -fcf-protection=branch -mibt.
22614 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22616 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22619 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22620 arm_word_relocations.
22622 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22625 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22626 extern array declarations.
22628 2018-03-27 Richard Biener <rguenther@suse.de>
22630 PR middle-end/84067
22631 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22632 explicit single_use checks.
22634 2018-03-27 Richard Biener <rguenther@suse.de>
22636 PR tree-optimization/85082
22637 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22640 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22642 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22643 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22644 Turn on fasynchronous-unwind-tables and funwind-tables.
22646 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22649 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22650 (*bmi_blsr_<mode>_ccz): Ditto.
22652 2018-03-26 Tom de Vries <tom@codesourcery.com>
22654 PR tree-optimization/85063
22655 * omp-general.c (offloading_function_p): New function. Factor out
22657 * omp-offload.c (pass_omp_target_link::gate): ... here.
22658 * omp-general.h (offloading_function_p): Declare.
22659 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22660 with attribute omp declare target for offloading functions.
22662 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
22664 PR tree-optimization/84005
22665 * tree-data-ref.h (get_base_for_alignment): Declare.
22666 * tree-data-ref.c (get_base_for_alignment_1): New function.
22667 (get_base_for_alignment): Likewise.
22668 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22669 get_base_for_alignment to find a suitable base object, instead
22670 of always using drb->base_address.
22672 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22674 PR inline-asm/85022
22675 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22676 known size by default.
22678 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
22680 PR inline-asm/85030
22681 * lra-constraints.c (process_alt_operands): Don't match BLKmode
22682 and non BLKmode operands.
22684 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22687 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22688 Clean up attributes.
22690 2018-03-23 Richard Biener <rguenther@suse.de>
22693 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22694 we are going to emit early debug for LTO.
22696 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22698 PR inline-asm/85034
22699 * function.c (match_asm_constraints_1): Don't optimize if input
22700 doesn't satisfy general_operand predicate for output's mode.
22702 PR inline-asm/85022
22703 * alias.c (write_dependence_p): Don't require for x_canonicalized
22704 non-VOIDmode if x has VOIDmode.
22707 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22708 just don't try to optimize it rather than assert it never happens.
22710 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22712 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22713 macro expansions for definition of ST_INTERNAL_<mode> and
22714 LD_INTERNAL_<mode> builtins.
22715 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22717 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22719 (altivec_expand_st_builtin): Likewise.
22720 (altivec_expand_builtin): Remove calls to deleted functions.
22721 (rs6000_address_for_altivec): Delete this function.
22722 * config/rs6000/vector.md: Remove expands for
22723 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22725 2018-03-22 Sudakshina Das <sudi.das@arm.com>
22728 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22729 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22730 re-computing once computed.
22731 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22732 (arm_init_machine_status): Initialize
22733 machine->static_chain_stack_bytes.
22735 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22738 * doc/extend.texi: Add four new prototypes for vec_ld.
22739 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22740 definitions for more logical presentation.
22741 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22742 entries for V1TI variants of __builtin_altivec_ld builtin.
22743 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22744 handling of V1TI variant of LVX icode pattern.
22745 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22746 (rs6000_gimple_fold_builtin): Likewise.
22747 (altivec_init_builtins): Add code to define
22748 __builtin_altivec_lvx_v1ti function.
22750 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22752 PR inline-asm/84941
22753 * function.c (match_asm_constraints_1): Don't do the optimization
22754 if input isn't a REG, SUBREG, MEM or constant.
22756 2018-03-22 Tom de Vries <tom@codesourcery.com>
22758 PR tree-optimization/84956
22759 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22760 bb_has_abnormal_pred.
22762 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22765 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22766 DECL_INITIAL (decl) to decl at the end.
22767 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22768 adjust the comment.
22770 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22772 * doc/extend.texi (__builtin_tgmath): Document when complex
22773 integer types are treated as _Complex _Float64.
22775 2018-03-21 Tom de Vries <tom@codesourcery.com>
22777 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22779 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22781 PR tree-optimization/84960
22782 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22783 if it is ENTRY block, move them into single succ of ENTRY in that case.
22785 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
22787 PR tree-optimization/84811
22788 * poly-int.h (poly_span_traits): Remove the T3 parameter and
22789 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22790 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22791 (known_subrange_p): Update accordingly. Cast each value involved
22792 in the size comparison, rather than casting the result of the
22795 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22797 PR tree-optimization/84982
22798 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22799 by flipping the least significant bit rather than all bits from
22800 bitpos to bitpos + bitsize - 1.
22802 2018-03-21 Nathan Sidwell <nathan@acm.org>
22804 * doc/extend.texi (Deprecated Features): Remove mention of
22805 long-deleted deprecations.
22807 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22810 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22811 * configure: Regenerate.
22813 2018-03-21 Tom de Vries <tom@codesourcery.com>
22815 PR tree-optimization/83126
22816 * tree-parloops.c (num_phis): New function.
22817 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22819 2018-03-21 Nathan Sidwell <nathan@acm.org>
22821 * doc/extend.texi (Deprecated Features): Update deprecated flags,
22822 mention anon-struct/union members and trailing attributes.
22824 2018-03-21 Bin Cheng <bin.cheng@arm.com>
22826 PR tree-optimization/84969
22827 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22828 builtin memset partitions if they set different rhs values.
22830 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22832 PR rtl-optimization/84989
22833 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22834 VEC_DUPLICATE with scalar result mode.
22836 2018-03-21 Martin Liska <mliska@suse.cz>
22839 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22840 not intended return statement.
22842 2018-03-21 Martin Liska <mliska@suse.cz>
22845 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22846 (chkp_find_bound_slots_1): Limit number of iterations.
22848 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
22851 * Minor grammar fixes for x86 options.
22853 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22856 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22857 holding REG_CFA_RESTORE notes, instead turn them into a USE.
22859 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
22862 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22863 (altivec_lvx_<mode>_1op): Likewise.
22864 (altivec_stvx_<mode>_2op): Likewise.
22865 (altivec_stvx_<mode>_1op): Likewise.
22866 (altivec_lvx_<VM2:mode>): New define_expand.
22867 (altivec_stvx_<VM2:mode>): Likewise.
22868 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22869 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22870 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22871 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22872 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22873 (rs6000_gen_lvx): Likewise.
22874 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22875 (altivec_expand_stv_builtin): Likewise.
22876 (altivec_expand_builtin): Likewise.
22877 * config/rs6000/vector.md: Likewise.
22879 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22882 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22885 2018-03-20 Richard Biener <rguenther@suse.de>
22888 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22889 sign-conversions as zero, fall back to standard scalar_stmt
22892 2018-03-20 Martin Liska <mliska@suse.cz>
22895 * predict.c (rebuild_frequencies): Handle case when we have
22896 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22898 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22901 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22902 flag_section_anchors.
22903 * varasm.c (use_blocks_for_decl_p): Remove hack for
22904 dw2_force_const_mem.
22907 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22909 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22910 be created, use lowpart_subreg of operands[0] rather than operands[0]
22912 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22913 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22914 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22915 and n constraint instead of aarch64_shift_imm_di and Usd.
22916 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22917 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22919 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22922 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22923 to favor GPR over NEON registers.
22924 (<shift>di3_neon): Likewise.
22926 2018-03-20 Tom de Vries <tom@codesourcery.com>
22929 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22930 (nvptx_process_pars): Emit bar.sync asap and alap.
22932 2018-03-20 Tom de Vries <tom@codesourcery.com>
22935 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22936 seen_label if seen_label is already set.
22938 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22941 * config/i386/i386.c (fold_builtin_cpu): For features above 31
22942 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22943 Use 1U instead of 1. Formatting fixes.
22946 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22947 instead of TREE_TYPE (s1) for the return value.
22949 2018-03-19 Jakub Jelinek <jakub@redhat.com>
22951 PR tree-optimization/84946
22952 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22953 bitsize + bitsize in poly_uint64 rather than poly_int64.
22956 * dwarf2asm.c: Include fold-const.c.
22957 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22958 of decl rather than decl itself.
22960 PR rtl-optimization/84643
22961 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22963 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
22966 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22967 calling assemble_variable.
22969 2018-03-19 Sudakshina Das <sudi.das@arm.com>
22972 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22973 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22975 2018-03-19 Jim Wilson <jimw@sifive.com>
22978 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22979 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22980 (riscv_first_stack_step): Likewise.
22981 (riscv_option_override): Use STACK_BOUNDARY instead of
22982 MIN_STACK_BOUNDARY.
22983 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22984 MIN_STACK_BOUNDARY.
22985 (BIGGEST_ALIGNMENT): Set to 128.
22986 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22987 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22990 2018-03-19 Richard Biener <rguenther@suse.de>
22992 PR tree-optimization/84933
22993 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22994 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22996 2018-03-19 Richard Biener <rguenther@suse.de>
22998 PR tree-optimization/84859
22999 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23000 (cond_if_else_store_replacement): Perform sinking operation on
23001 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23002 Generalize what a BB with a single eligible store is.
23004 2018-03-19 Richard Biener <rguenther@suse.de>
23006 PR tree-optimization/84929
23007 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23008 chrec_is_positive against non-chrec arg.
23010 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23013 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23015 2018-03-18 Martin Liska <mliska@suse.cz>
23017 PR rtl-optimization/84635
23018 * regrename.c (build_def_use): Use matches_mode only when
23021 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23023 PR tree-optimization/84913
23024 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23025 vectorize chains of COND_EXPRs.
23027 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23029 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23031 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23033 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23035 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23037 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23039 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23040 Kito Cheng <kito.cheng@gmail.com>
23042 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23043 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23044 (nds32_adjust_reg_alloc_order): New function.
23045 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23047 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23049 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23050 nds32_print_operand, nds32_print_operand_address): Use
23051 HOST_WIDE_INT_PRINT_DEC instead.
23053 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23055 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23057 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23060 * config/i386/i386.c (initial_ix86_tune_features,
23061 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23062 unsigned long long.
23063 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23064 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23065 rather than 1u << ix86_tune. Formatting fix.
23066 (ix86_option_override_internal): Change ix86_arch_mask from
23067 unsigned int to unsigned HOST_WIDE_INT, initialize to
23068 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23069 (ix86_function_specific_restore): Likewise.
23071 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23074 * postreload.c (reload_combine_recognize_pattern): Perform
23075 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23076 truncate_int_for_mode the result for the destination's mode.
23079 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23080 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23082 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23085 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23088 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23089 regno_allocno_class_array and sorted_pseudos.
23090 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23091 insns where regno is used.
23093 2018-03-16 Martin Liska <mliska@suse.cz>
23096 * multiple_target.c (create_dispatcher_calls): Redirect
23097 reference in the symbol table.
23099 2018-03-16 Martin Liska <mliska@suse.cz>
23102 * multiple_target.c (create_dispatcher_calls): Redirect also
23105 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23109 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23110 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23111 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23113 2018-03-16 Julia Koval <julia.koval@intel.com>
23115 * doc/invoke.texi (Skylake Server): Add CLWB.
23116 Cannonlake): Remove CLWB.
23118 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23120 PR tree-optimization/84841
23121 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23123 (FLOAT_ONE_CONST_TYPE): Define.
23124 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23125 (sort_by_operand_rank): Put entries with higher constant_type last
23126 rather than first to match comments.
23128 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23130 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23133 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23136 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23137 check and use address of target always.
23139 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23142 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23143 (indirect_thunk_bnd_needed): Likewise.
23144 (indirect_thunks_used): Likewise.
23145 (indirect_thunks_bnd_used): Likewise.
23146 (indirect_return_needed): New.
23147 (indirect_return_bnd_needed): Likewise.
23148 (output_indirect_thunk_function): Add a bool argument for
23150 (output_indirect_thunk_function): Don't generate alias for
23151 function return thunk.
23152 (ix86_code_end): Call output_indirect_thunk_function to generate
23153 function return thunks.
23154 (ix86_output_function_return): Set indirect_return_bnd_needed
23155 and indirect_return_needed instead of indirect_thunk_bnd_needed
23156 and indirect_thunk_needed.
23158 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23160 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23161 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23162 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23164 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23165 Paul Hua <paul.hua.gm@gmail.com>
23168 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23170 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23172 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23173 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23174 resp. SFmode cases.
23176 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23179 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23180 instead of GET_MODE_SIZE when comparing Units.
23182 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23185 * varasm.c (hash_section): Return an unchangeble hash value
23186 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23187 Return !aarch64_can_use_per_function_literal_pools_p ().
23189 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23192 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23193 rather than address of cmode as last argument to prepare_cmp_insn.
23195 2018-03-15 Julia Koval <julia.koval@intel.com>
23197 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23198 F_AVX512VNNI, F_AVX512BITALG): New.
23200 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23203 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23204 insn for floating-point loads and stores.
23206 2018-03-14 Carl Love <cel@us.ibm.com>
23208 * config/rs6000/rs6000-c.c: Add macro definitions for
23209 ALTIVEC_BUILTIN_VEC_PERMXOR.
23210 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23211 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23212 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23213 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23215 * config/doc/extend.texi: Add prototypes for vec_permxor.
23217 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23220 * diagnostic-show-locus.c (class layout_point): Convert m_line
23221 from int to linenum_type.
23222 (line_span::comparator): Use linenum "compare" function when
23223 comparing line numbers.
23224 (test_line_span): New function.
23225 (layout_range::contains_point): Convert param "row" from int to
23227 (layout_range::intersects_line_p): Likewise.
23228 (layout::will_show_line_p): Likewise.
23229 (layout::print_source_line): Likewise.
23230 (layout::should_print_annotation_line_p): Likewise.
23231 (layout::print_annotation_line): Likewise.
23232 (layout::print_leading_fixits): Likewise.
23233 (layout::annotation_line_showed_range_p): Likewise.
23234 (struct line_corrections): Likewise for field m_row.
23235 (line_corrections::line_corrections): Likewise for param "row".
23236 (layout::print_trailing_fixits): Likewise.
23237 (layout::get_state_at_point): Likewise.
23238 (layout::get_x_bound_for_row): Likewise.
23239 (layout::print_line): Likewise.
23240 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23241 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23242 * input.c (selftest::test_linenum_comparisons): New function.
23243 (selftest::input_c_tests): Call it.
23244 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23245 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23246 * selftest.h (ASSERT_GT): New macro.
23247 (ASSERT_GT_AT): New macro.
23248 (ASSERT_LT): New macro.
23249 (ASSERT_LT_AT): New macro.
23251 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23253 PR rtl-optimization/84780
23254 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23256 2018-03-14 Martin Liska <mliska@suse.cz>
23258 * tree.c (record_node_allocation_statistics): Use
23259 get_stats_node_kind.
23260 (get_stats_node_kind): New function extracted from
23261 record_node_allocation_statistics.
23262 (free_node): Use get_stats_node_kind.
23264 2018-03-14 Richard Biener <rguenther@suse.de>
23266 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23267 that the value-set of ANTIC_IN doesn't grow.
23270 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23272 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23273 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23275 2018-03-14 Julia Koval <julia.koval@intel.com>
23277 * config.gcc (icelake-client, icelake-server): New.
23279 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23280 (initial_ix86_arch_features): Ditto.
23281 (PTA_SKYLAKE): Add SGX.
23282 (PTA_ICELAKE): Remove.
23283 (PTA_ICELAKE_CLIENT): New.
23284 (PTA_ICELAKE_SERVER): New.
23285 (ix86_option_override_internal): Split up icelake on icelake client and
23287 (get_builtin_code_for_version): Ditto.
23288 (fold_builtin_cpu): Ditto.
23289 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23290 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23291 * config/i386/i386.h (processor_type): Ditto.
23292 * doc/invoke.texi: Ditto.
23294 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23297 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23298 INTEGER_CST offset, add it together with bitpos / 8 and
23299 sign extend based on POINTER_SIZE.
23303 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23306 * config/i386/constraints.md (Yc): New register constraint.
23307 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23308 Use Yc constraint for alternative 2 of operand 0. Remove
23309 preferred_for_speed attribute.
23311 2018-03-14 Richard Biener <rguenther@suse.de>
23313 PR tree-optimization/84830
23314 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23315 with the old one to avoid oscillations.
23317 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23320 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23322 (assign_by_spills): Return a flag of reload assignment failure.
23323 Do not process the reload assignment failures. Do not spill other
23324 reload pseudos if they has the same reg class. Update n if
23326 (lra_assign): Add a return arg. Set up from the result of
23327 assign_by_spills call.
23328 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23329 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23330 usage_insns if it is not NULL.
23331 (spill_hard_reg_in_range): New function.
23332 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23333 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23334 function prototypes.
23335 (lra_assign): Change prototype.
23336 * lra.c (lra): Add code to deal with fails by splitting hard reg
23339 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23341 * config/riscv/riscv.opt (mrelax): New option.
23342 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23343 "norelax" when riscv_mrelax is disabled.
23344 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23346 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23349 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23350 reassociation for int modes.
23352 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23354 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23355 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23357 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23358 * config/aarch64/aarch64-sve.md
23359 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23360 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23361 (*extend<mode><Vwide>2): Rename to...
23362 (aarch64_sve_extend<mode><Vwide>2): ...this.
23363 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23364 renaming the old pattern to...
23365 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23367 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23368 define_expand, renaming the old pattern to...
23369 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23370 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23371 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23372 account when deciding which SVE instruction the optab should use.
23373 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23375 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23377 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23378 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23379 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23380 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23381 (tlsdesc_small_<mode>): Turn a define_expand and use
23382 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23383 (tlsdesc_small_advsimd_<mode>): ...this.
23384 (tlsdesc_small_sve_<mode>): New pattern.
23386 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23388 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23389 (UNSPEC_UMUL_HIGHPART): New constants.
23390 (MUL_HIGHPART): New int iteraor.
23391 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23392 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23394 (*<su>mul<mode>3_highpart): New define_insn.
23396 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23399 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23402 2018-03-13 Martin Liska <mliska@suse.cz>
23405 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23407 (sem_item_optimizer::~sem_item_optimizer): Release it.
23408 (sem_item_optimizer::merge_classes): Register variable aliases.
23409 (sem_item_optimizer::fixup_pt_set): New function.
23410 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23411 * ipa-icf.h: Declare new variables and functions.
23413 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23415 PR middle-end/84834
23416 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23417 integer_pow2p@2 and test integer_pow2p in condition.
23418 (A < 0 ? C : 0): Similarly for @1.
23420 PR middle-end/84831
23421 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23422 characters starting at p contain '\0' character, don't look beyond
23426 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23427 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23430 * reg-stack.c (change_stack): Change update_end var from int to
23431 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23432 also call set_block_for_insn on the newly added insns and rescan.
23435 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23436 on the last operand.
23439 * tree.c (stabilize_reference_1): Return save_expr (e) for
23440 STATEMENT_LIST even if it doesn't have side-effects.
23442 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23444 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23446 2018-03-12 Renlin Li <renlin.li@arm.com>
23448 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23449 aarch64_output_scalar_simd_mov_immediate.
23451 2018-03-12 Martin Sebor <msebor@redhat.com>
23453 PR tree-optimization/83456
23454 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23455 for perfectly overlapping calls to memcpy.
23456 (gimple_fold_builtin_memory_chk): Same.
23457 (gimple_fold_builtin_strcpy): Handle no-warning.
23458 (gimple_fold_builtin_stxcpy_chk): Same.
23459 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23461 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23463 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23464 parameter. Use it for SFmode.
23465 (rs6000_function_arg_advance_1): Adjust.
23466 (rs6000_function_arg): Adjust.
23467 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23469 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23471 PR rtl-optimization/84169
23472 PR rtl-optimization/84780
23473 * combine.c (can_combine_p): Check for a 2-insn combination whether
23474 the destination register is used between the two insns, too.
23476 2018-03-12 Richard Biener <rguenther@suse.de>
23478 PR tree-optimization/84803
23479 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23480 for refs DR analysis didn't process.
23482 2018-03-12 Richard Biener <rguenther@suse.de>
23484 PR tree-optimization/84777
23485 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23486 force-vectorize loops ignore whether we are optimizing for size.
23488 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23490 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23491 (TARGET_MD_ASM_ADJUST): Define.
23493 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23494 Kito Cheng <kito.cheng@gmail.com>
23495 Chung-Ju Wu <jasonwucj@gmail.com>
23497 * config/nds32/nds32.c (nds32_compute_stack_frame,
23498 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23499 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23500 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23501 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23502 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23503 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23504 * config/nds32/nds32.md (prologue, epilogue): Use macro
23505 NDS32_V3PUSH_AVAILABLE_P to do checking.
23507 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23510 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23511 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23512 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23513 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23514 addition of most attributes on !orig_type_die or the attribute not
23515 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23517 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23518 Chung-Ju Wu <jasonwucj@gmail.com>
23520 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23521 __NDS32_VH__ macro.
23522 * config/nds32/nds32.opt (mvh): New option.
23524 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23525 Chung-Ju Wu <jasonwucj@gmail.com>
23527 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23529 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23530 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23533 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23534 Chung-Ju Wu <jasonwucj@gmail.com>
23536 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23538 * config/nds32/nds32-multiple.md (strlensi): New pattern.
23539 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23541 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
23542 Kito Cheng <kito.cheng@gmail.com>
23543 Chung-Ju Wu <jasonwucj@gmail.com>
23545 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23546 UNSPEC_FFMISM and UNSPEC_FLMISM.
23547 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23548 for ffb, ffmism and flmism.
23549 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23550 (unspec_ffmism): Ditto.
23551 (unspec_flmism): Ditto.
23552 (nds32_expand_builtin_impl): Check if string extension is available.
23553 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23554 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23556 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
23559 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23562 * lra-assigns.c (assign_by_spills): Return a flag of reload
23563 assignment failure. Do not process the reload assignment
23564 failures. Do not spill other reload pseudos if they has the same
23566 (lra_assign): Add a return arg. Set up from the result of
23567 assign_by_spills call.
23568 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23569 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23570 usage_insns if it is not NULL.
23571 (spill_hard_reg_in_range): New function.
23572 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23573 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23574 function prototypes.
23575 (lra_assign): Change prototype.
23576 * lra.c (lra): Add code to deal with fails by splitting hard reg
23579 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
23582 * config/i386/i386.opt: Replace Enforcment with Enforcement.
23584 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
23587 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23588 (dw_val_node): Add val_symbolic_view.
23589 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23590 (symview_upper_bound): New.
23591 (new_line_info_table): Initialize symviews_since_reset.
23592 (dwarf2out_source_line): Count symviews_since_reset and set
23593 symview_upper_bound.
23594 (dw_val_equal_p): Handle symview.
23595 (add_AT_symview): New.
23596 (print_dw_val): Handle symview.
23597 (attr_checksum, attr_checksum_ordered): Likewise.
23598 (same_dw_val_p, size_of_die): Likewise.
23599 (value_format, output_die): Likewise.
23600 (add_high_low_attributes): Use add_AT_symview for entry_view.
23601 (dwarf2out_finish): Reset symview_upper_bound, clear
23604 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
23607 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23608 Add strict argument and use it.
23609 (rs6000_split_multireg_move): Update for new strict argument.
23610 (mem_operand_gpr): Disallow all non-offsettable addresses.
23611 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23613 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23616 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23617 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23618 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23621 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23622 decl, use remap_type if we want to use the type.
23624 2018-03-09 Martin Sebor <msebor@redhat.com>
23626 PR tree-optimization/84526
23627 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23629 (builtin_access::generic_overlap): Be prepared to handle non-array
23632 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23634 PR rtl-optimization/84682
23635 * lra-constraints.c (process_address_1): Check is_address flag
23636 for address constraints.
23637 (process_alt_operands): Likewise.
23638 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23639 preprocess_constraints.
23640 * recog.h (preprocess_constraints): Add oploc parameter.
23642 * recog.c (preprocess_constraints): Test address_operand for
23643 CT_ADDRESS constraints.
23645 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23648 * lra-assigns.c (assign_by_spills): Return a flag of reload
23649 assignment failure. Do not process the reload assignment
23650 failures. Do not spill other reload pseudos if they has the same
23652 (lra_assign): Add a return arg. Set up from the result of
23653 assign_by_spills call.
23654 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23655 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23656 usage_insns if it is not NULL.
23657 (spill_hard_reg_in_range): New function.
23658 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23659 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23660 function prototypes.
23661 (lra_assign): Change prototype.
23662 * lra.c (lra): Add code to deal with fails by splitting hard reg
23665 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23668 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23669 Accept complain bool parameter. Only emit errors if it is true.
23670 (arm_parse_cpu_option_name): Likewise.
23671 (arm_target_thumb_only): Adjust callers of the above.
23672 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23673 prototype to take a default true bool parameter.
23674 (arm_parse_arch_option_name): Likewise.
23676 2018-03-09 David Malcolm <dmalcolm@redhat.com>
23677 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
23681 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23682 * configure: Regenerate.
23683 * configure.ac ("linker --version-script option"): New.
23684 ("linker soname option"): New.
23686 2018-03-09 Richard Biener <rguenther@suse.de>
23688 PR tree-optimization/84775
23689 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23690 immediate uses of predicate stmts and mark them modified.
23693 PR tree-optimization/84178
23694 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23696 (version_loop_for_if_conversion): Delay update_ssa call.
23697 (tree_if_conversion): Delay update_ssa until after predicate
23700 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
23703 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23704 when the function accesses prior frames.
23706 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23709 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23710 gen_llsym, otherwise call maybe_gen_llsym.
23712 PR inline-asm/84742
23713 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23714 has ',' character inside of it.
23716 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23719 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23720 as clobbering CC_REGNUM.
23722 2018-03-08 Richard Biener <rguenther@suse.de>
23724 PR middle-end/84552
23725 * tree-scalar-evolution.c: Include tree-into-ssa.h.
23726 (follow_copies_to_constant): Do not follow SSA names registered
23729 2018-03-08 Richard Biener <rguenther@suse.de>
23731 PR tree-optimization/84178
23732 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23734 (version_loop_for_if_conversion): Delay update_ssa call.
23735 (tree_if_conversion): Delay update_ssa until after predicate
23738 2018-03-08 David Malcolm <dmalcolm@redhat.com>
23740 PR tree-optimization/84178
23741 * tree-if-conv.c (release_bb_predicate): Remove the
23742 the assertion that the stmts have NULL use_ops.
23743 Discard the statements, asserting that they haven't
23744 yet been added to a BB.
23746 2018-03-08 Richard Biener <rguenther@suse.de>
23748 PR tree-optimization/84746
23749 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23750 (phi_translate): Pass in destination ANTIC_OUT set.
23751 (phi_translate_1): Likewise. For a simplified result lookup
23752 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23753 (phi_translate_set): Adjust.
23754 (do_pre_regular_insertion): Likewise.
23755 (do_pre_partial_partial_insertion): Likewise.
23757 2018-03-08 Martin Liska <mliska@suse.cz>
23759 PR gcov-profile/84735
23760 * doc/gcov.texi: Document usage of profile files.
23761 * gcov-io.h: Document changes in the format.
23763 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23767 * dwarf2out.c (struct dw_line_info_table): Update comments for
23769 (FORCE_RESET_NEXT_VIEW): New.
23770 (FORCE_RESETTING_VIEW_P): New.
23771 (RESETTING_VIEW_P): Check for -1 too.
23772 (ZERO_VIEW_P): Likewise.
23773 (new_line_info_table): Force-reset next view.
23774 (dwarf2out_begin_function): Likewise.
23775 (dwarf2out_source_line): Simplify zero_view_p initialization.
23776 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23777 view directly. Omit view when omitting .loc at line 0.
23779 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23781 PR tree-optimization/84740
23782 * tree-switch-conversion.c (process_switch): Call build_constructors
23783 only if info.phi_count is non-zero.
23785 PR tree-optimization/84739
23786 * tree-tailcall.c (find_tail_calls): Check call arguments against
23787 DECL_ARGUMENTS (current_function_decl) rather than
23788 DECL_ARGUMENTS (func) when checking for tail recursion.
23790 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23792 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23793 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23794 Volker Reichelt's entry and add entries for people that perform
23795 GCC fuzzy testing and report numerous bugs.
23797 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
23800 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23801 readonly data in sdata, if that is disabled.
23802 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23803 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23804 -mreadonly-in-sdata option.
23806 2018-03-07 Martin Sebor <msebor@redhat.com>
23808 PR tree-optimization/84468
23809 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23810 basic block when looking for nul assignment.
23812 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
23815 * except.h (output_function_exception_table): Adjust prototype.
23816 * except.c (output_function_exception_table): Remove FNNAME parameter
23817 and add SECTION parameter. Ouput one part of the table at a time.
23818 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23819 the first part of the exception table and emit unwind directives.
23820 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23821 (i386_pe_seh_cold_init): Likewise.
23822 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23823 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23824 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23825 (ix86_output_call_insn): Emit a nop in one more case for SEH.
23826 * config/i386/winnt.c: Include except.h.
23827 (struct seh_frame_state): Add reg_offset, after_prologue and
23828 in_cold_section fields.
23829 (i386_pe_seh_end_prologue): Set seh->after_prologue.
23830 (i386_pe_seh_cold_init): New function.
23831 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23832 to seh->in_cold_section.
23833 (seh_emit_push): Record the offset of the push.
23834 (seh_emit_save): Record the offet of the save.
23835 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23836 Test seh->after_prologue to disregard the epilogue.
23837 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23838 (i386_pe_end_cold_function): New function.
23840 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23843 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23844 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23847 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23849 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23850 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23852 PR middle-end/84723
23853 * multiple_target.c: Include tree-inline.h and intl.h.
23854 (expand_target_clones): Diagnose and fail if node->definition and
23855 !tree_versionable_function_p (node->decl).
23857 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
23859 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23861 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23862 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23863 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23865 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23868 * combine.c (try_combine): Use reg_or_subregno instead of handling
23869 just paradoxical SUBREGs and REGs.
23871 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23873 * config/arc/arc.c (arc_finalize_pic): Remove function.
23874 (arc_must_save_register): We use single base PIC register, remove
23875 checks to save/restore the PIC register.
23876 (arc_expand_prologue): Likewise.
23877 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23879 (arc_verify_short): Likewise.
23880 (arc_attr_type): Likewise.
23881 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23882 (walk_stores): Likewise.
23883 (arc_address_cost): Make it static.
23884 (arc_verify_short): Likewise.
23885 (branch_dest): Likewise.
23886 (arc_attr_type): Likewise.
23887 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23888 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23889 (arc_final_prescan_insn): Remove inserting the nops due to
23890 hardware hazards. It is done in reorg step.
23891 (insn_length_variant_t): Remove.
23892 (insn_length_parameters_t): Likewise.
23893 (arc_insn_length_parameters): Likewise.
23894 (arc_get_insn_variants): Likewise.
23895 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23897 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23899 PR inline-asm/84683
23900 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23903 PR tree-optimization/84687
23904 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23906 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23908 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23910 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23911 Rename to ppc_speculation_barrier.
23912 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23913 __builtin_ppc_speculation_barrier.
23915 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23918 * combine.c (combine_simplify_rtx): Don't try to simplify if
23919 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23922 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
23924 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23925 to 32 bytes when compiling for POWER9.
23927 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23930 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23931 regparm >= 3 with no arg reg available also for calls with
23932 flag_force_indirect_call. Pass decl to ix86_function_regparm.
23935 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23937 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
23939 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
23942 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23944 2018-03-05 Richard Biener <rguenther@suse.de>
23946 PR tree-optimization/84486
23947 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23948 When inserting a __builtin_assume_aligned call set the LHS
23949 SSA name alignment info accordingly.
23951 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
23953 PR tree-optimization/84114
23954 * config/aarch64/aarch64.c (aarch64_reassociation_width)
23955 Avoid reassociation of FLOAT_MODE addition.
23957 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
23959 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23960 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23961 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23962 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23963 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23964 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23965 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23967 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23968 __builtin_ia32_wbinvd): New builtins.
23969 (SPECIAL_ARGS2): New.
23970 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23971 (SPECIAL_ARGS2): New.
23972 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23973 (ix86_valid_target_attribute_inner_p): Ditto.
23974 (ix86_init_mmx_sse_builtins): Add special_args2.
23975 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23976 TARGET_WBNOINVD_P): New.
23977 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23978 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23979 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23980 * config/i386/immintrin.h (_wbinvd): New intrinsic.
23981 * config/i386/pconfigintrin.h: New file.
23982 * config/i386/wbnoinvdintrin.h: Ditto.
23983 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23985 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23987 2018-03-05 Richard Biener <rguenther@suse.de>
23989 PR tree-optimization/84670
23990 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23992 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23993 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23994 (compute_antic_aux): Only assert the number of values in ANTIC_IN
23995 doesn't grow if all successors (recursively) were visited at least
23998 2018-03-05 Richard Biener <rguenther@suse.de>
24000 PR tree-optimization/84650
24001 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24002 if executed in the loop pipeline.
24004 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24006 * doc/configfiles.texi (Configuration Files): Move info about
24007 conditionalizing $target-protos.h to...
24008 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24009 differs from $target-protos.h.
24011 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24012 Chung-Ju Wu <jasonwucj@gmail.com>
24014 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24015 * config/nds32/nds32-multiple.md (setmemsi): Define.
24016 * config/nds32/nds32-memory-manipulation.c
24017 (nds32_gen_dup_4_byte_to_word_value): New.
24018 (emit_setmem_word_loop): New.
24019 (emit_setmem_byte_loop): New.
24020 (nds32_expand_setmem_loop): New.
24021 (nds32_expand_setmem_loop_v3m): New.
24022 (nds32_expand_setmem_unroll): New.
24023 (nds32_expand_setmem): New.
24025 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24026 Chung-Ju Wu <jasonwucj@gmail.com>
24028 * config/nds32/nds32-memory-manipulation.c
24029 (nds32_emit_load_store): New.
24030 (nds32_emit_post_inc_load_store): New.
24031 (nds32_emit_mem_move): New.
24032 (nds32_emit_mem_move_block): New.
24033 (nds32_expand_movmemsi_loop_unknown_size): New.
24034 (nds32_expand_movmemsi_loop_known_size): New.
24035 (nds32_expand_movmemsi_loop): New.
24036 (nds32_expand_movmemsi_unroll): New.
24037 (nds32_expand_movmemqi): Rename ...
24038 (nds32_expand_movmemsi): ... to this.
24039 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24040 (movmemsi): ... to this.
24041 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24042 (nds32_expand_movmemsi): ... to this.
24044 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24045 Monk Chiang <sh.chiang04@gmail.com>
24046 Chung-Ju Wu <jasonwucj@gmail.com>
24048 * config/nds32/nds32-protos.h
24049 (nds32_expand_load_multiple): New arguments.
24050 (nds32_expand_store_multiple): Ditto.
24051 (nds32_valid_multiple_load_store): Rename ...
24052 (nds32_valid_multiple_load_store_p): ... to this.
24053 * config/nds32/nds32-memory-manipulation.c
24054 (nds32_expand_load_multiple): Refine implementation.
24055 (nds32_expand_store_multiple): Ditto.
24056 * config/nds32/nds32-multiple.md
24057 (load_multiple): Update nds32_expand_load_multiple interface.
24058 (store_multiple): Update nds32_expand_store_multiple interface.
24059 * config/nds32/nds32-predicates.c
24060 (nds32_valid_multiple_load_store): Rename ...
24061 (nds32_valid_multiple_load_store_p): ... to this and refine
24063 * config/nds32/predicates.md
24064 (nds32_load_multiple_and_update_address_operation): New predicate.
24065 (nds32_store_multiple_and_update_address_operation): New predicate.
24067 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24068 Chung-Ju Wu <jasonwucj@gmail.com>
24070 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24071 (combo): New attribute.
24072 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24074 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24076 * config/nds32/nds32.opt: Change -mcmodel= default value.
24078 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24079 Monk Chiang <sh.chiang04@gmail.com>
24080 Chung-Ju Wu <jasonwucj@gmail.com>
24082 * config/nds32/constants.md (unspec_element): New enum.
24083 * config/nds32/constraints.md (Umw): New constraint.
24084 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24085 * config/nds32/nds32-intrinsic.md: Likewise.
24086 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24087 (nds32_valid_smw_lwm_base_p): New.
24088 (nds32_output_smw_single_word): New.
24089 (nds32_output_lmw_single_word): New.
24090 (nds32_expand_unaligned_load): New.
24091 (nds32_expand_unaligned_store): New.
24092 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24093 (nds32_output_smw_single_word): Declare.
24094 (nds32_output_lmw_single_word): Declare.
24095 (nds32_expand_unaligned_load): Declare.
24096 (nds32_expand_unaligned_store): Declare.
24097 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24098 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24099 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24100 NDS32_BUILTIN_UASTORE_DW.
24101 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24104 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24105 Kito Cheng <kito.cheng@gmail.com>
24106 Chung-Ju Wu <jasonwucj@gmail.com>
24108 * config/nds32/nds32-intrinsic.c
24109 (nds32_expand_builtin_null_ftype_reg): Delete.
24110 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24111 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24112 (nds32_read_argument): New.
24113 (nds32_legitimize_target): Ditto.
24114 (nds32_legitimize_argument): Ditto.
24115 (nds32_check_constant_argument): Ditto.
24116 (nds32_expand_unop_builtin): Ditto.
24117 (nds32_expand_unopimm_builtin): Ditto.
24118 (nds32_expand_binop_builtin): Ditto.
24119 (nds32_builtin_decl_impl): Ditto.
24120 (builtin_description): Ditto.
24121 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24122 (nds32_init_builtins_impl): Ditto.
24123 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24124 (nds32_builtin_decl): New.
24125 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24126 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24128 2018-03-02 Jeff Law <law@redhat.com>
24130 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24131 (redundant_insn, fill_simple_delay_slots): Likewise.
24132 (fill_slots_from_thread): Likewise.
24133 * resource.c (mark_referenced_resources): Likewise.
24134 (mark_set_resources, find_dead_or_set_registers): Likewise.
24136 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24138 * substring-locations.h (format_warning_va): Formatting fix for
24139 ATTRIBUTE_GCC_DIAG.
24140 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24142 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24143 * substring-locations.c: Include intl.h.
24144 (format_warning_va): Turned into small wrapper around
24145 format_warning_n_va, renamed to ...
24146 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24147 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24149 (format_warning_at_substring_n): New function.
24150 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24151 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24152 format_warning_at_substring with just a shorter name instead of
24153 const function pointer.
24154 (fmtwarn_n): New function.
24155 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24156 appropriate, get rid of all the fmtstr temporaries, move conditionals
24157 with G_() wrapped string literals directly into fmtwarn arguments,
24158 cast dir.len to (int), formatting fixes.
24160 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24162 * doc/invoke.texi: Remove "Cilk Plus" references.
24164 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24165 Richard Biener <rguenther@suse.de>
24168 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24169 for error or warning attributes if CALL_FROM_THUNK_P is set.
24172 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24175 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24176 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24179 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24180 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24182 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24183 instead of -1U in last predictors element's probability member.
24185 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24188 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24189 arguments if they are comparable.
24191 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24193 PR tree-optimization/84634
24194 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24195 masks and masked_loop_p with a single loop_masks, making sure it's
24196 null for bb vectorization.
24198 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24200 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24201 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24202 loop->force_vectorize to check whether there is no alias.
24204 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24207 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24209 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24211 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24212 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24213 instead of a loop around prev_real_insn.
24214 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24217 PR inline-asm/84625
24218 * config/i386/i386.c (ix86_print_operand): Use conditional
24219 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24222 2018-03-02 Richard Biener <rguenther@suse.de>
24224 PR tree-optimization/84427
24225 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24226 (bitmap_set_subtract_values): Rewrite to handle multiple
24229 (prune_clobbered_mems): Likewise.
24230 (phi_translate): Take edge instead of pred/phiblock.
24231 (phi_translate_1): Likewise.
24232 (phi_translate_set): Likewise. Insert all translated
24233 exprs for a value into the set, keeping possibly multiple
24234 expressions per value.
24235 (compute_antic_aux): Adjust for phi_translate changes.
24236 When intersecting union the expressions and prune those
24237 not in the final value set, keeping possibly multiple
24238 expressions per value. Do not use value-insertion
24239 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24240 all expressions. Add verification that the value-sets
24241 only shrink during iteration.
24242 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24243 (do_pre_regular_insertion): Likewise.
24244 (do_pre_partial_partial_insertion): Likewise.
24246 2018-03-02 Richard Biener <rguenther@suse.de>
24249 * config/darwin.c (saved_debug_info_level): New static global.
24250 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24251 (darwin_asm_lto_end): Restore debug info generation settings.
24253 2018-03-01 Martin Liska <mliska@suse.cz>
24256 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24257 volatile arguments.
24259 2018-03-01 Richard Biener <rguenther@suse.de>
24262 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24263 type annotation with LTO when debug was disabled at compile-time.
24265 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24267 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24269 (mips_final_postscan_insn): Likewise.
24271 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24273 PR rtl-optimization/84528
24274 * alias.c (init_alias_target): Add commentary.
24275 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24276 a unique base value if the frame pointer is not eliminated
24277 to the stack pointer.
24279 2018-03-01 Tom de Vries <tom@codesourcery.com>
24281 PR rtl-optimization/83327
24282 * lra-int.h (hard_regs_spilled_into): Declare.
24283 * lra.c (hard_regs_spilled_into): Define.
24284 (init_reg_info): Init hard_regs_spilled_into.
24285 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24286 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24287 (process_bb_lives): Handle hard_regs_spilled_into.
24288 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24289 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24291 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24293 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24294 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24295 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24296 * config/rs6000/aix72.h: New file.
24298 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24300 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24301 instead of warning_at with conditional singular and plural messages
24305 * stor-layout.c (update_alignment_for_field): For
24306 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24307 && !DECL_PACKED (field), do the alignment update, just use
24308 only desired_align instead of MAX (type_align, desired_align)
24310 (place_field): Don't do known_align < desired_align handling
24311 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24312 is non-NULL, instead do it after rli->prev_field handling and
24313 only if not within a bitfield word. For DECL_PACKED (field)
24314 use type_align of BITS_PER_UNIT.
24316 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24318 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24319 superfluous parentheses and trailing spaces.
24321 2018-02-28 Richard Biener <rguenther@suse.de>
24323 PR tree-optimization/84584
24324 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24325 SCoPs with fake exit edge.
24327 2018-02-28 Martin Liska <mliska@suse.cz>
24330 * timevar.c (timer::print): Fix format to properly print 100%
24333 2018-02-28 Richard Biener <rguenther@suse.de>
24335 PR middle-end/84607
24336 * genmatch.c (capture_info::walk_match): Do not mark
24337 captured expressions without operands as expr_p given
24338 they act more like predicates and should be subject to
24339 "lost tail" side-effect preserving.
24341 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24343 PR rtl-optimization/81611
24344 * auto-inc-dec.c (attempt_change): Move dead note from
24345 mem_insn if it's the next use of regno
24346 (find_address): Take address use of reg holding
24347 non-incremented value. Add parm to limit search to the named
24349 (merge_in_block): Attempt to use a mem insn that is the next
24350 use of the original regno.
24352 2018-02-27 Martin Sebor <msebor@redhat.com>
24355 * doc/invoke.texi (-Wmissing-attributes): New option.
24356 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24358 2018-02-27 Martin Sebor <msebor@redhat.com>
24360 PR translation/84207
24361 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24362 n argument to unsigned HOST_WIDE_INT.
24363 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24364 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24365 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24366 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24368 2018-02-27 Richard Biener <rguenther@suse.de>
24370 PR tree-optimization/84512
24371 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24372 Do not use the estimate returned from record_stmt_cost for
24373 the scalar iteration cost but sum properly using add_stmt_cost.
24375 2018-02-27 Richard Biener <rguenther@suse.de>
24377 PR tree-optimization/84466
24378 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24379 Adjust last change to less strictly validate use operands.
24381 2018-02-27 Martin Liska <mliska@suse.cz>
24383 PR gcov-profile/84548
24384 * gcov.c (process_file): Allow partial overlap and consider it
24385 also as group functions.
24386 (output_lines): Properly calculate range of lines for a group.
24388 2018-02-27 Martin Liska <mliska@suse.cz>
24390 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24391 'ggc' suffixes. Change first column width.
24392 (timer::print): Fix formatting of the column.
24394 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24396 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24397 preserve inline entry blocks for the sake of debug inline
24398 entry point markers alone.
24399 (remove_unused_locals): Suggest in comments a better place to
24400 force the preservation of inline entry blocks that are
24401 otherwise unused, but do not preserve them.
24403 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24405 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24407 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24410 * config/i386/constraints.md (Bs): Replace
24411 ix86_indirect_branch_register with
24412 TARGET_INDIRECT_BRANCH_REGISTER.
24414 * config/i386/i386.md (indirect_jump): Likewise.
24415 (tablejump): Likewise.
24416 (*sibcall_memory): Likewise.
24417 (*sibcall_value_memory): Likewise.
24418 Peepholes of indirect call and jump via memory: Likewise.
24419 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24420 (*sibcall_value_GOT_32): Likewise.
24421 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24422 (GOT_memory_operand): Likewise.
24423 (call_insn_operand): Likewise.
24424 (sibcall_insn_operand): Likewise.
24425 (GOT32_symbol_operand): Likewise.
24426 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24428 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24430 PR rtl-optimization/83496
24431 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24432 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24433 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24434 redundant insn, if any.
24435 (relax_delay_slots): Likewise.
24436 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24438 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24440 PR tree-optimization/83965
24441 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24442 that grouped statements are part of a reduction chain. Return
24443 true if the statement is not marked as a reduction itself but
24444 is part of a group.
24445 (vect_recog_dot_prod_pattern): Don't check whether the statement
24446 is part of a group here.
24447 (vect_recog_sad_pattern): Likewise.
24448 (vect_recog_widen_sum_pattern): Likewise.
24450 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24453 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24455 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24458 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24460 (ix86_output_indirect_function_return): New prototype.
24461 (ix86_split_simple_return_pop_internal): Likewise.
24462 * config/i386/i386.c (indirect_return_via_cx): New.
24463 (indirect_return_via_cx_bnd): Likewise.
24464 (indirect_thunk_name): Handle return va CX_REG.
24465 (output_indirect_thunk_function): Create alias for
24466 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24467 (ix86_output_indirect_jmp): Remove the bool argument.
24468 (ix86_output_indirect_function_return): New function.
24469 (ix86_split_simple_return_pop_internal): Likewise.
24470 * config/i386/i386.md (*indirect_jump): Don't pass false
24471 to ix86_output_indirect_jmp.
24472 (*tablejump_1): Likewise.
24473 (simple_return_pop_internal): Change it to define_insn_and_split.
24474 Call ix86_split_simple_return_pop_internal to split it for
24475 -mfunction-return=.
24476 (simple_return_indirect_internal): Call
24477 ix86_output_indirect_function_return instead of
24478 ix86_output_indirect_jmp.
24480 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24483 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24484 memset and value initialization afterwards.
24486 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24488 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24490 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24493 * common/config/aarch64/aarch64-common.c
24494 (aarch_option_optimization_table[]): Switch
24495 off fomit-frame-pointer
24497 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24498 Chung-Ju Wu <jasonwucj@gmail.com>
24500 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24502 (store_multiple): Ditto.
24504 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24506 * config.gcc: Add --with-cpu support for nds32 target.
24507 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24508 * config/nds32/nds32.opt: Add -mcpu= option.
24510 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24512 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24513 isel=yes): Warn for these deprecated options.
24515 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24517 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24518 ISA_2_5_MASKS_EMBEDDED.
24520 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24522 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24523 p->max as pointers rather than using iterative_hash_expr.
24525 2018-02-23 Carl Love <cel@us.ibm.com>
24527 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24528 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24530 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24531 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24532 P8V_BUILTIN_VEC_VUNSIGNED2.
24534 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
24537 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24538 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24540 * lra-constraints.c (curr_insn_transform): Set up
24541 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
24543 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24544 * lra-eliminations.c (spill_pseudos): Ditto.
24545 (process_insn_for_elimination): Ditto.
24546 * lra-lives.c (reg_early_clobber_p): Use the new macros.
24547 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24548 LRA_NON_CLOBBERED_ALT.
24550 2018-02-22 Martin Sebor <msebor@redhat.com>
24552 PR tree-optimization/84480
24553 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24554 to maybe_diag_stxncpy_trunc. Call it.
24555 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24556 from gimple_fold_builtin_strcpy. Print inlining stack.
24557 (handle_builtin_stxncpy): Print inlining stack.
24558 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24560 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
24563 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24564 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24565 and -fcheck-pointer-bounds are used together.
24566 (indirect_thunk_prefix): New enum.
24567 (indirect_thunk_need_prefix): New function.
24568 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
24569 "_nt" instead of "_bnd" for NOTRACK prefix.
24570 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24571 (output_indirect_thunk_function): Likewise.
24573 (ix86_code_end): Update output_indirect_thunk_function calls.
24574 (ix86_output_indirect_branch_via_reg): Replace
24575 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24576 (ix86_output_indirect_branch_via_push): Likewise.
24577 (ix86_output_function_return): Likewise.
24578 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24579 incompatible with -fcf-protection=branch and
24580 -fcheck-pointer-bounds.
24582 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24585 * config/aarch64/aarch64.c (aarch64_print_address_internal):
24586 Change gcc_assert call to output_operand_lossage.
24588 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24590 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24592 2018-02-22 DJ Delorie <dj@redhat.com>
24593 Sebastian Perta <sebastian.perta@renesas.com>
24594 Oleg Endo <olegendo@gcc.gnu.org>
24596 * config/rx/rx.c (rx_rtx_costs): New function.
24597 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24599 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
24601 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24603 2018-02-22 Martin Liska <mliska@suse.cz>
24606 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24607 Add "native" as a possible value.
24609 2018-02-22 Martin Liska <mliska@suse.cz>
24612 * config/i386/i386.c (ix86_option_override_internal):
24613 Add "native" as a possible value for -march and -mtune.
24615 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24618 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24619 to all type variants.
24621 PR tree-optimization/84503
24622 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24623 width as info->bitpos + info->bitsize - start.
24624 (merged_store_group::merge_overlapping): Simplify width computation.
24625 (check_no_overlap): New function.
24626 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24627 start + width and last_order of the group, fail if check_no_overlap
24629 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24630 to group if check_no_overlap fails.
24632 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24634 * config/rs6000/altivec.md: Delete contraint arguments to
24635 define_expand, define_split, and define_peephole2, and in
24636 define_insn_and_split if always unused.
24637 * config/rs6000/darwin.md: Ditto.
24638 * config/rs6000/dfp.md: Ditto.
24639 * config/rs6000/rs6000.md: Ditto.
24640 * config/rs6000/sync.md: Ditto.
24641 * config/rs6000/vector.md: Ditto.
24642 * config/rs6000/vsx.md: Ditto.
24644 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24646 * config/rs6000/altivec.md: Write output control strings as braced
24647 blocks instead of double-quoted strings.
24648 * config/rs6000/darwin.md: Ditto.
24649 * config/rs6000/rs6000.md: Ditto.
24650 * config/rs6000/vector.md: Ditto.
24651 * config/rs6000/vsx.md: Ditto.
24653 2018-02-21 Jason Merrill <jason@redhat.com>
24655 PR c++/84314 - ICE with templates and fastcall attribute.
24656 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24658 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24660 * ipa-cp.c (determine_versionability): Fix comment typos.
24662 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24665 * ipa-cp.c (determine_versionability): Do not version functions caling
24668 2018-02-21 Martin Liska <mliska@suse.cz>
24671 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24672 Add "native" as a possible value.
24673 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
24674 the macro when native cpu detection is available.
24676 2018-02-21 Martin Liska <mliska@suse.cz>
24679 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24680 Add "native" as a possible value.
24681 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24682 when native cpu detection is available.
24684 2018-02-21 Jakub Jelinek <jakub@redhat.com>
24685 Martin Sebor <msebor@redhat.com>
24687 PR tree-optimization/84478
24688 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24690 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24691 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24692 support which is conservatively correct, for 2 only stay conservative
24693 for maxlen. Formatting and comment capitalization fixes. Add STRICT
24694 argument to the 2 argument get_range_strlen, adjust 6 arg
24695 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24697 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24698 (gimple_fold_builtin_strlen): Pass true as last argument to
24701 2018-02-20 Martin Sebor <msebor@redhat.com>
24703 PR middle-end/84095
24704 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24705 (builtin_memref::set_base_and_offset): Same. Handle inner references.
24706 (builtin_memref::builtin_memref): Factor out parts into
24707 set_base_and_offset and call it.
24709 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24711 PR middle-end/84406
24712 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24713 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24714 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
24715 search at the associated MODE_INT.
24717 2018-02-20 Jeff Law <law@redhat.com>
24719 PR middle-end/82123
24720 PR tree-optimization/81592
24721 PR middle-end/79257
24722 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24723 for range data rather than using global data.
24724 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24725 range data rather than using global data.
24726 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24727 pass it to children as needed.
24728 (struct directive::fmtresult): Similarly.
24729 (struct directive::set_width): Similarly.
24730 (struct directive::set_precision): Similarly.
24731 (format_integer, format_directive, parse_directive): Similarly.
24732 (format_none): Accept unnamed vr_values parameter.
24733 (format_percent, format_floating, format_character): Similarly.
24734 (format_string, format_plain): Similarly.
24735 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24736 the EVRP range analyzer for range data rather than using global data.
24737 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24738 gimple-ssa-evrp-analyze.h
24739 (class sprintf_dom_walker): Add after_dom_children member function.
24740 Add evrp_range_analyzer member.
24741 (sprintf_dom_walker::before_dom_children): Call into the EVRP
24742 range analyzer as needed.
24743 (sprintf_dom_walker::after_dom_children): New member function.
24744 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24746 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24747 (evrp_range_analyzer::pop_to_marker): Likewise.
24749 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24751 PR tree-optimization/84419
24752 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24753 with the required type if its current type is compatible but
24756 2018-02-20 Jakub Jelinek <jakub@redhat.com>
24758 PR middle-end/82004
24759 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24760 after vectorization.
24762 2018-02-20 Martin Liska <mliska@suse.cz>
24765 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24766 possible values if we don't have a hint.
24768 2018-02-20 Martin Liska <mliska@suse.cz>
24772 * final.c (shorten_branches): Build align_tab array with one
24774 * opts.c (finish_options): Add alignment option limit check.
24775 (MAX_CODE_ALIGN): Likewise.
24776 (MAX_CODE_ALIGN_VALUE): Likewise.
24777 * doc/invoke.texi: Document maximum allowed option value for
24778 all -falign-* options.
24780 2018-02-19 Jakub Jelinek <jakub@redhat.com>
24783 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24784 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24785 * var-tracking.c (emit_note_insn_var_location): Remove all references
24786 to NOTE_INSN_CALL_ARG_LOCATION.
24787 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24788 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24789 Use copy_rtx_if_shared.
24790 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24791 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24792 (dwarf2out_var_location): Remove handling of
24793 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24795 * final.c (final_scan_insn): Remove all references to
24796 NOTE_INSN_CALL_ARG_LOCATION.
24797 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
24798 before dumping final insns.
24799 * except.c (emit_note_eh_region_end): Remove all references to
24800 NOTE_INSN_CALL_ARG_LOCATION.
24801 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24802 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24803 * config/arc/arc.c (hwloop_optimize): Likewise.
24804 * config/arm/arm.c (create_fix_barrier): Likewise.
24805 * config/s390/s390.c (s390_chunkify_start): Likewise.
24806 * config/sh/sh.c (find_barrier): Likewise.
24807 * config/i386/i386.c (rest_of_insert_endbranch,
24808 ix86_seh_fixup_eh_fallthru): Likewise.
24809 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24810 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24811 * config/frv/frv.c (frv_function_prologue): Likewise.
24812 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
24814 (note_outside_basic_block_p): Remove all references to
24815 NOTE_INSN_CALL_ARG_LOCATION.
24816 * gengtype.c (adjust_field_rtx_def): Likewise.
24817 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24819 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24820 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24823 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24826 PR tree-optimization/84452
24827 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24828 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24831 2018-02-19 Martin Liska <mliska@suse.cz>
24834 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24836 2018-02-19 Martin Liska <mliska@suse.cz>
24837 Richard Sandiford <richard.sandiford@linaro.org>
24839 PR tree-optimization/82491
24840 * gimple-fold.c (get_base_constructor): Make earlier bail out
24843 2018-02-19 Carl Love <cel@us.ibm.com>
24845 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24846 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24848 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24849 P8V_BUILTIN_VEC_NEG.
24851 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
24853 * config/rl78/rl78.md (movdf): New define expand.
24855 2018-02-19 Martin Liska <mliska@suse.cz>
24858 * doc/invoke.texi: Fix typo.
24859 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24861 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
24863 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24864 handle rs6000_single_float and rs6000_double_float specially for
24867 2018-02-16 Jeff Law <law@redhat.com>
24869 * config/rx/rx.c (add_pop_cfi_notes): New function.;
24870 (pop_regs): Use it.
24872 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24875 * ipa-inline.c (inline_small_functions): Fix a typo.
24877 2018-02-16 Nathan Sidwell <nathan@acm.org>
24879 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24881 2018-02-16 Carl Love <cel@us.ibm.com>
24883 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24884 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24885 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24886 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24887 expansion to P8V_BUILTIN_VEC_FLOAT2.
24889 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24891 PR rtl-optimization/70023
24892 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24893 src_regno into account.
24895 2018-02-16 Carl Love <cel@us.ibm.com>
24897 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24898 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24899 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24900 * config/rs6000/rs6000.c: Remove case statements for
24901 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24902 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24903 and P9V_BUILTIN_VEC_VINSERT4B.
24904 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24905 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24906 * config/rs6000/vsx.md:
24907 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24910 2018-02-16 Carl Love <cel@us.ibm.com>
24912 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24914 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24916 * config/rs6000/rs6000-c.c: Add the definitions for
24917 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24918 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24919 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24920 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24921 definition for insert4b and define insn *insert3b_internal.
24922 * doc/extend.texi: Add documentation for vec_extract4b.
24924 2018-02-16 Nathan Sidwell <nathan@acm.org>
24926 * doc/extend.texi (Backwards Compatibility): Mention friend
24927 injection. Note for-scope is deprecated.
24928 * doc/invoke.texi (-ffriend-injection): Deprecate.
24930 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
24932 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24933 that moved to I2, also allow destinations that are a paradoxical
24934 subreg (instead of a normal reg).
24936 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
24939 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24942 2018-02-16 Richard Biener <rguenther@suse.de>
24944 PR tree-optimization/84037
24945 PR tree-optimization/84016
24947 * config/i386/i386.c (ix86_builtin_vectorization_cost):
24948 Adjust vec_construct for the fact we need additional higher latency
24949 128bit inserts for AVX256 and AVX512 vector builds.
24950 (ix86_add_stmt_cost): Scale vector construction cost for
24953 2018-02-16 Richard Biener <rguenther@suse.de>
24955 PR tree-optimization/84417
24956 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24957 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24958 (non_rewritable_lvalue_p): Likewise, use poly-ints.
24960 2018-02-16 Martin Liska <mliska@suse.cz>
24963 * internal-fn.def (ASAN_CHECK): Set proper flags.
24964 (ASAN_MARK): Likewise.
24966 2018-02-16 Julia Koval <julia.koval@intel.com>
24968 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24969 from PTA_CANNONLAKE.
24971 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24974 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24975 Use ++iter rather than iter++ for std::list iterators.
24976 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
24977 defer deleting them until all nodes in the forest are processed. Do
24978 free even leaf nodes. Change to_process into auto_vec.
24981 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24982 * vec.h (vec_default_construct): Use memset instead of placement new
24983 if BROKEN_VALUE_INITIALIZATION is defined.
24984 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24985 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24988 PR rtl-optimization/83723
24989 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24990 * lra.c (lra_substitute_pseudo): Likewise. If true, use
24991 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
24993 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24995 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24997 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
24999 PR rtl-optimization/81443
25000 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25001 from inner REGs to paradoxical SUBREGs.
25003 2018-02-16 Richard Biener <rguenther@suse.de>
25005 PR tree-optimization/84399
25006 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25007 For operands we can analyze at their definition make sure we can
25008 analyze them at each use as well.
25010 2018-02-16 Richard Biener <rguenther@suse.de>
25012 PR tree-optimization/84190
25013 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25014 volatile accesses if the decl isn't volatile.
25016 2018-02-15 Jason Merrill <jason@redhat.com>
25018 PR c++/84314 - ICE with templates and fastcall attribute.
25019 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25020 TYPE_CANONICAL on an existing type.
25022 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25024 PR tree-optimization/84383
25025 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25026 dstoff nor call operand_equal_p if dstbase is NULL.
25028 PR tree-optimization/84334
25029 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25030 also a CONSTANT_CLASS_P, punt.
25032 2018-02-14 Jim Wilson <jimw@sifive.com>
25034 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25035 first SMALL_OPERAND check. New local min_second_step. Move assert
25036 to where locals are set. Add TARGET_RVC support.
25037 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25039 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25041 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25043 2018-02-14 Martin Sebor <msebor@redhat.com>
25045 PR tree-optimization/83698
25046 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25047 arrays constrain the offset range to their bounds.
25048 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25049 (builtin_access::overlap): Avoid setting the size of overlap if it's
25051 (maybe_diag_overlap): Also consider arrays when deciding what values
25052 of offsets to include in diagnostics.
25054 2018-02-14 Martin Sebor <msebor@redhat.com>
25057 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25058 that correspond to the kind of a declaration.
25060 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25063 * config/pa/pa.md: Load address of PIC label using the linkage table
25064 if the label is nonlocal.
25066 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25068 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25069 warning message if user requests -maltivec=be.
25070 * doc/invoke.texi: Document deprecation of -maltivec=be.
25072 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25075 * config/rs6000/rs6000-c.c: Update definitions for
25076 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25077 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25079 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25082 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25083 add _get_ssp intrinsics. Remove argument from
25084 __builtin_ia32_rdssp[d|q].
25085 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25086 * config/i386/i386-builtin.def: Remove argument from
25087 __builtin_ia32_rdssp[d|q].
25088 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25089 ix86_expand_special_args_builtin for _rdssp[d|q].
25090 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25091 Clear register before usage.
25092 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25093 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25095 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25097 PR tree-optimization/84357
25098 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25099 operand 1 of an ARRAY_REF too.
25101 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25104 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25105 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25107 (set_of_reg): New struct.
25108 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25109 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25110 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25112 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25113 Split into bitclr, bitset, bitinvert patterns if appropriate.
25114 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25115 use rx_fuse_in_memory_bitop.
25116 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25117 to named insn, correct maximum insn length.
25119 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25122 * machmode.def: Define a complex mode for PARTIAL_INT.
25123 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25125 * doc/rtl.texi: Document CSPImode.
25126 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25128 (msp430_hard_regno_nregs_with_padding): Likewise.
25130 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25133 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25135 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25137 PR rtl-optimization/84169
25138 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25139 we generated a parallel as new i3 and we split that to new i2 and i3
25140 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25141 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25142 those to i2, not i1. Partially rewrite this scan code.
25144 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25147 * stor-layout.c (place_field): For variable length fields, adjust
25148 offset_align afterwards not just based on the field's alignment,
25149 but also on the size.
25151 PR middle-end/84309
25152 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25153 of exps and logs in the use_exp2 case.
25155 2018-02-13 Jeff Law <law@redhat.com>
25157 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25158 entry for "vector".
25160 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25163 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25167 * common.opt (gas-loc-support, gas-locview-support): New.
25168 (ginline-points, ginternal-reset-location-views): New.
25169 * doc/invoke.texi: Document them. Use @itemx where intended.
25170 (gvariable-location-views): Adjust.
25171 * target.def (reset_location_view): New.
25172 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25173 (TARGET_RESET_LOCATION_VIEW): New.
25174 * doc/tm.texi: Rebuilt.
25175 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25176 (dwarf2out_default_as_locview_support): New.
25177 (output_asm_line_debug_info): Use option variables.
25178 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25179 (output_loc_list): Likewise.
25180 (add_high_low_attributes): Check option variables.
25181 Don't output entry view attribute in strict mode.
25182 (gen_inlined_subroutine_die): Check option variables.
25183 (dwarf2out_inline_entry): Likewise.
25184 (init_sections_and_labels): Likewise.
25185 (dwarf2out_early_finish): Likewise.
25186 (maybe_reset_location_view): New, from...
25187 (dwarf2out_var_location): ... here. Call it.
25188 * debug.h (dwarf2out_default_as_loc_support): Declare.
25189 (dwarf2out_default_as_locview_support): Declare.
25190 * hooks.c (hook_int_rtx_insn_0): New.
25191 * hooks.h (hook_int_rtx_insn_0): Declare.
25192 * toplev.c (process_options): Take -gas-loc-support and
25193 -gas-locview-support from dwarf2out. Enable
25194 -gvariable-location-views by default only with locview
25195 assembler support. Enable -ginternal-reset-location-views by
25196 default only if the target defines the corresponding hook.
25197 Enable -ginline-points by default if location views are
25198 enabled; force it disabled if statement frontiers are
25200 * tree-inline.c (expand_call_inline): Check option variables.
25201 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25203 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25205 PR tree-optimization/84321
25206 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25207 handling. Also check whether the anti-range contains any values
25208 that satisfy the mask; switch to a VR_RANGE if not.
25210 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25213 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25215 2018-02-13 Martin Jambor <mjambor@suse.cz>
25218 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25219 of call statements, also set location of a load to a temporary.
25221 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25223 * config/rl78/rl78.c (add_vector_labels): New function.
25224 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25225 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25226 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25227 which checks that no arguments are passed.
25228 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25229 * doc/extend.texi: Documentation for the new attribute.
25231 2018-02-13 Andreas Schwab <schwab@suse.de>
25233 * config/riscv/linux.h (CPP_SPEC): Define.
25235 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25238 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25239 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25240 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25241 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25242 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25243 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25244 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25245 temporarily for AES and PCLMUL builtins.
25247 PR tree-optimization/84339
25248 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25249 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25252 PR middle-end/84309
25253 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25254 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25255 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25257 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25259 * omp-simd-clone.h: New file.
25260 * omp-simd-clone.c: Include omp-simd-clone.h.
25261 (expand_simd_clones): No longer static.
25262 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25263 cgraph.h and omp-simd-clone.h.
25264 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25265 (vect_recog_widen_shift_pattern): Formatting fix.
25266 (vect_pattern_recog_1): Don't check optab for calls.
25269 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25270 operands[2] into a REG before using gen_lowpart on it.
25272 2018-02-12 Jeff Law <law@redhat.com>
25275 * config/sh/sh.c (find_barrier): Consider a sibling call
25278 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25279 successfully back substituting a reg.
25281 2018-02-12 Richard Biener <rguenther@suse.de>
25283 PR tree-optimization/84037
25284 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25285 parameter, move visited init to caller.
25286 (vect_slp_analyze_operations): Separate cost from validity
25287 check, initialize visited once for all instances.
25288 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25290 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25292 (vect_model_promotion_demotion_cost): Likewise.
25293 (vectorizable_bswap): Guard cost modeling with !slp_node
25294 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25296 (vectorizable_call): Likewise.
25297 (vectorizable_conversion): Likewise.
25298 (vectorizable_assignment): Likewise.
25299 (vectorizable_shift): Likewise.
25300 (vectorizable_operation): Likewise.
25301 (vectorizable_store): Likewise.
25302 (vectorizable_load): Likewise.
25303 (vectorizable_condition): Likewise.
25304 (vectorizable_comparison): Likewise.
25306 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25309 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25310 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25311 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25313 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25315 PR middle-end/83665
25316 * params.def (inline-min-speedup): Increase from 8 to 15.
25317 (max-inline-insns-auto): Decrease from 40 to 30.
25318 * ipa-split.c (consider_split): Add some buffer for function to
25319 be considered inlining candidate.
25320 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25323 2018-02-12 Richard Biener <rguenther@suse.de>
25325 PR tree-optimization/84037
25326 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25327 matched stmts if we cannot swap the non-matched ones.
25329 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25331 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25332 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25333 _mm_maskz_scalef_round_ss): New intrinsics.
25334 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25335 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25336 __builtin_ia32_scalefss_round): Remove.
25337 (__builtin_ia32_scalefsd_mask_round,
25338 __builtin_ia32_scalefss_mask_round): New intrinsics.
25339 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25340 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25341 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25342 "<round_constraint>")): Changed to ...
25343 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25344 "<round_scalar_constraint>")): ... this.
25345 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25346 %0, %1, %2<round_op3>}"): Changed to ...
25347 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25348 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25349 %2<round_scalar_mask_op3>}"): ... this.
25350 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25352 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25354 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25355 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25356 (_mm_maskz_sqrt_round_ss): New intrinsics.
25357 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25358 (__builtin_ia32_sqrtsd_mask_round)
25359 (__builtin_ia32_sqrtss_mask_round): New builtins.
25360 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25361 (__builtin_ia32_sqrtss_round): Remove.
25362 (__builtin_ia32_sqrtsd_mask_round)
25363 (__builtin_ia32_sqrtss_mask_round): New builtins.
25364 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25365 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25366 ((match_operand:VF_128 1 "vector_operand"
25367 "xBm,<round_constraint>")): Changed to ...
25368 ((match_operand:VF_128 1 "vector_operand"
25369 "xBm,<round_scalar_constraint>")): ... this.
25370 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25371 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25372 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25373 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25374 %<iptr>1<round_scalar_mask_op3>}): ... this.
25375 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25376 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25378 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25381 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25382 Cast vec_cmpeq result to correct type.
25383 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25384 Cast vec_cmpgt result to correct type.
25386 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25388 * final.c (final_scan_insn_1): Renamed from...
25389 (final_scan_insn): ... this. New wrapper, to recover
25390 seen from the outermost call in recursive ones.
25391 * config/sparc/sparc.c (output_return): Drop seen from call.
25392 (output_sibcall): Likewise.
25393 * config/visium/visium.c (output_branch): Likewise.
25395 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25397 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25400 2018-02-10 Alan Modra <amodra@gmail.com>
25403 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25404 Specify LR as an input.
25406 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25409 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25410 remove_member_access_dummy_vars): New functions.
25411 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25412 lower_omp_1, execute_lower_omp): Use them.
25414 PR rtl-optimization/84308
25415 * shrink-wrap.c (spread_components): Release todo vector.
25417 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25419 PR rtl-optimization/57193
25420 * ira-color.c (struct allocno_color_data): Add member
25421 conflict_allocno_hard_prefs.
25422 (update_conflict_allocno_hard_prefs): New.
25423 (bucket_allocno_compare_func): Add a preference based on
25424 conflict_allocno_hard_prefs.
25425 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25426 (color_allocnos): Remove a dead code. Initiate
25427 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25429 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25432 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25433 constraint from =wa to wa. Avoid a subreg on the output operand,
25434 instead use a pseudo and subreg it in a move.
25435 (p9_xxbrd_<mode>): Changed to ...
25436 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25437 (p9_xxbrd_v2df): New expander.
25438 (p9_xxbrw_<mode>): Changed to ...
25439 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25440 (p9_xxbrw_v4sf): New expander.
25442 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25444 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25446 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25449 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25450 multiply in 32-bit mode.
25451 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25452 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25455 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25457 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25458 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25459 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25460 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25462 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25465 * dwarf2out.c (is_trivial_indirect_ref): New function.
25466 (dwarf2out_late_global_decl): Do not generate a location
25467 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25468 and that are not defined in the current unit.
25470 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25472 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25473 instead of a libcall for UNORDERED.
25475 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25478 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25479 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25481 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25484 * config/s390/s390.c (s390_set_current_function): Invoke
25485 s390_indirect_branch_settings also if fndecl didn't change.
25487 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25489 * config/rs6000/rs6000.md (blockage): Set length to zero.
25491 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25493 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25495 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25498 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25499 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25503 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25504 PARALLEL incoming that failed vt_get_decl_and_offset check.
25506 PR middle-end/84237
25507 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25508 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25510 (get_variable_section): For decls in named .bss* sections pass true as
25511 second argument to bss_initializer_p.
25513 2018-02-09 Marek Polacek <polacek@redhat.com>
25514 Jakub Jelinek <jakub@redhat.com>
25517 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25518 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25519 Sync some changes from cxx_fold_indirect_ref.
25521 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25523 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25525 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25526 (BLOCK_INLINE_ENTRY_LABEL): New.
25527 (dwarf2out_var_location): Disregard inline entry markers.
25528 (inline_entry_data): New struct.
25529 (inline_entry_data_hasher): New hashtable type.
25530 (inline_entry_data_hasher::hash): New.
25531 (inline_entry_data_hasher::equal): New.
25532 (inline_entry_data_table): New variable.
25533 (add_high_low_attributes): Add DW_AT_entry_pc and
25534 DW_AT_GNU_entry_view attributes if a pending entry is found
25535 in inline_entry_data_table. Add old entry_pc attribute only
25536 if debug nonbinding markers are disabled.
25537 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25538 markers are enabled.
25539 (block_within_block_p, dwarf2out_inline_entry): New.
25540 (dwarf2out_finish): Check that no entries remained in
25541 inline_entry_data_table.
25542 * final.c (reemit_insn_block_notes): Handle inline entry notes.
25543 (final_scan_insn, notice_source_line): Likewise.
25544 (rest_of_clean_state): Skip inline entry markers.
25545 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25547 * gimple.c (gimple_build_debug_inline_entry): New.
25548 * gimple.h (enum gimple_debug_subcode): Add
25549 GIMPLE_DEBUG_INLINE_ENTRY.
25550 (gimple_build_debug_inline_entry): Declare.
25551 (gimple_debug_inline_entry_p): New.
25552 (gimple_debug_nonbind_marker_p): Adjust.
25553 * insn-notes.def (INLINE_ENTRY): New.
25554 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25555 inline entry marker notes.
25556 (print_insn): Likewise.
25557 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25558 (INSN_DEBUG_MARKER_KIND): Likewise.
25559 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25560 * tree-inline.c (expand_call_inline): Build and insert
25561 debug_inline_entry stmt.
25562 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25563 inline entry blocks early, if nonbind markers are enabled.
25564 (dump_scope_block): Dump fragment info.
25565 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25566 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25567 (gimple_build_debug_inline_entry): New.
25568 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25569 Enable/disable inline entry points too.
25570 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25571 (DEBUG_INSN): Describe inline entry markers.
25573 * common.opt (gvariable-location-views): New.
25574 (gvariable-location-views=incompat5): New.
25575 * config.in: Rebuilt.
25576 * configure: Rebuilt.
25577 * configure.ac: Test assembler for view support.
25578 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25579 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25580 * dwarf2out.c (var_loc_view): New typedef.
25581 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25582 (dwarf2out_locviews_in_attribute): New.
25583 (dwarf2out_locviews_in_loclist): New.
25584 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25585 (enum dw_line_info_opcode): Add LI_adv_address.
25586 (struct dw_line_info_table): Add view.
25587 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25588 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25589 (zero_view_p): New variable.
25590 (ZERO_VIEW_P): New macro.
25591 (output_asm_line_debug_info): New.
25592 (struct var_loc_node): Add view.
25593 (add_AT_view_list, AT_loc_list): New.
25594 (add_var_loc_to_decl): Add view param. Test it against last.
25595 (new_loc_list): Add view params. Record them.
25596 (AT_loc_list_ptr): Handle loc and view lists.
25597 (view_list_to_loc_list_val_node): New.
25598 (print_dw_val): Handle dw_val_class_view_list.
25599 (size_of_die): Likewise.
25600 (value_format): Likewise.
25601 (loc_list_has_views): New.
25602 (gen_llsym): Set vl_symbol too.
25603 (maybe_gen_llsym, skip_loc_list_entry): New.
25604 (dwarf2out_maybe_output_loclist_view_pair): New.
25605 (output_loc_list): Output view list or entries too.
25606 (output_view_list_offset): New.
25607 (output_die): Handle dw_val_class_view_list.
25608 (output_dwarf_version): New.
25609 (output_compilation_unit_header): Use it.
25610 (output_skeleton_debug_sections): Likewise.
25611 (output_rnglists, output_line_info): Likewise.
25612 (output_pubnames, output_aranges): Update version comments.
25613 (output_one_line_info_table): Output view numbers in asm comments.
25614 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25615 Call maybe_gen_llsym.
25616 (loc_list_from_tree_1): Adjust.
25617 (add_AT_location_description): Create view list attribute if
25618 needed, check it's absent otherwise.
25619 (convert_cfa_to_fb_loc_list): Adjust.
25620 (maybe_emit_file): Call output_asm_line_debug_info for test.
25621 (dwarf2out_var_location): Reset views as needed. Precompute
25622 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25623 attribute. Set view.
25624 (new_line_info_table): Reset next view.
25625 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25626 (dwarf2out_source_line): Likewise. Output view resets and labels to
25627 the assembler, or select appropriate line info opcodes.
25628 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25629 (optimize_string_length): Catch it. Adjust.
25630 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25631 dw_val_class_view_list, and remove it if no longer needed.
25632 (hash_loc_list): Hash view numbers.
25633 (loc_list_hasher::equal): Compare them.
25634 (optimize_location_lists): Check whether a view list symbol is
25635 needed, and whether the locview attribute is present, and
25636 whether they match. Remove the locview attribute if no longer
25638 (index_location_lists): Call skip_loc_list_entry for test.
25639 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25640 Use output_dwarf_version.
25641 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25642 (struct dw_val_node): Add val_view_list.
25643 * final.c (SEEN_NEXT_VIEW): New.
25644 (set_next_view_needed): New.
25645 (clear_next_view_needed): New.
25646 (maybe_output_next_view): New.
25647 (final_start_function): Rename to...
25648 (final_start_function_1): ... this. Take pointer to FIRST,
25649 add SEEN parameter. Emit param bindings in the initial view.
25650 (final_start_function): Reintroduce SEEN-less interface.
25651 (final): Rename to...
25652 (final_1): ... this. Take SEEN parameter. Output final pending
25653 next view at the end.
25654 (final): Reintroduce seen-less interface.
25655 (final_scan_insn): Output pending next view before switching
25656 sections or ending a block. Mark the next view as needed when
25657 outputting variable locations. Notify debug backend of section
25658 changes, and of location view changes.
25659 (rest_of_handle_final): Adjust.
25660 * toplev.c (process_options): Autodetect value for debug variable
25661 location views option. Warn on incompat5 without -gdwarf-5.
25662 * doc/invoke.texi (gvariable-location-views): New.
25663 (gvariable-location-views=incompat5): New.
25664 (gno-variable-location-views): New.
25666 2018-02-08 David Malcolm <dmalcolm@redhat.com>
25668 PR tree-optimization/84136
25669 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25670 that the result of find_edge is non-NULL.
25672 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25675 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25676 storing integer register in SImode. Fix cost of 256 and 512
25677 byte aligned SSE register store.
25679 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25681 * config/i386/i386.c (ix86_multiplication_cost): Fix
25682 multiplication cost for TARGET_AVX512DQ.
25684 2018-02-08 Marek Polacek <polacek@redhat.com>
25686 PR tree-optimization/84238
25687 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25690 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25692 PR tree-optimization/84265
25693 * tree-vect-stmts.c (vectorizable_store): Don't treat
25694 VMAT_CONTIGUOUS accesses as grouped.
25695 (vectorizable_load): Likewise.
25697 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25699 PR tree-optimization/81635
25700 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25701 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25702 (test_round_for_mask): New functions.
25703 (wide_int_cc_tests): Call test_round_for_mask.
25704 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25705 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25706 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25707 range returned by get_range_info.
25709 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25712 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25713 * symtab.c: Include builtins.h
25714 (symtab_node::output_to_lto_symbol_table_p): Move here
25715 from lto-streamer-out.c:output_symbol_p.
25716 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25717 (output_symbol_p): Move all logic to symtab.c
25718 (produce_symtab): Update.
25720 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25722 * config/s390/s390-opts.h (enum indirect_branch): Define.
25723 * config/s390/s390-protos.h (s390_return_addr_from_memory)
25724 (s390_indirect_branch_via_thunk)
25725 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25726 (enum s390_indirect_branch_type): Define.
25727 * config/s390/s390.c (struct s390_frame_layout, struct
25728 machine_function): Remove.
25729 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25730 (indirect_branch_table_label_no, indirect_branch_table_name):
25732 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25733 (enum s390_indirect_branch_option): Define.
25734 (s390_return_addr_from_memory): New function.
25735 (s390_handle_string_attribute): New function.
25736 (s390_attribute_table): Add new attribute handler.
25737 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25738 (s390_indirect_branch_via_thunk): New function.
25739 (s390_indirect_branch_via_inline_thunk): New function.
25740 (s390_function_ok_for_sibcall): When jumping via thunk disallow
25741 sibling call optimization for non z10 compiles.
25742 (s390_emit_call): Force indirect branch target to be a single
25743 register. Add r1 clobber for non-z10 compiles.
25744 (s390_emit_epilogue): Emit return jump via return_use expander.
25745 (s390_reorg): Handle JUMP_INSNs as execute targets.
25746 (s390_option_override_internal): Perform validity checks for the
25747 new command line options.
25748 (s390_indirect_branch_attrvalue): New function.
25749 (s390_indirect_branch_settings): New function.
25750 (s390_set_current_function): Invoke s390_indirect_branch_settings.
25751 (s390_output_indirect_thunk_function): New function.
25752 (s390_code_end): Implement target hook.
25753 (s390_case_values_threshold): Implement target hook.
25754 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25756 * config/s390/s390.h (struct s390_frame_layout)
25757 (struct machine_function): Move here from s390.c.
25758 (TARGET_INDIRECT_BRANCH_NOBP_RET)
25759 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25760 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25761 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25762 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25763 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25764 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25765 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25766 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25767 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25768 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25769 (mnemonic attribute): Add values which aren't recognized
25771 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25772 pattern for branch conversion. Fix mnemonic attribute.
25773 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25774 indirect branch via thunk if requested.
25775 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25776 ("*indirect_jump"): Disable for branch conversion using out of
25778 ("indirect_jump_via_thunk<mode>_z10")
25779 ("indirect_jump_via_thunk<mode>")
25780 ("indirect_jump_via_inlinethunk<mode>_z10")
25781 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25782 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25783 ("casesi_jump_via_inlinethunk<mode>_z10")
25784 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25785 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25786 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25787 ("*indirect2_jump"): Disable for branch conversion.
25788 ("casesi_jump"): Turn into expander and expand patterns for branch
25790 ("return_use"): New expander.
25791 ("*return"): Emit return via thunk and rename it to ...
25792 ("*return<mode>"): ... this one.
25793 * config/s390/s390.opt: Add new options and and enum for the
25796 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25798 * lra-constraints.c (match_reload): Unconditionally use
25799 gen_lowpart_SUBREG, rather than selecting between that
25800 and equivalent gen_rtx_SUBREG code.
25802 2018-02-08 Richard Biener <rguenther@suse.de>
25804 PR tree-optimization/84233
25805 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25806 changed flag instead of boguously re-using phi_inserted.
25808 2018-02-08 Martin Jambor <mjambor@suse.cz>
25810 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25811 static local variables.
25813 2018-02-08 Richard Biener <rguenther@suse.de>
25815 PR tree-optimization/84278
25816 * tree-vect-stmts.c (vectorizable_store): When looking for
25817 smaller vector types to perform grouped strided loads/stores
25818 make sure the mode is supported by the target.
25819 (vectorizable_load): Likewise.
25821 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25823 * config/aarch64/aarch64.c (aarch64_components_for_bb):
25824 Increase LDP/STP opportunities by adding adjacent callee-saves.
25826 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25828 PR rtl-optimization/84068
25829 PR rtl-optimization/83459
25830 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25832 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
25834 PR tree-optimization/84224
25835 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25836 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25837 non-zero arguments.
25839 2018-02-07 Iain Sandoe <iain@codesourcery.com>
25842 * config/rs6000/altivec.md (*restore_world): Remove LR use.
25843 * config/rs6000/predicates.md (restore_world_operation): Adjust op
25844 count, remove one USE.
25846 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
25848 * doc/install.texi (Configuration): Document the
25849 --with-long-double-format={ibm,ieee} PowerPC configuration
25853 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25854 Convert from define_expand to be define_insn_and_split. Rework
25855 float/double/_Float128 conversions to QI/HI/SImode to work with
25856 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
25857 conversions to QI/HImode types did a store and then a load to
25858 truncate the value. For conversions to VSX registers, don't split
25859 the insn, instead emit the code directly. Use the code iterator
25860 any_fix to combine signed and unsigned conversions.
25861 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25862 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25863 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25864 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25865 (fix_<mode>di2_hw): Likewise.
25866 (fixuns_<mode>di2_hw): Likewise.
25867 (fix_<mode>si2_hw): Likewise.
25868 (fixuns_<mode>si2_hw): Likewise.
25869 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25870 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25871 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25872 fix<uns>_trunc<SFDF:mode>si2_p8.
25873 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25874 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25875 (fix<uns>_<mode>_mem): Likewise.
25876 (fctiw<u>z_<mode>_mem): Likewise.
25877 (fix<uns>_<mode>_mem): Likewise.
25878 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25879 the register allocator from doing a direct move to the GPRs to do
25880 a store, and instead use the ISA 3.0 store byte/half-word from
25881 vector register instruction. For IEEE 128-bit floating point,
25882 also optimize stores of 32-bit ints.
25883 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25885 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25887 * genextract.c (push_pathstr_operand): New function to support
25889 (walk_rtx): Call push_pathstr_operand.
25890 (print_path): Support [a-zA-Z].
25892 2018-02-07 Richard Biener <rguenther@suse.de>
25894 PR tree-optimization/84037
25895 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25896 (cse_and_gimplify_to_preheader): Declare.
25897 (vect_get_place_in_interleaving_chain): Likewise.
25898 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25900 (_loop_vec_info::~_loop_vec_info): Delete it.
25901 (cse_and_gimplify_to_preheader): New function.
25902 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25903 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25904 (vectorizable_load): Likewise. For grouped stores always base
25905 the IV on the first element.
25906 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25907 condition before gimplifying.
25909 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25911 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25912 *DIV_EXPR and *MOD_EXPR.
25914 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25917 * config/i386/i386.c (ix86_option_override_internal): Mask out
25918 the CF_SET bit when checking -fcf-protection.
25920 2018-02-07 Tom de Vries <tom@codesourcery.com>
25923 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25926 2018-02-07 Richard Biener <rguenther@suse.de>
25928 PR tree-optimization/84204
25929 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25932 PR tree-optimization/84205
25933 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25934 special-case isl_ast_op_zdiv_r.
25936 PR tree-optimization/84223
25937 * graphite-scop-detection.c (gather_bbs::before_dom_children):
25938 Only add conditions from within the region.
25939 (gather_bbs::after_dom_children): Adjust.
25941 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
25944 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25945 * config/avr/avr.md: Only post-reload split REG-REG moves if
25946 either register is GENERAL_REG_P.
25948 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25950 PR tree-optimization/84235
25951 * tree-ssa-scopedtables.c
25952 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25953 if the subtraction is performed in floating point type where NaNs are
25954 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25955 build 1. Formatting fix.
25957 2018-02-06 Jakub Jelinek <jakub@redhat.com>
25960 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25961 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25962 and skip it regardless of bb boundaries. Use CALL_P macro,
25963 don't test INSN_P (insn) together with CALL_P or JUMP_P check
25964 unnecessarily, formatting fix.
25966 2018-02-06 Michael Collison <michael.collison@arm.com>
25968 * config/arm/thumb2.md:
25969 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25970 (*thumb_mov_notscc): Ditto.
25972 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
25975 * config/rs6000/rs6000.md (su code attribute): Use "u" for
25976 unsigned_fix, not "s".
25978 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25980 * configure.ac (gcc_fn_eh_frame_ro): New function.
25981 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25982 correct .eh_frame permissions.
25983 * configure: Regenerate.
25985 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
25987 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25988 irrelevant options.
25990 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25992 * config/rs6000/rs6000.c (rs6000_option_override_internal):
25993 Display warning message for -mno-speculate-indirect-jumps.
25995 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
25997 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25999 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26001 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26003 PR tree-optimization/84225
26004 * tree-eh.c (find_trapping_overflow): Only call
26005 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26007 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26010 * config/i386/i386.c: Reimplement the check of possible options
26011 -mibt/-mshstk conbination. Change error messages.
26012 * doc/invoke.texi: Fix a typo: remove extra '='.
26014 2018-02-06 Marek Polacek <polacek@redhat.com>
26016 PR tree-optimization/84228
26017 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26019 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26022 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26023 emitted arch directives.
26024 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26025 __ARM_FEATURE_COPROC before changing architectures.
26027 2018-02-06 Richard Biener <rguenther@suse.de>
26029 * config/i386/i386.c (print_reg): Fix typo.
26030 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26032 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26034 * configure: Regenerate.
26036 2018-02-05 Martin Sebor <msebor@redhat.com>
26038 PR tree-optimization/83369
26039 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26042 2018-02-05 Martin Liska <mliska@suse.cz>
26044 * doc/invoke.texi: Cherry-pick upstream r323995.
26046 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26048 * ira.c (ira_init_register_move_cost): Adjust comment.
26050 2018-02-05 Martin Liska <mliska@suse.cz>
26052 PR gcov-profile/84137
26053 * doc/gcov.texi: Fix typo in documentation.
26055 2018-02-05 Martin Liska <mliska@suse.cz>
26057 PR gcov-profile/83879
26058 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26059 using dlopen functionality.
26061 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26063 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26064 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26065 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26066 _mm_maskz_range_round_ss): New intrinsics.
26067 (__builtin_ia32_rangesd128_round)
26068 (__builtin_ia32_rangess128_round): Remove.
26069 (__builtin_ia32_rangesd128_mask_round,
26070 __builtin_ia32_rangess128_mask_round): New builtins.
26071 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26072 __builtin_ia32_rangess128_round): Remove.
26073 (__builtin_ia32_rangesd128_mask_round,
26074 __builtin_ia32_rangess128_mask_round): New builtins.
26075 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26076 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26077 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26078 "<round_saeonly_constraint>")): Changed to ...
26079 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26080 "<round_saeonly_scalar_constraint>")): ... this.
26081 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26082 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26083 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26084 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26085 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26087 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26089 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26091 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26092 Remove all values except native, 8540 and 8548.
26094 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26096 * config/i386/i386.c (ix86_output_function_return): Pass
26097 INVALID_REGNUM, instead of -1, as invalid register number to
26098 indirect_thunk_name and output_indirect_thunk.
26100 2018-02-02 Julia Koval <julia.koval@intel.com>
26102 * config.gcc: Add -march=icelake.
26103 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26104 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26105 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26106 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26107 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26108 (processor_target_table): Add icelake.
26109 (ix86_option_override_internal): Handle new PTAs.
26110 (get_builtin_code_for_version): Handle icelake.
26111 (M_INTEL_COREI7_ICELAKE): New.
26112 (fold_builtin_cpu): Handle icelake.
26113 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26114 * doc/invoke.texi: Add -march=icelake.
26116 2018-02-02 Julia Koval <julia.koval@intel.com>
26118 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26119 to wide_int_bitmask.
26120 * wide-int-bitmask.h: New.
26122 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26125 * config/i386/i386.md: Replace Pmode with word_mode in
26126 builtin_setjmp_setup and builtin_longjmp to support x32.
26128 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26132 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26134 (rs6000_supported_cpu_names): New static variable.
26135 (linux_cpu_translation_table): Likewise.
26136 (elf_platform) <cpu>: Define new static variable and use it.
26137 Translate kernel AT_PLATFORM name to canonical name if needed.
26138 Error if platform name is unknown.
26140 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26143 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26145 2018-02-01 Jeff Law <law@redhat.com>
26148 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26149 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26150 the scratch if RELEASE_VIA_POP is false.
26151 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26152 If we have to save a temporary register, decrement SIZE appropriately.
26153 Pass new arguments to release_scratch_register_on_entry.
26154 (ix86_adjust_stack_and_probe): Likewise.
26155 (ix86_emit_probe_stack_range): Pass new arguments to
26156 release_scratch_register_on_entry.
26158 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26160 PR rtl-optimization/84157
26161 * combine.c (change_zero_ext): Use REG_P predicate in
26162 front of HARD_REGISTER_P predicate.
26164 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26166 * config/avr/avr.c (avr_option_override): Move disabling of
26167 -fdelete-null-pointer-checks to...
26168 * common/config/avr/avr-common.c (avr_option_optimization_table):
26171 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26173 PR tree-optimization/81635
26174 * tree-data-ref.c (split_constant_offset_1): For types that
26175 wrap on overflow, try to use range info to prove that wrapping
26178 2018-02-01 Renlin Li <renlin.li@arm.com>
26181 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26182 TAILCALL_ADDR_REGS.
26183 (aarch64_register_move_cost): Likewise.
26184 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26185 TAILCALL_ADDR_REGS.
26186 (REG_CLASS_NAMES): Likewise.
26187 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26188 TAILCALL_ADDR_REGS. Remove IP registers.
26189 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26191 2018-02-01 Richard Biener <rguenther@suse.de>
26193 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26194 for specifying RPO order and allow NULL for that.
26195 * domwalk.c (dom_walker::dom_walker): Likewise.
26196 (dom_walker::walk): Handle NULL RPO order.
26197 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26199 (rewrite_update_dom_walker): Likewise.
26200 (mark_def_dom_walker): Likewise.
26202 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26204 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26205 (aarch64_maybe_expand_sve_subreg_move): Declare.
26206 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26207 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26209 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26210 that are semantically a reverse operation.
26211 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26212 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26213 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26215 (aarch64_can_change_mode_class): For big-endian, forbid changes
26216 between two SVE modes if they have different element sizes.
26218 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26220 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26221 the TImode handling for big-endian targets.
26223 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26225 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26226 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26228 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26229 Remove BSWAP handing for big-endian targets and use the form of
26230 LD1RQ appropariate for the mode.
26232 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26234 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26235 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26236 duplicated element.
26238 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26241 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26242 check for operands that need to go through aarch64_sve_reload_be.
26244 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26246 PR tree-optimization/81661
26247 PR tree-optimization/84117
26248 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26249 * tree-eh.c: Include gimplify.h.
26250 (find_trapping_overflow, replace_trapping_overflow,
26251 rewrite_to_non_trapping_overflow): New functions.
26252 * tree-vect-loop.c: Include tree-eh.h.
26253 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26254 * tree-data-ref.c: Include tree-eh.h.
26255 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26257 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26259 PR rtl-optimization/84123
26260 * combine.c (change_zero_ext): Check if hard register satisfies
26261 can_change_dest_mode before calling gen_lowpart_SUBREG.
26263 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26266 * ira.c (ira_init_register_move_cost): Remove assert.
26268 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26270 PR rtl-optimization/84071
26271 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26272 * doc/tm.texi: Regenerate.
26274 2018-01-31 Richard Biener <rguenther@suse.de>
26276 PR tree-optimization/84132
26277 * tree-data-ref.c (analyze_miv_subscript): Properly
26278 check whether evolution_function_is_affine_multivariate_p
26279 before calling gcd_of_steps_may_divide_p.
26281 2018-01-31 Julia Koval <julia.koval@intel.com>
26284 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26285 * config/i386/i386.md (rdpid_rex64) New.
26286 (rdpid): Make 32bit only.
26288 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26291 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26292 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26294 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26297 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26299 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26301 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26303 PR rtl-optimization/84071
26304 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26305 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26307 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26309 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26310 (arc_attribute_table): Add 'aux' attribute.
26311 (arc_in_small_data_p): Consider aux like variables.
26312 (arc_is_aux_reg_p): New function.
26313 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26314 (arc_get_aux_arg): New function.
26315 (prepare_move_operands): Handle aux-register access.
26316 (arc_handle_aux_attribute): New function.
26317 * doc/extend.texi (ARC Variable attributes): Add subsection.
26319 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26321 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26322 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26323 (arc_attribute_table): Add 'uncached' attribute.
26324 (arc_print_operand): Print '.di' flag for uncached memory
26326 (arc_in_small_data_p): Do not consider for small data the uncached
26328 (arc_is_uncached_mem_p): New function.
26329 * config/arc/predicates.md (compact_store_memory_operand): Check
26330 for uncached memory accesses.
26331 (nonvol_nonimm_operand): Likewise.
26332 * doc/extend.texi (ARC Type Attribute): New subsection.
26334 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26337 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26338 falign-loops=): Add Optimization flag.
26340 2018-01-30 Jeff Law <law@redhat.com>
26343 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26344 INT_REGISTERS_SAVED. Check it prior to calling
26345 get_scratch_register_on_entry.
26346 (ix86_adjust_stack_and_probe): Similarly.
26347 (ix86_emit_probe_stack_range): Similarly.
26348 (ix86_expand_prologue): Corresponding changes.
26350 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26353 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26354 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26356 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26359 * lra-constraints.c (curr_insn_transform): Process AND in the
26362 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26364 PR rtl-optimization/83986
26365 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26366 dependence against last_pending_memory_flush in addition to
26367 pending_jump_insns.
26369 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26371 PR tree-optimization/81611
26372 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26375 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26378 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26381 2018-01-30 Richard Biener <rguenther@suse.de>
26382 Jakub Jelinek <jakub@redhat.com>
26384 PR tree-optimization/84111
26385 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26386 inner loops added during recursion, as they don't have up-to-date
26389 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26392 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26393 (can_inline_edge_by_limits_p): ... here.
26394 (can_early_inline_edge_p, check_callers,
26395 update_caller_keys, update_callee_keys, recursive_inlining,
26396 add_new_edges_to_heap, speculation_useful_p,
26397 inline_small_functions,
26398 inline_small_functions, flatten_function,
26399 inline_to_all_callers_1): Update.
26401 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26403 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26406 2018-01-30 Richard Biener <rguenther@suse.de>
26408 PR tree-optimization/83008
26409 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26410 invariant and constant vector uses in stmts when they need
26411 more than one stmt.
26413 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26416 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26417 * configure: Regenerate.
26419 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26421 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26423 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26424 Use gen_rtx_REG rather than gen_lowpart.
26426 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26428 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26429 rather than 0 when creating partial subregs.
26431 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26433 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26436 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26439 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26440 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26441 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26442 flags. This restores the settings used before the 2017-07-24.
26443 Turning off pre increment/decrement/modify allows IVOPTS to
26444 optimize DF/SF loops where the index is an int.
26446 2018-01-29 Richard Biener <rguenther@suse.de>
26447 Kelvin Nilsen <kelvin@gcc.gnu.org>
26450 * tree-vect-stmts.c (vectorizable_call): Don't call
26451 targetm.vectorize_builtin_md_vectorized_function if callee is
26454 2018-01-22 Carl Love <cel@us.ibm.com>
26456 * doc/extend.tex: Fix typo in second arg in
26457 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26459 2018-01-29 Richard Biener <rguenther@suse.de>
26461 PR tree-optimization/84086
26462 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26463 (flush_ssaname_freelist): When SSA names were released reset
26464 the SCEV hash table.
26466 2018-01-29 Richard Biener <rguenther@suse.de>
26468 PR tree-optimization/84057
26469 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26470 removed paths when removing edges.
26472 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26474 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26475 -mfunction-return=@var{choice}.
26477 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26479 PR diagnostic/84034
26480 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26481 Handle CR like TAB.
26482 (layout::print_source_line): Likewise.
26483 (test_get_line_width_without_trailing_whitespace): Add test cases.
26485 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26487 PR middle-end/84040
26488 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26491 2018-01-26 Jim Wilson <jimw@sifive.com>
26493 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26495 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26498 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26500 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26501 and CMP + SUB-immediate -> SUBS.
26503 2018-01-26 Martin Sebor <msebor@redhat.com>
26505 PR tree-optimization/83896
26506 * tree-ssa-strlen.c (get_string_len): Rename...
26507 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26508 Avoid assuming length is constant.
26509 (handle_char_store): Use HOST_WIDE_INT for string length.
26511 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26514 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26515 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26517 2018-01-26 Richard Biener <rguenther@suse.de>
26519 PR rtl-optimization/84003
26520 * dse.c (record_store): Only record redundant stores when
26521 the earlier store aliases at least all accesses the later one does.
26523 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26525 PR rtl-optimization/83985
26526 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26527 REG_CFA_RESTORE insns.
26528 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26529 REG_CFA_RESTORE insns here.
26532 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26533 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26535 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26537 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26538 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26539 (arc_init): Likewise.
26540 (arc_override_options): Likewise.
26541 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26543 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26545 * config/arc/arc.h (TARGET_DBNZ): Define.
26546 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26547 properly set the tune attribute.
26548 (dbnz): Use TARGET_DBNZ guard.
26549 * config/arc/arc.opt (mtune): Add core3 option.
26551 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26553 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26554 recognize new pic like addresses.
26555 (arc_delegitimize_address): Clean up.
26557 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26559 * config/arc/arc-arches.def: Option mrf16 valid for all
26561 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26562 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26563 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26564 * config/arc/arc-tables.opt: Regenerate.
26565 * config/arc/arc.c (arc_conditional_register_usage): Handle
26566 reduced register file case.
26567 (arc_file_start): Set must have build attributes.
26568 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26569 mrf16 option value.
26570 * config/arc/arc.opt (mrf16): Add new option.
26571 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26572 * config/arc/genmultilib.awk: Handle new mrf16 option.
26573 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26574 * config/arc/t-multilib: Regenerate.
26575 * doc/invoke.texi (ARC Options): Document mrf16 option.
26577 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26579 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26580 * config/arc/arc.c (arc_handle_secure_attribute): New function.
26581 (arc_attribute_table): Add 'secure_call' attribute.
26582 (arc_print_operand): Print secure call operand.
26583 (arc_function_ok_for_sibcall): Don't optimize tail calls when
26585 (arc_is_secure_call_p): New function. * config/arc/arc.md
26586 (call_i): Add support for sjli instruction.
26587 (call_value_i): Likewise.
26588 * config/arc/constraints.md (Csc): New constraint.
26590 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26591 John Eric Martin <John.Martin@emmicro-us.com>
26593 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26594 * config/arc/arc.c (_arc_jli_section): New struct.
26595 (arc_jli_section): New type.
26596 (rc_jli_sections): New static variable.
26597 (arc_handle_jli_attribute): New function.
26598 (arc_attribute_table): Add jli_always and jli_fixed attribute.
26599 (arc_file_end): New function.
26600 (TARGET_ASM_FILE_END): Define.
26601 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26602 (arc_add_jli_section): New function.
26603 (jli_call_scan): Likewise.
26604 (arc_reorg): Call jli_call_scan.
26605 (arc_output_addsi): Remove 'S' from printing asm operand.
26606 (arc_is_jli_call_p): New function.
26607 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26609 (movhi_insn): Likewise.
26610 (movsi_insn): Likewise.
26611 (movsi_set_cc_insn): Likewise.
26612 (loadqi_update): Likewise.
26613 (load_zeroextendqisi_update): Likewise.
26614 (load_signextendqisi_update): Likewise.
26615 (loadhi_update): Likewise.
26616 (load_zeroextendhisi_update): Likewise.
26617 (load_signextendhisi_update): Likewise.
26618 (loadsi_update): Likewise.
26619 (loadsf_update): Likewise.
26620 (movsicc_insn): Likewise.
26621 (bset_insn): Likewise.
26622 (bxor_insn): Likewise.
26623 (bclr_insn): Likewise.
26624 (bmsk_insn): Likewise.
26625 (bicsi3_insn): Likewise.
26626 (cmpsi_cc_c_insn): Likewise.
26627 (movsi_ne): Likewise.
26628 (movsi_cond_exec): Likewise.
26629 (clrsbsi2): Likewise.
26630 (norm_f): Likewise.
26640 (call_i): Remove 'S' asm letter, add jli instruction.
26641 (call_value_i): Likewise.
26642 * config/arc/arc.op (mjli-always): New option.
26643 * config/arc/constraints.md (Cji): New constraint.
26644 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26646 (subsf3_fpx): Likewise.
26647 (mulsf3_fpx): Likewise.
26648 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26650 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26651 function attrbutes.
26652 * doc/invoke.texi (ARC): Document mjli-always option.
26654 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26656 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26657 avoid addition with 0 and use incw and decw where possible.
26659 2018-01-26 Richard Biener <rguenther@suse.de>
26661 PR tree-optimization/81082
26662 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26663 association if it requires casting to unsigned.
26664 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26665 from fold_plusminus_mult_expr to catch important cases late when
26666 range info is available.
26668 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26670 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26671 * configure.ac (hidden_linkonce): New test.
26672 * configure: Regenerate.
26673 * config.in: Regenerate.
26675 2018-01-26 Julia Koval <julia.koval@intel.com>
26677 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26678 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26679 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26680 _mm_mask_bitshuffle_epi64_mask): Fix type.
26681 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26682 USI_FTYPE_V4DI_V4DI_USI): Remove.
26683 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26684 __builtin_ia32_vpshufbitqmb256_mask,
26685 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26686 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26687 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26689 2018-01-26 Alan Modra <amodra@gmail.com>
26692 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26693 UNSPEC_VBPERMQ. Sort other unspecs.
26695 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
26697 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26699 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
26701 PR middle-end/83055
26702 * predict.c (drop_profile): Do not push/pop cfun; update also
26704 (handle_missing_profiles): Fix logic looking for zero profiles.
26706 2018-01-25 Jakub Jelinek <jakub@redhat.com>
26708 PR middle-end/83977
26709 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26710 on functions with #pragma omp declare simd or functions with simd
26712 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26713 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26714 Remove trailing \n from warning_at calls.
26716 2018-01-25 Tom de Vries <tom@codesourcery.com>
26719 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26720 for neutered workers.
26722 2018-01-24 Joseph Myers <joseph@codesourcery.com>
26725 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26726 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26728 2018-01-24 Jeff Law <law@redhat.com>
26731 * i386.c (get_probe_interval): Move to earlier point.
26732 (ix86_compute_frame_layout): If -fstack-clash-protection and
26733 the frame is larger than the probe interval, then use pushes
26734 to save registers rather than reg->mem moves.
26735 (ix86_expand_prologue): Remove conditional for int_registers_saved
26738 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
26741 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26742 min/max for never referenced object.
26744 2018-01-24 Jakub Jelinek <jakub@redhat.com>
26746 PR middle-end/83977
26747 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26749 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26750 attributes from DECL_ATTRIBUTES (decl) without affecting
26751 DECL_ATTRIBUTES (current_function_decl).
26752 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26753 functions with non-NULL DECL_ABSTRACT_ORIGIN.
26755 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
26757 PR tree-optimization/83979
26758 * fold-const.c (fold_comparison): Use constant_boolean_node
26759 instead of boolean_{true,false}_node.
26761 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
26763 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26766 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26768 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26769 Simplify the clause that sets the length attribute.
26770 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26771 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26772 clause that sets the length attribute.
26773 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26775 2018-01-24 Tom de Vries <tom@codesourcery.com>
26778 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26779 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26780 Add strict parameter.
26781 (prevent_branch_around_nothing): Insert dummy insn between branch to
26782 label and label with no ptx insn inbetween.
26783 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26785 2018-01-24 Tom de Vries <tom@codesourcery.com>
26788 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26789 for neutered threads in warp.
26790 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26792 2018-01-24 Richard Biener <rguenther@suse.de>
26794 PR tree-optimization/83176
26795 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26798 2018-01-24 Richard Biener <rguenther@suse.de>
26800 PR tree-optimization/82819
26801 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26802 code generating pluses that are no-ops in the target precision.
26804 2018-01-24 Richard Biener <rguenther@suse.de>
26806 PR middle-end/84000
26807 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26809 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26811 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26812 to merge probabilities.
26813 * predict.c (probably_never_executed): Also mark as cold functions
26814 with global 0 profile and guessed local profile.
26815 * profile-count.c (profile_probability::combine_with_count): New
26817 * profile-count.h (profile_probability::operator*,
26818 profile_probability::operator*=, profile_probability::operator/,
26819 profile_probability::operator/=): Reduce precision to adjusted
26820 and set value to guessed on contradictory divisions.
26821 (profile_probability::combine_with_freq): Remove.
26822 (profile_probability::combine_wiht_count): Declare.
26823 (profile_count::force_nonzero):: Set to adjusted.
26824 (profile_count::probability_in):: Set quality to adjusted.
26825 * tree-ssa-tail-merge.c (replace_block_by): Use
26826 combine_with_count.
26828 2018-01-23 Andrew Waterman <andrew@sifive.com>
26829 Jim Wilson <jimw@sifive.com>
26831 * config/riscv/riscv.c (riscv_stack_boundary): New.
26832 (riscv_option_override): Set riscv_stack_boundary. Handle
26833 riscv_preferred_stack_boundary_arg.
26834 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26835 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26836 (STACK_BOUNDARY): Set to riscv_stack_boundary.
26837 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26838 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26839 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26841 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
26844 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26845 of struct ix86_frame.
26846 (ix86_expand_epilogue): Likewise. Add a local variable for
26847 the reg_save_offset field in struct ix86_frame.
26849 2018-01-23 Bin Cheng <bin.cheng@arm.com>
26851 PR tree-optimization/82604
26852 * tree-loop-distribution.c (enum partition_kind): New enum item
26853 PKIND_PARTIAL_MEMSET.
26854 (partition_builtin_p): Support above new enum item.
26855 (generate_code_for_partition): Ditto.
26856 (compute_access_range): Differentiate cases that equality can be
26857 proven at all loops, the innermost loops or no loops.
26858 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26859 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
26860 (finalize_partitions, distribute_loop): Don't fuse partition of
26861 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26862 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26863 parloop is enabled.
26865 2018-01-23 Martin Liska <mliska@suse.cz>
26867 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26868 order to ignore the predictor.
26869 (PRED_POLYMORPHIC_CALL): Likewise.
26870 (PRED_RECURSIVE_CALL): Likewise.
26872 2018-01-23 Martin Liska <mliska@suse.cz>
26874 * tree-profile.c (tree_profiling): Print function header to
26875 aware reader which function we are working on.
26876 * value-prof.c (gimple_find_values_to_profile): Do not print
26877 not interesting value histograms.
26879 2018-01-23 Martin Liska <mliska@suse.cz>
26881 * profile-count.h (enum profile_quality): Add
26882 profile_uninitialized as the first value. Do not number values
26883 as they are zero based.
26884 (profile_count::verify): Update sanity check.
26885 (profile_probability::verify): Likewise.
26887 2018-01-23 Nathan Sidwell <nathan@acm.org>
26889 * doc/invoke.texi (ffor-scope): Deprecate.
26891 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26893 PR tree-optimization/83510
26894 * domwalk.c (set_all_edges_as_executable): New function.
26895 (dom_walker::dom_walker): Convert bool param
26896 "skip_unreachable_blocks" to enum reachability. Move setup of
26897 edge flags to set_all_edges_as_executable and only do it when
26898 reachability is REACHABLE_BLOCKS.
26899 * domwalk.h (enum dom_walker::reachability): New enum.
26900 (dom_walker::dom_walker): Convert bool param
26901 "skip_unreachable_blocks" to enum reachability.
26902 (set_all_edges_as_executable): New decl.
26903 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26904 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26906 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26907 but converting true to REACHABLE_BLOCKS.
26908 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26910 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26911 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26912 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26914 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26915 if check_all_array_refs will be called.
26917 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26919 * tree.c (selftest::test_location_wrappers): Add more test
26922 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26924 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26925 (selftest::test_bit_in_range): Likewise.
26927 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26930 * doc/sourcebuild.texi (vect_float): Say that the selector
26931 only describes the situation when -funsafe-math-optimizations is on.
26932 (vect_float_strict): Document.
26934 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26936 PR tree-optimization/83965
26937 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26938 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26939 instead of checking only for a reduction.
26940 (vect_recog_widen_sum_pattern): Likewise.
26942 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26944 * predict.c (probably_never_executed): Only use precise profile info.
26945 (compute_function_frequency): Skip after inlining hack since we now
26946 have quality checking.
26948 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26950 * profile-count.h (profile_probability::very_unlikely,
26951 profile_probability::unlikely, profile_probability::even): Set
26952 precision to guessed.
26954 2018-01-23 Richard Biener <rguenther@suse.de>
26956 PR tree-optimization/83963
26957 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26958 Properly terminate dominator walk when crossing the exit edge not
26959 when visiting its source block.
26961 2018-01-23 Jakub Jelinek <jakub@redhat.com>
26964 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26965 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26967 2018-01-22 Jakub Jelinek <jakub@redhat.com>
26969 PR tree-optimization/83957
26970 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
26971 semicolon after for body surrounded by braces.
26973 PR tree-optimization/83081
26974 * profile-count.h (profile_probability::split): New method.
26975 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26976 Use profile_probability::split.
26977 (do_compare_rtx_and_jump): Fix adjustment of probabilities
26978 when splitting a single conditional jump into 2.
26980 2018-01-22 David Malcolm <dmalcolm@redhat.com>
26982 PR tree-optimization/69452
26983 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26986 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26988 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26989 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26990 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26992 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26994 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26996 * config/rl78/rl78.md (movdi): New define_expand.
26997 * config/rl78/rl78.c (rl78_split_movdi): New function.
26999 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27002 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27004 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27005 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27006 128-bit to produce an UNSPEC move to get the double word with the
27007 signbit and then a shift directly to do signbit.
27008 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27009 implementation with a new version that just does either a direct
27010 move or a regular move. Move memory interface to separate insns.
27011 Move insns so they are next to the expander.
27012 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27013 with signbit move. Split big and little endian case.
27014 (signbit<mode>2_dm_mem_le): Likewise.
27015 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27016 (signbit<mode>2_dm2): Likewise.
27018 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27020 * config/rl78/rl78.md (anddi3): New define_expand.
27022 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27024 * config/rl78/rl78.md (umindi3): New define_expand.
27026 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27028 * config/rl78/rl78.md (smindi3): New define_expand.
27030 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27032 * config/rl78/rl78.md (smaxdi3): New define_expand.
27034 2018-01-22 Carl Love <cel@us.ibm.com>
27036 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27037 LVX_V1TI): Add macro expansion.
27038 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27039 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27040 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27041 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27042 Change check to determine if the instruction is a byte reversing
27043 entry. Fix typo in comment.
27044 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27045 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27046 Add def_builtin calls for new builtins.
27047 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27048 Add define_insn expansion.
27050 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27052 * config/rl78/rl78.md (umaxdi3): New define_expand.
27054 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27056 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27057 for non-QImode registers.
27059 2018-01-22 Richard Biener <rguenther@suse.de>
27061 PR tree-optimization/83963
27062 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27063 including the loop exit block.
27064 (scop_detection::merge_sese): Likewise.
27065 (scop_detection::add_scop): Do it here instead.
27067 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27069 * doc/sourcebuild.texi (arm_softfloat): Document.
27071 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27074 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27075 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27076 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27078 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27079 David Edelsohn <dje.gcc@gmail.com>
27082 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27083 Change "crset eq" to "crset 2".
27084 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27085 (*call_indirect_aix<mode>_nospec): Likewise.
27086 (*call_value_indirect_aix<mode>_nospec): Likewise.
27087 (*call_indirect_elfv2<mode>_nospec): Likewise.
27088 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27089 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27090 change assembly output from . to $.
27091 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27092 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27093 (*tablejump<mode>_internal1_nospec): Likewise.
27095 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27098 * config/sh/sh_optimize_sett_clrt.cc:
27099 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27101 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27103 PR tree-optimization/83940
27104 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27105 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27106 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27107 use it to pass back the definition type.
27108 (vect_check_store_rhs): Likewise rhs_dt_out.
27109 (vect_build_gather_load_calls): Add a mask_dt argument and use
27110 it instead of a call to vect_is_simple_use.
27111 (vectorizable_store): Update calls to vect_check_load_store_mask
27112 and vect_check_store_rhs. Use the dt returned by the latter instead
27113 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27114 instead of calls to vect_is_simple_use. Pass the scalar rather
27115 than the vector operand to vect_is_simple_use when handling
27116 second and subsequent copies of an rhs value.
27117 (vectorizable_load): Update calls to vect_check_load_store_mask
27118 and vect_build_gather_load_calls. Use the cached mask_dt and
27119 gs_info.offset_dt instead of calls to vect_is_simple_use.
27121 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27123 PR middle-end/83945
27124 * tree-emutls.c: Include gimplify.h.
27125 (lower_emutls_2): New function.
27126 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27127 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27128 it before further processing.
27131 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27132 UINTVAL (trueop1) instead of INTVAL (op1).
27134 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27138 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27139 INCOMING_FRAME_SP_OFFSET if not defined.
27140 (scan_trace): Add ENTRY argument. If true and
27141 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27142 emit a note to adjust the CFA offset.
27143 (create_cfi_notes): Adjust scan_trace callers.
27144 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27145 INCOMING_FRAME_SP_OFFSET in the CIE.
27146 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27147 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27149 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27150 * doc/tm.texi: Regenerated.
27152 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27154 PR rtl-optimization/83147
27155 * lra-constraints.c (remove_inheritance_pseudos): Use
27156 lra_substitute_pseudo_within_insn.
27158 2018-01-19 Tom de Vries <tom@codesourcery.com>
27159 Cesar Philippidis <cesar@codesourcery.com>
27162 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27164 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27167 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27168 spaces for function labels.
27170 2018-01-19 Martin Liska <mliska@suse.cz>
27172 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27173 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27174 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27175 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27176 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27177 (PRED_CONST_RETURN): Change from 69 to 65.
27178 (PRED_NULL_RETURN): Change from 91 to 71.
27179 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27180 (PRED_LOOP_GUARD): Change from 66 to 73.
27182 2018-01-19 Martin Liska <mliska@suse.cz>
27184 * predict.c (predict_insn_def): Add new assert.
27185 (struct branch_predictor): Change type to signed integer.
27186 (test_prediction_value_range): Amend test to cover
27187 PROB_UNINITIALIZED.
27188 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27189 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27190 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27191 (PRED_LOOP_IV_COMPARE): Likewise.
27192 * predict.h (PROB_UNINITIALIZED): Define new constant.
27194 2018-01-19 Martin Liska <mliska@suse.cz>
27196 * predict.c (dump_prediction): Add new format for
27197 analyze_brprob.py script which is enabled with -details
27199 * profile-count.h (precise_p): New function.
27201 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27203 PR tree-optimization/83922
27204 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27205 there are no statements that need masking.
27206 (vect_active_double_reduction_p): New function.
27207 (vect_analyze_loop_operations): Use it when handling phis that
27208 are not in the loop header.
27210 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27212 PR tree-optimization/83914
27213 * tree-vect-loop.c (vectorizable_induction): Don't convert
27214 init_expr or apply the peeling adjustment for inductions
27215 that are nested within the vectorized loop.
27217 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27219 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27222 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27226 * function.h (gimplify_parameters): Add gimple_seq * argument.
27227 * function.c: Include gimple.h and options.h.
27228 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27229 for the added local temporaries if needed.
27230 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27231 if there are any parameter cleanups, wrap whole body into a
27232 try/finally with the cleanups.
27234 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27237 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27238 Use GET_MODE_CLASS for scalar floating point.
27240 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27244 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27245 Fix call of call_cgraph_insertion_hooks.
27247 2018-01-18 Martin Sebor <msebor@redhat.com>
27249 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27251 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27254 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27257 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27260 * common.opt: (-ffile-prefix-map): New option.
27261 * opts.c (common_handle_option): Defer it.
27262 * opts-global.c (handle_common_deferred_options): Handle it.
27263 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27264 * file-prefix-map.h: New file.
27265 (remap_debug_filename, add_debug_prefix_map): ...here.
27266 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27267 * final.c (debug_prefix_map, add_debug_prefix_map
27268 remap_debug_filename): Move to...
27269 * file-prefix-map.c: New file.
27270 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27271 generalize, get rid of alloca(), use strrchr() instead of strchr().
27272 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27273 Implement in terms of add_prefix_map().
27274 (remap_macro_filename, remap_debug_filename): Implement in term of
27276 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27277 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27278 * dbxout.c: Include file-prefix-map.h.
27279 * varasm.c: Likewise.
27280 * vmsdbgout.c: Likewise.
27281 * xcoffout.c: Likewise.
27282 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27283 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27284 * doc/invoke.texi (-ffile-prefix-map): Document.
27285 (-fdebug-prefix-map): Update description.
27287 2018-01-18 Martin Liska <mliska@suse.cz>
27289 * config/i386/i386.c (indirect_thunk_name): Document that also
27291 (output_indirect_thunk): Document why both instructions
27292 (pause and lfence) are generated.
27294 2018-01-18 Richard Biener <rguenther@suse.de>
27296 PR tree-optimization/83887
27297 * graphite-scop-detection.c
27298 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27299 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27300 (scop_detection::merge_sese): Re-implement with a flood-fill
27301 algorithm that properly finds a SESE region if it exists.
27303 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27306 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27307 pointer_diff optimizations use view_convert instead of convert.
27309 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27311 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27312 Generate different code for -mno-speculate-indirect-jumps.
27313 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27314 (*call_indirect_aix<mode>): Disable for
27315 -mno-speculate-indirect-jumps.
27316 (*call_indirect_aix<mode>_nospec): New define_insn.
27317 (*call_value_indirect_aix<mode>): Disable for
27318 -mno-speculate-indirect-jumps.
27319 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27320 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27321 -mno-speculate-indirect-jumps.
27322 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27324 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27326 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27327 long double type, set the flags for noting the default long double
27328 type, even if we don't pass or return a long double type.
27330 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27333 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27336 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27338 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27339 support for merge[hl].
27340 (fold_mergehl_helper): New helper function.
27341 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27342 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27343 (altivec_vmrglw_direct): Add xxmrglw insn.
27345 2018-01-17 Andrew Waterman <andrew@sifive.com>
27347 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27348 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27350 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27353 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27354 call the lto_location_cache before reading the
27355 DECL_SOURCE_LOCATION of the types.
27357 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27358 Richard Sandiford <richard.sandiford@linaro.org>
27360 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27361 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27362 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27363 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27364 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27366 * config/aarch64/constraints.md (aarch64_movti_operand):
27368 * config/aarch64/predicates.md (Uti): Add new constraint.
27370 2018-01-17 Carl Love <cel@us.ibm.com>
27372 * config/rs6000/vsx.md (define_expand xl_len_r,
27373 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27374 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27376 (define_expand, define_insn): Move the shift left from the
27377 define_insn to the define_expand for lxvl and stxvl instructions.
27378 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27379 and XL_LEN_R definitions to PURE.
27381 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27383 * config/i386/i386.c (indirect_thunk_name): Declare regno
27384 as unsigned int. Compare regno with INVALID_REGNUM.
27385 (output_indirect_thunk): Ditto.
27386 (output_indirect_thunk_function): Ditto.
27387 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27388 in the call to output_indirect_thunk_function.
27390 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27392 PR middle-end/83884
27393 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27394 rather than the size of inner_type to determine the stack slot size
27395 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27397 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27400 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27403 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27405 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27406 endian Linux systems to optionally enable multilibs for selecting
27407 the long double type if the user configured an explicit type.
27408 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27409 have no long double multilibs if not defined.
27410 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27411 warn if the user used -mabi={ieee,ibm}longdouble and we built
27412 multilibs for long double.
27413 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27414 appropriate multilib option.
27415 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27417 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27418 for building long double multilibs.
27419 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27421 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27423 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27426 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27428 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27431 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27434 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27437 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27439 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27440 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27442 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27444 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27445 different rtl trees depending on TARGET_64BIT.
27446 (rs6000_gen_lvx): Likewise.
27448 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27450 * config/visium/visium.md (nop): Tweak comment.
27451 (hazard_nop): Likewise.
27453 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27455 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27456 -mspeculate-indirect-jumps.
27457 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27458 for -mno-speculate-indirect-jumps.
27459 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27460 (*call_value_indirect_elfv2<mode>): Disable for
27461 -mno-speculate-indirect-jumps.
27462 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27463 (indirect_jump): Emit different RTL for
27464 -mno-speculate-indirect-jumps.
27465 (*indirect_jump<mode>): Disable for
27466 -mno-speculate-indirect-jumps.
27467 (*indirect_jump<mode>_nospec): New define_insn.
27468 (tablejump): Emit different RTL for
27469 -mno-speculate-indirect-jumps.
27470 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27471 (tablejumpsi_nospec): New define_expand.
27472 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27473 (tablejumpdi_nospec): New define_expand.
27474 (*tablejump<mode>_internal1): Disable for
27475 -mno-speculate-indirect-jumps.
27476 (*tablejump<mode>_internal1_nospec): New define_insn.
27477 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27480 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27482 * caller-save.c (insert_save): Drop unnecessary parameter. All
27485 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27486 Richard Biener <rguenth@suse.de>
27489 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27490 return early, inline manually is_gimple_sizepos. Make sure if we
27491 call gimplify_expr we don't end up with a gimple constant.
27492 * tree.c (variably_modified_type_p): Don't return true for
27493 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27494 * gimplify.h (is_gimple_sizepos): Remove.
27496 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27498 PR tree-optimization/83857
27499 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27500 vectorizable_live_operation for pure SLP statements.
27501 (vectorizable_live_operation): Handle PHIs.
27503 2018-01-16 Richard Biener <rguenther@suse.de>
27505 PR tree-optimization/83867
27506 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27507 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27509 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27512 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27513 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27514 If off is not INTEGER_CST, issue a may not be aligned warning
27515 rather than isn't aligned. Use isn%'t rather than isn't.
27516 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27518 <case MULT_EXPR>: Improve the case when bottom and one of the
27519 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27520 operand, in that case check if the other operand is multiple of
27521 bottom divided by the INTEGER_CST operand.
27523 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27526 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27527 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27528 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27529 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27530 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27531 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27532 (pa_function_arg_size): New function.
27534 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27536 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27537 in a separate statement.
27539 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27541 PR tree-optimization/83847
27542 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27543 group gathers and scatters.
27545 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27547 PR rtl-optimization/86620
27548 * params.def (max-sched-ready-insns): Bump minimum value to 1.
27550 PR rtl-optimization/83213
27551 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27552 to last if both are JUMP_INSNs.
27554 PR tree-optimization/83843
27555 * gimple-ssa-store-merging.c
27556 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27557 store_immediate_info for bswap/nop orig_stores.
27559 2018-01-15 Andrew Waterman <andrew@sifive.com>
27561 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27563 <UDIV>: Increase cost if !TARGET_DIV.
27565 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
27567 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27568 (define_attr "cr_logical_3op"): New.
27569 (cceq_ior_compare): Adjust.
27570 (cceq_ior_compare_complement): Adjust.
27571 (*cceq_rev_compare): Adjust.
27572 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27573 (is_cracked_insn): Adjust.
27574 (insn_must_be_first_in_group): Adjust.
27575 * config/rs6000/40x.md: Adjust.
27576 * config/rs6000/440.md: Adjust.
27577 * config/rs6000/476.md: Adjust.
27578 * config/rs6000/601.md: Adjust.
27579 * config/rs6000/603.md: Adjust.
27580 * config/rs6000/6xx.md: Adjust.
27581 * config/rs6000/7450.md: Adjust.
27582 * config/rs6000/7xx.md: Adjust.
27583 * config/rs6000/8540.md: Adjust.
27584 * config/rs6000/cell.md: Adjust.
27585 * config/rs6000/e300c2c3.md: Adjust.
27586 * config/rs6000/e500mc.md: Adjust.
27587 * config/rs6000/e500mc64.md: Adjust.
27588 * config/rs6000/e5500.md: Adjust.
27589 * config/rs6000/e6500.md: Adjust.
27590 * config/rs6000/mpc.md: Adjust.
27591 * config/rs6000/power4.md: Adjust.
27592 * config/rs6000/power5.md: Adjust.
27593 * config/rs6000/power6.md: Adjust.
27594 * config/rs6000/power7.md: Adjust.
27595 * config/rs6000/power8.md: Adjust.
27596 * config/rs6000/power9.md: Adjust.
27597 * config/rs6000/rs64.md: Adjust.
27598 * config/rs6000/titan.md: Adjust.
27600 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27602 * config/i386/predicates.md (indirect_branch_operand): Rewrite
27603 ix86_indirect_branch_register logic.
27605 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27607 * config/i386/constraints.md (Bs): Update
27608 ix86_indirect_branch_register check. Don't check
27609 ix86_indirect_branch_register with GOT_memory_operand.
27611 * config/i386/predicates.md (GOT_memory_operand): Don't check
27612 ix86_indirect_branch_register here.
27613 (GOT32_symbol_operand): Likewise.
27615 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27617 * config/i386/predicates.md (constant_call_address_operand):
27618 Rewrite ix86_indirect_branch_register logic.
27619 (sibcall_insn_operand): Likewise.
27621 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27623 * config/i386/constraints.md (Bs): Replace
27624 ix86_indirect_branch_thunk_register with
27625 ix86_indirect_branch_register.
27627 * config/i386/i386.md (indirect_jump): Likewise.
27628 (tablejump): Likewise.
27629 (*sibcall_memory): Likewise.
27630 (*sibcall_value_memory): Likewise.
27631 Peepholes of indirect call and jump via memory: Likewise.
27632 * config/i386/i386.opt: Likewise.
27633 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27634 (GOT_memory_operand): Likewise.
27635 (call_insn_operand): Likewise.
27636 (sibcall_insn_operand): Likewise.
27637 (GOT32_symbol_operand): Likewise.
27639 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27641 PR middle-end/83837
27642 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27643 type rather than type addr's type points to.
27644 (expand_omp_atomic_mutex): Likewise.
27645 (expand_omp_atomic): Likewise.
27647 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27650 * config/i386/i386.c (output_indirect_thunk_function): Use
27651 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27652 for __x86_return_thunk.
27654 2018-01-15 Richard Biener <rguenther@suse.de>
27656 PR middle-end/83850
27657 * expmed.c (extract_bit_field_1): Fix typo.
27659 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27662 * config/arm/iterators.md (VF): New mode iterator.
27663 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27664 Remove integer-related logic from pattern.
27665 (neon_vabd<mode>_3): Likewise.
27667 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27669 PR middle-end/82694
27670 * common.opt (fstrict-overflow): No longer an alias.
27671 (fwrapv-pointer): New option.
27672 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27673 also for pointer types based on flag_wrapv_pointer.
27674 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27675 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27676 opts->x_flag_wrapv got set.
27677 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27678 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27679 POINTER_TYPE_OVERFLOW_UNDEFINED.
27680 * match.pd: Likewise in address comparison pattern.
27681 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27683 2018-01-15 Richard Biener <rguenther@suse.de>
27686 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27687 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
27688 Reset type names to their identifier if their TYPE_DECL doesn't
27689 have linkage (and thus is used for ODR and devirt).
27690 (save_debug_info_for_decl): Remove.
27691 (save_debug_info_for_type): Likewise.
27692 (add_tree_to_fld_list): Adjust.
27693 * tree-pretty-print.c (dump_generic_node): Make dumping of
27694 type names more robust.
27696 2018-01-15 Richard Biener <rguenther@suse.de>
27698 * BASE-VER: Bump to 8.0.1.
27700 2018-01-14 Martin Sebor <msebor@redhat.com>
27703 * builtins.c (check_access): Avoid warning when the no-warning bit
27706 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
27708 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27709 * ira-color (allocno_hard_regs_compare): Likewise.
27711 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
27714 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27715 Use .pushsection/.popsection.
27717 2018-01-14 Martin Sebor <msebor@redhat.com>
27720 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27722 2018-01-14 Jakub Jelinek <jakub@redhat.com>
27724 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27725 entry from extra_headers.
27726 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27727 extra_headers, make the list bitwise identical to the i?86-*-* one.
27729 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27731 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27732 -mcmodel=large with -mindirect-branch=thunk,
27733 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27734 -mfunction-return=thunk-extern.
27735 * doc/invoke.texi: Document -mcmodel=large is incompatible with
27736 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27737 -mfunction-return=thunk and -mfunction-return=thunk-extern.
27739 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27741 * config/i386/i386.c (print_reg): Print the name of the full
27742 integer register without '%'.
27743 (ix86_print_operand): Handle 'V'.
27744 * doc/extend.texi: Document 'V' modifier.
27746 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27748 * config/i386/constraints.md (Bs): Disallow memory operand for
27749 -mindirect-branch-register.
27751 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27752 (GOT_memory_operand): Likewise.
27753 (call_insn_operand): Likewise.
27754 (sibcall_insn_operand): Likewise.
27755 (GOT32_symbol_operand): Likewise.
27756 * config/i386/i386.md (indirect_jump): Call convert_memory_address
27757 for -mindirect-branch-register.
27758 (tablejump): Likewise.
27759 (*sibcall_memory): Likewise.
27760 (*sibcall_value_memory): Likewise.
27761 Disallow peepholes of indirect call and jump via memory for
27762 -mindirect-branch-register.
27763 (*call_pop): Replace m with Bw.
27764 (*call_value_pop): Likewise.
27765 (*sibcall_pop_memory): Replace m with Bs.
27766 * config/i386/i386.opt (mindirect-branch-register): New option.
27767 * doc/invoke.texi: Document -mindirect-branch-register option.
27769 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27771 * config/i386/i386-protos.h (ix86_output_function_return): New.
27772 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27773 set function_return_type.
27774 (indirect_thunk_name): Add ret_p to indicate thunk for function
27776 (output_indirect_thunk_function): Pass false to
27777 indirect_thunk_name.
27778 (ix86_output_indirect_branch_via_reg): Likewise.
27779 (ix86_output_indirect_branch_via_push): Likewise.
27780 (output_indirect_thunk_function): Create alias for function
27781 return thunk if regno < 0.
27782 (ix86_output_function_return): New function.
27783 (ix86_handle_fndecl_attribute): Handle function_return.
27784 (ix86_attribute_table): Add function_return.
27785 * config/i386/i386.h (machine_function): Add
27786 function_return_type.
27787 * config/i386/i386.md (simple_return_internal): Use
27788 ix86_output_function_return.
27789 (simple_return_internal_long): Likewise.
27790 * config/i386/i386.opt (mfunction-return=): New option.
27791 (indirect_branch): Mention -mfunction-return=.
27792 * doc/extend.texi: Document function_return function attribute.
27793 * doc/invoke.texi: Document -mfunction-return= option.
27795 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27797 * config/i386/i386-opts.h (indirect_branch): New.
27798 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27799 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27800 with local indirect jump when converting indirect call and jump.
27801 (ix86_set_indirect_branch_type): New.
27802 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27803 (indirectlabelno): New.
27804 (indirect_thunk_needed): Likewise.
27805 (indirect_thunk_bnd_needed): Likewise.
27806 (indirect_thunks_used): Likewise.
27807 (indirect_thunks_bnd_used): Likewise.
27808 (INDIRECT_LABEL): Likewise.
27809 (indirect_thunk_name): Likewise.
27810 (output_indirect_thunk): Likewise.
27811 (output_indirect_thunk_function): Likewise.
27812 (ix86_output_indirect_branch_via_reg): Likewise.
27813 (ix86_output_indirect_branch_via_push): Likewise.
27814 (ix86_output_indirect_branch): Likewise.
27815 (ix86_output_indirect_jmp): Likewise.
27816 (ix86_code_end): Call output_indirect_thunk_function if needed.
27817 (ix86_output_call_insn): Call ix86_output_indirect_branch if
27819 (ix86_handle_fndecl_attribute): Handle indirect_branch.
27820 (ix86_attribute_table): Add indirect_branch.
27821 * config/i386/i386.h (machine_function): Add indirect_branch_type
27822 and has_local_indirect_jump.
27823 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27825 (tablejump): Likewise.
27826 (*indirect_jump): Use ix86_output_indirect_jmp.
27827 (*tablejump_1): Likewise.
27828 (simple_return_indirect_internal): Likewise.
27829 * config/i386/i386.opt (mindirect-branch=): New option.
27830 (indirect_branch): New.
27833 (thunk-inline): Likewise.
27834 (thunk-extern): Likewise.
27835 * doc/extend.texi: Document indirect_branch function attribute.
27836 * doc/invoke.texi: Document -mindirect-branch= option.
27838 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
27841 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27843 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
27845 * ipa-inline.c (want_inline_small_function_p): Return false if
27846 inlining has already failed with CIF_FINAL_ERROR.
27847 (update_caller_keys): Call want_inline_small_function_p before
27849 (update_callee_keys): Likewise.
27851 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
27853 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27855 (rs6000_quadword_masked_address_p): Likewise.
27856 (quad_aligned_load_p): Likewise.
27857 (quad_aligned_store_p): Likewise.
27858 (const_load_sequence_p): Add comment to describe the outer-most loop.
27859 (mimic_memory_attributes_and_flags): New function.
27860 (rs6000_gen_stvx): Likewise.
27861 (replace_swapped_aligned_store): Likewise.
27862 (rs6000_gen_lvx): Likewise.
27863 (replace_swapped_aligned_load): Likewise.
27864 (replace_swapped_load_constant): Capitalize argument name in
27865 comment describing this function.
27866 (rs6000_analyze_swaps): Add a third pass to search for vector loads
27867 and stores that access quad-word aligned addresses and replace
27868 with stvx or lvx instructions when appropriate.
27869 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27870 New function prototype.
27871 (rs6000_quadword_masked_address_p): Likewise.
27872 (rs6000_gen_lvx): Likewise.
27873 (rs6000_gen_stvx): Likewise.
27874 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27875 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27876 when memory address is aligned.
27877 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27878 this split to select lvx instruction when memory address is aligned.
27879 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27880 instruction when memory address is aligned.
27881 (*vsx_le_perm_load_v16qi): Likewise.
27882 (four unnamed splitters): Modify to select the stvx instruction
27883 when memory is aligned.
27885 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27887 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27888 which appears in the queue multiple times.
27890 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27891 Alan Hayward <alan.hayward@arm.com>
27892 David Sherwood <david.sherwood@arm.com>
27894 * tree-vectorizer.h (vec_lower_bound): New structure.
27895 (_loop_vec_info): Add check_nonzero and lower_bounds.
27896 (LOOP_VINFO_CHECK_NONZERO): New macro.
27897 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27898 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27899 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27900 fields. Make seg_len the distance travelled, not including the
27902 (dr_direction_indicator): Declare.
27903 (dr_zero_step_indicator): Likewise.
27904 (dr_known_forward_stride_p): Likewise.
27905 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27907 (runtime_alias_check_p): Allow runtime alias checks with
27909 (operator ==): Compare access_size and align.
27910 (prune_runtime_alias_test_list): Rework for new distinction between
27911 the access_size and seg_len.
27912 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27914 (get_segment_min_max): New function.
27915 (create_intersect_range_checks): Use it.
27916 (dr_step_indicator): New function.
27917 (dr_direction_indicator): Likewise.
27918 (dr_zero_step_indicator): Likewise.
27919 (dr_known_forward_stride_p): Likewise.
27920 * tree-loop-distribution.c (data_ref_segment_size): Return
27921 DR_STEP * (niters - 1).
27922 (compute_alias_check_pairs): Update call to the dr_with_seg_len
27924 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27925 (vect_preserves_scalar_order_p): New function, split out from...
27926 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
27927 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27928 (vect_vfa_access_size): New function.
27929 (vect_vfa_align): Likewise.
27930 (vect_compile_time_alias): Take access_size_a and access_b arguments.
27931 (dump_lower_bound): New function.
27932 (vect_check_lower_bound): Likewise.
27933 (vect_small_gap_p): Likewise.
27934 (vectorizable_with_step_bound_p): Likewise.
27935 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27936 depencies if the vectorization factor is 1. Convert the checks
27937 for nonzero steps into checks on the bounds of DR_STEP. Try using
27938 a bunds check for variable steps if the minimum required step is
27939 relatively small. Update calls to the dr_with_seg_len
27940 constructor and to vect_compile_time_alias.
27941 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27943 (vect_loop_versioning): Call it.
27944 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27946 (vect_estimate_min_profitable_iters): Account for any bounds checks.
27948 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27949 Alan Hayward <alan.hayward@arm.com>
27950 David Sherwood <david.sherwood@arm.com>
27952 * doc/sourcebuild.texi (vect_scatter_store): Document.
27953 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27955 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27957 * genopinit.c (main): Add supports_vec_scatter_store and
27958 supports_vec_scatter_store_cached to target_optabs.
27959 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27960 IFN_MASK_SCATTER_STORE.
27961 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27963 * internal-fn.h (internal_store_fn_p): Declare.
27964 (internal_fn_stored_value_index): Likewise.
27965 * internal-fn.c (scatter_store_direct): New macro.
27966 (expand_scatter_store_optab_fn): New function.
27967 (direct_scatter_store_optab_supported_p): New macro.
27968 (internal_store_fn_p): New function.
27969 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27970 IFN_MASK_SCATTER_STORE.
27971 (internal_fn_mask_index): Likewise.
27972 (internal_fn_stored_value_index): New function.
27973 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27974 for scatter stores.
27975 * optabs-query.h (supports_vec_scatter_store_p): Declare.
27976 * optabs-query.c (supports_vec_scatter_store_p): New function.
27977 * tree-vectorizer.h (vect_get_store_rhs): Declare.
27978 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27979 true for scatter stores.
27980 (vect_gather_scatter_fn_p): Handle scatter stores too.
27981 (vect_check_gather_scatter): Consider using scatter stores if
27982 supports_vec_scatter_store_p.
27983 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27984 scatter stores too.
27985 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27986 internal_fn_stored_value_index.
27987 (check_load_store_masking): Handle scatter stores too.
27988 (vect_get_store_rhs): Make public.
27989 (vectorizable_call): Use internal_store_fn_p.
27990 (vectorizable_store): Handle scatter store internal functions.
27991 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27992 when deciding whether the end of the group has been reached.
27993 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27994 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27995 (mask_scatter_store<mode>): New insns.
27997 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27998 Alan Hayward <alan.hayward@arm.com>
27999 David Sherwood <david.sherwood@arm.com>
28001 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28002 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28003 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28005 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28006 Use vect_truncate_gather_scatter_offset if we can't treat the
28007 operation as a normal gather load or scatter store.
28008 (get_group_load_store_type): Take the gather_scatter_info
28009 as argument. Try using a gather load or scatter store for
28010 single-element groups.
28011 (get_load_store_type): Update calls to get_group_load_store_type
28012 and vect_use_strided_gather_scatters_p.
28014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28015 Alan Hayward <alan.hayward@arm.com>
28016 David Sherwood <david.sherwood@arm.com>
28018 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28019 optional tree argument.
28020 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28022 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28023 but continue to use the current value as a fallback.
28024 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28025 to compare the updates.
28026 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28027 (get_load_store_type): Use it when handling a strided access.
28028 (vect_get_strided_load_store_ops): New function.
28029 (vect_get_data_ptr_increment): Likewise.
28030 (vectorizable_load): Handle strided gather loads. Always pass
28031 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28033 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28034 Alan Hayward <alan.hayward@arm.com>
28035 David Sherwood <david.sherwood@arm.com>
28037 * doc/md.texi (gather_load@var{m}): Document.
28038 (mask_gather_load@var{m}): Likewise.
28039 * genopinit.c (main): Add supports_vec_gather_load and
28040 supports_vec_gather_load_cached to target_optabs.
28041 * optabs-tree.c (init_tree_optimization_optabs): Use
28042 ggc_cleared_alloc to allocate target_optabs.
28043 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28044 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28046 * internal-fn.h (internal_load_fn_p): Declare.
28047 (internal_gather_scatter_fn_p): Likewise.
28048 (internal_fn_mask_index): Likewise.
28049 (internal_gather_scatter_fn_supported_p): Likewise.
28050 * internal-fn.c (gather_load_direct): New macro.
28051 (expand_gather_load_optab_fn): New function.
28052 (direct_gather_load_optab_supported_p): New macro.
28053 (direct_internal_fn_optab): New function.
28054 (internal_load_fn_p): Likewise.
28055 (internal_gather_scatter_fn_p): Likewise.
28056 (internal_fn_mask_index): Likewise.
28057 (internal_gather_scatter_fn_supported_p): Likewise.
28058 * optabs-query.c (supports_at_least_one_mode_p): New function.
28059 (supports_vec_gather_load_p): Likewise.
28060 * optabs-query.h (supports_vec_gather_load_p): Declare.
28061 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28062 and memory_type field.
28063 (NUM_PATTERNS): Bump to 15.
28064 * tree-vect-data-refs.c: Include internal-fn.h.
28065 (vect_gather_scatter_fn_p): New function.
28066 (vect_describe_gather_scatter_call): Likewise.
28067 (vect_check_gather_scatter): Try using internal functions for
28068 gather loads. Recognize existing calls to a gather load function.
28069 (vect_analyze_data_refs): Consider using gather loads if
28070 supports_vec_gather_load_p.
28071 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28072 (vect_get_gather_scatter_offset_type): Likewise.
28073 (vect_convert_mask_for_vectype): Likewise.
28074 (vect_add_conversion_to_patterm): Likewise.
28075 (vect_try_gather_scatter_pattern): Likewise.
28076 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28077 (vect_vect_recog_func_ptrs): Add it.
28078 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28079 internal_fn_mask_index and internal_gather_scatter_fn_p.
28080 (check_load_store_masking): Take the gather_scatter_info as an
28081 argument and handle gather loads.
28082 (vect_get_gather_scatter_ops): New function.
28083 (vectorizable_call): Check internal_load_fn_p.
28084 (vectorizable_load): Likewise. Handle gather load internal
28086 (vectorizable_store): Update call to check_load_store_masking.
28087 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28088 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28089 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28090 (aarch64_gather_scale_operand_d): New predicates.
28091 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28092 (mask_gather_load<mode>): New insns.
28094 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28095 Alan Hayward <alan.hayward@arm.com>
28096 David Sherwood <david.sherwood@arm.com>
28098 * optabs.def (fold_left_plus_optab): New optab.
28099 * doc/md.texi (fold_left_plus_@var{m}): Document.
28100 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28101 * internal-fn.c (fold_left_direct): Define.
28102 (expand_fold_left_optab_fn): Likewise.
28103 (direct_fold_left_optab_supported_p): Likewise.
28104 * fold-const-call.c (fold_const_fold_left): New function.
28105 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28106 * tree-parloops.c (valid_reduction_p): New function.
28107 (gather_scalar_reductions): Use it.
28108 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28109 (vect_finish_replace_stmt): Declare.
28110 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28111 (needs_fold_left_reduction_p): New function, split out from...
28112 (vect_is_simple_reduction): ...here. Accept reductions that
28113 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28114 (vect_force_simple_reduction): Also store the reduction type in
28115 the assignment's STMT_VINFO_REDUC_TYPE.
28116 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28117 (merge_with_identity): New function.
28118 (vect_expand_fold_left): Likewise.
28119 (vectorize_fold_left_reduction): Likewise.
28120 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28121 scalar phi in place for it. Check for target support and reject
28122 cases that would reassociate the operation. Defer the transform
28123 phase to vectorize_fold_left_reduction.
28124 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28125 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28126 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28128 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28130 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28131 call to ifc_temp_var.
28133 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28134 Alan Hayward <alan.hayward@arm.com>
28135 David Sherwood <david.sherwood@arm.com>
28137 * target.def (legitimize_address_displacement): Take the original
28138 offset as a poly_int.
28139 * targhooks.h (default_legitimize_address_displacement): Update
28141 * targhooks.c (default_legitimize_address_displacement): Likewise.
28142 * doc/tm.texi: Regenerate.
28143 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28144 as an argument, moving assert of ad->disp == ad->disp_term to...
28145 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28146 Try calling targetm.legitimize_address_displacement before expanding
28147 the address rather than afterwards, and adjust for the new interface.
28148 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28149 Match the new hook interface. Handle SVE addresses.
28150 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28151 new hook interface.
28153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28155 * Makefile.in (OBJS): Add early-remat.o.
28156 * target.def (select_early_remat_modes): New hook.
28157 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28158 * doc/tm.texi: Regenerate.
28159 * targhooks.h (default_select_early_remat_modes): Declare.
28160 * targhooks.c (default_select_early_remat_modes): New function.
28161 * timevar.def (TV_EARLY_REMAT): New timevar.
28162 * passes.def (pass_early_remat): New pass.
28163 * tree-pass.h (make_pass_early_remat): Declare.
28164 * early-remat.c: New file.
28165 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28167 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28170 Alan Hayward <alan.hayward@arm.com>
28171 David Sherwood <david.sherwood@arm.com>
28173 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28174 vfm1 with a bound_epilog parameter.
28175 (vect_do_peeling): Update calls accordingly, and move the prologue
28176 call earlier in the function. Treat the base bound_epilog as 0 for
28177 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28178 this base when peeling for gaps.
28179 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28180 with fully-masked loops.
28181 (vect_estimate_min_profitable_iters): Handle the single peeled
28182 iteration in that case.
28184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28185 Alan Hayward <alan.hayward@arm.com>
28186 David Sherwood <david.sherwood@arm.com>
28188 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28189 single-element interleaving even if the size is not a power of 2.
28190 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28191 accesses for single-element interleaving if the group size is
28194 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28195 Alan Hayward <alan.hayward@arm.com>
28196 David Sherwood <david.sherwood@arm.com>
28198 * doc/md.texi (fold_extract_last_@var{m}): Document.
28199 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28200 * optabs.def (fold_extract_last_optab): New optab.
28201 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28202 * internal-fn.c (fold_extract_direct): New macro.
28203 (expand_fold_extract_optab_fn): Likewise.
28204 (direct_fold_extract_optab_supported_p): Likewise.
28205 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28206 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28207 EXTRACT_LAST_REDUCTION.
28208 (get_initial_def_for_reduction): Do not create an initial vector
28209 for EXTRACT_LAST_REDUCTION reductions.
28210 (vectorizable_reduction): Leave the scalar phi in place for
28211 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28212 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28213 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28214 transform phase to vectorizable_condition.
28215 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28217 (vect_finish_stmt_generation): ...here.
28218 (vect_finish_replace_stmt): New function.
28219 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28220 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28222 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28225 Alan Hayward <alan.hayward@arm.com>
28226 David Sherwood <david.sherwood@arm.com>
28228 * doc/md.texi (extract_last_@var{m}): Document.
28229 * optabs.def (extract_last_optab): New optab.
28230 * internal-fn.def (EXTRACT_LAST): New internal function.
28231 * internal-fn.c (cond_unary_direct): New macro.
28232 (expand_cond_unary_optab_fn): Likewise.
28233 (direct_cond_unary_optab_supported_p): Likewise.
28234 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28235 loops using EXTRACT_LAST.
28236 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28237 (extract_last_<mode>): ...this optab.
28238 (vec_extract<mode><Vel>): Update accordingly.
28240 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28241 Alan Hayward <alan.hayward@arm.com>
28242 David Sherwood <david.sherwood@arm.com>
28244 * target.def (empty_mask_is_expensive): New hook.
28245 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28246 * doc/tm.texi: Regenerate.
28247 * targhooks.h (default_empty_mask_is_expensive): Declare.
28248 * targhooks.c (default_empty_mask_is_expensive): New function.
28249 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28250 if the target says that empty masks are expensive.
28251 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28253 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28255 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28256 Alan Hayward <alan.hayward@arm.com>
28257 David Sherwood <david.sherwood@arm.com>
28259 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28260 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28261 (vect_use_loop_mask_for_alignment_p): New function.
28262 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28263 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28264 niters_skip argument. Make sure that the first niters_skip elements
28265 of the first iteration are inactive.
28266 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28267 Update call to vect_set_loop_masks_directly.
28268 (get_misalign_in_elems): New function, split out from...
28269 (vect_gen_prolog_loop_niters): ...here.
28270 (vect_update_init_of_dr): Take a code argument that specifies whether
28271 the adjustment should be added or subtracted.
28272 (vect_update_init_of_drs): Likewise.
28273 (vect_prepare_for_masked_peels): New function.
28274 (vect_do_peeling): Skip prologue peeling if we're using a mask
28275 instead. Update call to vect_update_inits_of_drs.
28276 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28278 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28279 alignment. Do not include the number of peeled iterations in
28280 the minimum threshold in that case.
28281 (vectorizable_induction): Adjust the start value down by
28282 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28283 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28284 Take the number of skipped iterations into account when calculating
28286 * tree-vect-stmts.c (vect_gen_while_not): New function.
28288 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28289 Alan Hayward <alan.hayward@arm.com>
28290 David Sherwood <david.sherwood@arm.com>
28292 * doc/sourcebuild.texi (vect_fully_masked): Document.
28293 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28294 default value to 0.
28295 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28297 (vect_analyze_loop_2): ...here. Don't check the vectorization
28298 factor against the number of loop iterations if the loop is
28301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28302 Alan Hayward <alan.hayward@arm.com>
28303 David Sherwood <david.sherwood@arm.com>
28305 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28306 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28307 (dump_groups): Update accordingly.
28308 (iv_use::mem_type): New member variable.
28309 (address_p): New function.
28310 (record_use): Add a mem_type argument and initialize the new
28312 (record_group_use): Add a mem_type argument. Use address_p.
28313 Remove obsolete null checks of base_object. Update call to record_use.
28314 (find_interesting_uses_op): Update call to record_group_use.
28315 (find_interesting_uses_cond): Likewise.
28316 (find_interesting_uses_address): Likewise.
28317 (get_mem_type_for_internal_fn): New function.
28318 (find_address_like_use): Likewise.
28319 (find_interesting_uses_stmt): Try find_address_like_use before
28320 calling find_interesting_uses_op.
28321 (addr_offset_valid_p): Use the iv mem_type field as the type
28322 of the addressed memory.
28323 (add_autoinc_candidates): Likewise.
28324 (get_address_cost): Likewise.
28325 (split_small_address_groups_p): Use address_p.
28326 (split_address_groups): Likewise.
28327 (add_iv_candidate_for_use): Likewise.
28328 (autoinc_possible_for_pair): Likewise.
28329 (rewrite_groups): Likewise.
28330 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28331 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28332 (get_alias_ptr_type_for_ptr_address): New function.
28333 (rewrite_use_address): Rewrite address uses in calls that were
28334 identified by find_address_like_use.
28336 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28337 Alan Hayward <alan.hayward@arm.com>
28338 David Sherwood <david.sherwood@arm.com>
28340 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28342 * gimple-expr.h (is_gimple_addressable: Likewise.
28343 * gimple-expr.c (is_gimple_address): Likewise.
28344 * internal-fn.c (expand_call_mem_ref): New function.
28345 (expand_mask_load_optab_fn): Use it.
28346 (expand_mask_store_optab_fn): Likewise.
28348 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28349 Alan Hayward <alan.hayward@arm.com>
28350 David Sherwood <david.sherwood@arm.com>
28352 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28353 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28354 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28355 (cond_umax@var{mode}): Document.
28356 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28357 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28358 (cond_umin_optab, cond_umax_optab): New optabs.
28359 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28360 (COND_IOR, COND_XOR): New internal functions.
28361 * internal-fn.h (get_conditional_internal_fn): Declare.
28362 * internal-fn.c (cond_binary_direct): New macro.
28363 (expand_cond_binary_optab_fn): Likewise.
28364 (direct_cond_binary_optab_supported_p): Likewise.
28365 (get_conditional_internal_fn): New function.
28366 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28367 Cope with reduction statements that are vectorized as calls rather
28369 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28370 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28371 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28372 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28373 (UNSPEC_COND_EOR): New unspecs.
28374 (optab): Add mappings for them.
28375 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28376 (sve_int_op, sve_fp_op): New int attributes.
28378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28379 Alan Hayward <alan.hayward@arm.com>
28380 David Sherwood <david.sherwood@arm.com>
28382 * optabs.def (while_ult_optab): New optab.
28383 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28384 * internal-fn.def (WHILE_ULT): New internal function.
28385 * internal-fn.h (direct_internal_fn_supported_p): New override
28386 that takes two types as argument.
28387 * internal-fn.c (while_direct): New macro.
28388 (expand_while_optab_fn): New function.
28389 (convert_optab_supported_p): Likewise.
28390 (direct_while_optab_supported_p): New macro.
28391 * wide-int.h (wi::udiv_ceil): New function.
28392 * tree-vectorizer.h (rgroup_masks): New structure.
28393 (vec_loop_masks): New typedef.
28394 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28395 and fully_masked_p.
28396 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28397 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28398 (vect_max_vf): New function.
28399 (slpeel_make_loop_iterate_ntimes): Delete.
28400 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28401 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28402 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28403 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28404 internal-fn.h, stor-layout.h and optabs-query.h.
28405 (vect_set_loop_mask): New function.
28406 (add_preheader_seq): Likewise.
28407 (add_header_seq): Likewise.
28408 (interleave_supported_p): Likewise.
28409 (vect_maybe_permute_loop_masks): Likewise.
28410 (vect_set_loop_masks_directly): Likewise.
28411 (vect_set_loop_condition_masked): Likewise.
28412 (vect_set_loop_condition_unmasked): New function, split out from
28413 slpeel_make_loop_iterate_ntimes.
28414 (slpeel_make_loop_iterate_ntimes): Rename to..
28415 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28416 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28417 (vect_do_peeling): Update call accordingly.
28418 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28420 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28421 mask_compare_type, can_fully_mask_p and fully_masked_p.
28422 (release_vec_loop_masks): New function.
28423 (_loop_vec_info): Use it to free the loop masks.
28424 (can_produce_all_loop_masks_p): New function.
28425 (vect_get_max_nscalars_per_iter): Likewise.
28426 (vect_verify_full_masking): Likewise.
28427 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28428 retries, and free the mask rgroups before retrying. Check loop-wide
28429 reasons for disallowing fully-masked loops. Make the final decision
28430 about whether use a fully-masked loop or not.
28431 (vect_estimate_min_profitable_iters): Do not assume that peeling
28432 for the number of iterations will be needed for fully-masked loops.
28433 (vectorizable_reduction): Disable fully-masked loops.
28434 (vectorizable_live_operation): Likewise.
28435 (vect_halve_mask_nunits): New function.
28436 (vect_double_mask_nunits): Likewise.
28437 (vect_record_loop_mask): Likewise.
28438 (vect_get_loop_mask): Likewise.
28439 (vect_transform_loop): Handle the case in which the final loop
28440 iteration might handle a partial vector. Call vect_set_loop_condition
28441 instead of slpeel_make_loop_iterate_ntimes.
28442 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28443 (check_load_store_masking): New function.
28444 (prepare_load_store_mask): Likewise.
28445 (vectorizable_store): Handle fully-masked loops.
28446 (vectorizable_load): Likewise.
28447 (supportable_widening_operation): Use vect_halve_mask_nunits for
28449 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28450 (vect_gen_while): New function.
28451 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28452 (aarch64_uqdec<mode>): New insn.
28454 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28455 Alan Hayward <alan.hayward@arm.com>
28456 David Sherwood <david.sherwood@arm.com>
28458 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28459 (reduc_xor_scal_optab): New optabs.
28460 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28461 (reduc_xor_scal_@var{m}): Document.
28462 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28463 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28464 internal functions.
28465 * fold-const-call.c (fold_const_call): Handle them.
28466 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28467 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28468 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28469 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28470 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28471 (UNSPEC_XORV): New unspecs.
28472 (optab): Add entries for them.
28473 (BITWISEV): New int iterator.
28474 (bit_reduc_op): New int attributes.
28476 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28477 Alan Hayward <alan.hayward@arm.com>
28478 David Sherwood <david.sherwood@arm.com>
28480 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28481 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28482 * optabs.def (vec_shl_insert_optab): New optab.
28483 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28484 (duplicate_and_interleave): Likewise.
28485 * tree-vect-loop.c: Include internal-fn.h.
28486 (neutral_op_for_slp_reduction): New function, split out from
28487 get_initial_defs_for_reduction.
28488 (get_initial_def_for_reduction): Handle option 2 for variable-length
28489 vectors by loading the neutral value into a vector and then shifting
28490 the initial value into element 0.
28491 (get_initial_defs_for_reduction): Replace the code argument with
28492 the neutral value calculated by neutral_op_for_slp_reduction.
28493 Use gimple_build_vector for constant-length vectors.
28494 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28495 but the first group_size elements have a neutral value.
28496 Use duplicate_and_interleave otherwise.
28497 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28498 Update call to get_initial_defs_for_reduction. Handle SLP
28499 reductions for variable-length vectors by creating one vector
28500 result for each scalar result, with the elements associated
28501 with other scalar results stubbed out with the neutral value.
28502 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28503 Require IFN_VEC_SHL_INSERT for double reductions on
28504 variable-length vectors, or SLP reductions that have
28505 a neutral value. Require can_duplicate_and_interleave_p
28506 support for variable-length unchained SLP reductions if there
28507 is no neutral value, such as for MIN/MAX reductions. Also require
28508 the number of vector elements to be a multiple of the number of
28509 SLP statements when doing variable-length unchained SLP reductions.
28510 Update call to vect_create_epilog_for_reduction.
28511 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28512 and remove initial values.
28513 (duplicate_and_interleave): Make public.
28514 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28515 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28517 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28518 Alan Hayward <alan.hayward@arm.com>
28519 David Sherwood <david.sherwood@arm.com>
28521 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28522 (can_duplicate_and_interleave_p): New function.
28523 (vect_get_and_check_slp_defs): Take the vector of statements
28524 rather than just the current one. Remove excess parentheses.
28525 Restriction rejectinon of vect_constant_def and vect_external_def
28526 for variable-length vectors to boolean types, or types for which
28527 can_duplicate_and_interleave_p is false.
28528 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28529 (duplicate_and_interleave): New function.
28530 (vect_get_constant_vectors): Use gimple_build_vector for
28531 constant-length vectors and suitable variable-length constant
28532 vectors. Use duplicate_and_interleave for other variable-length
28533 vectors. Don't defer the update when inserting new statements.
28535 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28536 Alan Hayward <alan.hayward@arm.com>
28537 David Sherwood <david.sherwood@arm.com>
28539 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28540 min_profitable_iters doesn't go negative.
28542 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28543 Alan Hayward <alan.hayward@arm.com>
28544 David Sherwood <david.sherwood@arm.com>
28546 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28547 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28548 * optabs.def (vec_mask_load_lanes_optab): New optab.
28549 (vec_mask_store_lanes_optab): Likewise.
28550 * internal-fn.def (MASK_LOAD_LANES): New internal function.
28551 (MASK_STORE_LANES): Likewise.
28552 * internal-fn.c (mask_load_lanes_direct): New macro.
28553 (mask_store_lanes_direct): Likewise.
28554 (expand_mask_load_optab_fn): Handle masked operations.
28555 (expand_mask_load_lanes_optab_fn): New macro.
28556 (expand_mask_store_optab_fn): Handle masked operations.
28557 (expand_mask_store_lanes_optab_fn): New macro.
28558 (direct_mask_load_lanes_optab_supported_p): Likewise.
28559 (direct_mask_store_lanes_optab_supported_p): Likewise.
28560 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28562 (vect_load_lanes_supported): Likewise.
28563 * tree-vect-data-refs.c (strip_conversion): New function.
28564 (can_group_stmts_p): Likewise.
28565 (vect_analyze_data_ref_accesses): Use it instead of checking
28566 for a pair of assignments.
28567 (vect_store_lanes_supported): Take a masked_p parameter.
28568 (vect_load_lanes_supported): Likewise.
28569 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28570 vect_store_lanes_supported and vect_load_lanes_supported.
28571 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28572 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28573 parameter. Don't allow gaps for masked accesses.
28574 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
28575 and vect_load_lanes_supported.
28576 (get_load_store_type): Take a masked_p parameter and update
28577 call to get_group_load_store_type.
28578 (vectorizable_store): Update call to get_load_store_type.
28579 Handle IFN_MASK_STORE_LANES.
28580 (vectorizable_load): Update call to get_load_store_type.
28581 Handle IFN_MASK_LOAD_LANES.
28583 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28584 Alan Hayward <alan.hayward@arm.com>
28585 David Sherwood <david.sherwood@arm.com>
28587 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28589 * config/aarch64/aarch64-protos.h
28590 (aarch64_sve_struct_memory_operand_p): Declare.
28591 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28592 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28593 (VPRED, vpred): Handle SVE structure modes.
28594 * config/aarch64/constraints.md (Utx): New constraint.
28595 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28596 (aarch64_sve_struct_nonimmediate_operand): New predicates.
28597 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28598 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28599 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28600 structure modes. Split into pieces after RA.
28601 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28602 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28604 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28605 SVE structure modes.
28606 (aarch64_classify_address): Likewise.
28607 (sizetochar): Move earlier in file.
28608 (aarch64_print_operand): Handle SVE register lists.
28609 (aarch64_array_mode): New function.
28610 (aarch64_sve_struct_memory_operand_p): Likewise.
28611 (TARGET_ARRAY_MODE): Redefine.
28613 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28614 Alan Hayward <alan.hayward@arm.com>
28615 David Sherwood <david.sherwood@arm.com>
28617 * target.def (array_mode): New target hook.
28618 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28619 * doc/tm.texi: Regenerate.
28620 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28621 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28622 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28623 targetm.array_mode.
28624 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28628 Alan Hayward <alan.hayward@arm.com>
28629 David Sherwood <david.sherwood@arm.com>
28631 * fold-const.c (fold_binary_loc): Check the argument types
28632 rather than the result type when testing for a vector operation.
28634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28636 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28637 * doc/tm.texi: Regenerate.
28639 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28640 Alan Hayward <alan.hayward@arm.com>
28641 David Sherwood <david.sherwood@arm.com>
28643 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28644 (sve): Document new AArch64 extension.
28645 * doc/md.texi (w): Extend the description of the AArch64
28646 constraint to include SVE vectors.
28647 (Upl, Upa): Document new AArch64 predicate constraints.
28648 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28650 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28651 (msve-vector-bits=): New option.
28652 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28653 SVE when these are disabled.
28654 (sve): New extension.
28655 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28656 modes. Adjust their number of units based on aarch64_sve_vg.
28657 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28658 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28659 aarch64_addr_query_type.
28660 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28661 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28662 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28663 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28664 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28665 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28666 (aarch64_simd_imm_zero_p): Delete.
28667 (aarch64_check_zero_based_sve_index_immediate): Declare.
28668 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28669 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28670 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28671 (aarch64_sve_float_mul_immediate_p): Likewise.
28672 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28673 rather than an rtx.
28674 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28675 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28676 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28677 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28678 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28679 (aarch64_regmode_natural_size): Likewise.
28680 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28681 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28683 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28684 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28685 for VG and the SVE predicate registers.
28686 (V_ALIASES): Add a "z"-prefixed alias.
28687 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28688 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28689 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28690 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28691 (REG_CLASS_NAMES): Add entries for them.
28692 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
28693 and the predicate registers.
28694 (aarch64_sve_vg): Declare.
28695 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28696 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28697 (REGMODE_NATURAL_SIZE): Define.
28698 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28700 * config/aarch64/aarch64.c: Include cfgrtl.h.
28701 (simd_immediate_info): Add a constructor for series vectors,
28702 and an associated step field.
28703 (aarch64_sve_vg): New variable.
28704 (aarch64_dbx_register_number): Handle VG and the predicate registers.
28705 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28706 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28707 (VEC_ANY_DATA, VEC_STRUCT): New constants.
28708 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28709 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28710 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28711 (aarch64_get_mask_mode): New functions.
28712 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28713 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28714 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
28715 predicate modes and predicate registers. Explicitly restrict
28716 GPRs to modes of 16 bytes or smaller. Only allow FP registers
28717 to store a vector mode if it is recognized by
28718 aarch64_classify_vector_mode.
28719 (aarch64_regmode_natural_size): New function.
28720 (aarch64_hard_regno_caller_save_mode): Return the original mode
28722 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28723 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28724 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28725 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28727 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
28728 does not overlap dest if the function is frame-related. Handle
28730 (aarch64_split_add_offset): New function.
28731 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28732 them aarch64_add_offset.
28733 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28734 and update call to aarch64_sub_sp.
28735 (aarch64_add_cfa_expression): New function.
28736 (aarch64_expand_prologue): Pass extra temporary registers to the
28737 functions above. Handle the case in which we need to emit new
28738 DW_CFA_expressions for registers that were originally saved
28739 relative to the stack pointer, but now have to be expressed
28740 relative to the frame pointer.
28741 (aarch64_output_mi_thunk): Pass extra temporary registers to the
28743 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
28744 IP0 and IP1 values for SVE frames.
28745 (aarch64_expand_vec_series): New function.
28746 (aarch64_expand_sve_widened_duplicate): Likewise.
28747 (aarch64_expand_sve_const_vector): Likewise.
28748 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28749 Handle SVE constants. Use emit_move_insn to move a force_const_mem
28750 into the register, rather than emitting a SET directly.
28751 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28752 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28753 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28754 (offset_9bit_signed_scaled_p): New functions.
28755 (aarch64_replicate_bitmask_imm): New function.
28756 (aarch64_bitmask_imm): Use it.
28757 (aarch64_cannot_force_const_mem): Reject expressions involving
28758 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
28759 (aarch64_classify_index): Handle SVE indices, by requiring
28760 a plain register index with a scale that matches the element size.
28761 (aarch64_classify_address): Handle SVE addresses. Assert that
28762 the mode of the address is VOIDmode or an integer mode.
28763 Update call to aarch64_classify_symbol.
28764 (aarch64_classify_symbolic_expression): Update call to
28765 aarch64_classify_symbol.
28766 (aarch64_const_vec_all_in_range_p): New function.
28767 (aarch64_print_vector_float_operand): Likewise.
28768 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28769 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28770 and the FP immediates 1.0 and 0.5.
28771 (aarch64_print_address_internal): Handle SVE addresses.
28772 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28773 (aarch64_regno_regclass): Handle predicate registers.
28774 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28776 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28777 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28778 (aarch64_convert_sve_vector_bits): New function.
28779 (aarch64_override_options): Use it to handle -msve-vector-bits=.
28780 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28781 rather than an rtx.
28782 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28783 Handle SVE vector and predicate modes. Accept VL-based constants
28784 that need only one temporary register, and VL offsets that require
28785 no temporary registers.
28786 (aarch64_conditional_register_usage): Mark the predicate registers
28787 as fixed if SVE isn't available.
28788 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28789 Return true for SVE vector and predicate modes.
28790 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28791 rather than an unsigned int. Handle SVE modes.
28792 (aarch64_preferred_simd_mode): Update call accordingly. Handle
28794 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28796 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28797 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28798 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28799 (aarch64_sve_float_mul_immediate_p): New functions.
28800 (aarch64_sve_valid_immediate): New function.
28801 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28802 Explicitly reject structure modes. Check for INDEX constants.
28803 Handle PTRUE and PFALSE constants.
28804 (aarch64_check_zero_based_sve_index_immediate): New function.
28805 (aarch64_simd_imm_zero_p): Delete.
28806 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28807 vector modes. Accept constants in the range of CNT[BHWD].
28808 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28809 ask for an Advanced SIMD mode.
28810 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28811 (aarch64_simd_vector_alignment): Handle SVE predicates.
28812 (aarch64_vectorize_preferred_vector_alignment): New function.
28813 (aarch64_simd_vector_alignment_reachable): Use it instead of
28815 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28816 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28818 (MAX_VECT_LEN): Delete.
28819 (expand_vec_perm_d): Add a vec_flags field.
28820 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28821 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28822 (aarch64_evpc_ext): Don't apply a big-endian lane correction
28824 (aarch64_evpc_rev): Rename to...
28825 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
28826 (aarch64_evpc_rev_global): New function.
28827 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28828 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28830 (aarch64_evpc_sve_tbl): New function.
28831 (aarch64_expand_vec_perm_const_1): Update after rename of
28832 aarch64_evpc_rev. Handle SVE permutes too, trying
28833 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28834 than aarch64_evpc_tbl.
28835 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28836 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28837 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28838 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28839 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28840 (aarch64_expand_sve_vcond): New functions.
28841 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28842 of aarch64_vector_mode_p.
28843 (aarch64_dwarf_poly_indeterminate_value): New function.
28844 (aarch64_compute_pressure_classes): Likewise.
28845 (aarch64_can_change_mode_class): Likewise.
28846 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28847 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28848 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28849 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28850 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28851 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28852 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28853 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28855 (Dn, Dl, Dr): Accept const as well as const_vector.
28856 (Dz): Likewise. Compare against CONST0_RTX.
28857 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28858 of "vector" where appropriate.
28859 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28860 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28861 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28862 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28863 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28864 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28865 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28866 (v_int_equiv): Extend to SVE modes.
28867 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28869 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28870 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28871 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28872 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28873 (SVE_COND_FP_CMP): New int iterators.
28874 (perm_hilo): Handle the new unpack unspecs.
28875 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28877 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28878 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28879 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28880 (aarch64_equality_operator, aarch64_constant_vector_operand)
28881 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28882 (aarch64_sve_nonimmediate_operand): Likewise.
28883 (aarch64_sve_general_operand): Likewise.
28884 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28885 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28886 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28887 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28888 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28889 (aarch64_sve_float_arith_immediate): Likewise.
28890 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28891 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28892 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28893 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28894 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28895 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28896 (aarch64_sve_float_arith_operand): Likewise.
28897 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28898 (aarch64_sve_float_mul_operand): Likewise.
28899 (aarch64_sve_vec_perm_operand): Likewise.
28900 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28901 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28902 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28903 as well as const_vector.
28904 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28905 in file. Use CONST0_RTX and CONSTM1_RTX.
28906 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28907 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28908 Use aarch64_simd_imm_zero.
28909 * config/aarch64/aarch64-sve.md: New file.
28910 * config/aarch64/aarch64.md: Include it.
28911 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28912 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28913 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28914 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28915 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28916 (sve): New attribute.
28917 (enabled): Disable instructions with the sve attribute unless
28919 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28920 aarch64_expand_mov_immediate.
28921 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28922 CNT[BHSD] immediates.
28923 (movti): Split CONST_POLY_INT moves into two halves.
28924 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28925 Split additions that need a temporary here if the destination
28926 is the stack pointer.
28927 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28928 (*add<mode>3_poly_1): New instruction.
28929 (set_clobber_cc): New expander.
28931 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28933 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28934 parameter and use it instead of GET_MODE_SIZE (innermode). Use
28935 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28936 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28937 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
28938 Change innermode from fixed_mode_size to machine_mode.
28939 (simplify_subreg): Update call accordingly. Handle a constant-sized
28940 subreg of a variable-length CONST_VECTOR.
28942 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28943 Alan Hayward <alan.hayward@arm.com>
28944 David Sherwood <david.sherwood@arm.com>
28946 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28947 (add_offset_to_base): New function, split out from...
28948 (create_mem_ref): ...here. When handling a scale other than 1,
28949 check first whether the address is valid without the offset.
28950 Add it into the base if so, leaving the index and scale as-is.
28952 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28955 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28956 fold_for_warn before checking if arg2 is INTEGER_CST.
28958 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
28960 * config/rs6000/predicates.md (load_multiple_operation): Delete.
28961 (store_multiple_operation): Delete.
28962 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28963 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28964 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28965 guarded by TARGET_STRING.
28966 (rs6000_output_load_multiple): Delete.
28967 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28968 OPTION_MASK_STRING / TARGET_STRING handling.
28969 (print_operand) <'N', 'O'>: Add comment that these are unused now.
28970 (const rs6000_opt_masks) <"string">: Change mask to 0.
28971 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28972 (MASK_STRING): Delete.
28973 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28975 (load_multiple): Delete.
28982 (store_multiple): Delete.
28989 (movmemsi_8reg): Delete.
28990 (corresponding unnamed define_insn): Delete.
28991 (movmemsi_6reg): Delete.
28992 (corresponding unnamed define_insn): Delete.
28993 (movmemsi_4reg): Delete.
28994 (corresponding unnamed define_insn): Delete.
28995 (movmemsi_2reg): Delete.
28996 (corresponding unnamed define_insn): Delete.
28997 (movmemsi_1reg): Delete.
28998 (corresponding unnamed define_insn): Delete.
28999 * config/rs6000/rs6000.opt (mno-string): New.
29000 (mstring): Replace by deprecation warning stub.
29001 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29003 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29005 * regrename.c (regrename_do_replace): If replacing the same
29006 reg multiple times, try to reuse last created gen_raw_REG.
29009 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29010 main to workaround a bug in GDB.
29012 2018-01-12 Tom de Vries <tom@codesourcery.com>
29015 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29017 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29019 PR rtl-optimization/80481
29020 * ira-color.c (get_cap_member): New function.
29021 (allocnos_conflict_by_live_ranges_p): Use it.
29022 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29023 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29025 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29028 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29029 (*saddl_se_1): Ditto.
29030 (*ssubsi_1): Ditto.
29031 (*ssubl_se_1): Ditto.
29033 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29035 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29036 rather than wi::to_widest for DR_INITs.
29037 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29038 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29039 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29041 (vect_analyze_group_access_1): Note that here.
29043 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29045 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29046 polynomial type sizes.
29048 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29050 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29051 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29052 (gimple_add_tmp_var): Likewise.
29054 2018-01-12 Martin Liska <mliska@suse.cz>
29056 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29057 (gimple_alloc_sizes): Likewise.
29058 (dump_gimple_statistics): Use PRIu64 in printf format.
29059 * gimple.h: Change uint64_t to int.
29061 2018-01-12 Martin Liska <mliska@suse.cz>
29063 * tree-core.h: Use uint64_t instead of int.
29064 * tree.c (tree_node_counts): Likewise.
29065 (tree_node_sizes): Likewise.
29066 (dump_tree_statistics): Use PRIu64 in printf format.
29068 2018-01-12 Martin Liska <mliska@suse.cz>
29070 * Makefile.in: As qsort_chk is implemented in vec.c, add
29071 vec.o to linkage of gencfn-macros.
29072 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29073 passing the info to record_node_allocation_statistics.
29074 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29076 * ggc-common.c (struct ggc_usage): Add operator== and use
29077 it in operator< and compare function.
29078 * mem-stats.h (struct mem_usage): Likewise.
29079 * vec.c (struct vec_usage): Remove operator< and compare
29080 function. Can be simply inherited.
29082 2018-01-12 Martin Jambor <mjambor@suse.cz>
29085 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29086 * tree-ssa-math-opts.c: Include domwalk.h.
29087 (convert_mult_to_fma_1): New function.
29088 (fma_transformation_info): New type.
29089 (fma_deferring_state): Likewise.
29090 (cancel_fma_deferring): New function.
29091 (result_of_phi): Likewise.
29092 (last_fma_candidate_feeds_initial_phi): Likewise.
29093 (convert_mult_to_fma): Added deferring logic, split actual
29094 transformation to convert_mult_to_fma_1.
29095 (math_opts_dom_walker): New type.
29096 (math_opts_dom_walker::after_dom_children): New method, body moved
29097 here from pass_optimize_widening_mul::execute, added deferring logic
29099 (pass_optimize_widening_mul::execute): Moved most of code to
29100 math_opts_dom_walker::after_dom_children.
29101 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29102 * config/i386/i386.c (ix86_option_override_internal): Added
29103 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29105 2018-01-12 Richard Biener <rguenther@suse.de>
29108 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29109 inline instance vars.
29111 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29114 * config/rx/rx.c (rx_is_restricted_memory_address):
29115 Handle SUBREG case.
29117 2018-01-12 Richard Biener <rguenther@suse.de>
29119 PR tree-optimization/80846
29120 * target.def (split_reduction): New target hook.
29121 * targhooks.c (default_split_reduction): New function.
29122 * targhooks.h (default_split_reduction): Declare.
29123 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29124 target requests first reduce vectors by combining low and high
29126 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29127 (get_vectype_for_scalar_type_and_size): Export.
29128 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29129 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29130 * doc/tm.texi: Regenerate.
29131 * config/i386/i386.c (ix86_split_reduction): Implement
29132 TARGET_VECTORIZE_SPLIT_REDUCTION.
29134 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29137 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29138 in PIC mode except for TARGET_VXWORKS_RTP.
29139 * config/sparc/sparc.c: Include cfgrtl.h.
29140 (TARGET_INIT_PIC_REG): Define.
29141 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29142 (sparc_pic_register_p): New predicate.
29143 (sparc_legitimate_address_p): Use it.
29144 (sparc_legitimize_pic_address): Likewise.
29145 (sparc_delegitimize_address): Likewise.
29146 (sparc_mode_dependent_address_p): Likewise.
29147 (gen_load_pcrel_sym): Remove 4th parameter.
29148 (load_got_register): Adjust call to above. Remove obsolete stuff.
29149 (sparc_expand_prologue): Do not call load_got_register here.
29150 (sparc_flat_expand_prologue): Likewise.
29151 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29152 (sparc_use_pseudo_pic_reg): New function.
29153 (sparc_init_pic_reg): Likewise.
29154 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29155 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29157 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29159 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29160 Add item for branch_cost.
29162 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29164 PR rtl-optimization/83565
29165 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29166 not extend the result to a larger mode for rotate operations.
29167 (num_sign_bit_copies1): Likewise.
29169 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29172 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29174 Use values-Xc.o for -pedantic.
29175 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29177 2018-01-12 Martin Liska <mliska@suse.cz>
29180 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29182 (possible_polymorphic_call_targets): Use it.
29183 (ipa_devirt): Likewise.
29185 2018-01-12 Martin Liska <mliska@suse.cz>
29187 * profile-count.h (enum profile_quality): Use 0 as invalid
29188 enum value of profile_quality.
29190 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29192 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29193 -mext-string options.
29195 2018-01-12 Richard Biener <rguenther@suse.de>
29197 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29198 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29199 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29201 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29203 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29205 * configure.ac (--with-long-double-format): Add support for the
29206 configuration option to change the default long double format on
29208 * config.gcc (powerpc*-linux*-*): Likewise.
29209 * configure: Regenerate.
29210 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29211 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29212 used without modification.
29214 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29216 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29217 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29218 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29219 MISC_BUILTIN_SPEC_BARRIER.
29220 (rs6000_init_builtins): Likewise.
29221 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29223 (speculation_barrier): New define_insn.
29224 * doc/extend.texi: Document __builtin_speculation_barrier.
29226 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29229 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29230 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29231 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29233 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29234 integral modes instead of "ss" and "sd".
29235 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29236 vectors with 32-bit and 64-bit elements.
29237 (vecdupssescalarmodesuffix): New mode attribute.
29238 (vec_dup<mode>): Use it.
29240 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29243 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29244 frame if argument is passed on stack.
29246 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29249 * ree.c (combine_reaching_defs): Optimize also
29250 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29251 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29253 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29255 PR middle-end/83189
29256 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29258 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29260 PR middle-end/83718
29261 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29262 after they are computed.
29264 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29266 PR tree-optimization/83695
29267 * gimple-loop-linterchange.cc
29268 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29269 reset cached scev information after interchange.
29270 (pass_linterchange::execute): Remove call to scev_reset_htab.
29272 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29274 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29275 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29276 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29277 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29278 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29279 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29280 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29281 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29282 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29283 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29284 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29285 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29286 (V_lane_reg): Likewise.
29287 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29289 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29290 (vfmal_lane_low<mode>_intrinsic,
29291 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29292 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29293 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29294 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29295 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29296 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29298 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29300 * config/arm/arm-cpus.in (fp16fml): New feature.
29301 (ALL_SIMD): Add fp16fml.
29302 (armv8.2-a): Add fp16fml as an option.
29303 (armv8.3-a): Likewise.
29304 (armv8.4-a): Add fp16fml as part of fp16.
29305 * config/arm/arm.h (TARGET_FP16FML): Define.
29306 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29308 * config/arm/arm-modes.def (V2HF): Define.
29309 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29310 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29311 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29312 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29313 vfmsl_low, vfmsl_high): New set of builtins.
29314 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29315 (vfml_op): New code attribute.
29316 (VFMLHALVES): New int iterator.
29317 (VFML, VFMLSEL): New mode attributes.
29318 (V_reg): Define mapping for V2HF.
29319 (V_hi, V_lo): New mode attributes.
29320 (VF_constraint): Likewise.
29321 (vfml_half, vfml_half_selector): New int attributes.
29322 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29324 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29325 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29327 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29328 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29329 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29330 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29332 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29333 Document new effective target and option set.
29335 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29337 * config/arm/arm-cpus.in (armv8_4): New feature.
29338 (ARMv8_4a): New fgroup.
29339 (armv8.4-a): New arch.
29340 * config/arm/arm-tables.opt: Regenerate.
29341 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29342 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29343 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29344 Add matching rules for -march=armv8.4-a and extensions.
29345 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29347 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29350 * config/rx/rx.md (BW): New mode attribute.
29351 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29353 2018-01-11 Richard Biener <rguenther@suse.de>
29355 PR tree-optimization/83435
29356 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29357 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29358 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29360 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29361 Alan Hayward <alan.hayward@arm.com>
29362 David Sherwood <david.sherwood@arm.com>
29364 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29366 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29367 (aarch64_print_address_internal): Use it to check for a zero offset.
29369 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29370 Alan Hayward <alan.hayward@arm.com>
29371 David Sherwood <david.sherwood@arm.com>
29373 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29374 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29375 Return a poly_int64 rather than a HOST_WIDE_INT.
29376 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29377 rather than a HOST_WIDE_INT.
29378 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29379 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29380 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29381 final_offset from HOST_WIDE_INT to poly_int64.
29382 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29383 to_constant when getting the number of units in an Advanced SIMD
29385 (aarch64_builtin_vectorized_function): Check for a constant number
29387 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29389 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29390 attribute instead of GET_MODE_NUNITS.
29391 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29392 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29393 GET_MODE_SIZE for fixed-size registers.
29394 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29395 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29396 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29397 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29398 (aarch64_print_operand, aarch64_print_address_internal)
29399 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29400 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29401 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29402 Handle polynomial GET_MODE_SIZE.
29403 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29404 wider than SImode without modification.
29405 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29406 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29407 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29408 passing and returning SVE modes.
29409 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29410 rather than GEN_INT.
29411 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29412 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29413 (aarch64_allocate_and_probe_stack_space): Likewise.
29414 (aarch64_layout_frame): Cope with polynomial offsets.
29415 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29416 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29417 polynomial offsets.
29418 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29419 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29420 poly_int64 rather than a HOST_WIDE_INT.
29421 (aarch64_get_separate_components, aarch64_process_components)
29422 (aarch64_expand_prologue, aarch64_expand_epilogue)
29423 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29424 (aarch64_anchor_offset): New function, split out from...
29425 (aarch64_legitimize_address): ...here.
29426 (aarch64_builtin_vectorization_cost): Handle polynomial
29427 TYPE_VECTOR_SUBPARTS.
29428 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29430 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29431 number of elements from the PARALLEL rather than the mode.
29432 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29433 rather than GET_MODE_BITSIZE.
29434 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29435 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29436 (aarch64_expand_vec_perm_const_1): Handle polynomial
29437 d->perm.length () and d->perm elements.
29438 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29439 Apply to_constant to d->perm elements.
29440 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29441 polynomial CONST_VECTOR_NUNITS.
29442 (aarch64_move_pointer): Take amount as a poly_int64 rather
29444 (aarch64_progress_pointer): Avoid temporary variable.
29445 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29446 the mode attribute instead of GET_MODE.
29448 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29449 Alan Hayward <alan.hayward@arm.com>
29450 David Sherwood <david.sherwood@arm.com>
29452 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29453 x exists before using it.
29454 (aarch64_add_constant_internal): Rename to...
29455 (aarch64_add_offset_1): ...this. Replace regnum with separate
29456 src and dest rtxes. Handle the case in which they're different,
29457 including when the offset is zero. Replace scratchreg with an rtx.
29458 Use 2 additions if there is no spare register into which we can
29459 move a 16-bit constant.
29460 (aarch64_add_constant): Delete.
29461 (aarch64_add_offset): Replace reg with separate src and dest
29462 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29463 Use aarch64_add_offset_1.
29464 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29465 an rtx rather than an int. Take the delta as a poly_int64
29466 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29467 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29468 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29469 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29470 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29471 and aarch64_add_sp.
29472 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29473 aarch64_add_constant.
29475 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29477 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29478 Use scalar_float_mode.
29480 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29482 * config/aarch64/aarch64-simd.md
29483 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29484 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29485 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29486 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29487 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29488 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29489 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29490 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29491 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29492 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29494 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29497 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29498 targ_options->x_arm_arch_string is non NULL.
29500 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29502 * config/aarch64/aarch64.h
29503 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29505 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29508 * expmed.c (emit_store_flag_force): Swap if const op0
29509 and change VOIDmode to mode of op0.
29511 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29513 PR rtl-optimization/83761
29514 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29515 than bytes to mode_for_size.
29517 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29519 PR middle-end/83189
29520 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29521 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29524 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29526 PR middle-end/83575
29527 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29528 when in layout mode.
29529 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29530 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29533 2018-01-10 Michael Collison <michael.collison@arm.com>
29535 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29536 * config/aarch64/aarch64-option-extension.def: Add
29537 AARCH64_OPT_EXTENSION of 'fp16fml'.
29538 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29539 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29540 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29541 * config/aarch64/constraints.md (Ui7): New constraint.
29542 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29543 (VFMLA_SEL_W): Ditto.
29546 (VFMLA16_LOW): New int iterator.
29547 (VFMLA16_HIGH): Ditto.
29548 (UNSPEC_FMLAL): New unspec.
29549 (UNSPEC_FMLSL): Ditto.
29550 (UNSPEC_FMLAL2): Ditto.
29551 (UNSPEC_FMLSL2): Ditto.
29552 (f16mac): New code attribute.
29553 * config/aarch64/aarch64-simd-builtins.def
29554 (aarch64_fmlal_lowv2sf): Ditto.
29555 (aarch64_fmlsl_lowv2sf): Ditto.
29556 (aarch64_fmlalq_lowv4sf): Ditto.
29557 (aarch64_fmlslq_lowv4sf): Ditto.
29558 (aarch64_fmlal_highv2sf): Ditto.
29559 (aarch64_fmlsl_highv2sf): Ditto.
29560 (aarch64_fmlalq_highv4sf): Ditto.
29561 (aarch64_fmlslq_highv4sf): Ditto.
29562 (aarch64_fmlal_lane_lowv2sf): Ditto.
29563 (aarch64_fmlsl_lane_lowv2sf): Ditto.
29564 (aarch64_fmlal_laneq_lowv2sf): Ditto.
29565 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29566 (aarch64_fmlalq_lane_lowv4sf): Ditto.
29567 (aarch64_fmlsl_lane_lowv4sf): Ditto.
29568 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29569 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29570 (aarch64_fmlal_lane_highv2sf): Ditto.
29571 (aarch64_fmlsl_lane_highv2sf): Ditto.
29572 (aarch64_fmlal_laneq_highv2sf): Ditto.
29573 (aarch64_fmlsl_laneq_highv2sf): Ditto.
29574 (aarch64_fmlalq_lane_highv4sf): Ditto.
29575 (aarch64_fmlsl_lane_highv4sf): Ditto.
29576 (aarch64_fmlalq_laneq_highv4sf): Ditto.
29577 (aarch64_fmlsl_laneq_highv4sf): Ditto.
29578 * config/aarch64/aarch64-simd.md:
29579 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29580 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29581 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29582 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29583 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29584 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29585 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29586 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29587 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29588 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29589 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29590 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29591 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29592 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29593 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29594 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29595 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29596 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29597 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29598 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29599 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29600 (vfmlsl_low_u32): Ditto.
29601 (vfmlalq_low_u32): Ditto.
29602 (vfmlslq_low_u32): Ditto.
29603 (vfmlal_high_u32): Ditto.
29604 (vfmlsl_high_u32): Ditto.
29605 (vfmlalq_high_u32): Ditto.
29606 (vfmlslq_high_u32): Ditto.
29607 (vfmlal_lane_low_u32): Ditto.
29608 (vfmlsl_lane_low_u32): Ditto.
29609 (vfmlal_laneq_low_u32): Ditto.
29610 (vfmlsl_laneq_low_u32): Ditto.
29611 (vfmlalq_lane_low_u32): Ditto.
29612 (vfmlslq_lane_low_u32): Ditto.
29613 (vfmlalq_laneq_low_u32): Ditto.
29614 (vfmlslq_laneq_low_u32): Ditto.
29615 (vfmlal_lane_high_u32): Ditto.
29616 (vfmlsl_lane_high_u32): Ditto.
29617 (vfmlal_laneq_high_u32): Ditto.
29618 (vfmlsl_laneq_high_u32): Ditto.
29619 (vfmlalq_lane_high_u32): Ditto.
29620 (vfmlslq_lane_high_u32): Ditto.
29621 (vfmlalq_laneq_high_u32): Ditto.
29622 (vfmlslq_laneq_high_u32): Ditto.
29623 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29624 (AARCH64_FL_FOR_ARCH8_4): New.
29625 (AARCH64_ISA_F16FML): New ISA flag.
29626 (TARGET_F16FML): New feature flag for fp16fml.
29627 (doc/invoke.texi): Document new fp16fml option.
29629 2018-01-10 Michael Collison <michael.collison@arm.com>
29631 * config/aarch64/aarch64-builtins.c:
29632 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29633 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29634 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29635 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29636 (AARCH64_ISA_SHA3): New ISA flag.
29637 (TARGET_SHA3): New feature flag for sha3.
29638 * config/aarch64/iterators.md (sha512_op): New int attribute.
29639 (CRYPTO_SHA512): New int iterator.
29640 (UNSPEC_SHA512H): New unspec.
29641 (UNSPEC_SHA512H2): Ditto.
29642 (UNSPEC_SHA512SU0): Ditto.
29643 (UNSPEC_SHA512SU1): Ditto.
29644 * config/aarch64/aarch64-simd-builtins.def
29645 (aarch64_crypto_sha512hqv2di): New builtin.
29646 (aarch64_crypto_sha512h2qv2di): Ditto.
29647 (aarch64_crypto_sha512su0qv2di): Ditto.
29648 (aarch64_crypto_sha512su1qv2di): Ditto.
29649 (aarch64_eor3qv8hi): Ditto.
29650 (aarch64_rax1qv2di): Ditto.
29651 (aarch64_xarqv2di): Ditto.
29652 (aarch64_bcaxqv8hi): Ditto.
29653 * config/aarch64/aarch64-simd.md:
29654 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29655 (aarch64_crypto_sha512su0qv2di): Ditto.
29656 (aarch64_crypto_sha512su1qv2di): Ditto.
29657 (aarch64_eor3qv8hi): Ditto.
29658 (aarch64_rax1qv2di): Ditto.
29659 (aarch64_xarqv2di): Ditto.
29660 (aarch64_bcaxqv8hi): Ditto.
29661 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29662 (vsha512h2q_u64): Ditto.
29663 (vsha512su0q_u64): Ditto.
29664 (vsha512su1q_u64): Ditto.
29665 (veor3q_u16): Ditto.
29666 (vrax1q_u64): Ditto.
29667 (vxarq_u64): Ditto.
29668 (vbcaxq_u16): Ditto.
29669 * config/arm/types.md (crypto_sha512): New type attribute.
29670 (crypto_sha3): Ditto.
29671 (doc/invoke.texi): Document new sha3 option.
29673 2018-01-10 Michael Collison <michael.collison@arm.com>
29675 * config/aarch64/aarch64-builtins.c:
29676 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29677 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29678 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29679 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29680 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29681 (AARCH64_ISA_SM4): New ISA flag.
29682 (TARGET_SM4): New feature flag for sm4.
29683 * config/aarch64/aarch64-simd-builtins.def
29684 (aarch64_sm3ss1qv4si): Ditto.
29685 (aarch64_sm3tt1aq4si): Ditto.
29686 (aarch64_sm3tt1bq4si): Ditto.
29687 (aarch64_sm3tt2aq4si): Ditto.
29688 (aarch64_sm3tt2bq4si): Ditto.
29689 (aarch64_sm3partw1qv4si): Ditto.
29690 (aarch64_sm3partw2qv4si): Ditto.
29691 (aarch64_sm4eqv4si): Ditto.
29692 (aarch64_sm4ekeyqv4si): Ditto.
29693 * config/aarch64/aarch64-simd.md:
29694 (aarch64_sm3ss1qv4si): Ditto.
29695 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29696 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29697 (aarch64_sm4eqv4si): Ditto.
29698 (aarch64_sm4ekeyqv4si): Ditto.
29699 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29700 (sm3part_op): Ditto.
29701 (CRYPTO_SM3TT): Ditto.
29702 (CRYPTO_SM3PART): Ditto.
29703 (UNSPEC_SM3SS1): New unspec.
29704 (UNSPEC_SM3TT1A): Ditto.
29705 (UNSPEC_SM3TT1B): Ditto.
29706 (UNSPEC_SM3TT2A): Ditto.
29707 (UNSPEC_SM3TT2B): Ditto.
29708 (UNSPEC_SM3PARTW1): Ditto.
29709 (UNSPEC_SM3PARTW2): Ditto.
29710 (UNSPEC_SM4E): Ditto.
29711 (UNSPEC_SM4EKEY): Ditto.
29712 * config/aarch64/constraints.md (Ui2): New constraint.
29713 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29714 * config/arm/types.md (crypto_sm3): New type attribute.
29715 (crypto_sm4): Ditto.
29716 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29717 (vsm3tt1aq_u32): Ditto.
29718 (vsm3tt1bq_u32): Ditto.
29719 (vsm3tt2aq_u32): Ditto.
29720 (vsm3tt2bq_u32): Ditto.
29721 (vsm3partw1q_u32): Ditto.
29722 (vsm3partw2q_u32): Ditto.
29723 (vsm4eq_u32): Ditto.
29724 (vsm4ekeyq_u32): Ditto.
29725 (doc/invoke.texi): Document new sm4 option.
29727 2018-01-10 Michael Collison <michael.collison@arm.com>
29729 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29730 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29731 (AARCH64_FL_FOR_ARCH8_4): New.
29732 (AARCH64_FL_V8_4): New flag.
29733 (doc/invoke.texi): Document new armv8.4-a option.
29735 2018-01-10 Michael Collison <michael.collison@arm.com>
29737 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29738 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29739 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29740 * config/aarch64/aarch64-option-extension.def: Add
29741 AARCH64_OPT_EXTENSION of 'sha2'.
29742 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29743 (crypto): Disable sha2 and aes if crypto disabled.
29744 (crypto): Enable aes and sha2 if enabled.
29745 (simd): Disable sha2 and aes if simd disabled.
29746 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29748 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29749 (TARGET_SHA2): New feature flag for sha2.
29750 (TARGET_AES): New feature flag for aes.
29751 * config/aarch64/aarch64-simd.md:
29752 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29753 conditional on TARGET_AES.
29754 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29755 (aarch64_crypto_sha1hsi): Make pattern conditional
29757 (aarch64_crypto_sha1hv4si): Ditto.
29758 (aarch64_be_crypto_sha1hv4si): Ditto.
29759 (aarch64_crypto_sha1su1v4si): Ditto.
29760 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29761 (aarch64_crypto_sha1su0v4si): Ditto.
29762 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29763 (aarch64_crypto_sha256su0v4si): Ditto.
29764 (aarch64_crypto_sha256su1v4si): Ditto.
29765 (doc/invoke.texi): Document new aes and sha2 options.
29767 2018-01-10 Martin Sebor <msebor@redhat.com>
29769 PR tree-optimization/83781
29770 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29773 2018-01-11 Martin Sebor <msebor@gmail.com>
29774 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29776 PR tree-optimization/83501
29777 PR tree-optimization/81703
29779 * tree-ssa-strlen.c (get_string_cst): Rename...
29780 (get_string_len): ...to this. Handle global constants.
29781 (handle_char_store): Adjust.
29783 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
29784 Jim Wilson <jimw@sifive.com>
29786 * config/riscv/riscv-protos.h (riscv_output_return): New.
29787 * config/riscv/riscv.c (struct machine_function): New naked_p field.
29788 (riscv_attribute_table, riscv_output_return),
29789 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29790 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29791 (riscv_compute_frame_info): Only compute frame->mask if not a naked
29793 (riscv_expand_prologue): Add early return for naked function.
29794 (riscv_expand_epilogue): Likewise.
29795 (riscv_function_ok_for_sibcall): Return false for naked function.
29796 (riscv_set_current_function): New.
29797 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29798 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29799 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29800 * doc/extend.texi (RISC-V Function Attributes): New.
29802 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
29804 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29805 check for 128-bit long double before checking TCmode.
29806 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29807 128-bit long doubles before checking TFmode or TCmode.
29808 (FLOAT128_IBM_P): Likewise.
29810 2018-01-10 Martin Sebor <msebor@redhat.com>
29812 PR tree-optimization/83671
29813 * builtins.c (c_strlen): Unconditionally return zero for the empty
29815 Use -Warray-bounds for warnings.
29816 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29817 for non-constant array indices with COMPONENT_REF, arrays of
29818 arrays, and pointers to arrays.
29819 (gimple_fold_builtin_strlen): Determine and set length range for
29820 non-constant character arrays.
29822 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
29824 PR middle-end/81897
29825 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29828 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
29830 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29832 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29835 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29836 VECTOR_MEM_ALTIVEC_OR_VSX_P.
29837 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29838 indexed_or_indirect_operand predicate.
29839 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29840 (*vsx_le_perm_load_v8hi): Likewise.
29841 (*vsx_le_perm_load_v16qi): Likewise.
29842 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29843 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29844 (*vsx_le_perm_store_v8hi): Likewise.
29845 (*vsx_le_perm_store_v16qi): Likewise.
29846 (eight unnamed splitters): Likewise.
29848 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29850 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29851 * config/rs6000/emmintrin.h: Likewise.
29852 * config/rs6000/mmintrin.h: Likewise.
29853 * config/rs6000/xmmintrin.h: Likewise.
29855 2018-01-10 David Malcolm <dmalcolm@redhat.com>
29858 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29860 * tree.c (tree_nop_conversion): Return true for location wrapper
29862 (maybe_wrap_with_location): New function.
29863 (selftest::check_strip_nops): New function.
29864 (selftest::test_location_wrappers): New function.
29865 (selftest::tree_c_tests): Call it.
29866 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29867 (maybe_wrap_with_location): New decl.
29868 (EXPR_LOCATION_WRAPPER_P): New macro.
29869 (location_wrapper_p): New inline function.
29870 (tree_strip_any_location_wrapper): New inline function.
29872 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29875 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29876 stack_realign_offset for the largest alignment of stack slot
29878 (ix86_find_max_used_stack_alignment): New function.
29879 (ix86_finalize_stack_frame_flags): Use it. Set
29880 max_used_stack_alignment if we don't realign stack.
29881 * config/i386/i386.h (machine_function): Add
29882 max_used_stack_alignment.
29884 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29886 * config/arm/arm.opt (-mbranch-cost): New option.
29887 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29890 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29893 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29894 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29896 2018-01-10 Richard Biener <rguenther@suse.de>
29899 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29900 early out so it also covers the case where we have a non-NULL
29903 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29905 PR tree-optimization/83753
29906 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29907 for non-strided grouped accesses if the number of elements is 1.
29909 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29912 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29913 * i386.h (TARGET_USE_GATHER): Define.
29914 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29916 2018-01-10 Martin Liska <mliska@suse.cz>
29919 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29920 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29922 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29923 CLEANUP_NO_PARTITIONING is not set.
29925 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29927 * doc/rtl.texi: Remove documentation of (const ...) wrappers
29928 for vectors, as a partial revert of r254296.
29929 * rtl.h (const_vec_p): Delete.
29930 (const_vec_duplicate_p): Don't test for vector CONSTs.
29931 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29932 * expmed.c (make_tree): Likewise.
29935 * common.md (E, F): Use CONSTANT_P instead of checking for
29937 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29938 checking for CONST_VECTOR.
29940 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29942 PR middle-end/83575
29943 * predict.c (force_edge_cold): Handle in more sane way edges
29944 with no prediction.
29946 2018-01-09 Carl Love <cel@us.ibm.com>
29948 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29950 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29951 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29952 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29953 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
29954 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29955 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
29956 * config/rs6000/rs6000-protos.h: Add extern defition for
29957 rs6000_generate_float2_double_code.
29958 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29960 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29961 (float2_v2df): Add define_expand.
29963 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
29966 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29967 op_mode in the force_to_mode call.
29969 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29971 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29972 instead of checking each element individually.
29973 (aarch64_evpc_uzp): Likewise.
29974 (aarch64_evpc_zip): Likewise.
29975 (aarch64_evpc_ext): Likewise.
29976 (aarch64_evpc_rev): Likewise.
29977 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29978 instead of checking each element individually. Return true without
29980 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29981 whether all selected elements come from the same input, instead of
29982 checking each element individually. Remove calls to gen_rtx_REG,
29983 start_sequence and end_sequence and instead assert that no rtl is
29986 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29988 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29989 order of HIGH and CONST checks.
29991 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29993 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29994 if the destination isn't an SSA_NAME.
29996 2018-01-09 Richard Biener <rguenther@suse.de>
29998 PR tree-optimization/83668
29999 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30001 (canonicalize_loop_form): ... here, renamed from ...
30002 (canonicalize_loop_closed_ssa_form): ... this and amended to
30003 swap successor edges for loop exit blocks to make us use
30004 the RPO order we need for initial schedule generation.
30006 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30008 PR tree-optimization/64811
30009 * match.pd: When optimizing comparisons with Inf, avoid
30010 introducing or losing exceptions from comparisons with NaN.
30012 2018-01-09 Martin Liska <mliska@suse.cz>
30015 * asan.c (shadow_mem_size): Add gcc_assert.
30017 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30019 Don't save registers in main().
30022 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30023 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30024 * config/avr/avr.c (avr_set_current_function): Don't error if
30025 naked, OS_task or OS_main are specified at the same time.
30026 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30028 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30030 * common/config/avr/avr-common.c (avr_option_optimization_table):
30031 Switch on -mmain-is-OS_task for optimizing compilations.
30033 2018-01-09 Richard Biener <rguenther@suse.de>
30035 PR tree-optimization/83572
30036 * graphite.c: Include cfganal.h.
30037 (graphite_transform_loops): Connect infinite loops to exit
30038 and remove fake edges at the end.
30040 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30042 * ipa-inline.c (edge_badness): Revert accidental checkin.
30044 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30047 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30048 symbols; not inline clones.
30050 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30053 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30054 hard registers. Formatting fixes.
30056 PR preprocessor/83722
30057 * gcc.c (try_generate_repro): Pass
30058 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30059 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30062 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30063 Kito Cheng <kito.cheng@gmail.com>
30065 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30066 (riscv_leaf_function_p): Delete.
30067 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30069 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30071 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30073 (do_ifelse): New function.
30074 (do_isel): New function.
30075 (do_sub3): New function.
30076 (do_add3): New function.
30077 (do_load_mask_compare): New function.
30078 (do_overlap_load_compare): New function.
30079 (expand_compare_loop): New function.
30080 (expand_block_compare): Call expand_compare_loop() when appropriate.
30081 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30082 option description.
30083 (-mblock-compare-inline-loop-limit): New option.
30085 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30088 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30089 Reverse order of second and third operands in first alternative.
30090 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30091 of first and second elements in UNSPEC_VPERMR vector.
30092 (altivec_expand_vec_perm_le): Likewise.
30094 2018-01-08 Jeff Law <law@redhat.com>
30096 PR rtl-optimizatin/81308
30097 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30098 (process_switch): If group_case_labels makes a change, then set
30100 (pass_convert_switch::execute): If a switch is converted, then
30101 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30103 PR rtl-optimization/81308
30104 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30107 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30109 PR target/83663 - Revert r255946
30110 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30111 generation for cases where splatting a value is not useful.
30112 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30113 across a vec_duplicate and a paradoxical subreg forming a vector
30114 mode to a vec_concat.
30116 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30118 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30119 -march=armv8.3-a variants.
30120 * config/arm/t-multilib: Likewise.
30121 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30123 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30125 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30127 (cceq_ior_compare_complement): Give it a name so I can use it, and
30128 change boolean_or_operator predicate to boolean_operator so it can
30129 be used to generate a crand.
30130 (eqne): New code iterator.
30131 (bd/bd_neg): New code_attrs.
30132 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30133 a single define_insn.
30134 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30135 decrement (bdnzt/bdnzf/bdzt/bdzf).
30136 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30137 with the new names of the branch decrement patterns, and added the
30138 names of the branch decrement conditional patterns.
30140 2018-01-08 Richard Biener <rguenther@suse.de>
30142 PR tree-optimization/83563
30143 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30146 2018-01-08 Richard Biener <rguenther@suse.de>
30148 PR middle-end/83713
30149 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30151 2018-01-08 Richard Biener <rguenther@suse.de>
30153 PR tree-optimization/83685
30154 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30155 references to abnormals.
30157 2018-01-08 Richard Biener <rguenther@suse.de>
30160 * dwarf2out.c (output_indirect_strings): Handle empty
30161 skeleton_debug_str_hash.
30162 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30164 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30166 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30167 (emit_store_direct): Likewise.
30168 (arc_trampoline_adjust_address): Likewise.
30169 (arc_asm_trampoline_template): New function.
30170 (arc_initialize_trampoline): Use asm_trampoline_template.
30171 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30172 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30173 * config/arc/arc.md (flush_icache): Delete pattern.
30175 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30177 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30178 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30181 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30184 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30185 by not USED_FOR_TARGET.
30186 (make_pass_resolve_sw_modes): Likewise.
30188 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30190 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30193 2018-01-08 Richard Biener <rguenther@suse.de>
30195 PR middle-end/83580
30196 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30198 2018-01-08 Richard Biener <rguenther@suse.de>
30200 PR middle-end/83517
30201 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30203 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30205 PR middle-end/81897
30206 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30207 basic blocks with a small number of successors.
30208 (convert_control_dep_chain_into_preds): Improve handling of
30210 (dump_predicates): Split apart into...
30211 (dump_pred_chain): ...here...
30212 (dump_pred_info): ...and here.
30213 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30214 (can_chain_union_be_invalidated_p): Improve check for invalidation
30216 (uninit_uses_cannot_happen): Avoid unnecessary if
30217 convert_control_dep_chain_into_preds yielded nothing.
30219 2018-01-06 Martin Sebor <msebor@redhat.com>
30221 PR tree-optimization/83640
30222 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30223 subtracting negative offset from size.
30224 (builtin_access::overlap): Adjust offset bounds of the access to fall
30225 within the size of the object if possible.
30227 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30229 PR rtl-optimization/83699
30230 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30231 extract_bit_field_as_subreg to cases in which the extracted
30232 value is also a vector.
30234 * lra-constraints.c (process_alt_operands): Test for the equivalence
30235 substitutions when detecting a possible reload cycle.
30237 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30240 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30241 by default if flag_selective_schedling{,2}. Formatting fixes.
30243 PR rtl-optimization/83682
30244 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30245 if it has non-VECTOR_MODE element mode.
30246 (vec_duplicate_p): Likewise.
30248 PR middle-end/83694
30249 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30250 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30252 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30255 * config/i386/i386-builtin.def
30256 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30257 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30258 Require also OPTION_MASK_ISA_AVX512F in addition to
30259 OPTION_MASK_ISA_GFNI.
30260 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30261 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30262 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30263 to OPTION_MASK_ISA_GFNI.
30264 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30265 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30266 OPTION_MASK_ISA_AVX512BW.
30267 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30268 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30269 addition to OPTION_MASK_ISA_GFNI.
30270 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30271 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30272 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30273 to OPTION_MASK_ISA_GFNI.
30274 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30275 a requirement for all ISAs rather than any of them with a few
30277 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30279 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30280 bitmasks to be enabled with 3 exceptions, instead of requiring any
30281 enabled ISA with lots of exceptions.
30282 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30283 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30284 Change avx512bw in isa attribute to avx512f.
30285 * config/i386/sgxintrin.h: Add license boilerplate.
30286 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30287 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30288 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30289 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30291 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30292 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30293 temporarily sse2 rather than sse if not enabled already.
30296 * config/i386/sse.md (VI248_VLBW): Rename to ...
30297 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30298 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30299 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30300 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30301 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30302 mode iterator instead of VI248_VLBW.
30304 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30306 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30307 (record_modified): Skip clobbers; add debug output.
30308 (param_change_prob): Use sreal frequencies.
30310 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30312 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30313 punt for user-aligned variables.
30315 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30317 * tree-chrec.c (chrec_contains_symbols): Return true for
30320 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30323 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30324 of (x|y) == x for BICS pattern.
30326 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30328 PR tree-optimization/83605
30329 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30330 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30333 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30335 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30336 * config/epiphany/rtems.h: New file.
30338 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30339 Uros Bizjak <ubizjak@gmail.com>
30342 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30343 QIreg_operand instead of register_operand predicate.
30344 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30345 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30346 comments instead of -fmitigate[-_]rop.
30348 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30351 * cgraphunit.c (symbol_table::compile): Switch to text_section
30352 before calling assembly_start debug hook.
30353 * run-rtl-passes.c (run_rtl_passes): Likewise.
30356 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30358 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30359 range_int_cst_p rather than !symbolic_range_p before calling
30360 extract_range_from_multiplicative_op_1.
30362 2018-01-04 Jeff Law <law@redhat.com>
30364 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30365 redundant test in assertion.
30367 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30369 * doc/rtl.texi: Document machine_mode wrapper classes.
30371 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30373 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30374 using tree_to_uhwi.
30376 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30378 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30379 the VEC_PERM_EXPR fold to fail.
30381 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30384 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30385 to switched_sections.
30387 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30390 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30391 test for d.testing.
30393 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30396 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30397 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30399 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30402 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30403 is BLKmode and bitpos not zero or mode change is needed.
30405 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30408 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30411 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30414 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30415 instead of MULT rtx. Update all corresponding splitters.
30416 (*saddl_se): Ditto.
30417 (*ssub<modesuffix>): Ditto.
30418 (*ssubl_se): Ditto.
30419 (*cmp_sadd_di): Update split patterns.
30420 (*cmp_sadd_si): Ditto.
30421 (*cmp_sadd_sidi): Ditto.
30422 (*cmp_ssub_di): Ditto.
30423 (*cmp_ssub_si): Ditto.
30424 (*cmp_ssub_sidi): Ditto.
30425 * config/alpha/predicates.md (const23_operand): New predicate.
30426 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30427 Look for ASHIFT, not MULT inner operand.
30428 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30430 2018-01-04 Martin Liska <mliska@suse.cz>
30432 PR gcov-profile/83669
30433 * gcov.c (output_intermediate_file): Add version to intermediate
30435 * doc/gcov.texi: Document new field 'version' in intermediate
30436 file format. Fix location of '-k' option of gcov command.
30438 2018-01-04 Martin Liska <mliska@suse.cz>
30441 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30443 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30445 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30447 2018-01-03 Martin Sebor <msebor@redhat.com>
30449 PR tree-optimization/83655
30450 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30451 checking calls with invalid arguments.
30453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30455 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30456 (vectorizable_mask_load_store): Delete.
30457 (vectorizable_call): Return false for masked loads and stores.
30458 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30459 instead of gimple_assign_rhs1.
30460 (vectorizable_load): Handle IFN_MASK_LOAD.
30461 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30465 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30467 (vectorizable_mask_load_store): ...here.
30468 (vectorizable_load): ...and here.
30470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30472 * tree-vect-stmts.c (vect_build_all_ones_mask)
30473 (vect_build_zero_merge_argument): New functions, split out from...
30474 (vectorizable_load): ...here.
30476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30478 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30480 (vectorizable_mask_load_store): ...here.
30481 (vectorizable_store): ...and here.
30483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30485 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30487 (vectorizable_mask_load_store): ...here.
30489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30491 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30492 (vect_model_store_cost): Take a vec_load_store_type instead of a
30494 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30495 (vect_model_store_cost): Take a vec_load_store_type instead of a
30497 (vectorizable_mask_load_store): Update accordingly.
30498 (vectorizable_store): Likewise.
30499 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30503 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30504 IFN_MASK_LOAD calls here rather than...
30505 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30508 Alan Hayward <alan.hayward@arm.com>
30509 David Sherwood <david.sherwood@arm.com>
30511 * expmed.c (extract_bit_field_1): For vector extracts,
30512 fall back to extract_bit_field_as_subreg if vec_extract
30515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30516 Alan Hayward <alan.hayward@arm.com>
30517 David Sherwood <david.sherwood@arm.com>
30519 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30520 they are variable or constant sized.
30521 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30522 slots for constant-sized data.
30524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30525 Alan Hayward <alan.hayward@arm.com>
30526 David Sherwood <david.sherwood@arm.com>
30528 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30529 handling COND_EXPRs with boolean comparisons, try to find a better
30530 basis for the mask type than the boolean itself.
30532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30534 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30535 is calculated and how it can be overridden.
30536 * genmodes.c (max_bitsize_mode_any_mode): New variable.
30537 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30539 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30543 Alan Hayward <alan.hayward@arm.com>
30544 David Sherwood <david.sherwood@arm.com>
30546 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30547 Remove the mode argument.
30548 (aarch64_simd_valid_immediate): Remove the mode and inverse
30550 * config/aarch64/iterators.md (bitsize): New iterator.
30551 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30552 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30553 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30554 aarch64_simd_valid_immediate.
30555 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30556 (aarch64_reg_or_bic_imm): Likewise.
30557 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30558 with an insn_type enum and msl with a modifier_type enum.
30559 Replace element_width with a scalar_mode. Change the shift
30560 to unsigned int. Add constructors for scalar_float_mode and
30561 scalar_int_mode elements.
30562 (aarch64_vect_float_const_representable_p): Delete.
30563 (aarch64_can_const_movi_rtx_p)
30564 (aarch64_simd_scalar_immediate_valid_for_move)
30565 (aarch64_simd_make_constant): Update call to
30566 aarch64_simd_valid_immediate.
30567 (aarch64_advsimd_valid_immediate_hs): New function.
30568 (aarch64_advsimd_valid_immediate): Likewise.
30569 (aarch64_simd_valid_immediate): Remove mode and inverse
30570 arguments. Rewrite to use the above. Use const_vec_duplicate_p
30571 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30572 and aarch64_float_const_representable_p on the result.
30573 (aarch64_output_simd_mov_immediate): Remove mode argument.
30574 Update call to aarch64_simd_valid_immediate and use of
30575 simd_immediate_info.
30576 (aarch64_output_scalar_simd_mov_immediate): Update call
30579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30580 Alan Hayward <alan.hayward@arm.com>
30581 David Sherwood <david.sherwood@arm.com>
30583 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30584 (mode_nunits): Likewise CONST_MODE_NUNITS.
30585 * machmode.def (ADJUST_NUNITS): Document.
30586 * genmodes.c (mode_data::need_nunits_adj): New field.
30587 (blank_mode): Update accordingly.
30588 (adj_nunits): New variable.
30589 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30591 (emit_mode_size_inline): Set need_bytesize_adj for all modes
30592 listed in adj_nunits.
30593 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30594 listed in adj_nunits. Don't emit case statements for such modes.
30595 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30596 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
30597 nothing if adj_nunits is nonnull.
30598 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30599 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30600 (emit_mode_fbit): Update use of print_maybe_const_decl.
30601 (emit_move_size): Likewise. Treat the array as non-const
30603 (emit_mode_adjustments): Handle adj_nunits.
30605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30607 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30608 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30609 (VECTOR_MODES): Use it.
30610 (make_vector_modes): Take the prefix as an argument.
30612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30613 Alan Hayward <alan.hayward@arm.com>
30614 David Sherwood <david.sherwood@arm.com>
30616 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30617 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30618 for MODE_VECTOR_BOOL.
30619 * machmode.def (VECTOR_BOOL_MODE): Document.
30620 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30621 (make_vector_bool_mode): New function.
30622 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30624 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30625 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30627 * stor-layout.c (int_mode_for_mode): Likewise.
30628 * tree.c (build_vector_type_for_mode): Likewise.
30629 * varasm.c (output_constant_pool_2): Likewise.
30630 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30631 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30632 for MODE_VECTOR_BOOL.
30633 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30634 of mode class checks.
30635 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30636 instead of a list of mode class checks.
30637 (expand_vector_scalar_condition): Likewise.
30638 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30641 Alan Hayward <alan.hayward@arm.com>
30642 David Sherwood <david.sherwood@arm.com>
30644 * machmode.h (mode_size): Change from unsigned short to
30646 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30647 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30648 or if measurement_type is not polynomial.
30649 (fixed_size_mode::includes_p): Check for constant-sized modes.
30650 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30651 return a poly_uint16 rather than an unsigned short.
30652 (emit_mode_size): Change the type of mode_size from unsigned short
30653 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30654 (emit_mode_adjustments): Cope with polynomial vector sizes.
30655 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30657 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30659 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30660 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30661 * caller-save.c (setup_save_areas): Likewise.
30662 (replace_reg_with_saved_mem): Likewise.
30663 * calls.c (emit_library_call_value_1): Likewise.
30664 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30665 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30666 (gen_lowpart_for_combine): Likewise.
30667 * convert.c (convert_to_integer_1): Likewise.
30668 * cse.c (equiv_constant, cse_insn): Likewise.
30669 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30670 (cselib_subst_to_values): Likewise.
30671 * dce.c (word_dce_process_block): Likewise.
30672 * df-problems.c (df_word_lr_mark_ref): Likewise.
30673 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30674 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30675 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30676 (rtl_for_decl_location): Likewise.
30677 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30678 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30679 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30680 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30681 (expand_expr_real_1): Likewise.
30682 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30683 (pad_below): Likewise.
30684 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30685 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30686 * ira.c (get_subreg_tracking_sizes): Likewise.
30687 * ira-build.c (ira_create_allocno_objects): Likewise.
30688 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30689 (ira_sort_regnos_for_alter_reg): Likewise.
30690 * ira-costs.c (record_operand_costs): Likewise.
30691 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30692 (resolve_simple_move): Likewise.
30693 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30694 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30695 (lra_constraints): Likewise.
30696 (CONST_POOL_OK_P): Reject variable-sized modes.
30697 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30698 (add_pseudo_to_slot, lra_spill): Likewise.
30699 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30700 * optabs-query.c (get_best_extraction_insn): Likewise.
30701 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30702 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30703 (expand_mult_highpart, valid_multiword_target_p): Likewise.
30704 * recog.c (offsettable_address_addr_space_p): Likewise.
30705 * regcprop.c (maybe_mode_change): Likewise.
30706 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30707 * regrename.c (build_def_use): Likewise.
30708 * regstat.c (dump_reg_info): Likewise.
30709 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30710 (find_reloads, find_reloads_subreg_address): Likewise.
30711 * reload1.c (eliminate_regs_1): Likewise.
30712 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30713 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30714 (simplify_binary_operation_1, simplify_subreg): Likewise.
30715 * targhooks.c (default_function_arg_padding): Likewise.
30716 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30717 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30718 (verify_gimple_assign_ternary): Likewise.
30719 * tree-inline.c (estimate_move_cost): Likewise.
30720 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30721 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30722 (get_address_cost_ainc): Likewise.
30723 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30724 (vect_supportable_dr_alignment): Likewise.
30725 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30726 (vectorizable_reduction): Likewise.
30727 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30728 (vectorizable_operation, vectorizable_load): Likewise.
30729 * tree.c (build_same_sized_truth_vector_type): Likewise.
30730 * valtrack.c (cleanup_auto_inc_dec): Likewise.
30731 * var-tracking.c (emit_note_insn_var_location): Likewise.
30732 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30733 (ADDR_VEC_ALIGN): Likewise.
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 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30741 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30742 or if measurement_type is polynomial.
30743 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30744 * combine.c (make_extraction): Likewise.
30745 * dse.c (find_shift_sequence): Likewise.
30746 * dwarf2out.c (mem_loc_descriptor): Likewise.
30747 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30748 (extract_bit_field, extract_low_bits): Likewise.
30749 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30750 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30751 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30752 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30753 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30754 * reload.c (find_reloads): Likewise.
30755 * reload1.c (alter_reg): Likewise.
30756 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30757 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30758 * tree-if-conv.c (predicate_mem_writes): Likewise.
30759 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30760 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30761 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30762 * valtrack.c (dead_debug_insert_temp): Likewise.
30763 * varasm.c (mergeable_constant_section): Likewise.
30764 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30767 Alan Hayward <alan.hayward@arm.com>
30768 David Sherwood <david.sherwood@arm.com>
30770 * expr.c (expand_assignment): Cope with polynomial mode sizes
30771 when assigning to a CONCAT.
30773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30774 Alan Hayward <alan.hayward@arm.com>
30775 David Sherwood <david.sherwood@arm.com>
30777 * machmode.h (mode_precision): Change from unsigned short to
30779 (mode_to_precision): Return a poly_uint16 rather than an unsigned
30781 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30782 or if measurement_type is not polynomial.
30783 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
30784 in which the mode is already known to be a scalar_int_mode.
30785 * genmodes.c (emit_mode_precision): Change the type of mode_precision
30786 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
30788 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30789 for GET_MODE_PRECISION.
30790 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30791 for GET_MODE_PRECISION.
30792 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30794 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30795 (expand_field_assignment, make_extraction): Likewise.
30796 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30797 (get_last_value): Likewise.
30798 * convert.c (convert_to_integer_1): Likewise.
30799 * cse.c (cse_insn): Likewise.
30800 * expr.c (expand_expr_real_1): Likewise.
30801 * lra-constraints.c (simplify_operand_subreg): Likewise.
30802 * optabs-query.c (can_atomic_load_p): Likewise.
30803 * optabs.c (expand_atomic_load): Likewise.
30804 (expand_atomic_store): Likewise.
30805 * ree.c (combine_reaching_defs): Likewise.
30806 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30807 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30808 * tree.h (type_has_mode_precision_p): Likewise.
30809 * ubsan.c (instrument_si_overflow): Likewise.
30811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30812 Alan Hayward <alan.hayward@arm.com>
30813 David Sherwood <david.sherwood@arm.com>
30815 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30816 polynomial numbers of units.
30817 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30818 (valid_vector_subparts_p): New function.
30819 (build_vector_type): Remove temporary shim and take the number
30820 of units as a poly_uint64 rather than an int.
30821 (build_opaque_vector_type): Take the number of units as a
30822 poly_uint64 rather than an int.
30823 * tree.c (build_vector_from_ctor): Handle polynomial
30824 TYPE_VECTOR_SUBPARTS.
30825 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30826 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30827 (build_vector_from_val): If the number of units is variable,
30828 use build_vec_duplicate_cst for constant operands and
30829 VEC_DUPLICATE_EXPR otherwise.
30830 (make_vector_type): Remove temporary is_constant ().
30831 (build_vector_type, build_opaque_vector_type): Take the number of
30832 units as a poly_uint64 rather than an int.
30833 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30835 * cfgexpand.c (expand_debug_expr): Likewise.
30836 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30837 (store_constructor, expand_expr_real_1): Likewise.
30838 (const_scalar_mask_from_tree): Likewise.
30839 * fold-const-call.c (fold_const_reduction): Likewise.
30840 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30841 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30842 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30843 (fold_relational_const): Likewise.
30844 (native_interpret_vector): Likewise. Change the size from an
30845 int to an unsigned int.
30846 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30847 TYPE_VECTOR_SUBPARTS.
30848 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30849 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30850 duplicating a non-constant operand into a variable-length vector.
30851 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30852 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30853 * ipa-icf.c (sem_variable::equals): Likewise.
30854 * match.pd: Likewise.
30855 * omp-simd-clone.c (simd_clone_subparts): Likewise.
30856 * print-tree.c (print_node): Likewise.
30857 * stor-layout.c (layout_type): Likewise.
30858 * targhooks.c (default_builtin_vectorization_cost): Likewise.
30859 * tree-cfg.c (verify_gimple_comparison): Likewise.
30860 (verify_gimple_assign_binary): Likewise.
30861 (verify_gimple_assign_ternary): Likewise.
30862 (verify_gimple_assign_single): Likewise.
30863 * tree-pretty-print.c (dump_generic_node): Likewise.
30864 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30865 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30866 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30867 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30868 (vect_shift_permute_load_chain): Likewise.
30869 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30870 (expand_vector_condition, optimize_vector_constructor): Likewise.
30871 (lower_vec_perm, get_compute_type): Likewise.
30872 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30873 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30874 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30875 (vect_recog_mask_conversion_pattern): Likewise.
30876 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30877 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30878 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30879 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30880 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30881 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30882 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30883 (supportable_widening_operation): Likewise.
30884 (supportable_narrowing_operation): Likewise.
30885 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30887 * varasm.c (output_constant): Likewise.
30889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30890 Alan Hayward <alan.hayward@arm.com>
30891 David Sherwood <david.sherwood@arm.com>
30893 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30894 so that both the length == 3 and length != 3 cases set up their
30895 own permute vectors. Add comments explaining why we know the
30896 number of elements is constant.
30897 (vect_permute_load_chain): Likewise.
30899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30900 Alan Hayward <alan.hayward@arm.com>
30901 David Sherwood <david.sherwood@arm.com>
30903 * machmode.h (mode_nunits): Change from unsigned char to
30905 (ONLY_FIXED_SIZE_MODES): New macro.
30906 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30907 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30908 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30910 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30911 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30912 or if measurement_type is not polynomial.
30913 * genmodes.c (ZERO_COEFFS): New macro.
30914 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30916 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30917 Use ZERO_COEFFS when emitting initializers.
30918 * data-streamer.h (bp_pack_poly_value): New function.
30919 (bp_unpack_poly_value): Likewise.
30920 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30921 for GET_MODE_NUNITS.
30922 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30923 for GET_MODE_NUNITS.
30924 * tree.c (make_vector_type): Remove temporary shim and make
30925 the real function take the number of units as a poly_uint64
30926 rather than an int.
30927 (build_vector_type_for_mode): Handle polynomial nunits.
30928 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30929 * emit-rtl.c (const_vec_series_p_1): Likewise.
30930 (gen_rtx_CONST_VECTOR): Likewise.
30931 * fold-const.c (test_vec_duplicate_folding): Likewise.
30932 * genrecog.c (validate_pattern): Likewise.
30933 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30934 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30935 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30936 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30937 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30938 * rtlanal.c (subreg_get_info): Likewise.
30939 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30940 (vect_grouped_load_supported): Likewise.
30941 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30942 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30943 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30944 (simplify_const_unary_operation, simplify_binary_operation_1)
30945 (simplify_const_binary_operation, simplify_ternary_operation)
30946 (test_vector_ops_duplicate, test_vector_ops): Likewise.
30947 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30948 instead of CONST_VECTOR_NUNITS.
30949 * varasm.c (output_constant_pool_2): Likewise.
30950 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30951 explicit-encoded elements in the XVEC for variable-length vectors.
30953 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30955 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30958 Alan Hayward <alan.hayward@arm.com>
30959 David Sherwood <david.sherwood@arm.com>
30961 * coretypes.h (fixed_size_mode): Declare.
30962 (fixed_size_mode_pod): New typedef.
30963 * builtins.h (target_builtins::x_apply_args_mode)
30964 (target_builtins::x_apply_result_mode): Change type to
30965 fixed_size_mode_pod.
30966 * builtins.c (apply_args_size, apply_result_size, result_vector)
30967 (expand_builtin_apply_args_1, expand_builtin_apply)
30968 (expand_builtin_return): Update accordingly.
30970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30972 * cse.c (hash_rtx_cb): Hash only the encoded elements.
30973 * cselib.c (cselib_hash_rtx): Likewise.
30974 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30975 CONST_VECTOR encoding.
30977 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30978 Jeff Law <law@redhat.com>
30981 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30982 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30983 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30984 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30987 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30988 explicitly probe *sp in a noreturn function if there were any callee
30989 register saves or frame pointer is needed.
30991 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30994 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30995 BLKmode for ternary, binary or unary expressions.
30998 * var-tracking.c (delete_vta_debug_insn): New inline function.
30999 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31000 insns from get_insns () to NULL instead of each bb separately.
31001 Use delete_vta_debug_insn. No longer static.
31002 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31003 delete_vta_debug_insns callers.
31004 * rtl.h (delete_vta_debug_insns): Declare.
31005 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31006 instead of variable_tracking_main.
31008 2018-01-03 Martin Sebor <msebor@redhat.com>
31010 PR tree-optimization/83603
31011 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31012 arguments past the endof the argument list in functions declared
31013 without a prototype.
31014 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31015 Avoid checking when arguments are null.
31017 2018-01-03 Martin Sebor <msebor@redhat.com>
31020 * doc/extend.texi (attribute const): Fix a typo.
31021 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31022 issuing -Wsuggest-attribute for void functions.
31024 2018-01-03 Martin Sebor <msebor@redhat.com>
31026 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31027 offset_int::from instead of wide_int::to_shwi.
31028 (maybe_diag_overlap): Remove assertion.
31029 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31030 * gimple-ssa-sprintf.c (format_directive): Same.
31031 (parse_directive): Same.
31032 (sprintf_dom_walker::compute_format_length): Same.
31033 (try_substitute_return_value): Same.
31035 2018-01-03 Jeff Law <law@redhat.com>
31037 PR middle-end/83654
31038 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31039 non-constant residual for zero at runtime and avoid probing in
31040 that case. Reorganize code for trailing problem to mirror handling
31043 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31045 PR tree-optimization/83501
31046 * tree-ssa-strlen.c (get_string_cst): New.
31047 (handle_char_store): Call get_string_cst.
31049 2018-01-03 Martin Liska <mliska@suse.cz>
31051 PR tree-optimization/83593
31052 * tree-ssa-strlen.c: Include tree-cfg.h.
31053 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31054 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31055 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31057 (strlen_dom_walker::before_dom_children): Call
31058 gimple_purge_dead_eh_edges. Dump tranformation with details
31060 (strlen_dom_walker::before_dom_children): Update call by adding
31061 new argument cleanup_eh.
31062 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31064 2018-01-03 Martin Liska <mliska@suse.cz>
31067 * cif-code.def (VARIADIC_THUNK): New enum value.
31068 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31071 2018-01-03 Jan Beulich <jbeulich@suse.com>
31073 * sse.md (mov<mode>_internal): Tighten condition for when to use
31074 vmovdqu<ssescalarsize> for TI and OI modes.
31076 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31078 Update copyright years.
31080 2018-01-03 Martin Liska <mliska@suse.cz>
31083 * ipa-visibility.c (function_and_variable_visibility): Skip
31084 functions with noipa attribure.
31086 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31088 * gcc.c (process_command): Update copyright notice dates.
31089 * gcov-dump.c (print_version): Ditto.
31090 * gcov.c (print_version): Ditto.
31091 * gcov-tool.c (print_version): Ditto.
31092 * gengtype.c (create_file): Ditto.
31093 * doc/cpp.texi: Bump @copying's copyright year.
31094 * doc/cppinternals.texi: Ditto.
31095 * doc/gcc.texi: Ditto.
31096 * doc/gccint.texi: Ditto.
31097 * doc/gcov.texi: Ditto.
31098 * doc/install.texi: Ditto.
31099 * doc/invoke.texi: Ditto.
31101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31103 * vector-builder.h (vector_builder::m_full_nelts): Change from
31104 unsigned int to poly_uint64.
31105 (vector_builder::full_nelts): Update prototype accordingly.
31106 (vector_builder::new_vector): Likewise.
31107 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31108 (vector_builder::operator ==): Likewise.
31109 (vector_builder::finalize): Likewise.
31110 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31111 Take the number of elements as a poly_uint64 rather than an
31113 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31114 from unsigned int to poly_uint64.
31115 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31116 (vec_perm_indices::new_vector): Likewise.
31117 (vec_perm_indices::length): Likewise.
31118 (vec_perm_indices::nelts_per_input): Likewise.
31119 (vec_perm_indices::input_nelts): Likewise.
31120 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31121 number of elements per input as a poly_uint64 rather than an
31122 unsigned int. Use the original encoding for variable-length
31123 vectors, rather than clamping each individual element.
31124 For the second and subsequent elements in each pattern,
31125 clamp the step and base before clamping their sum.
31126 (vec_perm_indices::series_p): Handle polynomial element counts.
31127 (vec_perm_indices::all_in_range_p): Likewise.
31128 (vec_perm_indices_to_tree): Likewise.
31129 (vec_perm_indices_to_rtx): Likewise.
31130 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31131 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31132 (tree_vector_builder::new_binary_operation): Handle polynomial
31133 element counts. Return false if we need to know the number
31134 of elements at compile time.
31135 * fold-const.c (fold_vec_perm): Punt if the number of elements
31136 isn't known at compile time.
31138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31140 * vec-perm-indices.h (vec_perm_builder): Change element type
31141 from HOST_WIDE_INT to poly_int64.
31142 (vec_perm_indices::element_type): Update accordingly.
31143 (vec_perm_indices::clamp): Handle polynomial element_types.
31144 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31145 (vec_perm_indices::all_in_range_p): Likewise.
31146 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31148 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31149 polynomial vec_perm_indices element types.
31150 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31151 * fold-const.c (fold_vec_perm): Likewise.
31152 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31153 * tree-vect-generic.c (lower_vec_perm): Likewise.
31154 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31155 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31156 element type to HOST_WIDE_INT.
31158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31159 Alan Hayward <alan.hayward@arm.com>
31160 David Sherwood <david.sherwood@arm.com>
31162 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31163 rather than an int. Use plus_constant.
31164 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31165 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31168 Alan Hayward <alan.hayward@arm.com>
31169 David Sherwood <david.sherwood@arm.com>
31171 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31172 a HOST_WIDE_INT to a poly_int64.
31174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31175 Alan Hayward <alan.hayward@arm.com>
31176 David Sherwood <david.sherwood@arm.com>
31178 * calls.c (load_register_parameters): Cope with polynomial
31179 mode sizes. Require a constant size for BLKmode parameters
31180 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31181 forces a parameter to be padded at the lsb end in order to
31182 fill a complete number of words, require the parameter size
31183 to be ordered wrt UNITS_PER_WORD.
31185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31186 Alan Hayward <alan.hayward@arm.com>
31187 David Sherwood <david.sherwood@arm.com>
31189 * reload1.c (spill_stack_slot_width): Change element type
31190 from unsigned int to poly_uint64_pod.
31191 (alter_reg): Treat mode sizes as polynomial.
31193 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31194 Alan Hayward <alan.hayward@arm.com>
31195 David Sherwood <david.sherwood@arm.com>
31197 * reload.c (complex_word_subreg_p): New function.
31198 (reload_inner_reg_of_subreg, push_reload): Use it.
31200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31201 Alan Hayward <alan.hayward@arm.com>
31202 David Sherwood <david.sherwood@arm.com>
31204 * lra-constraints.c (process_alt_operands): Reject matched
31205 operands whose sizes aren't ordered.
31206 (match_reload): Refer to this check here.
31208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31209 Alan Hayward <alan.hayward@arm.com>
31210 David Sherwood <david.sherwood@arm.com>
31212 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31213 that the mode size is in the set {1, 2, 4, 8, 16}.
31215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31216 Alan Hayward <alan.hayward@arm.com>
31217 David Sherwood <david.sherwood@arm.com>
31219 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31220 Use plus_constant instead of gen_rtx_PLUS.
31222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31223 Alan Hayward <alan.hayward@arm.com>
31224 David Sherwood <david.sherwood@arm.com>
31226 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31227 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31228 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31229 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31230 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31231 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31232 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31233 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31234 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31235 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31237 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31238 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31239 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31240 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31241 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31242 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31243 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31244 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31245 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31246 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31248 * expr.c (emit_move_resolve_push): Treat the input and result
31249 of PUSH_ROUNDING as a poly_int64.
31250 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31251 (emit_push_insn): Likewise.
31252 * lra-eliminations.c (mark_not_eliminable): Likewise.
31253 * recog.c (push_operand): Likewise.
31254 * reload1.c (elimination_effects): Likewise.
31255 * rtlanal.c (nonzero_bits1): Likewise.
31256 * calls.c (store_one_arg): Likewise. Require the padding to be
31257 known at compile time.
31259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31260 Alan Hayward <alan.hayward@arm.com>
31261 David Sherwood <david.sherwood@arm.com>
31263 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31264 Use plus_constant instead of gen_rtx_PLUS.
31266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31267 Alan Hayward <alan.hayward@arm.com>
31268 David Sherwood <david.sherwood@arm.com>
31270 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31271 rather than an int.
31273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31274 Alan Hayward <alan.hayward@arm.com>
31275 David Sherwood <david.sherwood@arm.com>
31277 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31278 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31279 via stack temporaries. Treat the mode size as polynomial too.
31281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31282 Alan Hayward <alan.hayward@arm.com>
31283 David Sherwood <david.sherwood@arm.com>
31285 * expr.c (expand_expr_real_2): When handling conversions involving
31286 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31287 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31288 as a poly_uint64 too.
31290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31291 Alan Hayward <alan.hayward@arm.com>
31292 David Sherwood <david.sherwood@arm.com>
31294 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31297 Alan Hayward <alan.hayward@arm.com>
31298 David Sherwood <david.sherwood@arm.com>
31300 * combine.c (can_change_dest_mode): Handle polynomial
31301 REGMODE_NATURAL_SIZE.
31302 * expmed.c (store_bit_field_1): Likewise.
31303 * expr.c (store_constructor): Likewise.
31304 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31305 and polynomial REGMODE_NATURAL_SIZE.
31306 (gen_lowpart_common): Likewise.
31307 * reginfo.c (record_subregs_of_mode): Likewise.
31308 * rtlanal.c (read_modify_subreg_p): Likewise.
31310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31311 Alan Hayward <alan.hayward@arm.com>
31312 David Sherwood <david.sherwood@arm.com>
31314 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31315 numbers of elements.
31317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31318 Alan Hayward <alan.hayward@arm.com>
31319 David Sherwood <david.sherwood@arm.com>
31321 * match.pd: Cope with polynomial numbers of vector elements.
31323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31324 Alan Hayward <alan.hayward@arm.com>
31325 David Sherwood <david.sherwood@arm.com>
31327 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31328 in a POINTER_PLUS_EXPR.
31330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31331 Alan Hayward <alan.hayward@arm.com>
31332 David Sherwood <david.sherwood@arm.com>
31334 * omp-simd-clone.c (simd_clone_subparts): New function.
31335 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31336 (ipa_simd_modify_function_body): Likewise.
31338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31339 Alan Hayward <alan.hayward@arm.com>
31340 David Sherwood <david.sherwood@arm.com>
31342 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31343 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31344 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31345 (expand_vector_condition, vector_element): Likewise.
31346 (subparts_gt): New function.
31347 (get_compute_type): Use subparts_gt.
31348 (count_type_subparts): Delete.
31349 (expand_vector_operations_1): Use subparts_gt instead of
31350 count_type_subparts.
31352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31353 Alan Hayward <alan.hayward@arm.com>
31354 David Sherwood <david.sherwood@arm.com>
31356 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31357 (vect_compile_time_alias): ...this new function. Do the calculation
31358 on poly_ints rather than trees.
31359 (vect_prune_runtime_alias_test_list): Update call accordingly.
31361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31362 Alan Hayward <alan.hayward@arm.com>
31363 David Sherwood <david.sherwood@arm.com>
31365 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31367 (vect_schedule_slp_instance): Likewise.
31369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31370 Alan Hayward <alan.hayward@arm.com>
31371 David Sherwood <david.sherwood@arm.com>
31373 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31374 constant and extern definitions for variable-length vectors.
31375 (vect_get_constant_vectors): Note that the number of units
31376 is known to be constant.
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 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31383 of units as polynomial. Choose between WIDE and NARROW based
31386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31387 Alan Hayward <alan.hayward@arm.com>
31388 David Sherwood <david.sherwood@arm.com>
31390 * tree-vect-stmts.c (simd_clone_subparts): New function.
31391 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31394 Alan Hayward <alan.hayward@arm.com>
31395 David Sherwood <david.sherwood@arm.com>
31397 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31398 vectors as polynomial. Use build_index_vector for
31399 IFN_GOMP_SIMD_LANE.
31401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31402 Alan Hayward <alan.hayward@arm.com>
31403 David Sherwood <david.sherwood@arm.com>
31405 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31406 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31407 for variable-length vectors.
31408 (vectorizable_mask_load_store): Treat the number of units as
31409 polynomial, asserting that it is constant if the condition has
31410 already been enforced.
31411 (vectorizable_store, vectorizable_load): Likewise.
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 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31418 of units as polynomial. Punt if we can't tell at compile time
31419 which vector contains the final result.
31421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31422 Alan Hayward <alan.hayward@arm.com>
31423 David Sherwood <david.sherwood@arm.com>
31425 * tree-vect-loop.c (vectorizable_induction): Treat the number
31426 of units as polynomial. Punt on SLP inductions. Use an integer
31427 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31428 cast of such a series for variable-length floating-point
31431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31432 Alan Hayward <alan.hayward@arm.com>
31433 David Sherwood <david.sherwood@arm.com>
31435 * tree.h (build_index_vector): Declare.
31436 * tree.c (build_index_vector): New function.
31437 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31438 of units as polynomial, forcibly converting it to a constant if
31439 vectorizable_reduction has already enforced the condition.
31440 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31441 to create a {1,2,3,...} vector.
31442 (vectorizable_reduction): Treat the number of units as polynomial.
31443 Choose vectype_in based on the largest scalar element size rather
31444 than the smallest number of units. Enforce the restrictions
31447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31448 Alan Hayward <alan.hayward@arm.com>
31449 David Sherwood <david.sherwood@arm.com>
31451 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31452 number of units as polynomial.
31454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31455 Alan Hayward <alan.hayward@arm.com>
31456 David Sherwood <david.sherwood@arm.com>
31458 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31459 * target.def (autovectorize_vector_sizes): Return the vector sizes
31460 by pointer, using vector_sizes rather than a bitmask.
31461 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31462 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31463 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31465 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31466 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31467 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31468 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31469 * omp-general.c (omp_max_vf): Likewise.
31470 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31471 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31472 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31473 * tree-vect-slp.c (vect_slp_bb): Likewise.
31474 * doc/tm.texi: Regenerate.
31475 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31477 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31478 the vector size as a poly_uint64 rather than an unsigned int.
31479 (current_vector_size): Change from an unsigned int to a poly_uint64.
31480 (get_vectype_for_scalar_type): Update accordingly.
31481 * tree.h (build_truth_vector_type): Take the size and number of
31482 units as a poly_uint64 rather than an unsigned int.
31483 (build_vector_type): Add a temporary overload that takes
31484 the number of units as a poly_uint64 rather than an unsigned int.
31485 * tree.c (make_vector_type): Likewise.
31486 (build_truth_vector_type): Take the number of units as a poly_uint64
31487 rather than an unsigned int.
31489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31490 Alan Hayward <alan.hayward@arm.com>
31491 David Sherwood <david.sherwood@arm.com>
31493 * target.def (get_mask_mode): Take the number of units and length
31494 as poly_uint64s rather than unsigned ints.
31495 * targhooks.h (default_get_mask_mode): Update accordingly.
31496 * targhooks.c (default_get_mask_mode): Likewise.
31497 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31498 * doc/tm.texi: Regenerate.
31500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31501 Alan Hayward <alan.hayward@arm.com>
31502 David Sherwood <david.sherwood@arm.com>
31504 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31505 * omp-general.c (omp_max_vf): Likewise.
31506 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31507 (expand_omp_simd): Handle polynomial safelen.
31508 * omp-low.c (omplow_simd_context): Add a default constructor.
31509 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31510 (lower_rec_simd_input_clauses): Update accordingly.
31511 (lower_rec_input_clauses): Likewise.
31513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31514 Alan Hayward <alan.hayward@arm.com>
31515 David Sherwood <david.sherwood@arm.com>
31517 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31518 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31519 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31520 (vect_analyze_slp_cost): Likewise.
31521 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31522 (vect_model_load_cost): Likewise.
31524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31525 Alan Hayward <alan.hayward@arm.com>
31526 David Sherwood <david.sherwood@arm.com>
31528 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31529 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31530 from an unsigned int * to a poly_uint64_pod *.
31531 (calculate_unrolling_factor): New function.
31532 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
31534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31535 Alan Hayward <alan.hayward@arm.com>
31536 David Sherwood <david.sherwood@arm.com>
31538 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31539 from an unsigned int to a poly_uint64.
31540 (_loop_vec_info::slp_unrolling_factor): Likewise.
31541 (_loop_vec_info::vectorization_factor): Change from an int
31543 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31544 (vect_get_num_vectors): New function.
31545 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31546 (vect_get_num_copies): Use vect_get_num_vectors.
31547 (vect_analyze_data_ref_dependences): Change max_vf from an int *
31548 to an unsigned int *.
31549 (vect_analyze_data_refs): Change min_vf from an int * to a
31551 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31552 than an unsigned HOST_WIDE_INT.
31553 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31554 (vect_analyze_data_ref_dependence): Change max_vf from an int *
31555 to an unsigned int *.
31556 (vect_analyze_data_ref_dependences): Likewise.
31557 (vect_compute_data_ref_alignment): Handle polynomial vf.
31558 (vect_enhance_data_refs_alignment): Likewise.
31559 (vect_prune_runtime_alias_test_list): Likewise.
31560 (vect_shift_permute_load_chain): Likewise.
31561 (vect_supportable_dr_alignment): Likewise.
31562 (dependence_distance_ge_vf): Take the vectorization factor as a
31563 poly_uint64 rather than an unsigned HOST_WIDE_INT.
31564 (vect_analyze_data_refs): Change min_vf from an int * to a
31566 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31567 vfm1 as a poly_uint64 rather than an int. Make the same change
31568 for the returned bound_scalar.
31569 (vect_gen_vector_loop_niters): Handle polynomial vf.
31570 (vect_do_peeling): Likewise. Update call to
31571 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31572 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31574 * tree-vect-loop.c (vect_determine_vectorization_factor)
31575 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31576 (vect_get_known_peeling_cost): Likewise.
31577 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31578 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31579 (vect_transform_loop): Likewise. Use the lowest possible VF when
31580 updating the upper bounds of the loop.
31581 (vect_min_worthwhile_factor): Make static. Return an unsigned int
31582 rather than an int.
31583 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31584 polynomial unroll factors.
31585 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31586 (vect_make_slp_decision): Likewise.
31587 (vect_supported_load_permutation_p): Likewise, and polynomial
31589 (vect_analyze_slp_cost): Handle polynomial vf.
31590 (vect_slp_analyze_node_operations): Likewise.
31591 (vect_slp_analyze_bb_1): Likewise.
31592 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31593 than an unsigned HOST_WIDE_INT.
31594 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31595 (vectorizable_load): Handle polynomial vf.
31596 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31598 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31601 Alan Hayward <alan.hayward@arm.com>
31602 David Sherwood <david.sherwood@arm.com>
31604 * match.pd: Handle bit operations involving three constants
31605 and try to fold one pair.
31607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31609 * tree-vect-loop-manip.c: Include gimple-fold.h.
31610 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31611 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31612 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31613 Add a path that uses a step of VF instead of 1, but disable it
31615 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31616 and niters_no_overflow parameters. Update calls to
31617 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31618 Create a new SSA name if the latter choses to use a ste other
31619 than zero, and return it via niters_vector_mult_vf_var.
31620 * tree-vect-loop.c (vect_transform_loop): Update calls to
31621 vect_do_peeling, vect_gen_vector_loop_niters and
31622 slpeel_make_loop_iterate_ntimes.
31623 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31624 (vect_gen_vector_loop_niters): Update declarations after above changes.
31626 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31628 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31629 128-bit round to integer instructions.
31630 (ceil<mode>2): Likewise.
31631 (btrunc<mode>2): Likewise.
31632 (round<mode>2): Likewise.
31634 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31636 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31637 unaligned VSX load/store on P8/P9.
31638 (expand_block_clear): Allow the use of unaligned VSX
31639 load/store on P8/P9.
31641 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31643 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31645 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31646 swap associated with both a load and a store.
31648 2018-01-02 Andrew Waterman <andrew@sifive.com>
31650 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31651 * config/riscv/riscv.md (clear_cache): Use it.
31653 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31655 * web.c: Remove out-of-date comment.
31657 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31659 * expr.c (fixup_args_size_notes): Check that any existing
31660 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31661 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31662 (emit_single_push_insn): ...here.
31664 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31666 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31667 (const_vector_encoded_nelts): New function.
31668 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31669 (const_vector_int_elt, const_vector_elt): Declare.
31670 * emit-rtl.c (const_vector_int_elt_1): New function.
31671 (const_vector_elt): Likewise.
31672 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31673 of CONST_VECTOR_ELT.
31675 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31677 * expr.c: Include rtx-vector-builder.h.
31678 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31679 directly on the tree encoding.
31680 (const_vector_from_tree): Likewise.
31681 * optabs.c: Include rtx-vector-builder.h.
31682 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31683 sequence of "u" values.
31684 * vec-perm-indices.c: Include rtx-vector-builder.h.
31685 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31686 directly on the vec_perm_indices encoding.
31688 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31690 * doc/rtl.texi (const_vector): Describe new encoding scheme.
31691 * Makefile.in (OBJS): Add rtx-vector-builder.o.
31692 * rtx-vector-builder.h: New file.
31693 * rtx-vector-builder.c: Likewise.
31694 * rtl.h (rtx_def::u2): Add a const_vector field.
31695 (CONST_VECTOR_NPATTERNS): New macro.
31696 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31697 (CONST_VECTOR_DUPLICATE_P): Likewise.
31698 (CONST_VECTOR_STEPPED_P): Likewise.
31699 (CONST_VECTOR_ENCODED_ELT): Likewise.
31700 (const_vec_duplicate_p): Check for a duplicated vector encoding.
31701 (unwrap_const_vec_duplicate): Likewise.
31702 (const_vec_series_p): Check for a non-duplicated vector encoding.
31703 Say that the function only returns true for integer vectors.
31704 * emit-rtl.c: Include rtx-vector-builder.h.
31705 (gen_const_vec_duplicate_1): Delete.
31706 (gen_const_vector): Call gen_const_vec_duplicate instead of
31707 gen_const_vec_duplicate_1.
31708 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31709 (gen_const_vec_duplicate): Use rtx_vector_builder.
31710 (gen_const_vec_series): Likewise.
31711 (gen_rtx_CONST_VECTOR): Likewise.
31712 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31713 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31714 Build a new vector rather than modifying a CONST_VECTOR in-place.
31715 (handle_special_swappables): Update call accordingly.
31716 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31717 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31718 Build a new vector rather than modifying a CONST_VECTOR in-place.
31719 (handle_special_swappables): Update call accordingly.
31721 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31723 * simplify-rtx.c (simplify_const_binary_operation): Use
31724 CONST_VECTOR_ELT instead of XVECEXP.
31726 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31728 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31729 the selector elements to be different from the data elements
31730 if the selector is a VECTOR_CST.
31731 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31732 ssizetype for the selector.
31734 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31736 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31737 before testing each element individually.
31738 * tree-vect-generic.c (lower_vec_perm): Likewise.
31740 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31742 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31743 * selftest-run-tests.c (selftest::run_tests): Call it.
31744 * vector-builder.h (vector_builder::operator ==): New function.
31745 (vector_builder::operator !=): Likewise.
31746 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31747 (vec_perm_indices::all_from_input_p): New function.
31748 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31749 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31750 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31751 instead of reading the VECTOR_CST directly. Detect whether both
31752 vector inputs are the same before constructing the vec_perm_indices,
31753 and update the number of inputs argument accordingly. Use the
31754 utility functions added above. Only construct sel2 if we need to.
31756 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31758 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31759 the broadcast of the low byte.
31760 (expand_mult_highpart): Use an explicit encoding for the permutes.
31761 * optabs-query.c (can_mult_highpart_p): Likewise.
31762 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31763 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31764 (vectorizable_bswap): Likewise.
31765 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31766 explicit encoding for the power-of-2 permutes.
31767 (vect_permute_store_chain): Likewise.
31768 (vect_grouped_load_supported): Likewise.
31769 (vect_permute_load_chain): Likewise.
31771 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31773 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31774 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31775 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31776 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31777 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31778 (vect_gen_perm_mask_any): Likewise.
31780 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31782 * int-vector-builder.h: New file.
31783 * vec-perm-indices.h: Include int-vector-builder.h.
31784 (vec_perm_indices): Redefine as an int_vector_builder.
31785 (auto_vec_perm_indices): Delete.
31786 (vec_perm_builder): Redefine as a stand-alone class.
31787 (vec_perm_indices::vec_perm_indices): New function.
31788 (vec_perm_indices::clamp): Likewise.
31789 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31790 (vec_perm_indices::new_vector): New function.
31791 (vec_perm_indices::new_expanded_vector): Update for new
31792 vec_perm_indices class.
31793 (vec_perm_indices::rotate_inputs): New function.
31794 (vec_perm_indices::all_in_range_p): Operate directly on the
31795 encoded form, without computing elided elements.
31796 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31797 encoding. Update for new vec_perm_indices class.
31798 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31799 the given vec_perm_builder.
31800 (expand_vec_perm_var): Update vec_perm_builder constructor.
31801 (expand_mult_highpart): Use vec_perm_builder instead of
31802 auto_vec_perm_indices.
31803 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31804 vec_perm_indices instead of auto_vec_perm_indices. Use a single
31805 or double series encoding as appropriate.
31806 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31807 vec_perm_indices instead of auto_vec_perm_indices.
31808 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31809 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31810 (vect_permute_store_chain): Likewise.
31811 (vect_grouped_load_supported): Likewise.
31812 (vect_permute_load_chain): Likewise.
31813 (vect_shift_permute_load_chain): Likewise.
31814 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31815 (vect_transform_slp_perm_load): Likewise.
31816 (vect_schedule_slp_instance): Likewise.
31817 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31818 (vectorizable_mask_load_store): Likewise.
31819 (vectorizable_bswap): Likewise.
31820 (vectorizable_store): Likewise.
31821 (vectorizable_load): Likewise.
31822 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31823 vec_perm_indices instead of auto_vec_perm_indices. Use
31824 tree_to_vec_perm_builder to read the vector from a tree.
31825 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31826 vec_perm_builder instead of a vec_perm_indices.
31827 (have_whole_vector_shift): Use vec_perm_builder and
31828 vec_perm_indices instead of auto_vec_perm_indices. Leave the
31829 truncation to calc_vec_perm_mask_for_shift.
31830 (vect_create_epilog_for_reduction): Likewise.
31831 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31832 from auto_vec_perm_indices to vec_perm_indices.
31833 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31834 instead of changing individual elements.
31835 (aarch64_vectorize_vec_perm_const): Use new_vector to install
31836 the vector in d.perm.
31837 * config/arm/arm.c (expand_vec_perm_d::perm): Change
31838 from auto_vec_perm_indices to vec_perm_indices.
31839 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31840 instead of changing individual elements.
31841 (arm_vectorize_vec_perm_const): Use new_vector to install
31842 the vector in d.perm.
31843 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31844 Update vec_perm_builder constructor.
31845 (rs6000_expand_interleave): Likewise.
31846 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31847 (rs6000_expand_interleave): Likewise.
31849 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31851 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31852 to qimode could truncate the indices.
31853 * optabs.c (expand_vec_perm_var): Likewise.
31855 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31857 * Makefile.in (OBJS): Add vec-perm-indices.o.
31858 * vec-perm-indices.h: New file.
31859 * vec-perm-indices.c: Likewise.
31860 * target.h (vec_perm_indices): Replace with a forward class
31862 (auto_vec_perm_indices): Move to vec-perm-indices.h.
31863 * optabs.h: Include vec-perm-indices.h.
31864 (expand_vec_perm): Delete.
31865 (selector_fits_mode_p, expand_vec_perm_var): Declare.
31866 (expand_vec_perm_const): Declare.
31867 * target.def (vec_perm_const_ok): Replace with...
31868 (vec_perm_const): ...this new hook.
31869 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31870 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31871 * doc/tm.texi: Regenerate.
31872 * optabs.def (vec_perm_const): Delete.
31873 * doc/md.texi (vec_perm_const): Likewise.
31874 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31875 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31876 expand_vec_perm for constant permutation vectors. Assert that
31877 the mode of variable permutation vectors is the integer equivalent
31878 of the mode that is being permuted.
31879 * optabs-query.h (selector_fits_mode_p): Declare.
31880 * optabs-query.c: Include vec-perm-indices.h.
31881 (selector_fits_mode_p): New function.
31882 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31883 is defined, instead of checking whether the vec_perm_const_optab
31884 exists. Use targetm.vectorize.vec_perm_const instead of
31885 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31886 fit in the vector mode before using a variable permute.
31887 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31888 vec_perm_indices instead of an rtx.
31889 (expand_vec_perm): Replace with...
31890 (expand_vec_perm_const): ...this new function. Take the selector
31891 as a vec_perm_indices rather than an rtx. Also take the mode of
31892 the selector. Update call to shift_amt_for_vec_perm_mask.
31893 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31894 Use vec_perm_indices::new_expanded_vector to expand the original
31895 selector into bytes. Check whether the indices fit in the vector
31896 mode before using a variable permute.
31897 (expand_vec_perm_var): Make global.
31898 (expand_mult_highpart): Use expand_vec_perm_const.
31899 * fold-const.c: Includes vec-perm-indices.h.
31900 * tree-ssa-forwprop.c: Likewise.
31901 * tree-vect-data-refs.c: Likewise.
31902 * tree-vect-generic.c: Likewise.
31903 * tree-vect-loop.c: Likewise.
31904 * tree-vect-slp.c: Likewise.
31905 * tree-vect-stmts.c: Likewise.
31906 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31908 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31909 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31910 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31911 (aarch64_vectorize_vec_perm_const): ...this new function.
31912 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31913 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31914 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31915 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31916 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31917 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31918 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31920 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31921 check for NEON modes.
31922 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31923 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31924 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31925 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31927 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
31928 the old VEC_PERM_CONST conditions.
31929 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31930 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31931 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31932 (ia64_vectorize_vec_perm_const_ok): Merge into...
31933 (ia64_vectorize_vec_perm_const): ...this new function.
31934 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31935 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31936 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31937 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31938 * config/mips/mips.c (mips_expand_vec_perm_const)
31939 (mips_vectorize_vec_perm_const_ok): Merge into...
31940 (mips_vectorize_vec_perm_const): ...this new function.
31941 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31942 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31943 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31944 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31945 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31946 (rs6000_expand_vec_perm_const): Delete.
31947 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31949 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31950 (altivec_expand_vec_perm_const_le): Take each operand individually.
31951 Operate on constant selectors rather than rtxes.
31952 (altivec_expand_vec_perm_const): Likewise. Update call to
31953 altivec_expand_vec_perm_const_le.
31954 (rs6000_expand_vec_perm_const): Delete.
31955 (rs6000_vectorize_vec_perm_const_ok): Delete.
31956 (rs6000_vectorize_vec_perm_const): New function.
31957 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31958 an element count and rtx array.
31959 (rs6000_expand_extract_even): Update call accordingly.
31960 (rs6000_expand_interleave): Likewise.
31961 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31962 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31963 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31964 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31965 (rs6000_expand_vec_perm_const): Delete.
31966 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31967 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31968 (altivec_expand_vec_perm_const_le): Take each operand individually.
31969 Operate on constant selectors rather than rtxes.
31970 (altivec_expand_vec_perm_const): Likewise. Update call to
31971 altivec_expand_vec_perm_const_le.
31972 (rs6000_expand_vec_perm_const): Delete.
31973 (rs6000_vectorize_vec_perm_const_ok): Delete.
31974 (rs6000_vectorize_vec_perm_const): New function. Remove stray
31975 reference to the SPE evmerge intructions.
31976 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31977 an element count and rtx array.
31978 (rs6000_expand_extract_even): Update call accordingly.
31979 (rs6000_expand_interleave): Likewise.
31980 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31981 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31983 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31985 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31987 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31988 vector mode and that that mode matches the mode of the data
31990 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31991 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
31992 directly using expand_vec_perm_1 when forcing selectors into
31994 (expand_vec_perm_var): New function, split out from expand_vec_perm.
31996 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31998 * optabs-query.h (can_vec_perm_p): Delete.
31999 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32000 * optabs-query.c (can_vec_perm_p): Split into...
32001 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32002 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32003 particular selector is valid.
32004 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32005 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32006 (vect_grouped_load_supported): Likewise.
32007 (vect_shift_permute_load_chain): Likewise.
32008 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32009 (vect_transform_slp_perm_load): Likewise.
32010 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32011 (vectorizable_bswap): Likewise.
32012 (vect_gen_perm_mask_checked): Likewise.
32013 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32014 implementations of variable permutation vectors into account
32015 when deciding which selector to use.
32016 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32017 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32018 with a false third argument.
32019 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32020 to test whether the constant selector is valid and can_vec_perm_var_p
32021 to test whether a variable selector is valid.
32023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32025 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32026 * optabs-query.c (can_vec_perm_p): Likewise.
32027 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32028 instead of vec_perm_indices.
32029 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32030 (vect_gen_perm_mask_checked): Likewise,
32031 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32032 (vect_gen_perm_mask_checked): Likewise,
32034 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32036 * optabs-query.h (qimode_for_vec_perm): Declare.
32037 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32038 (qimode_for_vec_perm): ...this new function.
32039 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32041 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32043 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32044 does not have a conditional at the top.
32046 2018-01-02 Richard Biener <rguenther@suse.de>
32048 * ipa-inline.c (big_speedup_p): Fix expression.
32050 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32053 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32056 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32060 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32061 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32062 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32063 cond_taken_branch_cost 3->4.
32065 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32067 PR tree-optimization/83581
32068 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32069 TODO_cleanup_cfg if any changes have been made.
32071 PR middle-end/83608
32072 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32073 convert_modes if target mode has the right side, but different mode
32076 PR middle-end/83609
32077 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32078 last argument when extracting from CONCAT. If either from_real or
32079 from_imag is NULL, use expansion through memory. If result is not
32080 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32081 the parts directly to inner mode, if even that fails, use expansion
32084 PR middle-end/83623
32085 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32086 check for bswap in mode rather than HImode and use that in expand_unop
32089 Copyright (C) 2018 Free Software Foundation, Inc.
32091 Copying and distribution of this file, with or without modification,
32092 are permitted in any medium without royalty provided the copyright
32093 notice and this notice are preserved.