1 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
9 * doc/invoke.texi (Link Options): Fix formatting and grammar.
11 2018-09-18 Richard Biener <rguenther@suse.de>
14 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
15 (compute_samebase_partition_bases): Likewise.
16 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
17 (gimple_can_coalesce_p): Simplify.
19 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
21 Handle a library implementation of ffs calling __builtin_ffs.
22 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
23 (mmix_init_libfuncs): New function: make __builtin_ffs expand
26 2018-09-17 David Malcolm <dmalcolm@redhat.com>
28 * diagnostic-show-locus.c (class layout_range): Add field
30 (layout_range::layout_range): Add "original_idx" param and use it
31 to initialize new field.
32 (make_range): Use 0 for original_idx.
33 (layout::layout): Pass in index to calls to
34 maybe_add_location_range.
35 (layout::maybe_add_location_range): Add param "original_idx" and
36 pass it on to layout_range.
37 (layout::print_any_labels): Pass on range->m_original_idx to
39 (gcc_rich_location::add_location_if_nearby): Use 0 for
41 * gcc-rich-location.h (text_range_label::get_text): Update for new
43 (range_label_for_type_mismatch::get_text): Likewise.
45 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
47 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
49 2018-09-17 David Malcolm <dmalcolm@redhat.com>
51 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
52 format_string_diagnostic_t.
53 (fmtwarn_n): Likewise.
54 * substring-locations.c
55 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
56 (format_warning_n_va): Convert to...
57 (format_string_diagnostic_t::emit_warning_n_va): ...this.
58 (format_warning_va): Convert to...
59 (format_string_diagnostic_t::emit_warning_va): ...this.
60 (format_warning_at_substring): Convert to...
61 (format_string_diagnostic_t::emit_warning): ...this.
62 (format_warning_at_substring_n): Convert to...
63 (format_string_diagnostic_t::emit_warning_n): ...this.
64 * substring-locations.h (class format_string_diagnostic_t): New
66 (format_warning_va): Convert to
67 format_string_diagnostic_t::emit_warning_va.
68 (format_warning_n_va): Convert to
69 format_string_diagnostic_t::emit_warning_n_va.
70 (format_warning_at_substring): Convert to
71 format_string_diagnostic_t::emit_warning.
72 (format_warning_at_substring_n): Convert to
73 format_string_diagnostic_t::emit_warning_n.
75 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
76 Bernd Schmidt <bernds_cb1@t-online.de>
78 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
81 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
83 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
84 operand 0 predicate to nonimmediate operand.
85 (rint<mode>2_frndint): Remove insn pattern.
86 (rint<mode>2): Change operand 1 predicate to general_operand.
87 Extend operand 1 to XFmode and generate rintxf2 insn.
88 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
89 Do not use X87MODEF mode macro.
90 (frndintxf2_<rounding>_i387): Rename from
91 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
92 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
93 to XFmode and generate significandxf3 insn.
95 2018-09-17 Richard Biener <rguenther@suse.de>
97 PR tree-optimization/87328
98 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
99 visiting unexecutable backedges when not iterating.
100 (do_rpo_vn): Mark all edges not executable even when not
103 2018-09-17 Martin Jambor <mjambor@suse.cz>
106 * doc/invoke.texi (Warning Options): Likewise.
108 2018-09-17 Richard Biener <rguenther@suse.de>
110 PR tree-optimization/87301
111 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
112 clean EH info from leftover copy assignments.
114 2018-09-17 Martin Liska <mliska@suse.cz>
116 PR gcov-profile/85871
117 * gcov.c (output_intermediate_file): Fix out of bounds
120 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
122 * config/arc/arc.c: Object attributes for core4 not reflected
124 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
127 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
129 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
131 2018-09-17 Martin Liska <mliska@suse.cz>
133 * doc/gcov.texi: Document new option --use-hotness-colors.
134 * gcov.c (struct source_info): Declare new field.
135 (source_info::source_info): Set default for maximum_count.
136 (print_usage): Add new -q option.
137 (process_args): Process it.
138 (accumulate_line_info): Save src->maximum_count.
139 (output_line_beginning): Make color line number if
140 flag_use_hotness_colors is set.
141 (output_line_details): Pass default argument value.
142 (output_lines): Pass src->maximum_count.
144 2018-09-17 Martin Liska <mliska@suse.cz>
146 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
147 Use processor_names table.
148 * config/i386/i386.c (ix86_default_align): Use
149 processor_cost_table for alignment values.
150 (ix86_option_override_internal): Use processor_names.
151 (ix86_function_specific_print): Likewise.
152 * config/i386/i386.h (struct processor_costs):
153 Add alignment values.
154 (struct ptt): Remove and replace with const char *.
155 * config/i386/x86-tune-costs.h (struct processor_costs):
156 Declare default alignments for all costs.
158 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
160 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
161 symbolics or VR_VARYING ranges for ABS_EXPR.
162 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
163 when range will wrap.
165 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
168 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
169 before and after a JUMP_TABLE_DATA.
171 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
174 * dojump.c (do_compare_and_jump): Canonicalize function pointers
175 when one operand is a function pointer. Use POINTER_TYPE_P and
176 FUNC_OR_METHOD_TYPE_P.
177 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
178 * fold-const.c (build_range_check): Likewise.
179 * match.pd (simple_comparison): Likewise.
181 2018-09-14 David Malcolm <dmalcolm@redhat.com>
184 * spellcheck.c (get_edit_distance_cutoff): New function.
185 (selftest::test_edit_distance_unit_test_oneway): Rename to...
186 (selftest::test_get_edit_distance_one_way): ...this.
187 (selftest::test_get_edit_distance_unit): Rename to...
188 (selftest::test_get_edit_distance_both_ways): ...this.
189 (selftest::test_edit_distances): Move tests to this new function,
190 and test some more pairs of strings. Update for above renaming.
191 (selftest::get_old_cutoff): New function.
192 (selftest::test_get_edit_distance_cutoff): New function.
193 (selftest::assert_suggested_for): New function.
194 (ASSERT_SUGGESTED_FOR): New macro.
195 (selftest::assert_not_suggested_for): New function.
196 (ASSERT_NOT_SUGGESTED_FOR): New macro.
197 (selftest::test_suggestions): New function.
198 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
199 tests to selftest::test_edit_distances and call it. Add calls to
200 selftest::test_get_edit_distance_cutoff and
201 selftest::test_suggestions.
202 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
203 (best_match::consider): Replace hard-coded cutoff calculation with
205 (best_match::get_cutoff): New declaration.
206 (best_match::get_best_meaningful_candidate): Likewise.
208 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
210 * builtins.c (fold_builtin_strlen): Remove TODO comment.
212 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
215 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
217 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
218 terminated string literal.
220 2018-09-14 Martin Sebor <msebor@redhat.com>
222 * builtins.c (unterminated_array): Handle ARRAY_REF.
223 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
224 * builtins.h (unterminated_array): Declare extern.
225 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
227 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
230 2018-09-14 Martin Sebor <msebor@redhat.com>
231 Jeff Law <law@redhat.com>
233 * builtins.c (unterminated_array): New.
234 (expand_builtin_strcpy): Adjust.
235 (expand_builtin_strcpy_args): Detect unterminated arrays.
236 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
238 * gimple-fold.h (get_maxval_strlen): Add argument.
239 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
241 * gimple-fold.c (get_range_strlen): Add argument.
242 (get_maxval_strlen): Adjust.
243 * gimple-fold.h (get_range_strlen): Add argument.
245 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
247 * config/i386/movdirintrin.h: Fix copyright year.
249 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
251 * reg-stack.c: Include regs.h.
252 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
253 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
254 FIRST_STACK_REG, not DFmode.
255 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
256 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
257 (change stack): Default register mode to the reg_raw_mode of
258 FIRST_STACK_REG, not DFmode.
259 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
260 (*swapxf): Rename from swapxf.
262 2018-09-14 Carl Love <cel@us.ibm.com>
264 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
265 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
267 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
270 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
273 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
276 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
278 2018-09-14 Jason Merrill <jason@redhat.com>
280 Fix --enable-gather-detailed-mem-stats.
281 * hash-table.c (hash_table_usage): Change from variable to function.
282 * hash-table.h: Adjust.
283 * Makefile.in: Add missing dependencies on hash-table.h.
285 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
287 PR tree-optimization/87259
289 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
290 execute_cse_reciprocals_1 has tried transforming.
292 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
294 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
295 VR_VARYING for PLUS/MINUS_EXPR.
297 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
299 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
302 2018-09-14 Richard Biener <rguenther@suse.de>
305 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
306 bits for the merged partition.
308 2018-09-13 Martin Sebor <msebor@redhat.com>
309 Bernd Edlinger <bernd.edlinger@hotmail.de>
311 * builtins.h (c_srlen): Add argument.
312 * builtins.c (warn_string_no_nul): New function.
313 (c_strlen): Add argument and use it. Update recursive calls.
314 Pass DECL argument to string_constant to get info on non
315 terminated strings. Update *NONSTR as needed.
316 (fold_builtin_strlen): Add argument to calls to c_strlen.
317 Warn for unterminated arrays.
318 (warn_string_no_null): Add prototype.
319 * expr.c (string_constant): Update arguments. Update recursive
320 calls appropriately. Detect missing NUL terminator and outermost
321 declaration its missing in.
322 Improve checks for arrays with nonzero lower bound or elements
323 that are not a single byte. Simplify offset computation.
324 Simplify checks for non-NUL terminated strings.
325 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
326 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
328 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
330 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
332 * fold-const.c (c_getstr): Fix function comment. Remove unused third
333 argument. Fix range checks.
334 * fold-const.h (c_getstr): Adjust protoype.
335 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
336 string is constant but contains no NUL byte.
338 * expr.c (string_constant): Adjust function comment.
339 Remove bogus check for zero termination.
341 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
343 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
344 (get_constant_size): Don't make STRING_CSTs larger than they are.
345 (check_string_literal): New check function for STRING_CSTs.
346 (output_constant): Use it.
348 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
351 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
353 2018-09-13 Richard Biener <rguenther@suse.de>
355 PR tree-optimization/87263
356 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
357 (struct unwind_state): Add max_rpo field.
358 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
359 Compute max_rpo, the max RPO number a block can be backwards reached
360 from. Re-write non-iterating mode to a RPO ordered worklist approach,
361 separating it from the iterating mode.
363 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
365 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
366 (rfs_decision): New scheduling decision.
368 2018-09-13 Richard Biener <rguenther@suse.de>
371 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
372 (vn_nary_op_insert_pieces_predicated): Do not write useless
373 valid_dominated_by_p entry outside of the allocated storage.
375 2018-09-13 Omar Sandoval <osandov@osandov.com>
376 Tom de Vries <tdevries@suse.de>
379 * dwarf2out.c (is_c): New function.
380 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
382 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
385 * config/aarch64/aarch64.md (*aarch64_bfxil):
387 * config/aarch64/constraints.md (Ulc): Define.
388 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
390 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
393 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
395 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
396 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
397 aarch64_layout_frame call.
398 (aarch64_expand_epilogue): Likewise.
399 (aarch64_initial_elimination_offset): Likewise.
400 (aarch64_get_separate_components): Likewise.
401 (aarch64_use_return_insn_p): Likewise.
402 (aarch64_layout_frame): Remove unneeded check.
404 2018-09-13 Jakub Jelinek <jakub@redhat.com>
406 * configure.ac: Only append
407 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
408 gcc_config_arguments if it was never reconfigured or last reconfigure
409 was with different arguments.
410 * configure: Regenerated.
412 2018-09-13 Jakub Jelinek <jakub@redhat.com>
413 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
416 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
417 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
419 2018-09-13 Jakub Jelinek <jakub@redhat.com>
421 PR tree-optimization/87287
422 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
423 X % C == 0 to X % (unsigned) C == 0 optimization to ...
424 * match.pd (X % C == 0): ... here. New optimization.
426 2018-09-12 Jakub Jelinek <jakub@redhat.com>
429 * expr.h (maybe_optimize_mod_cmp): Declare.
430 * expr.c (mod_inv): New function.
431 (maybe_optimize_mod_cmp): New function.
432 (do_store_flag): Use it.
433 * cfgexpand.c (expand_gimple_cond): Likewise.
435 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
436 Julian Brown <julian@codesourcery.com>
439 * gimplify.c (gimplify_scan_omp_clauses): Set
440 target_firstprivatize_array_bases in OpenACC parallel and kernels
441 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
442 OpenACC data regions.
444 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
446 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
447 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
449 2018-09-12 Richard Biener <rguenther@suse.de>
451 PR tree-optimization/87280
452 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
453 edge but unreachable target.
454 (do_rpo_vn): For conservatively handling a PHI only mark
455 the backedge executable but not the block reachable.
457 2018-09-12 Richard Biener <rguenther@suse.de>
459 PR tree-optimization/87266
460 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
463 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
465 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
467 ("trunc<BFP:mode><DFP_ALL:mode>2")
468 ("trunc<DFP_ALL:mode><BFP:mode>2")
469 ("extend<BFP:mode><DFP_ALL:mode>2")
470 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
471 according to the target operand type.
473 2018-09-12 Jakub Jelinek <jakub@redhat.com>
474 Andreas Krebbel <krebbel@linux.ibm.com>
476 PR tree-optimization/86844
477 * gimple-ssa-store-merging.c
478 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
479 there are any overlapping stores in between them, make sure they are
480 also coalesced or we give up completely.
482 2018-09-12 Jakub Jelinek <jakub@redhat.com>
485 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
486 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
488 2018-09-12 Tom de Vries <tdevries@suse.de>
490 * common.opt (gdescribe-dies): Add option.
491 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
492 attribute for artifical and nameless decls.
493 (dwarf2out_register_external_die): Add description attribute to
494 external reference die.
495 (add_desc_attribute): New functions.
496 (gen_subprogram_die): Add description attribute to
497 DW_TAG_call_site_parameter.
498 * tree-pretty-print.c (print_generic_expr_to_str): New function.
499 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
500 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
502 (@item -gdescribe-dies): Add.
504 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
506 * tree-vrp.c (vrp_shift_undefined_p): Remove.
507 (extract_range_from_binary_expr_1: Call
508 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
509 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
512 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
514 * gimple-ssa-warn-alloca.c
515 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
516 field for ALLOCA_BOUND_*_LARGE.
518 2018-09-11 Nathan Sidwell <nathan@acm.org>
520 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
522 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
524 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
525 for clobbers. Remove obsolete comment.
527 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
529 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
530 mpxchk, mpxld and mpxst types.
531 (define_attr length_immediate): Remove all processing of mpx types.
532 (define_attr prefix_0f): Ditto.
533 (define_attr memory): Ditto.
535 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
537 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
538 (log<mode>2): Change operand 1 predicate to general_operand.
539 Extend operand 1 to XFmode and generate logxf3 insn.
540 (log10<mode>2): Change operand 1 predicate to general_operand.
541 Extend operand 1 to XFmode and generate log10xf3 insn.
542 (log2<mode>2): Change operand 1 predicate to general_operand.
543 Extend operand 1 to XFmode and generate log2xf3 insn.
544 (fyl2xp1_extend<mode>xf3_i387): Remove.
545 (log1p<mode>2): Change operand 1 predicate to general_operand.
546 Extend operand 1 to XFmode and generate log1pxf3 insn.
547 (fxtract_extend<mode>xf3_i387): Remove.
548 (logb<mode>2): Change operand 1 predicate to general_operand.
549 Extend operand 1 to XFmode and generate logbxf3 insn.
550 (ilogb<mode>2): Change operand 1 predicate to general_operand.
551 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
552 (significand<mode>2): Change operand 1 predicate to general_operand.
553 Extend operand 1 to XFmode and generate significandxf3 insn.
555 2018-09-11 Nathan Sidwell <nathan@acm.org>
557 * gcc.c (perror_with_name, pfatal_with_name): Delete.
558 (load_specs): Use fatal_error.
559 (DELETE_IF_ORDINARY, process_command): Use error.
560 (execute, run_attempt): Use fatal_error.
562 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
564 * diagnostic-core.h (sorry_at): New prototype.
565 * diagnostic.c (sorry_at): New function.
567 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
569 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
570 by zero as VR_UNDEFINED.
572 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
574 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
575 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
576 (<sincos>mode2): New expander.
577 (sincos_extend<mode>xf3_i387): Remove insn pattern.
578 (sincos -> sin, cos splitters): Remove splitter patterns.
579 (sincos<mode>3): Change operand 2 predicate to general_operand.
580 Extend operand 2 to XFmode and generate sincosxf3 insn.
581 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
582 Change operand 3 predicate to const1_operand.
583 (fptan_extend<mode>xf4_i387): Remove insn pattern.
584 (tanxf2): Update operands in the call to fptanxf4_i387.
585 (tan<mode>2): Change operand 1 predicate to general_operand.
586 Extend operand 1 to XFmode and generate tanxf3 insn.
587 (atan2xf3): Rename from *fpatanxf3_i387.
588 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
589 (atan2xf3): Remove expander.
590 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
591 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
592 (atan<mode>2): Change operand 1 predicate to general_operand.
593 Extend operand 1 to XFmode and generate atanxf3 insn.
595 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
597 * config/i386/i386.md (x87/SSE constant load splitter): Use
598 memory_operand instead of nonimmediate_operand for input operand
601 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
603 * config/i386/i386.md (float partial SSE register stall splitter): Move
604 splitter near its instruction pattern.
605 (float_extend partial SSE register stall splitter): Ditto.
606 (float_truncate partial SSE register stall splitter): Ditto.
608 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
611 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
612 to speculation_safe_value_not_needed.
615 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
616 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
617 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
618 leaf_function_p, instead use has_hard_reg_initial_val.
620 2018-09-09 Nathan Sidwell <nathan@acm.org>
622 * gcc.h (pfatal_with_name): Don't declare here.
623 * gcc.c (pfatal_with_name): Make static.
625 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
627 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
630 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
632 PR rtl-optimization/85458
633 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
634 priority hook to reduce the priority of EXPR.
636 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
638 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
639 DImode for x87 on 32bit targets. Conditionally disable x87 modes
640 with X87_ENABLE_FLOAT. Remove preparation code.
641 (*float<SWI48:mode><MODEF:mode>2): Rename from
642 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
643 math using "enabled" attribute.
644 (*floatdi<MODEF:mode>2_i387): Rename from
645 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
646 enable for 32bit targets only.
647 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
649 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
650 as operand 1 predicate. Rewrite as define_insn_and_split.
651 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
653 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
655 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
656 to fallthru to FLOAT case.
658 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
661 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
662 around folding of vec_sl to handle out of range shift values.
664 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
666 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
667 Update callers to gen_fix_trunc<mode>_i387_fisttp
668 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
669 nonimmediate_operand.
670 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
671 and corresponding splitters.
672 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
673 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
674 (fix_truncdi_i387_with_temp): Remove insn pattern
675 and corresponding splitters.
676 (fix_trunc<mode>_i387): Change operand 0 predicate to
677 nonimmediate_operand.
678 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
679 and corresponding splitters.
680 (*fistdi2_1): Remove.
682 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
683 (lrintxfdi2): Remove expander. Reimplement as define_insn.
684 (*fist<mode>2_1): Remove.
685 (fist<mode>2): Ditto.
686 (fist<mode>2_with_temp): Remove insn pattern and corresponding
688 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
689 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
690 (fistdi2_<rounding>): Change operand 0 predicate to
691 nonimmediate_operand.
692 (fistdi2_<rounding>_with_temp): Remove insn pattern
693 and corresponding splitters.
694 (fist<mode>2_<rounding>): Change operand 0 predicate to
695 nonimmediate_operand.
696 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
697 and corresponding splitters.
699 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
701 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
703 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
706 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
708 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
709 early gimple folding of vec_splat().
710 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
711 * gimple-fold.h: Add an extern define for tree_vec_extract().
713 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
715 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
716 wrappers around TREE_TYPE comparisons.
718 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
721 * config/s390/predicates.md: Add nonsym_memory_operand.
722 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
723 contains a SYMBOL_REF, load it into an intermediate pseudo.
724 (s390_emit_compare_and_swap): Legitimize operand.
725 * config/s390/s390.md: Use the new nonsym_memory_operand
726 with UNSPECV_CAS patterns.
728 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
731 * config/s390/s390-passes.def: New file.
732 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
734 (make_pass_s390_early_mach): Add declaration.
735 * config/s390/s390.c (make_pass_s390_early_mach):
736 (s390_option_override): Remove dynamic registration.
737 * config/s390/t-s390: Add s390-passes.def.
739 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
741 * config/s390/s390.c (s390_decompose_constant_pool_ref):
742 Remove UNSPEC_LTREL_BASE check.
743 (annotate_constant_pool_refs): Likewise.
744 (find_constant_pool_ref): Likewise.
745 (find_ltrel_base): Removed.
746 (replace_ltrel_base): Removed.
747 (s390_mainpool_finish): Remove replace_ltrel_base call.
748 (s390_chunkify_start): Remove pending LTREL_BASE logic.
749 (s390_chunkify_finish): Remove replace_ltrel_base call.
750 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
752 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
755 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
756 to speculation_safe_value_not_needed.
758 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
759 Bernd Schmidt <bernds_cb1@t-online.de>
761 * config/nvptx/nvptx-opts.h: New file.
762 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
763 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
765 (TARGET_SM35): New macro.
766 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
768 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
771 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
773 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
775 * config/i386/i386.md (truncdfsf2): Remove expander.
776 (truncdfsf2_with_temp): Ditto.
777 (truncxf<mode>2): Ditto.
778 (*truncdfsf_fast_mixed): Remove insn pattern.
779 (*truncdfsf_fast_i387): Ditto.
780 (*truncdfsf_mixed): Ditto.
781 (*truncdfsf_i387): Ditto.
782 (*truncdfsf2_i387_1): Ditto.
783 (*truncxfsf2_mixed): Ditto.
784 (*truncxfdf2_mixed): Ditto.
785 (*truncxf<mode>2_i387_noop): Ditto. Update callers
786 to call gen_truncxf<mode>2 instead.
787 (*truncxf<mode>2_i387): Remove.
788 (reg->reg splitters): Remove splitter pattern.
789 (reg->mem splitters): Ditto.
791 (truncdfsf2): New insn pattern.
792 (truncxf<mode>2): Ditto.
794 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
796 * tree-ssa-math-opts.c (is_mult_by): New function.
797 (is_square_of): Use the above.
798 (optimize_recip_sqrt): New function.
799 (pass_cse_reciprocals::execute): Use the above.
801 2018-09-05 Richard Biener <rguenther@suse.de>
804 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
805 to zero-init the emplaced vec.
807 2018-09-05 Martin Liska <mliska@suse.cz>
809 PR tree-optimization/87205
810 * tree-switch-conversion.c (pass_lower_switch::execute):
811 Group cases for switch statements.
813 2018-09-05 Richard Biener <rguenther@suse.de>
815 PR tree-optimization/87217
816 * tree-ssa-sccvn.c (vuse_valueize): New.
817 (vn_reference_lookup_pieces): Use it.
818 (vn_reference_lookup): Likewise.
820 2018-09-05 Nathan Sidwell <nathan@acm.org>
823 * stor-layout.c (place_field): Scan forwards to check last
824 bitfield when ms_bitfield_placement is in effect.
826 2018-09-05 Richard Biener <rguenther@suse.de>
829 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
832 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
833 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
835 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
836 * config.gcc (extra_objs): Build it.
837 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
839 * config/aarch64/aarch64-passes.def
840 (pass_tag_collision_avoidance): New pass.
841 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
842 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
843 (aarch64_classify_address): Remove static qualifier.
844 (aarch64_address_info, aarch64_address_type): Move to...
845 * config/aarch64/aarch64-protos.h: ... here.
846 (make_pass_tag_collision_avoidance): New function.
847 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
850 2018-09-05 Martin Liska <mliska@suse.cz>
852 * doc/gcov.texi: Update documentation of humar
854 * gcov.c (format_count): Print one decimal place, it provides
855 more fine number of situations like '1G' vs. '1.4G'.
857 2018-09-05 Martin Liska <mliska@suse.cz>
860 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
861 * optc-gen.awk: Allow 'Var' for Deprecated options in order
862 to generate a MASK value.
864 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
867 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
868 if frame pointer isn't used.
869 (compute_frame_pointer_to_fb_displacement): Likewise.
871 2018-09-04 Jakub Jelinek <jakub@redhat.com>
874 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
875 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
876 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
877 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
878 and OPTION_MASK_ISA_XSAVEC_UNSET.
880 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
882 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
883 XOR operations in NAND case.
885 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
887 * wide-int-range.cc (wide_int_range_convert): New.
888 * wide-int-range.h (wide_int_range_convert): New.
889 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
890 code into wide_int_range_convert.
891 (extract_range_into_wide_ints): Do not munge anti range constants
892 into the entire domain. Just return the range back.
894 2018-09-04 Martin Liska <mliska@suse.cz>
896 * genmatch.c (output_line_directive): Add new argument
898 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
900 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
902 * doc/invoke.texi (Option Summary): Add whitespace.
904 * doc/invoke.texi (Option Summary): Add -Waligned-new.
906 2018-09-04 Richard Biener <rguenther@suse.de>
908 PR tree-optimization/87211
909 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
910 backedge value we're supposed to treat as VARYING also number
911 the PHI to VARYING in case it got a different value-number already.
913 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
915 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
916 (extract_range_from_binary_expr_1): Do not call
917 vrp_can_optimize_bit_op.
918 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
920 (wide_int_range_get_mask_and_bounds): New.
921 (wide_int_range_optimize_bit_op): New.
922 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
923 (wide_int_range_bit_and): Same.
924 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
925 (wide_int_range_optimize_bit_op): New.
926 (wide_int_range_get_mask_and_bounds): New.
928 2018-09-04 Richard Biener <rguenther@suse.de>
930 PR tree-optimization/87176
931 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
932 variable. When value-numbering a virtual PHI node make sure
933 to not value-number to the backedge value.
935 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
937 * doc/extend.texi (Long Long, Hex Floats): Document support for
938 long long and hex floats in more recent versions of ISO C++.
940 2018-09-03 Richard Biener <rguenther@suse.de>
942 PR tree-optimization/87177
943 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
946 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
948 * bb-reorder.c (edge_order): Convert to C-qsort-style
949 tri-state comparator.
950 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
952 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
954 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
955 tri-state comparator.
956 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
958 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
960 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
961 (mergesort): ... here as maximum count for using netsort.
962 (gcc_qsort): Set nlim to 3 if stable sort is requested.
963 (gcc_stablesort): New.
964 * system.h (gcc_stablesort): Declare.
966 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
968 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
969 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
970 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
972 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
974 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
975 lxsdx and stxsdx alternatives.
976 (*mov<mode>_hardfloat64): Ditto.
977 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
979 2018-09-03 Richard Biener <rguenther@suse.de>
981 PR tree-optimization/87200
982 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
985 2018-09-03 Martin Liska <mliska@suse.cz>
987 PR tree-optimization/87201
988 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
989 Fix parenthesis in an expression.
991 2018-09-03 Richard Biener <rguenther@suse.de>
993 PR tree-optimization/87197
994 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
995 visited. CSE the VN_INFO hashtable lookup.
997 PR tree-optimization/87169
998 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
999 iterating make sure there's no extra backedges from irreducible
1000 regions feeding the header. Mark the destination block
1003 2018-09-03 Martin Liska <mliska@suse.cz>
1006 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1007 * common/common-targhooks.c (default_get_valid_option_values):
1009 * common/common-targhooks.h (default_get_valid_option_values):
1011 * common/config/i386/i386-common.c: Move processor_target_table
1013 (ix86_get_valid_option_values): New function.
1014 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1015 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1016 (PTA_*): Move all defined masks into i386-common.c.
1017 (ix86_function_specific_restore): Use new processor_cost_table.
1018 * config/i386/i386.h (struct ptt): Moved from i386.c.
1019 (struct pta): Likewise.
1020 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1021 * doc/tm.texi.in: Likewise.
1022 * opt-suggestions.c (option_proposer::suggest_option):
1023 Pass prefix to build_option_suggestions.
1024 (option_proposer::get_completions): Likewise.
1025 (option_proposer::build_option_suggestions): Use the new target
1027 * opts.c (struct option_help_tuple): New struct.
1028 (print_filtered_help): Use the new target hook.
1030 2018-09-03 Martin Liska <mliska@suse.cz>
1033 * predict.c (set_even_probabilities): Add likely_edges
1034 argument and handle cases where we have precisely one
1036 (combine_predictions_for_bb): Catch also likely_edges.
1037 (tree_predict_by_opcode): Handle gswitch statements.
1038 * tree-cfg.h (find_case_label_for_value): New declaration.
1039 (find_taken_edge_switch_expr): Likewise.
1040 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1041 Find pivot in decision tree based on probabily, not by number of
1044 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1046 * doc/standards.texi (Standards): Update Objective-C reference.
1048 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1050 * doc/install.texi (Prerequisites): Update link for MPC.
1052 2018-09-01 Michael Matz <matz@suse.de>
1054 PR tree-optimization/87074
1055 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1056 PHIs for outer-loop uses.
1058 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1060 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1061 * doc/invoke.texi (C Dialect Options): Ditto.
1063 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1065 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1067 2018-08-31 Richard Biener <rguenther@suse.de>
1069 PR tree-optimization/87168
1070 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1071 (rpo_elim::eliminate_avail): When OP was not visited it must
1074 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1076 * tree-vrp.c (copy_value_range): Convert param "from" from
1077 "value_range *" to "const value_range *".
1078 (range_is_null): Likewise for param "vr".
1079 (range_int_cst_p): Likewise.
1080 (range_int_cst_singleton_p): Likewise.
1081 (symbolic_range_p): Likewise.
1082 (value_ranges_intersect_p): Likewise for both params.
1083 (value_range_nonnegative_p): Likewise for param "vr".
1084 (value_range_constant_singleton): Likewise.
1085 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1086 (extract_range_into_wide_ints): Likewise for param "vr".
1087 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1089 (vrp_can_optimize_bit_op): Likewise.
1090 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1092 (extract_range_from_unary_expr): Likewise.
1093 (debug_value_range): Likewise for param "vr".
1094 (value_range::dump): Add "const" qualifier.
1095 (vrp_prop::check_array_ref): Convert local "vr" from
1096 "value_range *" to "const value_range *".
1097 (vrp_prop::check_mem_ref): Likewise.
1098 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1099 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1100 (vrp_intersect_ranges): Likewise.
1101 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1102 (vrp_prop::vrp_finalize): Likewise.
1103 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1104 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1105 (extract_range_from_unary_expr): Likewise.
1106 (value_range_constant_singleton): Likewise.
1107 (symbolic_range_p): Likewise.
1108 (copy_value_range): Likewise.
1109 (extract_range_from_binary_expr_1): Likewise.
1110 (range_int_cst_p): Likewise.
1111 (vrp_set_zero_nonzero_bits): Likewise.
1112 (range_int_cst_singleton_p): Likewise.
1114 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1116 * config/aarch64/arm_neon.h (vabsd_s64): New.
1117 (vnegd_s64): Likewise.
1119 2018-08-31 Martin Jambor <mjambor@suse.cz>
1121 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1123 2018-08-31 Martin Liska <mliska@suse.cz>
1125 * ipa-icf.c (sem_item::add_type): Use
1126 sem_item::m_type_hash_cache.
1127 * ipa-icf.h: Move the cache from sem_item_optimizer
1130 2018-08-31 Nathan Sidwell <nathan@acm.org>
1132 * doc/extend.texi (Backwards Compatibility): Remove implicit
1133 extern C leeway of () being (...).
1135 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1137 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1139 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1143 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1145 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1148 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1149 gen_int_mode. Formatting fixes.
1151 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1153 * target.def (custom_function_descriptors): Improve documentation.
1154 * doc/tm.texi.in (Trampolines): Expand discussion of function
1155 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1156 beginning of the section.
1157 * doc/tm.texi: Regenerated.
1159 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1161 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1162 base class in the initializer list. This is a workaround for
1163 building with older GCC.
1164 (class auto_bb_flag): Likewise.
1166 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1168 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1169 (altivec_vcmpequ<VI_char>_p): Remove star.
1170 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1172 (expand_strncmp_vec_sequence): New function.
1173 (emit_final_str_compare_vec): New function.
1174 (expand_strn_compare): Add support for vector strncmp.
1175 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1176 length specification to bytes.
1177 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1178 (vcmpnezb_p): New pattern.
1179 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1180 for option -mstring-compare-inline-limit.
1182 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1184 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1185 (PTA_SKYLAKE): Add PTA_AES.
1186 (PTA_GOLDMONT): Likewise.
1188 2018-08-29 Jan Hubicka <jh@suse.cz>
1191 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1192 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1194 2018-08-29 Jan Hubicka <jh@suse.cz>
1196 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1198 (hash_tree): Do not visit TYPE_STUB_DECL.
1199 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1200 stream TYPE_STUB_DECL.
1201 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1202 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1203 after free_lang_data.
1204 (type_in_anonymous_namespace_p): Likewise.
1206 2018-08-29 Jan Hubicka <jh@suse.cz>
1208 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1209 comment that it has to be even number.
1210 (class sreal): Change m_sig type to int32_t.
1211 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1212 int64_t for temporary calculations.
1213 (sreal_verify_basics): Drop one bit from minimum and maximum.
1215 2018-08-30 Richard Biener <rguenther@suse.de>
1217 PR tree-optimization/87147
1218 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1219 (visit_phi): When the degenerate result is from the backedge and
1220 we didn't visit its definition yet drop to VARYING.
1221 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1223 2018-08-29 Jan Hubicka <jh@suse.cz>
1225 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1227 (hash_tree): Likewise.
1229 2018-08-29 Jan Hubicka <jh@suse.cz>
1231 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1232 and TYPE_NEXT_REF_TO.
1234 2018-08-29 Jan Hubicka <jh@suse.cz>
1236 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1237 comment that it has to be even number.
1238 (class sreal): Change m_sig type to int32_t.
1239 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1240 int64_t for temporary calculations.
1241 (sreal_verify_basics): Drop one bit from minimum and maximum.
1243 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1245 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1247 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1250 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1251 if to_add is negative.
1253 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1256 * builtins.c (c_strlen): Improve range checks.
1258 2018-08-29 Martin Sebor <msebor@redhat.com>
1259 Jeff Law <law@redhat.com>
1261 PR tree-optimization/86714
1262 PR tree-optimization/86711
1263 * builtins.c (c_strlen): Add arguments to call to string_constant.
1264 * expr.c (string_constant): Add argument. Detect missing nul
1265 terminator and outermost declaration it's missing in.
1266 * expr.h (string_constant): Add argument.
1267 * fold-const.c (read_from_constant_string): Add arguments to call to
1269 (c_getstr): Likewise.
1270 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1272 * tree-ssa-strlen.c (get_stridx): Likewise.
1274 2018-08-29 Jan Hubicka <jh@suse.cz>
1276 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1277 Do not stream DECL_VINDEX.
1278 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1279 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1280 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1282 2018-08-29 Richard Biener <rguenther@suse.de>
1284 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1285 virtual operands that are not default defs to honor region
1287 (rpo_vn_valueize): Remove ineffective code here.
1289 2018-08-29 Richard Biener <rguenther@suse.de>
1291 PR tree-optimization/87132
1292 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1293 when skipping defs reachable over backedges.
1295 2018-08-29 Richard Biener <rguenther@suse.de>
1297 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1298 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1299 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1300 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1301 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1302 (vn_reference_lookup_3): Remove use of const_parms.
1303 (free_rpo_vn): Do not free const_parms.
1304 (do_rpo_vn): Do not call init_const_parms.
1305 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1306 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1307 (call_may_clobber_ref_p_1): Likewise.
1309 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1312 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1314 (-ftree-scev-cprop): Document.
1316 2018-08-29 Jan Hubicka <jh@suse.cz>
1318 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1320 (sreal constructor): Update.
1321 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1322 sreal:operator/): Update.
1324 2018-08-29 Martin Liska <mliska@suse.cz>
1326 * tree-switch-conversion.c (switch_conversion::expand):
1327 Strenghten assumption about gswitch statements.
1329 2018-08-29 Richard Biener <rguenther@suse.de>
1331 PR tree-optimization/87117
1332 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1333 re-value-number released SSA VDEFs.
1335 2018-08-29 Richard Biener <rguenther@suse.de>
1337 PR tree-optimization/87126
1338 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1340 2018-08-28 Jim Wilson <jimw@sifive.com>
1342 * config/riscv/pic.md: Rewrite.
1343 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1345 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1346 (SOFTF, default_load, softload, softstore): New.
1348 2018-08-28 Jeff Law <law@redhat.com>
1350 * fold-const.c (fold_binary_loc): Remove recently added assert.
1352 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1354 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1355 to OP parmeter of generated function.
1357 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1359 PR tree-optimization/87009
1360 * match.pd: Add boolean optimizations.
1362 2018-08-28 Martin Sebor <msebor@redhat.com>
1365 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1366 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1367 (pass_walloca::gate): Use it.
1368 (alloca_call_type): Same.
1369 (pass_walloca::execute): Same.
1370 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1372 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1374 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1375 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1378 2018-08-28 Richard Biener <rguenther@suse.de>
1380 PR tree-optimization/87124
1381 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1382 constants before looking up avail.
1384 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1387 * calls.c (maybe_warn_nonstring_arg): Punt early if
1388 warn_stringop_overflow is zero. Don't call get_range_strlen
1389 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1390 Swap comparison operands to have constants on rhs. Only use
1391 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1392 increment lenrng[0].
1394 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1396 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1397 use of tree_to_shwi. Remove duplicated test for the size being
1398 a whole number of bytes.
1400 2018-08-28 Richard Biener <rguenther@suse.de>
1402 PR tree-optimization/87117
1403 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1404 Handle removed stmt without LHS (GIMPLE_NOP).
1406 2018-08-28 Richard Biener <rguenther@suse.de>
1408 PR tree-optimization/87117
1409 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1410 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1412 2018-08-28 Richard Biener <rguenther@suse.de>
1414 PR tree-optimization/87117
1415 * tree-ssa-pre.c (compute_avail): Do not make expressions
1416 with predicated values available.
1417 (get_expr_value_id): Assert we do not run into predicated value
1420 2018-08-28 Richard Biener <rguenther@suse.de>
1422 PR tree-optimization/87117
1423 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1424 get virtual operands.
1425 (get_expr_operands): Handle STRING_CST like other decls.
1427 2018-08-28 Martin Liska <mliska@suse.cz>
1429 * tree.h: Update documentation of fndecl_built_in_p
1433 2018-08-27 Jeff Law <law@redhat.com>
1434 PR tree-optimization/87110
1435 * tree-ssa-dse.c (compute_trims): Handle non-constant
1438 2018-08-27 Martin Sebor <msebor@redhat.com>
1440 PR tree-optimization/86914
1441 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1443 2018-08-27 Martin Sebor <msebor@redhat.com>
1445 PR tree-optimization/87112
1446 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1447 the type of the bound argument.
1449 2018-08-27 Jeff Law <law@redhat.com>
1451 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1452 type does not have a TYPE_SIZE_UNIT.
1454 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1456 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1457 with include of backend.h.
1459 2018-08-27 Richard Biener <rguenther@suse.de>
1461 PR tree-optimization/86927
1462 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1463 use const cond reduction code.
1465 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1467 PR tree-optimization/85758
1468 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1470 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1473 * diagnostic-show-locus.c (class layout_range): Update for
1474 conversion of show_caret_p to a tri-state.
1475 (layout_range::layout_range): Likewise.
1476 (make_range): Likewise.
1477 (layout::maybe_add_location_range): Likewise.
1478 (layout::should_print_annotation_line_p): Don't show annotation
1479 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1480 (layout::get_state_at_point): Update for conversion of
1481 show_caret_p to a tri-state. Bail out early for
1482 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1483 underlining or source colorization.
1484 (gcc_rich_location::add_location_if_nearby): Update for conversion
1485 of show_caret_p to a tri-state.
1486 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1487 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1489 (selftest::test_one_liner_labels): Likewise.
1490 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1491 conversion of show_caret_p to a tri-state.
1492 * pretty-print.c (text_info::set_location): Likewise.
1493 * pretty-print.h (text_info::set_location): Likewise.
1494 * substring-locations.c (format_warning_n_va): Likewise.
1495 * tree-diagnostic.c (default_tree_printer): Likewise.
1496 * tree-pretty-print.c (newline_and_indent): Likewise.
1498 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1501 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1502 line above for line-insertion fix-it hints.
1503 (selftest::test_fixit_insert_containing_newline): Update the
1504 expected results, and add a test with line-numbering enabled.
1506 2018-08-27 Martin Liska <mliska@suse.cz>
1509 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1510 params with DECL_HAS_VALUE_EXPR_P.
1512 2018-08-27 Martin Liska <mliska@suse.cz>
1514 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1515 selected expansion strategy.
1517 2018-08-27 Martin Liska <mliska@suse.cz>
1519 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1520 * builtins.c (is_builtin_fn): Likewise.
1521 * attribs.c (diag_attr_exclusions): Use new function
1522 fndecl_built_in_p and remove check for FUNCTION_DECL if
1524 (builtin_mathfn_code): Likewise.
1525 (fold_builtin_expect): Likewise.
1526 (fold_call_expr): Likewise.
1527 (fold_builtin_call_array): Likewise.
1528 (fold_call_stmt): Likewise.
1529 (set_builtin_user_assembler_name): Likewise.
1530 (is_simple_builtin): Likewise.
1531 * calls.c (gimple_alloca_call_p): Likewise.
1532 (maybe_warn_nonstring_arg): Likewise.
1533 * cfgexpand.c (expand_call_stmt): Likewise.
1534 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1535 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1536 (cgraph_node::verify_node): Likewise.
1537 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1538 (cgraph_node::create_clone): Likewise.
1539 * config/arm/arm.c (arm_insert_attributes): Likewise.
1540 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1541 * dse.c (scan_insn): Likewise.
1542 * expr.c (expand_expr_real_1): Likewise.
1543 * fold-const.c (operand_equal_p): Likewise.
1544 (fold_binary_loc): Likewise.
1545 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1546 * gimple-low.c (lower_stmt): Likewise.
1547 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1548 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1549 * gimple.c (gimple_build_call_from_tree): Likewise.
1550 (gimple_call_builtin_p): Likewise.
1551 (gimple_call_combined_fn): Likewise.
1552 * gimplify.c (gimplify_call_expr): Likewise.
1553 (gimple_boolify): Likewise.
1554 (gimplify_modify_expr): Likewise.
1555 (gimplify_addr_expr): Likewise.
1556 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1557 * ipa-cp.c (determine_versionability): Likewise.
1558 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1559 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1560 * ipa-split.c (visit_bb): Likewise.
1561 (split_function): Likewise.
1562 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1563 * lto-cgraph.c (input_node): Likewise.
1564 * lto-streamer-out.c (write_symbol): Likewise.
1565 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1566 (lower_omp_1): Likewise.
1567 * predict.c (strip_predict_hints): Likewise.
1568 * print-tree.c (print_node): Likewise.
1569 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1570 * trans-mem.c (is_tm_irrevocable): Likewise.
1571 (is_tm_load): Likewise.
1572 (is_tm_simple_load): Likewise.
1573 (is_tm_store): Likewise.
1574 (is_tm_simple_store): Likewise.
1575 (is_tm_abort): Likewise.
1576 (tm_region_init_1): Likewise.
1577 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1578 * tree-cfg.c (verify_gimple_call): Likewise.
1579 (move_stmt_r): Likewise.
1580 (stmt_can_terminate_bb_p): Likewise.
1581 * tree-eh.c (lower_eh_constructs_2): Likewise.
1582 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1583 * tree-inline.c (remap_gimple_stmt): Likewise.
1584 (copy_bb): Likewise.
1585 (estimate_num_insns): Likewise.
1586 (fold_marked_statements): Likewise.
1587 * tree-sra.c (scan_function): Likewise.
1588 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1589 (optimize_stack_restore): Likewise.
1590 (pass_fold_builtins::execute): Likewise.
1591 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1592 (mark_all_reaching_defs_necessary_1): Likewise.
1593 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1594 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1595 (pass_forwprop::execute): Likewise.
1596 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1597 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1598 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1599 * tree-ssa-strlen.c (get_string_length): Likewise.
1600 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1601 (find_func_aliases_for_call): Likewise.
1602 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1603 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1604 * tree-tailcall.c (find_tail_calls): Likewise.
1605 * tree.c (need_assembler_name_p): Likewise.
1606 (free_lang_data_in_decl): Likewise.
1607 (get_call_combined_fn): Likewise.
1608 * ubsan.c (is_ubsan_builtin_p): Likewise.
1609 * varasm.c (incorporeal_function_p): Likewise.
1610 * tree.h (DECL_BUILT_IN): Remove and replace with
1612 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1613 (fndecl_built_in_p): New.
1615 2018-08-27 Martin Liska <mliska@suse.cz>
1617 PR tree-optimization/86847
1618 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1619 Dump also subtree probability.
1620 (switch_decision_tree::do_jump_if_equal): New function.
1621 (switch_decision_tree::emit_case_nodes): Handle special
1622 situations in balanced tree that can be emitted much simpler.
1623 Fix calculation of probabilities that happen in tree expansion.
1624 * tree-switch-conversion.h (struct cluster): Add
1626 (struct simple_cluster): Likewise.
1627 (struct case_tree_node): Add new function has_child.
1628 (do_jump_if_equal): New.
1630 2018-08-27 Martin Liska <mliska@suse.cz>
1632 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1633 Add new argument to bit_test_cluster constructor.
1634 (bit_test_cluster::emit): Set bits really number of values
1636 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1637 probability argument.
1638 * tree-switch-conversion.h (struct bit_test_cluster):
1639 Add m_handles_entire_switch.
1641 2018-08-27 Martin Liska <mliska@suse.cz>
1643 PR tree-optimization/86702
1644 * tree-switch-conversion.c (jump_table_cluster::emit):
1645 Make probabilities even for values in jump table
1646 according to number of cases handled.
1647 (switch_decision_tree::compute_cases_per_edge): Pass
1648 argument to reset_out_edges_aux function.
1649 (switch_decision_tree::analyze_switch_statement): Likewise.
1650 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1653 2018-08-27 Martin Liska <mliska@suse.cz>
1655 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1656 cfun argument explicitly.
1657 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1658 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1659 function gimple_switch_default_bb.
1660 (convert_switch_statements):
1662 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1663 * stmt.c (label_to_block_fn): Use label_to_block and pass
1664 cfun argument explicitly and use gimple_switch_label_bb.
1665 (expand_case): Likewise.
1666 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1667 cfun argument explicitly. Likewise.
1668 (make_edges_bb): Likewise.
1669 (make_cond_expr_edges): Likewise.
1670 (get_cases_for_edge): Likewise.
1671 (make_gimple_switch_edges): Likewise.
1672 (label_to_block_fn): Likewise.
1673 (label_to_block): Likewise.
1674 (make_goto_expr_edges): Likewise.
1675 (make_gimple_asm_edges): Likewise.
1676 (main_block_label): Likewise.
1677 (group_case_labels_stmt): Likewise.
1678 (find_taken_edge_computed_goto): Likewise.
1679 (find_taken_edge_switch_expr): Likewise.
1680 (gimple_verify_flow_info): Likewise.
1681 (gimple_redirect_edge_and_branch): Likewise.
1682 (gimple_switch_label_bb): New function.
1683 (gimple_switch_default_bb): Likewise.
1684 (gimple_switch_edge): Likewise.
1685 (gimple_switch_default_edge): Likewise.
1686 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1687 (label_to_block): ... with this.
1688 (gimple_switch_label_bb): New.
1689 (gimple_switch_default_bb): Likewise.
1690 (gimple_switch_edge): Likewise.
1691 (gimple_switch_default_edge): Likewise.
1692 * tree-cfgcleanup.c (convert_single_case_switch): Use
1693 new gimple functions and pass new argument to label_to_block.
1694 (cleanup_control_flow_bb):
1695 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1696 cfun argument explicitly.
1697 (make_eh_edges): Likewise.
1698 (redirect_eh_dispatch_edge): Likewise.
1699 (lower_resx): Likewise.
1700 (lower_eh_dispatch): Likewise.
1701 (maybe_remove_unreachable_handlers): Likewise.
1702 (unsplit_eh): Likewise.
1703 (cleanup_empty_eh): Likewise.
1704 (verify_eh_edges): Likewise.
1705 (verify_eh_dispatch_edge): Likewise.
1706 * tree-ssa-dom.c (record_edge_info): Likewise.
1707 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1708 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1709 (thread_through_normal_block): Likewise.
1710 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1711 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1712 * tree-switch-conversion.c (switch_conversion::collect): Use new
1714 (switch_conversion::check_final_bb): Likewise.
1715 (switch_conversion::gather_default_values): Pass new argument
1717 (switch_conversion::build_constructors): Likewise.
1718 (switch_decision_tree::compute_cases_per_edge): Use new
1719 gimple_switch_edge function.
1720 (switch_decision_tree::analyze_switch_statement): Pass new argument
1722 (switch_decision_tree::try_switch_expansion): Use
1723 gimple_switch_default_edge.
1724 * tree-vrp.c (find_switch_asserts): Pass new argument
1726 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1727 (vr_values::simplify_switch_using_ranges): Likewise.
1729 2018-08-27 Richard Biener <rguenther@suse.de>
1731 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1732 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1734 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1735 (struct vn_nary_op_s): Add unwind_to member. Add
1736 predicated_values flag and put result into a union together
1737 with a linked list of vn_pval.
1738 (struct vn_ssa_aux): Add name member to make maintaining
1739 a map of SSA name to vn_ssa_aux possible. Remove no longer
1740 needed info, dfsnum, low, visited, on_sccstack, use_processed
1741 and range_info_anti_range_p members.
1742 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1743 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1745 (vn_valueize): New global.
1746 (vn_context_bb): Likewise.
1747 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1748 VN_INFO_PTR_INFO): Remove.
1749 * tree-ssa-sccvn.c: ... (rewrite)
1750 (pass_fre::execute): For -O2+ initialize loops and run
1751 RPO VN in optimistic mode (iterating). For -O1 and -Og
1752 run RPO VN in non-optimistic mode.
1753 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1754 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1755 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1756 (rpo-vn-max-loop-depth): Document.
1757 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1758 when valuezing the VUSE signals we walked out of the region.
1759 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1760 (phi_translate): Set VN context block to use for availability
1762 (compute_avail): Likewise.
1763 (pre_valueize): New function.
1764 (pass_pre::execute): Adjust to the RPO VN API.
1766 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1767 (propagate_constants_for_unrolling): Remove.
1768 (tree_unroll_loops_completely): Perform value-numbering
1769 on the unrolled bodies loop parent.
1771 2018-08-27 Richard Biener <rguenther@suse.de>
1773 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1774 for partial antic compute.
1776 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1778 PR rtl-optimization/87065
1779 * combine.c (simplify_if_then_else): Formatting fix.
1780 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1782 (known_cond): Don't return const_true_rtx for vector modes. Use
1783 CONST0_RTX instead of const0_rtx. Formatting fixes.
1785 2018-08-27 Martin Liska <mliska@suse.cz>
1787 PR gcov-profile/87069
1788 * gcov.c (process_file): Record files already processed
1789 and warn about a file being processed multiple times.
1791 2018-08-27 Martin Liska <mliska@suse.cz>
1794 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1795 Set default values for x_aarch64_*_string strings.
1796 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1797 prefix. For -mabi do not print '=ABI' in help and use
1798 <option_value> format for -msve-vector-bits and -moverride
1801 2018-08-26 Jeff Law <law@redhat.com>
1803 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1806 2018-08-26 Marek Polacek <polacek@redhat.com>
1808 PR c++/87029, Implement -Wredundant-move.
1809 * doc/invoke.texi: Document -Wredundant-move.
1811 2018-08-25 Martin Sebor <msebor@redhat.com>
1813 PR tree-optimization/87059
1814 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1815 to the same type as the other.
1816 * fold-const.c (fold_binary_loc): Assert expectation.
1818 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1820 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1821 extraneous parentheses, dead code section and formatting.
1823 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1826 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1827 wide enough for jumps in the line-numbering to be visible.
1828 (layout::print_gap_in_line_numbering): New member function.
1829 (layout::calculate_line_spans): When using line numbering, merge
1830 line spans that are only 1 line apart.
1831 (diagnostic_show_locus): When printing line numbers, show gaps in
1832 line numbering directly, rather than printing headers.
1833 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1834 line-numbering with multiple line spans.
1835 (selftest::test_fixit_insert_containing_newline_2): Add test of
1836 line-numbering, in which the spans are close enough to be merged.
1838 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1840 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1841 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1842 * tree-vrp.c (range_is_nonnull): Remove.
1843 (range_includes_zero_p): Accept value_range instead of min/max.
1844 (extract_range_from_binary_expr_1): Do not early bail on
1846 Use range_includes_zero_p instead of range_is_nonnull.
1847 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1848 of range_is_nonnull.
1849 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1850 special case VR_ANTI_RANGE.
1851 (vrp_finalize): Same.
1852 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1854 (range_is_nonnull): Remove.
1855 * vr-values.c (vrp_stmt_computes_nonzero): Use
1856 range_includes_zero_p instead of range_is_nonnull.
1857 (extract_range_basic): Pass value_range to range_includes_zero_p
1858 instead of range_is_nonnull.
1860 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1862 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1863 * emit-rtl.h (rtl_data): Remove return_bnd.
1864 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1865 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1866 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1867 (POINTER_BOUNDS_MODE): Remove definition.
1868 (make_pointer_bounds_mode): Remove.
1869 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1870 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1871 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1872 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1873 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1874 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1875 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1877 * config/i386/i386-modes.def (BND32, BND64): Remove.
1878 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1879 (dbx64_register_map): Ditto.
1880 (svr4_dbx_register_map): Ditto.
1881 (indirect_thunk_bnd_needed): Remove.
1882 (indirect_thunks_bnd_used): Ditto.
1883 (indirect_return_bnd_needed): Ditto.
1884 (indirect_return_via_cx_bnd): Ditto.
1885 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1886 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1887 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1888 (output_indirect_thunk_function): Remove handling of
1889 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1890 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1891 (ix86_save_reg): Remove handling of crtl->return_bnd.
1892 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1893 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1894 and UNSPEC_BNDLX_ADDR.
1895 (ix86_output_indirect_branch_via_reg): Remove handling of
1896 indirect_thunk_prefix_bnd.
1897 (ix86_output_indirect_branch_via_push): Ditto.
1898 (ix86_output_function_return): Ditto.
1899 (ix86_output_indirect_function_return): Ditto.
1900 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1901 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1902 (CALL_USED_REGISTERS): Ditto.
1903 (REG_ALLOC_ORDER): Update for removal of bound registers.
1904 (HI_REGISTER_NAMES): Ditto.
1905 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1906 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1907 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1908 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1909 (FIRST_PSEUDO_REG): Update.
1910 (BND): Remove mode iterator.
1911 * config/i386/predicates.md (bnd_mem_operator): Remove.
1913 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1915 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1918 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1920 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1921 the case in which the permute needs only a single element and
1922 repeats for every vector of the result. Extend that case to
1923 handle variable-length vectors.
1924 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1926 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1929 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1930 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1932 2018-08-24 Richard Biener <rguenther@suse.de>
1934 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1935 bb_flags_allocated members.
1936 (auto_flag): New RAII class for allocating flags.
1937 (auto_edge_flag): New RAII class for allocating edge flags.
1938 (auto_bb_flag): New RAII class for allocating bb flags.
1939 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1941 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1942 in favor of temporarily allocated BB flag.
1943 * hsa-brig.c: Re-order includes.
1944 * hsa-dump.c: Likewise.
1945 * hsa-regalloc.c: Likewise.
1946 * print-rtl.c: Likewise.
1947 * profile-count.c: Likewise.
1949 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1952 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1955 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1958 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1959 from wide_int_range_multiplicative_op.
1961 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1963 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1966 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1968 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1971 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1973 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1974 full GENERIC expression used for replacement.
1976 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1978 * tree-vrp.c (abs_extent_range): Remove.
1979 (extract_range_into_wide_ints): Pass wide ints by reference.
1980 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1981 Pass wide ints by reference in all calls to
1982 extract_range_into_wide_ints.
1983 * wide-int-range.cc (wide_int_range_div): New.
1984 * wide-int-range.h (wide_int_range_div): New.
1985 (wide_int_range_includes_zero_p): New.
1986 (wide_int_range_zero_p): New.
1988 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1990 * config/aarch64/aarch64.md (arches): New enum.
1991 (arch): New enum attr.
1992 (arch_enabled): New attr.
1993 (enabled): Now uses arch_enabled only.
1994 (simd, sve, fp16): Removed attribute.
1995 (fp): Attr now defined in terms of 'arch'.
1996 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1997 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1998 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1999 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2000 attributes into 'arch'.
2001 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2002 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2003 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2004 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2005 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2006 'simd' attribute into 'arch'.
2007 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2008 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2009 Convert use of 'fp' attribute to 'arch'.
2010 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2011 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2013 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2014 (different modes) Merge 'fp' and 'simd' into 'arch'.
2015 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2018 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2020 PR rtl-optimization/87026
2021 * expmed.c (canonicalize_comparison): If we can no longer create
2022 pseudoregisters, don't.
2024 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2027 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2029 * config/arm/arm.c (speculation_barrier_libfunc): New static
2031 (arm_init_libfuncs): Initialize it.
2032 (arm_emit_speculation_barrier): New function.
2033 * config/arm/arm.md (speculation_barrier): Call
2034 arm_emit_speculation_barrier for architectures that do not have
2036 (speculation_barrier_insn): Only match on Armv7 or later.
2038 2018-08-23 Richard Biener <rguenther@suse.de>
2041 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2044 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2046 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2047 of single-vector TBLs.
2048 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2051 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2054 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2055 aarch64_evpc_tbl guard.
2057 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2059 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2062 2018-08-22 Martin Sebor <msebor@redhat.com>
2065 * tree-pretty-print.c (pretty_print_string): Add argument.
2066 (dump_generic_node): Call to pretty_print_string with string size.
2068 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2070 PR rtl-optimization/86771
2071 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2072 of two SETs into those two SETs, one to be placed at i2, if that SETs
2073 destination is modified between i2 and i3.
2075 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2077 PR tree-optimization/86725
2078 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2080 (vect_analyze_scalar_cycles_1): Check it.
2082 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2084 PR tree-optimization/86725
2085 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2086 an outer loop phi as a double reduction, make sure that the
2087 single user of the phi result is an inner loop phi.
2089 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2091 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2092 grouped stores with gaps to a strided group.
2094 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2096 * tree-vect-stmts.c (get_group_load_store_type)
2097 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2098 first statement in a group.
2100 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2102 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2103 the sequence used in gcc/gcc.c.
2105 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2108 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2111 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2113 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2114 Darwin10-specific unwinder-shim.
2115 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2116 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2117 New to cater for Darwin10 Rosetta.
2119 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2121 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2122 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2124 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2129 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2130 (dwarf2out_switch_text_section): Generate a local label for the
2131 second function sub-section and apply it as the second FDE start
2133 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2134 second sub-section start.
2136 2018-08-22 Richard Biener <rguenther@suse.de>
2138 PR tree-optimization/86988
2139 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2141 2018-08-22 Richard Biener <rguenther@suse.de>
2143 PR tree-optimization/86945
2144 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2146 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2148 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2149 a comment about how uses of r2 for .sdata2 come about.
2151 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2153 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2155 2018-08-21 Marek Polacek <polacek@redhat.com>
2157 PR c++/86981, Implement -Wpessimizing-move.
2158 * doc/invoke.texi: Document -Wpessimizing-move.
2160 2018-08-21 Jan Hubicka <jh@suse.cz>
2162 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2163 * tree.h (is_redundant_typedef): Remove.
2164 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2166 2018-08-21 Jan Hubicka <jh@suse.cz>
2168 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2171 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2173 * expmed.c (extract_low_bits): Reject invalid subregs early.
2175 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2178 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2181 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2183 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2184 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2185 * config/vxworks.c: Likewise.
2187 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2189 * config/vxworks.c: Set targetm.have_ctors_dtors
2190 if HAVE_INITFINI_ARRAY_SUPPORT.
2191 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2192 if HAVE_INITFINI_ARRAY_SUPPORT.
2194 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2196 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2197 default search path for VxWorks < 7.
2199 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2201 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2202 (get_format_string): Refer to c_getstr.
2204 2018-08-21 Tom de Vries <tdevries@suse.de>
2206 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2207 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2208 (debuginfo_early_stop): Declare.
2209 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2210 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2211 (debuginfo_early_stop): New function.
2212 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2213 and debuginfo_early_stop.
2214 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2215 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2216 (general_init): Call debuginfo_early_init.
2217 (finalize): Call debuginfo_fini.
2218 (do_compile): Call debuginfo_init.
2219 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2221 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2223 2018-08-21 Tom de Vries <tdevries@suse.de>
2225 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2226 flag_dump_noaddr and flag_dump_unnumbered.
2228 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2230 * wide-int-range.cc (wide_int_range_abs): New.
2231 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2232 * wide-int-range.h (wide_int_range_abs): New.
2233 (wide_int_range_min_max): New.
2234 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2235 case to call wide_int_range_abs.
2236 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2237 (extract_range_from_abs_expr): Delete.
2239 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2242 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2243 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2246 2018-08-20 Nathan Sidwell <nathan@acm.org>
2247 Jeff Law <law@redhat.com>
2249 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2250 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2252 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2255 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2256 (decl_attributes): Likewise.
2257 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2259 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2260 * diagnostic-core.h (class auto_diagnostic_group): New class.
2261 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2262 (diagnostic_report_diagnostic): Handle the first diagnostics within
2264 (emit_diagnostic): Add auto_diagnostic_group instance.
2266 (inform_n): Likewise.
2267 (warning): Likewise.
2268 (warning_at): Likewise.
2269 (warning_n): Likewise.
2270 (pedwarn): Likewise.
2271 (permerror): Likewise.
2273 (error_n): Likewise.
2274 (error_at): Likewise.
2276 (fatal_error): Likewise.
2277 (internal_error): Likewise.
2278 (internal_error_no_backtrace): Likewise.
2279 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2280 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2281 * diagnostic.h (struct diagnostic_context): Add fields
2282 "diagnostic_group_nesting_depth",
2283 "diagnostic_group_emission_count", "begin_group_cb",
2285 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2286 Add auto_diagnostic_group instance(s).
2287 (find_explicit_erroneous_behavior): Likewise.
2288 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2289 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2290 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2291 (gimplify_va_arg_expr): Likewise.
2292 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2293 (HSA_SORRY_AT): Likewise.
2294 * ipa-devirt.c (compare_virtual_tables): Likewise.
2295 (warn_odr): Likewise.
2296 * multiple_target.c (expand_target_clones): Likewise.
2297 * opts-common.c (cmdline_handle_error): Likewise.
2298 * reginfo.c (globalize_reg): Likewise.
2299 * substring-locations.c (format_warning_n_va): Likewise.
2300 * tree-inline.c (expand_call_inline): Likewise.
2301 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2302 * tree-ssa-loop-niter.c
2303 (do_warn_aggressive_loop_optimizations): Likewise.
2304 * tree-ssa-uninit.c (warn_uninit): Likewise.
2305 * tree.c (warn_deprecated_use): Likewise.
2307 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2310 * config/i386/i386.md (eh_return): Always update EH return
2311 address in word_mode.
2313 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2315 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2316 TARGET_SPLIT_COMPLEX_ARG is defined.
2318 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2320 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2322 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2325 * expr.c (expand_assignment): Assert that bitpos is positive.
2326 (store_field): Likewise
2327 (expand_expr_real_1): Make sure that bitpos is positive.
2328 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2331 2018-08-20 Nathan Sidwell <nathan@acm.org>
2333 * Makefile.in (CPP_ID_DATA_H): Delete.
2334 (CPP_INTERNAL_H): Don't add it.
2335 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2336 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2338 2018-08-20 Richard Biener <rguenther@suse.de>
2340 PR tree-optimization/78655
2341 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2342 pointer + offset nonnull if either operand is nonnull work.
2344 2018-08-20 Tom de Vries <tdevries@suse.de>
2346 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2347 unless the referenced die describes the added property using
2348 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2349 Otherwise, add a DW_AT_location to the referenced die.
2351 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2354 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2355 register_operand when calling ix86_set_reg_reg_cost.
2356 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2357 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2358 predicate and to 1 otherwise.
2360 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2362 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2363 emit a diagnostic that it is not supported and reset the option.
2364 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2365 supported and consume the option. (ASM_FINAL_SPEC): New.
2367 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2369 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2372 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2374 C-SKY port: Documentation
2376 * doc/extend.texi (C-SKY Function Attributes): New section.
2377 * doc/invoke.texi (Option Summary): Add C-SKY options.
2378 (C-SKY Options): New section.
2379 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2381 2018-08-17 Jojo <jijie_rong@c-sky.com>
2382 Huibin Wang <huibin_wang@c-sky.com>
2383 Sandra Loosemore <sandra@codesourcery.com>
2384 Chung-Lin Tang <cltang@codesourcery.com>
2386 C-SKY port: Backend implementation
2388 * config/csky/*: New.
2389 * common/config/csky/*: New.
2391 2018-08-17 Jojo <jijie_rong@c-sky.com>
2392 Huibin Wang <huibin_wang@c-sky.com>
2393 Sandra Loosemore <sandra@codesourcery.com>
2394 Chung-Lin Tang <cltang@codesourcery.com>
2395 Andrew Jenner <andrew@codesourcery.com>
2397 C-SKY port: Configury
2399 * config.gcc (csky-*-*): New.
2400 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2401 * configure: Regenerated.
2403 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2405 * dump-context.h: Include "dumpfile.h".
2406 (dump_context::dump_printf_va): Convert final param from va_list
2407 to va_list *. Convert from ATTRIBUTE_PRINTF to
2408 ATTRIBUTE_GCC_DUMP_PRINTF.
2409 (dump_context::dump_printf_loc_va): Likewise.
2410 * dumpfile.c: Include "stringpool.h".
2411 (make_item_for_dump_printf_va): Delete.
2412 (make_item_for_dump_printf): Delete.
2413 (class dump_pretty_printer): New class.
2414 (dump_pretty_printer::dump_pretty_printer): New ctor.
2415 (dump_pretty_printer::emit_items): New member function.
2416 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2418 (dump_pretty_printer::emit_item): New member function.
2419 (dump_pretty_printer::stash_item): New member function.
2420 (dump_pretty_printer::format_decoder_cb): New member function.
2421 (dump_pretty_printer::decode_format): New member function.
2422 (dump_context::dump_printf_va): Reimplement in terms of
2423 dump_pretty_printer.
2424 (dump_context::dump_printf_loc_va): Convert final param from va_list
2426 (dump_context::begin_scope): Reimplement call to
2427 make_item_for_dump_printf.
2428 (dump_printf): Update for change to dump_printf_va.
2429 (dump_printf_loc): Likewise.
2430 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2431 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2432 with %T, %E, and %G.
2433 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2434 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2435 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2436 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2437 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2438 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2439 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2440 within a dump_printf_loc call to "%wu".
2441 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2442 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2443 missing space after "=".
2444 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2445 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2446 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2447 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2448 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2449 duplicate "vectorized" from message.
2451 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2453 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2454 polyNxK_t element's TYPE_STRING_FLAG.
2456 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2458 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2459 (they were unnamed before). Fix comments.
2461 2018-08-17 Nathan Sidwell <nathan@acm.org>
2463 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2465 2018-08-17 Richard Biener <rguenther@suse.de>
2467 PR tree-optimization/86841
2468 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2470 2018-08-17 Martin Liska <mliska@suse.cz>
2472 * common.opt: Remove Warn, Init and Report for options with
2473 Ignore/Deprecated flag. Warning is done automatically for
2475 * config/i386/i386.opt: Likewise.
2476 * config/ia64/ia64.opt: Likewise.
2477 * config/rs6000/rs6000.opt: Likewise.
2478 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2479 Remove usage of flag_check_pointer_bounds.
2480 * lto-wrapper.c (merge_and_complain): Do not handle
2481 OPT_fcheck_pointer_bounds.
2482 (append_compiler_options): Likewise.
2483 * opt-functions.awk: Do not handle Deprecated.
2484 * optc-gen.awk: Check that Var, Report and Init are not
2485 used for an option with Ignore/Deprecated flag.
2486 * opts-common.c (decode_cmdline_option): Do not report
2488 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2490 * opts.h (struct cl_option): Remove cl_deprecated flag.
2491 (CL_ERR_DEPRECATED): Remove error enum value.
2493 2018-08-17 Richard Biener <rguenther@suse.de>
2496 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2497 across a va-arg-pack using call adjust its return value accordingly.
2499 2018-08-16 Martin Sebor <msebor@redhat.com>
2501 PR tree-optimization/86853
2502 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2503 (struct fmtresult): Add member and initialize it in ctors.
2504 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2505 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2506 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2507 (parse_directive): Handle %C same as %c.
2508 (sprintf_dom_walker::compute_format_length): Adjust.
2509 (is_call_safe): Adjust.
2511 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2513 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2514 for determining how to count the elements.
2515 * builtins.h (c_strlen): Adjust prototype.
2516 * expr.c (string_constant): Add new parameter mem_size.
2517 Set *mem_size appropriately.
2518 * expr.h (string_constant): Adjust protoype.
2519 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2520 * gimple-fold.h (get_range_strlen): Adjust prototype.
2521 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2522 (format_string): Call get_string_length with eltsize.
2524 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2526 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2527 to emit the span, rather than setting it as the prefix.
2529 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2531 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2532 "margin_char" parameter, defaulting to space. Use it in place
2533 of pp_space for the initial part of the margin.
2534 (layout::print_leading_fixits): Use '+' when filling the margin
2535 of line-insertion fix-it hints.
2537 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2539 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2542 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2544 * config/rs6000/altivec.md: Don't set length attribute to the default
2546 * config/rs6000/darwin.md: Ditto.
2547 * config/rs6000/dfp.md: Ditto.
2548 * config/rs6000/htm.md: Ditto.
2549 * config/rs6000/rs6000.md: Ditto.
2550 * config/rs6000/sync.md: Ditto.
2551 * config/rs6000/vsx.md: Ditto.
2553 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2555 * config/rs6000/altivec.md: Don't set length attribute to the default
2556 value, for branch instructions.
2557 * config/rs6000/darwin.md: Ditto.
2558 * config/rs6000/rs6000.md: Ditto.
2560 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2562 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2563 (unnamed conditional branch define_insn): Set length to 4 or 8
2564 depending on offset.
2565 (<bd>_<mode>): Similar, for alternative 0.
2566 (<bd>tf_<mode>): Ditto.
2568 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2570 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2572 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2574 * doc/rtl.texi: Replace old RTX class names with new names.
2577 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2579 * expmed.h (canonicalize_comparison): New declaration.
2580 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2581 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2582 * optabs.c (prepare_cmp_insn): Likewise.
2583 * rtl.h (unsigned_condition_p): New function which checks if a
2584 comparison operator is unsigned.
2586 2018-08-16 Nathan Sidwell <nathan@acm.org>
2588 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2589 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2591 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2594 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2595 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2596 (mov<mov>): ..this and enable unconditionally.
2598 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2600 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2602 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2604 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2605 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2606 "Common" with "Target".
2608 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2610 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2611 * doc/invoke.texi (mmitigate-rop): Remove.
2612 * config/i386/i386.c: Do not include "regrename.h".
2613 (ix86_rop_should_change_byte_p, reg_encoded_number)
2614 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2616 (ix86_reorg): Remove call to ix86_mitigate_rop.
2617 * config/i386/i386.md (attr "modrm_class"): Remove.
2618 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2619 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2620 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2622 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2624 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2625 allow folding of mergeh() and mergel() for the float and double types.
2626 (fold_mergehl_helper): Rework to handle building a permute tree
2629 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2631 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2634 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2636 * common.opt (fdiagnostics-show-labels): New option.
2637 * diagnostic-show-locus.c (class layout_range): Add field
2639 (class layout): Add field "m_show_labels_p".
2640 (layout_range::layout_range): Add param "label" and use it to
2642 (make_range): Pass in NULL for new "label" param of layout_range's
2644 (layout::layout): Initialize m_show_labels_p.
2645 (layout::maybe_add_location_range): Pass in loc_range->m_label
2646 when constructing layout_range instances.
2647 (struct line_label): New struct.
2648 (layout::print_any_labels): New member function.
2649 (layout::print_line): Call it if label-printing is enabled.
2650 (selftest::test_one_liner_labels): New test.
2651 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2652 * diagnostic.c (diagnostic_initialize): Initialize
2653 context->show_labels_p.
2654 * diagnostic.h (struct diagnostic_context): Add field
2656 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2657 -fno-diagnostics-show-labels.
2658 * dwarf2out.c (gen_producer_string): Add
2659 OPT_fdiagnostics_show_labels to the ignored options.
2660 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2662 (gcc_rich_location::maybe_add_expr): Likewise.
2663 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2664 label" param, defaulting to NULL.
2665 (gcc_rich_location::add_expr): Add "label" param.
2666 (gcc_rich_location::maybe_add_expr): Likewise.
2667 (class text_range_label): New class.
2668 (class range_label_for_type_mismatch): New class.
2669 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2670 of format_warning_va.
2671 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2672 * lto-wrapper.c (merge_and_complain): Add
2673 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2674 (append_compiler_options): Likewise to the dropped options.
2675 (append_diag_options): Likewise to the passed-on options.
2676 * opts.c (common_handle_option): Handle the new option.
2677 * selftest-diagnostic.c
2678 (test_diagnostic_context::test_diagnostic_context): Enable
2680 * substring-locations.c: Include "gcc-rich-location.h".
2681 (format_warning_n_va): Add "fmt_label" and "param_label" params
2682 and use them as appropriate.
2683 (format_warning_va): Add "fmt_label" and "param_label" params,
2684 passing them on to format_warning_n_va.
2685 (format_warning_at_substring): Likewise.
2686 (format_warning_at_substring_n): Likewise.
2687 * substring-locations.h (format_warning_va): Add "fmt_label" and
2688 "param_label" params.
2689 (format_warning_n_va): Likewise.
2690 (format_warning_at_substring): Likewise.
2691 (format_warning_at_substring_n): Likewise.
2692 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2694 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2697 * builtins.c (expand_builtin_memcmp): Do not expand the call
2698 when overflow is detected.
2700 2018-08-15 Martin Sebor <msebor@redhat.com>
2702 PR tree-optimization/71625
2703 * config/aarch64/aarch64-builtins.c
2704 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2706 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2708 * config/s390/s390.c (s390_reorg): Remove loop.
2710 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2713 (darwin_function_switched_text_sections): Delete.
2714 * gcc/config/darwin.h
2715 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2717 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2720 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2721 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2722 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2724 2018-08-15 Martin Liska <mliska@suse.cz>
2726 PR tree-optimization/86925
2727 * predict.c (expr_expected_value_1): When taking
2728 later predictor, assign also probability.
2729 Use fold_build2_initializer_loc in order to fold
2730 the expression in -frounding-math.
2732 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2734 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2736 (expand_vec_perm_1): Try the new method.
2738 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2741 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2742 Check whether lra_live_max_point is 0 before dividing.
2744 2018-08-14 Martin Sebor <msebor@redhat.com>
2746 PR tree-optimization/86650
2747 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2748 (vrp_prop::check_mem_ref): Same.
2750 2018-08-13 Liu Hao <lh_mouse@126.com>
2752 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2753 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2754 and clear it thereafter, as it only works for DBCS.
2756 2018-08-13 Liu Hao <lh_mouse@126.com>
2758 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2759 handle returned by _get_osf_handle().
2761 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2763 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2764 for folding vec_perm.
2766 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2768 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2769 Add support for gimple-folding of vec_pack() and vec_unpack()
2772 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2774 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2775 vec_xst variants to the list.
2776 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2777 vector loads and stores.
2779 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2781 * config.gcc (rs6000-ibm-aix4.x): Delete.
2782 (rs6000-ibm-aix5.1): Delete.
2783 (rs6000-ibm-aix5.2): Delete.
2784 (rs6000-ibm-aix5.3): Delete.
2785 * config/rs6000/aix43.h: Delete.
2786 * config/rs6000/aix51.h: Delete.
2787 * config/rs6000/aix52.h: Delete.
2788 * config/rs6000/t-aix43: Delete.
2790 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2792 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2794 (s390_decompose_address): Factor out constant pool ref
2797 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2799 * config/nds32/nds32-predicates.c
2800 (nds32_can_use_bclr_p): Change return type as bool.
2801 (nds32_can_use_bset_p): Ditto.
2802 (nds32_can_use_btgl_p): Ditto.
2803 (nds32_can_use_bitci_p): Ditto.
2804 * config/nds32/nds32-protos.h
2805 (nds32_can_use_bclr_p): Change declaration.
2806 (nds32_can_use_bset_p): Ditto.
2807 (nds32_can_use_btgl_p): Ditto.
2808 (nds32_can_use_bitci_p): Ditto.
2810 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2812 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2813 Support -msched-prolog-epilog option.
2814 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2816 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2818 * common/config/nds32/nds32-common.c
2819 (nds32_option_optimization_table): Enalbe -malways-align.
2821 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2823 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2825 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2826 OPT_misr_secure_ case.
2827 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2828 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2829 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2831 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2832 (nds32_isr_info): New field security_level.
2833 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2834 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2835 * config/nds32/nds32.opt (misr-secure): New option.
2836 * config/nds32/nds32_init.inc: New file.
2837 * config/nds32/nds32_isr.h: New file.
2839 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2841 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2842 Update comment for atomic instructions.
2843 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2844 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2846 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2847 load for __ATOMIC_SEQ_CST model.
2848 (atomic_loaddi_1): Remove float register target.
2849 (atomic_storedi): Handle CONST_INT values.
2850 (atomic_storedi_1): Remove float register source. Add special case
2852 (memory_barrier): New expander and insn.
2854 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2856 PR tree-optimization/86835
2857 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2858 new_stmt after def_gsi, make sure to insert new_square_stmt after
2859 that stmt, not 2 stmts before it.
2861 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2864 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2867 2018-08-10 Martin Liska <mliska@suse.cz>
2870 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2872 * builtins.c (expand_builtin_expect_with_probability):
2874 (expand_builtin_expect_with_probability): New function.
2875 (build_builtin_expect_predicate): Add new argumnet probability
2876 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2877 (fold_builtin_expect):
2880 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2881 * builtins.h (fold_builtin_expect): Set new argument.
2882 * doc/extend.texi: Document __builtin_expect_with_probability.
2883 * doc/invoke.texi: Likewise.
2884 * gimple-fold.c (gimple_fold_call): Pass new argument.
2885 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2886 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2887 * predict.c (get_predictor_value): New function.
2888 (expr_expected_value): Add new argument probability. Assume
2889 that predictor and probability are always non-null.
2890 (expr_expected_value_1): Likewise. For __builtin_expect and
2891 __builtin_expect_with_probability set probability. Handle
2892 combination in binary expressions.
2893 (tree_predict_by_opcode): Simplify code by simply calling
2894 get_predictor_value.
2895 (pass_strip_predict_hints::execute): Add handling of
2896 BUILT_IN_EXPECT_WITH_PROBABILITY.
2897 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2899 * tree.h (DECL_BUILT_IN_P): New function.
2901 2018-08-10 Martin Liska <mliska@suse.cz>
2903 PR tree-optimization/85799
2904 * passes.def: Add argument for pass_strip_predict_hints.
2905 * predict.c (class pass_strip_predict_hints): Add new argument
2907 (strip_predictor_early): New function.
2908 (pass_strip_predict_hints::execute): Call the function to
2910 (strip_predict_hints): New function.
2911 * predict.def: Fix comment.
2913 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2915 * Makefile.in: Clarify which tm.texi to copy over to assert the
2916 right to grant a GFDL license for all.
2918 2018-08-09 Jeff Law <law@redhat.com>
2920 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2923 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2925 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2928 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2930 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2931 reductions for variable-length vectors.
2933 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2936 * common.opt (fdiagnostics-show-line-numbers): New option.
2937 * diagnostic-show-locus.c (class layout): Add fields
2938 "m_show_line_numbers_p" and "m_linenum_width";
2939 (num_digits): New function.
2940 (test_num_digits): New function.
2941 (layout::layout): Initialize new fields. Update m_x_offset
2942 logic to handle any left margin.
2943 (layout::print_source_line): Print line number when requested.
2944 (layout::start_annotation_line): New member function.
2945 (layout::print_annotation_line): Call it.
2946 (layout::print_leading_fixits): Likewise.
2947 (layout::print_trailing_fixits): Likewise. Update calls to
2948 move_to_column for new parameter.
2949 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2950 it to potentially call start_annotation_line.
2951 (layout::show_ruler): Call start_annotation_line.
2952 (selftest::test_line_numbers_multiline_range): New selftest.
2953 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2954 and selftest::test_line_numbers_multiline_range.
2955 * diagnostic.c (diagnostic_initialize): Initialize
2956 show_line_numbers_p.
2957 * diagnostic.h (struct diagnostic_context): Add field
2958 "show_line_numbers_p".
2959 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2960 -fno-diagnostics-show-line-numbers.
2961 * dwarf2out.c (gen_producer_string): Add
2962 OPT_fdiagnostics_show_line_numbers to the ignored options.
2963 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2964 one setting" options.
2965 (append_compiler_options): Likewise to the dropped options.
2966 (append_diag_options): Likewise to the passed-on options.
2967 * opts.c (common_handle_option): Handle the new option.
2968 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2970 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2972 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2973 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2974 third argument of type "const signed char" to descriptions of
2975 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2976 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2977 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2978 __builtin_bcdsub_ov functions.
2980 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2982 PR tree-optimization/86858
2983 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2984 flow_bb_inside_loop_p calls.
2986 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2988 PR tree-optimization/86871
2989 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2990 instead of gimple_assign_lhs.
2992 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2995 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2996 register constraint to operand 0.
2997 (add<mode>3_carryinC): Likewise.
2998 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3000 2018-08-09 Martin Liska <mliska@suse.cz>
3003 * common.opt: Remove extra line.
3005 2018-08-09 Martin Liska <mliska@suse.cz>
3007 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3008 at the end of a line, make first letter capital and end up
3009 a sentence with a dot.
3010 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3011 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3012 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3013 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3014 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3015 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3016 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3017 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3018 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3019 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3020 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3021 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3022 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3023 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3024 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3025 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3026 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3027 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3029 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3032 * config/s390/s390.c (s390_option_override_internal): Reduce the
3033 stack-clash-protection-probe-interval param if it would be too big
3036 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3039 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3040 * config/m68k/m68k.c (handle_move_double): Don't call
3041 m68k_final_prescan_insn.
3042 (m68k_adjust_decorated_operand): Renamed from
3043 m68k_final_prescan_insn, remove first and third operand and
3045 (print_operand): Call it.
3046 (print_operand_address): Call it.
3048 2018-08-08 Nathan Sidwell <nathan@acm.org>
3050 * diagnostic.c (diagnostic_report_current_module): Use
3051 linemap_included_from & linemap_included_from_linemap.
3053 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3055 * config/aarch64/aarch64-cores.def: Add phecda core.
3056 * config/aarch64/aarch64-tune.md: Regenerate.
3057 * doc/invoke.texi: Add phecda core.
3059 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3062 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3064 * config/s390/s390.md ("movti"): Add more alternatives for
3065 constant to GPR copies.
3067 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3069 * config/s390/s390.c: Fix whitespace damage throughout the file.
3070 * config/s390/s390.h: Likewise.
3071 * config/s390/tpf.h: Likewise.
3073 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3075 * config/s390/s390.c (s390_loadrelative_operand_p):
3076 Remove TARGET_CPU_ZARCH usages.
3077 (s390_rtx_costs): Likewise.
3078 (s390_legitimate_constant_p): Likewise.
3079 (s390_cannot_force_const_mem): Likewise.
3080 (legitimate_reload_constant_p): Likewise.
3081 (s390_preferred_reload_class): Likewise.
3082 (legitimize_pic_address): Likewise.
3083 (legitimize_tls_address): Likewise.
3084 (s390_split_branches): Removed.
3085 (s390_add_execute): Removed.
3086 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3087 (s390_mainpool_start): Likewise.
3088 (s390_mainpool_finish): Likewise.
3089 (s390_mainpool_cancel): Removed.
3090 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3091 (s390_chunkify_cancel): Likewise.
3092 (s390_return_addr_rtx): Likewise.
3093 (s390_register_info): Remove split_branches_pending_p uages.
3094 (s390_optimize_register_info): Likewise.
3095 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3096 split_branches_pending_p usages.
3097 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3098 (s390_load_got): Likewise.
3099 (s390_expand_split_stack_prologue): Likewise.
3100 (output_asm_nops): Likewise.
3101 (s390_function_profiler): Likewise.
3102 (s390_emit_call): Likewise.
3103 (s390_conditional_register_usage): Likewise.
3104 (s390_optimize_prologue): Likewise.
3105 (s390_reorg): Remove TARGET_CPU_ZARCH and
3106 split_branches_pending_p usages.
3107 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3109 (s390_output_indirect_thunk_function): Likewise.
3110 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3111 (TARGET_CPU_ZARCH_P): Removed.
3112 (struct machine_function): Remove split_branches_pending_p.
3113 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3115 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3117 * common/config/s390/s390-common.c (processor_flags_table):
3119 * config.gcc: Remove with_arch/with_tune support.
3120 * config/s390/2064.md: Remove cpu attribute comparisons.
3121 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3123 * config/s390/linux.h (ASM_SPEC):
3124 Remove -march support.
3125 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3126 Use a table to get an arch level.
3127 * config/s390/s390-opts.h (enum processor_type):
3129 * config/s390/s390.c
3130 (processor_table): Remove entries, add arch_level values.
3131 (s390_issue_rate): Remove cases.
3132 (s390_option_override): Adjust
3133 s390_option_override_internal() call.
3134 (s390_option_override_internal): Remove deprecation warning.
3135 (s390_valid_target_attribute_tree): Adjust
3136 s390_option_override_internal() call.
3137 * config/s390/s390.h (struct s390_processor):
3138 Share with s390-c.c, add arch_level field.
3139 * config/s390/s390.md:
3140 Remove occurrences in cpu attribute.
3141 * config/s390/s390.opt: Remove -march/-mtune support.
3142 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3143 * doc/invoke.texi: Remove deprecation warning.
3145 2018-08-08 Luis Machado <luis.machado@linaro.org>
3147 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3149 (qdf24xx_tunings): Set vector cost structure to
3150 qdf24xx_vector_cost.
3152 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3153 <register_sextend>: Set to 3.
3155 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3158 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3159 * config/aarch64/aarch64-simd.md
3160 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3161 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3162 (aarch64_frecpx<mode>): ...this new pattern.
3163 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3164 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3166 2018-08-07 Martin Liska <mliska@suse.cz>
3169 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3170 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3171 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3172 * doc/extend.texi: Document that malloc attribute adds
3175 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3178 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3179 Define to speculation_safe_value_not_needed.
3181 2018-08-06 Jeff Law <law@redhat.com>
3183 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3184 the vr_values instance to cprop_into_stmt.
3185 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3186 (cprop_operand): Also query EVRP to determine if OP is a constant.
3188 2018-08-06 Nathan Sidwell <nathan@acm.org>
3190 * diagnostic.c (diagnostic_report_current_module): Reroll
3191 included-at loop. Translate text.
3193 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3195 * function-tests.c (selftest::test_expansion_to_rtl): Call
3196 free_after_compilation.
3198 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3200 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3202 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3204 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3205 loops with memory block operations from getting unrolled.
3207 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3210 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3211 Define to speculation_safe_value_not_needed.
3213 2018-08-06 Jeff Law <law@redhat.com>
3215 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3218 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3221 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3222 with all enabled __intN types.
3224 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3226 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3228 * alias.c (record_set): Check for clobber high.
3229 * cfgexpand.c (expand_gimple_stmt): Likewise.
3230 * combine-stack-adj.c (single_set_for_csa): Likewise.
3231 * combine.c (find_single_use_1): Likewise.
3232 (set_nonzero_bits_and_sign_copies): Likewise.
3233 (get_combine_src_dest): Likewise.
3234 (is_parallel_of_n_reg_sets): Likewise.
3235 (try_combine): Likewise.
3236 (record_dead_and_set_regs_1): Likewise.
3237 (reg_dead_at_p_1): Likewise.
3238 (reg_dead_at_p): Likewise.
3239 * dce.c (deletable_insn_p): Likewise.
3240 (mark_nonreg_stores_1): Likewise.
3241 (mark_nonreg_stores_2): Likewise.
3242 * df-scan.c (df_find_hard_reg_defs): Likewise.
3243 (df_uses_record): Likewise.
3244 (df_get_call_refs): Likewise.
3245 * dwarf2out.c (mem_loc_descriptor): Likewise.
3246 * haifa-sched.c (haifa_classify_rtx): Likewise.
3247 * ira-build.c (create_insn_allocnos): Likewise.
3248 * ira-costs.c (scan_one_insn): Likewise.
3249 * ira.c (equiv_init_movable_p): Likewise.
3250 (rtx_moveable_p): Likewise.
3251 (interesting_dest_for_shprep): Likewise.
3252 * jump.c (mark_jump_label_1): Likewise.
3253 * postreload-gcse.c (record_opr_changes): Likewise.
3254 * postreload.c (reload_cse_simplify): Likewise.
3255 (struct reg_use): Add source expr.
3256 (reload_combine): Check for clobber high.
3257 (reload_combine_note_use): Likewise.
3258 (reload_cse_move2add): Likewise.
3259 (move2add_note_store): Likewise.
3260 * print-rtl.c (print_pattern): Likewise.
3261 * recog.c (decode_asm_operands): Likewise.
3262 (store_data_bypass_p): Likewise.
3263 (if_test_bypass_p): Likewise.
3264 * regcprop.c (kill_clobbered_value): Likewise.
3265 (kill_set_value): Likewise.
3266 * reginfo.c (reg_scan_mark_refs): Likewise.
3267 * reload1.c (maybe_fix_stack_asms): Likewise.
3268 (eliminate_regs_1): Likewise.
3269 (elimination_effects): Likewise.
3270 (mark_not_eliminable): Likewise.
3271 (scan_paradoxical_subregs): Likewise.
3272 (forget_old_reloads_1): Likewise.
3273 * reorg.c (find_end_label): Likewise.
3274 (try_merge_delay_insns): Likewise.
3275 (redundant_insn): Likewise.
3276 (own_thread_p): Likewise.
3277 (fill_simple_delay_slots): Likewise.
3278 (fill_slots_from_thread): Likewise.
3279 (dbr_schedule): Likewise.
3280 * resource.c (update_live_status): Likewise.
3281 (mark_referenced_resources): Likewise.
3282 (mark_set_resources): Likewise.
3283 * rtl.c (copy_rtx): Likewise.
3284 * rtlanal.c (reg_referenced_p): Likewise.
3285 (single_set_2): Likewise.
3286 (noop_move_p): Likewise.
3287 (note_stores): Likewise.
3288 * sched-deps.c (sched_analyze_reg): Likewise.
3289 (sched_analyze_insn): Likewise.
3291 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3293 * cse.c (invalidate_reg): New function extracted from...
3294 (invalidate): ...here.
3295 (canonicalize_insn): Check for clobber high.
3296 (invalidate_from_clobbers): invalidate clobber highs.
3297 (invalidate_from_sets_and_clobbers): Likewise.
3298 (count_reg_usage): Check for clobber high.
3299 (insn_live_p): Likewise.
3300 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3301 (cselib_invalidate_regno): Check for clobber in setter.
3302 (cselib_invalidate_rtx): Pass through setter.
3303 (cselib_invalidate_rtx_note_stores):
3304 (cselib_process_insn): Check for clobber high.
3305 * cselib.h (cselib_invalidate_rtx): Add operand.
3307 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3309 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3310 (mark_not_eliminable): Likewise.
3311 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3312 * lra-lives.c (process_bb_lives): Check for clobber high.
3313 * lra.c (new_insn_reg): Remember clobber highs.
3314 (collect_non_operand_hard_regs): Check for clobber high.
3315 (lra_set_insn_recog_data): Likewise.
3316 (add_regs_to_insn_regno_info): Likewise.
3317 (lra_update_insn_regno_info): Likewise.
3319 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3321 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3322 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3324 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3326 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3327 (copy_insn_1): Likewise.
3328 (gen_hard_reg_clobber_high): New gen function.
3329 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3330 * genemit.c (gen_exp): Likewise.
3331 (gen_emit_seq): Pass through info.
3332 (gen_insn): Check for CLOBBER_HIGH.
3333 (gen_expand): Pass through info.
3334 (gen_split): Likewise.
3335 (output_add_clobbers): Likewise.
3336 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3337 (remove_clobbers): Likewise.
3338 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3340 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3342 * doc/rtl.texi (clobber_high): Add.
3343 (parallel): Add in clobber high
3344 * rtl.c (rtl_check_failed_code3): Add function.
3345 * rtl.def (CLOBBER_HIGH): Add expression.
3346 * rtl.h (RTL_CHECKC3): Add macro.
3347 (rtl_check_failed_code3): Add declaration.
3348 (XC3EXP): Add macro.
3350 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3353 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3354 cfun->machine->max_used_stack_alignment if needed.
3356 2018-08-04 Martin Sebor <msebor@redhat.com>
3358 PR tree-optimization/86571
3359 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3362 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3365 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3368 2018-08-03 Jeff Law <law@redhat.com>
3371 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3372 Define to speculation_safe_value_not_needed.
3374 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3376 * doc/gcov.texi (-x): Remove duplicate "to".
3377 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3378 (-Wif-not-aligned): Remove duplicate "is".
3379 (-flto): Remove duplicate "the".
3380 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3381 duplicate "v5.00.b".
3382 (MSP430 Options): Remove duplicate "and" from the description
3383 of "-mgprel-sec=regexp".
3384 (x86 Options): Remove duplicate copies of "vmldLog102" and
3385 vmlsLog104 from description of "-mveclibabi=type".
3387 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3389 * internal-fn.h (first_commutative_argument): Declare.
3390 * internal-fn.c (first_commutative_argument): New function.
3391 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3392 restrictions for pattern statements. Use first_commutative_argument
3393 to look for commutative operands in calls to internal functions.
3395 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3397 * Makefile.in (wide-int-range.o): New.
3398 * tree-vrp.c: Move all the wide_int_* functions to...
3399 * wide-int-range.cc: ...here.
3400 * tree-vrp.h: Move all the wide_int_* prototypes to...
3401 * wide-int-range.h: ...here.
3403 2018-08-03 Tom de Vries <tdevries@suse.de>
3405 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3407 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3408 * except.c (output_function_exception_table): Do early exit if
3409 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3411 2018-08-03 Martin Liska <mliska@suse.cz>
3413 * predict.c (dump_prediction): Change to 2 digits
3416 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3418 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3420 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3422 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3424 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3425 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3426 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3427 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3428 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3430 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3432 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3433 pp_take_prefix when saving the existing prefix.
3434 * diagnostic.c (diagnostic_append_note): Likewise.
3435 * langhooks.c (lhd_print_error_function): Likewise.
3436 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3437 param's type. Free the existing prefix.
3438 (pp_take_prefix): New function.
3439 (pretty_printer::pretty_printer): Drop the prefix parameter.
3440 Rename the length parameter to match the comment.
3441 (pretty_printer::~pretty_printer): Free the prefix.
3442 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3444 (struct pretty_printer): Drop the "const" from "prefix" field's
3445 type and clarify memory management.
3446 (pp_set_prefix): Drop the "const" from the 2nd param.
3447 (pp_take_prefix): New decl.
3449 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3451 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3452 for word_mode_ok here instead of passing as argument.
3453 (expand_block_compare): Change select_block_compare_mode() call.
3454 (expand_strncmp_gpr_sequence): New function.
3455 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3457 2018-08-02 Jeff Law <law@redhat.com>
3460 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3461 Define to speculation_safe_value_not_needed.
3464 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3465 Define to speculation_safe_value_not_needed.
3467 2018-08-02 Tom de Vries <tdevries@suse.de>
3470 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3471 function. Return UI_TARGET unconditionally.
3472 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3473 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3475 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3477 * genemit.c (print_overload_test): Fix typo.
3479 2018-08-02 Richard Biener <rguenther@suse.de>
3481 PR tree-optimization/86816
3482 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3483 which checks for value availability before querying it.
3484 (gvn_uses_equal): Use it.
3485 (same_succ_hash): Likewise.
3486 (gimple_equal_p): Likewise.
3488 2018-08-02 Nick Clifton <nickc@redhat.com>
3491 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3492 Define to speculation_safe_value_not_needed.
3495 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3496 Define to speculation_safe_value_not_needed.
3499 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3500 Define to speculation_safe_value_not_needed.
3503 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3504 Define to speculation_safe_value_not_needed.
3507 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3508 Define to speculation_safe_value_not_needed.
3511 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3512 Define to speculation_safe_value_not_needed.
3515 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3516 Define to speculation_safe_value_not_needed.
3519 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3520 Define to speculation_safe_value_not_needed.
3523 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3524 speculation_safe_value_not_needed.
3527 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3528 to speculation_safe_value_not_needed.
3530 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3532 * doc/md.texi: Expand the documentation of instruction names
3533 to mention port-local uses. Document '@' in pattern names.
3534 * read-md.h (overloaded_instance, overloaded_name): New structs.
3536 (md_reader::handle_overloaded_name): New member function.
3537 (md_reader::get_overloads): Likewise.
3538 (md_reader::m_first_overload): New member variable.
3539 (md_reader::m_next_overload_ptr): Likewise.
3540 (md_reader::m_overloads_htab): Likewise.
3541 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3542 m_next_overload_ptr and m_overloads_htab.
3543 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3544 (get_mode_token, get_code_token, get_int_token): New functions.
3545 (map_attr_string): Add an optional argument that passes back
3546 the associated iterator.
3547 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3548 (md_reader::handle_overloaded_name, add_overload_instance): New
3550 (apply_iterators): Handle '@' names. Report an error if '@'
3551 is used without iterators.
3552 (initialize_iterators): Initialize the new iterator_group fields.
3553 * genopinit.c (handle_overloaded_code_for)
3554 (handle_overloaded_gen): New functions.
3555 (main): Use them to print declarations of maybe_code_for_* and
3556 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3557 * genemit.c (print_overload_arguments, print_overload_test)
3558 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3559 (main): Use it to print definitions of maybe_code_for_* and
3560 maybe_gen_* functions.
3561 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3562 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3563 instead of explicit mode checks.
3564 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3565 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3566 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3567 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3568 (aarch64_expand_compare_and_swap): Likewise
3569 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3570 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3571 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3572 (aarch64_constant_pool_reload_icode): Delete.
3573 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3574 instead of aarch64_constant_pool_reload_icode. Use
3575 code_for_aarch64_reload_mov instead of explicit mode checks.
3576 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3577 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3578 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3579 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3580 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3581 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3582 (aarch64_atomic_load_op_code): Delete.
3583 (aarch64_emit_atomic_load_op): Likewise.
3584 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3585 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3586 instead of aarch64_emit_atomic_load_op.
3587 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3588 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3589 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3590 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3591 character before the pattern name.
3592 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3593 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3594 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3595 (aarch64_frecps<mode>): Likewise.
3596 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3597 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3598 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3599 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3600 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3602 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3604 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3605 Allow HFmode constants if TARGET_FP_F16INST.
3607 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3610 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3611 No longer check last store for clobber of address register.
3613 2018-08-02 Martin Liska <mliska@suse.cz>
3615 PR gcov-profile/86817
3616 * gcov.c (process_all_functions): New function.
3618 (process_file): Move functions processing to
3619 process_all_functions.
3621 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3623 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3624 "const" to the "gimple *" and "rtx_insn *" parameters.
3625 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3627 (dump_location_t::dump_location_t): Likewise.
3629 2018-08-01 Martin Sebor <msebor@redhat.com>
3631 PR tree-optimization/86650
3632 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3633 rather than a "gcall *". Directly pass the data of interest
3634 to percent_K_format, rather than building a temporary CALL_EXPR
3636 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3637 (gimple_fold_builtin_strncat): Adjust.
3638 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3639 gcall* argument with gimple*.
3640 * gimple-ssa-warn-restrict.c (check_call): Same.
3641 (wrestrict_dom_walker::before_dom_children): Same.
3642 (builtin_access::builtin_access): Same.
3643 (check_bounds_or_overlap): Same
3644 (maybe_diag_overlap): Same.
3645 (maybe_diag_offset_bounds): Same.
3646 * tree-diagnostic.c (default_tree_printer): Move usage of
3647 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3649 * tree-pretty-print.c (percent_K_format): Add argument.
3650 * tree-pretty-print.h: Add argument.
3651 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3652 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3653 (maybe_diag_stxncpy_trunc): Same.
3654 (handle_builtin_stxncpy): Same.
3655 (handle_builtin_strcat): Same.
3657 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3659 * match.pd: Optimise pointer range checks.
3661 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3663 PR tree-optimization/86758
3664 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3665 to remove pattern statements.
3667 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3669 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3670 result of dfs_enumerate_from when constructing stmt_vec_infos,
3671 instead of additionally calling get_loop_body.
3673 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3675 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3677 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3678 When creating an iv, assert that the step is not known to be zero.
3679 (vect_setup_realignment): Update call accordingly.
3680 * tree-vect-stmts.c (vectorizable_store): Likewise.
3681 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3683 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3685 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3686 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3687 (vectorizable_reduction): Likewise.
3688 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3689 (vect_detect_hybrid_slp_stmts): Likewise.
3690 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3692 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3694 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3695 (wide_int_set_zero_nonzero_bits): ...this.
3696 (zero_nonzero_bits_from_vr): Rename to...
3697 (vrp_set_zero_nonzero_bits): ...this.
3698 (extract_range_from_multiplicative_op_1): Abstract wide int
3700 (wide_int_range_multiplicative_op): ...here.
3701 (extract_range_from_binary_expr_1): Extract wide int binary
3702 operations into their own functions.
3703 (wide_int_range_lshift): New.
3704 (wide_int_range_can_optimize_bit_op): New.
3705 (wide_int_range_shift_undefined_p): New.
3706 (wide_int_range_bit_xor): New.
3707 (wide_int_range_bit_ior): New.
3708 (wide_int_range_bit_and): New.
3709 (wide_int_range_trunc_mod): New.
3710 (extract_range_into_wide_ints): New.
3711 (vrp_shift_undefined_p): New.
3712 (extract_range_from_multiplicative_op): New.
3713 (vrp_can_optimize_bit_op): New.
3714 * tree-vrp.h (value_range::dump): New.
3715 (wide_int_range_multiplicative_op): New.
3716 (wide_int_range_lshift):New.
3717 (wide_int_range_shift_undefined_p): New.
3718 (wide_int_range_bit_xor): New.
3719 (wide_int_range_bit_ior): New.
3720 (wide_int_range_bit_and): New.
3721 (wide_int_range_trunc_mod): New.
3722 (zero_nonzero_bits_from_bounds): Rename to...
3723 (wide_int_set_zero_nonzero_bits): ...this.
3724 (zero_nonzero_bits_from_vr): Rename to...
3725 (vrp_set_zero_nonzero_bits): ...this.
3726 (range_easy_mask_min_max): Rename to...
3727 (wide_int_range_can_optimize_bit_op): this.
3728 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3729 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3731 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3733 * tree-vectorizer.h (vect_orig_stmt): New function.
3734 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3735 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3736 (vect_create_epilog_for_reduction): Likewise.
3737 (vectorizable_live_operation): Likewise.
3738 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3739 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3740 * tree-vect-stmts.c (vectorizable_call): Likewise.
3741 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3743 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3745 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3747 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3748 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3749 (vect_transform_loop): Likewise.
3750 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3752 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3754 * tree-vectorizer.h (vect_schedule_slp): Return void.
3755 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3756 (vect_schedule_slp): Likewise.
3758 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3760 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3762 (vect_transform_loop): Update calls accordingly. Schedule SLP
3763 instances before the main loop, if any exist.
3765 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3767 PR tree-optimization/86749
3768 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3769 If the lhs is used in a COND_EXPR, check that it is being used
3770 as the "then" or "else" value.
3772 2018-08-01 Tom de Vries <tdevries@suse.de>
3775 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3776 speculation_safe_value_not_needed.
3778 2018-08-01 Richard Biener <rguenther@suse.de>
3780 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3783 2018-08-01 Martin Liska <mliska@suse.cz>
3785 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3786 format how successful transformation is dumped.
3787 (gimple_mod_pow2_value_transform): Likewise.
3788 (gimple_mod_subtract_transform): Likewise.
3789 (gimple_stringops_transform): Likewise.
3791 2018-08-01 Martin Liska <mliska@suse.cz>
3794 * value-prof.c (interesting_stringop_to_profile_p):
3795 Simplify the code and add BUILT_IN_MEMMOVE.
3796 (gimple_stringops_transform): Likewise.
3798 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3800 * config/aarch64/aarch64-simd.md
3801 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3802 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3803 use GPI iterator instead of SI mode.
3805 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3807 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3808 rs6000_speculation_barrier.
3809 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3810 new barrier pattern name.
3812 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3814 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3815 (speculation_barrier): New insn.
3817 2018-08-01 Richard Biener <rguenther@suse.de>
3820 * graphite.h: Include isl/id.h and isl/space.h to allow build
3823 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3826 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3827 mode for COFF targets.
3828 * defaults.h (TARGET_COFF): Define.
3829 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3830 TARGET_COFF): Define.
3831 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3832 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3833 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3835 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3837 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3838 * gimple-streamer-out.c (output_bb): Save it.
3839 * lto-streamer-in.c (input_struct_function_base): Restore
3840 instance discriminator if available. Create map on demand.
3841 * lto-streamer-out.c (output_struct_function_base): Save it if
3843 * final.c (decl_to_instance_map): Document LTO strategy.
3845 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3846 Olivier Hainque <hainque@adacore.com>
3848 * debug.h (decl_to_instance_map_t): New type.
3849 (decl_to_instance_map): Declare.
3850 (maybe_create_decl_to_instance_map): New inline function.
3851 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3852 to track basic block discriminators.
3853 (final_start_function_1): Initialize them.
3854 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3856 (decl_to_instance_map): New variable.
3857 (map_decl_to_instance, maybe_set_discriminator): New functions.
3858 (notice_source_line): Set discriminator.
3860 2018-07-31 Ian Lance Taylor <iant@golang.org>
3862 * targhooks.c (default_have_speculation_safe_value): Add
3865 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3867 * dump-context.h: Include "pretty-print.h".
3868 (dump_context::refresh_dumps_are_enabled): New decl.
3869 (dump_context::emit_item): New decl.
3870 (class dump_context): Add fields "m_test_pp" and
3872 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3873 (temp_dump_context::get_dumped_text): New decl.
3874 (class temp_dump_context): Add field "m_pp".
3875 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3876 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3878 (set_dump_file): Update for above change.
3879 (set_alt_dump_file): Likewise.
3880 (dump_loc): New overload, taking a pretty_printer *.
3881 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3882 to any test pretty-printer.
3883 (make_item_for_dump_gimple_stmt): New function, adapted from
3884 optinfo::add_gimple_stmt.
3885 (dump_context::dump_gimple_stmt): Call it, and use the result,
3886 eliminating the direct usage of dump_file and alt_dump_file in
3887 favor of indirectly using them via emit_item.
3888 (make_item_for_dump_gimple_expr): New function, adapted from
3889 optinfo::add_gimple_expr.
3890 (dump_context::dump_gimple_expr): Call it, and use the result,
3891 eliminating the direct usage of dump_file and alt_dump_file in
3892 favor of indirectly using them via emit_item.
3893 (make_item_for_dump_generic_expr): New function, adapted from
3895 (dump_context::dump_generic_expr): Call it, and use the result,
3896 eliminating the direct usage of dump_file and alt_dump_file in
3897 favor of indirectly using them via emit_item.
3898 (make_item_for_dump_printf_va): New function, adapted from
3899 optinfo::add_printf_va.
3900 (make_item_for_dump_printf): New function.
3901 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3902 and use the result, eliminating the direct usage of dump_file and
3903 alt_dump_file in favor of indirectly using them via emit_item.
3904 (make_item_for_dump_dec): New function.
3905 (dump_context::dump_dec): Call it, and use the result,
3906 eliminating the direct usage of dump_file and alt_dump_file in
3907 favor of indirectly using them via emit_item.
3908 (make_item_for_dump_symtab_node): New function, adapted from
3909 optinfo::add_symtab_node.
3910 (dump_context::dump_symtab_node): Call it, and use the result,
3911 eliminating the direct usage of dump_file and alt_dump_file in
3912 favor of indirectly using them via emit_item.
3913 (dump_context::begin_scope): Reimplement, avoiding direct usage
3914 of dump_file and alt_dump_file in favor of indirectly using them
3916 (dump_context::emit_item): New member function.
3917 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3918 Set up test pretty-printer on the underlying context. Call
3919 refresh_dumps_are_enabled.
3920 (temp_dump_context::~temp_dump_context): Call
3921 refresh_dumps_are_enabled.
3922 (temp_dump_context::get_dumped_text): New member function.
3923 (selftest::verify_dumped_text): New function.
3924 (ASSERT_DUMPED_TEXT_EQ): New macro.
3925 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3926 and then without optinfo enabled. Add uses of
3927 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3928 * dumpfile.h: Update comment for the dump_* API.
3929 * optinfo-emit-json.cc
3930 (selftest::test_building_json_from_dump_calls): Update for new
3931 param for temp_dump_context ctor.
3932 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3933 and "m_owned" field.
3934 (optinfo_item::~optinfo_item): Likewise.
3935 (optinfo::add_item): New member function.
3936 (optinfo::emit): Update comment.
3937 (optinfo::add_string): Delete.
3938 (optinfo::add_printf): Delete.
3939 (optinfo::add_printf_va): Delete.
3940 (optinfo::add_gimple_stmt): Delete.
3941 (optinfo::add_gimple_expr): Delete.
3942 (optinfo::add_tree): Delete.
3943 (optinfo::add_symtab_node): Delete.
3944 (optinfo::add_dec): Delete.
3945 * optinfo.h (class dump_context): New forward decl.
3946 (optinfo::add_item): New decl.
3947 (optinfo::add_string): Delete.
3948 (optinfo::add_printf): Delete.
3949 (optinfo::add_printf_va): Delete.
3950 (optinfo::add_gimple_stmt): Delete.
3951 (optinfo::add_gimple_expr): Delete.
3952 (optinfo::add_tree): Delete.
3953 (optinfo::add_symtab_node): Delete.
3954 (optinfo::add_dec): Delete.
3955 (optinfo::add_poly_int): Delete.
3956 (optinfo_item::optinfo_item): Remove "owned" param.
3957 (class optinfo_item): Remove field "m_owned".
3959 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3962 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3963 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3964 requested variable alignment.
3965 (expand_one_ssa_partition): Likewise.
3966 (expand_one_var): Likewise.
3968 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3970 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3971 to speculation_safe_value_not_needed.
3973 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3975 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3976 * targhooks.c (speculation_safe_value_not_needed): New function.
3977 * target.def (have_speculation_safe_value): Update documentation.
3978 * doc/tm.texi: Regenerated.
3980 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3982 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3983 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3985 (despeculate_copy<ALLI:mode>_insn): New insn.
3986 (despeculate_copyti_insn): New insn.
3987 (despeculate_simple<ALLI:mode>): New insn
3988 (despeculate_simpleti): New insn.
3989 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3991 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3992 aarch64_speculation_safe_value.
3993 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3995 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3997 * config/aarch64/aarch64-speculation.cc: New file.
3998 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3999 before pass_reorder_blocks.
4000 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4002 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4003 X14 and X15 when tracking speculation.
4004 * config/aarch64/aarch64.md (register name constants): Add
4005 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4006 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4007 (speculation_barrier): New insn attribute.
4008 (cmp<mode>): Allow SP in comparisons.
4009 (speculation_tracker): New insn.
4010 (speculation_barrier): Add speculation_barrier attribute.
4011 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4012 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4013 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4015 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4017 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4018 aarch64_track_speculation is true.
4019 (tb<optab><mode>1): Likewise.
4020 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4021 generate CB[N]Z when tracking speculation.
4022 (aarch64_split_compare_and_swap): Likewise.
4023 (aarch64_split_atomic_op): Likewise.
4025 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4027 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4029 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4031 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4032 (speculation_barrier): New insn.
4034 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4036 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4037 * config/arm/arm.md (speculation_barrier): New expand.
4038 (speculation_barrier_insn): New pattern.
4040 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4042 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4043 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4044 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4045 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4047 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4048 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4049 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4050 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4051 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4052 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4053 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4054 * builtins.c (expand_speculation_safe_value): New function.
4055 (expand_builtin): Call it.
4056 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4057 * doc/extend.texi: Document __builtin_speculation_safe_value.
4058 * doc/md.texi: Document "speculation_barrier" pattern.
4059 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4060 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4061 * doc/tm.texi: Regenerated.
4062 * target.def (have_speculation_safe_value, speculation_safe_value): New
4064 * targhooks.c (default_have_speculation_safe_value): New function.
4065 (default_speculation_safe_value): New function.
4066 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4067 (default_speculation_safe_value): Add prototype.
4069 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4071 * dump-context.h (dump_context::dump_loc): New decl.
4072 * dumpfile.c (dump_context::dump_loc): New member function.
4073 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4074 and dump_gimple_stmt.
4075 (dump_context::dump_gimple_expr_loc): Likewise, using
4077 (dump_context::dump_generic_expr_loc): Likewise, using
4079 (dump_context::dump_printf_loc_va): Likewise, using
4081 (dump_context::begin_scope): Explicitly using the global function
4082 "dump_loc", rather than the member function.
4084 2018-07-31 Martin Sebor <msebor@redhat.com>
4086 PR tree-optimization/86741
4087 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4089 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4091 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4092 depend on whether prefetch instructions will be emitted or not.
4093 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4094 will be emitted or not.
4095 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4096 (TARGET_SETMEM_PFD): New macros.
4098 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4100 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4101 (NULL_STMT_VEC_INFO): Delete.
4102 (stmt_vec_info::operator*): Likewise.
4103 (stmt_vec_info::operator gimple *): Likewise.
4104 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4105 of NULL_STMT_VEC_INFO.
4106 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4107 (vect_reassociating_reduction_p): Likewise.
4108 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4109 (vectorizable_store): Likewise.
4110 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4111 (vec_info::free_stmt_vec_infos): Likewise.
4113 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4115 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4116 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4120 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4121 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4122 (vec_info::free_stmt_vec_info): New private member functions.
4123 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4124 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4125 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4126 set_stmt_vec_info_vec and free_stmt_vec_infos.
4127 * tree-vect-loop.c (_loop_vec_info): Remove call to
4128 set_stmt_vec_info_vec.
4129 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4130 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4131 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4132 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4133 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4134 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4135 with the clearing in the xcalloc.
4136 (stmt_vec_info_vec): Delete.
4137 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4138 (vectorize_loops): Likewise.
4139 (vec_info::~vec_info): Remove argument from call to
4140 free_stmt_vec_infos.
4141 (vec_info::add_stmt): Remove vinfo argument from call to
4144 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4146 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4147 rather than a gimple stmt.
4148 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4149 information for pattern statements when passed the original
4150 statement; instead wait to be passed the pattern statement itself.
4151 Don't call set_vinfo_for_stmt here.
4152 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4153 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4154 stmt_vec_infos here.
4155 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4156 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4157 stmt_vec_infos entry.
4159 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4161 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4162 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4163 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4164 * tree-vect-stmts.c (vectorizable_call): Likewise.
4165 (vectorizable_simd_clone_call): Likewise.
4167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4169 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4170 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4171 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4172 * tree-vect-loop.c (vect_transform_loop): Likewise.
4173 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4174 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4176 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4178 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4179 (vect_dr_stmt): Delete.
4180 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4181 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4183 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4184 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4185 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4186 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4187 (vect_analyze_data_refs): Likewise.
4188 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4190 (vect_find_same_alignment_drs): Likewise.
4191 (vect_slp_analyze_node_dependences): Update calls accordingly.
4192 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4193 instead of DR_VECT_AUX.
4194 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4195 of a vector data references. Use vec_info::lookup_dr instead of
4197 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4198 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4199 instead of DR_VECT_AUX.
4201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4203 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4205 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4207 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4208 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4209 (vect_gen_prolog_loop_niters): Likewise.
4211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4213 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4214 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4215 (vect_known_alignment_in_bytes, vect_dr_behavior)
4216 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4217 instead of data_references. Update calls to other routines for
4218 which the same change has been made.
4219 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4220 dr_vec_infos instead of stmt_vec_infos.
4221 (vect_analyze_data_ref_dependence): Update call accordingly.
4222 (vect_slp_analyze_data_ref_dependence)
4223 (vect_record_base_alignments): Use DR_VECT_AUX.
4224 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4225 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4226 (vector_alignment_reachable_p, vect_get_data_access_cost)
4227 (vect_peeling_supportable, vect_analyze_group_access_1)
4228 (vect_analyze_group_access, vect_analyze_data_ref_access)
4229 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4230 (vect_compile_time_alias, vect_small_gap_p)
4231 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4232 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4233 instead of data_references. Update calls to other routines for
4234 which the same change has been made.
4235 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4236 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4237 (vect_slp_analyze_and_verify_node_alignment)
4238 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4239 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4240 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4242 (_vect_peel_info::dr): Replace with...
4243 (_vect_peel_info::dr_info): ...this new field.
4244 (vect_peeling_hash_get_most_frequent)
4245 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4246 (vect_peeling_hash_get_lowest_cost):
4247 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4248 routines for which the same change has been made.
4249 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4251 * tree-vect-loop-manip.c (get_misalign_in_elems)
4252 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4254 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4255 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4256 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4257 (get_group_load_store_type, get_negative_load_store_type)
4258 (vect_get_data_ptr_increment, vectorizable_store)
4259 (vectorizable_load): Likewise.
4260 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4261 Update calls to other routines for which the same change has been made.
4263 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4265 * tree-vectorizer.h (vec_info::move_dr): New member function.
4266 (dataref_aux): Rename to...
4267 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4268 (_stmt_vec_info::dr_aux): Update accordingly.
4269 (_stmt_vec_info::data_ref_info): Delete.
4270 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4271 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4272 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4273 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4275 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4276 (STMT_VINFO_DR_INFO): New macro.
4277 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4278 (set_dr_misalignment): Update after rename of dataref_aux.
4279 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4280 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4281 initialization of STMT_VINFO_DATA_REF.
4282 * tree-vectorizer.c (vec_info::move_dr): New function.
4283 * tree-vect-patterns.c (vect_recog_bool_pattern)
4284 (vect_recog_mask_conversion_pattern)
4285 (vect_recog_gather_scatter_pattern): Use it.
4286 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4287 the "dr" and "stmt" fields of dr_vec_info instead of
4288 STMT_VINFO_DATA_REF.
4290 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4292 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4293 (is_pattern_stmt_p): Use it.
4294 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4295 on pattern statements.
4297 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4299 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4300 original stmt as a stmt_vec_info rather than a gimple stmt.
4301 (vect_pattern_recog_1): Take the statement directly as a
4302 stmt_vec_info, rather than via a gimple_stmt_iterator.
4303 Update call to vect_mark_pattern_stmts.
4304 (vect_pattern_recog): Update calls accordingly.
4306 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4308 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4309 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4310 a vect_def_type for the first argument.
4311 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4312 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4313 operand if it isn't defined by a vectorized statement.
4314 (vect_build_gather_load_calls): Remove the mask_dt argument and
4315 update calls to vect_get_vec_def_for_stmt_copy.
4316 (vectorizable_bswap): Likewise the dt argument.
4317 (vectorizable_call): Update calls to vectorizable_bswap and
4318 vect_get_vec_def_for_stmt_copy.
4319 (vectorizable_simd_clone_call, vectorizable_assignment)
4320 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4321 (vectorizable_comparison): Update calls to
4322 vect_get_vec_def_for_stmt_copy.
4323 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4325 (vect_get_loop_based_defs): Remove dt argument and update call
4326 to vect_get_vec_def_for_stmt_copy.
4327 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4328 and vect_get_vec_def_for_stmt_copy.
4329 (vectorizable_load): Update calls to vect_build_gather_load_calls
4330 and vect_get_vec_def_for_stmt_copy.
4331 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4332 (vectorizable_reduction, vectorizable_live_operation): Update calls
4333 to vect_get_vec_def_for_stmt_copy.
4335 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4337 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4338 and gimple stmt arguments with a stmt_vec_info.
4339 (vect_record_base_alignments): Update calls accordingly.
4340 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4341 and gimple stmt arguments with a stmt_vec_info.
4342 (vect_build_slp_tree_1): Remove vinfo argument and update call
4343 to vect_record_max_nunits.
4344 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4345 and vect_record_max_nunits.
4347 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4349 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4350 file and take a stmt_vec_info instead of a gimple stmt.
4351 (supportable_widening_operation, vect_finish_replace_stmt)
4352 (vect_finish_stmt_generation, vect_get_store_rhs)
4353 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4354 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4355 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4356 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4357 (vect_create_data_ref_ptr, bump_vector_ptr)
4358 (vect_permute_store_chain, vect_setup_realignment)
4359 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4360 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4361 (vectorizable_reduction, vectorizable_induction)
4362 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4363 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4364 than gimple stmts as arguments.
4365 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4366 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4367 (can_group_stmts_p, vect_check_gather_scatter)
4368 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4369 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4370 (vect_permute_load_chain, vect_shift_permute_load_chain)
4371 (vect_transform_grouped_load)
4372 (vect_record_grouped_load_vectors): Likewise.
4373 * tree-vect-loop.c (vect_fixup_reduc_chain)
4374 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4375 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4376 (vectorizable_reduction, vectorizable_induction)
4377 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4378 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4379 (vect_get_load_store_mask): Likewise.
4380 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4381 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4382 * tree-vect-stmts.c (vect_mark_relevant)
4383 (is_simple_and_all_uses_invariant)
4384 (exist_non_indexing_operands_for_use_p, process_use)
4385 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4386 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4387 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4388 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4389 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4390 (get_negative_load_store_type, get_load_store_type)
4391 (vect_check_load_store_mask, vect_check_store_rhs)
4392 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4393 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4394 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4395 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4396 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4397 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4398 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4399 (supportable_widening_operation): Likewise.
4401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4403 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4404 a stmt_vec_info instead of a gcall.
4405 (vect_check_gather_scatter): Update call accordingly.
4406 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4408 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4409 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4410 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4411 instead of a gimple stmt.
4412 (vect_transform_loop): Update calls accordingly.
4413 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4414 stmt_vec_infos instead of gimple stmts.
4415 (vect_analyze_slp_instance): Update use accordingly.
4416 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4417 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4418 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4419 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4420 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4421 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4422 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4423 down to subroutines.
4425 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4427 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4428 of the worklist from a vector of gimple stmts to a vector of
4430 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4431 (vect_mark_stmts_to_be_vectorized): Likewise
4433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4435 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4436 statement before passing it to vect_analyze_stmt.
4437 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4438 the chain of phi vector definitions. Track the exit phi via its
4440 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4441 STMT_VINFO_REDUC_DEF.
4442 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4443 stmt_vec_infos to handle the statement chains.
4444 (vect_get_slp_defs): Record the first statement in the node
4445 using a stmt_vec_info.
4446 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4447 statements here and pass their stmt_vec_info down to subroutines.
4448 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4449 down to vect_finish_stmt_generation.
4450 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4451 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4452 stmt_vec_infos to subroutines.
4453 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4456 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4458 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4459 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4460 (vect_permute_store_chain, vect_setup_realignment)
4461 (vect_permute_load_chain, vect_shift_permute_load_chain)
4462 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4463 stmts internally, and when passing values to other vectorizer routines.
4464 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4465 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4466 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4467 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4468 (vectorizable_reduction, vectorizable_induction)
4469 (vectorizable_live_operation, vect_transform_loop_stmt)
4470 (vect_transform_loop): Likewise.
4471 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4472 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4473 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4474 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4475 (vect_slp_analyze_node_operations_1): Likewise.
4476 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4477 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4478 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4479 (vect_finish_stmt_generation_1, get_group_load_store_type)
4480 (get_load_store_type, vect_build_gather_load_calls)
4481 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4482 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4483 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4484 (vectorizable_store, vectorizable_load, vectorizable_condition)
4485 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4486 (supportable_widening_operation): Likewise.
4487 (vect_get_vector_types_for_stmt): Likewise.
4488 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4490 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4492 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4493 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4494 (vect_permute_store_chain, vect_permute_load_chain)
4495 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4496 repeated stmt_vec_info lookups.
4497 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4498 (vect_update_ivs_after_vectorizer): Likewise.
4499 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4500 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4501 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4502 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4503 (vect_bb_slp_scalar_cost): Likewise.
4504 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4506 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4508 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4509 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4510 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4511 to get gassigns and gcalls, rather than operating on generc gimple
4513 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4514 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4515 (vectorizable_load, vect_analyze_stmt): Likewise.
4516 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4520 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4521 return stmt_vec_infos rather than gimple stmts. Do not accept
4523 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4525 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4526 Update use of get_later_stmt.
4527 (vect_get_constant_vectors): Update call accordingly.
4528 (vect_schedule_slp_instance): Likewise
4529 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4530 (vect_slp_analyze_instance_dependence): Likewise.
4531 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4535 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4536 (stmt_info_for_cost::stmt_info): ...this new field.
4537 (add_stmt_costs): Update accordingly.
4538 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4539 (vect_get_known_peeling_cost): Likewise.
4540 (vect_estimate_min_profitable_iters): Likewise.
4541 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4545 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4546 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4547 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4549 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4551 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4553 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4554 a gimple stmt to a stmt_vec_info.
4555 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4559 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4560 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4561 (_loop_vec_info::reduction_chains): Likewise.
4562 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4564 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4566 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4568 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4569 a gimple stmt to a stmt_vec_info.
4570 (_stmt_vec_info::next_element): Likewise.
4571 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4572 (vect_slp_analyze_and_verify_node_alignment)
4573 (vect_analyze_group_access_1, vect_analyze_group_access)
4574 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4575 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4576 (vect_supportable_dr_alignment): Update accordingly.
4577 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4578 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4579 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4580 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4581 * tree-vect-slp.c (vect_build_slp_tree_1)
4582 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4583 (vect_split_slp_store_group, vect_analyze_slp_instance)
4584 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4585 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4586 (get_group_load_store_type, get_load_store_type)
4587 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4588 (vect_transform_stmt, vect_remove_stores): Likewise.
4590 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4592 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4594 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4595 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4596 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4597 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4598 (vector_alignment_reachable_p, vect_get_data_access_cost)
4599 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4600 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4601 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4602 (vect_analyze_group_access_1, vect_analyze_group_access)
4603 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4604 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4605 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4606 result of vect_dr_stmt and use the stmt_vec_info instead of
4607 the associated gimple stmt.
4608 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4609 (vect_gen_prolog_loop_niters): Likewise.
4610 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4612 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4614 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4615 to a vec<stmt_vec_info>.
4616 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4617 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4619 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4620 to a vec<stmt_vec_info>.
4621 (bst_traits::value_type, bst_traits::value_type): Likewise.
4622 (bst_traits::hash): Update accordingly.
4623 (vect_get_and_check_slp_defs): Change the stmts parameter from
4624 a vec<gimple *> to a vec<stmt_vec_info>.
4625 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4626 (vect_build_slp_tree): Likewise.
4627 (vect_build_slp_tree_2): Likewise. Update uses of
4628 SLP_TREE_SCALAR_STMTS.
4629 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4630 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4631 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4632 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4633 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4634 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4635 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4636 (vect_get_constant_vectors, vect_get_slp_defs)
4637 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4638 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4639 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4640 instead of gimple stmts.
4641 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4642 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4643 (vect_slp_analyze_instance_dependence): Update uses of
4644 SLP_TREE_SCALAR_STMTS.
4645 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4646 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4647 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4648 (get_initial_defs_for_reduction): Likewise.
4649 (vect_create_epilog_for_reduction): Likewise.
4650 (vectorize_fold_left_reduction): Likewise.
4651 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4652 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4653 (can_vectorize_live_stmts): Likewise.
4655 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4657 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4658 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4659 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4661 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4663 (gather_scalar_reductions): Update after above interface changes.
4664 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4665 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4667 (vect_force_simple_reduction): Likewise.
4668 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4669 LOOP_VINFO_REDUCTIONS.
4670 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4672 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4674 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4675 a gimple stmt to a stmt_vec_info.
4676 * tree-vect-loop.c (vect_active_double_reduction_p)
4677 (vect_force_simple_reduction, vectorizable_reduction): Update
4680 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4682 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4683 vec<gimple *> to a vec<stmt_vec_info>.
4684 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4685 the reduction_phis argument from a vec<gimple *> to a
4687 (vectorizable_reduction): Likewise the phis local variable that
4688 is passed to vect_create_epilog_for_reduction. Update for new type
4689 of SLP_TREE_VEC_STMTS.
4690 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4691 (vectorizable_live_operation): Likewise.
4692 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4693 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4697 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4698 a gimple stmt to a stmt_vec_info.
4699 (vectorizable_condition, vectorizable_live_operation)
4700 (vectorizable_reduction, vectorizable_induction): Pass back the
4701 vectorized statement as a stmt_vec_info.
4702 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4703 use of STMT_VINFO_VEC_STMT.
4704 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4705 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4706 as stmt_vec_infos rather than gimple stmts.
4707 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4709 (vectorizable_live_operation): Likewise.
4710 (vectorizable_reduction, vectorizable_induction): Likewise,
4711 updating use of STMT_VINFO_VEC_STMT.
4712 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4713 of STMT_VINFO_VEC_STMT.
4714 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4715 (vectorizable_simd_clone_call, vectorizable_conversion)
4716 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4717 (vectorizable_store, vectorizable_load, vectorizable_condition)
4718 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4719 from a gimple stmt to a stmt_vec_info.
4720 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4721 pointer to a stmt_vec_info to the vectorizable_* routines.
4723 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4725 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4726 a gimple stmt to a stmt_vec_info.
4727 (is_pattern_stmt_p): Update accordingly.
4728 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4729 (vect_record_grouped_load_vectors): Likewise.
4730 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4731 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4732 (vect_model_reduction_cost): Likewise.
4733 (vect_create_epilog_for_reduction): Likewise.
4734 (vectorizable_reduction, vectorizable_induction): Likewise.
4735 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4736 Return the stmt_vec_info for the pattern statement.
4737 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4738 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4739 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4740 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4741 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4742 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4743 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4744 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4748 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4749 (vect_finish_stmt_generation): Likewise.
4750 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4751 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4752 (vect_build_gather_load_calls): Use the return value of the above
4753 functions instead of a separate call to vinfo_for_stmt. Use narrow
4754 scopes for the input gimple stmt and wider scopes for the associated
4755 stmt_vec_info. Use vec_info::lookup_def when setting these
4756 stmt_vec_infos from an SSA_NAME definition.
4757 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4758 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4759 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4760 (vectorizable_store, vectorizable_load, vectorizable_condition)
4761 (vectorizable_comparison): Likewise.
4762 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4763 (vectorizable_reduction): Likewise.
4765 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4767 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4768 stmt_vec_info * parameter before the optional gimple **.
4769 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4770 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4771 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4772 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4773 (vectorizable_live_operation): Likewise.
4774 * tree-vect-patterns.c (type_conversion_p): Likewise.
4775 (vect_look_through_possible_promotion): Likewise.
4776 (vect_recog_rotate_pattern): Likewise.
4777 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4779 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4781 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4782 a typedef to a wrapper class.
4783 (NULL_STMT_VEC_INFO): New macro.
4784 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4785 (stmt_vec_info::operator*): New function.
4786 (stmt_vec_info::operator gimple *): Likewise.
4787 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4788 (add_stmt_costs): Likewise.
4789 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4790 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4791 (vect_get_known_peeling_cost): Likewise.
4792 (vect_estimate_min_profitable_iters): Likewise.
4793 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4794 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4795 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4796 (vectorizable_store, free_stmt_vec_infos): Likewise.
4797 (new_stmt_vec_info): Change return type of xcalloc to
4800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4802 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4803 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4804 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4805 a single_imm_use-based sequence.
4806 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4810 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4811 * tree-vectorizer.c (vec_info::lookup_def): New function.
4812 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4813 (vect_widened_op_tree): Likewise.
4814 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4815 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4816 (vectorizable_reduction): Likewise.
4817 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4819 (vect_is_slp_reduction): Update calls accordingly. Use
4820 vec_info::lookup_def.
4821 (vect_is_simple_reduction): Likewise
4822 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4824 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4826 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4827 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4828 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4830 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4831 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4832 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4833 (vect_is_slp_reduction, vectorizable_induction)
4834 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4835 * tree-vect-patterns.c (vect_init_pattern_stmt):
4836 (vect_determine_min_output_precision_1, vect_determine_precisions)
4837 (vect_pattern_recog): Likewise.
4838 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4839 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4840 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4841 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4842 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4843 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4844 info field from a loop to a loop_vec_info.
4846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4848 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4849 (vec_info::add_stmt): Declare.
4850 * tree-vectorizer.c (vec_info::add_stmt): New function.
4851 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4852 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4853 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4854 (vectorizable_induction): Likewise.
4855 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4856 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4857 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4858 (vectorizable_load): Likewise.
4859 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4860 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4861 (vect_recog_gather_scatter_pattern): Likewise.
4862 (append_pattern_def_seq): Likewise. Remove a check that is
4863 performed by add_stmt itself.
4865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4867 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4868 which make_ssa_name was called with new_stmt before new_stmt
4871 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4873 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4875 (vect_is_slp_reduction): ...here...
4876 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4877 that are already known to be false.
4879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4881 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4882 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4883 STMT_VINFO_NUM_SLP_USES when it's true.
4884 (vect_free_slp_instance): Add a final_p parameter and pass it to
4886 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4887 (vect_analyze_slp_instance): Likewise.
4888 (vect_slp_analyze_operations): Likewise.
4889 (vect_slp_analyze_bb_1): Likewise.
4890 * tree-vectorizer.c (vec_info): Likewise.
4891 * tree-vect-loop.c (vect_transform_loop): Likewise.
4893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4895 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4896 function is not called for second and subsequent members of
4899 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4901 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4902 cases for nested loops from here to ...
4903 (vect_create_epilog_for_reduction): ...here. Only call
4904 vect_is_simple_use for inner-loop reductions.
4906 2018-07-31 Martin Liska <mliska@suse.cz>
4908 PR gcov-profile/85338
4909 PR gcov-profile/85350
4910 PR gcov-profile/85372
4911 * profile.c (struct location_triplet): New.
4912 (struct location_triplet_hash): Likewise.
4913 (output_location): Do not output a BB that
4914 is already recorded for a line.
4915 (branch_prob): Use streamed_locations.
4917 2018-07-31 Martin Liska <mliska@suse.cz>
4919 PR gcov-profile/85370
4920 * coverage.c (coverage_begin_function): Do not mark target
4921 clones as artificial functions.
4923 2018-07-31 Martin Liska <mliska@suse.cz>
4925 PR gcov-profile/83813
4926 PR gcov-profile/84758
4927 PR gcov-profile/85217
4928 PR gcov-profile/85332
4929 * profile.c (branch_prob): Do not record GOTO expressions
4930 for GIMPLE statements which locations are already streamed.
4932 2018-07-31 Olivier Hainque <hainque@adacore.com>
4934 * gcc.c (handle_spec_function): Accept a soft_matched_part
4935 argument, as do_spec_1. Pass it down to ...
4936 (eval_spec_function): Accept a soft_matched_part argument,
4937 and pass it down to ...
4938 (do_spec_2): Accept a soft_matched_part argument, and pass
4939 it down to do_spec_1.
4940 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4941 (handle_braces): Update call to handle_spec_function.
4942 (driver::set_up_specs): Update calls to do_spec_2.
4943 (compare_debug_dump_opt_spec_function): Likewise.
4944 (compare_debug_self_opt_spec_function): Likewise.
4946 2018-07-31 Olivier Hainque <hainque@adacore.com>
4948 * common.opt (nolibc): New option.
4949 * doc/invoke.texi (Link Options): Document it.
4950 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4951 * config/alpha/linux.h: Likewise.
4952 * config/arc/elf.h: Likewise.
4953 * config/arm/uclinux-elf.h: Likewise.
4954 * config/arm/unknown-elf.h: Likewise.
4955 * config/avr/avrlibc.h: Likewise.
4956 * config/bfin/bfin.h: Likewise.
4957 * config/bfin/linux.h: Likewise.
4958 * config/bfin/uclinux.h: Likewise.
4959 * config/darwin.h: Likewise.
4960 * config/darwin10.h: Likewise.
4961 * config/darwin12.h: Likewise.
4962 * config/gnu-user.h: Likewise.
4963 * config/lm32/uclinux-elf.h: Likewise.
4964 * config/pa/pa-hpux11.h: Likewise.
4965 * config/pa/pa64-hpux.h: Likewise.
4966 * config/sparc/sparc.h: Likewise.
4968 2018-07-31 Olivier Hainque <hainque@adacore.com>
4970 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4971 undefined variables.
4973 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4976 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4979 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4981 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4982 terminated string literal.
4984 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4986 PR rtl-optimization/85160
4987 * combine.c (is_just_move): New function.
4988 (try_combine): Allow combining two instructions into two if neither of
4989 the original instructions was a move.
4991 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4994 * doc/extend.texi (Global Register Variables): Discourage use of type
4996 (Local Register Variables): Likewise.
4998 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5000 PR tree-optimization/86506
5001 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5003 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5006 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5007 hard_regno, make sure no insn between `from` and `to` clobbers it.
5009 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5010 Tom de Vries <tdevries@suse.de>
5012 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5013 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5014 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5015 PTX_DEFAULT_RUNTIME_DIM.
5016 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5018 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5020 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5021 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5022 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5024 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5026 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5028 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5029 predicate to reflect toc fusion has been deleted.
5030 (toc_fusion_mem_raw): Delete, no longer used.
5031 (toc_fusion_mem_wrapped): Likewise.
5032 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5034 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5035 Delete, no longer used.
5036 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5037 meant to be used for toc fusion.
5038 (rs6000_debug_print_mode): Delete toc fusion debugging.
5039 (rs6000_debug_reg_global): Likewise.
5040 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5041 fusion and secondary reload support that were never used.
5042 (rs6000_option_override_internal): Delete TOC fusion, that was only
5043 partially defined, and it did not work unless you also used the
5045 (rs6000_legitimate_address_p): Delete TOC fusion support.
5046 (rs6000_opt_masks): Likewise.
5047 (fusion_wrap_memory_address): Delete function, no longer used.
5048 (fusion_split_address); Delete TOC fusion support.
5049 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5050 longer used with toc fusion being deleted.
5051 (TARGET_TOC_FUSION_FP): Likewise.
5052 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5054 (toc fusion spliter): Delete TOC fusion support.
5055 (toc_fusionload_<mode>): Likewise.
5056 (toc_fusionload_di): Likewise.
5057 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5058 longer needs to be named. Rename predicate to delete TOC fusion.
5059 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5060 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5061 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5062 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5063 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5065 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5067 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5068 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5069 __int128 in built-in function prototypes.
5070 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5071 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5073 2018-07-27 Martin Sebor <msebor@redhat.com>
5075 PR tree-optimization/86696
5076 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5077 types, including enums.
5078 (handle_char_store): Be prepared for the above function to fail.
5080 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5082 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5083 when optimization level is lower than 2 or optimize for size.
5085 2018-07-26 Martin Sebor <msebor@redhat.com>
5087 PR tree-optimization/86043
5088 PR tree-optimization/86042
5089 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5090 (get_string_cst_length): Rename...
5091 (get_min_string_length): ...to this. Add argument.
5092 (handle_char_store): Extend to handle multi-character stores by
5094 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5095 * tree.h (initializer_zerop): Add argument.
5097 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5100 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5101 declare target to variables if they have always,{to,from,tofrom} map
5104 2018-07-26 Martin Liska <mliska@suse.cz>
5107 * lto-wrapper.c: Add linker_output as prefix
5108 for ltrans_output_file.
5110 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5112 PR rtl-optimization/85805
5113 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5114 value for hard registers if that was written in the same mode.
5116 2018-07-26 Martin Liska <mliska@suse.cz>
5118 PR gcov-profile/86536
5119 * gcov.c (format_gcov): Use printf format %.*f directly
5120 and do not handle special values.
5122 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5124 * common/config/arc/arc-common.c (arc_option_optimization_table):
5125 Update default optimizations for size.
5127 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5129 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5130 * config/arc/constraints.md (CfZ): New constraint.
5131 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5132 (subsf3_fpu): Likewise.
5133 (cmpsf_fpu): Likewise.
5134 (cmpsf_fpu_uneq): Likewise.
5136 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5138 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5140 (arc_is_uncached_mem_p): uncached applies to both the variable and
5143 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5145 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5148 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5150 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5151 field "m_scopes" from vec to auto_vec.
5153 2018-07-25 Martin Liska <mliska@suse.cz>
5155 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5158 2018-07-25 Richard Biener <rguenther@suse.de>
5161 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5162 special wrt context_die late.
5163 (gen_subprogram_die): Re-use DIEs in local scope.
5165 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5167 PR tree-optimization/86644
5168 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5170 2018-07-25 Martin Liska <mliska@suse.cz>
5173 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5174 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5176 2018-07-25 Martin Liska <mliska@suse.cz>
5179 * params.def: Explain ASan abbreviation and provide
5180 a documentation link.
5182 2018-07-24 Martin Sebor <msebor@redhat.com>
5184 PR tree-optimization/86622
5185 PR tree-optimization/86532
5186 * builtins.h (string_length): Declare.
5187 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5188 (check_access): Be prepared for non-constant length ranges.
5189 (string_length): Make extern.
5190 * expr.c (string_constant): Only handle the minor non-constant
5191 array index. Use string_constant to compute the length of
5192 a generic string constant.
5194 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5196 PR tree-optimization/86618
5197 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5198 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5200 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5202 PR tree-optimization/86636
5203 * json.cc (json::object::set): Fix comment. Add assertions.
5204 (json::array::append): Move here from json.h. Add comment and an
5206 (json::string::string): Likewise.
5207 * json.h (json::array::append): Move to json.cc.
5208 (json::string::string): Likewise.
5209 * optinfo-emit-json.cc
5210 (optrecord_json_writer::impl_location_to_json): Assert that we
5211 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5212 wrapper around it. Expand the location once, rather than three
5214 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5215 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5217 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5218 places. Fix some overlong lines.
5220 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5222 * config/aarch64/aarch64-simd.md
5223 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5224 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5225 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5226 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5227 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5228 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5229 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5230 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5231 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5233 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5236 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5237 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5238 and abs_d == d, do the power of two handling if profitable.
5240 2018-07-24 Richard Biener <rguenther@suse.de>
5242 * match.pd: Add BIT_FIELD_REF canonicalizations.
5244 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5247 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5249 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5251 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5252 terminated STRING_CST object.
5254 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5256 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5258 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5260 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5261 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5262 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5263 the elements into a register.
5264 (rs6000_split_v4si_init_di_reg): Delete.
5265 (rs6000_split_v4si_init): Delete.
5266 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5267 (vsx_init_v4si): Rewrite as a define_expand.
5269 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5271 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5272 zero_extend argument from memory): New.
5274 2018-07-22 Martin Sebor <msebor@redhat.com>
5277 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5278 diagnosing calls with unknown arguments unless -Walloca-larger-than
5279 is restricted to less than PTRDIFF_MAX bytes.
5281 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5283 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5285 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5287 * pretty-print.c (text_info::set_location): Remove redundant
5288 "line_table" parameter from call to rich_location::set_range.
5290 2018-07-20 Martin Sebor <msebor@redhat.com>
5293 * builtins.c (expand_builtin_alloca): Adjust.
5294 * calls.c (alloc_max_size): Simplify.
5295 * cgraphunit.c (cgraph_node::expand): Adjust.
5296 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5298 (frame_larger_than_size): Same.
5299 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5300 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5302 * doc/invoke.texi (GCC Command Options): Document option arguments.
5303 Explain byte-size arguments and suffixes.
5304 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5305 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5306 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5307 * doc/options.texi (UInteger): Expand.
5308 (Host_Wide_Int, ByteSize): Document new properties.
5309 * final.c (final_start_function_1): Include sizes in an error message.
5310 * function.c (frame_offset_overflow): Same.
5311 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5312 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5313 Diagnose unbounded alloca calls only for limits of less than
5315 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5316 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5318 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5319 only for limits of less than PTRDIFF_MAX.
5320 * langhooks-def.h (lhd_handle_option): Change function argument
5322 * langhooks.c (lhd_handle_option): Same.
5323 * langhooks.h (handle_option): Same.
5324 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5326 (var_type, var_type_struct): Same.
5327 (var_set): Handle ByteSize flag.
5328 * optc-gen.awk: Add comments to output to ease debugging. Make
5329 use of HOST_WIDE_INT where appropriate.
5330 * opts-gen-save.awk: Use %lx to format unsigned long.
5331 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5332 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5333 arguments. Parse bytes-size suffixes.
5334 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5335 (enum_value_to_arg): Same.
5336 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5337 (handle_option): Adjust.
5338 (generate_option): Change function argument to HOST_WIDE_INT.
5339 (cmdline_handle_error): Adjust.
5340 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5341 (set_option): Change function argument to HOST_WIDE_INT.
5342 (option_enabled): Handle cl_host_wide_int.
5343 (get_option_state): Handle CLVC_SIZE.
5344 (control_warning_option): Same.
5345 * opts.c (common_handle_option): Change function argument to
5346 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5347 OPT_Wvla_larger_than_.
5348 * opts.h (enum cl_var_type): Add an enumerator.
5349 * stor-layout.c (layout_decl): Print a more meaningful warning.
5350 * toplev.c (output_stack_usage): Adjust.
5352 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5354 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5355 call to inline_expand_builtin_string_cmp.
5356 (expand_builtin_strcmp): Likewise.
5357 (expand_builtin_strncmp): Likewise.
5358 (inline_string_cmp): Delete the last parameter, change char_type_node
5359 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5361 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5362 the inlining expansion on target where the type of the call has same or
5363 narrower precision than unsigned char.
5365 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5367 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5368 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5369 * common.opt (fsave-optimization-record): New option.
5370 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5371 * doc/invoke.texi (-fsave-optimization-record): New option.
5372 * dumpfile.c: Include "optinfo-emit-json.h".
5373 (struct kv_pair): Move to coretypes.h.
5374 (optgroup_options): Make non-static.
5375 (dump_context::end_scope): Call
5376 optimization_records_maybe_pop_dump_scope.
5377 * dumpfile.h (optgroup_options): New decl.
5378 * json.cc: New file.
5380 * optinfo-emit-json.cc: New file.
5381 * optinfo-emit-json.h: New file.
5382 * optinfo.cc: Include "optinfo-emit-json.h".
5383 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5384 (optinfo_enabled_p): Check optimization_records_enabled_p.
5385 (optinfo_wants_inlining_info_p): Likewise.
5386 * optinfo.h: Update comment.
5387 * profile-count.c (profile_quality_as_string): New function.
5388 * profile-count.h (profile_quality_as_string): New decl.
5389 (profile_count::quality): New accessor.
5390 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5391 and optinfo_emit_json_cc_tests.
5392 * selftest.h (selftest::json_cc_tests): New decl.
5393 (selftest::optinfo_emit_json_cc_tests): New decl.
5394 * toplev.c: Include "optinfo-emit-json.h".
5395 (compile_file): Call optimization_records_finish.
5396 (do_compile): Call optimization_records_start.
5397 * tree-ssa-live.c: Include optinfo.h.
5398 (remove_unused_scope_block_p): Retain inlining information if
5399 optinfo_wants_inlining_info_p returns true.
5401 2018-07-20 Richard Biener <rguenther@suse.de>
5404 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5405 to cover -flto-partition=none.
5407 2018-07-20 Martin Liska <mliska@suse.cz>
5409 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5410 (get_decl_source_range): Remove unused function.
5412 2018-07-20 Richard Biener <rguenther@suse.de>
5414 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5415 (struct vn_phi_s): Likewise.
5416 (struct vn_reference_s): Likewise.
5417 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5418 for searching the slot of an entry known to be in the hash itself.
5419 (vn_phi_hasher::equal): Likewise.
5420 (vn_reference_hasher::equal): Likewise.
5421 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5423 (optimistic_info, current_info): Remove, keeping only valid_info.
5424 (vn_reference_lookup_1): Remove fallback lookup.
5425 (vn_reference_lookup_2): Likewise.
5426 (vn_nary_op_lookup_1): Likewise.
5427 (vn_phi_lookup): Likewise.
5428 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5430 (vn_reference_insert): Adjust, chain the inserted hash element
5431 at last_inserted_ref.
5432 (vn_reference_insert_pieces): Likewise.
5433 (visit_reference_op_call): Likewise.
5434 (vn_nary_op_insert_into): Chain the inserted hash element at
5436 (vn_nary_op_insert_pieces): Adjust.
5437 (vn_nary_op_insert): Likewise.
5438 (vn_nary_op_insert_stmt): Likewise.
5439 (vn_phi_insert): Adjust, chain the inserted hash element at
5441 (process_scc): Remove clearing and copying the optimistic
5442 table. Instead remove elements inserted during an optimistic
5443 iteration from the single table we maintain.
5444 (init_scc_vn): Adjust.
5445 (free_scc_vn): Likewise.
5446 (sccvn_dom_walker::record_cond): Likewise.
5447 (sccvn_dom_walker::after_dom_children): Likewise.
5449 2018-07-19 Martin Sebor <msebor@redhat.com>
5451 PR tree-optimization/84047
5452 PR tree-optimization/83776
5453 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5454 (check_array_bounds): Call it.
5456 2018-07-19 Martin Sebor <msebor@redhat.com>
5458 * align.h (align_flags): Use member initialization.
5460 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5462 * Makefile.in (OBJS): Add optinfo.o.
5463 * coretypes.h (class symtab_node): New forward decl.
5464 (struct cgraph_node): New forward decl.
5465 (class varpool_node): New forward decl.
5466 * dump-context.h: New file.
5467 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5469 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5470 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5471 (set_alt_dump_file): Likewise.
5472 (dump_context::~dump_context): New dtor.
5473 (dump_gimple_stmt): Move implementation to...
5474 (dump_context::dump_gimple_stmt): ...this new member function.
5475 Add the stmt to any pending optinfo, creating one if need be.
5476 (dump_gimple_stmt_loc): Move implementation to...
5477 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5478 Start a new optinfo and add the stmt to it.
5479 (dump_gimple_expr): Move implementation to...
5480 (dump_context::dump_gimple_expr): ...this new member function.
5481 Add the stmt to any pending optinfo, creating one if need be.
5482 (dump_gimple_expr_loc): Move implementation to...
5483 (dump_context::dump_gimple_expr_loc): ...this new member function.
5484 Start a new optinfo and add the stmt to it.
5485 (dump_generic_expr): Move implementation to...
5486 (dump_context::dump_generic_expr): ...this new member function.
5487 Add the tree to any pending optinfo, creating one if need be.
5488 (dump_generic_expr_loc): Move implementation to...
5489 (dump_context::dump_generic_expr_loc): ...this new member
5490 function. Add the tree to any pending optinfo, creating one if
5492 (dump_printf): Move implementation to...
5493 (dump_context::dump_printf_va): ...this new member function. Add
5494 the text to any pending optinfo, creating one if need be.
5495 (dump_printf_loc): Move implementation to...
5496 (dump_context::dump_printf_loc_va): ...this new member function.
5497 Start a new optinfo and add the stmt to it.
5498 (dump_dec): Move implementation to...
5499 (dump_context::dump_dec): ...this new member function. Add the
5500 value to any pending optinfo, creating one if need be.
5501 (dump_context::dump_symtab_node): New member function.
5502 (dump_context::get_scope_depth): New member function.
5503 (dump_context::begin_scope): New member function.
5504 (dump_context::end_scope): New member function.
5505 (dump_context::ensure_pending_optinfo): New member function.
5506 (dump_context::begin_next_optinfo): New member function.
5507 (dump_context::end_any_optinfo): New member function.
5508 (dump_context::s_current): New global.
5509 (dump_context::s_default): New global.
5510 (dump_scope_depth): Delete global.
5511 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5512 (dump_symtab_node): New function.
5513 (get_dump_scope_depth): Reimplement in terms of dump_context.
5514 (dump_begin_scope): Likewise.
5515 (dump_end_scope): Likewise.
5516 (selftest::temp_dump_context::temp_dump_context): New ctor.
5517 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5518 (selftest::verify_item): New function.
5519 (ASSERT_IS_TEXT): New macro.
5520 (ASSERT_IS_TREE): New macro.
5521 (ASSERT_IS_GIMPLE): New macro.
5522 (selftest::test_capture_of_dump_calls): New test.
5523 (selftest::dumpfile_c_tests): Call it.
5524 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5525 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5526 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5527 descriptive comment.
5528 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5529 (dump_node, dump_bb): Move these unrelated decls.
5530 (class dump_manager): Add leading comment.
5531 * optinfo.cc: New file.
5532 * optinfo.h: New file.
5534 2018-07-19 Michael Collison <michael.collison@arm.com>
5535 Richard Henderson <rth@redhat.com>
5537 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5538 (subti): Handle op1 zero.
5539 (subvti4, usub4ti4): New.
5540 (*sub<GPI>3_compare1_imm): New.
5541 (sub<GPI>3_carryinCV): New.
5542 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5543 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5545 2018-07-19 Michael Collison <michael.collison@arm.com>
5546 Richard Henderson <rth@redhat.com>
5548 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5549 (addti3): Create simpler code if low part is already known to be 0.
5550 (addvti4, uaddvti4): New.
5551 (*add<GPI>3_compareC_cconly_imm): New.
5552 (*add<GPI>3_compareC_cconly): New.
5553 (*add<GPI>3_compareC_imm): New.
5554 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5555 handle constants within this pattern..
5556 (*add<GPI>3_compareV_cconly_imm): New.
5557 (*add<GPI>3_compareV_cconly): New.
5558 (*add<GPI>3_compareV_imm): New.
5559 (add<GPI>3_compareV): New.
5560 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5561 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5562 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5563 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5564 with 'comparison' operator.
5565 (*add<GPI>3_compareV_cconly_imm): Ditto.
5566 (*add<GPI>3_compareV_cconly): Ditto.
5567 (*add<GPI>3_compareV_imm): Ditto.
5568 (add<GPI>3_compareV): Ditto.
5569 (add<mode>3_carryinC): Ditto.
5570 (*add<mode>3_carryinC_zero): Ditto.
5571 (*add<mode>3_carryinC): Ditto.
5572 (add<mode>3_carryinV): Ditto.
5573 (*add<mode>3_carryinV_zero): Ditto.
5574 (*add<mode>3_carryinV): Ditto.
5576 2018-07-19 Michael Collison <michael.collison@arm.com>
5577 Richard Henderson <rth@redhat.com>
5579 * config/aarch64/aarch64-modes.def (CC_V): New.
5580 * config/aarch64/aarch64-protos.h
5581 (aarch64_addti_scratch_regs): Declare
5582 (aarch64_subvti_scratch_regs): Declare.
5583 (aarch64_expand_subvti): Declare.
5584 (aarch64_gen_unlikely_cbranch): Declare
5585 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5586 for signed overflow using CC_Vmode.
5587 (aarch64_get_condition_code_1): Handle CC_Vmode.
5588 (aarch64_gen_unlikely_cbranch): New function.
5589 (aarch64_addti_scratch_regs): New function.
5590 (aarch64_subvti_scratch_regs): New function.
5591 (aarch64_expand_subvti): New function.
5593 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5595 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5597 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5598 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5601 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5604 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5605 address check not strict.
5607 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5609 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5611 (store_pair_lanes<mode>): Likewise.
5612 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5613 enum value 'ADDR_QUERY_LDP_STP_N'.
5614 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5615 (aarch64_print_address_internal): Add declaration.
5616 (aarch64_print_ldpstp_address): Remove.
5617 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5618 (aarch64_print_operand): Change printing of 'y'.
5619 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5620 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5621 'true' rather than '1'.
5622 * config/aarch64/constraints.md (Uml): Likewise.
5623 (Uml): Rename to Umn.
5626 2018-07-19 Richard Biener <rguenther@suse.de>
5628 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5630 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5631 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5632 (vn_reference_hasher): Likewise.
5633 (struct vn_tables_s): Remove obstack and alloc-pool members.
5634 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5635 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5636 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5637 (vn_reference_insert_pieces): Likewise.
5638 (alloc_vn_nary_op_noinit): Adjust.
5639 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5640 (vn_phi_eq): Adjust.
5641 (shared_lookup_phiargs): Remove.
5642 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5643 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5644 (visit_reference_op_call): Likewise.
5645 (copy_nary, copy_phi, copy_reference): Remove.
5646 (process_scc): Rewind the obstack when iterating. Do not
5647 copy the elements to valid_info but just move them from one
5648 hashtable to the other.
5649 (allocate_vn_table): Adjust.
5650 (free_vn_table): Likewise.
5651 (init_scc_vn): Likewise.
5652 (free_scc_vn): Likewise.
5654 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5657 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5658 indirect_return as function type attribute.
5659 (ix86_attribute_table): Change indirect_return to function
5661 * doc/extend.texi: Update indirect_return attribute.
5663 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5665 * wide-int.h (widest2_int): New.
5666 * gimple-fold.c (arith_overflowed_p): Use it.
5667 * tree.h (widest2_int_cst): New.
5668 * tree-vrp.c (wide_int_binop_overflow): Rename from
5669 vrp_int_const_binop.
5670 Rewrite to work on trees.
5671 (extract_range_from_multiplicative_op_1): Abstract code to...
5672 (wide_int_range_min_max): ...here.
5673 (wide_int_range_cross_product): ...and here.
5674 (extract_range_from_binary_expr_1): Abstract overflow code to...
5675 (wide_int_range_mult_wrapping): ...here.
5676 * tree-vrp.h (wide_int_range_cross_product): New.
5677 (wide_int_range_mult_wrapping): New.
5679 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5680 Julia Koval <julia.koval@intel.com>
5682 * config/i386/x86-tune-costs.h (skylake_memcpy,
5683 skylake_memset): Replace rep_prefix with unrolling for size 512.
5685 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5688 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5689 comparision with EQ_EXPR in last stmt.
5691 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5693 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5694 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5695 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5696 previously known as "PowerPC AltiVec Built-in Functions". Move
5697 some material to new subsubsections "PowerPC AltiVec Built-in
5698 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5700 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5701 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5702 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5703 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5705 2018-07-18 Richard Biener <rguenther@suse.de>
5707 PR tree-optimization/86557
5708 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5711 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5713 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5715 2018-07-17 Jeff Law <law@redhat.com>
5717 * config/arm/arm.c (get_label_padding): Update for recent
5718 changes to label_to_alignment.
5720 PR tree-optimization/86010
5721 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5723 * config/mips/mips.c (vr4130_align_insns): Update for recent
5724 changes to label_to_alignment.
5726 * config/frv/frv.c (frv_label_align): Update for recent changes
5727 to label_to_alignment.
5729 * config/nios2/nios2.c (nios2_label_align): Update for recent
5730 changes which dropped ALIGN_LABELS_LOG.
5732 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5734 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5735 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5737 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5739 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5740 deprecated align_labels_log.
5742 2018-07-17 Richard Biener <rguenther@suse.de>
5745 * dwarf2out.c (init_sections_and_labels): Always generate
5746 a debug_line_str_section for early LTO debug.
5747 (dwarf2out_finish): Reset debug_line_str_hash output early.
5748 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5750 (dwarf2out_early_finish): Output debug_line_str.
5752 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5754 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5755 index register on z196 or later.
5757 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5759 * config/s390/s390.c (s390_default_align): Set default function
5761 (s390_override_options_after_change): Call s390_default align.
5762 (s390_option_override_internal): Call s390_default_align.
5763 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5765 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5768 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5769 to _looptemp_ clauses, other than the first two.
5771 2018-07-17 Martin Liska <mliska@suse.cz>
5773 * opts.c: Do not enable OPT_falign_* for -Os.
5775 2018-07-17 Martin Liska <mliska@suse.cz>
5777 * align.h (MAX_CODE_ALIGN): New.
5778 (MAX_CODE_ALIGN_VALUE): New.
5779 * common/config/i386/i386-common.c (ix86_handle_option):
5780 (MAX_CODE_ALIGN): Moved to align.h.
5781 * final.c (MAX_CODE_ALIGN): Likewise.
5782 * opts.c (parse_and_check_align_values):
5783 (MAX_CODE_ALIGN): Likewise.
5784 (MAX_CODE_ALIGN_VALUE): Likewise.
5786 2018-07-17 Martin Liska <mliska@suse.cz>
5788 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5789 in order to fulfil coding style.
5790 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5791 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5792 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5793 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5794 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5795 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5796 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5797 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5798 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5800 2018-07-17 Martin Liska <mliska@suse.cz>
5802 * align.h: New file.
5803 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5805 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5806 align_flags of label_to_alignment.
5807 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5809 * config/m68k/m68k.c: Do not use removed align_labels_value and
5811 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5812 (LOOP_ALIGN): Likewise.
5813 (LABEL_ALIGN): Likewise.
5814 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5815 Remove not used macro.
5816 (rs6000_loop_align): Change return type to align_flags.
5817 (rs6000_loop_align_max_skip): Remove.
5818 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5819 Change return type to align_flags.
5820 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5821 Remove not used macro.
5822 (rs6000_loop_align): Change return type to align_flags.
5823 (rs6000_loop_align_max_skip): Remove.
5824 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5825 * config/rx/rx-protos.h (rx_align_for_label): Make it
5827 * config/rx/rx.c (rx_align_for_label): Change return type
5829 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5831 into align_flags class.
5832 (LABEL_ALIGN): Likewise.
5833 (LOOP_ALIGN): Likewise.
5834 * config/s390/s390.c (s390_label_align): Use align_flags
5836 (s390_asm_output_function_label): Likewise.
5837 * config/sh/sh.c (sh_override_options_after_change):
5838 Use align_flags class directly without macros.
5839 (find_barrier): Likewise.
5840 (barrier_align): Likewise.
5841 (sh_loop_align): Likewise.
5842 * config/spu/spu.c (spu_option_override):
5843 Use align_flags_tuple::get_value instead of removed macros.
5844 (spu_sched_init): Likewise.
5845 * config/spu/spu.h (GTY): Likewise.
5846 * config/visium/visium.c (visium_option_override):
5847 Set "8" as default secondary alignment.
5848 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5849 in order to guarantee secondary alignment of 8.
5850 * coretypes.h: Include align.h header file.
5851 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5852 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5853 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5854 * doc/tm.texi.in: Likewise.
5855 * final.c (struct label_alignment): Remove not used structure.
5856 (LABEL_ALIGN): Change type to align_flags.
5857 (LOOP_ALIGN): Likewise.
5858 (JUMP_ALIGN): Likewise.
5859 (default_loop_align_max_skip): Remove.
5860 (default_label_align_max_skip): Likewise.
5861 (default_jump_align_max_skip): Likewise.
5862 (default_label_align_after_barrier_max_skip):
5863 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5864 (LABEL_TO_MAX_SKIP): Remove.
5865 (label_to_alignment): Return align_flags type instead of integer.
5866 (label_to_max_skip): Remove.
5867 (align_fuzz): Use align_flags type.
5868 (compute_alignments): Use align_flags type and use align_flags::max
5869 to combine multiple alignments.
5870 (grow_label_align): Grow vec instead of C array.
5871 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5872 (shorten_branches): Use align_flags type and use align_flags::max
5873 to combine multiple alignments.
5874 (final_scan_insn_1): Remove usage of secondary alignment that comes
5875 from label alignment, but instead use proper secondary alignment
5876 which is computed in grow_label_align.
5877 * flags.h (struct align_flags_tuple): Move to align.h.
5878 (struct align_flags): Likewise.
5879 (state_align_loops): Rename to align_loops.
5880 (state_align_jumps): Rename to align_jumps.
5881 (state_align_labels): Rename to align_labels.
5882 (state_align_functions): Rename to align_functions.
5883 (align_loops_log): Remove.
5884 (align_jumps_log): Remove.
5885 (align_labels_log): Remove.
5886 (align_functions_log): Remove.
5887 (align_loops_max_skip): Remove.
5888 (align_jumps_max_skip): Remove.
5889 (align_labels_max_skip): Remove.
5890 (align_functions_max_skip): Remove.
5891 (align_loops_value): Remove.
5892 (align_jumps_value): Remove.
5893 (align_labels_value): Remove.
5894 (align_functions_value): Remove.
5895 * output.h (label_to_alignment): Change return type to align_flags.
5896 (label_to_max_skip): Remove.
5897 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5898 jump_align_max_skip macros.
5899 * targhooks.h (default_loop_align_max_skip): Remove.
5900 (default_label_align_max_skip): Likewise.
5901 (default_jump_align_max_skip): Likewise.
5902 (default_label_align_after_barrier_max_skip): Remove.
5903 * toplev.c (read_log_maxskip): Use ::normalize function.
5904 (parse_N_M): Remove not used argument and also call ::normalize.
5905 (parse_alignment_opts): Do not pass unused arguments.
5906 * varasm.c (assemble_start_function): Use directly align_functions
5907 instead of removed macros.
5908 * system.h: Do not poison removed macros.
5910 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5913 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5914 and cond temporaries don't have reference type if iterator has
5915 pointer type. For init use &for_pre_body instead of pre_p if
5916 for_pre_body is non-empty.
5918 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5920 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5921 double-double modes to SFmode directly directly.
5922 (trunc<mode>sf2_fprs): Delete.
5924 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5926 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5927 for conversions between IFmode and the decimal floating point modes.
5928 (init_float128_ieee): Use the correct names for conversions between
5929 KFmode and the decimal floating point modes.
5931 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5933 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5934 for the conversions between TDmode and IFmode.
5935 (init_float128_ieee): Use more correct names for the conversions
5936 between TDmode and KFmode.
5938 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5940 PR tree-optimization/86526
5941 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5942 (inline_expand_builtin_string_cmp): Likewise.
5943 (inline_string_cmp): Likewise. Use c_readstr instead of
5944 builtin_memcpy_read_str. Add unit_mode temporary.
5946 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5949 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5950 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5952 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5954 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5955 Alphabetize prototypes of built-in functions, separating out
5956 built-in functions that are listed in this section but should be
5957 described elsewhere.
5959 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5962 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5963 conditional move when trapping comparison was split to a
5964 non-trapping one (and vice versa).
5966 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5968 * config/s390/s390.c (s390_function_profiler): Generate nops
5969 instead of profiler call sequences.
5970 * config/s390/s390.opt: Add the new option.
5972 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5974 * config/s390/s390.c (s390_function_profiler): Generate
5975 __mcount_loc section.
5976 * config/s390/s390.opt: Add the new option.
5978 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5980 * common.opt: Add the new warning.
5981 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5982 %r0,__fentry__" when -mfentry is specified.
5983 (s390_option_override_internal): Disallow -mfentry for 31-bit
5985 * config/s390/s390.opt: Add the new option.
5987 2018-07-16 Richard Biener <rguenther@suse.de>
5990 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5991 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5993 2018-07-16 Martin Liska <mliska@suse.cz>
5996 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5999 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6001 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6003 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6005 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6007 * config/arc/arc-cpus.def (hs4x): New cpu.
6009 * config/arc/arc-tables.opt: Regenerate.
6010 * config/arc/arc.c (arc_sched_issue_rate): New function.
6011 (TARGET_SCHED_ISSUE_RATE): Define.
6012 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6013 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6015 (attr tune): Add ARCHS4x tune values.
6016 (attr tune_dspmpy): Define.
6017 (*tst): Correct instruction type.
6018 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6019 * config/arc/arcHS4x.md: New file.
6020 * config/arc/fpu.md: Update instruction type attributes.
6021 * config/arc/t-multilib: Regenerate.
6023 2018-07-16 Tom de Vries <tdevries@suse.de>
6026 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6028 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6030 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6033 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6035 PR tree-optimization/86514
6036 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6037 conversion to a boolean type from a type with greater precision.
6039 2018-07-16 Tom de Vries <tdevries@suse.de>
6041 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6042 dump_flags request TDF_SLIM.
6044 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6046 * fold-const.c (int_const_binop_1): Abstract...
6047 (wide_int_binop): ...wide int code here.
6048 (poly_int_binop): ...poly int code here.
6049 Abstract the rest of int_const_binop_1 into int_const_binop.
6050 * fold-const.h (wide_int_binop): New.
6051 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6052 Remove useless PLUS/MINUS_EXPR case.
6053 (zero_nonzero_bits_from_vr): Move wide int code...
6054 (zero_nonzero_bits_from_bounds): ...here.
6055 (extract_range_from_binary_expr_1): Move mask optimization code...
6056 (range_easy_mask_min_max): ...here.
6057 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6058 (range_easy_mask_min_max): New.
6060 2018-07-15 Jeff Law <law@redhat.com>
6063 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6066 2018-07-14 Jim Wilson <jimw@sifive.com>
6068 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6070 2018-07-14 Paul Koning <ni1d@arrl.net>
6072 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6074 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6076 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6079 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6080 Steve Munroe <munroesj52@gmail.com>
6082 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6083 (_mm_andnot_si128): Likewise.
6084 (_mm_or_si128): Likewise.
6085 (_mm_xor_si128): Likewise.
6087 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6090 * builtins.c (expand_builtin_memcmp): Inline the calls first
6091 when result_eq is false.
6092 (expand_builtin_strcmp): Inline the calls first.
6093 (expand_builtin_strncmp): Likewise.
6094 (inline_string_cmp): New routine. Expand a string compare
6095 call by using a sequence of char comparison.
6096 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6097 a call to str(n)cmp/memcmp.
6098 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6100 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6102 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6104 * config/arm/driver-arm.c: Include arm-native.h.
6105 (host_detect_local_cpu): Use auto-generated data tables.
6106 (vendors, arm_cpu_table): Delete. Move part information to ...
6107 * config/arm/arm-cpus.in: ... here.
6108 * config/arm/parsecpu.awk (gen_native): New function.
6109 (vendor, part): New CPU fields.
6110 (END): Add support for building the native CPU detection tables.
6111 * config/arm/t-arm (arm-native.h): Add build rule.
6112 (driver-arm.o): Add dependency on arm-native.h.
6114 2018-07-13 Richard Biener <rguenther@suse.de>
6117 * match.pd (addr1 - addr2): Allow either of the operand to
6120 2018-07-13 Tom de Vries <tdevries@suse.de>
6122 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6125 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6127 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6128 arrays instead of numbered variables.
6130 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6132 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6133 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6135 2018-07-13 Richard Biener <rguenther@suse.de>
6138 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6139 instead of get_context_die.
6141 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6142 Richard Biener <rguenther@suse.de>
6145 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6146 that the loop latch destination where phi is defined.
6148 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6150 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6151 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6152 (riscv_set_current_function): Extract getting interrupt type to new
6154 (riscv_get_interrupt_type): New function.
6155 (riscv_merge_decl_attributes): New function, checking interrupt type is
6157 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6159 2018-07-12 Paul Koning <ni1d@arrl.net>
6161 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6164 2018-07-12 Paul Koning <ni1d@arrl.net>
6166 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6167 zero reference, add doloop_end instead.
6168 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6169 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6170 detail for doloop_end.
6172 2018-07-12 Martin Sebor <msebor@redhat.com>
6175 * attribs.c (decl_attributes): Reject conflicting attributes before
6176 calling attribute handlers.
6178 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6180 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6182 (gcc::dump_manager::get_dump_file_name): likewise.
6183 (dump_begin): Likewise.
6184 * dumpfile.h (dump_begin): Update prototype.
6185 (gcc::dump_manager::get_dump_file_name,
6186 gcc::dump_manager::get_dump_file_name): Update prototype.
6188 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6190 * internal-fn.h (vectorizable_internal_fn_p): New function.
6191 * tree-vect-slp.c (compatible_calls_p): Likewise.
6192 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6193 to internal functions.
6194 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6196 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6198 * fold-const.h (inverse_conditions_p): Declare.
6199 * fold-const.c (inverse_conditions_p): New function.
6200 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6201 that test the inverse condition of a conditional internal function.
6202 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6203 * internal-fn.c (internal_fn_mask_index): Handle conditional
6205 (vectorized_internal_fn_supported_p): New function.
6206 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6207 (any_pred_load_store): Replace with...
6208 (need_to_predicate): ...this new variable.
6209 (redundant_ssa_names): New variable.
6210 (ifcvt_can_use_mask_load_store): Move initial checks to...
6211 (ifcvt_can_predicate): ...this new function. Handle tree codes
6212 for which a conditional internal function exists.
6213 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6214 instead of ifcvt_can_use_mask_load_store. Update after variable
6216 (predicate_load_or_store): New function, split out from
6217 predicate_mem_writes.
6218 (check_redundant_cond_expr): New function.
6219 (value_available_p): Likewise.
6220 (predicate_rhs_code): Likewise.
6221 (predicate_mem_writes): Rename to...
6222 (predicate_statements): ...this. Use predicate_load_or_store
6223 and predicate_rhs_code.
6224 (combine_blocks, tree_if_conversion): Update after above name changes.
6225 (ifcvt_local_dce): Handle redundant_ssa_names.
6226 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6227 general conditional functions.
6228 * tree-vect-stmts.c (vectorizable_call): Likewise.
6230 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6231 Alan Hayward <alan.hayward@arm.com>
6232 David Sherwood <david.sherwood@arm.com>
6234 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6235 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6236 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6237 plus and minus and convert them into IFN_COND_FMA-based sequences.
6238 (convert_mult_to_fma): Handle conditional plus and minus.
6240 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6242 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6243 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6244 (cond_fnms_optab): New optabs.
6245 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6247 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6248 * internal-fn.h (get_conditional_internal_fn): Declare.
6249 (get_unconditional_internal_fn): Likewise.
6250 * internal-fn.c (cond_ternary_direct): New macro.
6251 (expand_cond_ternary_optab_fn): Likewise.
6252 (direct_cond_ternary_optab_supported_p): Likewise.
6253 (FOR_EACH_COND_FN_PAIR): Likewise.
6254 (get_conditional_internal_fn): New function.
6255 (get_unconditional_internal_fn): Likewise.
6256 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6257 (gimple_match_op::gimple_match_op): Add a new overload for 5
6259 (gimple_match_op::set_op): Likewise.
6260 (gimple_resimplify5): Declare.
6261 * genmatch.c (decision_tree::gen): Generate simplifications for
6263 * gimple-match-head.c (gimple_simplify): Define an overload for
6264 5 operands. Handle calls with 5 arguments in the top-level overload.
6265 (convert_conditional_op): Handle conversions from unconditional
6266 internal functions to conditional ones.
6267 (gimple_resimplify5): New function.
6268 (build_call_internal): Pass a fifth operand.
6269 (maybe_push_res_to_seq): Likewise.
6270 (try_conditional_simplification): Try converting conditional
6271 internal functions to unconditional internal functions.
6272 Handle 3-operand unconditional forms.
6273 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6274 Define ternary equivalents of the current rules for binary conditional
6276 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6278 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6279 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6280 (optab): Handle them.
6281 (SVE_COND_FP_TERNARY): New int iterator.
6282 (sve_fmla_op, sve_fmad_op): New int attributes.
6283 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6284 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6285 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6287 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6289 * target.def (preferred_else_value): New target hook.
6290 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6291 * doc/tm.texi: Regenerate.
6292 * targhooks.h (default_preferred_else_value): Declare.
6293 * targhooks.c (default_preferred_else_value): New function.
6294 * internal-fn.h (conditional_internal_fn_code): Declare.
6295 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6296 (get_conditional_internal_fn): Use it.
6297 (conditional_internal_fn_code): New function.
6298 * gimple-match.h (gimple_match_cond): New struct.
6299 (gimple_match_op): Add a cond member function.
6300 (gimple_match_op::gimple_match_op): Update all forms to take a
6302 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6303 for the suboperation, but don't specify a particular else_value.
6304 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6305 (visit_nary_op, visit_reference_op_load): Pass
6306 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6307 * gimple-match-head.c: Include tree-eh.h
6308 (convert_conditional_op): New function.
6309 (maybe_resimplify_conditional_op): Likewise.
6310 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6311 (gimple_resimplify2): Likewise.
6312 (gimple_resimplify3): Likewise.
6313 (gimple_resimplify4): Likewise.
6314 (maybe_push_res_to_seq): Return null for conditional operations.
6315 (try_conditional_simplification): New function.
6316 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6318 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6320 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6322 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6324 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6326 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6328 (hash_tree): Do not hash DECL_FCONTEXT
6329 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6330 Do not stream DECL_FCONTEXT.
6331 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6332 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6334 2018-07-12 Richard Biener <rguenther@suse.de>
6337 * dwarf2out.c (gen_block_die): Only output blocks when they have
6338 at least one !DECL_IGNORED_P variable.
6340 2018-07-12 Richard Biener <rguenther@suse.de>
6343 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6344 Remove -mieee-fp handling.
6346 2018-07-12 Richard Biener <rguenther@suse.de>
6348 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6349 left-over from last patch.
6351 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6353 PR tree-optimization/86492
6354 * gimple-ssa-store-merging.c
6355 (imm_store_chain_info::coalesce_immediate_stores): Call
6356 check_no_overlap even for the merge_overlapping case. Formatting fix.
6358 2018-07-12 Richard Biener <rguenther@suse.de>
6361 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6362 move possibly trapping operations into the conditional.
6364 2018-07-12 Richard Biener <rguenther@suse.de>
6366 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6367 (vn_lookup_simplify_result): Remove recursion limit applied
6369 (vn_nary_build_or_lookup_1): Adjust.
6370 (try_to_simplify): Likewise.
6371 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6373 (gimple_resimplify2): Likewise.
6374 (gimple_resimplify3): Likewise.
6375 (gimple_resimplify4): Likewise.
6377 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6379 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6380 Use __mmask64 type instead of __mmask8 for __M argument.
6381 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6382 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6384 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6385 __mmask16 for __M argument.
6386 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6387 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6388 to __mmask16 instead of __mmask8.
6389 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6390 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6391 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6392 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6393 instead of __mmask16 for __U argument.
6394 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6395 __mmask16 instead of __mmask8 for __U argument.
6396 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6398 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6400 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6402 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6404 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6406 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6408 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6410 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6412 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6414 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6416 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6417 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6418 return type as well as __M argument type and all casts from __mmask8
6420 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6421 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6422 return type as well as __M argument type and all casts from __mmask8
6424 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6425 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6426 return type as well as __M argument type and all casts from __mmask8
6428 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6429 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6430 return type as well as __M argument type and all casts from __mmask8
6432 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6433 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6436 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6438 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6439 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6442 2018-07-11 Paul Koning <ni1d@arrl.net>
6444 * doc/md.texi (define_subst): Document how multiple occurrences of
6445 the same argument in the replacement pattern are handled.
6447 2018-07-11 Paul Koning <ni1d@arrl.net>
6449 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6451 (Common Type Attributes): Add "mode" attribute.
6453 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6455 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6456 stream DECL_ORIGINAL_TYPE.
6457 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6458 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6459 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6460 Do not walk original type.
6461 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6463 (write_ts_decl_non_common_tree_pointers): Do not stream
6465 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6466 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6468 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6470 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6471 thread twice from the same starting edge.
6473 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6475 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6476 * gimple.c (gimple_call_nonnull_result_p): ...here...
6477 (gimple_call_nonnull_arg): ...and here.
6478 * gimple.h (gimple_call_nonnull_result_p): New.
6479 (gimple_call_nonnull_arg): New.
6481 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6483 * config/arm/arm-cpus.in: Move information from fpu field of each
6484 cpu definition to the isa field.
6485 * config/arm/parsecpu.awk (fpu): Delete match rule.
6486 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6488 2018-07-11 Richard Biener <rguenther@suse.de>
6491 * dwarf2out.c (init_sections_and_labels): Use
6492 output_asm_line_debug_info consistently.
6493 (dwarf2out_early_finish): Likewise.
6494 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6497 2018-07-11 Richard Biener <rguenther@suse.de>
6499 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6500 Rework father_bb setting in a way to avoid propagating constants
6501 multiple times on a loop body.
6503 2018-07-10 Mark Wielaard <mark@klomp.org>
6506 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6508 2018-07-10 Richard Biener <rguenther@suse.de>
6510 * hash-map.h (hash_map::iterator::operator*): Return
6511 references to key and value.
6513 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6516 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6517 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6518 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6519 (gimplify_omp_for): For composite loops, move outer
6520 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6521 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6522 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6523 TREE_LIST for both the original class iterator and the "last" helper
6524 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6525 loop, remember has_decl_expr from outer composite loops for the
6526 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6528 2018-07-09 Martin Sebor <msebor@redhat.com>
6532 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6533 accessing implicitly initialized array elements.
6534 * expr.c (string_constant): Handle string initializers of
6535 character arrays within aggregates.
6536 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6537 Store element offset. As a special case, handle zero size.
6538 (fold_nonarray_ctor_reference): Same.
6539 (fold_ctor_reference): Add argument. Store subobject offset.
6540 * gimple-fold.h (fold_ctor_reference): Add argument.
6542 2018-07-09 Paul Koning <ni1d@arrl.net>
6544 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6545 (pdp11_insn_cost): New function.
6546 (pdp11_md_asm_adjust): New function.
6547 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6548 (pdp11_rtx_costs): Update to match machine better.
6549 (output_addr_const_pdp11): Correct format mismatch warnings.
6550 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6551 * config/pdp11/pdp11.md: General change to add base_cost and/or
6552 length attributes for use by new pdp11_insn_cost function.
6553 (MIN_BRANCH): Correct definition.
6555 (doloop_end): Use standard pattern name for looping pattern.
6556 (doloop_end_nocc): New.
6557 (movsf): Add another constraint alternative.
6558 (zero_extendqihi2): Add constraint alternatives for not in place
6560 (zero_extendhisi2): Remove.
6561 (shift patterns): Add CC handling variants.
6565 (define_peephole2): New peephole to recognize mov that sets CC for
6568 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6570 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6571 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6574 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6577 * real.c (real_nextafter): Return true if result is denormal.
6579 2018-07-09 Martin Liska <mliska@suse.cz>
6581 * common.opt: Add back wrongly removed attribute.
6583 2018-07-09 Richard Biener <rguenther@suse.de>
6586 * dwarf2out.c (gen_block_die): For an early generated DIE
6587 always output high/low PC attributes.
6589 2018-07-09 Tom de Vries <tdevries@suse.de>
6591 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6592 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6593 onto VAR_DECL with abstract origin.
6595 2018-07-07 Jim Wilson <jimw@sifive.com>
6597 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6599 2018-07-07 Tom de Vries <tdevries@suse.de>
6601 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6603 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6605 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6607 (combine_bound): Use wide-int overflow calculation instead of
6609 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6611 * fold-const.c (int_const_binop_2): Same.
6612 (extract_muldiv_1): Same.
6613 (fold_div_compare): Same.
6614 (fold_abs_const): Same.
6616 * poly-int.h (add): Same.
6620 * predict.c (predict_iv_comparison): Same.
6621 * profile-count.c (slow_safe_scale_64bit): Same.
6622 * simplify-rtx.c (simplify_const_binary_operation): Same.
6623 * tree-chrec.c (tree_fold_binomial): Same.
6624 * tree-data-ref.c (split_constant_offset_1): Same.
6625 * tree-if-conv.c (idx_within_array_bound): Same.
6626 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6627 * tree-ssa-phiopt.c (minmax_replacement): Same.
6628 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6629 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6630 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6631 * wide-int.cc (wi::add_large): Same.
6632 (wi::mul_internal): Same.
6633 (wi::sub_large): Same.
6634 (wi::divmod_internal): Same.
6635 * wide-int.h: Change overflow type to overflow_type for neg, add,
6636 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6637 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6638 mul_internal, divmod_internal.
6639 (overflow_type): New enum.
6640 (accumulate_overflow): New.
6642 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6644 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6645 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6647 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6649 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6650 argument is checked for zero before entering loop, avoid checking again.
6652 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6654 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6655 * gimplify.h (generic_expr_could_trap_p): Likwise.
6656 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6658 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6660 PR tree-optimization/86401
6661 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6662 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6663 (fold_bit_and_mask): ... here. New helper function for match.pd.
6664 * fold-const.h (fold_bit_and_mask): Declare.
6665 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6667 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6670 * target.def (translate_mode_attribute): New hook.
6671 * targhooks.h (default_translate_mode_attribute): Declare.
6672 * targhooks.c (default_translate_mode_attribute): New function.
6673 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6674 * doc/tm.texi: Regenerate.
6675 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6676 (rs6000_translate_mode_attribute): New function.
6678 2018-07-06 Paul Koning <ni1d@arrl.net>
6680 * doc/md.texi (define_split): Document DONE and FAIL.
6681 (define_peephole2): Ditto.
6683 2018-07-05 Jeff Law <law@redhat.com>
6685 PR tree-optimization/86010
6686 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6687 both the head and tail of mem* and str* calls.
6689 2018-07-05 Jim Wilson <jimw@sifive.com>
6691 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6693 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6695 * config/aarch64/aarch64-simd.md: correct flags text for
6696 MIN_EXPR replacement.
6698 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6700 * configure: Regenerated.
6702 2018-07-05 Carl Love <cel@us.ibm.com>
6704 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6705 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6706 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6707 VSX_BUILTIN_DOUBLEL_V4SF.
6709 2018-07-05 Martin Sebor <msebor@redhat.com>
6712 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6713 than its domain to compute its the upper bound of a char array.
6715 2018-07-05 Nathan Sidwell <nathan@acm.org>
6717 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6718 * doc/cpp.texi: Update comment.
6719 * doc/tm.texi: Rebuilt.
6720 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6721 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6722 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6723 headers affected by extern "C".
6724 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6725 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6726 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6727 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6728 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6729 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6730 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6731 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6732 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6733 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6734 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6735 config/sparc/sp64-elf.h, config/spu/spu.h,
6736 config/stormy16/stormy16.h, config/v850/v850.h,
6737 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6738 define NO_IMPLICIT_EXTERN_C.
6739 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6741 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6744 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6745 instead of GET_MODE_SIZE when comparing Units.
6747 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6750 * rtlanal.c (set_noop_p): Constrain on mode change,
6751 include hard-reg-set.h
6753 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6755 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6757 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6760 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6763 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6765 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6767 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6770 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6772 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6774 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6777 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6779 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6781 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6782 neg_*_op* variables.
6784 2018-07-04 Martin Liska <mliska@suse.cz>
6786 * tree-switch-conversion.c: Define
6787 max_ratio_for_speed and max_ratio_for_size constants.
6789 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6790 Martin Liska <mliska@suse.cz>
6795 * common.opt: Rename align options with 'str_' prefix.
6796 * common/config/i386/i386-common.c (set_malign_value): New
6798 (ix86_handle_option): Use it to set -falign-* options/
6799 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6800 type from int to string.
6801 * config/aarch64/aarch64.c: Update default values from int
6803 * config/alpha/alpha.c (alpha_override_options_after_change):
6805 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6806 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6807 max skip conditionally.
6808 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6809 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6810 max skip conditionally.
6811 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6812 max skip conditionally.
6813 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6814 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6815 max skip conditionally.
6816 * config/i386/i386.c (struct ptt): Change type from int to
6818 (ix86_default_align): Set default values.
6819 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6820 max skip conditionally.
6821 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6822 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6823 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6824 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6825 max skip conditionally.
6826 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6827 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6828 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6829 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6830 max skip conditionally.
6831 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6832 * config/ia64/ia64.c (ia64_option_override): Set default values
6833 for alignment options.
6834 * config/m68k/m68k.c: Handle new str_align_* options.
6835 * config/mips/mips.c (mips_set_compression_mode): Change
6837 (mips_option_override): Set default values for options.
6838 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6840 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6842 * config/rx/rx.c (rx_option_override): Likewise.
6843 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6844 (LABEL_ALIGN): Use align_labels_log.
6845 (LOOP_ALIGN): Use align_loops_align.
6846 * config/s390/s390.c (s390_asm_output_function_label): Use new
6848 * config/sh/sh.c (sh_override_options_after_change):
6849 Change type of constants.
6850 * config/spu/spu.c (spu_sched_init): Likewise.
6851 * config/sparc/sparc.c (sparc_option_override): Set default
6853 * config/visium/visium.c (visium_option_override): Likewise.
6854 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6855 emit p2align format with last argument if it's not needed.
6856 * doc/invoke.texi: Document extended format of -falign-*.
6857 * final.c: Use align_labels alignment.
6858 * flags.h (struct target_flag_state): Change type to use
6860 (struct align_flags_tuple): New.
6861 (struct align_flags): Likewise.
6862 (align_loops_log): Redefine macro to use new types.
6863 (align_loops_max_skip): Redefine macro to use new types.
6864 (align_jumps_log): Redefine macro to use new types.
6865 (align_jumps_max_skip): Redefine macro to use new types.
6866 (align_labels_log): Redefine macro to use new types.
6867 (align_labels_max_skip): Redefine macro to use new types.
6868 (align_functions_log): Redefine macro to use new types.
6869 (align_loops): Redefine macro to use new types.
6870 (align_jumps): Redefine macro to use new types.
6871 (align_labels): Redefine macro to use new types.
6872 (align_functions): Redefine macro to use new types.
6873 (align_functions_max_skip): Redefine macro to use new types.
6874 (align_loops_value): New macro.
6875 (align_jumps_value): New macro.
6876 (align_labels_value): New macro.
6877 (align_functions_value): New macro.
6878 * function.c (invoke_set_current_function_hook): Propagate
6879 alignment values from flags to global variables default in
6881 * ipa-icf.c (sem_function::equals_wpa): Use
6882 cl_optimization_option_eq instead of memcmp.
6883 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6885 (cl_optimization_stream_in): Likewise.
6886 * optc-save-gen.awk: Support strings in cl_optimization.
6887 * opth-gen.awk: Likewise.
6888 * opts.c (finish_options): Remove error checking of invalid
6890 (MAX_CODE_ALIGN): Remove.
6891 (MAX_CODE_ALIGN_VALUE): Likewise.
6892 (parse_and_check_align_values): New function.
6893 (check_alignment_argument): Likewise.
6894 (common_handle_option): Use check_alignment_argument.
6895 * opts.h (parse_and_check_align_values): Declare.
6896 * toplev.c (init_alignments): Remove.
6897 (read_log_maxskip): New.
6898 (parse_N_M): Likewise.
6899 (parse_alignment_opts): Likewise.
6900 (backend_init_target): Remove usage of init_alignments.
6901 * toplev.h (parse_alignment_opts): Declare.
6902 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6904 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6905 * tree.c (cl_option_hasher::equal): New.
6906 * varasm.c: Use new global macros.
6908 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6910 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6911 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6912 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6913 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6914 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6915 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6916 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6917 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6918 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6919 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6920 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6921 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6922 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6924 2018-07-04 Martin Liska <mliska@suse.cz>
6925 Jonathan Wakely <jwakely@redhat.com>
6927 * coverage.c: Use correct type.
6928 * doc/invoke.texi: Language correction.
6930 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6933 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6934 ENDBRANCH for non-tail call which may return via indirect branch.
6935 * doc/extend.texi: Document indirect_return attribute.
6937 2018-07-03 Martin Sebor <msebor@redhat.com>
6939 PR tree-optimization/86274
6940 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6942 (format_floating): Correct handling of infinities and NaNs.
6944 2018-07-03 Martin Sebor <msebor@redhat.com>
6946 * print-tree.c (print_real_cst): New function.
6947 (print_node_brief): Call it.
6948 (print_node): Ditto.
6950 2018-07-03 Jeff Law <law@redhat.com>
6952 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6953 into a single pattern.
6955 * config/h8300/h8300.md (ors code_iterator): New.
6956 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6957 a single pattern and single splitter.
6958 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6959 (iorqi3_1, xorqi3_1): Likewise.
6960 (iorqi3, xorqi3 expanders): Similarly.
6962 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6963 (movmd_internal) into a single pattern using the P mode iterator.
6964 (movmd splitters): Similarly.
6965 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6966 (movsd splitters): Similarly.
6968 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6969 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6970 right table based on the size of the operand.
6971 * config/h8300/h8300.md (length_table): Corresponding changes. All
6972 references to "addb", "addw" and "addl" changed to "add".
6973 (btst patterns): Merge two variants into a single pattern.
6974 (tstqi, tsthi): Likewise.
6975 (addhi3_incdec, addsi3_incdec): Likewise.
6976 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6977 (mulhi3, mulsi3): Likewise.
6978 (udivhi3, udivsi3): Likewise.
6979 (divhi3, divsi3): Likewise.
6980 (andorqi3, andorhi3, andorsi3): Likewise.
6982 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6985 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6986 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6988 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6990 PR tree-optimization/85694
6991 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6992 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6994 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6995 (<u>avg<mode>3_ceil): New patterns.
6997 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6999 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7000 scan-tree-dump directive.
7001 * gcc.dg/vect/slp-perm-2.c: Likewise.
7002 * gcc.dg/vect/slp-perm-3.c: Likewise.
7003 * gcc.dg/vect/slp-perm-5.c: Likewise.
7004 * gcc.dg/vect/slp-perm-6.c: Likewise.
7005 * gcc.dg/vect/slp-perm-7.c: Likewise.
7006 * gcc.dg/vect/slp-perm-8.c: Likewise.
7008 2018-07-03 Marek Polacek <polacek@redhat.com>
7011 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7013 2018-07-03 Richard Biener <rguenther@suse.de>
7016 * tree-ssa-structalias.c (find_func_clobbers): Properly
7017 handle indirect calls.
7019 2018-07-03 Jeff Law <law@redhat.com>
7021 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7022 (shifts): New code iterator.
7023 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7024 expander. Fix HImode handling on H8/SX.
7025 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7026 (subqi3, subhi3, subsi3 expanders): Likewise.
7027 (andqi3, andhi3, andsi3 expanders): Likewise.
7028 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7029 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7030 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7031 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7032 (zero_extendqihi2, zero_extendqisi2): Likewise.
7033 (extendqihi2, extendqisi2): Likewise.
7034 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7035 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7036 (rotlqi3_1, rotlhi3_1): Likewise.
7037 (logicalhi3_sn, logicalsi3_sn): Likewise.
7038 (logicalhi3, logicalsi3): Likewise.
7040 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7042 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7043 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7044 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7045 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7046 type to append_pattern_def_seq instead of creating a stmt_vec_info
7048 (build_mask_conversion): Likewise. Remove vinfo argument.
7049 (vect_add_conversion_to_patterm): Likewise, renaming to...
7050 (vect_add_conversion_to_pattern): ...this.
7051 (vect_recog_mask_conversion_pattern): Update call to
7052 build_mask_conversion. Pass the vector type to
7053 append_pattern_def_seq here too.
7054 (vect_recog_gather_scatter_pattern): Update call to
7055 vect_add_conversion_to_pattern.
7057 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7059 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7060 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7061 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7062 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7063 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7064 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7065 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7066 append_pattern_def_seq instead of new_pattern_def_seq.
7067 (vect_recog_divmod_pattern): Do both of the above.
7068 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7071 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7073 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7074 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7075 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7076 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7077 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7078 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7079 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7080 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7081 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7082 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7083 parameter with a single stmt_vec_info.
7084 (vect_recog_func_ptr): Likewise.
7085 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7086 (vect_try_gather_scatter_pattern): ...this.
7087 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7088 the stmt_vec_info of the statement to be matched. Don't clear
7089 STMT_VINFO_RELATED_STMT.
7090 (vect_pattern_recog): Update call accordingly.
7092 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7094 PR tree-optimization/85694
7095 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7096 (uavgM3_ceil): Document new optabs.
7097 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7098 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7100 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7101 (savg_ceil_optab): New optabs.
7102 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7103 (vect_vect_recog_func_ptrs): Add it.
7104 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7105 constant directly from the associated lhs.
7107 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7109 * tree-vect-patterns.c (vect_split_statement): New function.
7110 (vect_convert_input): Use it to try to split an existing cast.
7112 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7114 * poly-int.h (print_hex): New function.
7115 * dumpfile.h (dump_dec, dump_hex): Declare.
7116 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7117 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7118 min_input_precision, operation_precision and operation_sign.
7119 * tree-vect-patterns.c (vect_get_range_info): New function.
7120 (vect_same_loop_or_bb_p, vect_single_imm_use)
7121 (vect_operation_fits_smaller_type): Delete.
7122 (vect_look_through_possible_promotion): Add an optional
7123 single_use_p parameter.
7124 (vect_recog_over_widening_pattern): Rewrite to use new
7125 stmt_vec_info infomration. Handle one operation at a time.
7126 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7127 (vect_truncatable_operation_p, vect_set_operation_type)
7128 (vect_set_min_input_precision): New functions.
7129 (vect_determine_min_output_precision_1): Likewise.
7130 (vect_determine_min_output_precision): Likewise.
7131 (vect_determine_precisions_from_range): Likewise.
7132 (vect_determine_precisions_from_users): Likewise.
7133 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7134 (vect_vect_recog_func_ptrs): Put over_widening first.
7136 (vect_pattern_recog): Call vect_determine_precisions.
7138 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7140 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7141 statements that have been replaced by further pattern statements.
7142 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7144 2018-07-03 Richard Biener <rguenther@suse.de>
7146 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7147 always set *dt. Dump vectype in vectype overload.
7148 * dumpfile.h (dump_gimple_expr): New function.
7149 (dump_gimple_expr_loc): Likewise.
7150 * dumpfile.c (dump_gimple_expr): New function.
7151 (dump_gimple_expr_loc): Likewise.
7153 2018-07-02 Jeff Law <law@redhat.com>
7155 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7156 the H8/300, H8/300H and H8/S variants into a single pattern.
7157 (movhi_h8300, movqi_h8300hs): Similarly.
7158 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7159 (QHI mode iterator): New.
7161 * config/h8300/h8300.md: Remove trailing whitespace.
7163 2018-07-02 Jim Wilson <jimw@sifive.com>
7165 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7166 instead of emit_insn for interrupt returns.
7167 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7168 (riscv_sret, riscv_uret): Likewise.
7170 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7172 * pretty-print.c (selftest::test_pp_format): Move save and restore
7173 of quotes to class auto_fix_quotes, and add an instance.
7174 * selftest.c: Include "intl.h".
7175 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7176 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7177 * selftest.h (selftest::auto_fix_quotes): New class.
7179 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7181 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7182 (aarch64_sve_prepare_conditional_op): Remove.
7183 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7184 Allow aarch64_simd_reg_or_zero as select operand; remove
7185 the aarch64_sve_prepare_conditional_op call.
7186 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7187 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7188 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7189 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7190 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7191 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7192 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7193 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7194 and a splitters to match all of the *_any patterns.
7195 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7197 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7198 (SVE_COND_FP_BINARY_REV): Remove.
7199 (sve_int_op_rev, sve_fp_op_rev): New.
7200 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7201 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7202 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7203 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7204 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7205 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7206 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7207 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7208 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7210 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7211 Remove match_dup 1 from the inner unspec.
7212 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7214 * config/aarch64/aarch64.md (movprfx): New attr.
7215 (length): Default movprfx to 8.
7216 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7217 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7218 (*<su>mul<SVE_I>3_highpart): Likewise.
7219 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7220 (*v<ASHIFT><SVE_I>3): Likewise.
7221 (*<su><MAXMIN><SVE_I>3): Likewise.
7222 (*<su><MAXMIN><SVE_F>3): Likewise.
7223 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7224 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7225 (*div<SVE_F>4): Likewise.
7227 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7229 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7232 2018-07-02 Richard Biener <rguenther@suse.de>
7234 PR tree-optimization/86363
7235 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7236 memset argument refers to a non-variable address.
7238 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7240 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7241 {PLUS,MINUS}_EXPR code to...
7242 (adjust_symbolic_bound): ...here,
7243 (combine_bound): ...here,
7244 (set_value_range_with_overflow): ...and here.
7246 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7248 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7250 (extract_range_from_abs_expr): ...here.
7252 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7254 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7255 -fno-omit-frame-pointer when not optimizing.
7257 2018-07-02 Martin Liska <mliska@suse.cz>
7260 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7261 (propagate_nothrow): Likewise.
7263 2018-07-02 Martin Liska <mliska@suse.cz>
7266 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7268 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7270 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7271 function in r262149, changing "loc" param from source_location to
7272 const dump_location_t &.
7273 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7274 declaration, as above.
7276 2018-07-01 Paul Koning <ni1d@arrl.net>
7278 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7279 -munit-asm, -mgnu-asm, -mdec-asm.
7280 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7281 (pdp11_output_labelref): New.
7282 (pdp11_output_def): New.
7283 (pdp11_output_addr_vec_elt): New.
7284 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7285 %# and %@ format codes.
7286 (pdp11_option_override): New.
7287 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7288 (pdp11_output_ident): New.
7289 (pdp11_asm_named_section): New.
7290 (pdp11_asm_init_sections): New.
7291 (pdp11_file_start): New.
7292 (pdp11_file_end): New.
7293 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7294 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7295 %o, like %c but octal.
7296 (pdp11_option_override): New.
7297 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7299 (DATA_SECTION_ASM_OP): Ditto.
7300 (READONLY_DATA_SECTION_ASM_OP): New.
7301 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7302 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7303 (ASM_OUTPUT_LABELREF): Ditto.
7304 (ASM_OUTPUT_DEF): Ditto.
7305 (ASM_OUTPUT_EXTERNAL): New.
7306 (ASM_OUTPUT_SOURCE_FILENAME): New.
7307 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7308 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7309 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7310 %# and %@ format codes.
7311 * config/pdp11/pdp11.opt (mgnu-asm): New.
7312 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7313 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7314 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7316 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7318 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7319 dereferencing path[] beyond its length.
7321 (debug_all_paths): New.
7322 (rewire_first_differing_edge): New.
7323 (adjust_paths_after_duplication): New.
7324 (duplicate_thread_path): Call adjust_paths_after_duplication.
7326 (thread_through_all_blocks): Add new argument to
7327 duplicate_thread_path.
7329 2018-06-30 Jim Wilson <jimw@sifive.com>
7331 * config/riscv/predicates.md (p2m1_shift_operand): New.
7332 (high_mask_shift_operand): New.
7333 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7334 pattern using p2m1_shift_operand.
7335 (lshsi3_zero_extend_3+2): New combiner pattern using
7336 high_mask_shift_operand.
7338 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7340 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7342 (vect_recog_rotate_pattern): ...here.
7343 (vect_convert_input): Try to insert casts of invariants in the
7345 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7346 preheader to be empty.
7348 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7350 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7351 vector type. If given, install it in the new statement's
7353 (vect_element_precision): New function.
7354 (vect_unpromoted_value): New struct.
7355 (vect_unpromoted_value::vect_unpromoted_value): New function.
7356 (vect_unpromoted_value::set_op): Likewise.
7357 (vect_look_through_possible_promotion): Likewise.
7358 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7359 (vect_widened_op_tree, vect_convert_input): Likewise.
7360 (vect_convert_inputs, vect_convert_output): Likewise.
7361 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7362 to handle the optional cast of the multiplication result and
7363 vect_widened_op_tree to detect the widened multiplication itself.
7364 Do not require the input and output of promotion casts to have
7365 the same sign, but base the signedness of the operation on the
7366 input rather than the result. If the pattern includes two
7367 promotions, check that those promotions have the same sign.
7368 Do not restrict the MULT_EXPR handling to a double-width result;
7369 handle quadruple-width results and wider. Use vect_convert_inputs
7370 to convert the inputs to the common type.
7371 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7372 to handle the optional cast of the ABS result. Also allow a sign
7373 change or a sign extension between the ABS and MINUS.
7374 Use vect_widened_op_tree to detect the widened subtraction and use
7375 vect_convert_inputs to convert the inputs to the common type.
7376 (vect_handle_widen_op_by_const): Delete.
7377 (vect_recog_widen_op_pattern): New function.
7378 (vect_recog_widen_mult_pattern): Use it.
7379 (vect_recog_widen_shift_pattern): Likewise.
7380 (vect_recog_widen_sum_pattern): Use
7381 vect_look_through_possible_promotion to handle the promoted
7384 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7386 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7387 the containing gimple_seq *.
7388 * gimple-iterator.h (gsi_for_stmt): Declare it.
7389 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7390 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7391 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7392 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7393 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7395 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7397 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7398 statement being replaced is part of an existing pattern
7399 definition sequence, inserting the new pattern statements before
7401 (vect_pattern_recog_1): Don't return a bool. If the statement
7402 is already part of a pattern, instead apply pattern matching
7403 to the pattern definition statements. Don't clear the
7404 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7405 (vect_pattern_recog): Don't break after the first match;
7406 continue processing the pattern definition statements instead.
7407 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7409 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7411 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7412 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7413 (vect_recog_widen_sum_pattern): Use it.
7415 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7417 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7418 phi is not a pattern statement and has not been replaced by
7419 a pattern statement.
7420 * tree-vect-patterns.c (type_conversion_p): Don't check
7421 STMT_VINFO_IN_PATTERN_P.
7422 (vect_recog_vector_vector_shift_pattern): Likewise.
7423 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7424 the pattern statement rather than the original statement; check
7425 directly for a WIDEN_MULT_EXPR here.
7426 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7427 vect_is_simple_use to return the pattern statement rather
7428 than the original statement; use is_pattern_stmt_p to check
7429 for such a pattern statement.
7430 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7431 to return the pattern statement rather than the original statement;
7432 don't do the same transformation here.
7433 (vect_is_simple_use): If the defining statement has been replaced
7434 by a pattern statement, return the pattern statement instead.
7435 Remove the corresponding (local) transformation from the vectype
7438 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7440 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7441 end and default to null.
7442 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7443 (vectorizable_reduction): Update calls accordingly, dropping the
7444 gimple ** argument if the passed-back statement isn't needed.
7445 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7446 (vect_recog_rotate_pattern): Likewise.
7447 (vect_recog_mask_conversion_pattern): Likewise.
7448 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7449 (vect_mask_constant_operand_p): Likewise.
7450 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7451 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7452 (get_group_load_store_type, get_load_store_type): Likewise.
7453 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7454 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7455 (vectorizable_conversion, vectorizable_assignment): Likewise.
7456 (vectorizable_shift, vectorizable_operation): Likewise.
7457 (vectorizable_store, vect_is_simple_cond): Likewise.
7458 (vectorizable_condition, vectorizable_comparison): Likewise.
7459 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7460 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7461 and move it to the end. Cope with null def_stmt_outs.
7463 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7465 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7467 2018-06-29 Jeff Law <law@redhat.com>
7469 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7470 displacements for TARGET_V850E2V3 and newer.
7471 (TARGET_LRA_P): Remove. Defaults to LRA now.
7472 * config/v850/v850.md (sign23byte_load): Remove.
7473 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7474 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7476 2018-06-29 Martin Liska <mliska@suse.cz>
7479 * coverage.c (coverage_init): Mangle full path name.
7480 * doc/invoke.texi: Document the change.
7481 * gcov-io.c (mangle_path): New.
7482 * gcov-io.h (mangle_path): Likewise.
7483 * gcov.c (mangle_name): Use mangle_path for path mangling.
7485 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7487 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7488 if starting source register is not even.
7490 2018-06-29 Martin Liska <mliska@suse.cz>
7492 PR tree-optimization/86263
7493 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7494 Make edge redirection.
7496 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7498 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7499 (dump_scope_depth): New variable.
7500 (get_dump_scope_depth): New function.
7501 (dump_begin_scope): New function.
7502 (dump_end_scope): New function.
7503 * dumpfile.h (get_dump_scope_depth): New declaration.
7504 (dump_begin_scope): New declaration.
7505 (dump_end_scope): New declaration.
7506 (class auto_dump_scope): New class.
7507 (AUTO_DUMP_SCOPE): New macro.
7508 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7511 2018-06-29 Richard Biener <rguenther@suse.de>
7513 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7514 compute_all_dependences succeeds.
7515 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7516 exceed --param loop-max-datarefs-for-datadeps.
7518 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7520 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7522 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7525 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7526 alternative 0 in preferred_for_speed attribute.
7528 2018-06-28 Paul Koning <ni1d@arrl.net>
7530 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7531 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7532 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7533 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7534 for shift insn patterns.
7536 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7538 * cgraph.c (cgraph_node::get_body): Replace assignments to
7539 "dump_file" with calls to set_dump_file.
7540 * dumpfile.c (alt_dump_file): Make static, and group with...
7541 (alt_flags): ...this definition.
7542 (dumps_are_enabled): New variable.
7543 (refresh_dumps_are_enabled): New function.
7544 (set_dump_file): New function.
7545 (set_alt_dump_file): New function.
7546 (gcc::dump_manager::dump_start): Replace assignments to
7547 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7549 (gcc::dump_manager::dump_finish): Likewise.
7550 * dumpfile.h (alt_dump_file): Delete decl.
7551 (dumps_are_enabled): New variable decl.
7552 (set_dump_file): New function decl.
7553 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7555 * tree-nested.c (lower_nested_functions): Replace assignments to
7556 "dump_file" with calls to set_dump_file.
7558 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7560 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7561 goto_locus of each outgoing edge of each basic block.
7563 2018-06-28 Richard Biener <rguenther@suse.de>
7565 * dwarf2out.c (decl_scope_table): Remove.
7566 (push_decl_scope): Likewise.
7567 (pop_decl_scope): Likewise.
7568 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7569 (gen_struct_or_union_type_die): Likewise.
7570 (gen_tagged_type_die): Likewise.
7571 (dwarf2out_init): Do not initialize decl_scope_table.
7572 (dwarf2out_c_finalize): Do not free it.
7574 2018-06-28 Richard Biener <rguenther@suse.de>
7576 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7577 deciding whether to not re-use a DIE.
7579 2018-06-28 Richard Biener <rguenther@suse.de>
7581 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7582 DW_AT_abstract_origin attribute.
7584 2018-06-28 Martin Liska <mliska@suse.cz>
7586 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7587 Use newly introduced constants.
7588 * tree-switch-conversion.h (struct jump_table_cluster):
7589 Define max_ratio_for_size and max_ratio_for_speed.
7591 2018-06-28 Martin Liska <mliska@suse.cz>
7593 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7594 Add new checking assert to catch invalid state.
7595 (jump_table_cluster::can_be_handled): Handle single case
7597 (jump_table_cluster::is_beneficial): Bail out for such case.
7598 (bit_test_cluster::find_bit_tests):
7599 Add new checking assert to catch invalid state.
7600 (bit_test_cluster::can_be_handled): Handle single case
7602 (bit_test_cluster::is_beneficial): Bail out for such case.
7603 (switch_decision_tree::analyze_switch_statement):
7606 2018-06-28 Martin Liska <mliska@suse.cz>
7608 * common.opt: Introduce -completion option.
7609 * gcc.c (driver_handle_option): Handle it.
7610 (driver::main): Print completions if completion
7612 * opt-suggestions.c (option_proposer::get_completions):
7614 (option_proposer::suggest_completion): Likewise.
7615 (option_proposer::find_param_completions): Likewise.
7616 (verify_autocompletions): Likewise.
7617 (test_completion_valid_options): Likewise.
7618 (test_completion_valid_params): Likewise.
7619 (in_completion_p): Likewise.
7620 (empty_completion_p): Likewise.
7621 (test_completion_partial_match): Likewise.
7622 (test_completion_garbage): Likewise.
7623 (opt_proposer_c_tests): Likewise.
7624 * opt-suggestions.h: Declare new functions.
7625 * opts.c (common_handle_option): Handle OPT__completion_.
7626 * selftest-run-tests.c (selftest::run_tests): Add
7627 opt_proposer_c_tests.
7628 * selftest.c (assert_str_startswith): New.
7629 * selftest.h (assert_str_startswith): Likewise.
7630 (opt_proposer_c_tests): New.
7631 (ASSERT_STR_STARTSWITH): Likewise.
7633 2018-06-28 Martin Liska <mliska@suse.cz>
7635 * Makefile.in: Add opt-suggestions.o.
7636 * gcc-main.c: Include opt-suggestions.h.
7637 * gcc.c (driver::driver): Likewise.
7638 (driver::~driver): Remove m_option_suggestions.
7639 (driver::build_option_suggestions): Moved to option_proposer.
7640 (driver::suggest_option): Likewise.
7641 (driver::handle_unrecognized_options): Use option_proposer.
7642 * gcc.h (class driver): Add new memver m_option_proposer.
7643 * opt-suggestions.c: New file.
7644 * opt-suggestions.h: New file.
7646 2018-06-28 Martin Liska <mliska@suse.cz>
7648 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7649 (auto_string_vec::~auto_string_vec): Likewise.
7651 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7653 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7654 prevent_decl_creation_for_types fields up and add reset_location field.
7655 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7656 statement if id->reset_location is true.
7657 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7658 id->reset_location is true.
7659 (copy_phis_for_bb): Force input_location on the arguments if
7660 id->reset_location is true.
7661 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7662 is set on the function to be inlined.
7664 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7666 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7668 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7670 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7671 registers for Pmode.
7672 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7673 hard registers for the clobbered pseudo.
7675 2018-06-27 Paul Koning <ni1d@arrl.net>
7677 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7678 mutually exclusive options.
7679 * config/pdp11/constraints.md (h): New constraint.
7680 (O): Update definition to match shift code generation.
7681 (D): New constraint.
7682 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7684 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7686 (output_jump): Change arguments.
7687 (pdp11_fixed_cc_regs): New function.
7688 (pdp11_cc_mode): Ditto.
7689 (pdp11_expand_shift): Ditto.
7690 (pdp11_assemble_shift): Ditto.
7691 (pdp11_small_shift): Ditto.
7692 (pdp11_branch_cost): Remove.
7693 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7695 (pdp11_register_move_cost): Update for CC registers.
7696 (pdp11_rtx_costs): Add case for LSHIFTRT.
7697 (pdp11_output_jump): Add CCNZ mode conditional branches.
7698 (notice_update_cc_on_set): Remove.
7699 (pdp11_cc_mode): New function.
7700 (simple_memory_operand): Correct pre/post decrement case.
7701 (no_side_effect_operand): New function.
7702 (pdp11_regno_reg_class): Add CC_REGS class.
7703 (pdp11_fixed_cc_regs): New function.
7704 (pdp11_small_shift): New function.
7705 (pdp11_expand_shift): New function to expand shift insns.
7706 (pdp11_assemble_shift): New function to output shifts.
7707 (pdp11_branch_cost): Remove.
7708 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7709 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7710 (WCHAR_TYPE): Ditto.
7711 (PTRDIFF_TYPE): Ditto.
7712 (ADJUST_INSN_LENGTH): New macro.
7713 (FIXED_REGISTERS): Add CC registers.
7714 (CALL_USED_REGISTERS): Ditto.
7716 (REG_CLASS_NAMES): Ditto.
7717 (REG_CLASS_CONTENTS): Ditto.
7718 (SELECT_CC_MODE): Use new function.
7719 (TARGET_FLAGS_REGNUM): New macro.
7720 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7721 (cc0_reg_rtx): Remove.
7722 (CC_STATUS_MDEP): Remove.
7723 (CC_STATUS_MDEFP_INIT): Remove.
7724 (CC_IN_FPU): Remove.
7725 (NOTICE_UPDATE_CC): Remove.
7726 (REGISTER_NAMES): Add CC registers.
7727 (BRANCH_COST): Change to constant 1.
7728 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7730 * config/pdp11/pdp11.opt (mbcopy): Remove.
7731 (mbcopy-builtin): Remove.
7732 (mbranch-cheap): Remove.
7733 (mbranch-expensive): Remove.
7734 * config/pdp11/predicates.md (expand_shift_operand): Update to
7735 match shift code generation.
7736 (ccnz_operator): New predicate.
7737 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7738 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7739 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7741 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7742 description of O constraint.
7744 2018-06-27 Jeff Law <law@redhat.com>
7745 Austin Law <austinklaw@gmail.com>
7747 * config/v850/v850.md (addsi3_set_flags): New pattern.
7748 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7749 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7750 (zero_extendhisi2_v850_set_flags): Likewise.
7751 (zero_extendqisi2_v850_set_flags): Likewise.
7752 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7753 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7754 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7756 * config/v850/v850-protos.h (notice_update_cc): Remove.
7757 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7758 (v850_print_operand): Handle 'D' and "d".
7759 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7760 Add handling of arithmetic/logical operations compared against zero.
7761 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7762 Do not look at v850_compare_op, instead get mode from last argument.
7763 (v850_gen_compare): Remove
7764 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7765 after reload for prologue insns.
7766 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7768 (construct_save_jarl): Likewise.
7769 (TARGET_FLAGS_REGNUM): Define.
7770 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7771 (NOTICE_UPDATE_CC): Remove.
7772 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7773 than cc0. Conditionalize on reload_completed.
7774 (cmpsi_insn, setfcc_insn): Likewise.
7775 (tst1 splitter): Turn into define_and_split which sets the flags
7777 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7778 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7779 (cstoresf4, cstoredf4): Clobber the flags.
7780 (cmpsi, cmpsf, cmpdf): Remove expanders.
7781 (setf_insn): Remove pattern.
7782 (addsi3): Turn into define_and_split which clobbers the flags after
7783 reload and a suitable pattern (addsi3_clobber_flags) for use after
7785 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7786 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7787 (ashrsi3, ashrsi3_v850e2): Likewise.
7788 (bins): Clobber the flags.
7789 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7790 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7791 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7792 (call_value_internal_short, call_value_internal_long): Likewise.
7793 (callt_save_interrupt, callt_return_interrupt): Likewise.
7794 (save_interrupt, return_interrupt): Likewise.
7795 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7796 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7797 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7798 (All FP comparisons): Only allow after reload has completed.
7800 (divh, divhu): Tweak output template.
7801 (branch_z_normal, branch_z_invert): Remove
7802 (branch_nz_normal, branch_nz_invert): Likewise.
7803 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7805 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7806 * config/v850/v850.c (notice_update_cc): Remove.
7807 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7808 (CC_NO_CARRY): Likewise.
7809 (NOTICE_UPDATE_CC): Define to nothing.
7810 * config/v850/v850.md: Remove block comment on cc0 handling
7811 Remove "cc" attribute from all patterns. Remove cc_status handling
7812 from all patterns. Minor formatting fixes.
7814 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7816 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7817 (cortex-a76.cortex-a55): Likewise.
7818 * config/aarch64/aarch64-tune.md: Regenerate.
7819 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7820 cortex-a76.cortex-a55.
7822 2018-06-27 Jeff Law <law@redhat.com>
7824 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7825 (MULTILIB_DIRNAMES): Similarly.
7827 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7829 * gimple.h (gimple_return_retbnd): Delete.
7830 (gimple_return_set_retbnd): Likewise.
7831 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7832 gimple_return_set_retbnd.
7833 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7834 gimple_return_retbnd and adjust.
7835 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7836 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7837 Explicitly return NULL in a couple more cases. Move assertion
7838 on debug statements and remove unreachable code.
7839 (reset_debug_binding): Do not test id->retbnd.
7840 (expand_call_inline): Do not set it.
7842 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7844 * configure.ac: Add --disable-gcov option.
7845 * configure: Regenerate.
7846 * Makefile.in: Honour @enable_gcov@.
7847 * doc/install.texi: Document --disable-gcov.
7849 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7851 * config/arm/arm-cpus.in (cortex-a76): New entry.
7852 (cortex-a76.cortex-a55): Likewise.
7853 * config/arm/arm-tables.opt: Regenerate.
7854 * config/arm/arm-tune.md: Likewise.
7855 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7856 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7857 cortex-a76.cortex-a55.
7859 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7862 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7864 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7866 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7868 (EPILOGUE_USES): Likewise.
7870 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7872 * tree-inline.c (remap_location): New function extracted from...
7873 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7874 (copy_phis_for_bb): ...here. Call remap_location.
7875 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7877 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7879 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7880 unaligned vsx for 16B memset.
7882 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7885 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7886 ieee128_float_type_node to long_double_type_node unless
7887 TARGET_LONG_DOUBLE_128 is set.
7889 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7891 * cfgloop.c (get_loop_location): Convert return type from
7892 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7893 by implicit construction from rtx_insn *, and using
7894 dump_user_location_t::from_function_decl for the fallback case.
7895 * cfgloop.h (get_loop_location): Convert return type from
7896 location_t to dump_user_location_t.
7897 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7898 dump_printf_loc to pass in a dump_location_t rather than a
7899 location_t, via the gimple stmt.
7900 * coverage.c (get_coverage_counts): Update calls to
7901 dump_printf_loc to pass in dump_location_t rather than a
7903 * doc/optinfo.texi (Dump types): Convert example of
7904 dump_printf_loc from taking "locus" to taking "insn". Update
7905 description of the "_loc" calls to cover dump_location_t.
7906 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7908 (dump_user_location_t::dump_user_location_t): New constructors,
7909 from gimple *stmt and rtx_insn *.
7910 (dump_user_location_t::from_function_decl): New function.
7911 (dump_loc): Make static.
7912 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7913 const dump_location_t &.
7914 (dump_generic_expr_loc): Delete.
7915 (dump_printf_loc): Convert param "loc" from location_t to
7916 const dump_location_t &.
7917 (selftest::test_impl_location): New function.
7918 (selftest::dumpfile_c_tests): New function.
7919 * dumpfile.h: Include "profile-count.h".
7920 (class dump_user_location_t): New class.
7921 (struct dump_impl_location_t): New struct.
7922 (class dump_location_t): New class.
7923 (dump_printf_loc): Convert 2nd param from source_location to
7924 const dump_location_t &.
7925 (dump_generic_expr_loc): Delete.
7926 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7927 const dump_location_t &.
7928 * gimple-fold.c (fold_gimple_assign): Update call to
7929 dump_printf_loc to pass in a dump_location_t rather than a
7930 location_t, via the gimple stmt.
7931 (gimple_fold_call): Likewise.
7932 * gimple-loop-interchange.cc
7933 (loop_cand::analyze_iloop_reduction_var): Update for change to
7934 check_reduction_path.
7935 (tree_loop_interchange::interchange): Update for change to
7937 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7938 change in return-type of find_loop_location.
7939 (graphite_regenerate_ast_isl): Likewise.
7940 * graphite-optimize-isl.c (optimize_isl): Likewise.
7941 * graphite.c (graphite_transform_loops): Likewise.
7942 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7943 pass in a dump_location_t rather than a location_t, via the
7945 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7946 * ipa.c (walk_polymorphic_call_targets): Likewise.
7947 * loop-unroll.c (report_unroll): Convert "locus" param from
7948 location_t to dump_location_t.
7949 (decide_unrolling): Update for change to get_loop_location's
7951 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7952 location_t to dump_user_location_t.
7953 (grid_find_single_omp_among_assignments_1): Updates calls to
7954 dump_printf_loc to pass in a dump_location_t rather than a
7955 location_t, via the gimple stmt.
7956 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7957 location_t to dump_location_t. Updates calls to dump_printf_loc
7958 to pass in a dump_location_t rather than a location_t, via the
7960 (grid_inner_loop_gridifiable_p): Likewise.
7961 (grid_dist_follows_simple_pattern): Likewise.
7962 (grid_gfor_follows_tiling_pattern): Likewise.
7963 (grid_target_follows_gridifiable_pattern): Likewise.
7964 (grid_attempt_target_gridification): Convert initialization
7965 of local "grid" from memset to zero-initialization; FIXME: does
7966 this require C++11? Update call to dump_printf_loc to pass in a
7967 optinfo_location rather than a location_t, via the gimple stmt.
7968 * profile.c (read_profile_edge_counts): Updates call to
7969 dump_printf_loc to pass in a dump_location_t rather than a
7971 (compute_branch_probabilities): Likewise.
7972 * selftest-run-tests.c (selftest::run_tests): Call
7974 * selftest.h (dumpfile_c_tests): New decl.
7975 * tree-loop-distribution.c (pass_loop_distribution::execute):
7976 Update for change in return type of find_loop_location.
7977 * tree-parloops.c (parallelize_loops): Likewise.
7978 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7979 "locus" from location_t to dump_user_location_t.
7980 (canonicalize_loop_induction_variables): Likewise.
7981 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7982 for change in return type of find_loop_location.
7983 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7984 to dump_printf_loc to pass in a dump_location_t rather than a
7985 location_t, via the stmt.
7986 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7988 * tree-vect-loop-manip.c (find_loop_location): Convert return
7989 type from source_location to dump_user_location_t.
7990 (vect_do_peeling): Update for above change.
7991 (vect_loop_versioning): Update for change in type of
7993 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7994 from location_t to dump_user_location_t.
7995 (vect_estimate_min_profitable_iters): Update for change in type
7997 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7998 location_t to dump_location_t.
7999 (vect_slp_bb): Update for change in type of vect_location.
8000 * tree-vectorizer.c (vect_location): Convert from source_location
8001 to dump_user_location_t.
8002 (try_vectorize_loop_1): Update for change in vect_location's type.
8003 (vectorize_loops): Likewise.
8004 (increase_alignment): Likewise.
8005 * tree-vectorizer.h (vect_location): Convert from source_location
8006 to dump_user_location_t.
8007 (find_loop_location): Convert return type from source_location to
8008 dump_user_location_t.
8009 (check_reduction_path): Convert 1st param from location_t to
8010 dump_user_location_t.
8011 * value-prof.c (check_counter): Update call to dump_printf_loc to
8012 pass in a dump_user_location_t rather than a location_t; update
8013 call to error_at for change in type of "locus".
8014 (check_ic_target): Update call to dump_printf_loc to
8015 pass in a dump_user_location_t rather than a location_t, via the
8018 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8020 * config/s390/s390.h (enum processor_flags): Do not use
8021 default tune parameter when -march was specified.
8023 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8026 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8027 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8030 2018-06-26 Richard Biener <rguenther@suse.de>
8032 PR tree-optimization/86287
8034 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8035 (vect_analyze_loop): Initialize n_stmts.
8037 2018-06-26 Richard Biener <rguenther@suse.de>
8040 * fold-const.c (fold_convertible_p): Pointer extension
8043 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8046 * dwarf2out.c (loc_list_has_views): Adjust comments.
8047 (dw_loc_list): Split single cross-partition range with
8050 2018-06-25 Jeff Law <law@redhat.com>
8052 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8053 on -mbig-switch by default.
8055 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8057 (const_float_0_operand): Remove unused predicate.
8058 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8059 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8060 (recipsf2): New expander. Original pattern now called
8062 (recipdf2, recipdf2_insn): Similarly.
8063 (rsqrtsf2, rsqrtsf2_insn): Similarly
8064 (rsqrtdf2, rsqrtdf2_insn): Similarly
8066 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8068 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8069 Simplify logic for FreeBSD (twice).
8071 2018-06-25 Martin Sebor <msebor@redhat.com>
8073 PR tree-optimization/86204
8074 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8075 a strnlen result if it's less than the length of the string.
8077 2018-06-25 Martin Sebor <msebor@redhat.com>
8079 PR tree-optimization/85700
8080 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8081 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8082 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8084 2018-06-25 Martin Sebor <msebor@redhat.com>
8086 * doc/extend.texi (Zero-length arrays): Update and clarify.
8088 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8090 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8091 added IEEE/IBM long double multilib support on PowerPC little
8092 endian Linux systems.
8093 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8094 (MULTILIB_DEFAULTS): Likewise.
8095 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8097 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8098 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8099 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8101 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8104 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8105 (REORDER_45): Likewise.
8107 2018-06-25 Jeff Law <law@redhat.com>
8109 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8110 dividend to 32 bits. Adjust length.
8111 (udivmodhi4): Cleanup output template. Fix length.
8113 2018-06-25 Carl Love <cel@us.ibm.com>
8115 * config/rs6000/vsx.md: Change word selector to prefered location.
8117 2018-06-25 Richard Biener <rguenther@suse.de>
8119 PR tree-optimization/86304
8120 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8121 epilogue-if-converted loops as well.
8123 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8125 * lto-section-out.c (lto_begin_section): Do not print section
8126 name for noaddr and unnumbered dumps.
8128 2018-06-25 Richard Biener <rguenther@suse.de>
8130 * tree-vectorizer.h (struct vec_info_shared): New structure
8131 with parts split out from struct vec_info and loop_nest from
8132 struct _loop_vec_info.
8133 (struct vec_info): Adjust accordingly.
8134 (struct _loop_vec_info): Likewise.
8135 (LOOP_VINFO_LOOP_NEST): Adjust.
8136 (LOOP_VINFO_DATAREFS): Likewise.
8137 (LOOP_VINFO_DDRS): Likewise.
8138 (struct _bb_vec_info): Likewise.
8139 (BB_VINFO_DATAREFS): Likewise.
8140 (BB_VINFO_DDRS): Likewise.
8141 (struct _stmt_vec_info): Add dr_aux member.
8142 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8143 (DR_MISALIGNMENT_UNINITIALIZED): New.
8144 (set_dr_misalignment): Adjust.
8145 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8146 (vect_analyze_loop): Adjust prototype.
8147 (vect_analyze_loop_form): Likewise.
8148 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8149 Compute dependences lazily.
8150 (vect_record_base_alignments): Use shared datarefs/ddrs.
8151 (vect_verify_datarefs_alignment): Likewise.
8152 (vect_analyze_data_refs_alignment): Likewise.
8153 (vect_analyze_data_ref_accesses): Likewise.
8154 (vect_analyze_data_refs): Likewise.
8155 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8156 constructor parameter for shared part.
8157 (vect_analyze_loop_form): Pass in shared part and adjust.
8158 (vect_analyze_loop_2): Pass in storage for the number of
8159 stmts. Move loop nest finding to the caller. Compute
8161 (vect_analyze_loop): Pass in shared part.
8162 (vect_transform_loop): Verify shared datarefs are unchanged.
8163 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8164 constructor parameter for shared part.
8165 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8166 (vect_slp_bb): Verify shared datarefs are unchanged before
8168 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8170 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8171 DR_MISALIGNMENT_UNINITIALIZED.
8172 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8173 parameter for shared part.
8174 (vec_info::~vec_info): Adjust.
8175 (vec_info_shared::vec_info_shared): New.
8176 (vec_info_shared::~vec_info_shared): Likewise.
8177 (vec_info_shared::save_datarefs): Likewise.
8178 (vec_info_shared::check_datarefs): Likewise.
8179 (try_vectorize_loop_1): Construct shared part live for analyses
8180 of a single loop for multiple vector sizes.
8181 * tree-parloops.c (gather_scalar_reductions): Adjust.
8183 2018-06-25 Richard Biener <rguenther@suse.de>
8185 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8186 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8187 (vect_analyze_data_refs): Remove similar code from here and
8188 simplify accordingly.
8190 2018-06-25 Richard Biener <rguenther@suse.de>
8192 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8193 for reverse storage order accesses rather than asserting
8194 they cannot happen here.
8196 2018-06-25 Tom de Vries <tdevries@suse.de>
8199 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8200 Use data16 instead of .byte for insn prefix.
8202 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8205 * parser.c (make_char_string_pack): Pass this literal chars
8206 through cpp_interpret_string.
8207 (cp_parser_userdef_numeric_literal): Check the result of
8208 make_char_string_pack.
8210 2018-06-24 Maya Rashish <coypu@sdf.org>
8212 * ginclude/stddef.h: Simplify conditions around avoiding
8213 re-definition of __size_t.
8215 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8217 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8218 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8220 2018-06-22 Maya Rashish <coypu@sdf.org>
8222 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8223 made to OpenBSD and NetBSD through the years.
8225 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8227 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8228 behavior of vec_pack (vector double, vector double) to match
8229 behavior of vec_float2 (vector double, vector double).
8231 2018-06-22 Olivier Hainque <hainque@adacore.com>
8233 * gimplify.c (gimplify_function_tree): Prevent creation
8234 of a trampoline for the address of the current function
8235 passed to entry/exit instrumentation hooks.
8237 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8240 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8243 2018-06-22 Martin Liska <mliska@suse.cz>
8245 PR tree-optimization/86263
8246 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8247 Bail out if is_enabled is false.
8248 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8250 (jump_table_cluster::is_enabled): New function.
8252 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8254 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8255 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8256 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8257 (lto_input_ts_binfo_tree_pointers): Likewise.
8258 * tree-streamer-out.c (streamer_write_tree_bitfields,
8259 write_ts_binfo_tree_pointers): Likewise.
8260 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8262 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8264 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8266 2018-06-22 Martin Liska <mliska@suse.cz>
8268 * symbol-summary.h (get): Make it pure and inline move
8269 functionality from ::get function.
8270 (get): Remove and inline into ::get and ::get_create.
8271 (get_create): Move code from ::get function.
8273 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8276 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8277 -x assembler-with-cpp.
8279 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8281 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8282 _FILE_OFFSET_BITS=64 for C++.
8284 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8286 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8287 conversion insn that shows up when pr85657-3.c is compiled using
8288 IEEE 128-bit long double.
8289 (neg<mode>2_internal): Use the correct mode to check whether the
8290 mode is IBM extended.
8291 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8292 multiply and divide external functions from being created more
8295 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8297 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8299 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8300 the edge can be forwarded.
8301 (cfg_layout_merge_blocks): Likewise.
8303 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8305 * except.c (finish_eh_generation): Commit edge insertions only after
8306 the EH edges have been redirected from post-landing to landing pads.
8308 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8310 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8311 create_tmp_var_for to create the FRAME decl.
8312 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8314 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8316 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8317 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8318 debug statement when resetting its value.
8319 (expand_call_inline): Copy the locus of the call onto the assignment
8320 of the return value, if any. Use local variable in more cases.
8322 2018-06-21 Martin Liska <mliska@suse.cz>
8324 * ipa-pure-const.c (propagate_nothrow): Use
8325 funct_state_summaries->get.
8326 (dump_malloc_lattice): Likewise.
8327 (propagate_malloc): Likewise.
8329 2018-06-21 Richard Biener <rguenther@suse.de>
8331 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8332 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8333 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8335 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8336 BLOCK_ABSTRACT_ORIGIN unconditionally.
8338 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8340 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8342 * ipa-reference.c (ipa_reference_c_finalize): Delete
8343 ipa_ref_opt_sum_summaries and set it to NULL.
8345 2018-06-21 Tom de Vries <tdevries@suse.de>
8347 PR tree-optimization/85859
8348 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8349 test with comment from bb_no_side_effects_p.
8351 2018-06-21 Richard Biener <rguenther@suse.de>
8353 PR tree-optimization/86232
8354 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8355 max for constant niter.
8357 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8359 * config/aarch64/aarch64-simd.md
8360 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8362 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8364 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8365 Make opernads of the unspec commutative.
8367 2018-06-21 Richard Biener <rguenther@suse.de>
8369 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8370 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8371 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8372 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8374 (vect_record_base_alignments): Do not record base alignment
8375 for gathers or scatters.
8376 (vect_compute_data_ref_alignment): Drop return value that is always
8377 true. Bail out early for gathers or scatters.
8378 (vect_enhance_data_refs_alignment): Bail out early for gathers
8380 (vect_find_same_alignment_drs): Likewise.
8381 (vect_analyze_data_refs_alignment): Remove dead code.
8382 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8383 (vect_analyze_data_refs): For possible gathers or scatters do
8384 not create an alternate DR, just check their possible validity
8385 and mark them. Adjust DECL_NONALIASED handling to not rely
8387 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8388 update inits of gathers or scatters.
8389 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8390 Also copy gather/scatter flag to pattern vinfo.
8392 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8394 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8395 behavior of vec_packsu (vector unsigned long long, vector unsigned
8396 long long) to match behavior of vec_packs with same signature.
8398 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8399 Thomas Schwinge <thomas@codesourcery.com>
8400 Cesar Philippidis <cesar@codesourcery.com>
8402 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8403 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8404 (gimplify_adjust_omp_clauses): Likewise.
8405 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8406 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8407 (gimplify_omp_target_update): Update handling of acc update and
8409 * omp-low.c (install_var_field): Remove unused parameter
8410 base_pointers_restrict.
8411 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8412 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8414 (omp_target_base_pointers_restrict_p): Delete.
8415 (scan_omp_target): Update call to scan_sharing_clauses.
8416 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8418 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8419 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8420 (convert_local_omp_clauses): Likewise.
8421 * tree-pretty-print.c (dump_omp_clause): Likewise.
8422 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8424 (omp_clause_code_name): Likewise.
8426 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8429 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8432 PR tree-optimization/86231
8433 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8434 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8436 2018-06-20 Tom de Vries <tdevries@suse.de>
8438 PR tree-optimization/86097
8439 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8440 iv type if signedness of iv type is not the same as that of *nit.
8442 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8444 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8445 EDGE_EH edges, verify they are all EDGE_EH.
8447 2018-06-20 Maya Rashish <coypu@sdf.org>
8449 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8451 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8453 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8454 * config/aarch64/aarch64.c (xgene1_tunings): Add
8455 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8456 (aarch64_mode_valid_for_sched_fusion_p):
8457 Allow 16-byte modes.
8458 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8459 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8461 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8463 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8464 * config/aarch64/iterators.md (VQ2): New mode iterator.
8466 2018-06-20 Martin Liska <mliska@suse.cz>
8468 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8469 Change default ratio from 10 to 8.
8471 2018-06-20 Martin Liska <mliska@suse.cz>
8473 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8475 (bit_test_cluster::find_bit_tests): Likewise.
8476 (switch_decision_tree::analyze_switch_statement): Find clusters.
8477 * tree-switch-conversion.h (struct jump_table_cluster): Document
8480 2018-06-20 Martin Liska <mliska@suse.cz>
8482 * tree-switch-conversion.c (switch_conversion::collect):
8483 Record m_uniq property.
8484 (switch_conversion::expand): Bail out for special conditions.
8485 (group_cluster::~group_cluster): New.
8486 (group_cluster::group_cluster): Likewise.
8487 (group_cluster::dump): Likewise.
8488 (jump_table_cluster::emit): New.
8489 (switch_decision_tree::fix_phi_operands_for_edges): New.
8490 (struct case_node): Remove struct.
8491 (jump_table_cluster::can_be_handled): New.
8492 (case_values_threshold): Moved to header.
8493 (reset_out_edges_aux): Likewise.
8494 (jump_table_cluster::is_beneficial): New.
8495 (bit_test_cluster::can_be_handled): Likewise.
8496 (add_case_node): Remove.
8497 (bit_test_cluster::is_beneficial): New.
8498 (case_bit_test::cmp): New.
8499 (bit_test_cluster::emit): New.
8500 (expand_switch_as_decision_tree_p): Remove.
8501 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8502 (fix_phi_operands_for_edge): Likewise.
8503 (switch_decision_tree::analyze_switch_statement): New.
8504 (compute_cases_per_edge): Move ...
8505 (switch_decision_tree::compute_cases_per_edge): ... here.
8506 (try_switch_expansion): Likewise.
8507 (switch_decision_tree::try_switch_expansion): Likewise.
8508 (record_phi_operand_mapping): Likewise.
8509 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8510 (emit_case_decision_tree): Likewise.
8511 (switch_decision_tree::emit): Likewise.
8512 (balance_case_nodes): Likewise.
8513 (switch_decision_tree::balance_case_nodes): Likewise.
8514 (dump_case_nodes): Likewise.
8515 (switch_decision_tree::dump_case_nodes): Likewise.
8516 (emit_jump): Likewise.
8517 (switch_decision_tree::emit_jump): Likewise.
8518 (emit_cmp_and_jump_insns): Likewise.
8519 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8520 (emit_case_nodes): Likewise.
8521 (switch_decision_tree::emit_case_nodes): Likewise.
8522 (conditional_probability): Remove.
8523 * tree-switch-conversion.h (enum cluster_type): New.
8525 (struct cluster): Likewise.
8526 (cluster::cluster): Likewise.
8527 (struct simple_cluster): Likewise.
8528 (simple_cluster::simple_cluster): Likewise.
8529 (struct group_cluster): Likewise.
8530 (struct jump_table_cluster): Likewise.
8531 (struct bit_test_cluster): Likewise.
8532 (struct min_cluster_item): Likewise.
8533 (struct case_tree_node): Likewise.
8534 (case_tree_node::case_tree_node): Likewise.
8535 (jump_table_cluster::case_values_threshold): Likewise.
8536 (struct case_bit_test): Likewise.
8537 (struct switch_decision_tree): Likewise.
8538 (struct switch_conversion): Likewise.
8539 (switch_decision_tree::reset_out_edges_aux): Likewise.
8541 2018-06-20 Martin Liska <mliska@suse.cz>
8543 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8544 (hoist_edge_and_branch_if_true): Likewise.
8545 (expand_switch_using_bit_tests_p): Likewise.
8546 (struct case_bit_test): Likewise.
8547 (case_bit_test_cmp): Likewise.
8548 (emit_case_bit_tests): Likewise.
8549 (switch_conversion::switch_conversion): New class.
8550 (struct switch_conv_info): Remove old struct.
8551 (collect_switch_conv_info): More to ...
8552 (switch_conversion::collect): ... this.
8553 (check_range): Likewise.
8554 (switch_conversion::check_range): Likewise.
8555 (check_all_empty_except_final): Likewise.
8556 (switch_conversion::check_all_empty_except_final): Likewise.
8557 (check_final_bb): Likewise.
8558 (switch_conversion::check_final_bb): Likewise.
8559 (create_temp_arrays): Likewise.
8560 (switch_conversion::create_temp_arrays): Likewise.
8561 (free_temp_arrays): Likewise.
8562 (gather_default_values): Likewise.
8563 (switch_conversion::gather_default_values): Likewise.
8564 (build_constructors): Likewise.
8565 (switch_conversion::build_constructors): Likewise.
8566 (constructor_contains_same_values_p): Likewise.
8567 (switch_conversion::contains_same_values_p): Likewise.
8568 (array_value_type): Likewise.
8569 (switch_conversion::array_value_type): Likewise.
8570 (build_one_array): Likewise.
8571 (switch_conversion::build_one_array): Likewise.
8572 (build_arrays): Likewise.
8573 (switch_conversion::build_arrays): Likewise.
8574 (gen_def_assigns): Likewise.
8575 (switch_conversion::gen_def_assigns): Likewise.
8576 (prune_bbs): Likewise.
8577 (switch_conversion::prune_bbs): Likewise.
8578 (fix_phi_nodes): Likewise.
8579 (switch_conversion::fix_phi_nodes): Likewise.
8580 (gen_inbound_check): Likewise.
8581 (switch_conversion::gen_inbound_check): Likewise.
8582 (process_switch): Use the newly created class.
8583 (switch_conversion::expand): New.
8584 (switch_conversion::~switch_conversion): New.
8585 * tree-switch-conversion.h: New file.
8587 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8589 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8590 tree-vect-patterns.c.
8591 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8592 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8593 (vect_recog_sad_pattern): Likewise.
8594 (vect_recog_widen_sum_pattern): Likewise.
8595 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8596 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8597 (vect_recog_rotate_pattern): Likewise.
8598 (vect_recog_mult_pattern): Likewise.
8599 (vect_recog_vector_vector_shift_pattern): Likewise.
8600 (vect_recog_divmod_pattern): Likewise.
8601 (vect_recog_mixed_size_cond_pattern): Likewise.
8602 (vect_recog_bool_pattern): Likewise.
8603 (vect_recog_mask_conversion_pattern): Likewise.
8604 (vect_try_gather_scatter_pattern): Likewise.
8605 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8606 (vect_recog_over_widening_pattern): Likewise.
8607 (vect_recog_gather_scatter_pattern): Likewise.
8608 (vect_recog_func_ptr): Move from tree-vectorizer.h
8609 (vect_vect_recog_func_ptrs): Move further down the file.
8610 (vect_recog_func): Likewise. Remove the third argument.
8611 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8612 (vect_pattern_recog_1): Expect the pattern function to do any
8613 necessary target tests. Also expect it to provide a vector type.
8614 Remove the type_in handling.
8616 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8618 * tree-vect-patterns.c (vect_pattern_detected): New function.
8619 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8620 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8621 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8622 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8623 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8624 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8625 (vect_recog_mask_conversion_pattern)
8626 (vect_try_gather_scatter_pattern): Likewise.
8628 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8630 * tree-vect-patterns.c (vect_get_internal_def): New function.
8631 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8632 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8633 (search_type_for_mask_1): Use it.
8635 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8637 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8638 redundant WIDEN_SUM_EXPR handling.
8639 (vect_recog_sad_pattern): Likewise.
8641 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8643 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8644 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8645 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8646 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8647 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8649 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8651 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8652 use the stmt_vec_info of the original bb statement for the
8653 new zero assignment, even if the call is part of a pattern.
8655 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8657 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8658 that the sequence is attached to the original statement rather
8659 than the pattern statement.
8660 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8661 PATTERN_DEF_SEQ from the original statement rather than
8662 the main pattern statement.
8663 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8664 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8665 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8667 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8669 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8670 definition statements before the early exit for statements that aren't
8672 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8674 (vect_transform_loop): ...here. Process pattern definition
8675 statements without first checking whether the main pattern
8676 statement is live or relevant.
8678 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8680 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8681 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8683 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8685 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8686 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8687 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8688 (expand_block_compare): Change select_block_compare_mode call.
8689 (expand_strncmp_align_check): Use new functions, fix comment.
8690 (emit_final_str_compare_gpr): New function.
8691 (expand_strn_compare): Refactor and clean up code.
8692 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8694 2018-06-19 Tony Reix <tony.reix@atos.com>
8695 Damien Bergamini <damien.bergamini@atos.com>
8696 David Edelsohn <dje.gcc@gmail.com>
8698 * collect2.c (static_obj): New variable.
8699 (static_libs): New variable.
8700 (is_in_list): Uncomment declaration.
8701 (main): Track AIX libraries linked statically.
8702 (is_in_list): Uncomment definition.
8703 (scan_prog_file): Don't add AIX shared libraries initializer
8704 to constructor list if linking statically.
8706 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8708 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8710 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8712 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8714 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8717 2018-06-19 Martin Liska <mliska@suse.cz>
8719 * config/i386/i386.c (ix86_can_inline_p): Do not use
8720 ipa_fn_summaries::get_create.
8721 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8723 (devirtualization_time_bonus): Likewise.
8724 (ipcp_propagate_stage): Likewise.
8725 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8726 (edge_set_predicate): Likewise.
8727 (evaluate_conditions_for_known_args): Likewise.
8728 (evaluate_properties_for_edge): Likewise.
8729 (ipa_call_summary::reset): Tranform to ...
8730 (ipa_call_summary::~ipa_call_summary): ... this.
8731 (ipa_fn_summary::reset): Transform to ...
8732 (ipa_fn_summary::~ipa_fn_summary): ... this.
8733 (ipa_fn_summary_t::remove): Rename to ...
8734 (ipa_fn_summary_t::remove_callees): ... this.
8735 (ipa_fn_summary_t::duplicate): Use placement new
8736 instead of memory copy.
8737 (ipa_call_summary_t::duplicate): Likewise.
8738 (ipa_call_summary_t::remove): Remove.
8739 (dump_ipa_call_summary): Change get_create to get.
8740 (ipa_dump_fn_summary): Dump only when summary exists.
8741 (analyze_function_body): Use symbol_summary::get instead
8743 (compute_fn_summary): Likewise.
8744 (estimate_edge_devirt_benefit): Likewise.
8745 (estimate_edge_size_and_time): Likewise.
8746 (inline_update_callee_summaries): Likewise.
8747 (remap_edge_change_prob): Likewise.
8748 (remap_edge_summaries): Likewise.
8749 (ipa_merge_fn_summary_after_inlining): Likewise.
8750 (write_ipa_call_summary): Likewise.
8751 (ipa_fn_summary_write): Likewise.
8752 (ipa_free_fn_summary): Likewise.
8753 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8754 (struct ipa_call_summary): Likewise.
8755 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8757 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8758 (estimate_size_after_inlining): Likewise.
8759 (estimate_growth): Likewise.
8760 (growth_likely_positive): Likewise.
8761 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8762 (inline_call): Likewise.
8763 * ipa-inline.c (caller_growth_limits): Likewise.
8764 (can_inline_edge_p): Likewise.
8765 (can_inline_edge_by_limits_p): Likewise.
8766 (compute_uninlined_call_time): Likewise.
8767 (compute_inlined_call_time): Likewise.
8768 (want_inline_small_function_p): Likewise.
8769 (edge_badness): Likewise.
8770 (update_caller_keys): Likewise.
8771 (update_callee_keys): Likewise.
8772 (inline_small_functions): Likewise.
8773 (inline_to_all_callers_1): Likewise.
8774 (dump_overall_stats): Likewise.
8775 (early_inline_small_functions): Likewise.
8776 (early_inliner): Likewise.
8777 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8778 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8779 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8780 * ipa-split.c (execute_split_functions): Likewise.
8781 * symbol-summary.h: Likewise.
8782 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8784 2018-06-19 Richard Biener <rguenther@suse.de>
8786 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8787 (vectorize_loops): ... here. Fix dbgcnt handling.
8788 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8790 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8793 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8794 ieee128 argument takes up only one (vector) register, not two (floating
8797 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8799 * gimplify.c (gimplify_init_constructor): Really never clear for an
8800 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8802 2018-06-19 Richard Biener <rguenther@suse.de>
8804 PR tree-optimization/86179
8805 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8806 after failed recognition.
8808 2018-06-18 Martin Sebor <msebor@redhat.com>
8811 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8812 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8813 Handle integer subtraction.
8814 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8815 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8817 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8819 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8820 param from rtx to rtx_insn *.
8821 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8823 (frv_ifcvt_modify_insn): Likwise.
8824 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8825 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8826 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8827 as_a <rtx_insn *> cast to local "unprotected_region" once
8828 it's been established that it's not NULL or pc_rtx.
8829 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8830 param "sethi" from rtx to rtx_insn *.
8831 (nds32_group_float_insns): Likewise for param "insn".
8832 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8834 (vax_output_int_subtract): Likewise.
8835 * config/vax/vax.c (vax_output_int_add): Likewise for param
8837 (vax_output_int_subtract): Likewise.
8838 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8839 (emit_pattern_after): Likewise for param "after".
8840 (emit_insn_after): Likewise.
8841 (emit_jump_insn_after): Likewise.
8842 (emit_call_insn_after): Likewise.
8843 (emit_debug_insn_after): Likewise.
8844 (emit_pattern_before): Likewise for param "before".
8845 (emit_insn_before): Likewise.
8846 (emit_jump_insn_before): Likewise.
8847 * final.c (get_insn_template): Likewise for param "insn", removing
8849 * output.h (get_insn_template): Likewise for 2nd param.
8850 * rtl.h (emit_insn_before): Likewise.
8851 (emit_jump_insn_before): Likewise.
8852 (emit_debug_insn_before_noloc): Likewise.
8853 (emit_insn_after): Likewise.
8854 (emit_jump_insn_after): Likewise.
8855 (emit_call_insn_after): Likewise.
8856 (emit_debug_insn_after): Likewise.
8857 (set_insn_deleted): Likewise for param.
8859 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8862 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8863 floating point modes, so that IFmode is numerically greater than
8864 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8865 to declare the ordering. This prevents IFmode from being
8866 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8867 machine. Include rs6000-modes.h to share the fractional values
8868 between genmodes* and the rest of the compiler.
8872 * config/rs6000/rs6000-modes.h: New file.
8873 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8874 meaning of rs6000_long_double_size so that 126..128 selects an
8875 appropriate 128-bit floating point type.
8876 (rs6000_option_override_internal): Likewise.
8877 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8878 (TARGET_LONG_DOUBLE_128): Change the meaning of
8879 rs6000_long_double_size so that 126..128 selects an appropriate
8880 128-bit floating point type.
8881 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8882 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8883 source and destination to match the standard usage.
8884 (truncifkf2): Likewise.
8885 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8886 ISA 2.07 to use an explicit clobber, instead of passing in a
8888 (copysign<mode>3_soft): Likewise.
8890 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8892 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8893 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8894 (vect_slp_analyze_instance_dependence): Likewise.
8895 (vect_enhance_data_refs_alignment): Likewise.
8896 (vect_analyze_data_refs_alignment): Likewise.
8897 (vect_slp_analyze_and_verify_instance_alignment
8898 (vect_analyze_data_ref_accesses): Likewise.
8899 (vect_prune_runtime_alias_test_list): Likewise.
8900 (vect_analyze_data_refs): Likewise.
8901 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8902 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8903 (vect_analyze_scalar_cycles_1): Likewise.
8904 (vect_get_loop_niters): Likewise.
8905 (vect_analyze_loop_form_1): Likewise.
8906 (vect_update_vf_for_slp): Likewise.
8907 (vect_analyze_loop_operations): Likewise.
8908 (vect_analyze_loop): Likewise.
8909 (vectorizable_induction): Likewise.
8910 (vect_transform_loop): Likewise.
8911 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8912 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8913 (vect_make_slp_decision): Likewise.
8914 (vect_detect_hybrid_slp): Likewise.
8915 (vect_slp_analyze_operations): Likewise.
8916 (vect_slp_bb): Likewise.
8917 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8918 (vectorizable_bswap): Likewise.
8919 (vectorizable_call): Likewise.
8920 (vectorizable_simd_clone_call): Likewise.
8921 (vectorizable_conversion): Likewise.
8922 (vectorizable_assignment): Likewise.
8923 (vectorizable_shift): Likewise.
8924 (vectorizable_operation): Likewise.
8925 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8927 2018-06-18 Martin Sebor <msebor@redhat.com>
8929 PR tree-optimization/81384
8930 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8931 * builtins.c (expand_builtin_strnlen): New function.
8932 (expand_builtin): Call it.
8933 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8934 * builtins.def (BUILT_IN_STRNLEN): New.
8935 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8936 Warn for bounds in excess of maximum object size.
8937 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8938 single-value ranges. Handle strnlen.
8939 (handle_builtin_strlen): Handle strnlen.
8940 (strlen_check_and_optimize_stmt): Same.
8941 * doc/extend.texi (Other Builtins): Document strnlen.
8943 2018-06-18 Maya Rashish <coypu@sdf.org>
8945 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8946 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8947 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8949 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8951 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8953 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8955 * tree.c (escaped_string::escape): Replace cast to char * by
8956 const_cast<char *> (unescaped).
8958 2018-06-18 Nick Clifton <nickc@redhat.com>
8961 * tree.c (escaped_string): New class. Converts an unescaped
8962 string into its escaped equivalent.
8963 (warn_deprecated_use): Use the new class to convert the
8964 deprecation message, if present.
8965 (test_escaped_strings): New self test.
8966 (test_c_tests): Add test_escaped_strings.
8967 * doc/extend.texi (deprecated): Add a note that the
8968 deprecation message is affected by the -fmessage-length
8969 option, and that control characters will be escaped.
8970 (#pragma GCC error): Document this pragma.
8971 (#pragma GCC warning): Likewise.
8972 * doc/invoke.texi (-fmessage-length): Document this option's
8973 effect on the #warning and #error preprocessor directives and
8974 the deprecated attribute.
8976 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8978 * tree.c (decl_value_expr_lookup): Revert latest change.
8979 (decl_value_expr_insert): Likewise.
8981 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8983 * gimplify.c (nonlocal_vlas): Delete.
8984 (nonlocal_vla_vars): Likewise.
8985 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8987 (gimplify_body): Do not create and destroy nonlocal_vlas.
8988 * tree-nested.c: Include diagnostic.h.
8989 (use_pointer_in_frame): Tweak.
8990 (lookup_field_for_decl): Add assertion and declare the transformation.
8991 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8992 internal error when the reference is in a wrong context. Do not
8993 create a debug decl by default.
8994 (note_nonlocal_block_vlas): Delete.
8995 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8996 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8997 create a debug decl by default.
8998 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8999 call is in a wrong context.
9000 (fixup_vla_decls): New function.
9001 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9002 debug variables were created.
9003 * tree.c (decl_value_expr_lookup): Add checking assertion.
9004 (decl_value_expr_insert): Likewise.
9006 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9009 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9010 * tree-scalar-evolution.c (interpret_expr): Likewise.
9011 (expression_expensive_p): Likewise.
9012 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9013 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9014 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9015 (ssa_defined_by_minus_one_stmt_p): New.
9017 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9020 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9021 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9022 * dojump.c (do_jump): Likewise.
9023 * expr.c (expand_expr_real_2): Check operand type's sign.
9024 * fold-const.c (const_unop): Handle ABSU_EXPR.
9025 (fold_abs_const): Likewise.
9026 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9027 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9028 (strip_sign_op_1): Likesise.
9029 * match.pd: Add new pattern to generate ABSU_EXPR.
9030 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9031 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9032 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9033 * tree-inline.c (estimate_operator_cost): Likewise.
9034 * tree-pretty-print.c (dump_generic_node): Likewise.
9035 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9036 * tree.def (ABSU_EXPR): New.
9038 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9041 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9042 documented as preserved for backward compatibility only.
9043 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9045 PR rtl-optimization/86108
9046 * bb-reorder.c (create_forwarder_block): Renamed to ...
9047 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9048 jump from new landing pad to the second part.
9049 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9052 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9055 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9056 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9057 Only call store_expr for halves if the mode is the same.
9060 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9061 Fix up comment formatting.
9063 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9065 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9066 (typed_splay_tree::closure,
9067 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9068 (typed_splay_tree::typed_splay_tree,
9069 typed_splay_tree::operator =): Declared private.
9070 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9071 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9072 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9073 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9074 typed_splay_tree::splay_tree_splay,
9075 typed_splay_tree::splay_tree_foreach_helper,
9076 typed_splay_tree::splay_tree_insert,
9077 typed_splay_tree::splay_tree_remove,
9078 typed_splay_tree::splay_tree_lookup,
9079 typed_splay_tree::splay_tree_predecessor,
9080 typed_splay_tree::splay_tree_successor,
9081 typed_splay_tree::splay_tree_min,
9082 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9083 (typed_splay_tree::root, typed_splay_tree::comp,
9084 typed_splay_tree::delete_key,
9085 typed_splay_tree::delete_value): New data members.
9086 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9087 typed_splay_tree::remove.
9089 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9091 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9092 -mginv and -mno-ginv to the assembler.
9093 * config/mips/mips.opt (-mcrc): New option.
9095 * doc/invoke.text (-mcrc): Document.
9098 2018-06-15 Nick Clifton <nickc@redhat.com>
9101 * tree.c (escaped_string): New class. Converts an unescaped
9102 string into its escaped equivalent.
9103 (warn_deprecated_use): Use the new class to convert the
9104 deprecation message, if present.
9105 (test_escaped_strings): New self test.
9106 (test_c_tests): Add test_escaped_strings.
9107 * doc/extend.texi (deprecated): Add a note that the
9108 deprecation message is affected by the -fmessage-length
9109 option, and that control characters will be escaped.
9110 (#pragma GCC error): Document this pragma.
9111 (#pragma GCC warning): Likewise.
9112 * doc/invoke.texi (-fmessage-length): Document this option's
9113 effect on the #warning and #error preprocessor directives and
9114 the deprecated attribute.
9116 2018-06-15 Richard Biener <rguenther@suse.de>
9118 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9119 here, also noting vector size used.
9120 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9121 size used in MSG_OPTIMIZED_LOCATIONS dump.
9122 (pass_slp_vectorize::execute): Adjust.
9124 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9127 * config/arc/arc.c (arc_return_address_register): Fix
9130 2018-06-15 Richard Biener <rguenther@suse.de>
9133 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9134 leave useless conversion stripping to force_gimple_operand_gsi.
9135 (gimplify_build2): Likewise.
9136 (gimplify_build1): Likewise.
9138 2018-06-15 Richard Biener <rguenther@suse.de>
9141 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9142 before adjusting their block.
9144 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9146 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9147 multilibs for *-*-rtems*.
9148 * config/riscv/t-rtems: New file.
9150 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9153 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9154 unsigned_type_for returns NULL.
9157 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9158 subregs of multi-word pseudos unless the float mode has word size.
9160 2018-06-14 Richard Biener <rguenther@suse.de>
9163 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9164 duplicate and harmful type_hash_canon.
9165 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9167 2018-06-14 Richard Biener <rguenther@suse.de>
9170 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9173 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9175 * config/rtems.h (STDINT_LONG32): Define.
9177 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9178 Prachi Godbole <prachi.godbole@imgtec.com>
9180 * config/mips/mips-cpus.def: Define P6600.
9181 * config/mips/mips-tables.opt: Regenerate.
9182 * config/mips/mips.c (mips_ucbranch_type): New enum.
9183 (mips_rtx_cost_data): Add support for P6600.
9184 (mips_issue_rate): Likewise.
9185 (mips_multipass_dfa_lookahead): Likewise.
9186 (mips_avoid_hazard): Likewise.
9187 (mips_reorg_process_insns): Likewise.
9188 (mips_classify_branch_p6600): New function.
9189 * config/mips/mips.h (TUNE_P6600): New define.
9190 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9191 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9192 * config/mips/mips.md: Include p6600.md.
9193 (processor): Add p6600.
9194 * config/mips/p6600.md: New file.
9195 * doc/invoke.texi: Add p6600 to supported architectures.
9197 2018-06-13 Martin Sebor <msebor@redhat.com>
9199 PR tree-optimization/86114
9200 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9202 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9204 2018-06-13 Richard Biener <rguenther@suse.de>
9206 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9207 Properly set vector type of the intermediate stmt.
9208 * tree-vect-stmts.c (vectorizable_operation): The destination
9209 var always has vectype_out type.
9211 2018-06-13 Jeff Law <law@redhat.com>
9213 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9214 integer 0 for argument to print_rtl_with_bb.
9215 (rl78_reorg): Likewise.
9217 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9219 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9220 from rtx to rtx_insn *.
9221 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9223 (add_sched_insns_for_speculation): Likewise for local "target",
9224 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9225 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9226 from rtx_insn ** to rtx_code_label **.
9227 (reorg_emit_nops): Likewise.
9228 (c6x_reorg): Likewise for local "call_labels".
9229 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9231 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9232 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9233 the loops over LABEL_REFS.
9234 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9236 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9237 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9238 (split_branches): Strengthen local "olabel" from rtx to
9239 rtx_insn *, adding a safe_as_a cast.
9240 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9242 (add_insn_after): Likewise for first two params.
9243 (add_insn_before): Likewise.
9244 (remove_insn): Likewise for param.
9245 (emit_pattern_before_noloc): Likewise for second and third params.
9246 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9247 (emit_call_insn_before_noloc): Likewise.
9248 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9250 (emit_barrier_before): Likewise.
9251 (emit_label_before): Strengthen "label" param from "rtx" to
9252 "rtx_code_label *". Strengthen "before" param from "rtx" to
9254 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9256 (emit_pattern_after_noloc): Likewise.
9257 (emit_insn_after_noloc): Likewise.
9258 (emit_jump_insn_after_noloc): Likewise.
9259 (emit_call_insn_after_noloc): Likewise.
9260 (emit_debug_insn_after_noloc): Likewise.
9261 (emit_barrier_after): Likewise.
9262 (emit_label_after): Likewise for both params.
9263 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9264 "loc" param from "int" to "location_t".
9265 (emit_insn_after_setloc): Likewise.
9266 (emit_jump_insn_after_setloc): Likewise.
9267 (emit_call_insn_after_setloc): Likewise.
9268 (emit_debug_insn_after_setloc): Likewise.
9269 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9270 "loc" param from "int" to "location_t".
9271 (emit_pattern_before): Convert NULL_RTX to NULL.
9272 (emit_insn_before_setloc): Convert "loc" param from "int" to
9274 (emit_jump_insn_before_setloc): Likewise.
9275 (emit_call_insn_before_setloc): Likewise.
9276 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9277 rtx_insn *. Convert "loc" param from "int" to "location_t".
9278 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9279 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9280 Convert 3rd param from "int" to "location_t".
9281 (emit_barrier_before, emit_barrier_after, next_real_insn):
9282 Strengthen param from rtx to rtx_insn *.
9283 (emit_label_before): Strengthen 1st param from "rtx" to
9284 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9286 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9287 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9288 Strengthen 2nd param from "rtx" to "rtx_insn *".
9289 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9290 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9291 Likewise. Convert 3rd param from "int" to "location_t".
9292 (emit_label_after): Strengthen 1st param from "rtx" to
9294 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9296 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9297 from "rtx" to "rtx_insn *".
9299 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9301 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9302 bodies streamed in with -Q.
9303 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9304 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9305 * gimple-streamer-out.c: Include gimple-pretty-print.h
9306 (output_bb): Dump stmts streamed.
9307 * lto-section-out.c: Include print-tree.h
9308 (lto_begin_section): Dump sections created.
9309 (lto_output_decl_index): Dump decl encoded.
9310 * lto-streamer-out.c: Include print-tree.h
9311 (create_output_block): Dump output block created.
9312 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9313 (output_function): Dump function output.
9314 (output_constructor): Dump constructor streamed.
9315 (write_global_stream): Output indexes encoded.
9316 (produce_asm_for_decls): Dump streams encoded.
9317 * lto-streamer.c (streamer_dump_file): New global var.
9318 * lto-streamer.h (streamer_dump_file): Declare.
9319 * passes.c (ipa_write_summaries): Initialize streamer dump.
9320 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9323 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9326 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9327 offsets for register save directives. Emit a second batch of save
9328 directives, if need be, when the function accesses prior frames.
9330 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9332 * config/arc/fpu.md (fmasf4): Force operand to register.
9333 (fnmasf4): Likewise.
9335 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9337 * config/arc/arc-protos.h (arc_pad_return): Remove.
9338 * config/arc/arc.c (machine_function): Remove force_short_suffix
9340 (arc_print_operand): Adjust printing of '&'.
9341 (arc_verify_short): Remove conditional printing of short suffix.
9342 (arc_final_prescan_insn): Remove reference to size_reason.
9343 (pad_return): New function.
9344 (arc_reorg): Call pad_return.
9345 (arc_pad_return): Remove.
9346 (arc_init_machine_status): Remove reference to force_short_suffix.
9347 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9348 (attr length): When attribute iscompact is true force to 2
9349 regardless; in the case of maybe check if we want to force the
9350 instruction to have 4 bytes length.
9351 (nopv): Change it to generate 4 byte long nop as well.
9352 (blockage): New pattern.
9353 (simple_return): Remove call to arc_pad_return.
9354 (p_return_i): Likewise.
9356 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9358 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9360 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9362 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9365 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9367 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9368 for ARC700 and ARCv2.
9370 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9373 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9374 operands[2] instead of operands[1].
9377 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9379 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9380 case, check whether the outer register overlaps an unallocatable
9381 register, not just whether it fits the required class.
9383 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9385 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9387 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9388 (memrefs_conflict_p): Likewise.
9389 (init_alias_analysis): Likewise.
9390 * cfgexpand.c (expand_debug_expr): Likewise.
9391 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9392 * cse.c (fold_rtx): Likewise.
9393 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9394 * expr.c (emit_block_move_hints): Likewise.
9395 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9396 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9397 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9398 (emit_group_store): Likewise.
9399 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9400 to read the PRE/POST_MODIFY increment.
9401 * calls.c (store_one_arg): Use strip_offset.
9402 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9404 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9406 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9407 (simplify_binary_operation_1): Extend CONST_INT handling to
9409 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9410 than a HOST_WIDE_INT.
9411 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9413 (adjust_mems, add_stores): Update accodingly.
9414 (vt_canonicalize_addr): Track polynomial offsets.
9415 (emit_note_insn_var_location): Likewise.
9416 (vt_add_function_parameter): Likewise.
9417 (vt_initialize): Likewise.
9419 2018-06-12 Jeff Law <law@redhat.com>
9421 * config.gcc (alpha*-*-freebsd*): Remove.
9422 * config/alpha/freebsd.h: Remove.
9424 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9427 * spellcheck-tree.c (levenshtein_distance): Rename to...
9428 (get_edit_distance): ...this, and update for underlying renaming.
9429 * spellcheck-tree.h (levenshtein_distance): Rename to...
9430 (get_edit_distance): ...this.
9431 * spellcheck.c (levenshtein_distance): Rename to...
9432 (get_edit_distance): ...this. Convert from Levenshtein distance
9433 to Damerau-Levenshtein distance by supporting transpositions of
9434 adjacent characters. Rename "v1" to "v_next" and "v0" to
9436 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9437 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9438 update for underlying renaming.
9439 (selftest::levenshtein_distance_unit_test): Rename to...
9440 (selftest::test_get_edit_distance_unit): ...this, and update for
9441 underlying renaming.
9442 (selftest::test_find_closest_string): Add example from PR 69968
9443 where transposition helps
9444 (selftest::test_metric_conditions): Update for renaming.
9445 (selftest::test_metric_conditions): Likewise.
9446 (selftest::spellcheck_c_tests): Likewise.
9447 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9448 (get_edit_distance): ...this.
9449 (best_match::consider): Update for renaming.
9451 2018-06-12 Martin Sebor <msebor@redhat.com>
9453 PR tree-optimization/85259
9454 * builtins.c (compute_objsize): Handle constant offsets.
9455 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9456 true iff a warning has been issued.
9457 * gimple.h (gimple_nonartificial_location): New function.
9458 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9459 gimple_nonartificial_location and handle -Wno-system-headers.
9460 (handle_builtin_stxncpy): Same.
9462 2018-06-12 Martin Sebor <msebor@redhat.com>
9465 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9467 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9469 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9470 BUILTIN_VEC_XST entries for pointer to double and long long.
9472 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9475 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9477 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9480 2018-06-12 Martin Liska <mliska@suse.cz>
9482 * doc/options.texi: Document IntegerRange.
9484 2018-06-12 Martin Liska <mliska@suse.cz>
9486 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9487 * opt-functions.awk: Handle Deprecated flag.
9488 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9490 (read_cmdline_option): Report warning for a deprecated option.
9491 * opts.h (struct cl_option): Add new field cl_deprecated.
9492 (CL_ERR_DEPRECATED): New.
9494 2018-06-12 Martin Liska <mliska@suse.cz>
9496 * doc/options.texi: Document Deprecated option flag.
9498 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9500 * config/arc/arc-arch.h (arc_extras): New enum.
9501 (arc_cpu_t):Add field extra.
9502 (arc_cpu_types): Consider the extras.
9503 * config/arc/arc-cpus.def: Add extras info.
9504 * config/arc/arc-opts.h (processor_type): Consider extra field.
9505 * config/arc/arc.c (arc_override_options): Handle extra field.
9507 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9509 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9510 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9512 * config/arc/arc.c (arc_init): Update pic warning.
9513 (irq_range): Update irq range parsing warnings.
9514 (arc_override_options): Update various warning messages.
9515 (arc_handle_aux_attribute): Likewise.
9517 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9519 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9521 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9523 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9524 compiler messages directives.
9526 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9528 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9529 * config/mips/mips-tables.opt: Regenerate.
9530 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9532 * doc/invoke.texi: Document -march=i6500.
9534 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9536 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9537 (i6400_gpmul): Add cpu_unit.
9538 (i6400_gpdiv): Likewise.
9539 (i6400_msa_add_d): Update reservations.
9540 (i6400_msa_int_add) Likewise.
9541 (i6400_msa_short_logic3) Likewise.
9542 (i6400_msa_short_logic2) Likewise.
9543 (i6400_msa_short_logic) Likewise.
9544 (i6400_msa_move) Likewise.
9545 (i6400_msa_cmp) Likewise.
9546 (i6400_msa_short_float2) Likewise.
9547 (i6400_msa_div_d) Likewise.
9548 (i6400_msa_long_logic1) Likewise.
9549 (i6400_msa_long_logic2) Likewise.
9550 (i6400_msa_mult) Likewise.
9551 (i6400_msa_long_float2) Likewise.
9552 (i6400_msa_long_float4) Likewise.
9553 (i6400_msa_long_float5) Likewise.
9554 (i6400_msa_long_float8) Likewise.
9555 (i6400_fpu_fadd): Include frint type.
9556 (i6400_fpu_store): New define_insn_reservation.
9557 (i6400_fpu_load): Likewise.
9558 (i6400_fpu_move): Likewise.
9559 (i6400_fpu_fcmp): Likewise.
9560 (i6400_fpu_fmadd): Likewise.
9561 (i6400_int_mult): Include imul3nc type and update reservation.
9562 (i6400_int_div): Include idiv3 type and update reservation.
9563 (i6400_int_load): Update to check type not move_type.
9564 (i6400_int_store): Likewise.
9565 (i6400_int_prefetch): Set zero latency.
9567 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9569 * gcc.c: Document new %@{...} sequence.
9570 (LINK_COMMAND_SPEC): Use it for the -L switches.
9571 (cpp_unique_options): Use it for the -I switches.
9572 (at_file_argbuf): New global variable.
9573 (in_at_file): Likewise.
9574 (alloc_args): Create at_file_argbuf.
9575 (clear_args): Truncate at_file_argbuf.
9576 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9577 (open_at_file): New function.
9578 (close_at_file): Likewise.
9579 (create_at_file): Delete.
9580 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9583 (validate_switches_from_spec): Deal with %@{...} sequence.
9584 (validate_switches): Likewise.
9585 (driver::finalize): Call clear_args.
9587 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9589 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9591 2018-06-11 Martin Sebor <msebor@redhat.com>
9593 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9594 (Wno-class-memaccess): Add @opindex.
9595 (Wno-templates, Wno-multiple-inheritance): Same.
9596 (Wno-virtual-inheritance, Wno-namespaces): Same.
9597 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9598 (Wno-format-overflow, Wno-format-truncation): Same.
9599 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9600 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9601 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9602 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9603 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9604 (Wno-misspelled-isr): Same.
9606 2018-06-11 Martin Sebor <msebor@redhat.com>
9608 * PR tree-optimization/86083
9609 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9611 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9613 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9615 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9618 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9619 on the correct operand.
9620 (*movdi_internal64): Ditto.
9622 2018-06-11 Martin Liska <mliska@suse.cz>
9624 PR tree-optimization/86089
9625 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9627 2018-06-11 Julia Koval <julia.koval@intel.com>
9629 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9630 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9631 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9633 2018-06-11 Olivier Hainque <hainque@adacore.com>
9635 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9636 for Ada with strict dwarf2.
9638 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9641 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9644 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9646 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9648 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9650 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9653 2018-06-08 Martin Liska <mliska@suse.cz>
9655 * tree-cfg.h (debug_function): Fix argument type to match
9658 2018-06-08 Martin Liska <mliska@suse.cz>
9660 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9661 Remove usage of MPX-related (and removed) fields.
9662 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9664 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9666 * cfg.c (debug): Use TDF_NONE rather than 0.
9667 * cfghooks.c (debug): Likewise.
9668 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9669 (struct dump_option_value_info): Convert to...
9670 (struct kv_pair): ...this template type.
9671 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9673 (optinfo_verbosity_options): Likewise.
9674 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9676 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9677 than int for "optgroup_flags" param.
9678 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9680 (dump_dec): Likewise.
9681 (dump_finish): Use TDF_NONE rather than 0.
9682 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9683 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9684 than 0. Update for change to option_ptr.
9685 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9686 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9687 0. Update for changes to optinfo_verbosity_options and
9689 (opt_info_switch_p): Convert optgroup_flags from int to
9691 (dump_basic_block): Use dump_flags_t rather than int
9692 for "dump_kind" param.
9693 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9694 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9695 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9696 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9697 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9698 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9699 TDF_NONE): Convert from macros to...
9700 (enum dump_flag): ...this new enum.
9701 (dump_flags_t): Update to use enum.
9702 (operator|, operator&, operator~, operator|=, operator&=):
9703 Implement for dump_flags_t.
9704 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9705 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9706 Convert from macros to...
9707 (enum optgroup_flag): ...this new enum.
9708 (optgroup_flags_t): New typedef.
9709 (operator|, operator|=): Implement for optgroup_flags_t.
9710 (struct dump_file_info): Convert field "alt_flags" to
9711 dump_flags_t. Convert field "optgroup_flags" to
9713 (dump_basic_block): Use dump_flags_t rather than int for param.
9714 (dump_generic_expr_loc): Likewise.
9715 (dump_dec): Likewise.
9716 (dump_register): Convert param "optgroup_flags" to
9718 (opt_info_enable_passes): Likewise.
9719 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9721 * gimple-pretty-print.c (debug): Likewise.
9722 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9723 (merged_store_group::apply_stores): Likewise.
9724 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9725 * gimple.c (verify_gimple_pp): Likewise.
9726 * graphite-poly.c (print_pbb_body): Likewise.
9727 * passes.c (pass_manager::register_one_dump_file): Convert
9728 local "optgroup_flags" to optgroup_flags_t.
9729 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9731 (debug_body): Likewise.
9732 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9733 to optgroup_flags_t.
9734 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9736 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9737 (convert_mult_to_fma): Likewise.
9738 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9739 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9740 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9741 "dump_kind" to dump_flags_t.
9743 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9745 * config/rs6000/rs6000.c (min, max): Delete.
9747 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9749 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9750 -mabi=spe and -mabi=no-spe.
9752 2018-06-08 Martin Liska <mliska@suse.cz>
9754 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9755 where we expect an existing summary.
9757 2018-06-08 Martin Liska <mliska@suse.cz>
9759 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9760 * ipa-inline.h (estimate_edge_growth): Likewise.
9762 2018-06-08 Martin Liska <mliska@suse.cz>
9764 * cgraph.c (function_version_hasher::hash): Use
9765 cgraph_node::get_uid ().
9766 (function_version_hasher::equal):
9767 * cgraph.h (cgraph_node::get_uid): New method.
9768 * ipa-inline.c (update_caller_keys): Use
9769 cgraph_node::get_uid ().
9770 (update_callee_keys): Likewise.
9771 * ipa-utils.c (searchc): Likewise.
9772 (ipa_reduced_postorder): Likewise.
9773 * lto-cgraph.c (input_node): Likewise.
9774 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9775 * symbol-summary.h (symtab_insertion): Likewise.
9776 (symtab_removal): Likewise.
9777 (symtab_duplication): Likewise.
9778 * tree-pretty-print.c (dump_function_header): Likewise.
9779 * tree-sra.c (convert_callers_for_node): Likewise.
9781 2018-06-08 Martin Liska <mliska@suse.cz>
9783 * cgraph.c (symbol_table::create_edge): Always assign a new
9785 (symbol_table::free_edge): Do not recycle numbers.
9786 * cgraph.h (cgraph_edge::get): New method.
9787 * symbol-summary.h (symtab_removal): Use it.
9788 (symtab_duplication): Likewise.
9789 (call_summary::hashable_uid): Remove.
9791 2018-06-08 Martin Liska <mliska@suse.cz>
9793 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9794 (initialize_growth_caches): Remove.
9795 (free_growth_caches): Likewise.
9796 (do_estimate_edge_time): Use edge_growth_cache.
9797 (do_estimate_edge_size): Likewise.
9798 (do_estimate_edge_hints): Likewise.
9799 * ipa-inline.c (reset_edge_caches): Likewise.
9800 (recursive_inlining): Likewise.
9801 (inline_small_functions): Likewise.
9802 * ipa-inline.h (initialize_growth_caches): Remove.
9803 (estimate_edge_size): Likewise.
9804 (estimate_edge_time): Likewise.
9805 (estimate_edge_hints): Likewise.
9806 (reset_edge_growth_cache): Likewise.
9807 * symbol-summary.h (call_summary::remove): New method.
9809 2018-06-08 Martin Liska <mliska@suse.cz>
9811 * ipa-cp.c (class edge_clone_summary): New summary.
9812 (grow_edge_clone_vectors): Remove.
9813 (ipcp_edge_duplication_hook): Remove.
9814 (class edge_clone_summary_t): New call_summary class.
9815 (ipcp_edge_removal_hook): Remove.
9816 (edge_clone_summary_t::duplicate): New function.
9817 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9818 (create_specialized_node): Likewise.
9819 (ipcp_driver): Initialize edge_clone_summaries and do not
9822 2018-06-08 Martin Liska <mliska@suse.cz>
9824 * symbol-summary.h (get): New function.
9825 (call_summary::m_initialize_when_cloning): New class member.
9827 2018-06-08 Martin Liska <mliska@suse.cz>
9829 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9830 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9831 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9832 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9833 (remove_cgraph_node_from_order): Use the removed_nodes set.
9834 (do_per_function_toporder): Likwise.
9835 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9836 instead of summary_uid.
9837 (symtab_removal): Likewise.
9838 (symtab_duplication): Likewise.
9840 2018-06-08 Martin Liska <mliska@suse.cz>
9842 * ipa-cp.c (ipcp_store_bits_results): Use
9843 ipcp_transformation_sum.
9844 (ipcp_store_vr_results): Likewise.
9845 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9847 (ipcp_transformation_initialize): ... this.
9848 (ipa_set_node_agg_value_chain):
9849 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9850 (write_ipcp_transformation_info): Likewise.
9851 (read_ipcp_transformation_info): Likewise.
9852 (ipcp_update_bits): Likewise.
9853 (ipcp_update_vr): Likewise.
9854 (ipcp_transform_function): Likewise.
9855 * ipa-prop.h: Rename ipcp_transformation_summary to
9856 ipcp_transformation.
9857 (class ipcp_transformation_t): New function summary.
9858 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9859 (ipa_get_agg_replacements_for_node): Likewise.
9861 2018-06-08 Martin Liska <mliska@suse.cz>
9863 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9865 (class funct_state_summary_t): New function_summary class.
9866 (has_function_state): Remove.
9867 (get_function_state): Likewise.
9868 (set_function_state): Likewise.
9869 (add_new_function): Likewise.
9870 (funct_state_summary_t::insert): New function.
9871 (duplicate_node_data): Remove.
9872 (remove_node_data): Remove.
9873 (funct_state_summary_t::duplicate): New function.
9874 (register_hooks): Create new funct_state_summaries.
9875 (pure_const_generate_summary): Use it.
9876 (pure_const_write_summary): Likewise.
9877 (pure_const_read_summary): Likewise.
9878 (propagate_pure_const): Likewise.
9879 (propagate_nothrow): Likewise.
9880 (dump_malloc_lattice): Likewise.
9881 (propagate_malloc): Likewise.
9882 (execute): Do not register hooks, just remove summary
9884 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9887 2018-06-08 Martin Liska <mliska@suse.cz>
9889 * ipa-reference.c (remove_node_data): Remove.
9890 (duplicate_node_data): Likewise.
9891 (class ipa_ref_var_info_summary_t): New class.
9892 (class ipa_ref_opt_summary_t): Likewise.
9893 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9894 (get_reference_optimization_summary): Use
9895 ipa_ref_opt_sum_summaries.
9896 (set_reference_vars_info): Remove.
9897 (set_reference_optimization_summary): Likewise.
9898 (ipa_init): Create summaries.
9899 (init_function_info): Use function summary.
9900 (ipa_ref_opt_summary_t::duplicate): New function.
9901 (ipa_ref_opt_summary_t::remove): New function.
9902 (get_read_write_all_from_node): Fix GNU coding style.
9903 (propagate): Use function summary.
9904 (write_node_summary_p): Fix GNU coding style.
9905 (stream_out_bitmap): Likewise.
9906 (ipa_reference_read_optimization_summary): Use function summary.
9907 (ipa_reference_c_finalize): Do not release hooks.
9909 2018-06-08 Martin Liska <mliska@suse.cz>
9911 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9912 (analyze_function_body): Extract multiple calls of get_create.
9913 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9914 * ipa-inline.c (recursive_inlining): Use ::get method.
9915 * ipa-inline.h (estimate_edge_growth): Likewise.
9917 2018-06-08 Martin Liska <mliska@suse.cz>
9919 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9921 (hsa_function_summary::hsa_function_summary): Use the new enum
9923 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9924 * hsa-gen.c (hsa_get_host_function): Likewise.
9925 (get_brig_function_name): Likewise.
9926 * ipa-hsa.c (process_hsa_functions): Likewise.
9927 (ipa_hsa_write_summary): Likewise.
9928 * symbol-summary.h (symtab_duplication): Use ::get function/
9929 (get): New function.
9931 2018-06-08 Martin Liska <mliska@suse.cz>
9933 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9935 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9936 (hsa_register_kernel): Likewise.
9937 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9938 * hsa-gen.c (hsa_get_host_function): Likewise.
9939 (get_brig_function_name): Likewise.
9940 (generate_hsa): Likewise.
9941 (pass_gen_hsail::execute): Likewise.
9942 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9943 (devirtualization_time_bonus): Likewise.
9944 (ipcp_propagate_stage): Likewise.
9945 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9946 (edge_set_predicate): Likewise.
9947 (evaluate_conditions_for_known_args): Likewise.
9948 (evaluate_properties_for_edge): Likewise.
9949 (ipa_fn_summary::reset): Likewise.
9950 (ipa_fn_summary_t::duplicate): Likewise.
9951 (dump_ipa_call_summary): Likewise.
9952 (ipa_dump_fn_summary): Likewise.
9953 (analyze_function_body): Likewise.
9954 (compute_fn_summary): Likewise.
9955 (estimate_edge_devirt_benefit): Likewise.
9956 (estimate_edge_size_and_time): Likewise.
9957 (estimate_calls_size_and_time): Likewise.
9958 (estimate_node_size_and_time): Likewise.
9959 (inline_update_callee_summaries): Likewise.
9960 (remap_edge_change_prob): Likewise.
9961 (remap_edge_summaries): Likewise.
9962 (ipa_merge_fn_summary_after_inlining): Likewise.
9963 (ipa_update_overall_fn_summary): Likewise.
9964 (read_ipa_call_summary): Likewise.
9965 (inline_read_section): Likewise.
9966 (write_ipa_call_summary): Likewise.
9967 (ipa_fn_summary_write): Likewise.
9968 (ipa_free_fn_summary): Likewise.
9969 * ipa-hsa.c (process_hsa_functions): Likewise.
9970 (ipa_hsa_write_summary): Likewise.
9971 (ipa_hsa_read_section): Likewise.
9972 * ipa-icf.c (sem_function::merge): Likewise.
9973 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9974 (do_estimate_edge_time): Likewise.
9975 (estimate_size_after_inlining): Likewise.
9976 (estimate_growth): Likewise.
9977 (growth_likely_positive): Likewise.
9978 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9979 (inline_call): Likewise.
9980 * ipa-inline.c (caller_growth_limits): Likewise.
9981 (can_inline_edge_p): Likewise.
9982 (can_inline_edge_by_limits_p): Likewise.
9983 (compute_uninlined_call_time): Likewise.
9984 (compute_inlined_call_time): Likewise.
9985 (want_inline_small_function_p): Likewise.
9986 (edge_badness): Likewise.
9987 (update_caller_keys): Likewise.
9988 (update_callee_keys): Likewise.
9989 (recursive_inlining): Likewise.
9990 (inline_small_functions): Likewise.
9991 (inline_to_all_callers_1): Likewise.
9992 (dump_overall_stats): Likewise.
9993 (early_inline_small_functions): Likewise.
9994 (early_inliner): Likewise.
9995 * ipa-inline.h (estimate_edge_growth): Likewise.
9996 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9997 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9998 * ipa-prop.h (IPA_NODE_REF): Likewise.
9999 (IPA_EDGE_REF): Likewise.
10000 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10001 (propagate_malloc): Likewise.
10002 * ipa-split.c (execute_split_functions): Likewise.
10003 * symbol-summary.h: Rename get to get_create.
10005 (get_create): Likewise.
10006 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10008 2018-06-08 Martin Liska <mliska@suse.cz>
10010 * symbol-summary.h (release): Move definition out of class
10012 (symtab_removal): Likewise.
10013 (symtab_duplication): Likewise.
10015 2018-06-08 Martin Liska <mliska@suse.cz>
10017 * symbol-summary.h (function_summary): Move constructor
10018 implementation out of class declaration.
10019 (release): Likewise.
10020 (symtab_insertion): Likewise.
10021 (symtab_removal): Likewise.
10022 (symtab_duplication): Likewise.
10025 2018-06-08 Martin Liska <mliska@suse.cz>
10027 * Makefile.in: Remove support for MPX (macros, related functions,
10028 fields in cgraph_node, ...).
10029 * builtin-types.def (BT_BND): Likewise.
10030 (BT_FN_BND_CONST_PTR): Likewise.
10031 (BT_FN_CONST_PTR_BND): Likewise.
10032 (BT_FN_VOID_PTR_BND): Likewise.
10033 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10034 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10035 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10036 (expand_builtin_mempcpy_with_bounds): Likewise.
10037 (expand_builtin_memset_with_bounds): Likewise.
10038 (expand_builtin_memset_args): Likewise.
10039 (std_expand_builtin_va_start): Likewise.
10040 (expand_builtin): Likewise.
10041 (expand_builtin_with_bounds): Likewise.
10042 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10043 (DEF_LIB_BUILTIN_CHKP): Likewise.
10044 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10045 (DEF_CHKP_BUILTIN): Likewise.
10046 (BUILT_IN_MEMCPY): Likewise.
10047 (BUILT_IN_MEMMOVE): Likewise.
10048 (BUILT_IN_MEMPCPY): Likewise.
10049 (BUILT_IN_MEMSET): Likewise.
10050 (BUILT_IN_STPCPY): Likewise.
10051 (BUILT_IN_STRCAT): Likewise.
10052 (BUILT_IN_STRCHR): Likewise.
10053 (BUILT_IN_STRCPY): Likewise.
10054 (BUILT_IN_STRLEN): Likewise.
10055 (BUILT_IN_MEMCPY_CHK): Likewise.
10056 (BUILT_IN_MEMMOVE_CHK): Likewise.
10057 (BUILT_IN_MEMPCPY_CHK): Likewise.
10058 (BUILT_IN_MEMSET_CHK): Likewise.
10059 (BUILT_IN_STPCPY_CHK): Likewise.
10060 (BUILT_IN_STRCAT_CHK): Likewise.
10061 (BUILT_IN_STRCPY_CHK): Likewise.
10062 * calls.c (store_bounds): Likewise.
10063 (emit_call_1): Likewise.
10064 (special_function_p): Likewise.
10065 (maybe_warn_nonstring_arg): Likewise.
10066 (initialize_argument_information): Likewise.
10067 (finalize_must_preallocate): Likewise.
10068 (compute_argument_addresses): Likewise.
10069 (expand_call): Likewise.
10070 * cfgexpand.c (expand_call_stmt): Likewise.
10071 (expand_return): Likewise.
10072 (expand_gimple_stmt_1): Likewise.
10073 (pass_expand::execute): Likewise.
10074 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10075 (cgraph_node::remove): Likewise.
10076 (cgraph_node::dump): Likewise.
10077 (cgraph_node::verify_node): Likewise.
10078 * cgraph.h (chkp_function_instrumented_p): Likewise.
10079 (symtab_node::get_alias_target): Likewise.
10080 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10081 (cgraph_local_p): Likewise.
10082 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10083 (cgraph_edge::rebuild_references): Likewise.
10084 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10085 (walk_polymorphic_call_targets): Likewise.
10086 (cgraph_node::expand_thunk): Likewise.
10087 (symbol_table::output_weakrefs): Likewise.
10088 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10089 (ix86_handle_option): Likewise.
10090 * config/i386/constraints.md: Likewise.
10091 * config/i386/i386-builtin-types.def (BND): Likewise.
10095 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10096 (BDESC_FIRST): Likewise.
10098 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10099 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10100 * config/i386/i386.c (enum reg_class): Likewise.
10101 (ix86_target_string): Likewise.
10102 (ix86_option_override_internal): Likewise.
10103 (ix86_conditional_register_usage): Likewise.
10104 (ix86_valid_target_attribute_inner_p): Likewise.
10105 (ix86_set_indirect_branch_type): Likewise.
10106 (ix86_set_current_function): Likewise.
10107 (ix86_function_arg_regno_p): Likewise.
10108 (init_cumulative_args): Likewise.
10109 (ix86_function_arg_advance): Likewise.
10110 (ix86_function_arg): Likewise.
10111 (ix86_pass_by_reference): Likewise.
10112 (ix86_function_value_regno_p): Likewise.
10113 (ix86_function_value_1): Likewise.
10114 (ix86_function_value_bounds): Likewise.
10115 (ix86_return_in_memory): Likewise.
10116 (ix86_setup_incoming_vararg_bounds): Likewise.
10117 (ix86_va_start): Likewise.
10118 (indirect_thunk_need_prefix): Likewise.
10119 (print_reg): Likewise.
10120 (ix86_print_operand): Likewise.
10121 (ix86_expand_call): Likewise.
10122 (ix86_output_function_return): Likewise.
10123 (reg_encoded_number): Likewise.
10124 (BDESC_VERIFYS): Likewise.
10125 (ix86_init_mpx_builtins): Likewise.
10126 (ix86_init_builtins): Likewise.
10127 (ix86_emit_cmove): Likewise.
10128 (ix86_emit_move_max): Likewise.
10129 (ix86_expand_builtin): Likewise.
10130 (ix86_builtin_mpx_function): Likewise.
10131 (ix86_get_arg_address_for_bt): Likewise.
10132 (ix86_load_bounds): Likewise.
10133 (ix86_store_bounds): Likewise.
10134 (ix86_load_returned_bounds): Likewise.
10135 (ix86_store_returned_bounds): Likewise.
10136 (ix86_class_likely_spilled_p): Likewise.
10137 (ix86_hard_regno_mode_ok): Likewise.
10138 (x86_order_regs_for_local_alloc): Likewise.
10139 (ix86_mitigate_rop): Likewise.
10140 (ix86_bnd_prefixed_insn_p): Likewise.
10141 (ix86_mpx_bound_mode): Likewise.
10142 (ix86_make_bounds_constant): Likewise.
10143 (ix86_initialize_bounds): Likewise.
10144 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10145 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10146 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10147 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10148 (TARGET_CHKP_BOUND_MODE): Likewise.
10149 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10150 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10151 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10152 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10153 * config/i386/i386.h (TARGET_MPX): Likewise.
10154 (TARGET_MPX_P): Likewise.
10155 (VALID_BND_REG_MODE): Likewise.
10156 (FIRST_BND_REG): Likewise.
10157 (LAST_BND_REG): Likewise.
10158 (enum reg_class): Likewise.
10159 (BND_REG_P): Likewise.
10160 (BND_REGNO_P): Likewise.
10161 (BNDmode): Likewise.
10162 (ADJUST_INSN_LENGTH): Likewise.
10163 * config/i386/i386.md: Likewise.
10164 * config/i386/i386.opt: Likewise.
10165 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10166 (defined): Likewise.
10167 (LINK_MPX): Likewise.
10168 (MPX_SPEC): Likewise.
10169 (LIBMPX_SPEC): Likewise.
10170 (LIBMPXWRAPPERS_SPEC): Likewise.
10171 (CHKP_SPEC): Likewise.
10172 * config/i386/predicates.md: Likewise.
10173 * dbxout.c (dbxout_type): Likewise.
10174 * doc/extend.texi: Likewise.
10175 * doc/invoke.texi: Likewise.
10176 * doc/md.texi: Likewise.
10177 * doc/tm.texi: Likewise.
10178 * doc/tm.texi.in: Likewise.
10179 * dwarf2out.c (is_base_type): Likewise.
10180 (gen_formal_types_die): Likewise.
10181 (gen_subprogram_die): Likewise.
10182 (gen_type_die_with_usage): Likewise.
10183 (gen_decl_die): Likewise.
10184 (dwarf2out_late_global_decl): Likewise.
10185 * expr.c (expand_assignment): Likewise.
10186 (emit_storent_insn): Likewise.
10187 (store_expr_with_bounds): Likewise.
10188 (store_expr): Likewise.
10189 (expand_expr_real_1): Likewise.
10190 * expr.h (store_expr_with_bounds): Likewise.
10191 * function.c (use_register_for_decl): Likewise.
10192 (struct bounds_parm_data): Likewise.
10193 (assign_parms_augmented_arg_list): Likewise.
10194 (assign_parm_find_entry_rtl): Likewise.
10195 (assign_parm_is_stack_parm): Likewise.
10196 (assign_parm_load_bounds): Likewise.
10197 (assign_bounds): Likewise.
10198 (assign_parms): Likewise.
10199 (expand_function_start): Likewise.
10200 * gcc.c (CHKP_SPEC): Likewise.
10201 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10202 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10203 (wrestrict_dom_walker::check_call): Likewise.
10204 * gimple.c (gimple_build_call_from_tree): Likewise.
10205 * gimple.h (enum gf_mask): Likewise.
10206 (gimple_call_with_bounds_p): Likewise.
10207 (gimple_call_set_with_bounds): Likewise.
10208 * gimplify.c (gimplify_init_constructor): Likewise.
10209 * ipa-cp.c (initialize_node_lattices): Likewise.
10210 (propagate_constants_across_call): Likewise.
10211 (find_more_scalar_values_for_callers_subset): Likewise.
10212 * ipa-hsa.c (process_hsa_functions): Likewise.
10213 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10214 * ipa-icf.c (sem_function::merge): Likewise.
10215 * ipa-inline.c (early_inliner): Likewise.
10216 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10217 (warn_function_cold): Likewise.
10218 (propagate_pure_const): Likewise.
10219 * ipa-ref.h (enum GTY): Likewise.
10220 * ipa-split.c (find_retbnd): Likewise.
10221 (consider_split): Likewise.
10222 (split_function): Likewise.
10223 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10224 * ipa.c (walk_polymorphic_call_targets): Likewise.
10225 (symbol_table::remove_unreachable_nodes): Likewise.
10226 (process_references): Likewise.
10227 (cgraph_build_static_cdtor_1): Likewise.
10228 * lto-cgraph.c (lto_output_node): Likewise.
10229 (output_refs): Likewise.
10230 (compute_ltrans_boundary): Likewise.
10231 (input_overwrite_node): Likewise.
10232 (input_node): Likewise.
10233 (input_cgraph_1): Likewise.
10234 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10235 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10236 (class pass_chkp_instrumentation_passes): Likewise.
10237 (make_pass_chkp_instrumentation_passes): Likewise.
10238 * passes.def: Likewise.
10239 * rtl.h (struct GTY): Likewise.
10240 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10241 * stor-layout.c (layout_type): Likewise.
10242 * symtab.c: Likewise.
10243 * target.def: Likewise.
10244 * targhooks.c (default_chkp_bound_type): Likewise.
10245 (default_chkp_bound_mode): Likewise.
10246 (default_builtin_chkp_function): Likewise.
10247 (default_chkp_function_value_bounds): Likewise.
10248 (default_chkp_make_bounds_constant): Likewise.
10249 (default_chkp_initialize_bounds): Likewise.
10250 * targhooks.h (default_chkp_bound_type): Likewise.
10251 (default_chkp_bound_mode): Likewise.
10252 (default_builtin_chkp_function): Likewise.
10253 (default_chkp_function_value_bounds): Likewise.
10254 (default_chkp_make_bounds_constant): Likewise.
10255 (default_chkp_initialize_bounds): Likewise.
10256 * toplev.c (compile_file): Likewise.
10257 (process_options): Likewise.
10258 * tree-core.h (DEF_BUILTIN): Likewise.
10259 (DEF_BUILTIN_CHKP): Likewise.
10260 * tree-inline.c (declare_return_variable): Likewise.
10261 (remap_gimple_stmt): Likewise.
10262 (copy_bb): Likewise.
10263 (initialize_inlined_parameters): Likewise.
10264 (expand_call_inline): Likewise.
10265 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10266 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10267 (make_pass_ipa_chkp_produce_thunks): Likewise.
10268 (make_pass_chkp): Likewise.
10269 (make_pass_chkp_opt): Likewise.
10270 (make_pass_chkp_instrumentation_passes): Likewise.
10271 * tree-pretty-print.c (dump_generic_node): Likewise.
10272 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10273 * tree-ssa-dce.c (propagate_necessity): Likewise.
10274 (eliminate_unnecessary_stmts): Likewise.
10275 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10276 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10277 * tree-ssa-sccvn.h: Likewise.
10278 * tree-ssa-strlen.c (get_string_length): Likewise.
10279 (valid_builtin_call): Likewise.
10280 (adjust_last_stmt): Likewise.
10281 (handle_builtin_strchr): Likewise.
10282 (handle_builtin_strcpy): Likewise.
10283 (handle_builtin_stxncpy): Likewise.
10284 (handle_builtin_memcpy): Likewise.
10285 (handle_builtin_strcat): Likewise.
10286 (strlen_check_and_optimize_stmt): Likewise.
10287 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10288 * tree-streamer-in.c: Likewise.
10289 * tree-streamer.c (record_common_node): Likewise.
10290 * tree.c (tree_code_size): Likewise.
10291 (wide_int_to_tree_1): Likewise.
10292 (type_contains_placeholder_1): Likewise.
10293 (build_common_tree_nodes): Likewise.
10294 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10295 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10296 (POINTER_BOUNDS_P): Likewise.
10297 (BOUNDED_TYPE_P): Likewise.
10298 (BOUNDED_P): Likewise.
10299 (CALL_WITH_BOUNDS_P): Likewise.
10300 (pointer_bounds_type_node): Likewise.
10301 * value-prof.c (gimple_ic): Likewise.
10302 * var-tracking.c (vt_add_function_parameters): Likewise.
10303 * varasm.c (make_decl_rtl): Likewise.
10304 (assemble_start_function): Likewise.
10305 (output_constant): Likewise.
10306 (maybe_assemble_visibility): Likewise.
10307 * varpool.c (ctor_for_folding): Likewise.
10308 * chkp-builtins.def: Remove.
10309 * ipa-chkp.c: Remove.
10310 * ipa-chkp.h: Remove.
10311 * rtl-chkp.c: Remove.
10312 * rtl-chkp.h: Remove.
10313 * tree-chkp-opt.c: Remove.
10314 * tree-chkp.c: Remove.
10315 * tree-chkp.h: Remove.
10317 2018-06-07 Carl Love <cel@us.ibm.com>
10319 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10320 vextract_fp_from_shortl): Add BE support.
10322 2018-06-07 Paul Koning <ni1d@arrl.net>
10324 * compare-elim.c (try_merge_compare): Don't merge compare if
10325 address contains a side effect.
10326 (try_eliminate_compare): Likewise.
10328 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10330 * config.gcc: Support "tremont".
10331 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10332 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10334 * config/i386/i386.c (m_TREMONT): Define.
10335 (processor_target_table): Add "tremont".
10336 (PTA_TREMONT): Define.
10337 (ix86_lea_outperforms): Add TARGET_TREMONT.
10338 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10339 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10340 and M_INTEL_GOLDMONT_PLUS.
10341 (fold_builtin_cpu): Add "tremont".
10342 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10343 (ix86_option_override_internal): Add "tremont".
10344 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10345 (processor_type): Add PROCESSOR_TREMONT.
10346 * config/i386/x86-tune.def: Add m_TREMONT.
10347 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10349 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10351 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10352 symbol defined for msp430i* devices to be lower case.
10354 2018-06-07 Richard Biener <rguenther@suse.de>
10356 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10357 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10358 Properly wrap signed arithmetic if overflow wraps.
10360 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10362 PR tree-optimization/69615
10363 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10364 of a cast from a same precision integral SSA_NAME in a bb dominated
10365 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10366 cast to utype if rhs2 has already a compatible type.
10368 2018-06-07 Richard Biener <rguenther@suse.de>
10370 PR tree-optimization/85935
10371 * graphite-scop-detection.c (find_params_in_bb): Analyze
10372 condition operands with respect to the correct loop. Assert
10373 the analysis doesn't fail.
10375 2018-06-04 Carl Love <cel@us.ibm.com>
10377 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10378 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10379 as it is slightly cheaper.
10380 (first_match_or_eos_index_<mode>):
10381 Calculate index using natural element order.
10382 (first_match_index_<mode>):
10383 Calculate index using natural element order.
10384 (first_match_or_eos_index_<mode>):
10385 Calculate index using natural order.
10386 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10387 for BE and LE modes.
10388 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10389 P9V_BUILTIN_VCLZLSBB_V16QI.
10390 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10393 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10395 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10396 indentation and line wrap for many prototypes. Add missing
10397 @smallexample directives around block of prototypes for vec_xl and
10400 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10402 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10403 track if we pass or return IEEE 128-bit floating point.
10404 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10405 C++ mangling that is compatible with GCC 8.1.
10406 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10407 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10408 floating point types.
10409 (rs6000_function_arg_advance_1): Likewise.
10410 (rs6000_mangle_type): Optionally generate mangled names that match
10411 what GCC 8.1 generated for IEEE 128-bit floating point types.
10412 (rs6000_globalize_decl_name): If we have an external function that
10413 passes or returns IEEE 128-bit types, generate a weak reference
10414 from the mangled name used in GCC 8.1 to the current mangled
10416 (rs6000_init_builtins): Make __ibm128 use the long double type if
10417 long double is IBM extended double. Make __float128 use the long
10418 double type if long double is IEEE 128-bit.
10421 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10422 macro for __ibm128 built-in functions.
10423 (PACK_IF): Add __ibm128 pack/unpack functions.
10424 (UNPACK_IF): Likewise.
10425 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10426 enable long double built-in functions if long double is IEEE
10427 128-bit floating point.
10428 (rs6000_invalid_builtin): Update long double built-in function
10430 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10431 functions, adjust the built-in function to use the long double
10432 built-in function if __ibm128 and long double are the same type.
10433 * doc/extend.texi (PowerPC builtins): Update documention for
10434 __builtin_{,un}pack_longdouble. Add documentation for
10435 __builtin_{,un}pack_ibm128.
10437 2018-06-06 Jim Wilson <jimw@sifive.com>
10439 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10440 (struct machine_function): New field interrupt_mode.
10441 (riscv_handle_type_attribute): New function. Add forward declaration.
10442 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10443 (riscv_expand_epilogue): Check interrupt_mode field.
10444 (riscv_set_current_function): Check interrupt attribute args and
10445 set interrupt_mode field.
10446 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10447 (riscv_sret, riscv_uret): New.
10448 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10449 new arguments to interrupt attribute.
10451 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10454 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10455 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10457 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10459 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10460 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10461 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10462 several redundant entries.
10464 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10466 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10467 type from "rtx" to "rtx_insn *".
10468 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10469 for local "call_insn", removing cast.
10470 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10472 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10474 PR tree-optimization/86066
10475 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10476 for BIT_INSERT_EXPR stores.
10478 2018-06-06 Richard Biener <rguenther@suse.de>
10480 PR tree-optimization/86062
10481 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10482 component refs ontop
10483 of to be offsetted base.
10485 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10487 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10488 to be static and remove check on interrupt attribute name.
10490 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10492 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10493 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10495 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10498 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10500 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10501 Remove second argument, change how error is called.
10502 (aarch64_layout_arg): Remove second argument from
10503 aarch64_err_no_fpadvsimd call.
10504 (aarch64_init_cumulative_args): Ditto.
10505 (aarch64_gimplify_va_arg_expr): Ditto.
10506 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10508 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10510 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10511 (*simple_return_indirect_internal<mode>): Rename from
10512 simple_return_indirect_internal. Use W mode iterator.
10513 (rstorssp): New expander.
10514 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10515 (clrssbsy): New expander.
10516 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10518 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10520 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10522 (cmse_check_pointed_object): Likewise.
10524 2018-06-05 Martin Liska <mliska@suse.cz>
10526 PR gcov-profile/47618
10527 * doc/invoke.texi: Document how -fprofile-dir format
10530 2018-06-05 Richard Biener <rguenther@suse.de>
10532 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10533 removal pretend DOM info isn't available so we do not update
10534 it and only remove edges, not dominated blocks. Actually free
10535 DOM info in case we removed something. Remove unreachable blocks.
10536 (mfb_keep_latches): Work with either DOM info or marked backedges.
10537 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10538 first. Mark backedges if DOM info isn't available.
10539 (Re-)compute DOM info after cleanup_control_flow_pre.
10541 2018-06-05 Richard Biener <rguenther@suse.de>
10543 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10544 (locus_discrim_hasher::hash): Adjust.
10545 (locus_discrim_hasher::equal): Likewise.
10546 (next_discriminator_for_locus): Work on line directly.
10547 (same_line_p): Pass in expanded locus1 as well.
10548 (assign_discriminators): Avoid redundant location expansions.
10550 2018-06-05 Richard Biener <rguenther@suse.de>
10552 PR tree-optimization/86046
10553 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10554 if required after clearing TREE_ADDRESSABLE.
10556 2018-06-05 Richard Biener <rguenther@suse.de>
10558 PR tree-optimization/86047
10559 * tree-ssa-loop.c (for_each_index): Glob handling of all
10560 decls and constants and really handle all of them.
10562 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10565 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10566 qualifier_void_pointer and qualifier_const_void_pointer.
10567 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10568 (arm_init_builtins): Handle the above.
10569 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10570 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10571 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10574 2018-06-05 Martin Liska <mliska@suse.cz>
10576 * auto-profile.c (read_autofdo_file): Do not use
10577 gcov_ctr_summary struct.
10578 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10579 * coverage.c (struct counts_entry): Likewise.
10580 (read_counts_file): Read just single summary entry.
10581 (get_coverage_counts): Use gcov_summary struct.
10582 * coverage.h (get_coverage_counts): Likewise.
10583 * gcov-dump.c (dump_working_sets): Likewise.
10584 (tag_summary): Dump just single summary.
10585 * gcov-io.c (gcov_write_summary): Write just histogram
10587 (gcov_read_summary): Read just single summary.
10588 (compute_working_sets): Use gcov_summary struct.
10589 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10590 of GCOV_COUNTERS_SUMMABLE.
10591 (GCOV_COUNTERS_SUMMABLE): Remove.
10592 (GCOV_FIRST_VALUE_COUNTER): Replace with
10593 GCOV_COUNTER_V_INTERVAL.
10594 (struct gcov_ctr_summary): Remove.
10595 (struct gcov_summary): Directly use fields of former
10597 (compute_working_sets): Use gcov_summary struct.
10598 * gcov.c (read_count_file): Do not use ctrs fields.
10599 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10601 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10603 * profile.c: Likewise.
10604 * profile.h: Likewise.
10606 2018-06-05 Martin Liska <mliska@suse.cz>
10608 PR gcov-profile/84846
10609 * gcov.c (output_lines): Print working directory only
10610 in intermediate format.
10612 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10614 * config/s390/s390-builtin-types.def: Add void function type.
10615 * config/s390/s390-builtins.def: Use the function type for the
10618 2018-06-04 Jim Wilson <jimw@sifive.com>
10620 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10622 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10623 and maybe_eh_return. Change regno to unsigned int. Use new args to
10624 handle EH_RETURN_DATA_REGNO registers properly.
10625 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10626 (riscv_expand_epilogue): Update comment. Change argument name and
10627 type. Update code to use new name and type. Pass new args to
10628 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10630 * config/riscv/riscv.md (NORMAL_RETURN): New.
10631 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10632 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10633 (eh_return): Call gen_eh_return_internal and emit barrier.
10634 (eh_return_internal): Call riscv_expand_epilogue.
10636 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10638 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10639 bit_insertion field and declare can_be_merged_into method.
10640 (merged_store_group::can_be_merged_into): New method.
10641 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10642 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10643 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10645 2018-06-04 Richard Biener <rguenther@suse.de>
10647 PR tree-optimization/85955
10648 * builtins.c (fold_builtin_sincos): Convert pointers to
10649 destination to appropriate type before dereferencing.
10651 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10653 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10655 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10657 * expr.c (expand_expr_real_1): Force the operand into memory if
10658 its TYPE_MODE is BLKmode and if there is no integer mode for
10659 the number of bits being extracted.
10661 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10665 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10666 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10668 2018-06-04 Richard Biener <rguenther@suse.de>
10670 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10671 (cleanup_tree_cfg_noloop): ... single caller. Do
10672 start_recording_case_labels later.
10674 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10676 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10677 to _IMMINTRIN_H_INCLUDED.
10678 * config/i386/pconfigintrin.h: Ditto.
10679 * config/i386/waitpkgintrin.h: Ditto.
10680 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10681 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10682 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10683 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10684 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10685 waitpkgintrin.h and cldemoteintrin.h.
10687 2018-06-04 Richard Biener <rguenther@suse.de>
10689 PR tree-optimization/86038
10690 * tracer.c (find_best_successor): Check probability for
10691 being initialized, bail out if not.
10693 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10696 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10697 of bits to ignore when comparing architectures.
10699 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10701 PR tree-optimization/69615
10702 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10703 maximum or minimum of the type, try to merge it also as if
10704 range1 is + [-, x - 1] or + [x + 1, -].
10707 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10709 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10711 PR tree-optimization/86034
10712 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10713 the unsigned bitfield type in a bit insertion sequence if it does not
10714 have a larger precision than the bitfield size.
10715 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10717 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10719 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10721 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10723 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10724 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10725 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10726 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10728 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10730 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10731 Disable -fdelete-null-pointer-checks for ELF toolchain.
10733 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10734 Kito Cheng <kito.cheng@gmail.com>
10736 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10737 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10738 (nds32*-*-*): Add glibc and uclibc conditions.
10739 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10740 (TARGET_EXCEPT_UNWIND_INFO): Define.
10741 * config/nds32/elf.h: New file.
10742 * config/nds32/linux.h: New file.
10743 * config/nds32/nds32-elf.opt: New file.
10744 * config/nds32/nds32-linux.opt: New file.
10745 * config/nds32/nds32-fp-as-gp.c
10746 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10747 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10749 (nds32_asm_file_end): Ditto.
10750 (nds32_print_operand): Ditto.
10751 (nds32_insert_attributes): Ditto.
10752 (nds32_init_libfuncs): New function.
10753 (TARGET_HAVE_TLS): Define.
10754 (TARGET_INIT_LIBFUNCS): Define.
10755 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10757 (TARGET_ELF): Apply different mcmodel setting.
10758 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10759 been migrated into elf.h and linux.h files.
10760 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10761 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10762 (mcmodel): The content has been migrated into nds32-elf.opt and
10763 nds32-linux.opt files.
10764 * config/nds32/t-elf: New file.
10765 * config/nds32/t-linux: New file.
10767 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10768 Shiva Chen <shiva0217@gmail.com>
10770 * config/nds32/constants.md (unspec_volatile_element): Add
10771 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10772 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10774 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10775 (make_pass_nds32_fp_as_gp): Declare.
10776 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10778 (nds32_asm_function_end_prologue): Remove unused asm output.
10779 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10780 (nds32_asm_file_start): Output necessary fp_as_gp information.
10781 (nds32_option_override): Adjust register usage.
10782 (nds32_expand_prologue): Consider fp_as_gp situation.
10783 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10784 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10787 (simple_return): Ditto.
10788 (omit_fp_begin): Output special directive for fp_as_gp.
10789 (omit_fp_end): Output special directive for fp_as_gp.
10790 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10791 mforbid-fp-as-gp): New options.
10793 2018-06-01 Mark Wielaard <mark@klomp.org>
10795 * dwarf2out.c (dwarf2out_finish): Remove generation of
10796 DW_AT_loclists_base.
10798 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10800 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10801 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10802 (struct merged_store_group): Add bit_insertion field.
10803 (dump_char_array): Use standard hexadecimal format.
10804 (merged_store_group::merged_store_group): Set bit_insertion to false.
10805 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10806 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10807 also print the mask in the dump file.
10808 (pass_store_merging::gate): Minor tweak.
10809 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10810 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10811 stores with INTEGER_CST stores.
10812 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10813 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10814 and use it throughout. Generate bit insertion sequences if need be.
10815 (pass_store_merging::process_store): Remove redundant condition.
10816 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10818 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10820 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10821 the 128-bit floating point types. Fix function comment.
10823 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10825 * config/aarch64/aarch64-simd.md
10826 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10828 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10831 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10833 PR tree-optimization/85989
10834 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10836 (backprop::intersect_uses): Check it when deciding whether this
10837 is a backedge reference.
10838 (backprop::process_block): Add each phi to m_visited_phis
10839 after visiting it, then clear it at the end.
10841 2018-06-01 Richard Biener <rguenther@suse.de>
10843 * tree-vectorizer.h (vect_dr_stmt): New function.
10844 (vect_get_load_cost): Adjust.
10845 (vect_get_store_cost): Likewise.
10846 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10847 Use vect_dr_stmt instead of DR_SMTT.
10848 (vect_record_base_alignments): Likewise.
10849 (vect_calculate_target_alignment): Likewise.
10850 (vect_compute_data_ref_alignment): Likewise and make static.
10851 (vect_update_misalignment_for_peel): Likewise.
10852 (vect_verify_datarefs_alignment): Likewise.
10853 (vector_alignment_reachable_p): Likewise.
10854 (vect_get_data_access_cost): Likewise. Pass down
10855 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10856 (vect_get_peeling_costs_all_drs): Likewise.
10857 (vect_peeling_hash_get_lowest_cost): Likewise.
10858 (vect_enhance_data_refs_alignment): Likewise.
10859 (vect_find_same_alignment_drs): Likewise.
10860 (vect_analyze_data_refs_alignment): Likewise.
10861 (vect_analyze_group_access_1): Likewise.
10862 (vect_analyze_group_access): Likewise.
10863 (vect_analyze_data_ref_access): Likewise.
10864 (vect_analyze_data_ref_accesses): Likewise.
10865 (vect_vfa_segment_size): Likewise.
10866 (vect_small_gap_p): Likewise.
10867 (vectorizable_with_step_bound_p): Likewise.
10868 (vect_prune_runtime_alias_test_list): Likewise.
10869 (vect_analyze_data_refs): Likewise.
10870 (vect_supportable_dr_alignment): Likewise.
10871 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10872 (vect_gen_prolog_loop_niters): Likewise.
10873 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10874 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10876 (vect_recog_mask_conversion_pattern): Likewise.
10877 (vect_try_gather_scatter_pattern): Likewise.
10878 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10879 to vect_get_store_cost.
10880 (vect_get_store_cost): Get stmt_info instead of DR.
10881 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10882 (vect_get_load_cost): Get stmt_info instead of DR.
10884 2018-06-01 Richard Biener <rguenther@suse.de>
10886 PR middle-end/86017
10887 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10888 vars wrapped in MEM_REFs.
10890 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10892 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10893 Fix subreg tests so that we only return a choice between
10894 GENERAL_REGS and FP_REGS if the original classes included both.
10896 2018-06-01 Richard Biener <rguenther@suse.de>
10899 * tree-ssa-structalias.c (get_function_part_constraint):
10900 Handle NULL fi->decl.
10901 (find_func_aliases_for_call): Properly handle indirect
10902 fi from direct call.
10903 (find_func_clobbers): Likewise.
10904 (ipa_pta_execute): Likewise.
10905 (create_variable_info_for): For functions that are ifunc_resolver
10906 resolve to a varinfo that contains the result of the resolver call.
10907 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10910 2018-05-31 Michael Collison <michael.collison@arm.com>
10912 * config/aarch64/aarch64.md:
10913 (*fix_to_zero_extenddfdi2): New pattern.
10914 * gcc.target/aarch64/fix_extend1.c: New testcase.
10916 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10918 PR middle-end/78809
10919 PR middle-end/83026
10920 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10921 and BUILT_IN_STRNCMP_EQ.
10922 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10923 BUILT_IN_STRNCMP_EQ.
10924 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10925 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10926 (gimple_fold_builtin): Likewise.
10927 * tree-ssa-strlen.c (compute_string_length): New function.
10928 (determine_min_obsize): New function.
10929 (handle_builtin_string_cmp): New function to handle calls to
10930 string compare functions.
10931 (strlen_optimize_stmt): Add handling to builtin string compare
10933 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10934 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10935 * tree.c (build_common_builtin_nodes): Add new defines of
10936 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10938 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10941 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10942 functions with naked attribute.
10944 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10946 * config/i386/sse.md (avx_vec_concat<mode>):
10947 Substitute concat_tg_mode mode attribute with xtg_mode.
10948 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10949 (concat_tg_mode): Remove mode attribute.
10951 2018-05-31 Martin Sebor <msebor@redhat.com>
10954 * calls.c (alloc_max_size): Correct a logic error/typo.
10955 Treat excessive arguments as infinite. Warn for invalid arguments.
10956 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10958 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10961 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10962 and movx for Haswell.
10964 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10965 Cesar Philippidis <cesar@codesourcery.com>
10967 PR middle-end/85879
10968 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10969 when emitting error on private/firstprivate reductions.
10970 * omp-low.c (lower_omp_target): Avoid reference-type processing
10971 on pointers for firstprivate clause.
10973 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10975 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10978 * config/aarch64/aarch64-simd.md
10979 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10980 (aarch64_ld1_x3_<mode>): Likewise
10981 (aarch64_st1x2<VALLDIF:mode>): Likewise
10982 (aarch64_st1_x2_<mode>): Likewise
10983 (aarch64_st1x3<VALLDIF:mode>): Likewise
10984 (aarch64_st1_x3_<mode>): Likewise
10985 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10986 (vld1_s8_x3): Likewise.
10987 (vld1_u16_x3): Likewise.
10988 (vld1_s16_x3): Likewise.
10989 (vld1_u32_x3): Likewise.
10990 (vld1_s32_x3): Likewise.
10991 (vld1_u64_x3): Likewise.
10992 (vld1_s64_x3): Likewise.
10993 (vld1_f16_x3): Likewise.
10994 (vld1_f32_x3): Likewise.
10995 (vld1_f64_x3): Likewise.
10996 (vld1_p8_x3): Likewise.
10997 (vld1_p16_x3): Likewise.
10998 (vld1_p64_x3): Likewise.
10999 (vld1q_u8_x3): Likewise.
11000 (vld1q_s8_x3): Likewise.
11001 (vld1q_u16_x3): Likewise.
11002 (vld1q_s16_x3): Likewise.
11003 (vld1q_u32_x3): Likewise.
11004 (vld1q_s32_x3): Likewise.
11005 (vld1q_u64_x3): Likewise.
11006 (vld1q_s64_x3): Likewise.
11007 (vld1q_f16_x3): Likewise.
11008 (vld1q_f32_x3): Likewise.
11009 (vld1q_f64_x3): Likewise.
11010 (vld1q_p8_x3): Likewise.
11011 (vld1q_p16_x3): Likewise.
11012 (vld1q_p64_x3): Likewise.
11013 (vst1_s64_x2): Likewise.
11014 (vst1_u64_x2): Likewise.
11015 (vst1_f64_x2): Likewise.
11016 (vst1_s8_x2): Likewise.
11017 (vst1_p8_x2): Likewise.
11018 (vst1_s16_x2): Likewise.
11019 (vst1_p16_x2): Likewise.
11020 (vst1_s32_x2): Likewise.
11021 (vst1_u8_x2): Likewise.
11022 (vst1_u16_x2): Likewise.
11023 (vst1_u32_x2): Likewise.
11024 (vst1_f16_x2): Likewise.
11025 (vst1_f32_x2): Likewise.
11026 (vst1_p64_x2): Likewise.
11027 (vst1q_s8_x2): Likewise.
11028 (vst1q_p8_x2): Likewise.
11029 (vst1q_s16_x2): Likewise.
11030 (vst1q_p16_x2): Likewise.
11031 (vst1q_s32_x2): Likewise.
11032 (vst1q_s64_x2): Likewise.
11033 (vst1q_u8_x2): Likewise.
11034 (vst1q_u16_x2): Likewise.
11035 (vst1q_u32_x2): Likewise.
11036 (vst1q_u64_x2): Likewise.
11037 (vst1q_f16_x2): Likewise.
11038 (vst1q_f32_x2): Likewise.
11039 (vst1q_f64_x2): Likewise.
11040 (vst1q_p64_x2): Likewise.
11041 (vst1_s64_x3): Likewise.
11042 (vst1_u64_x3): Likewise.
11043 (vst1_f64_x3): Likewise.
11044 (vst1_s8_x3): Likewise.
11045 (vst1_p8_x3): Likewise.
11046 (vst1_s16_x3): Likewise.
11047 (vst1_p16_x3): Likewise.
11048 (vst1_s32_x3): Likewise.
11049 (vst1_u8_x3): Likewise.
11050 (vst1_u16_x3): Likewise.
11051 (vst1_u32_x3): Likewise.
11052 (vst1_f16_x3): Likewise.
11053 (vst1_f32_x3): Likewise.
11054 (vst1_p64_x3): Likewise.
11055 (vst1q_s8_x3): Likewise.
11056 (vst1q_p8_x3): Likewise.
11057 (vst1q_s16_x3): Likewise.
11058 (vst1q_p16_x3): Likewise.
11059 (vst1q_s32_x3): Likewise.
11060 (vst1q_s64_x3): Likewise.
11061 (vst1q_u8_x3): Likewise.
11062 (vst1q_u16_x3): Likewise.
11063 (vst1q_u32_x3): Likewise.
11064 (vst1q_u64_x3): Likewise.
11065 (vst1q_f16_x3): Likewise.
11066 (vst1q_f32_x3): Likewise.
11067 (vst1q_f64_x3): Likewise.
11068 (vst1q_p64_x3): Likewise.
11070 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11072 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11073 user_label_prefix to name.
11075 * tree-core.h: Update comment about the format of NAME string
11076 passed to handler in attribute_spec.
11078 * config/msp430/msp430.md: Remove erroneous subreg expression from
11079 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11080 zero_extend{q,h}isi2.
11082 2018-05-30 Borislav Petkov <bp@suse.de>
11084 * doc/extend.texi: Document some architecture specific
11085 constraints and sort entries.
11087 2018-05-30 Martin Sebor <msebor@redhat.com>
11089 PR middle-end/85369
11090 * builtins.c (expand_builtin_stpcpy_1): New function.
11091 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11092 only if the former succeeds.
11094 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11096 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11099 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11101 * doc/invoke.texi (-flinker-output): Document
11103 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11105 * passes.c (ipa_write_summaries): Only modify statements if body
11107 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11108 incrementally linking.
11109 (ipa_passes): Likewise.
11110 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11111 pass down resolution info.
11112 * common.opt (flag_incremental_link): Update info.
11113 * gcc.c (plugin specs): Turn flinker-output=* to
11114 -plugin-opt=-linker-output-known
11115 * toplev.c (compile_file): Also cut compilation when doing incremental
11117 * flag-types. (enum lto_partition_model): Add
11118 LTO_LINKER_OUTPUT_NOLTOREL.
11119 (invoke.texi): Add -flinker-output docs.
11120 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11121 link same way as WPA; do not stream in dead initializers.
11123 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11124 darf2out_register_external_decl): Support incremental link.
11126 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11128 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11130 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11132 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11133 it down to simple_object_copy_lto_debug_sections.
11134 (run_gcc): Determine incremental LTO link time and configure
11135 lto1 into non-wpa mode, disable renaming of debug sections.
11137 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11139 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11140 descriptions of various incorrectly documented functions.
11142 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11145 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11146 address check not strict.
11148 2018-05-30 Richard Biener <rguenther@suse.de>
11150 PR tree-optimization/85964
11151 * tracer.c (better_p): Drop initialized count check, we only
11152 call the function with initialized counts now.
11153 (find_best_successor): Do find a best edge if one
11154 has uninitialized count.
11155 (find_best_predecessor): Likewise. Do BB frequency check only
11156 if count is initialized.
11158 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11160 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11161 (aarch64_ldrstr_offset_compare): New.
11162 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11163 load/store orderings.
11164 (aarch64_gen_adjusted_ldpstp): Likewise.
11166 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11168 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11169 Check for subset of GENERAL_REGS and FP_REGS.
11170 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11173 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11175 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11176 and wi::to_poly_offset. Add the current offset and then check
11177 whether the sum fits, rather than using an unchecked addition of
11178 a checked term. Check for a shwi rather than a uhwi.
11179 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11180 (store_constructor): Use poly_int_tree_p.
11181 (expand_expr_real_1): Likewise.
11182 * function.c (assign_temp): Likewise.
11183 * fold-const.c (const_binop): Use poly_int_tree_p and
11184 wi::to_poly_offset.
11185 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11187 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11188 to_poly_offset for MEM offsets.
11189 * ipa-icf.c (sem_variable::equals): Likewise.
11190 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11191 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11192 wi::to_poly_offset for BIT_FIELD_REF offsets.
11193 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11194 wi::to_poly_offset.
11195 * var-tracking.c (emit_note_insn_var_location): Use
11196 tree_to_poly_uint64.
11198 2018-05-29 Jim Wilson <jimw@sifive.com>
11200 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11202 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11205 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11206 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11208 (sse4_1_round<mode>2): Use nonimmediate_operand
11209 for operand 1 predicate.
11211 2018-05-29 Martin Sebor <msebor@redhat.com>
11212 Richard Biener <rguenther@suse.de>
11215 * calls.c (get_size_range): Call determine_value_range instead
11216 of get_value_range..
11217 * tree-vrp.h (determine_value_range): Declared new function.
11218 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11220 2018-05-29 Richard Biener <rguenther@suse.de>
11222 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11223 sure to use non-pattern stmts for get_earlier_stmt arguments.
11224 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11225 called on pattern stmts.
11226 (get_later_stmt): Likewise.
11228 2018-05-29 Martin Liska <mliska@suse.cz>
11230 PR gcov-profile/85759
11231 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11234 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11236 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11238 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11242 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11243 VEC_PACK_FLOAT_EXPR): New tree codes.
11244 * tree-pretty-print.c (op_code_prio): Handle
11245 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11246 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11247 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11248 * tree-inline.c (estimate_operator_cost): Likewise.
11249 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11250 * fold-const.c (const_binop): Likewise.
11251 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11252 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11253 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11254 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11255 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11256 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11257 * expr.c (expand_expr_real_2): Likewise.
11258 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11259 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11260 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11262 * optabs.c (expand_widen_pattern_expr): For
11263 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11264 sign from result type rather than operand's type.
11265 (expand_binop_directly): For vec_packu_float_optab and
11266 vec_packs_float_optab allow result type to be different from operand's
11268 * optabs-tree.c (optab_for_tree_code): Handle
11269 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11270 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11271 * tree-vect-generic.c (expand_vector_operations_1): Handle
11272 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11273 VEC_PACK_FLOAT_EXPR.
11274 * tree-vect-stmts.c (supportable_widening_operation): Handle
11276 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11277 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11278 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11279 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11280 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11282 (vec_pack<floatprefix>_float_<mode>): New expander.
11283 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11285 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11286 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11287 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11288 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11289 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11291 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11292 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11293 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11294 VEC_PACK_FLOAT_EXPR): Document.
11296 2018-05-29 Richard Biener <rguenther@suse.de>
11298 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11300 (stmt_vec_info_vec): Make pointer.
11301 (init_stmt_vec_info_vec): Remove.
11302 (free_stmt_vec_info_vec): Likewise.
11303 (set_stmt_vec_info_vec): New function.
11304 (free_stmt_vec_infos): Likewise.
11305 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11306 (set_vinfo_for_stmt): Likewise.
11307 (get_earlier_stmt): Likewise.
11308 (get_later_stmt): Likewise.
11309 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11310 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11311 (vec_info::~vec_info): Free stmt_vec_infos.
11312 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11313 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11314 (pass_slp_vectorize::execute): Likewise.
11315 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11316 (free_stmt_vec_info_vec): Likewise.
11317 (set_stmt_vec_info_vec): New function.
11318 (free_stmt_vec_infos): Likewise.
11319 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11320 the global stmt_vec_info_vec.
11321 * tree-parloops.c (gather_scalar_reductions): Use
11322 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11325 2018-05-29 Richard Biener <rguenther@suse.de>
11327 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11329 2018-05-29 Martin Liska <mliska@suse.cz>
11330 David Malcolm <dmalcolm@redhat.com>
11332 * vec.c (test_reverse): New.
11333 (vec_c_tests): Add new test.
11334 * vec.h (vl_ptr>::reverse): New function.
11336 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11338 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11340 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11343 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11345 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11347 2018-05-28 Richard Biener <rguenther@suse.de>
11349 PR tree-optimization/85933
11350 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11351 look at stmts marked as vectorizable.
11353 2018-05-28 Richard Biener <rguenther@suse.de>
11355 PR tree-optimization/85934
11356 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11357 vector boolean check before scalar optimization.
11359 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11361 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11364 2018-05-28 Mark Wielaard <mark@klomp.org>
11366 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11367 if it is an expression containing a minus sign.
11369 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11371 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11373 2018-05-27 Paul Koning <ni1d@arrl.net>
11375 * config/pdp11/pdp11.md (truncsihi2): Remove.
11377 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11378 Chung-Ju Wu <jasonwucj@gmail.com>
11380 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11382 (unaligned_store_dw): Ditto.
11383 * config/nds32/nds32-memory-manipulation.c
11384 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11385 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11386 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11387 (emit_setmem_word_loop): Rename to ...
11388 (emit_setmem_doubleword_loop): ... this.
11389 (nds32_gen_dup_4_byte_to_word_value): New function.
11390 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11391 (nds32_expand_setmem_loop): Refine implementation.
11392 (nds32_expand_setmem_loop_v3m): Ditto.
11393 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11396 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11398 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11400 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11402 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11403 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11404 machine->attr_no_prologue_p.
11405 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11406 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11407 (nds32_expand_epilogue): Consider attr_naked_p.
11408 (nds32_expand_epilogue_v3pop): Likewise.
11409 (nds32_can_use_return_insn): Likewise.
11410 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11411 attr_no_prologue_p fields.
11412 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11414 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11417 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11419 * config/i386/sse.md
11420 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11422 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11424 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11426 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11428 (*<floatsuffix>floatv2div2sf2): Rename to ...
11429 (*float<floatunssuffix>v2div2sf2): ... this.
11430 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11431 (float<floatunssuffix>v2div2sf2_mask): ... this.
11432 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11433 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11434 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11436 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11438 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11440 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11442 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11444 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11446 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11447 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11448 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11449 gen_ufix_truncv8dfv8si2.
11450 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11451 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11452 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11453 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11454 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11455 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11456 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11457 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11459 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11463 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11465 2018-05-25 Jim Wilson <jimw@sifive.com>
11467 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11468 * config/riscv/riscv.c (struct machine_function): Add
11469 interrupt_handler_p and attribute_checked_p fields.
11470 (riscv_attribute_table): Add interrupt.
11471 (riscv_interrupt_type_p): New.
11472 (riscv_save_reg_p): Save extra regs for interrupt handler.
11473 (riscv_use_save_libcall): Return false for interrupt handler.
11474 (riscv_first_stack_step): Add forward declaration.
11475 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11476 for interrupt handler with large frame. Use it for saved reg list.
11477 (riscv_expand_prologue): Move flag_stack_usage_info support to
11478 eliminate duplication.
11479 (riscv_expand_epilogue): Generate mret for interrupt handler.
11480 (riscv_epilogue_uses): New.
11481 (riscv_can_use_return_insn): Return false for interrupt handler.
11482 (riscv_function_ok_for_sibcall): Likewise.
11483 (riscv_set_current_function): Add interrupt handler support.
11484 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11485 * config/riscv/riscv.md (UNSPECV_MRET): New.
11487 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11489 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11491 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11493 PR tree-optimization/85712
11494 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11495 this candidate has already been replaced in-situ by a copy.
11497 2018-05-25 Jason Merrill <jason@redhat.com>
11499 PR c++/80485 - inline function non-zero address.
11500 * symtab.c (nonzero_address): Check DECL_COMDAT.
11502 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11505 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11506 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11507 extension of SImode operation. Use const123_operand predicate.
11508 (*saddsi_1): Remove.
11509 (*saddl_se_1): Ditto.
11510 (*ssubsi_1): Ditto.
11511 (*ssubl_se_1): Ditto.
11512 * config/alpha/predicates.md (const123_operand): New predicate.
11513 * config/alpha/constraints.md (P): Use IN_RANGE.
11515 2018-05-25 Richard Biener <rguenther@suse.de>
11517 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11519 (ref_maybe_used_by_stmt_p): Likewise.
11520 (stmt_may_clobber_ref_p): Likewise.
11521 (stmt_may_clobber_ref_p_1): Likewise.
11522 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11524 (ref_maybe_used_by_stmt_p): Likewise.
11525 (stmt_may_clobber_ref_p): Likewise.
11526 (stmt_may_clobber_ref_p_1): Likewise.
11527 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11528 the alias oracle to disambiguate DRs with stmts DR analysis
11530 (vect_analyze_data_refs): Do not give up on not analyzable
11531 DRs for BB vectorization. Remove code truncating the dataref
11534 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11537 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11538 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11539 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11541 2018-05-25 Richard Biener <rguenther@suse.de>
11543 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11544 function, combining stmt data ref gathering and fatal analysis
11546 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11547 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11548 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11549 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11550 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11552 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11554 PR tree-optimization/85720
11555 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11556 SCC if all partitions are builtins.
11557 (version_loop_by_alias_check): New parameter. Generate cancelable
11558 runtime alias check if all partitions are builtins.
11559 (distribute_loop): Update call to above function.
11561 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11563 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11564 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11565 (parm_default_def_partition_arg): Ditto.
11566 (set_parm_default_def_partition): Ditto.
11567 (get_parm_default_def_partitions): Ditto and make it static.
11568 (get_undefined_value_partitions): Ditto and make it static.
11569 (remove_ssa_form): Refactor call to init_var_map here.
11570 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11571 computation for loop region.
11572 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11573 (register_default_def): Delete.
11574 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11575 (parm_default_def_partition_arg): Ditto.
11576 (set_parm_default_def_partition): Ditto.
11577 (get_parm_default_def_partitions): Ditto and make it static.
11578 (get_undefined_value_partitions): Ditto and make it static.
11579 (coalesce_with_default, coalesce_with_default): Update comment.
11580 (create_coalesce_list_for_region): New func factored out from
11581 create_outofssa_var_map.
11582 (populate_coalesce_list_for_outofssa): New func factored out from
11583 create_outofssa_var_map and coalesce_ssa_name.
11584 (create_outofssa_var_map): Delete.
11585 (coalesce_ssa_name): Refactor to support live range computation.
11586 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11587 (get_parm_default_def_partitions): Delete.
11588 (get_undefined_value_partitions): Ditto.
11589 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11590 computation for loop region.
11591 (new_tree_live_info, loe_visit_block): Ditto.
11592 (live_worklist, set_var_live_on_entry): Ditto.
11593 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11594 * tree-ssa-live.h (struct _var_map): New fields.
11595 (init_var_map): Change decl.
11596 (region_contains_p): New.
11598 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11600 * tree-ssa-live.h (live_merge_and_clear): Delete.
11602 2018-05-25 Richard Biener <rguenther@suse.de>
11605 * tree-dump.c (dequeue_and_dump): Remove access to removed
11606 operand 2 of a SWITCH_EXPR.
11608 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11610 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11611 multiplication and division.
11612 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11613 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11614 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11615 (cond_udiv_optab, cond_umod_optab): New optabs.
11616 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11617 (IFN_COND_RDIV): New internal functions.
11618 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11619 TRUNC_MOD_EXPR and RDIV_EXPR.
11620 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11621 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11623 (SVE_INT_BINARY): Include mult.
11624 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11625 (optab, sve_int_op): Handle mult.
11626 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11628 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11629 for SVE_INT_BINARY_SD.
11631 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11633 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11634 (optab, sve_int_op): Handle div and udiv.
11635 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11636 for SVE_INT_BINARY_SD.
11637 (*<optab><mode>3): New insn for the same.
11639 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11641 * tree-vect-patterns.c: Include predict.h.
11642 (vect_recog_divmod_pattern): Restrict check for division support
11643 to when optimizing for size.
11645 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11647 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11648 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11649 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11650 (gimple_match_op::set_op): Likewise.
11651 (gimple_resimplify4): Declare.
11652 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11653 (expr::gen_transform): Likewise.
11654 (decision_tree::gen): Generate a simplification routine for 4 operands.
11655 * gimple-match-head.c (gimple_simplify): Add an overload for
11656 4 operands. In the top-level function, handle up to 4 call
11657 arguments and call gimple_resimplify4.
11658 (gimple_resimplify4): New function.
11659 (build_call_internal): Pass a fourth operand.
11660 (maybe_push_to_seq): Likewise.
11661 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11662 Fold VEC_COND_EXPRs of an operation and a default value into
11663 an IFN_COND_* function if possible.
11664 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11666 (SVE_COND_FP_BINARY): Include them.
11667 (optab, sve_fp_op): Handle them.
11668 (SVE_INT_BINARY_REV): New code iterator.
11669 (SVE_COND_FP_BINARY_REV): New int iterator.
11670 (commutative): New int attribute.
11671 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11673 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11675 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11676 (*cond_<optab><mode>): New patterns for reversed operands.
11678 2018-05-25 Richard Biener <rguenther@suse.de>
11680 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11681 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11682 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11683 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11684 * tree-vect-data-refs.c (everywhere): Adjust users.
11685 * tree-vect-loop.c (everywhere): Likewise.
11686 * tree-vect-slp.c (everywhere): Likewise.
11687 * tree-vect-stmts.c (everywhere): Likewise.
11688 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11690 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11692 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11694 (gcc_cv_as_section_exclude): ... this.
11695 Try Solaris as #exclude syntax.
11696 * configure: Regenerate.
11697 * config.in: Regenerate.
11698 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11700 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11701 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11703 * varasm.c (default_elf_asm_named_section): Don't check if
11704 HAVE_GAS_SECTION_EXCLUDE is defined.
11706 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11708 * doc/md.texi: Update the documentation of the cond_* optabs
11709 to mention the new final operand. Fix GET_MODE_NUNITS call.
11710 Describe the scalar case too.
11711 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11712 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11714 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11715 (get_conditional_internal_fn): Update comment.
11716 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11717 accumulator value as a final argument to conditional functions.
11718 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11719 a define_expand and add an "else" operand. Assert for now that
11720 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11721 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11722 (*cond_<optab><mode>): New patterns.
11723 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11724 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11725 (UNSPEC_COND_EOR): Delete.
11726 (optab): Remove associated mappings.
11727 (SVE_INT_BINARY): New code iterator.
11728 (sve_int_op): Remove int attribute and add "minus" to the code
11730 (SVE_COND_INT_OP): Delete.
11731 (SVE_COND_FP_OP): Rename to...
11732 (SVE_COND_FP_BINARY): ...this.
11734 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11736 * optabs.c (can_reuse_operands_p): New function.
11737 (maybe_legitimize_operands): Try to reuse the results for
11740 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11742 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11743 Add {q} suffix to insn mnemonic.
11745 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11747 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11748 (msp430_warn_func_return): New.
11750 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11752 * fold-const.c (tree_nonzero_bits): New function.
11753 * fold-const.h (tree_nonzero_bits): Likewise.
11754 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11755 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11757 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11761 * varasm.c (assemble_alias): Check ifunc_resolver only on
11764 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11767 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11768 when memory input operand is handled.
11770 2018-05-24 Luis Machado <luis.machado@linaro.org>
11772 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11774 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11776 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11778 * match.pd: Delay FMA folds until after vectorization.
11780 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11783 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11784 address check not strict.
11786 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11788 * gimple-match.h (gimple_match_op): New class.
11789 (mprts_hook): Replace parameters with a gimple_match_op *.
11790 (maybe_build_generic_op): Likewise.
11791 (gimple_simplified_result_is_gimple_val): Replace parameters with
11792 a const gimple_match_op *.
11793 (gimple_simplify): Replace code_helper * and tree * parameters with
11794 a gimple_match_op * parameter.
11795 (gimple_resimplify1): Replace code_helper *, tree and tree *
11796 parameters with a gimple_match_op * parameter.
11797 (gimple_resimplify2): Likewise.
11798 (gimple_resimplify3): Likewise.
11799 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11800 parameters with a gimple_match_op * parameter.
11801 * gimple-match-head.c (gimple_simplify): Change prototypes of
11802 auto-generated functions to take a gimple_match_op * instead of
11803 separate code_helper * and tree * parameters. Make the same
11804 change in the top-level overload and update calls to the
11805 gimple_resimplify routines. Update calls to the auto-generated
11806 functions and to maybe_push_res_to_seq in the publicly-facing
11807 operation-specific gimple_simplify overloads.
11808 (gimple_match_op::MAX_NUM_OPS): Define.
11809 (gimple_resimplify1): Replace rcode and ops with a single res_op
11810 parameter. Update call to gimple_simplify.
11811 (gimple_resimplify2): Likewise.
11812 (gimple_resimplify3): Likewise.
11813 (mprts_hook): Replace parameters with a gimple_match_op *.
11814 (maybe_build_generic_op): Likewise.
11815 (build_call_internal): Replace type, nargs and ops with
11816 a gimple_match_op *.
11817 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11818 with a single gimple_match_op *. Update calls to mprts_hook,
11819 build_call_internal and gimple_simplified_result_is_gimple_val.
11820 Factor out code that is common to the tree_code and combined_fn cases.
11821 * genmatch.c (expr::gen_transform): Replace tem_code and
11822 tem_ops with a gimple_match_op called tem_op. Update calls
11823 to the gimple_resimplify functions and maybe_push_res_to_seq.
11824 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11825 res_ops. Update call to the gimple_resimplify functions.
11826 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11827 (decision_tree::gen): Make the functions take a gimple_match_op *
11828 called res_op instead of separate res_code and res_ops parameters.
11829 Update call accordingly.
11830 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11831 and ops with a single res_op parameter. Update calls to
11832 maybe_build_generic_op and maybe_push_res_to_seq.
11833 (fold_stmt_1): Update calls to gimple_simplify and
11834 replace_stmt_with_simplification.
11835 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11836 and gimple_simplified_result_is_gimple_val.
11837 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11839 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11840 with a gimple_match_op *.
11841 (vn_nary_build_or_lookup): Likewise. Update call to
11842 vn_nary_build_or_lookup_1.
11843 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11844 gimple_match_op *. Update calls to the gimple_resimplify routines
11845 and to gimple_simplified_result_is_gimple_val.
11846 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11847 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11848 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11849 (visit_nary_op): Likewise.
11850 (visit_reference_op_load): Likewise.
11852 2018-05-23 Luis Machado <luis.machado@linaro.org>
11854 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11855 modifier for printing the step amount.
11857 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11860 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11863 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11865 * doc/sourcebuild.texi (Endianness): New subsubsection.
11867 2018-05-23 Luis Machado <luis.machado@linaro.org>
11869 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11870 <prefetch_dynamic_strides>: New const bool field.
11871 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11872 prefetch_dynamic_strides.
11873 (exynosm1_prefetch_tune): Likewise.
11874 (thunderxt88_prefetch_tune): Likewise.
11875 (thunderx_prefetch_tune): Likewise.
11876 (thunderx2t99_prefetch_tune): Likewise.
11877 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11879 (aarch64_override_options_internal): Update to set
11880 PARAM_PREFETCH_DYNAMIC_STRIDES.
11881 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11882 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11883 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11884 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11885 prefetch-dynamic-strides setting.
11887 2018-05-23 Luis Machado <luis.machado@linaro.org>
11889 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11890 <minimum_stride>: New const int field.
11891 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11892 minimum_stride field defaulting to -1.
11893 (exynosm1_prefetch_tune): Likewise.
11894 (thunderxt88_prefetch_tune): Likewise.
11895 (thunderx_prefetch_tune): Likewise.
11896 (thunderx2t99_prefetch_tune): Likewise.
11897 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11898 <default_opt_level>: Set to 3.
11899 (aarch64_override_options_internal): Update to set
11900 PARAM_PREFETCH_MINIMUM_STRIDE.
11901 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11902 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11903 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11904 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11905 stride is constant and is below the minimum stride threshold.
11907 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11909 * config/arm/arm-cpus.in (mode26): Delete.
11910 (armv4): Delete mode26 reference.
11911 * config/arm/arm.c (arm_configure_build_target): Delete use of
11914 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11916 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11918 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11919 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11921 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11922 (floatunsdidf2): Ditto.
11924 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11926 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11927 (fixuns_trunc<mode>si2_avx512f): Ditto.
11928 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11929 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11930 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11932 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11934 PR rtl-optimization/79985
11935 * df-scan.c (df_insn_refs_collect): Remove special case for
11936 global registers and asm statements.
11938 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11940 * extend.texi (Global Register Variables): Rewrite the bullet list.
11941 Note that the register is available for allocation. Note that access
11942 via inline asm must use constraints. Add note about async-signal
11943 handlers. Remove paragraph about automagic register selection.
11945 2018-05-23 Richard Biener <rguenther@suse.de>
11947 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11948 of fixed offset from memset VN.
11950 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11952 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11953 first_interp field.
11954 (alloc_cand_and_find_basis): Initialize first_interp field.
11955 (slsr_process_mul): Modify first_interp field.
11956 (slsr_process_add): Likewise.
11957 (slsr_process_cast): Modify first_interp field for each new
11959 (slsr_process_copy): Likewise.
11960 (dump_candidate): Dump first_interp field.
11961 (replace_mult_candidate): Process all interpretations, not just
11963 (replace_rhs_if_not_dup): Likewise.
11964 (replace_one_candidate): Likewise.
11966 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11968 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11970 (aarch64_needs_frame_chain): New function.
11971 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11973 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11976 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11977 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11978 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11979 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11980 as true for strict-align.
11981 (aarch64_can_inline_p): Perform checks even when callee has no
11982 attributes to check for strict alignment.
11983 * doc/extend.texi (AArch64 Function Attributes): Document
11985 * doc/invoke.texi: (AArch64 Options): Likewise.
11987 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11989 PR tree-optimization/85853
11990 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11991 the handling of the root of the node to...
11992 (vect_slp_analyze_node_operations_1): ...this new function,
11993 and run the whole thing with the child nodes' def types
11994 set according to their SLP node's def type.
11996 2018-05-23 Richard Biener <rguenther@suse.de>
11998 PR middle-end/85874
11999 * tree-data-ref.c (create_runtime_alias_checks): Defer
12000 and ignore overflow warnings.
12002 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12004 PR tree-optimization/85822
12005 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12008 2018-05-23 Richard Biener <rguenther@suse.de>
12010 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12011 memset constants via native_interpret_expr.
12013 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12016 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12018 (cgraph_node::create_alias): Likewise.
12019 (cgraph_node::get_availability): Check ifunc_resolver instead
12020 of looking up ifunc attribute.
12021 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12022 * varasm.c (do_assemble_alias): Likewise.
12023 (assemble_alias): Likewise.
12024 (default_binds_local_p_3): Likewise.
12025 * cgraph.h (cgraph_node): Add ifunc_resolver.
12026 (cgraph_node::only_called_directly_or_aliased_p): Return false
12027 for IFUNC resolver.
12028 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12030 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12031 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12032 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12033 instead of looking up ifunc attribute.
12035 2018-05-22 Luis Machado <luis.machado@linaro.org>
12037 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12039 2018-05-22 Martin Sebor <msebor@redhat.com>
12041 PR middle-end/85359
12042 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12043 only when expasion succeeds.
12044 (expand_builtin_strcmp): Same.
12045 (expand_builtin_strncmp): Same.
12047 2018-05-22 Martin Sebor <msebor@redhat.com>
12049 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12051 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12052 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12054 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12055 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12057 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12058 Add check for legitimate_address.
12059 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12060 (aarch64_swap_ldrstr_operands): New.
12061 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12064 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12065 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12067 * config/aarch64/aarch64.md: New patterns to generate stp
12069 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12070 single words and double words.
12071 (load_pair_sw, load_pair_dw): Likewise.
12072 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12074 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12076 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12077 for different mode ldpstp and add peephole for merged zero stores.
12078 Likewise for loads.
12079 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12081 (aarch64_gen_store_pair): Rename calls to match new patterns.
12082 (aarch64_gen_load_pair): Rename calls to match new patterns.
12083 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12084 (load_pair<DREG:mode><DREG2:mode>): ... This.
12085 (store_pair<mode>): Rename to...
12086 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12087 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12088 New mode iterators.
12089 (V_INT_EQUIV): Handle SImode.
12090 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12093 2018-05-22 Martin Sebor <msebor@redhat.com>
12096 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12097 or ajust the presumed bound on an operation to avoid unnecessary
12100 2018-05-22 Martin Sebor <msebor@redhat.com>
12102 PR tree-optimization/85826
12103 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12104 assuming that a DECL necesarily has a constant size.
12106 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12108 PR middle-end/85862
12109 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12111 2018-05-22 Richard Biener <rguenther@suse.de>
12113 PR tree-optimization/85834
12114 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12115 non-constant and non-zero memset arguments.
12117 2018-05-22 Martin Liska <mliska@suse.cz>
12120 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12122 2018-05-22 Richard Biener <rguenther@suse.de>
12124 PR tree-optimization/85863
12125 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12126 comparisons when vectype is specified.
12127 (vectorizable_condition): Do not specify vectype for
12128 vect_is_simple_cond when SLP vectorizing.
12130 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12133 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12134 define __ibm128 as long double.
12135 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12136 as a distinct type when IEEE 128-bit support is enabled.
12137 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12138 128-bit types to use the correct functions.
12139 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12140 convert between 128-bit floating point types that have different
12141 modes but the same representation, instead of using gen_lowpart to
12143 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12145 (IFKF_reg): New attributes to give the register constraints for
12147 (extend<mode>tf2_internal): New insns to mark an explicit
12148 conversion between 128-bit floating point types that have a
12149 different mode but share the same representation.
12151 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12153 PR tree-optimization/85814
12154 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12155 a null return from get_strinfo when unsharing the next
12156 strinfo in the chain.
12158 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12161 * varasm.c (weak_finish): Clean up weak_decls.
12163 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12165 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12166 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12167 UNSPEC_UADALP values.
12168 * config/aarch64/iterators.md (ABAL): New int iterator.
12171 (sur): Add mappings for the above.
12172 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12174 (aarch64_<sur>abal<mode>_4): Likewise.
12175 (aarch64_<sur>adalp<mode>_3): Likewise.
12176 (<sur>sadv16qi): New define_expand.
12178 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12180 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12181 (*movdf_internal): Ditto.
12182 (*rcpsf2_sse): Ditto.
12183 (*rsqrtsf2_sse): Ditto.
12184 (*sqrt<mode>2_sse): Ditto.
12186 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12188 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12190 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12191 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12192 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12193 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12195 * config/aarch64/arm_neon.h: Likewise.
12196 * config/aarch64/iterators.md (VQ_I): New.
12198 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12200 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12202 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12205 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12207 * config/nds32/constraints.md (S): New constraint.
12208 * config/nds32/nds32.md (call_internal): Use constraint S.
12209 (call_value_internal): Likewise.
12210 (sibcall_internal): Likewise.
12211 (sibcall_value_internal): Likewise.
12213 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12214 Chung-Ju Wu <jasonwucj@gmail.com>
12216 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12217 into consideration.
12219 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12220 Chung-Ju Wu <jasonwucj@gmail.com>
12222 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12223 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12224 (nds32_rtx_costs_impl): Simplify.
12225 (nds32_address_cost_impl): Simplify.
12226 (nds32_init_rtx_costs): New function.
12227 (nds32_rtx_costs_speed_prefer): Likewise.
12228 (nds32_rtx_costs_size_prefer): Likewise.
12229 (nds32_address_cost_speed_prefer): Likewise.
12230 (nds32_address_cost_speed_fwprop): Likewise.
12231 (nds32_address_cost_size_prefer): Likewise.
12232 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12233 * config/nds32/nds32.c (nds32_option_override): Use
12234 nds32_init_rtx_costs function.
12236 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12238 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12239 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12240 (TARGET_PIPELINE_N8): Likewise.
12241 (TARGET_PIPELINE_N10): Likewise.
12242 (TARGET_PIPELINE_N13): Likewise.
12243 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12245 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12247 * config/nds32/nds32-fpu.md: Update copyright year.
12249 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12251 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12253 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12255 * config/nds32/nds32.c
12256 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12257 * config/nds32/nds32.opt (minline-asm-r15): New option.
12259 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12261 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12263 * config/nds32/nds32.md (abssi2): New pattern.
12265 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12267 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12268 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12269 Merge insn pattern from sse_cvtsi2ss<round_name> and
12270 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12271 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12272 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12273 using SWI48 mode iterator.
12274 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12275 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12276 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12277 pattern from sse_cvttss2si<round_saeonly_name>
12278 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12279 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12280 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12281 using SWI48 mode iterator.
12282 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12283 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12284 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12285 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12286 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12287 using SWI48 mode iterator.
12288 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12289 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12290 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12291 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12292 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12293 SWI48 mode iterator.
12294 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12295 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12296 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12297 pattern from sse_cvttsd2si<round_saeonly_name>
12298 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12300 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12302 * config/nds32/nds32-md-auxiliary.c
12303 (nds32_valid_smw_lwm_base_p): Refine.
12304 (nds32_output_smw_single_word): Refine.
12305 (nds32_output_smw_double_word): New.
12306 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12308 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12310 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12311 (nds32_output_stack_pop): Refine.
12312 (nds32_expand_unaligned_load): Refine.
12313 (nds32_expand_unaligned_store): Refine.
12315 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12316 Chung-Ju Wu <jasonwucj@gmail.com>
12318 * config/nds32/constants.md: Add TP_REGNUM constant.
12319 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12320 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12322 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12323 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12324 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12325 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12326 and PIC code generation.
12327 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12329 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12331 * config/nds32/nds32.md: Support TLS and PIC.
12332 * config/nds32/nds32.c: Support TLS and PIC.
12333 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12334 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12337 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12339 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12340 mode with E_ prefix.
12342 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12343 Chung-Ju Wu <jasonwucj@gmail.com>
12345 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12346 * config/nds32/nds32-md-auxiliary.c
12347 (symbolic_reference_mentioned_p): New.
12348 (nds32_legitimize_ict_address): New.
12349 (nds32_expand_ict_move): New.
12350 (nds32_indirect_call_referenced_p): New.
12351 (nds32_symbol_binds_local_p): Delete.
12352 (nds32_long_call_p): Modify.
12353 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12354 * config/nds32/nds32-protos.h
12355 (symbolic_reference_mentioned_p): Declare.
12356 (nds32_legitimize_ict_address): Declare.
12357 (nds32_expand_ict_move): Declare.
12358 (nds32_indirect_call_referenced_p): Declare.
12359 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12360 (nds32_relax_group): Use nds32_ict_const_p as condition.
12361 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12362 (nds32_asm_file_start): Output ict_model directive in asm code.
12363 (nds32_legitimate_address_p): Consider indirect call.
12364 (nds32_print_operand): Consider indirect call.
12365 (nds32_print_operand_address): Consider indirect call.
12366 (nds32_insert_attributes): Handle "indirect_call" attribute.
12367 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12368 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12369 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12370 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12371 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12372 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12373 (TARGET_ICT_MODEL_SMALL): Define.
12374 (TARGET_ICT_MODEL_LARGE): Define.
12375 * config/nds32/nds32.md (movsi): Consider ict model.
12376 (call, call_value): Consider ict model.
12377 (sibcall, sibcall_value): Consider ict model.
12378 * config/nds32/nds32.opt (mict-model): New option.
12379 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12382 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12383 Monk Chiang <sh.chiang04@gmail.com>
12384 Jim Wilson <jimw@sifive.com>
12386 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12387 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12388 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12389 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12390 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12391 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12392 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12393 compute save_libcall_adjustment properly.
12394 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12395 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12396 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12397 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12398 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12399 (ABI_SPEC): Handle mabi=ilp32e.
12400 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12401 (RVE): Add RVE mask.
12402 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12403 <-march>: Add rv32e as an example.
12405 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12408 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12409 (intra_create_variable_infos): Handle C++ constructors.
12411 2018-05-18 Martin Liska <mliska@suse.cz>
12413 * passes.def: Remove a redundant pass.
12415 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12418 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12420 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12422 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12424 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12426 (armv2, armv2a, armv3, armv3m): Delete architectures.
12427 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12428 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12429 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12431 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12432 (*mulsidi3adddi): Likewise.
12433 (mulsidi3): Likewise.
12434 (*mulsidi3_nov6): Likewise.
12435 (umulsidi3): Likewise.
12436 (umulsidi3_nov6): Likewise.
12437 (umaddsidi4): Likewise.
12438 (*umulsidi3adddi): Likewise.
12439 (smulsi3_highpart): Likewise.
12440 (*smulsi3_highpart_nov6): Likewise.
12441 (umulsi3_highpart): Likewise.
12442 (*umulsi3_highpart_nov6): Likewise.
12443 * config/arm/arm.h (arm_arch3m): Delete.
12444 * config/arm/arm.c (arm_arch3m): Delete.
12445 (arm_option_override_internal): Update armv3-related comment.
12446 (arm_configure_build_target): Delete use of isa_bit_mode32.
12447 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12448 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12449 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12450 (mulsa3): Likewise.
12451 (mulusa3): Likewise.
12452 * config/arm/arm-protos.h (arm_arch3m): Delete.
12453 * config/arm/arm-tables.opt: Regenerate.
12454 * config/arm/arm-tune.md: Likewise.
12455 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12456 deleted architectures.
12458 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12460 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12461 (armv5t, armv5te): New features.
12462 (ARMv5, ARMv5e): Delete fgroups.
12463 (ARMv5t, ARMv5te): Adjust for above changes.
12464 (ARMv6m): Likewise.
12465 (armv5, armv5e): Delete arches.
12466 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12468 (*call_reg_arm): Likewise.
12469 (*call_value_reg_armv5): Likewise.
12470 (*call_value_reg_arm): Likewise.
12471 (*call_symbol): Likewise.
12472 (*call_value_symbol): Likewise.
12473 (*sibcall_insn): Likewise.
12474 (*sibcall_value_insn): Likewise.
12475 (clzsi2): Likewise.
12476 (prefetch): Likewise.
12477 (define_split and define_peephole2 dependent on arm_arch5):
12479 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12481 (TARGET_ARM_QBIT): Likewise.
12482 (TARGET_DSP_MULTIPLY): Likewise.
12483 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12484 (arm_arch5, arm_arch5e): Delete.
12485 (arm_arch5t, arm_arch5te): Declare.
12486 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12487 (arm_arch5t): Declare.
12488 (arm_option_reconfigure_globals): Update for the above.
12489 (arm_options_perform_arch_sanity_checks): Update comment, replace
12490 use of arm_arch5 with arm_arch5t.
12491 (use_return_insn): Likewise.
12492 (arm_emit_call_insn): Likewise.
12493 (output_return_instruction): Likewise.
12494 (arm_final_prescan_insn): Likewise.
12495 (arm_coproc_builtin_available): Likewise.
12496 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12497 arm_arch5e with arm_arch5t and arm_arch5te.
12498 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12499 (arm_arch5t, arm_arch5te): Declare.
12500 * config/arm/arm-tables.opt: Regenerate.
12501 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12502 * config/arm/t-multilib: Likewise.
12503 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12504 instead of arm_arch5.
12505 (*call_reg_thumb1): Likewise.
12506 (*call_value_reg_thumb1_v5): Likewise.
12507 (*call_value_reg_thumb1): Likewise.
12508 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12510 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12512 2018-05-18 Martin Liska <mliska@suse.cz>
12514 PR gcov-profile/84846
12515 * doc/gcov.texi: Document -t option of gcov tool.
12517 2018-05-18 Martin Liska <mliska@suse.cz>
12519 PR gcov-profile/84846
12520 * gcov.c (print_usage): Add new -t option.
12521 (process_args): Handle the option.
12522 (generate_results): Use stdout as output when requested by
12525 2018-05-18 Martin Liska <mliska@suse.cz>
12527 PR gcov-profile/84846
12528 * coverage.c (coverage_init): Write PWD to .gcno file.
12529 * doc/gcov.texi: Document how working directory is printed.
12530 * gcov-dump.c (dump_gcov_file): Print PWD.
12531 * gcov.c (output_intermediate_file): Likewise.
12532 (read_graph_file): Read PWD string.
12533 (output_lines): Print PWD.
12535 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12537 PR middle-end/85817
12538 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12539 for retval and return false if all args to phi are zero.
12541 2018-05-18 Richard Biener <rguenther@suse.de>
12543 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12545 (evrp_dom_walker::before_dom_children): Call it.
12547 2018-05-18 Richard Biener <rguenther@suse.de>
12549 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12550 results when processing array refs with variable index.
12552 2018-05-18 Toon Moene <toon@moene.org>
12554 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12555 directly after that of -floop-interchange. Indicate that both
12556 options are enabled by default when specifying -O3.
12558 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12560 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12561 iterator. Delete separate integer-mode vec_set<mode> expander.
12562 (aarch64_simd_vec_setv2di): Delete.
12563 (vec_setv2di): Delete.
12564 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12565 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12566 the "w, r" alternative.
12568 2018-05-18 Martin Liska <mliska@suse.cz>
12570 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12571 * tree-pass.h (make_pass_lower_switch_O0): New function.
12572 * tree-switch-conversion.c (node_has_low_bound): Remove.
12573 (node_has_high_bound): Likewise.
12574 (node_is_bounded): Likewise.
12575 (class pass_lower_switch): Make it a template type and create
12577 (pass_lower_switch::execute): Add template argument.
12578 (make_pass_lower_switch): New function.
12579 (make_pass_lower_switch_O0): New function.
12580 (do_jump_if_equal): Remove.
12581 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12582 all the hard work to tree optimization passes.
12584 2018-05-18 Martin Liska <mliska@suse.cz>
12586 * dbgcnt.c (limit_low): Renamed from limit.
12587 (limit_high): New variable.
12588 (dbg_cnt_is_enabled): Check for upper limit.
12589 (dbg_cnt): Adjust dumping.
12590 (dbg_cnt_set_limit_by_index): Add new argument for high
12592 (dbg_cnt_set_limit_by_name): Likewise.
12593 (dbg_cnt_process_single_pair): Parse new format.
12594 (dbg_cnt_process_opt): Use strtok.
12595 (dbg_cnt_list_all_counters): Remove 'value' and add
12597 * doc/invoke.texi: Document changes.
12599 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12601 * doc/sourcebuild.texi (scalar_all_fma): Document.
12602 * tree.def (FMA_EXPR): Delete.
12603 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12604 * internal-fn.c (ternary_direct): New macro.
12605 (expand_ternary_optab_fn): Likewise.
12606 (direct_ternary_optab_supported_p): Likewise.
12607 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12608 * builtins.c (fold_builtin_fma): Delete.
12609 (fold_builtin_3): Don't call it.
12610 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12611 * expr.c (expand_expr_real_2): Likewise.
12612 * fold-const.c (operand_equal_p): Likewise.
12613 (fold_ternary_loc): Likewise.
12614 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12615 * gimple.c (DEFTREECODE): Likewise.
12616 * gimplify.c (gimplify_expr): Likewise.
12617 * optabs-tree.c (optab_for_tree_code): Likewise.
12618 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12619 * tree-eh.c (operation_could_trap_p): Likewise.
12620 (stmt_could_throw_1_p): Likewise.
12621 * tree-inline.c (estimate_operator_cost): Likewise.
12622 * tree-pretty-print.c (dump_generic_node): Likewise.
12623 (op_code_prio): Likewise.
12624 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12625 * tree-ssa-operands.c (get_expr_operands): Likewise.
12626 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12627 * fold-const-call.h (fold_fma): Delete.
12628 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12629 CFN_FNMA and CFN_FNMS.
12630 (fold_fma): Delete.
12631 * genmatch.c (combined_fn): New enum.
12632 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12633 (commutative_op): New function.
12634 (commutate): Use it. Handle more than 2 operands.
12635 (dt_operand::gen_gimple_expr): Use commutative_op.
12636 (parser::parse_expr): Allow :c to be used with non-binary
12637 operators if the commutative operand is known.
12638 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12639 CFN_FMS, CFN_FNMA and CFN_FNMS.
12640 (backprop::process_assign_use): Remove FMA_EXPR handling.
12641 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12642 (gen_hsa_fma): New function.
12643 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12644 IFN_FNMA and IFN_FNMS.
12645 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12646 * gimple-fold.h (follow_all_ssa_edges): Declare.
12647 * gimple-fold.c (follow_all_ssa_edges): New function.
12648 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12649 gimple_build interface and use follow_all_ssa_edges to fold the result.
12650 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12651 instead of checking for optabs directly.
12652 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12653 rather than FMA_EXPRs.
12654 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12655 call to IFN_FMA instead of an FMA_EXPR.
12657 2018-05-17 Jim Wilson <jimw@sifive.com>
12659 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12660 sign extended promoted subreg, and the range does not have the sign bit
12661 set, then do a sign extend.
12663 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12664 test, check for sign extended subreg and/or constant operands, and
12665 do a sign extend in that case.
12667 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12669 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12670 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12672 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12673 Change logics_shift_reg to logics_shift_imm.
12674 (thunderx2t99_fp_loadpair_basic): Delete.
12675 (thunderx2t99_fp_storepair_basic): Delete.
12676 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12677 (thunderx2t99_asimd_polynomial): Delete.
12678 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12679 and neon_fp_mul_d_scalar_q.
12680 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12681 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12682 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12683 (thunderx2t99_asimd_lut): Add missing tbl types.
12684 (thunderx2t99_asimd_ext): Delete.
12685 (thunderx2t99_asimd_load1_1_mult): Delete.
12686 (thunderx2t99_asimd_load1_2_mult): Delete.
12687 (thunderx2t99_asimd_load1_ldp): New.
12688 (thunderx2t99_asimd_load1): New.
12689 (thunderx2t99_asimd_load2): Add missing *load2* types.
12690 (thunderx2t99_asimd_load3): New.
12691 (thunderx2t99_asimd_load4): New.
12692 (thunderx2t99_asimd_store1_1_mult): Delete.
12693 (thunderx2t99_asimd_store1_2_mult): Delete.
12694 (thunderx2t99_asimd_store2_mult): Delete.
12695 (thunderx2t99_asimd_store2_onelane): Delete.
12696 (thunderx2t99_asimd_store_stp): New.
12697 (thunderx2t99_asimd_store1): New.
12698 (thunderx2t99_asimd_store2): New.
12699 (thunderx2t99_asimd_store3): New.
12700 (thunderx2t99_asimd_store4): New.
12702 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12704 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12705 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12707 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12708 Segher Boessenkool <segher@kernel.crashing.org>
12711 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12714 2018-05-17 Richard Biener <rguenther@suse.de>
12716 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12717 for pruning loop and prune defs feeding only already visited PHIs.
12719 2018-05-17 Richard Biener <rguenther@suse.de>
12721 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12723 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12724 Richard Biener <rguenther@suse.de>
12726 PR tree-optimization/85793
12727 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12728 for VMAT_ELEMENTWISE.
12730 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12732 * internal-fn.h (lookup_internal_fn): Declare
12733 * internal-fn.c (lookup_internal_fn): New function.
12734 * gimple.c (gimple_build_call_from_tree): Handle calls to
12735 internal functions.
12736 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12737 internal function names.
12738 * tree-pretty-print.c (dump_generic_node): Likewise.
12739 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12741 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12743 * gimple-fold.h (gimple_build): Make the function forms take
12744 combined_fn rather than built_in_function.
12745 (gimple_simplify): Likewise.
12746 * gimple-match-head.c (gimple_simplify): Likewise.
12747 * gimple-fold.c (gimple_build): Likewise.
12748 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12749 rather than gimple_build_call_internal.
12750 (get_initial_defs_for_reduction): Likewise.
12751 (vect_create_epilog_for_reduction): Likewise.
12752 (vectorizable_live_operation): Likewise.
12754 2018-05-17 Martin Liska <mliska@suse.cz>
12756 * gimple-ssa-sprintf.c (format_directive): Do not use
12757 space in between 'G_' and '('.
12759 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12762 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12763 even if the mask is not all ones.
12766 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12768 (ix86_gimple_fold_builtin): Likewise.
12771 * config/i386/i386.c: Include tree-vector-builder.h.
12772 (ix86_vector_shift_count): New function.
12773 (ix86_fold_builtin): Fold shift builtins by scalar count.
12774 (ix86_gimple_fold_builtin): Likewise.
12776 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12777 _mm512_setzero): New intrinsics.
12779 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12780 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12782 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12783 code generation for cases where splatting a value is not useful.
12784 * simplify-rtx.c (simplify_ternary_operation): Simplify
12785 vec_merge across a vec_duplicate and a paradoxical subreg forming
12786 a vector mode to a vec_concat.
12788 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12790 * config.gcc: Support "goldmont-plus".
12791 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12793 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12794 PROCESSOR_GOLDMONT_PLUS.
12795 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12796 (processor_target_table): Add "goldmont-plus".
12797 (PTA_GOLDMONT_PLUS): Define.
12798 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12799 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12800 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12801 (fold_builtin_cpu): Add "goldmont-plus".
12802 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12803 (ix86_option_override_internal): Add "goldmont-plus".
12804 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12805 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12806 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12807 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12809 2018-05-17 Richard Biener <rguenther@suse.de>
12811 PR tree-optimization/85757
12812 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12813 remove defs that only feed that PHI from further processing.
12815 2018-05-16 Jim Wilson <jimw@sifive.com>
12817 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12819 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12821 2018-05-16 Mark Wielaard <mark@klomp.org>
12823 * dwarf2out.c (count_index_strings): New function.
12824 (output_indirect_strings): Call count_index_strings and generate
12825 header for dwarf_version >= 5.
12827 2018-05-16 Mark Wielaard <mark@klomp.org>
12829 * dwarf2out.c (dwarf_FORM): New function.
12830 (set_indirect_string): Use dwarf_FORM.
12831 (reset_indirect_string): Likewise.
12832 (size_of_die): Likewise.
12833 (value_format): Likewise.
12834 (output_die): Likewise.
12835 (add_skeleton_AT_string): Likewise.
12836 (output_macinfo_op): Likewise.
12837 (index_string): Likewise.
12838 (output_index_string_offset): Likewise.
12839 (output_index_string): Likewise.
12840 (count_index_strings): Likewise.
12842 2018-05-16 Carl Love <cel@us.ibm.com>
12844 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12845 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12847 2018-05-16 Martin Jambor <mjambor@suse.cz>
12849 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12850 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12852 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12854 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12855 (fnma<mode>4): Likewise.
12856 (fms<mode>4): Likewise.
12857 (fnms<mode>4): Likewise.
12858 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12859 (aarch64_fnma<mode>4): Likewise.
12860 (aarch64_fms<mode>4): Likewise.
12861 (aarch64_fnms<mode>4): Likewise.
12862 (aarch64_fnmadd<mode>4): Likewise.
12864 2018-05-16 Jason Merrill <jason@redhat.com>
12866 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12868 2018-05-16 Richard Biener <rguenther@suse.de>
12870 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12871 (dump_stmt_cost): Declare.
12872 (add_stmt_cost): Dump cost we add.
12873 (add_stmt_costs): New function.
12874 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12875 No longer exported.
12876 (vect_analyze_stmt): Adjust prototype.
12877 (vectorizable_condition): Likewise.
12878 (vectorizable_live_operation): Likewise.
12879 (vectorizable_reduction): Likewise.
12880 (vectorizable_induction): Likewise.
12881 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12882 cost vector to pass to vectorizable_ and record afterwards.
12883 (vect_model_reduction_cost): Take cost vector argument and adjust.
12884 (vect_model_induction_cost): Likewise.
12885 (vectorizable_reduction): Likewise.
12886 (vectorizable_induction): Likewise.
12887 (vectorizable_live_operation): Likewise.
12888 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12889 SLP_TREE_NUMBER_OF_VEC_STMTS.
12890 (vect_analyze_slp_cost_1): Remove.
12891 (vect_analyze_slp_cost): Likewise.
12892 (vect_slp_analyze_node_operations): Take visited args and
12893 a target cost vector. Avoid processing already visited stmt sets.
12894 (vect_slp_analyze_operations): Use a local cost vector to gather
12895 costs and register those of non-discarded instances.
12896 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12897 (vect_schedule_slp_instance): Remove copying of
12898 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12900 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12901 adding cost. Record cost entry location.
12902 (vect_prologue_cost_for_slp_op): Function to compute cost of
12903 a constant or invariant generated for SLP vect in the prologue,
12904 split out from vect_analyze_slp_cost_1.
12905 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12906 (vect_model_promotion_demotion_cost): Likewise.
12907 (vect_model_store_cost): Likewise, make static.
12908 (vect_model_load_cost): Likewise.
12909 (vectorizable_bswap): Add cost vector arg and adjust.
12910 (vectorizable_call): Likewise.
12911 (vectorizable_simd_clone_call): Likewise.
12912 (vectorizable_conversion): Likewise.
12913 (vectorizable_assignment): Likewise.
12914 (vectorizable_shift): Likewise.
12915 (vectorizable_operation): Likewise.
12916 (vectorizable_store): Likewise.
12917 (vectorizable_load): Likewise.
12918 (vectorizable_condition): Likewise.
12919 (vectorizable_comparison): Likewise.
12920 (can_vectorize_live_stmts): Likewise.
12921 (vect_analyze_stmt): Likewise.
12922 (vect_transform_stmt): Adjust calls to vectorizable_*.
12923 * tree-vectorizer.c: Include gimple-pretty-print.h.
12924 (dump_stmt_cost): New function.
12926 2018-05-16 Richard Biener <rguenther@suse.de>
12928 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12929 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12930 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12931 (check_name): New callback.
12932 (dse_classify_store): Track cycles via a visited bitmap of PHI
12933 defs and simplify handling of in-loop and across loop dead stores
12934 and properly fail for loop-variant refs. Handle byte-tracking with
12935 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12938 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12940 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12941 (vect_get_mask_type_for_stmt): Likewise.
12942 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12944 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12945 to determine the statement's vector type and the vector type that
12946 should be used for calculating nunits. Deal with cases in which
12947 the type has to be deferred.
12948 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12949 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12950 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12951 (vect_determine_vf_for_stmt): New functions, split out from...
12952 (vect_determine_vectorization_factor): ...here.
12953 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12954 (vect_get_mask_type_for_stmt): New functions, split out from
12955 vect_determine_vectorization_factor.
12957 2018-05-16 Richard Biener <rguenther@suse.de>
12959 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12960 verify the [VEC_]COND_EXPR embedded comparison.
12962 2018-05-15 Martin Sebor <msebor@redhat.com>
12964 PR tree-optimization/85753
12965 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12966 RECORD_TYPE in addition to ARRAY_TYPE.
12968 2018-05-15 Martin Sebor <msebor@redhat.com>
12970 PR middle-end/85643
12971 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12973 2018-05-15 Richard Biener <rguenther@suse.de>
12975 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12976 add by_clobber_p one. Change algorithm to collect all defs
12977 representing uses we need to walk and try reducing them to
12978 a single one before failing.
12979 (dse_dom_walker::dse_optimize_stmt): Adjust.
12981 2018-05-13 Mark Wielaard <mark@klomp.org>
12983 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12984 (size_of_loc_descr): Likewise.
12985 (output_loc_operands): Likewise.
12986 (output_loc_operands_raw): Likewise.
12987 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12988 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12989 (hash_loc_operands): Likewise.
12990 (compare_loc_operands): Likewise.
12992 2018-05-14 Mark Wielaard <mark@klomp.org>
12994 * dwarf2out.c (count_index_addrs): New function.
12995 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12997 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12999 PR tree-optimization/83648
13000 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13001 return value as malloc candidate.
13003 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13006 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13007 param as true in call to suggest_attribute.
13009 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13011 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13012 -mreadonly-in-sdata.
13014 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13016 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13018 (aarch64_crypto_aesd_fused): Likewise.
13020 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13022 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13023 (movsi_aarch64): Likewise.
13024 (load_pairsi): Likewise.
13025 (load_pairdi): Likewise.
13026 (store_pairsi): Likewise.
13027 (store_pairdi): Likewise.
13028 (load_pairsf): Likewise.
13029 (load_pairdf): Likewise.
13030 (store_pairsf): Likewise.
13031 (store_pairdf): Likewise.
13032 (zero_extend): Likewise.
13033 (trunc): Swap alternatives.
13034 (fcvt_target): Add '?' to prefer w over r.
13036 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13039 * config/i386/i386.md: Disallow non-commutative arithmetics in
13040 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13041 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13042 in the peephole2 before it.
13044 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13046 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13047 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13048 (ix86_handle_option): Handle -mcldemote.
13049 * config.gcc: New header.
13050 * config/i386/cldemoteintrin.h: New file.
13051 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13052 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13054 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13055 OPTION_MASK_ISA_CLDEMOTE.
13056 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13057 (ix86_valid_target_attribute_inner_p): Ditto.
13058 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13059 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13060 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13061 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13062 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13064 * config/i386/i386.opt: Add -mcldemote.
13065 * config/i386/x86intrin.h: New header.
13066 * doc/invoke.texi: Add -mcldemote.
13068 2018-05-14 Richard Biener <rguenther@suse.de>
13070 * doc/match-and-simplify.texi: Adjust :s documentation.
13072 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13074 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13075 intended memcpy size.
13076 (REORDER_45): Likewise.
13078 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13080 * sort.cc: New file.
13081 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13082 * vec.c (qsort_chk): Use gcc_qsort.
13083 * Makefile.in (OBJS-libcommon): Add sort.o.
13084 (build/sort.o): New target. Use it...
13085 (BUILD_RTL): ... here, and...
13086 (build/gencfn-macros): ... here, and...
13087 (build/genmatch): ... here.
13089 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13090 Chung-Ju Wu <jasonwucj@gmail.com>
13092 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13093 * config/nds32/nds32-graywolf.md: New file.
13094 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13095 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13097 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13098 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13099 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13100 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13101 * config/nds32/pipelines.md: Include n15 settings.
13103 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13104 Chung-Ju Wu <jasonwucj@gmail.com>
13106 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13107 * config/nds32/nds32-n13.md: New file.
13108 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13109 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13111 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13112 * config/nds32/nds32.md (pipeline_model): Add n13.
13113 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13114 * config/nds32/pipelines.md: Include n13 settings.
13116 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13117 Chung-Ju Wu <jasonwucj@gmail.com>
13119 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13120 * config/nds32/nds32-n10.md: New file.
13121 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13122 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13124 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13125 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13126 * config/nds32/nds32.md (pipeline_model): Add n10.
13127 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13128 * config/nds32/pipelines.md: Include n10 settings.
13130 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13131 Kito Cheng <kito.cheng@gmail.com>
13132 Chung-Ju Wu <jasonwucj@gmail.com>
13134 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13135 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13136 Add enum values for DSP extension instructions.
13137 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13139 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13140 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13141 New code iterators.
13142 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13143 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13144 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13145 * config/nds32/nds32-intrinsic.md: Likewise.
13146 * config/nds32/nds32_intrinsic.h: Likewise.
13147 * config/nds32/nds32-md-auxiliary.c: Likewise.
13148 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13149 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13150 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13151 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13152 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13153 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13154 TYPE_DMAC in switch statement.
13155 * config/nds32/nds32.c: New checking and implementation for DSP
13156 extension instructions.
13157 * config/nds32/nds32.h: Likewise.
13158 * config/nds32/nds32.md: Likewise.
13159 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13160 * config/nds32/predicates.md: Implement new predicates for DSP
13163 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13165 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13166 Reformat alternatives and attributes so it is easier to identify
13167 which constraints/attributes go with which instruction.
13168 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13169 (mov<mode>_softfloat32, FMOVE64): Likewise.
13170 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13171 (mov<mode>_softfloat64, FMOVE64): Likewise.
13173 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13175 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13177 (Basic PowerPC Built-in Functions): The new name of the
13178 subsection previously known as "PowerPC Built-in Functions".
13179 (Basic PowerPC Built-in Functions Available on all Configurations):
13181 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13182 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13183 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13184 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13186 2018-05-11 Martin Jambor <mjambor@suse.cz>
13189 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13192 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13195 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13197 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13199 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13200 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13201 (ix86_handle_option): Handle -mwaitpkg.
13202 * config.gcc: New header.
13203 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13204 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13205 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13207 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13208 OPTION_MASK_ISA_WAITPKG.
13209 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13210 (ix86_option_override_internal): Add PTA_WAITPKG.
13211 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13212 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13213 IX86_BUILTIN_TPAUSE.
13214 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13215 __builtin_ia32_umwait and __builtin_ia32_tpause.
13216 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13217 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13218 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13219 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13220 UNSPECV_TPAUSE): New.
13221 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13222 * config/i386/i386.opt: Add -mwaitpkg.
13223 * config/i386/waitpkgintrin.h: New file.
13224 * config/i386/x86intrin.h: New header.
13225 * doc/invoke.texi: Add -mwaitpkg.
13227 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13230 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13232 (cortex-m0): Use armv6s-m isa.
13233 (cortex-m0plus): Likewise.
13234 (cortex-m1): Likewise.
13235 (cortex-m0.small-multiply): Likewise.
13236 (cortex-m0plus.small-multiply): Likewise.
13237 (cortex-m1.small-multiply): Likewise.
13239 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13240 Jakub Jelinek <jakub@redhat.com>
13242 PR tree-optimization/85692
13243 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13244 source permute as well.
13246 2018-05-11 Martin Liska <mliska@suse.cz>
13249 * doc/extend.texi: Document LLVM style format for no_sanitize
13252 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13254 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13255 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13256 (mode_supports_vsx_dform_quad): Likewise.
13257 (mode_supports_vmx_dform): Move these functions to be next to the
13258 other mode_supports functions.
13259 (mode_supports_dq_form): Likewise.
13260 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13261 mode_supports_dq_form.
13262 (reg_offset_addressing_ok_p): Likewise.
13263 (offsettable_ok_by_alignment): Likewise.
13264 (rs6000_legitimate_offset_address_p): Likewise.
13265 (legitimate_lo_sum_address_p): Likewise.
13266 (rs6000_legitimize_address): Likewise.
13267 (rs6000_legitimize_reload_address): Likewise.
13268 (rs6000_secondary_reload_inner): Likewise.
13269 (rs6000_preferred_reload_class): Likewise.
13270 (rs6000_output_move_128bit): Likewise.
13272 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13274 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13275 Generate SImode target register for null target.
13276 <case IX86_BUILTIN_XGETBV>: Ditto.
13277 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13278 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13280 2018-05-10 Carl Love <cel@us.ibm.com>
13282 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13283 dcbtt and dcbtstt if operands[2] is 0.
13285 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13288 * config/i386/sse.md (usadv64qi): New expander.
13290 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13292 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13293 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13294 -maltivec=be support.
13295 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13296 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13297 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13298 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13299 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13300 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13301 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13302 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13303 altivec_vsumsws): Adjust.
13304 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13305 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13306 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13308 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13309 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13310 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13311 (altivec_lve<VI_char>x): Delete expand.
13312 (*altivec_lve<VI_char>x_internal): Rename to...
13313 (altivec_lve<VI_char>x): ... this.
13314 (altivec_lvxl_<mode>): Delete expand.
13315 (*altivec_lvxl_<mode>_internal): Rename to ...
13316 (altivec_lvxl_<mode>): ... this.
13317 (altivec_stvxl_<mode>): Delete expand.
13318 (*altivec_stvxl_<mode>_internal): Rename to ...
13319 (altivec_stvxl_<mode>): ... this.
13320 (altivec_stve<VI_char>x): Delete expand.
13321 (*altivec_stve<VI_char>x_internal): Rename to ...
13322 (altivec_stve<VI_char>x): ... this.
13323 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13324 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13325 reduc_plus_scal_<mode>): Adjust.
13326 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13328 (rs6000_cpu_cpp_builtins): Adjust.
13329 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13330 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13331 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13332 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13333 -maltivec=be support.
13334 (rs6000_split_vec_extract_var): Adjust.
13335 (rs6000_split_v4si_init): Adjust.
13336 (swap_selector_for_mode): Delete.
13337 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13338 altivec_expand_stvex_be): Delete.
13339 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13340 -maltivec=be support.
13341 (rs6000_gimple_fold_builtin): Ditto.
13342 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13344 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13345 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13346 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13347 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13348 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13349 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13350 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13351 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13352 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13353 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13354 anonymous split): Adjust.
13355 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13356 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13358 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13360 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13361 when --with-gxx-include-dir is also specified.
13362 * configure: Regenerate.
13364 2018-05-09 Jim Wilson <jimw@sifive.com>
13367 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13368 * config/riscv/t-withmultilib: New.
13369 * config/riscv/withmultilib.h: New.
13370 * doc/install.texi: Document RISC-V --with-multilib-list support.
13372 2018-05-09 Richard Biener <rguenther@suse.de>
13374 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13376 (vect_bb_vectorization_profitable_p): Adjust. Compute
13377 actual scalar cost using the cost vector and the add_stmt_cost
13380 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13382 PR rtl-optimization/85645
13383 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13384 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13386 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13388 PR rtl-optimization/85645
13389 * shrink-wrap.c (spread_components): Return a boolean saying if
13390 anything was changed.
13391 (try_shrink_wrapping_separate): Iterate spread_components until
13392 nothing changes anymore.
13394 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13396 PR rtl-optimization/85645
13397 * regrename.c (build_def_use): Also kill the chains that include the
13398 destination of a REG_CFA_REGISTER note.
13400 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13402 PR rtl-optimization/85645
13403 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13404 insn that has a REG_CFA_REGISTER note.
13406 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13408 * cfgexpand.c (expand_clobber): New function.
13409 (expand_gimple_stmt_1): Use it.
13410 * tree-vect-stmts.c (vect_clobber_variable): New function,
13412 (vectorizable_simd_clone_call): ...here.
13413 (vectorizable_store): Emit a clobber either side of an
13414 IFN_STORE_LANES sequence.
13415 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13417 2018-05-09 Tom de Vries <tom@codesourcery.com>
13420 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13421 (define_insn "trap_if_false"): Add exit after trap.
13423 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13425 PR rtl-optimization/85638
13426 * bb-reorder.c: Include common/common-target.h.
13427 (create_forwarder_block): New function extracted from...
13428 (fix_up_crossing_landing_pad): ...here. Rename into...
13429 (dw2_fix_up_crossing_landing_pad): ...this.
13430 (sjlj_fix_up_crossing_landing_pad): New function.
13431 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13432 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13433 from both partitions and exit the loop after one iteration.
13435 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13438 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13440 (Basic PowerPC Built-in Functions): The new name of the
13441 subsection previously known as "PowerPC Built-in Functions".
13442 (Basic PowerPC Built-in Functions Available on all Configurations):
13444 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13446 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13448 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13450 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13453 2018-05-08 Jim Wilson <jimw@sifive.com>
13455 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13456 (LD_EMUL_SUFFIX): New.
13457 (LINK_SPEC): Use it.
13459 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13461 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13463 (Basic PowerPC Built-in Functions): The new name of the
13464 subsection previously known as "PowerPC Built-in Functions".
13465 (Basic PowerPC Built-in Functions Available on all Configurations):
13467 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13469 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13471 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13473 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13476 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13479 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13480 after cmpelim optimization.
13482 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13484 * config.gcc: Support "goldmont".
13485 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13486 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13487 PROCESSOR_GOLDMONT.
13488 * config/i386/i386.c (m_GOLDMONT): Define.
13489 (processor_target_table): Add "goldmont".
13490 (PTA_GOLDMONT): Define.
13491 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13492 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13493 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13494 (fold_builtin_cpu): Add "goldmont".
13495 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13496 (ix86_option_override_internal): Add "goldmont".
13497 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13498 (processor_type): Add PROCESSOR_GOLDMONT.
13499 * config/i386/i386.md: Add CPU "glm".
13500 * config/i386/glm.md: New file.
13501 * config/i386/x86-tune.def: Add m_GOLDMONT.
13502 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13504 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13507 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13509 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13510 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13511 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13514 * config/i386/i386.c (ix86_fold_builtin): Handle
13515 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13518 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13519 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13521 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13524 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13525 (check_arch): Likewise.
13526 (check_fpu): Return the result rather than printing it.
13527 (end arch): Fix operator precedence.
13528 (end cpu): Likewise.
13529 (END): Print the result from check_fpu.
13531 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13532 Alan Hayward <alan.hayward@arm.com>
13533 David Sherwood <david.sherwood@arm.com>
13535 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13536 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13537 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13538 (*fcmuo<mode>_and): New patterns.
13540 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13542 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13543 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13544 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13545 (cmp_op, sve_imm_con): New code attributes.
13546 (SVE_COND_INT_CMP, imm_con): Delete.
13547 (cmp_op): Remove above unspecs from int attribute.
13548 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13550 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13551 comparison-specific unspecs.
13552 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13553 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13554 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13555 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13556 (*vec_fcm<cmp_op><mode>): Rename to...
13557 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13558 (*vec_fcmuo<mode>): Rename to...
13559 (*fcmuo<mode>): ...this and adjust likewise.
13560 (*pred_fcm<cmp_op><mode>): New pattern.
13561 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13562 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13564 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13566 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13567 (aarch64_emit_sve_predicated_cond): New function.
13568 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13569 (aarch64_emit_unspec_cond_or): Replace with...
13570 (aarch64_emit_sve_or_conds): ...this new function. Use
13571 aarch64_emit_sve_ptrue_op for the individual comparisons and
13572 aarch64_emit_binop to OR them together.
13573 (aarch64_emit_inverted_unspec_cond): Replace with...
13574 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13575 aarch64_emit_sve_ptrue_op for the comparison and
13576 aarch64_emit_unop to invert the result.
13577 (aarch64_expand_sve_vec_cmp_float): Update after the above
13578 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13580 2018-05-07 Nathan Sidwell <nathan@acm.org>
13582 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13583 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13584 (Backwards Compatibility): Likewise.
13586 2018-05-07 Luis Machado <luis.machado@linaro.org>
13590 2018-05-07 Luis Machado <luis.machado@linaro.org>
13592 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13593 <prefetch_dynamic_strides>: New const bool field.
13594 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13595 prefetch_dynamic_strides.
13596 (exynosm1_prefetch_tune): Likewise.
13597 (thunderxt88_prefetch_tune): Likewise.
13598 (thunderx_prefetch_tune): Likewise.
13599 (thunderx2t99_prefetch_tune): Likewise.
13600 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13602 (aarch64_override_options_internal): Update to set
13603 PARAM_PREFETCH_DYNAMIC_STRIDES.
13604 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13605 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13606 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13607 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13608 prefetch-dynamic-strides setting.
13610 2018-05-07 Luis Machado <luis.machado@linaro.org>
13612 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13613 <minimum_stride>: New const int field.
13614 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13615 minimum_stride field.
13616 (exynosm1_prefetch_tune): Likewise.
13617 (thunderxt88_prefetch_tune): Likewise.
13618 (thunderx_prefetch_tune): Likewise.
13619 (thunderx2t99_prefetch_tune): Likewise.
13620 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13621 (aarch64_override_options_internal): Update to set
13622 PARAM_PREFETCH_MINIMUM_STRIDE.
13623 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13624 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13625 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13626 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13627 stride is constant and is below the minimum stride threshold.
13629 2018-05-07 Luis Machado <luis.machado@linaro.org>
13631 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13634 2018-05-07 Luis Machado <luis.machado@linaro.org>
13636 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13637 <prefetch_dynamic_strides>: New const bool field.
13638 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13639 prefetch_dynamic_strides.
13640 (exynosm1_prefetch_tune): Likewise.
13641 (thunderxt88_prefetch_tune): Likewise.
13642 (thunderx_prefetch_tune): Likewise.
13643 (thunderx2t99_prefetch_tune): Likewise.
13644 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13646 (aarch64_override_options_internal): Update to set
13647 PARAM_PREFETCH_DYNAMIC_STRIDES.
13648 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13649 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13650 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13651 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13652 prefetch-dynamic-strides setting.
13654 2018-05-07 Luis Machado <luis.machado@linaro.org>
13656 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13657 <minimum_stride>: New const int field.
13658 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13659 minimum_stride field.
13660 (exynosm1_prefetch_tune): Likewise.
13661 (thunderxt88_prefetch_tune): Likewise.
13662 (thunderx_prefetch_tune): Likewise.
13663 (thunderx2t99_prefetch_tune): Likewise.
13664 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13665 (aarch64_override_options_internal): Update to set
13666 PARAM_PREFETCH_MINIMUM_STRIDE.
13667 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13668 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13669 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13670 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13671 stride is constant and is below the minimum stride threshold.
13673 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13676 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13677 the type is addressable. Don't force op into register if it has
13680 2018-05-05 Roland McGrath <mcgrathr@google.com>
13683 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13684 any section for which we don't know a specific type it should have,
13685 regardless of name. Previously this was done only for the exact
13686 names ".init_array", ".fini_array", and ".preinit_array".
13687 (default_elf_asm_named_section): Add comment about
13688 relationship with default_section_type_flags and SECTION_NOTYPE.
13689 (get_section): Don't consider it a type conflict if one side has
13690 SECTION_NOTYPE and the other doesn't, as long as neither has the
13691 SECTION_BSS et al used in the default_section_type_flags logic.
13693 2018-05-05 Tom de Vries <tom@codesourcery.com>
13696 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13697 (workaround_barsyncs): New function.
13698 (nvptx_reorg): Use workaround_barsyncs.
13699 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13700 (define_expand "nvptx_membar_cta"): New define_expand.
13701 (define_insn "*nvptx_membar_cta"): New insn.
13703 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13705 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13706 To improve optimization opportunities.
13707 * builtin-types.def: The new needed builtin types for the above.
13709 2018-05-04 Richard Biener <rguenther@suse.de>
13711 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13712 * gimple-ssa-store-merging.c
13713 (imm_store_chain_info::output_merged_store): Remove redundant create,
13714 release split_store vector contents on failure.
13715 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13716 scalar stmt vector on cache hit.
13718 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13720 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13722 * config.gcc (powerpc-xilinx-eabi*): Remove.
13723 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13725 (fusion_addis_mem_combo_load): Ditto.
13726 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13728 (rs6000_cpu_cpp_builtins): Ditto.
13729 * config/rs6000/rs6000-linux.c
13730 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13731 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13732 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13734 (rs6000_setup_reg_addr_masks): Ditto.
13735 (rs6000_init_hard_regno_mode_ok): Ditto.
13736 (rs6000_option_override_internal): Ditto.
13737 (legitimate_lo_sum_address_p): Ditto.
13738 (rs6000_legitimize_address): Ditto.
13739 (rs6000_legitimize_reload_address): Ditto.
13740 (rs6000_legitimate_address_p): Ditto.
13741 (abi_v4_pass_in_fpr): Ditto.
13742 (setup_incoming_varargs): Ditto.
13743 (rs6000_gimplify_va_arg): Ditto.
13744 (rs6000_split_multireg_move): Ditto.
13745 (rs6000_savres_strategy): Ditto.
13746 (rs6000_emit_prologue_components): Ditto.
13747 (rs6000_emit_epilogue_components): Ditto.
13748 (rs6000_emit_prologue): Ditto.
13749 (rs6000_emit_epilogue): Ditto.
13750 (rs6000_elf_file_end): Ditto.
13751 (rs6000_function_value): Ditto.
13752 (rs6000_libcall_value): Ditto.
13753 * config/rs6000/rs6000.h: Ditto.
13754 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13755 (TARGET_MINMAX): ... this. New.
13756 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13757 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13758 (*movsi_internal1_single): Delete.
13759 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13760 mfpu=, mxilinx-fpu): Delete.
13761 * config/rs6000/singlefp.h: Delete.
13762 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13763 * config/rs6000/t-rs6000: Ditto.
13764 * config/rs6000/t-xilinx: Delete.
13765 * config/rs6000/titan.md: Adjust for fp_type removal.
13766 * config/rs6000/vsx.md: Remove Xilinx FP support.
13767 (VStype_simple): Delete.
13768 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13769 * config/rs6000/xfpu.h: Delete.
13770 * config/rs6000/xfpu.md: Delete.
13771 * config/rs6000/xilinx.h: Delete.
13772 * config/rs6000/xilinx.opt: Delete.
13773 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13774 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13776 2018-05-04 Tom de Vries <tom@codesourcery.com>
13779 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13782 2018-05-04 Richard Biener <rguenther@suse.de>
13784 PR middle-end/85627
13785 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13786 (expand_complex_div_wide): Likewise.
13787 (expand_complex_operations_1): Likewise.
13788 (expand_complex_libcall): Preserve EH info of the original stmt.
13789 (tree_lower_complex): Handle removed blocks.
13790 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13791 on complex multiplication and division libcall builtins.
13793 2018-05-04 Richard Biener <rguenther@suse.de>
13795 PR middle-end/85574
13796 * fold-const.c (negate_expr_p): Restrict negation of operand
13797 zero of a division to when we know that can happen without
13799 (fold_negate_expr_1): Likewise.
13801 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13804 * real.h (real_nextafter): Declare.
13805 * real.c (real_nextafter): New function.
13806 * fold-const-call.c (fold_const_nextafter): New function.
13807 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13808 CASE_CFN_NEXTTOWARD.
13809 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13810 even when arg1_mode is different from arg0_mode.
13812 2018-05-03 Nathan Sidwell <nathan@acm.org>
13814 * doc/extend.texi (Deprecated Features): Remove
13815 -ffriend-injection.
13816 (Backwards Compatibility): Likewise.
13817 * doc/invoke.texi (C++ Language Options): Likewise.
13818 (C++ Dialect Options): Likewise.
13820 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13823 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13824 _mm512_mask_mullox_epi64): New intrinsics.
13826 2018-05-03 Tom de Vries <tom@codesourcery.com>
13829 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13830 dump files): Add offload-tree.
13832 2018-05-03 Richard Biener <rguenther@suse.de>
13834 PR tree-optimization/85615
13835 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13836 to loops not nested in BBs loop father to avoid creating multi-entry
13839 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13841 PR tree-optimization/70291
13842 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13843 arguments. Change return type to tree. Emit libcall as a new
13844 statement rather than replacing existing one when inplace_p is true.
13845 (expand_complex_multiplication_components): New function.
13846 (expand_complex_multiplication): Expand floating-point complex
13847 multiplication using the above.
13848 (expand_complex_division): Rename inner_type parameter to type.
13849 Update expand_complex_libcall call-site.
13850 (expand_complex_operations_1): Update expand_complex_multiplication
13851 and expand_complex_division call-sites.
13853 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13856 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13857 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13858 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13859 the highest significant bit of the shift count mask is clear. In
13860 check whether and[sq]i3 is needed verify that all significant bits
13861 of the shift count other than the highest are set.
13863 2018-05-02 Tom de Vries <tom@codesourcery.com>
13866 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13867 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13868 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13869 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13870 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13871 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13872 __builtin_goacc_parlevel_size.
13874 2018-05-02 Richard Biener <rguenther@suse.de>
13876 PR tree-optimization/85597
13877 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13878 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13881 2018-05-02 Tom de Vries <tom@codesourcery.com>
13884 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13885 dump files): Add ltrans-tree.
13887 2018-05-02 Tom de Vries <tom@codesourcery.com>
13890 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13891 dump files): Add wpa-ipa.
13893 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13895 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13896 powerpc*-*-linux*paired* target.
13897 * config/rs6000/750cl.h: Delete.
13898 * config/rs6000/paired.h: Delete.
13899 * config/rs6000/paired.md: Delete.
13900 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13902 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13903 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13904 comment. Remove paired float support.
13905 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13906 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13908 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13909 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13911 * config/rs6000/rs6000.c: Remove paired float support.
13912 (paired_expand_vector_init, paired_expand_vector_move,
13913 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13914 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13915 paired_expand_builtin, paired_expand_predicate_builtin,
13916 paired_init_builtins): Delete.
13917 * config/rs6000/rs6000.h: Remove paired float support.
13918 * config/rs6000/rs6000.md: Remove paired float support.
13919 (move_from_CR_ov_bit): Delete.
13920 * config/rs6000/rs6000.opt (mpaired): Delete.
13921 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13922 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13924 2018-05-02 Richard Biener <rguenther@suse.de>
13926 PR middle-end/85567
13927 * gimplify.c (gimplify_save_expr): When in SSA form allow
13928 SAVE_EXPRs to compute to SSA vars.
13930 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13933 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13934 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13935 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13936 clobber operands[2], instead use a new pseudo. Formatting fixes.
13938 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13940 PR tree-optimization/85586
13941 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13942 exit early for statements in the same group if the accesses are
13945 2018-05-02 Tom de Vries <tom@codesourcery.com>
13948 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13951 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13953 PR tree-optimization/85143
13954 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13956 2018-05-01 Tom de Vries <tom@codesourcery.com>
13959 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13960 not found" error message.
13962 2018-05-01 Tom de Vries <tom@codesourcery.com>
13965 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13966 * vec.c (test_ordered_remove_if): New function.
13967 (vec_c_tests): Call test_ordered_remove_if.
13968 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13969 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13970 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13971 VEC_ORDERED_REMOVE_IF.
13973 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13975 PR tree-optimization/82665
13976 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13977 pointer subtraction where arguments come from a memchr call.
13979 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13981 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13982 --push-state --as-needed and --pop-state instead of --as-needed and
13983 --no-as-needed if ld supports it.
13984 * configure: Regenerated.
13987 * doc/install.texi2html: Replace _002d with - and _002a with * in
13988 generated html files using sed.
13990 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13993 * gcc-rich-location.c (blank_line_before_p): New function.
13994 (use_new_line): New function.
13995 (gcc_rich_location::add_fixit_insert_formatted): New function.
13996 * gcc-rich-location.h
13997 (gcc_rich_location::add_fixit_insert_formatted): New function.
13999 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14001 * selftest.c (assert_streq): Rename "expected" and "actual" to
14002 "val1" and "val2". Extend NULL-handling to cover both inputs
14003 symmetrically, while still requiring both to be non-NULL for a pass.
14004 * selftest.h (assert_streq): Rename "expected" and "actual" to
14006 (ASSERT_EQ): Likewise.
14007 (ASSERT_EQ_AT): Likewise.
14008 (ASSERT_KNOWN_EQ): Likewise.
14009 (ASSERT_KNOWN_EQ_AT): Likewise.
14010 (ASSERT_NE): Likewise.
14011 (ASSERT_MAYBE_NE): Likewise.
14012 (ASSERT_MAYBE_NE_AT): Likewise.
14013 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14014 the assertion to pass.
14015 (ASSERT_STREQ_AT): Likewise.
14017 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14019 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14020 interaction with -pie.
14022 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14024 * selftest.h: Fix alphabetization of per-source-file selftest
14027 2018-04-30 Jason Merrill <jason@redhat.com>
14029 PR c++/61982 - dead stores to destroyed objects.
14030 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14033 2018-04-30 Jason Merrill <jason@redhat.com>
14035 * tree.c (build_clobber): New.
14036 * tree.h: Declare it.
14037 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14039 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14041 * diagnostic-show-locus.c (layout::layout): Update for
14042 location_get_source_line returning a char_span.
14043 (struct char_span): Move to input.h.
14044 (struct correction): Update for fields in char_span becoming
14046 (struct source_line): Update for location_get_source_line
14047 returning a char_span.
14048 (layout::print_line): Likewise.
14049 * edit-context.c (edited_file::print_content): Likewise.
14050 (edited_file::print_diff_hunk): Likewise.
14051 (edited_file::print_run_of_changed_lines): Likewise.
14052 (edited_file::get_num_lines): Likewise.
14053 (edited_line::edited_line): Likewise.
14054 * final.c (asm_show_source): Likewise.
14055 * input.c (location_get_source_line): Convert return type
14056 from const char * to char_span, losing the final "line_len"
14058 (dump_location_info): Update for the above.
14059 (get_substring_ranges_for_loc): Likewise. Use a char_span
14060 when handling the literal within the line.
14061 (test_reading_source_line): Update for location_get_source_line
14062 returning a char_span.
14063 * input.h (class char_span): Move here from
14064 diagnostic-show-locus.c, converting from a struct to a class.
14065 Make data members private.
14066 (char_span::operator bool): New.
14067 (char_span::length): New.
14068 (char_span::get_buffer): New.
14069 (char_span::operator[]): New.
14070 (char_span::subspan): Make const.
14071 (char_span::xstrdup): New.
14072 (location_get_source_line): Convert return type from const char *
14073 to char_span, losing the final "line_size" param.
14075 2018-04-30 Jan Hubicka <jh@suse.cz>
14077 * lto-wrapper.c (ltrans_priorities): New static var.
14078 (cmp_priority): New.
14079 (run_gcc): Read priorities and if doing parallel build order
14080 the Makefile by them.
14082 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14084 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14086 2018-04-30 Richard Biener <rguenther@suse.de>
14088 * tree-cfg.c (verify_address): Remove base argument, add
14089 flag whether to check TREE_ADDRESSABLE and do that.
14090 (verify_expr): Remove.
14091 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14092 (verify_gimple_assign_single): Likewise.
14093 (verify_gimple_switch): Likewise.
14094 (verify_expr_location_1): Dereference tp once. Add (disabled)
14095 piece from verify_expr.
14096 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14098 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14100 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14102 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14104 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14105 (small_data_pattern): Likewise.
14106 (arc_rewrite_small_data): Likewise.
14107 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14108 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14109 (get_symbol_alignment): New function.
14110 (legitimate_small_data_address_p): Likewise.
14111 (legitimate_scaled_address): Update, call
14112 legitimate_small_data_address_p.
14113 (output_sdata): New static variable.
14114 (arc_print_operand): Update how we handle small data operands.
14115 (arc_print_operand_address): Likewise.
14116 (arc_legitimate_address_p): Update, use
14117 legitimate_small_data_address_p.
14118 (arc_rewrite_small_data_p): Remove.
14119 (arc_rewrite_small_data_1): Likewise.
14120 (arc_rewrite_small_data): Likewise.
14121 (small_data_pattern): Likewise.
14122 (compact_sda_memory_operand): Update to use
14123 legitimate_small_data_address_p and get_symbol_alignment.
14124 (prepare_move_operands): Don't rewite sdata pattern.
14125 (prepare_extend_operands): Remove.
14126 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14128 (zero_extendqisi2): Likewise.
14129 (zero_extendhisi2): Likewise.
14130 (extendqihi2): Likewise.
14131 (extendqisi2): Likewise.
14132 (extendhisi2): Likewise.
14133 (addsi3): Likewise.
14134 (subsi3): Likewise.
14135 (andsi3): Likewise.
14136 * config/arc/constraints.md (Usd): Change it to memory constraint.
14138 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14140 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14141 as source of std instructions.
14142 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14143 allow 6-bit constants as source for store instructions.
14144 (movdi_insn): Update instruction pattern to allow 6-bit constants
14145 as source for store instructions.
14147 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14149 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14151 2018-04-30 Nathan Sidwell <nathan@acm.org>
14152 Sandra Loosemore <sandra@codesourcery.com>
14154 * dumpfile.c (dump_open): Allow '-' for stdout.
14155 * doc/invoke.texi (Developer Options): Document dump filename
14156 determination early. Document stdin/stdout selection.
14158 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14160 Microblaze Target: PIC data text relative
14162 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14163 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14165 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14166 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14167 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14168 New addressing mode for data-text relative position indepenedent code.
14169 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14170 'ADDRESS_SYMBOLIC_TXT_REL'.
14171 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14172 (microblaze_legitimate_pic_operand): Exclude function calls from
14173 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14174 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14176 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14177 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14178 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14179 for 'address + offset'.
14180 (microblaze_expand_prologue): Add new function prologue call for
14182 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14183 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14184 table in case of TARGET_PIC_DATA_TEXT_REL.
14185 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14186 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14187 Add new macros 'UNSPEC_TEXT',
14188 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14189 + exclude function calls from 'UNSPEC_PLT' in case of data text
14191 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14192 new target hook for generating address diff vector tables in case of
14194 * doc/tm.texi : Regenerate.
14195 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14196 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14197 of addr diff vector generation.
14198 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14199 target hook definition.
14200 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14201 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14202 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14203 option for data text relative.
14205 2018-04-30 Richard Biener <rguenther@suse.de>
14207 * tree-chrec.h (evolution_function_is_constant_p): Remove
14209 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14211 2018-04-30 Richard Biener <rguenther@suse.de>
14214 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14216 2018-04-30 Richard Biener <rguenther@suse.de>
14218 PR tree-optimization/28364
14219 PR tree-optimization/85275
14220 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14221 copying first exit test.
14223 2018-04-28 Mark Wielaard <mark@klomp.org>
14225 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14226 dwarf_version >= 5.
14227 (dwarf_AT): Handle DW_AT_addr_base.
14228 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14230 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14233 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14234 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14235 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14236 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14238 2018-04-28 Richard Biener <rguenther@suse.de>
14240 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14241 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14242 to reflect use. Only add interesting stmts.
14244 2018-04-27 Martin Jambor <mjambor@suse.cz>
14247 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14248 the jump function allows for passing through aggregate values.
14250 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14252 * input.h (in_system_header_at): Convert from macro to inline
14254 (from_macro_expansion_at): Likewise.
14255 (from_macro_definition_at): Likewise.
14257 2018-04-27 Jeff Law <law@redhat.com>
14259 * config.gcc: Mark tile* targets as deprecated/obsolete.
14261 2018-04-27 Richard Biener <rguenther@suse.de>
14263 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14266 2018-04-27 Richard Biener <rguenther@suse.de>
14268 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14270 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14272 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14273 with Yd constraint. Set "preferred_for_speed" attribute from
14274 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14275 with Yd constraint.
14276 (*movdi_internal): Ditto.
14277 (movti_interunit splitters): Remove
14278 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14279 (movdi_interunit splitters): Ditto.
14280 * config/i386/constraints.md (Ye): Remove.
14281 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14283 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14286 * config/aarch64/constraints.md (Usg): Limit to 31.
14287 (Usj): Limit to 63.
14289 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14291 PR tree-optimization/85529
14292 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14293 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14294 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14295 zero extension or masking of the MSB bit.
14296 (optimize_range_tests): Add FIRST_BB argument, pass it through
14297 to optimize_range_tests_var_bound.
14298 (maybe_optimize_range_tests, reassociate_bb): Adjust
14299 optimize_range_tests callers.
14301 2018-04-26 Richard Biener <rguenther@suse.de>
14302 Jakub Jelinek <jakub@redhat.com>
14304 * cgraph.h (symbol_table): Just declare debug method here.
14305 * symtab.c (symbol_table::debug): Define.
14307 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14309 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14311 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14313 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14314 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14315 (*movdi_internal): Substitute Yi and Yj constraint with x
14316 and Ym and Yn constraint with y constraint. Update "isa"
14317 attribute and set "preferred_for_speed" attribute from
14318 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14319 (*movsi_internal): Ditto.
14320 (*movdf_internal): Ditto.
14321 (*movsf_internal): Ditto.
14322 (*zero_extendsidi2): Ditto.
14323 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14324 (sse2_loadld): Ditto.
14325 (*vec_extract<ssevecmodelower>_0): Ditto.
14326 (*vec_extractv4si_0_zext_sse4): Ditto.
14327 (vec_concatv2di): Ditto.
14328 (*vec_dup<mode>): Ditto.
14329 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14330 * config/i386/constraints.md (Yi): Remove.
14335 2018-04-26 Nathan Sidwell <nathan@acm.org>
14337 * dumpfile.c (dump_open): New.
14338 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14339 (dump_finish): Detect stdio/stderr by value not name.
14341 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14343 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14345 2018-04-26 Tom de Vries <tom@codesourcery.com>
14348 * config/nvptx/nvptx.c (verify_neutering_jumps)
14349 (verify_neutering_labels): New function
14350 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14352 2018-04-26 Tom de Vries <tom@codesourcery.com>
14355 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14356 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14359 2018-04-26 Richard Biener <rguenther@suse.de>
14360 Tom de Vries <tom@codesourcery.com>
14363 * lto-streamer-out.c (output_function): Fixup loops if required to match
14364 discovery done in the reader.
14366 2018-04-26 Richard Biener <rguenther@suse.de>
14368 PR tree-optimization/85116
14369 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14370 have a loop exit from the single latch predecessor. Remove
14371 case of header with just condition.
14372 (ch_base::copy_headers): Exclude infinite loops from any
14374 (pass_ch::execute): Record exits.
14376 2018-04-26 Richard Biener <rguenther@suse.de>
14378 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14379 prologue cost vector and pass it to vect_get_load_cost.
14380 (vect_get_peeling_costs_all_drs): Likewise.
14381 (vect_peeling_hash_get_lowest_cost): Likewise.
14382 (vect_enhance_data_refs_alignment): Likewise.
14384 2018-04-26 Richard Biener <rguenther@suse.de>
14386 PR middle-end/85450
14387 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14388 checking of integer<->pointer conversions.
14389 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14390 sign-/zero-extending pointer types.
14391 (expand_omp_for_static_chunk): Likewise.
14393 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14394 Jean Lee <xiaoyur347@gmail.com>
14396 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14397 (TARGET_ASAN_SHADOW_OFFSET): Define.
14398 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14399 true for -fsanitize=address.
14401 2018-04-25 Mark Wielaard <mark@klomp.org>
14403 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14406 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14408 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14409 than "alu", remove explicit "memory" and "imm_disp" attributes.
14410 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14412 PR middle-end/85414
14413 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14414 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14415 gen_lowpart_no_emit.
14417 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14420 * config/i386/i386.c (ix86_expand_builtin): Change memory
14421 operand to XI, extend p0 to Pmode.
14422 * config/i386/i386.md: Change unspec volatile and operand
14423 1 mode to XI, change operand 0 mode to P.
14425 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14427 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14428 GET_MODE_MASK before any checking.
14429 (nds32_can_use_bset_p): Likewise.
14430 (nds32_can_use_btgl_p): Likewise.
14432 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14434 * config/nds32/nds32-doubleword.md: New define_split pattern for
14435 illegal register number.
14437 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14439 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14441 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14443 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14445 2018-04-25 Richard Biener <rguenther@suse.de>
14447 * lto-streamer.h (LTO_major_version): Bump to 8.
14449 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14451 * BASE-VER: Set to 9.0.0.
14453 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14455 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14456 in __abskf2 and __powikf2.
14458 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14461 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14462 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14463 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14464 Use the above on operand 2. Reindent.
14465 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14467 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14470 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14472 * config/i386/i386.opt (mcet): Removed.
14473 * doc/install.texi: Remove -mcet documentation.
14474 * doc/invoke.texi: Likewise.
14476 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14479 * doc/install.texi: Remove -mcet from bootstrap-cet.
14481 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14484 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14485 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14489 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14490 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14491 containing a CONST_VECTOR.
14493 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14495 * doc/install.texi: Update newlib dependency for nvptx.
14497 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14500 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14501 instead of INTVAL when shifting x left.
14503 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14505 PR tree-optimization/85478
14506 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14507 vect_grouped_store_supported for single element vectors.
14509 2018-04-24 Richard Biener <rguenther@suse.de>
14512 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14513 load cost increase to the case of non-constant step.
14515 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14518 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14519 destination if any_malformed_asm.
14521 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14523 PR middle-end/85496
14524 * expr.c (store_field): In the bitfield case, if the value comes from
14525 a function call and is returned in registers by means of a PARALLEL,
14526 do not change the mode of the temporary unless BLKmode and VOIDmode.
14528 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14530 PR rtl-optimization/85423
14531 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14532 dependencies to debug insns when the previous insn is non-debug.
14534 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14536 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14537 enums into a single definition.
14538 (fls): Fix predicates and printing.
14541 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14543 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14544 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14545 and short u6 immediate.
14546 (check_if_valid_sleep_operand): Remove.
14547 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14549 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14551 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14552 flag_always_save_lp condition.
14553 * config/nds32/nds32.opt (malways-save-lp): New option.
14555 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14557 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14558 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14559 * config/nds32/nds32.h
14560 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14561 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14563 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14565 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14566 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14568 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14569 Chung-Ju Wu <jasonwucj@gmail.com>
14571 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14573 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14574 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14576 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14578 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14580 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14582 * config/nds32/nds32-protos.h (nds32_data_alignment,
14583 nds32_local_alignment): Declare.
14584 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14585 nds32_local_alignment): New functions.
14586 (TARGET_CONSTANT_ALIGNMENT): Define.
14587 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14589 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14591 * config/nds32/nds32.c
14592 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14593 (TARGET_MODES_TIEABLE_P): Likewise.
14595 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14597 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14598 level Ofast and Og.
14600 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14601 Chung-Ju Wu <jasonwucj@gmail.com>
14603 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14604 for unaligned access.
14605 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14607 * config/nds32/nds32-intrinsic.md: Likewise.
14608 * config/nds32/nds32_intrinsic.h: Likewise.
14609 * config/nds32/nds32.h (nds32_builtins): Likewise.
14610 * config/nds32/nds32.opt (munaligned-access): New option.
14611 * config/nds32/nds32.c (nds32_asm_file_start): Display
14612 flag_unaligned_access status.
14614 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14616 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14617 -mno-relax is present.
14618 * config/riscv/linux.h (LINK_SPEC): Ditto.
14620 2018-04-20 Martin Sebor <msebor@redhat.com>
14623 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14625 (gimple_fold_builtin_stxcpy_chk): Same.
14626 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14628 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14631 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14632 __powikf2 when long double is IEEE 128-bit.
14634 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14636 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14637 step to make sure stack always aligned.
14639 2018-04-20 Carl Love <cel@us.ibm.com>
14642 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14643 size check for arg0.
14645 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14646 Tom de Vries <tom@codesourcery.com>
14649 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14650 Emit insns for calls too.
14651 (nvptx_find_par): Always look for worker-level predecessor insn.
14652 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14654 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14655 (nvptx_process_pars): Propagate frames for calls.
14657 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14660 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14662 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14663 (ix86_handle_option): Don't handle OPT_mibt.
14664 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14666 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14668 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14669 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14670 (ix86_target_macros): Define __CET__ with flag_cf_protection
14671 for -fcf-protection.
14672 * config/i386/i386.c (isa2_opts): Remove -mibt.
14673 * config/i386/i386.h (TARGET_IBT): Removed.
14674 (TARGET_IBT_P): Likewise.
14675 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14676 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14677 * config/i386/i386.opt (mcet): Update help message.
14678 (mshstk): Likewise.
14680 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14681 -mcet as an alias for -mshstk.
14683 2018-04-20 Richard Biener <rguenther@suse.de>
14685 PR middle-end/85475
14686 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14687 complexity by forcing a single use of the multiply operand.
14689 2018-04-20 Martin Jambor <mjambor@suse.cz>
14692 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14693 recursion dependency to only apply to non-clones.
14695 2018-04-20 Martin Jambor <mjambor@suse.cz>
14698 * ipa-cp.c (create_specialized_node): Check that clones of
14699 self-recursive edges exist during IPA-CP.
14701 2018-04-19 Toon Moene <toon@moene.org>
14703 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14706 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14708 PR tree-optimization/85467
14709 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14710 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14711 VECTOR_CST element to type.
14713 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14716 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14717 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14718 (builtin_longjmp): Likewise.
14719 (save_stack_nonlocal): New pattern.
14720 (restore_stack_nonlocal): Likewise.
14722 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14725 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14726 Replace ASM_OUTPUT_LABEL with fprintf.
14728 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14731 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14732 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14733 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14734 define __IBT__ and __SHSTK__ for -fcf-protection.
14735 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14737 (ix86_trampoline_init): Likewise.
14738 (x86_output_mi_thunk): Likewise.
14739 (ix86_notrack_prefixed_insn_p): Likewise.
14740 (ix86_option_override_internal): Don't disallow -fcf-protection.
14741 * config/i386/i386.md (rdssp<mode>): Also enable for
14743 (incssp<mode>): Likewise.
14744 (nop_endbr): Likewise.
14745 * config/i386/i386.opt (mcet): Change help message to built-in
14748 (mshstk): Likewise.
14749 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14750 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14751 enable CET built-in functions.
14753 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14755 * common/config/i386/i386-common.c
14756 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14757 OPTION_MASK_ISA_MOVDIRI_UNSET,
14758 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14759 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14760 * config.gcc (movdirintrin.h): New header.
14761 * config/i386/cpuid.h (bit_MOVDIRI,
14762 bit_MOVDIR64B): New bits.
14763 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14765 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14766 (VOID, PVOID, PCVOID)): New function types.
14767 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14768 __builtin_ia32_directstoreu_u64,
14769 __builtin_ia32_movdir64b): New builtins.
14770 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14771 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14773 (ix86_valid_target_attribute_inner_p): Ditto.
14774 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14775 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14776 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14777 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14778 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14779 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14780 (movdiri<mode>, movdir64b_<mode>): New.
14781 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14782 * config/i386/immintrin.h: Include movdirintrin.h.
14783 * config/i386/movdirintrin.h: New file.
14784 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14786 2018-04-19 Richard Biener <rguenther@suse.de>
14788 PR middle-end/85455
14789 * cfg.c (clear_bb_flags): When loop state says we have
14790 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14792 2018-04-19 Richard Biener <rguenther@suse.de>
14794 PR tree-optimization/84737
14795 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14796 copying restrict info.
14797 (vect_setup_realignment): Use it.
14798 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14799 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14800 the first DR to all generated stores.
14801 (vectorizable_load): Likewise for loads.
14803 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14805 PR tree-optimization/85446
14806 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14807 the integral and pointer types to have the same precision.
14809 * doc/install.texi: Document --disable-cet being the default and
14812 2018-04-18 Martin Liska <mliska@suse.cz>
14814 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14817 2018-04-18 Martin Liska <mliska@suse.cz>
14820 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14823 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14824 arguments if they are comparable.
14826 2018-04-18 Martin Liska <mliska@suse.cz>
14829 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14832 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14835 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14838 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14839 ENDBR after calling __morestack.
14841 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14844 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14845 by using gcc_base_ver to generate a gcc_driver_version, and use
14846 it when generating GCC_DRIVER_NAME.
14847 * configure: Regenerate.
14849 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14852 * config.gcc: Obsolete powerpc*-*-*spe*.
14854 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14857 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14858 (stabstr_D): Change type of unum from unsigned int to
14859 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14862 2018-04-17 Jim Wilson <jimw@sifive.com>
14865 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14866 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14867 Set arg_pointer_offset after using pretend_args_size.
14869 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14871 PR rtl-optimization/85431
14872 * dse.c (record_store): Ignore zero width stores.
14875 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14876 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14877 __builtin_stack_restore rather than after it.
14878 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14879 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14880 argument instead of virtual_dynamic_stack_rtx.
14882 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14884 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14886 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14887 Add note to error message to explain internal mapping of overloaded
14888 built-in function name to non-overloaded built-in function name.
14889 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14892 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14895 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14896 where the inputs overlap with the output.
14898 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14900 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14901 (=v, v) alternative and explicit "memory" attribute.
14902 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14903 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14905 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14906 "sselog1" type instead of "sselog".
14907 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14908 "sselog". Remove explicit "memory" attribute.
14909 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14910 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14912 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14913 "sselog1" type instead of "sselog". Remove explicit "memory"
14915 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14916 use "sselog1" type instead of "sselog". Remove explicit "memory"
14918 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14919 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14921 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14922 "sselog1" type instead of "sselog". Remove explicit "memory"
14924 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14925 use "sselog1" type instead of "sselog". Remove explicit "memory"
14929 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14931 PR middle-end/85414
14932 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14935 2018-04-17 Martin Jambor <mjambor@suse.cz>
14938 * ipa-cp.c (create_specialized_node): Call
14939 expand_all_artificial_thunks if necessary.
14941 2018-04-17 Martin Liska <mliska@suse.cz>
14944 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14945 in message, remote space in between '_G' and '('.
14947 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14950 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14951 avx512f_vmcmp<mode>3<round_saeonly_name>,
14952 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14953 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14954 avx512f_rndscale<mode><round_saeonly_name>,
14955 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14956 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14957 Use %<iptr>2 instead of %2 for -masm=intel.
14958 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14959 avx512f_vcvttss2usi<round_saeonly_name>,
14960 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14962 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14963 avx512f_vcvttsd2usi<round_saeonly_name>,
14964 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14965 Use %q1 instead of %1 for -masm=intel.
14966 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14967 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14968 of %3 for -masm=intel.
14969 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14971 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14973 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14975 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14976 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14978 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14980 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14981 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14982 %g1 and one with %0 and %1.
14983 (avx512er_vmrcp28<mode><round_saeonly_name>,
14984 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14985 %1 for -masm=intel.
14986 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14987 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14988 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14989 of %0 and %{%4%} for -masm=intel.
14990 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14991 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14992 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14993 order of %0 and %{%5%}%{z%} for -masm=intel.
14995 2018-04-17 Jan Hubicka <jh@suse.cz>
14998 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15000 2018-04-17 Martin Liska <mliska@suse.cz>
15003 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15004 for target_clone error message. Make default implementation
15005 clone to be a local declaration.
15006 (separate_attrs): Add new argument and check for an empty
15008 (expand_target_clones): Handle it.
15009 (ipa_target_clone): Make redirection just for target_clones
15012 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15013 Tom de Vries <tom@codesourcery.com>
15015 PR middle-end/84955
15016 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15017 tiled basic blocks without omp continue statements.
15019 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15022 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15023 vec_extract expression as having side effects to make sure it gets
15026 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15029 * config/i386/i386.c (get_builtin_code_for_version): Check
15032 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15035 * config.gcc: Support "skylake".
15036 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15038 * config/i386/i386.c (m_SKYLAKE): Define.
15039 (processor_target_table): Add "skylake".
15040 (ix86_option_override_internal): Add "skylake".
15041 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15042 PROCESSOR_CANNONLAKE.
15043 (get_builtin_code_for_version): Fix priority for
15044 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15045 PROCESSOR_SKYLAKE-AVX512.
15046 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15047 (processor_type): Add PROCESSOR_SKYLAKE.
15049 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15050 Jason Merrill <jason@redhat.com>
15053 * convert.c (convert_to_integer_1): Use direct recursion for
15054 enumeral types and types with a precision less than the number
15055 of bits in their mode.
15057 2018-04-16 Julia Koval <julia.koval@intel.com>
15060 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15061 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15063 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15066 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15067 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15068 and -mno-direct-move.
15070 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15073 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15074 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15075 Ensure negative shifts result in {0}.
15077 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15079 PR rtl-optimization/79916
15080 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15081 regs (if any) to define how to gnerate SD moves when LRA is in
15084 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15086 PR rtl-optimization/85393
15087 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15088 * except.c (expand_dw2_landing_pad_for_region): Make static.
15089 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15090 a label and unconditional jump to old_bb, rather than
15091 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15094 PR rtl-optimization/85376
15095 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15096 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15097 instead of a specific value.
15099 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15100 Bin Cheng <bin.cheng@arm.com>
15102 PR tree-optimization/82965
15103 PR tree-optimization/83991
15104 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15105 by_profile_only parameter.
15106 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15107 information if the loop was predicted to iterate too many times.
15108 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15110 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15113 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15116 2018-04-13 Martin Liska <mliska@suse.cz>
15117 Jakub Jelinek <jakub@redhat.com>
15119 PR middle-end/81657
15120 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15121 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15122 * builtins.c (expand_builtin_memory_copy_args): Use
15123 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15124 handle dest_addr == pc_rtx.
15126 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15129 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15130 asked to not generate direct moves.
15131 (fix_trunc<mode>si2_stfiwx): Similar.
15132 (fix_trunc<mode>si2_internal): Similar.
15134 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15137 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15138 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15139 lookup if dest in some wider mode is known to be const0_rtx and
15140 if so, record permanent equivalence for it to be ZERO_EXTEND of
15141 the narrower mode destination.
15143 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15145 * lto-streamer-out.c (output_function): Revert 259346.
15146 * omp-expand.c (expand_oacc_for): Likewise.
15148 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15150 PR rtl-optimization/85354
15151 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15152 * sel-sched.c (sel_global_init): ... here.
15154 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15157 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15158 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15159 mode for PE-COFF targets.
15160 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15161 (i386_pe_asm_lto_end): Likewise.
15162 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15163 (TARGET_ASM_LTO_END): Likewise.
15164 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15165 (i386_pe_asm_lto_start): New function.
15166 (i386_pe_asm_lto_end): Likewise.
15168 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15169 Richard Biener <rguenther@suse.de>
15171 PR middle-end/84955
15172 * lto-streamer-out.c (output_function): Fix CFG loop state before
15174 * omp-expand.c (expand_oacc_for): Handle calls to internal
15175 functions like regular functions.
15177 2018-04-12 Richard Biener <rguenther@suse.de>
15180 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15181 for the early LTO debug to properly generate references to it
15182 during DIE emission. Do not re-use that for the skeleton for
15184 (dwarf2out_early_finish): Likewise.
15186 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15189 * config/i386/sse.md
15190 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15191 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15192 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15193 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15194 and output is a reg, avoid creating invalid lowpart subreg, but
15195 instead split into a 512-bit move. Don't split if not AVX512VL,
15196 input is xmm16+ reg and output is a mem.
15197 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15198 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15199 xmm16+ reg and output is a mem.
15201 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15203 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15204 also for flag_dwarf2_cfi_asm.
15206 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15208 PR rtl-optimization/85342
15209 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15210 a bool scalar var inside of the loop instead. Don't try to update
15211 recog_data.operand after failed apply_change_group.
15213 2018-04-12 Tom de Vries <tom@codesourcery.com>
15216 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15217 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15218 array with flexible array member as array without given dimension.
15219 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15220 argument for undefined param to true.
15222 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15225 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15226 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15227 from PowerPC section.
15228 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15229 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15230 help text that is too long.
15231 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15232 help text that is too long.
15233 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15234 help text that is too long.
15236 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15238 * config/alpha/alpha.md (stack_probe_internal): Rename
15239 from "probe_stack". Update all callers.
15241 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15243 PR rtl-optimization/84566
15244 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15245 sched_macro_fuse_insns.
15247 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15250 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15251 (compute_block_dependences): ... from here.
15253 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15255 PR tree-optimization/85331
15256 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15257 from int to HOST_WIDE_INT.
15259 2018-04-11 Martin Jambor <mjambor@suse.cz>
15262 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15263 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15264 not the same as the source val.
15265 (cgraph_edge_brings_value_p): New parameter.
15266 (gather_edges_for_value): Pass destination value to
15267 cgraph_edge_brings_value_p.
15268 (perhaps_add_new_callers): Likewise.
15269 (get_info_about_necessary_edges): Likewise and exclude values brought
15270 only by self-recursive edges.
15271 (create_specialized_node): Redirect only clones of self-calling edges.
15272 (+self_recursive_pass_through_p): New function.
15273 (find_more_scalar_values_for_callers_subset): Use it.
15274 (find_aggregate_values_for_callers_subset): Likewise.
15275 (known_aggs_to_agg_replacement_list): Removed.
15276 (decide_whether_version_node): Re-calculate known constants for all
15277 remaining context clones.
15279 2018-04-11 Richard Biener <rguenther@suse.de>
15282 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15283 from early DWARF output.
15284 (dwarf2out_early_finish): Output line info unconditionally into
15285 early DWARF and add reference to it.
15287 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15290 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15291 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15292 other than V2DFmode using iptr mode attribute.
15293 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15295 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15297 PR rtl-optimization/84659
15298 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15300 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15303 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15305 (output_loc_list): Pass address of a dummy size variable even in the
15306 locview handling loop.
15307 (index_location_lists): Add comment on why skip_loc_list_entry can't
15310 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15313 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15316 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15319 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15320 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15321 and -mstring-compare-inline-limit.
15323 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15326 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15327 for stack clash protection in a register whenever we need it to be in
15330 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15332 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15333 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15335 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15338 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15340 (mlong-double-): Ditto.
15341 * config/rs6000/sysv4.opt (msdata=): Ditto.
15342 (mtls-size=): Ditto.
15344 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15346 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15347 erroneous entries for
15348 "vector int vec_ldl (int, long int *)", and
15349 "vector unsigned int vec_ldl (int, unsigned long int *)".
15350 Add comments and entries for
15351 "vector bool char vec_ldl (int, bool char *)",
15352 "vector bool short vec_ldl (int, bool short *)",
15353 "vector bool int vec_ldl (int, bool int *)",
15354 "vector bool long long vec_ldl (int, bool long long *)",
15355 "vector pixel vec_ldl (int, pixel *)",
15356 "vector long long vec_ldl (int, long long *)",
15357 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15358 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15359 type tree bool_long_long_type_node and correct definition of
15360 bool_V2DI_type_node to make reference to this new type tree.
15361 (rs6000_mangle_type): Replace erroneous reference to
15362 bool_long_type_node with bool_long_long_type_node.
15363 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15364 comments to emphasize sign distinctions for char and int types and
15365 replace RS6000_BTI_bool_long constant with
15366 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15367 use of RS6000_BTI_pixel.
15368 (bool_long_type_node): Remove this macro definition.
15369 (bool_long_long_type_node): New macro definition
15371 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15373 PR rtl-optimization/85300
15374 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15375 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15376 simplify_unary_operation fails.
15378 2018-04-10 Martin Liska <mliska@suse.cz>
15380 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15381 cgraph_edge and ipa_ref.
15383 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15387 * config/i386/sse.md
15388 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15389 computation of the VEC_MERGE selector from mask.
15390 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15391 Fix decoding of the VEC_MERGE selector into mask.
15393 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15395 PR tree-optimization/85286
15396 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15398 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15400 * final.c (final_1): Set insn_last_address as well as
15401 insn_current_address.
15403 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15406 * explow.c (emit_stack_probe): Call validize_mem on memory location
15407 before passing it to gen_probe_stack. Create address operand and
15408 legitimize it for the probe_stack_address case.
15410 2018-04-09 Jan Hubicka <jh@suse.cz>
15413 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15414 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15415 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15417 (free_lang_data): Rebuild type inheritance graph.
15419 2018-04-09 Martin Sebor <msebor@redhat.com>
15421 * invoke.texi (-finline-small-functions): Mention other optimization
15423 (-findirect-inlining, -fpartial-inlining): Same.
15424 (-finline-functions-called-once): Same.
15425 (-freorder-blocks-and-partition): Same.
15427 2018-04-09 Jan Hubicka <jh@suse.cz>
15430 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15431 jumps; choose last target that matches the criteria (i.e.
15432 no partition changes for non-crossing jumps).
15433 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15434 support for redirecting crossing jumps to non-crossing.
15436 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15438 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15439 also for naked functions.
15441 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15443 * config/arc/arc.md (add_shift): New pattern.
15444 (add_shift2): Likewise.
15445 (sub_shift): Likewise.
15446 (sub_shift_cmp0_noout): Likewise.
15447 (compare_si_ashiftsi): Likewise.
15448 (xbfu_cmp0_noout): New combine pattern.
15449 (xbfu_cmp0"): Likewise.
15450 (movsi_set_cc_insn): Place the predicable variant first.
15451 (commutative_binary_cmp0_noout): Remove clobber.
15452 (commutative_binary_cmp0): New pattern.
15453 (noncommutative_binary_cmp0): Likewise.
15454 (noncommutative_binary_cmp0_noout): Likewise.
15455 (noncommutative_binary_comparison_result_used): Removed.
15456 (rsub_cmp0): New pattern.
15457 (rsub_cmp0_noout): Likewise.
15458 (extzvsi): Changed, keep only meaningful variants.
15459 (SQH, SEZ): New iterators.
15460 (SQH_postfix): New mode attribute.
15461 (SEZ_prefix): New code attribute.
15462 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15463 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15464 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15465 of numerical value.
15466 (noncommutative_operator): Check the availability of barrel
15469 2018-04-09 Richard Biener <rguenther@suse.de>
15471 PR tree-optimization/85284
15472 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15473 Only use the niter constraining form of simple_iv when the exit
15474 is always executed.
15476 2018-04-09 Tom de Vries <tom@codesourcery.com>
15479 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15480 (define_expand "*memory_barrier"): New define_expand.
15481 (define_insn "memory_barrier"): New insn.
15483 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15485 PR rtl-optimization/80463
15486 PR rtl-optimization/83972
15487 PR rtl-optimization/83480
15489 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15490 correct producer for the insn.
15491 (tidy_control_flow): Fixup seqnos in case of debug insns.
15493 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15495 PR rtl-optimization/83913
15497 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15498 different sched-times when merging exprs.
15500 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15502 PR rtl-optimization/83962
15504 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15505 tidy_fallthru_edge and tidy_control_flow.
15507 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15509 PR rtl-optimization/83530
15511 * sel-sched.c (force_next_insn): New global variable.
15512 (remove_insn_for_debug): When force_next_insn is true, also leave only
15513 next insn in the ready list.
15514 (sel_sched_region): When the region wasn't scheduled, make another pass
15515 over it with force_next_insn set to 1.
15517 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15519 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15521 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15522 for interrupt control.
15523 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15524 functions for interrupt control.
15525 * config/nds32/nds32-intrinsic.md: Likewise.
15526 * config/nds32/nds32_intrinsic.h: Likewise.
15527 * config/nds32/nds32.h (nds32_builtins): Likewise.
15529 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15531 * config/nds32/nds32.c (nds32_init_machine_status,
15532 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15533 strict_aligned_p field.
15534 (nds32_expand_to_rtl_hook): New function.
15535 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15536 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15538 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15539 Chung-Ju Wu <jasonwucj@gmail.com>
15541 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15542 * config/nds32/nds32-n7.md: New file.
15543 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15544 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15546 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15547 * config/nds32/nds32.md (pipeline_model): Add n7.
15548 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15549 * config/nds32/pipelines.md: Include n7 settings.
15551 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15552 Chung-Ju Wu <jasonwucj@gmail.com>
15554 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15555 * config/nds32/nds32-e8.md: New file.
15556 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15557 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15559 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15560 * config/nds32/nds32.md (pipeline_model): Add e8.
15561 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15562 * config/nds32/pipelines.md: Include e8 settings.
15564 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15565 Chung-Ju Wu <jasonwucj@gmail.com>
15567 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15568 * config/nds32/nds32-n8.md: New file.
15569 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15570 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15572 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15573 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15574 * config/nds32/nds32.md (pipeline_model): Add n8.
15575 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15576 * config/nds32/pipelines.md: Include n8 settings.
15578 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15579 Chung-Ju Wu <jasonwucj@gmail.com>
15581 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15582 * config/nds32/nds32-n9-2r1w.md: New file.
15583 * config/nds32/nds32-n9-3r2w.md: New file.
15584 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15585 nds32_register_ports): New or modify for cpu n9.
15586 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15588 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15589 * config/nds32/nds32-utils.c: New file.
15590 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15591 TARGET_MUL_SLOW): Define.
15592 * config/nds32/nds32.md (pipeline_model): New attribute.
15593 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15594 New options that support cpu n9.
15595 * config/nds32/pipelines.md: Include n9 settings.
15596 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15598 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15600 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15601 information if necessary.
15602 (output_cond_branch_compare_zero): Likewise.
15603 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15604 (nds32_target_alignment): Refine for alignment.
15605 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15606 (FUNCTION_BOUNDARY): Modify.
15607 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15609 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15611 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15613 * config/nds32/constants.md (unspec_volatile_element): Add values for
15614 TLB operation and data prefetch.
15615 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15616 functions for TLB operation and data prefetch.
15617 * config/nds32/nds32-intrinsic.md: Likewise.
15618 * config/nds32/nds32_intrinsic.h: Likewise.
15619 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15620 (nds32_print_operand): Likewise.
15621 * config/nds32/nds32.h (nds32_builtins): Likewise.
15623 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15624 Andrew Pinski <pinsika@gcc.gnu.org>
15626 PR middle-end/82976
15627 * match.pd: Use constant_boolean_node of correct type instead of
15628 boolean_true_node or boolean_false_node for simplifying
15629 pointer comparisons to zero.
15631 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15633 PR tree-optimization/80021
15634 * tree.c (verify_type_variant): Make error call in verify_variant_match
15635 translatable and remove final full stop.
15637 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15639 * config/nds32/constants.md (unspec_volatile_element): Add
15640 UNSPEC_VOLATILE_EH_RETURN.
15641 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15642 nds32_output_stack_pop): Support dwarf exception handling process.
15643 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15644 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15645 exception handling process.
15646 (nds32_compute_stack_frame): Likewise.
15647 (nds32_return_addr_rtx): Likewise.
15648 (nds32_initial_elimination_offset): Likewise.
15649 (nds32_expand_prologue): Likewise.
15650 (nds32_expand_epilogue): Likewise.
15651 (nds32_dynamic_chain_address): New function.
15652 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15653 exception handling.
15654 (DYNAMIC_CHAIN_ADDRESS): Define.
15655 (EH_RETURN_DATA_REGNO): Define.
15656 (EH_RETURN_STACKADJ_RTX): Define.
15657 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15658 patterns for dwarf exception handling.
15660 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15662 * config/nds32/nds32.h: Clean up obsolete macros.
15664 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15666 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15667 Add enum values for particular instructions.
15668 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15669 particular intrinsic functions.
15670 * config/nds32/nds32-intrinsic.md: Likewise.
15671 * config/nds32/nds32_intrinsic.h: Likewise.
15672 * config/nds32/nds32.h (nds32_builtins): Likewise.
15673 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15674 (btst, ave): New patterns for particular instructions.
15676 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15678 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15679 Add enum values for atomic load/store and memory sync.
15680 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15682 * config/nds32/nds32-intrinsic.md: Likewise.
15683 * config/nds32/nds32_intrinsic.h: Likewise.
15684 * config/nds32/nds32.h (nds32_builtins): Likewise.
15686 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15688 PR tree-optimization/85257
15689 * fold-const.c (native_encode_vector): If not all elts could fit
15690 and off is -1, return 0 rather than offset.
15691 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15692 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15693 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15694 adjust buffer in native_interpret_expr call.
15696 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15698 * config/nds32/constants.md (unspec_volatile_element): Add cache
15699 control enum values.
15700 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15701 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15702 * config/nds32/nds32.c (nds32_cctl_names): New.
15703 (nds32_print_operand): Handle cache control register names.
15704 * config/nds32/nds32.h (nds32_builtins): New enum values.
15705 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15707 * config/nds32/nds32.md (type): Add mmu.
15708 * config/nds32/pipelines.md (simple_insn): Add mmu.
15710 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15712 * config/nds32/nds32.md (type): Remove call.
15713 * config/nds32/pipelines.md (simple_insn): Likewise.
15715 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15717 * config/nds32/constants.md (unspec_volatile_element): Add
15718 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15719 UNSPEC_VOLATILE_FMFCFG.
15720 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15721 description for fmfcfg and fmfcsr.
15722 (bdesc_1arg): Add fmtcsr.
15723 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15724 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15725 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15726 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15727 unspec_fmfcfg): New patterns.
15728 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15729 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15730 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15731 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15732 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15733 __nds32__fmfcfg): Define.
15735 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15737 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15738 intrinsic register names.
15739 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15740 intrinsic register enum values and macros.
15742 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15744 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15745 for load/store addressing form.
15746 (nds32_print_operand_address): Likewise.
15748 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15751 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15752 based on LABEL_REF. Remove useless assertion.
15753 (pic_address_needs_scratch): Fix formatting.
15754 (sparc_legitimize_pic_address): Minor tweaks.
15755 (sparc_delegitimize_address): Adjust assertion accordingly.
15756 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15757 into symbolic_operand.
15758 (movsi_high_pic_label_ref): Likewise.
15759 (movsi_lo_sum_pic_label_ref): Likewise.
15760 (movdi_pic_label_ref): Likewise.
15761 (movdi_high_pic_label_ref): Likewise.
15762 (movdi_lo_sum_pic_label_ref): Likewise.
15764 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15766 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15767 custom LIB_SPEC setup.
15769 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15770 Kito Cheng <kito.cheng@gmail.com>
15772 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15773 * config/riscv/freebsd.h: New.
15775 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15777 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15778 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15781 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15782 Kito Cheng <kito.cheng@gmail.com>
15784 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15785 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15786 * config/nds32/nds32-protos.h (nds32_output_call,
15787 nds32_output_return): Declare.
15788 * config/nds32/nds32.md: Refine all the call and return patterns.
15790 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15793 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15794 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15796 PR rtl-optimization/84872
15797 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15798 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15799 EDGE_CROSSING edge.
15801 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15803 * expr.c (copy_blkmode_to_reg): Revert 254862.
15804 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15806 2018-04-06 Richard Biener <rguenther@suse.de>
15808 PR middle-end/85244
15809 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15810 after seeing a component reference with an adjacent field. Treat
15811 refs to arrays at struct end of external decls similar to
15812 refs to unconstrained commons.
15814 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15817 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15818 look through SAVE_EXPRs with non-side-effects argument. Adjust
15820 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15823 2018-04-06 Richard Biener <rguenther@suse.de>
15825 PR middle-end/85180
15826 * alias.c (find_base_term): New wrapper around find_base_term
15827 unwinding CSELIB_VAL_PTR changes.
15828 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15831 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15833 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15835 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15836 constant definitions.
15837 ("nop"): lr 0,0 -> nopr r0
15838 ("nop_lr0", "nop_lr1"): New insn definitions.
15840 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15842 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15843 NDS32_V3PUSH_AVAILABLE_P macro.
15845 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15846 Chung-Ju Wu <jasonwucj@gmail.com>
15848 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15849 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15850 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15851 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15852 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15853 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15854 * config/nds32/constraints.md: New constraints and checking for hard
15855 float configuration.
15856 * config/nds32/iterators.md: New mode iterator and attribute for hard
15857 float configuration.
15858 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15860 * config/nds32/nds32-fpu.md: New file.
15861 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15862 deal with hard float code generation.
15863 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15865 (abi_type, float_reg_number): New enum type.
15866 * config/nds32/nds32-predicates.c: New predicates for hard float.
15867 * config/nds32/nds32-protos.h: Declare functions for hard float.
15868 * config/nds32/nds32.c: Implementation for hard float configuration.
15869 * config/nds32/nds32.h: Definitions for hard float configuration.
15870 * config/nds32/nds32.md: Include hard float machine description and
15871 modify patterns for hard float configuration.
15872 * config/nds32/nds32.opt: New options for hard float configuration.
15873 * config/nds32/predicates.md: New predicates for hard float
15876 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15878 * common/config/nds32/nds32-common.c
15879 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15881 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15883 PR middle-end/85195
15884 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15885 CONSTRUCTOR_ELT (ctor, ...)->value.
15887 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15890 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15892 2018-04-05 Tom de Vries <tom@codesourcery.com>
15895 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15898 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15899 Kito Cheng <kito.cheng@gmail.com>
15901 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15902 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15903 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15904 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15906 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15907 Kito Cheng <kito.cheng@gmail.com>
15909 * config/nds32/constraints.md (Ufe): New memory constraint.
15910 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15911 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15912 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15914 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15915 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15917 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15919 * config/nds32/nds32.md: Use optimize_size in the condition for
15920 alu-shift instructions.
15922 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15924 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15926 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15928 * config/nds32/nds32.md (negsi2): Refine pattern.
15930 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15931 Chung-Ju Wu <jasonwucj@gmail.com>
15933 * config/nds32/iterators.md (shift_rotate): New code iterator.
15934 (shift): New code attribute.
15935 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15936 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15937 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15938 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15939 bit-wise operations.
15940 (andsi3, *andsi3): Ditto.
15941 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15942 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15943 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15944 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15945 nds32_ior_operand, nds32_xor_operand): New predicates.
15947 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15949 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15950 (addsi3, subsi3): ... this.
15952 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15954 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15956 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15958 * config/nds32/nds32.md: Adjust indention.
15960 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15962 * config/nds32/nds32.md (feature): New attribute.
15964 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15966 * config/nds32/nds32.md (subtype): New attribute.
15968 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15971 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15972 expansion to perform a bitwise AND of the argument followed by a
15973 boolean negation of the result.
15975 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15977 PR rtl-optimization/84878
15978 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15979 the basic block. Assert the use reference is not artificial and that
15980 it has an associated insn.
15982 2018-04-04 Michael Matz <matz@suse.de>
15984 * builtins.c (compute_objsize): Pass correct operand
15985 to array_at_struct_end_p.
15987 2018-04-04 Richard Biener <rguenther@suse.de>
15990 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15991 from contexts for DINFO_LEVEL_TERSE and below.
15993 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15995 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15996 resiter_operand condition.
15997 * config/nds32/nds32.md (*move<mode>): Ditto.
15999 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16000 Monk Chiang <sh.chiang04@gmail.com>
16002 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16004 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16006 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16008 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16009 Kito Cheng <kito.cheng@gmail.com>
16011 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16012 nds32_cond_code_str, output_cond_branch,
16013 output_cond_branch_compare_zero, nds32_expand_cbranch,
16014 nds32_expand_cstore, nds32_expand_movcc,
16015 nds32_output_cbranchsi4_equality_zero,
16016 nds32_output_cbranchsi4_equality_reg,
16017 nds32_output_cbranchsi4_equality_reg_or_const_int,
16018 nds32_output_cbranchsi4_greater_less_zero: New functions.
16019 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16020 nds32_expand_cstore, nds32_expand_movcc,
16021 nds32_output_cbranchsi4_equality_zero,
16022 nds32_output_cbranchsi4_equality_reg,
16023 nds32_output_cbranchsi4_equality_reg_or_const_int,
16024 nds32_output_cbranchsi4_greater_less_zero): Declare.
16025 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16026 nds32_rimm11s_operand): New predicates.
16027 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16028 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16031 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16033 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16034 * config/nds32/nds32.md: Ditto.
16035 * config/nds32/pipelines.md: Ditto.
16037 2018-04-04 Richard Biener <rguenther@suse.de>
16039 PR tree-optimization/85168
16040 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16041 propagating abnormals.
16043 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16045 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16047 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16048 Kito Cheng <kito.cheng@gmail.com>
16050 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16051 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16052 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16053 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16054 * config/nds32/nds32.md (sibcall_internal): New.
16055 (sibcall_register): Remove.
16056 (sibcall_immediate): Remove.
16057 (sibcall_value_internal): New.
16058 (sibcall_value_register): Remove.
16059 (sibcall_value_immediate): Remove.
16060 * config/nds32/predicates.md (nds32_general_register_operand): New.
16061 (nds32_call_address_operand): New.
16063 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16065 PR rtl-optimization/85167
16066 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16067 bb_defs if *split_p, instead preinitialize it to NULL.
16069 PR tree-optimization/85156
16070 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16071 evaluating the argument multiple times.
16073 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16075 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16077 (_mm_cvtpd_ps): Likewise.
16078 (_mm_cvttpd_epi32): Likewise.
16079 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16080 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16081 vector, pixel, and bool following altivec.h include.
16083 2018-04-03 Martin Sebor <msebor@redhat.com>
16085 * doc/extend.texi (Common Function Attributes): Clarify.
16086 (const attribute): Likewise.
16087 (pure attribute): Likewise.
16089 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16092 * config/i386/i386.c (ix86_expand_vector_set): Use
16093 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16095 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16097 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16098 instructions when changing rounding bits to preserve precision bits
16099 in the x87 control word.
16101 2018-04-03 Martin Liska <mliska@suse.cz>
16103 PR tree-optimization/82491
16104 * rtl.h (strip_offset_and_add): Replace += suboffset with
16105 poly_uint64 () + suboffset.
16107 2018-03-29 Martin Liska <mliska@suse.cz>
16108 Martin Jambor <mjambor@suse.cz>
16111 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16112 param_type is not an integral or pointer type.
16114 2018-04-03 Richard Biener <rguenther@suse.de>
16116 * sese.h (recompute_all_dominators): Remove.
16118 2018-04-02 Martin Sebor <msebor@redhat.com>
16120 * doc/invoke.texi (-Wrestrict): Fix typos.
16122 2018-04-02 Jim Wilson <jimw@sifive.com>
16124 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16125 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16126 (<optab>di3, <optab>si3_extend): Likewise.
16127 (<optab>si3_mask, <optab>si3_mask_1): New.
16128 (<optab>di3_mask, <optab>di3_mask_1): New.
16129 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16130 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16131 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16133 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16135 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16138 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16140 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16141 (nds32_canonicalize_comparison): New function.
16143 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16144 Kito Cheng <kito.cheng@gmail.com>
16145 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16147 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16148 * config/nds32/constants.md (unspec_volatile_element): Add
16149 UNSPEC_VOLATILE_RELAX_GROUP.
16150 * config/nds32/nds32-relax-opt.c: New file.
16151 * config/nds32/nds32-predicates.c
16152 (nds32_symbol_load_store_p): New function.
16153 * config/nds32/nds32-protos.h
16154 (nds32_symbol_load_store_p): Declare function.
16155 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16156 * config/nds32/nds32.c
16157 (nds32_register_pass): New function to register pass.
16158 (nds32_register_passes): New function to register passes.
16159 * config/nds32/nds32.md (relax_group): New pattern.
16160 * config/nds32/nds32.opt (mrelax-hint): New option.
16161 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16163 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16165 * config/nds32/t-nds32: Modify files dependency.
16167 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16169 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16170 (PROFILE_HOOK): Define its implementation.
16172 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16174 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16175 type and 32-bit size.
16177 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16179 PR middle-end/85090
16180 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16181 (V_128_256): New mode iterator.
16182 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16183 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16184 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16186 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16187 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16189 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16192 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16193 NaN inputs correctly.
16195 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16198 * config/rs6000/vsx.md (??r): New mode attribute.
16199 (*vsx_mov<mode>_64bit): Use it.
16200 (*vsx_mov<mode>_32bit): Likewise.
16202 2018-03-30 Martin Sebor <msebor@redhat.com>
16204 PR tree-optimization/84818
16205 * builtins.c (check_access): Use warning_n.
16207 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16210 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16212 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16215 2018-03-30 Julia Koval <julia.koval@intel.com>
16218 * x86-tune.def (movx, partial_reg_dependency): Enable for
16221 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16223 PR inline-asm/84985
16224 * lra-constraints.c (process_alt_operands): Move setting
16225 this_alternative_matches below.
16227 2018-03-29 Martin Liska <mliska@suse.cz>
16230 * doc/invoke.texi: Document how LTO works with debug info.
16231 Describe auto-load support of binutils. Mention 'x86-64'
16232 as valid option value of -march option.
16234 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16236 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16239 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16240 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16241 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16244 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16247 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16248 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16249 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16250 for RS6000_BTM_POWERPC64.
16251 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16252 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16253 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16256 (DIVDEU): Likewise.
16258 2018-03-28 Carl Love <cel@us.ibm.com>
16261 2017-09-27 Carl Love <cel@us.ibm.com>
16263 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16264 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16265 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16268 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16270 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16271 instead of __vector bool.
16272 (_mm_max_pu8): Likewise.
16273 (_mm_min_pi16): Likewise.
16275 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16278 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16279 (DIVWEUO): Likewise.
16280 (DIVDEO): Likewise.
16281 (DIVDEUO): Likewise.
16282 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16283 DIVWEUO and DIVDEUO.
16284 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16285 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16286 (div_extend): Likewise.
16287 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16289 (__builtin_divweuo): Likewise.
16290 (__builtin_divdeo): Likewise.
16291 (__builtin_divdeuo): Likewise.
16293 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16296 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16297 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16299 PR tree-optimization/82004
16300 * gimple-match-head.c (optimize_pow_to_exp): New function.
16301 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16302 Don't fold to exp if optimize_pow_to_exp is false.
16304 2018-03-28 Martin Liska <mliska@suse.cz>
16307 * calls.c (initialize_argument_information): Fix trailing space.
16308 * common.opt: Fix typo and provide better explanation for
16309 -fsanitize-coverage option.
16310 * config/i386/i386.opt: Fix typo.
16312 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16313 Martin Liska <mliska@suse.cz>
16316 * gimplify.c (asan_poison_variable): Don't do the check for
16317 gimplify_omp_ctxp here.
16318 (gimplify_decl_expr): Do it here.
16319 (gimplify_target_expr): Likewise.
16321 2018-03-28 Martin Liska <mliska@suse.cz>
16324 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16325 chkp_type_bounds_count if MPX is not enabled.
16327 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16329 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16331 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16334 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16335 function to create the function decl for complex long double
16336 multiply and divide for -mabi=ieeelongdouble.
16337 (init_float128_ieee): Call it.
16339 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16342 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16343 -fcf-protection=branch -mibt.
16344 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16346 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16349 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16350 arm_word_relocations.
16352 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16355 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16356 extern array declarations.
16358 2018-03-27 Richard Biener <rguenther@suse.de>
16360 PR middle-end/84067
16361 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16362 explicit single_use checks.
16364 2018-03-27 Richard Biener <rguenther@suse.de>
16366 PR tree-optimization/85082
16367 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16370 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16372 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16373 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16374 Turn on fasynchronous-unwind-tables and funwind-tables.
16376 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16379 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16380 (*bmi_blsr_<mode>_ccz): Ditto.
16382 2018-03-26 Tom de Vries <tom@codesourcery.com>
16384 PR tree-optimization/85063
16385 * omp-general.c (offloading_function_p): New function. Factor out
16387 * omp-offload.c (pass_omp_target_link::gate): ... here.
16388 * omp-general.h (offloading_function_p): Declare.
16389 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16390 with attribute omp declare target for offloading functions.
16392 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16394 PR tree-optimization/84005
16395 * tree-data-ref.h (get_base_for_alignment): Declare.
16396 * tree-data-ref.c (get_base_for_alignment_1): New function.
16397 (get_base_for_alignment): Likewise.
16398 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16399 get_base_for_alignment to find a suitable base object, instead
16400 of always using drb->base_address.
16402 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16404 PR inline-asm/85022
16405 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16406 known size by default.
16408 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16410 PR inline-asm/85030
16411 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16412 and non BLKmode operands.
16414 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16417 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16418 Clean up attributes.
16420 2018-03-23 Richard Biener <rguenther@suse.de>
16423 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16424 we are going to emit early debug for LTO.
16426 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16428 PR inline-asm/85034
16429 * function.c (match_asm_constraints_1): Don't optimize if input
16430 doesn't satisfy general_operand predicate for output's mode.
16432 PR inline-asm/85022
16433 * alias.c (write_dependence_p): Don't require for x_canonicalized
16434 non-VOIDmode if x has VOIDmode.
16437 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16438 just don't try to optimize it rather than assert it never happens.
16440 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16442 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16443 macro expansions for definition of ST_INTERNAL_<mode> and
16444 LD_INTERNAL_<mode> builtins.
16445 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16447 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16449 (altivec_expand_st_builtin): Likewise.
16450 (altivec_expand_builtin): Remove calls to deleted functions.
16451 (rs6000_address_for_altivec): Delete this function.
16452 * config/rs6000/vector.md: Remove expands for
16453 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16455 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16458 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16459 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16460 re-computing once computed.
16461 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16462 (arm_init_machine_status): Initialize
16463 machine->static_chain_stack_bytes.
16465 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16468 * doc/extend.texi: Add four new prototypes for vec_ld.
16469 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16470 definitions for more logical presentation.
16471 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16472 entries for V1TI variants of __builtin_altivec_ld builtin.
16473 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16474 handling of V1TI variant of LVX icode pattern.
16475 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16476 (rs6000_gimple_fold_builtin): Likewise.
16477 (altivec_init_builtins): Add code to define
16478 __builtin_altivec_lvx_v1ti function.
16480 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16482 PR inline-asm/84941
16483 * function.c (match_asm_constraints_1): Don't do the optimization
16484 if input isn't a REG, SUBREG, MEM or constant.
16486 2018-03-22 Tom de Vries <tom@codesourcery.com>
16488 PR tree-optimization/84956
16489 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16490 bb_has_abnormal_pred.
16492 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16495 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16496 DECL_INITIAL (decl) to decl at the end.
16497 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16498 adjust the comment.
16500 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16502 * doc/extend.texi (__builtin_tgmath): Document when complex
16503 integer types are treated as _Complex _Float64.
16505 2018-03-21 Tom de Vries <tom@codesourcery.com>
16507 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16509 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16511 PR tree-optimization/84960
16512 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16513 if it is ENTRY block, move them into single succ of ENTRY in that case.
16515 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16517 PR tree-optimization/84811
16518 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16519 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16520 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16521 (known_subrange_p): Update accordingly. Cast each value involved
16522 in the size comparison, rather than casting the result of the
16525 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16527 PR tree-optimization/84982
16528 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16529 by flipping the least significant bit rather than all bits from
16530 bitpos to bitpos + bitsize - 1.
16532 2018-03-21 Nathan Sidwell <nathan@acm.org>
16534 * doc/extend.texi (Deprecated Features): Remove mention of
16535 long-deleted deprecations.
16537 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16540 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16541 * configure: Regenerate.
16543 2018-03-21 Tom de Vries <tom@codesourcery.com>
16545 PR tree-optimization/83126
16546 * tree-parloops.c (num_phis): New function.
16547 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16549 2018-03-21 Nathan Sidwell <nathan@acm.org>
16551 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16552 mention anon-struct/union members and trailing attributes.
16554 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16556 PR tree-optimization/84969
16557 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16558 builtin memset partitions if they set different rhs values.
16560 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16562 PR rtl-optimization/84989
16563 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16564 VEC_DUPLICATE with scalar result mode.
16566 2018-03-21 Martin Liska <mliska@suse.cz>
16569 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16570 not intended return statement.
16572 2018-03-21 Martin Liska <mliska@suse.cz>
16575 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16576 (chkp_find_bound_slots_1): Limit number of iterations.
16578 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16581 * Minor grammar fixes for x86 options.
16583 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16586 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16587 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16589 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16592 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16593 (altivec_lvx_<mode>_1op): Likewise.
16594 (altivec_stvx_<mode>_2op): Likewise.
16595 (altivec_stvx_<mode>_1op): Likewise.
16596 (altivec_lvx_<VM2:mode>): New define_expand.
16597 (altivec_stvx_<VM2:mode>): Likewise.
16598 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16599 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16600 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16601 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16602 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16603 (rs6000_gen_lvx): Likewise.
16604 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16605 (altivec_expand_stv_builtin): Likewise.
16606 (altivec_expand_builtin): Likewise.
16607 * config/rs6000/vector.md: Likewise.
16609 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16612 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16615 2018-03-20 Richard Biener <rguenther@suse.de>
16618 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16619 sign-conversions as zero, fall back to standard scalar_stmt
16622 2018-03-20 Martin Liska <mliska@suse.cz>
16625 * predict.c (rebuild_frequencies): Handle case when we have
16626 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16628 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16631 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16632 flag_section_anchors.
16633 * varasm.c (use_blocks_for_decl_p): Remove hack for
16634 dw2_force_const_mem.
16637 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16639 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16640 be created, use lowpart_subreg of operands[0] rather than operands[0]
16642 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16643 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16644 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16645 and n constraint instead of aarch64_shift_imm_di and Usd.
16646 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16647 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16649 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16652 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16653 to favor GPR over NEON registers.
16654 (<shift>di3_neon): Likewise.
16656 2018-03-20 Tom de Vries <tom@codesourcery.com>
16659 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16660 (nvptx_process_pars): Emit bar.sync asap and alap.
16662 2018-03-20 Tom de Vries <tom@codesourcery.com>
16665 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16666 seen_label if seen_label is already set.
16668 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16671 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16672 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16673 Use 1U instead of 1. Formatting fixes.
16676 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16677 instead of TREE_TYPE (s1) for the return value.
16679 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16681 PR tree-optimization/84946
16682 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16683 bitsize + bitsize in poly_uint64 rather than poly_int64.
16686 * dwarf2asm.c: Include fold-const.c.
16687 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16688 of decl rather than decl itself.
16690 PR rtl-optimization/84643
16691 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16693 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16696 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16697 calling assemble_variable.
16699 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16702 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16703 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16705 2018-03-19 Jim Wilson <jimw@sifive.com>
16708 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16709 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16710 (riscv_first_stack_step): Likewise.
16711 (riscv_option_override): Use STACK_BOUNDARY instead of
16712 MIN_STACK_BOUNDARY.
16713 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16714 MIN_STACK_BOUNDARY.
16715 (BIGGEST_ALIGNMENT): Set to 128.
16716 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16717 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16720 2018-03-19 Richard Biener <rguenther@suse.de>
16722 PR tree-optimization/84933
16723 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16724 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16726 2018-03-19 Richard Biener <rguenther@suse.de>
16728 PR tree-optimization/84859
16729 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16730 (cond_if_else_store_replacement): Perform sinking operation on
16731 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16732 Generalize what a BB with a single eligible store is.
16734 2018-03-19 Richard Biener <rguenther@suse.de>
16736 PR tree-optimization/84929
16737 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16738 chrec_is_positive against non-chrec arg.
16740 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16743 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16745 2018-03-18 Martin Liska <mliska@suse.cz>
16747 PR rtl-optimization/84635
16748 * regrename.c (build_def_use): Use matches_mode only when
16751 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16753 PR tree-optimization/84913
16754 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16755 vectorize chains of COND_EXPRs.
16757 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16759 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16761 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16763 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16765 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16767 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16769 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16770 Kito Cheng <kito.cheng@gmail.com>
16772 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16773 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16774 (nds32_adjust_reg_alloc_order): New function.
16775 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16777 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16779 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16780 nds32_print_operand, nds32_print_operand_address): Use
16781 HOST_WIDE_INT_PRINT_DEC instead.
16783 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16785 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16787 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16790 * config/i386/i386.c (initial_ix86_tune_features,
16791 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16792 unsigned long long.
16793 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16794 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16795 rather than 1u << ix86_tune. Formatting fix.
16796 (ix86_option_override_internal): Change ix86_arch_mask from
16797 unsigned int to unsigned HOST_WIDE_INT, initialize to
16798 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16799 (ix86_function_specific_restore): Likewise.
16801 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16804 * postreload.c (reload_combine_recognize_pattern): Perform
16805 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16806 truncate_int_for_mode the result for the destination's mode.
16809 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16810 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16812 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16815 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16818 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16819 regno_allocno_class_array and sorted_pseudos.
16820 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16821 insns where regno is used.
16823 2018-03-16 Martin Liska <mliska@suse.cz>
16826 * multiple_target.c (create_dispatcher_calls): Redirect
16827 reference in the symbol table.
16829 2018-03-16 Martin Liska <mliska@suse.cz>
16832 * multiple_target.c (create_dispatcher_calls): Redirect also
16835 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16839 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16840 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16841 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16843 2018-03-16 Julia Koval <julia.koval@intel.com>
16845 * doc/invoke.texi (Skylake Server): Add CLWB.
16846 Cannonlake): Remove CLWB.
16848 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16850 PR tree-optimization/84841
16851 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16853 (FLOAT_ONE_CONST_TYPE): Define.
16854 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16855 (sort_by_operand_rank): Put entries with higher constant_type last
16856 rather than first to match comments.
16858 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16860 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16863 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16866 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16867 check and use address of target always.
16869 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16872 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16873 (indirect_thunk_bnd_needed): Likewise.
16874 (indirect_thunks_used): Likewise.
16875 (indirect_thunks_bnd_used): Likewise.
16876 (indirect_return_needed): New.
16877 (indirect_return_bnd_needed): Likewise.
16878 (output_indirect_thunk_function): Add a bool argument for
16880 (output_indirect_thunk_function): Don't generate alias for
16881 function return thunk.
16882 (ix86_code_end): Call output_indirect_thunk_function to generate
16883 function return thunks.
16884 (ix86_output_function_return): Set indirect_return_bnd_needed
16885 and indirect_return_needed instead of indirect_thunk_bnd_needed
16886 and indirect_thunk_needed.
16888 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16890 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16891 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16892 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16894 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16895 Paul Hua <paul.hua.gm@gmail.com>
16898 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16900 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16902 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16903 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16904 resp. SFmode cases.
16906 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16909 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16910 instead of GET_MODE_SIZE when comparing Units.
16912 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16915 * varasm.c (hash_section): Return an unchangeble hash value
16916 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16917 Return !aarch64_can_use_per_function_literal_pools_p ().
16919 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16922 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16923 rather than address of cmode as last argument to prepare_cmp_insn.
16925 2018-03-15 Julia Koval <julia.koval@intel.com>
16927 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16928 F_AVX512VNNI, F_AVX512BITALG): New.
16930 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16933 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16934 insn for floating-point loads and stores.
16936 2018-03-14 Carl Love <cel@us.ibm.com>
16938 * config/rs6000/rs6000-c.c: Add macro definitions for
16939 ALTIVEC_BUILTIN_VEC_PERMXOR.
16940 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16941 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16942 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16943 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16945 * config/doc/extend.texi: Add prototypes for vec_permxor.
16947 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16950 * diagnostic-show-locus.c (class layout_point): Convert m_line
16951 from int to linenum_type.
16952 (line_span::comparator): Use linenum "compare" function when
16953 comparing line numbers.
16954 (test_line_span): New function.
16955 (layout_range::contains_point): Convert param "row" from int to
16957 (layout_range::intersects_line_p): Likewise.
16958 (layout::will_show_line_p): Likewise.
16959 (layout::print_source_line): Likewise.
16960 (layout::should_print_annotation_line_p): Likewise.
16961 (layout::print_annotation_line): Likewise.
16962 (layout::print_leading_fixits): Likewise.
16963 (layout::annotation_line_showed_range_p): Likewise.
16964 (struct line_corrections): Likewise for field m_row.
16965 (line_corrections::line_corrections): Likewise for param "row".
16966 (layout::print_trailing_fixits): Likewise.
16967 (layout::get_state_at_point): Likewise.
16968 (layout::get_x_bound_for_row): Likewise.
16969 (layout::print_line): Likewise.
16970 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16971 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16972 * input.c (selftest::test_linenum_comparisons): New function.
16973 (selftest::input_c_tests): Call it.
16974 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16975 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16976 * selftest.h (ASSERT_GT): New macro.
16977 (ASSERT_GT_AT): New macro.
16978 (ASSERT_LT): New macro.
16979 (ASSERT_LT_AT): New macro.
16981 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16983 PR rtl-optimization/84780
16984 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16986 2018-03-14 Martin Liska <mliska@suse.cz>
16988 * tree.c (record_node_allocation_statistics): Use
16989 get_stats_node_kind.
16990 (get_stats_node_kind): New function extracted from
16991 record_node_allocation_statistics.
16992 (free_node): Use get_stats_node_kind.
16994 2018-03-14 Richard Biener <rguenther@suse.de>
16996 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16997 that the value-set of ANTIC_IN doesn't grow.
17000 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17002 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17003 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17005 2018-03-14 Julia Koval <julia.koval@intel.com>
17007 * config.gcc (icelake-client, icelake-server): New.
17009 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17010 (initial_ix86_arch_features): Ditto.
17011 (PTA_SKYLAKE): Add SGX.
17012 (PTA_ICELAKE): Remove.
17013 (PTA_ICELAKE_CLIENT): New.
17014 (PTA_ICELAKE_SERVER): New.
17015 (ix86_option_override_internal): Split up icelake on icelake client and
17017 (get_builtin_code_for_version): Ditto.
17018 (fold_builtin_cpu): Ditto.
17019 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17020 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17021 * config/i386/i386.h (processor_type): Ditto.
17022 * doc/invoke.texi: Ditto.
17024 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17027 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17028 INTEGER_CST offset, add it together with bitpos / 8 and
17029 sign extend based on POINTER_SIZE.
17033 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17036 * config/i386/constraints.md (Yc): New register constraint.
17037 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17038 Use Yc constraint for alternative 2 of operand 0. Remove
17039 preferred_for_speed attribute.
17041 2018-03-14 Richard Biener <rguenther@suse.de>
17043 PR tree-optimization/84830
17044 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17045 with the old one to avoid oscillations.
17047 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17050 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17052 (assign_by_spills): Return a flag of reload assignment failure.
17053 Do not process the reload assignment failures. Do not spill other
17054 reload pseudos if they has the same reg class. Update n if
17056 (lra_assign): Add a return arg. Set up from the result of
17057 assign_by_spills call.
17058 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17059 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17060 usage_insns if it is not NULL.
17061 (spill_hard_reg_in_range): New function.
17062 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17063 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17064 function prototypes.
17065 (lra_assign): Change prototype.
17066 * lra.c (lra): Add code to deal with fails by splitting hard reg
17069 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17071 * config/riscv/riscv.opt (mrelax): New option.
17072 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17073 "norelax" when riscv_mrelax is disabled.
17074 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17076 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17079 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17080 reassociation for int modes.
17082 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17084 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17085 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17087 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17088 * config/aarch64/aarch64-sve.md
17089 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17090 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17091 (*extend<mode><Vwide>2): Rename to...
17092 (aarch64_sve_extend<mode><Vwide>2): ...this.
17093 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17094 renaming the old pattern to...
17095 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17097 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17098 define_expand, renaming the old pattern to...
17099 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17100 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17101 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17102 account when deciding which SVE instruction the optab should use.
17103 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17105 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17107 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17108 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17109 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17110 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17111 (tlsdesc_small_<mode>): Turn a define_expand and use
17112 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17113 (tlsdesc_small_advsimd_<mode>): ...this.
17114 (tlsdesc_small_sve_<mode>): New pattern.
17116 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17118 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17119 (UNSPEC_UMUL_HIGHPART): New constants.
17120 (MUL_HIGHPART): New int iteraor.
17121 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17122 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17124 (*<su>mul<mode>3_highpart): New define_insn.
17126 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17129 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17132 2018-03-13 Martin Liska <mliska@suse.cz>
17135 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17137 (sem_item_optimizer::~sem_item_optimizer): Release it.
17138 (sem_item_optimizer::merge_classes): Register variable aliases.
17139 (sem_item_optimizer::fixup_pt_set): New function.
17140 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17141 * ipa-icf.h: Declare new variables and functions.
17143 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17145 PR middle-end/84834
17146 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17147 integer_pow2p@2 and test integer_pow2p in condition.
17148 (A < 0 ? C : 0): Similarly for @1.
17150 PR middle-end/84831
17151 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17152 characters starting at p contain '\0' character, don't look beyond
17156 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17157 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17160 * reg-stack.c (change_stack): Change update_end var from int to
17161 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17162 also call set_block_for_insn on the newly added insns and rescan.
17165 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17166 on the last operand.
17169 * tree.c (stabilize_reference_1): Return save_expr (e) for
17170 STATEMENT_LIST even if it doesn't have side-effects.
17172 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17174 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17176 2018-03-12 Renlin Li <renlin.li@arm.com>
17178 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17179 aarch64_output_scalar_simd_mov_immediate.
17181 2018-03-12 Martin Sebor <msebor@redhat.com>
17183 PR tree-optimization/83456
17184 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17185 for perfectly overlapping calls to memcpy.
17186 (gimple_fold_builtin_memory_chk): Same.
17187 (gimple_fold_builtin_strcpy): Handle no-warning.
17188 (gimple_fold_builtin_stxcpy_chk): Same.
17189 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17191 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17193 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17194 parameter. Use it for SFmode.
17195 (rs6000_function_arg_advance_1): Adjust.
17196 (rs6000_function_arg): Adjust.
17197 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17199 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17201 PR rtl-optimization/84169
17202 PR rtl-optimization/84780
17203 * combine.c (can_combine_p): Check for a 2-insn combination whether
17204 the destination register is used between the two insns, too.
17206 2018-03-12 Richard Biener <rguenther@suse.de>
17208 PR tree-optimization/84803
17209 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17210 for refs DR analysis didn't process.
17212 2018-03-12 Richard Biener <rguenther@suse.de>
17214 PR tree-optimization/84777
17215 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17216 force-vectorize loops ignore whether we are optimizing for size.
17218 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17220 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17221 (TARGET_MD_ASM_ADJUST): Define.
17223 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17224 Kito Cheng <kito.cheng@gmail.com>
17225 Chung-Ju Wu <jasonwucj@gmail.com>
17227 * config/nds32/nds32.c (nds32_compute_stack_frame,
17228 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17229 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17230 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17231 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17232 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17233 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17234 * config/nds32/nds32.md (prologue, epilogue): Use macro
17235 NDS32_V3PUSH_AVAILABLE_P to do checking.
17237 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17240 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17241 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17242 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17243 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17244 addition of most attributes on !orig_type_die or the attribute not
17245 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17247 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17248 Chung-Ju Wu <jasonwucj@gmail.com>
17250 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17251 __NDS32_VH__ macro.
17252 * config/nds32/nds32.opt (mvh): New option.
17254 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17255 Chung-Ju Wu <jasonwucj@gmail.com>
17257 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17259 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17260 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17263 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17264 Chung-Ju Wu <jasonwucj@gmail.com>
17266 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17268 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17269 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17271 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17272 Kito Cheng <kito.cheng@gmail.com>
17273 Chung-Ju Wu <jasonwucj@gmail.com>
17275 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17276 UNSPEC_FFMISM and UNSPEC_FLMISM.
17277 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17278 for ffb, ffmism and flmism.
17279 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17280 (unspec_ffmism): Ditto.
17281 (unspec_flmism): Ditto.
17282 (nds32_expand_builtin_impl): Check if string extension is available.
17283 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17284 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17286 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17289 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17292 * lra-assigns.c (assign_by_spills): Return a flag of reload
17293 assignment failure. Do not process the reload assignment
17294 failures. Do not spill other reload pseudos if they has the same
17296 (lra_assign): Add a return arg. Set up from the result of
17297 assign_by_spills call.
17298 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17299 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17300 usage_insns if it is not NULL.
17301 (spill_hard_reg_in_range): New function.
17302 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17303 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17304 function prototypes.
17305 (lra_assign): Change prototype.
17306 * lra.c (lra): Add code to deal with fails by splitting hard reg
17309 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17312 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17314 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17317 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17318 (dw_val_node): Add val_symbolic_view.
17319 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17320 (symview_upper_bound): New.
17321 (new_line_info_table): Initialize symviews_since_reset.
17322 (dwarf2out_source_line): Count symviews_since_reset and set
17323 symview_upper_bound.
17324 (dw_val_equal_p): Handle symview.
17325 (add_AT_symview): New.
17326 (print_dw_val): Handle symview.
17327 (attr_checksum, attr_checksum_ordered): Likewise.
17328 (same_dw_val_p, size_of_die): Likewise.
17329 (value_format, output_die): Likewise.
17330 (add_high_low_attributes): Use add_AT_symview for entry_view.
17331 (dwarf2out_finish): Reset symview_upper_bound, clear
17334 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17337 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17338 Add strict argument and use it.
17339 (rs6000_split_multireg_move): Update for new strict argument.
17340 (mem_operand_gpr): Disallow all non-offsettable addresses.
17341 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17343 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17346 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17347 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17348 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17351 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17352 decl, use remap_type if we want to use the type.
17354 2018-03-09 Martin Sebor <msebor@redhat.com>
17356 PR tree-optimization/84526
17357 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17359 (builtin_access::generic_overlap): Be prepared to handle non-array
17362 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17364 PR rtl-optimization/84682
17365 * lra-constraints.c (process_address_1): Check is_address flag
17366 for address constraints.
17367 (process_alt_operands): Likewise.
17368 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17369 preprocess_constraints.
17370 * recog.h (preprocess_constraints): Add oploc parameter.
17372 * recog.c (preprocess_constraints): Test address_operand for
17373 CT_ADDRESS constraints.
17375 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17378 * lra-assigns.c (assign_by_spills): Return a flag of reload
17379 assignment failure. Do not process the reload assignment
17380 failures. Do not spill other reload pseudos if they has the same
17382 (lra_assign): Add a return arg. Set up from the result of
17383 assign_by_spills call.
17384 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17385 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17386 usage_insns if it is not NULL.
17387 (spill_hard_reg_in_range): New function.
17388 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17389 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17390 function prototypes.
17391 (lra_assign): Change prototype.
17392 * lra.c (lra): Add code to deal with fails by splitting hard reg
17395 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17398 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17399 Accept complain bool parameter. Only emit errors if it is true.
17400 (arm_parse_cpu_option_name): Likewise.
17401 (arm_target_thumb_only): Adjust callers of the above.
17402 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17403 prototype to take a default true bool parameter.
17404 (arm_parse_arch_option_name): Likewise.
17406 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17407 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17411 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17412 * configure: Regenerate.
17413 * configure.ac ("linker --version-script option"): New.
17414 ("linker soname option"): New.
17416 2018-03-09 Richard Biener <rguenther@suse.de>
17418 PR tree-optimization/84775
17419 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17420 immediate uses of predicate stmts and mark them modified.
17423 PR tree-optimization/84178
17424 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17426 (version_loop_for_if_conversion): Delay update_ssa call.
17427 (tree_if_conversion): Delay update_ssa until after predicate
17430 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17433 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17434 when the function accesses prior frames.
17436 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17439 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17440 gen_llsym, otherwise call maybe_gen_llsym.
17442 PR inline-asm/84742
17443 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17444 has ',' character inside of it.
17446 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17449 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17450 as clobbering CC_REGNUM.
17452 2018-03-08 Richard Biener <rguenther@suse.de>
17454 PR middle-end/84552
17455 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17456 (follow_copies_to_constant): Do not follow SSA names registered
17459 2018-03-08 Richard Biener <rguenther@suse.de>
17461 PR tree-optimization/84178
17462 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17464 (version_loop_for_if_conversion): Delay update_ssa call.
17465 (tree_if_conversion): Delay update_ssa until after predicate
17468 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17470 PR tree-optimization/84178
17471 * tree-if-conv.c (release_bb_predicate): Remove the
17472 the assertion that the stmts have NULL use_ops.
17473 Discard the statements, asserting that they haven't
17474 yet been added to a BB.
17476 2018-03-08 Richard Biener <rguenther@suse.de>
17478 PR tree-optimization/84746
17479 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17480 (phi_translate): Pass in destination ANTIC_OUT set.
17481 (phi_translate_1): Likewise. For a simplified result lookup
17482 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17483 (phi_translate_set): Adjust.
17484 (do_pre_regular_insertion): Likewise.
17485 (do_pre_partial_partial_insertion): Likewise.
17487 2018-03-08 Martin Liska <mliska@suse.cz>
17489 PR gcov-profile/84735
17490 * doc/gcov.texi: Document usage of profile files.
17491 * gcov-io.h: Document changes in the format.
17493 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17497 * dwarf2out.c (struct dw_line_info_table): Update comments for
17499 (FORCE_RESET_NEXT_VIEW): New.
17500 (FORCE_RESETTING_VIEW_P): New.
17501 (RESETTING_VIEW_P): Check for -1 too.
17502 (ZERO_VIEW_P): Likewise.
17503 (new_line_info_table): Force-reset next view.
17504 (dwarf2out_begin_function): Likewise.
17505 (dwarf2out_source_line): Simplify zero_view_p initialization.
17506 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17507 view directly. Omit view when omitting .loc at line 0.
17509 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17511 PR tree-optimization/84740
17512 * tree-switch-conversion.c (process_switch): Call build_constructors
17513 only if info.phi_count is non-zero.
17515 PR tree-optimization/84739
17516 * tree-tailcall.c (find_tail_calls): Check call arguments against
17517 DECL_ARGUMENTS (current_function_decl) rather than
17518 DECL_ARGUMENTS (func) when checking for tail recursion.
17520 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17522 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17523 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17524 Volker Reichelt's entry and add entries for people that perform
17525 GCC fuzzy testing and report numerous bugs.
17527 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17530 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17531 readonly data in sdata, if that is disabled.
17532 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17533 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17534 -mreadonly-in-sdata option.
17536 2018-03-07 Martin Sebor <msebor@redhat.com>
17538 PR tree-optimization/84468
17539 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17540 basic block when looking for nul assignment.
17542 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17545 * except.h (output_function_exception_table): Adjust prototype.
17546 * except.c (output_function_exception_table): Remove FNNAME parameter
17547 and add SECTION parameter. Ouput one part of the table at a time.
17548 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17549 the first part of the exception table and emit unwind directives.
17550 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17551 (i386_pe_seh_cold_init): Likewise.
17552 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17553 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17554 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17555 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17556 * config/i386/winnt.c: Include except.h.
17557 (struct seh_frame_state): Add reg_offset, after_prologue and
17558 in_cold_section fields.
17559 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17560 (i386_pe_seh_cold_init): New function.
17561 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17562 to seh->in_cold_section.
17563 (seh_emit_push): Record the offset of the push.
17564 (seh_emit_save): Record the offet of the save.
17565 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17566 Test seh->after_prologue to disregard the epilogue.
17567 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17568 (i386_pe_end_cold_function): New function.
17570 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17573 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17574 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17577 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17579 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17580 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17582 PR middle-end/84723
17583 * multiple_target.c: Include tree-inline.h and intl.h.
17584 (expand_target_clones): Diagnose and fail if node->definition and
17585 !tree_versionable_function_p (node->decl).
17587 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17589 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17591 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17592 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17593 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17595 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17598 * combine.c (try_combine): Use reg_or_subregno instead of handling
17599 just paradoxical SUBREGs and REGs.
17601 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17603 * config/arc/arc.c (arc_finalize_pic): Remove function.
17604 (arc_must_save_register): We use single base PIC register, remove
17605 checks to save/restore the PIC register.
17606 (arc_expand_prologue): Likewise.
17607 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17609 (arc_verify_short): Likewise.
17610 (arc_attr_type): Likewise.
17611 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17612 (walk_stores): Likewise.
17613 (arc_address_cost): Make it static.
17614 (arc_verify_short): Likewise.
17615 (branch_dest): Likewise.
17616 (arc_attr_type): Likewise.
17617 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17618 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17619 (arc_final_prescan_insn): Remove inserting the nops due to
17620 hardware hazards. It is done in reorg step.
17621 (insn_length_variant_t): Remove.
17622 (insn_length_parameters_t): Likewise.
17623 (arc_insn_length_parameters): Likewise.
17624 (arc_get_insn_variants): Likewise.
17625 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17627 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17629 PR inline-asm/84683
17630 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17633 PR tree-optimization/84687
17634 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17636 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17638 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17640 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17641 Rename to ppc_speculation_barrier.
17642 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17643 __builtin_ppc_speculation_barrier.
17645 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17648 * combine.c (combine_simplify_rtx): Don't try to simplify if
17649 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17652 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17654 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17655 to 32 bytes when compiling for POWER9.
17657 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17660 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17661 regparm >= 3 with no arg reg available also for calls with
17662 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17665 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17667 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17669 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17672 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17674 2018-03-05 Richard Biener <rguenther@suse.de>
17676 PR tree-optimization/84486
17677 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17678 When inserting a __builtin_assume_aligned call set the LHS
17679 SSA name alignment info accordingly.
17681 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17683 PR tree-optimization/84114
17684 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17685 Avoid reassociation of FLOAT_MODE addition.
17687 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17689 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17690 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17691 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17692 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17693 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17694 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17695 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17697 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17698 __builtin_ia32_wbinvd): New builtins.
17699 (SPECIAL_ARGS2): New.
17700 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17701 (SPECIAL_ARGS2): New.
17702 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17703 (ix86_valid_target_attribute_inner_p): Ditto.
17704 (ix86_init_mmx_sse_builtins): Add special_args2.
17705 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17706 TARGET_WBNOINVD_P): New.
17707 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17708 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17709 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17710 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17711 * config/i386/pconfigintrin.h: New file.
17712 * config/i386/wbnoinvdintrin.h: Ditto.
17713 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17715 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17717 2018-03-05 Richard Biener <rguenther@suse.de>
17719 PR tree-optimization/84670
17720 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17722 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17723 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17724 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17725 doesn't grow if all successors (recursively) were visited at least
17728 2018-03-05 Richard Biener <rguenther@suse.de>
17730 PR tree-optimization/84650
17731 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17732 if executed in the loop pipeline.
17734 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17736 * doc/configfiles.texi (Configuration Files): Move info about
17737 conditionalizing $target-protos.h to...
17738 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17739 differs from $target-protos.h.
17741 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17742 Chung-Ju Wu <jasonwucj@gmail.com>
17744 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17745 * config/nds32/nds32-multiple.md (setmemsi): Define.
17746 * config/nds32/nds32-memory-manipulation.c
17747 (nds32_gen_dup_4_byte_to_word_value): New.
17748 (emit_setmem_word_loop): New.
17749 (emit_setmem_byte_loop): New.
17750 (nds32_expand_setmem_loop): New.
17751 (nds32_expand_setmem_loop_v3m): New.
17752 (nds32_expand_setmem_unroll): New.
17753 (nds32_expand_setmem): New.
17755 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17756 Chung-Ju Wu <jasonwucj@gmail.com>
17758 * config/nds32/nds32-memory-manipulation.c
17759 (nds32_emit_load_store): New.
17760 (nds32_emit_post_inc_load_store): New.
17761 (nds32_emit_mem_move): New.
17762 (nds32_emit_mem_move_block): New.
17763 (nds32_expand_movmemsi_loop_unknown_size): New.
17764 (nds32_expand_movmemsi_loop_known_size): New.
17765 (nds32_expand_movmemsi_loop): New.
17766 (nds32_expand_movmemsi_unroll): New.
17767 (nds32_expand_movmemqi): Rename ...
17768 (nds32_expand_movmemsi): ... to this.
17769 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17770 (movmemsi): ... to this.
17771 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17772 (nds32_expand_movmemsi): ... to this.
17774 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17775 Monk Chiang <sh.chiang04@gmail.com>
17776 Chung-Ju Wu <jasonwucj@gmail.com>
17778 * config/nds32/nds32-protos.h
17779 (nds32_expand_load_multiple): New arguments.
17780 (nds32_expand_store_multiple): Ditto.
17781 (nds32_valid_multiple_load_store): Rename ...
17782 (nds32_valid_multiple_load_store_p): ... to this.
17783 * config/nds32/nds32-memory-manipulation.c
17784 (nds32_expand_load_multiple): Refine implementation.
17785 (nds32_expand_store_multiple): Ditto.
17786 * config/nds32/nds32-multiple.md
17787 (load_multiple): Update nds32_expand_load_multiple interface.
17788 (store_multiple): Update nds32_expand_store_multiple interface.
17789 * config/nds32/nds32-predicates.c
17790 (nds32_valid_multiple_load_store): Rename ...
17791 (nds32_valid_multiple_load_store_p): ... to this and refine
17793 * config/nds32/predicates.md
17794 (nds32_load_multiple_and_update_address_operation): New predicate.
17795 (nds32_store_multiple_and_update_address_operation): New predicate.
17797 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17798 Chung-Ju Wu <jasonwucj@gmail.com>
17800 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17801 (combo): New attribute.
17802 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17804 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17806 * config/nds32/nds32.opt: Change -mcmodel= default value.
17808 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17809 Monk Chiang <sh.chiang04@gmail.com>
17810 Chung-Ju Wu <jasonwucj@gmail.com>
17812 * config/nds32/constants.md (unspec_element): New enum.
17813 * config/nds32/constraints.md (Umw): New constraint.
17814 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17815 * config/nds32/nds32-intrinsic.md: Likewise.
17816 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17817 (nds32_valid_smw_lwm_base_p): New.
17818 (nds32_output_smw_single_word): New.
17819 (nds32_output_lmw_single_word): New.
17820 (nds32_expand_unaligned_load): New.
17821 (nds32_expand_unaligned_store): New.
17822 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17823 (nds32_output_smw_single_word): Declare.
17824 (nds32_output_lmw_single_word): Declare.
17825 (nds32_expand_unaligned_load): Declare.
17826 (nds32_expand_unaligned_store): Declare.
17827 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17828 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17829 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17830 NDS32_BUILTIN_UASTORE_DW.
17831 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17834 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17835 Kito Cheng <kito.cheng@gmail.com>
17836 Chung-Ju Wu <jasonwucj@gmail.com>
17838 * config/nds32/nds32-intrinsic.c
17839 (nds32_expand_builtin_null_ftype_reg): Delete.
17840 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17841 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17842 (nds32_read_argument): New.
17843 (nds32_legitimize_target): Ditto.
17844 (nds32_legitimize_argument): Ditto.
17845 (nds32_check_constant_argument): Ditto.
17846 (nds32_expand_unop_builtin): Ditto.
17847 (nds32_expand_unopimm_builtin): Ditto.
17848 (nds32_expand_binop_builtin): Ditto.
17849 (nds32_builtin_decl_impl): Ditto.
17850 (builtin_description): Ditto.
17851 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17852 (nds32_init_builtins_impl): Ditto.
17853 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17854 (nds32_builtin_decl): New.
17855 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17856 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17858 2018-03-02 Jeff Law <law@redhat.com>
17860 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17861 (redundant_insn, fill_simple_delay_slots): Likewise.
17862 (fill_slots_from_thread): Likewise.
17863 * resource.c (mark_referenced_resources): Likewise.
17864 (mark_set_resources, find_dead_or_set_registers): Likewise.
17866 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17868 * substring-locations.h (format_warning_va): Formatting fix for
17869 ATTRIBUTE_GCC_DIAG.
17870 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17872 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17873 * substring-locations.c: Include intl.h.
17874 (format_warning_va): Turned into small wrapper around
17875 format_warning_n_va, renamed to ...
17876 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17877 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17879 (format_warning_at_substring_n): New function.
17880 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17881 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17882 format_warning_at_substring with just a shorter name instead of
17883 const function pointer.
17884 (fmtwarn_n): New function.
17885 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17886 appropriate, get rid of all the fmtstr temporaries, move conditionals
17887 with G_() wrapped string literals directly into fmtwarn arguments,
17888 cast dir.len to (int), formatting fixes.
17890 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17892 * doc/invoke.texi: Remove "Cilk Plus" references.
17894 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17895 Richard Biener <rguenther@suse.de>
17898 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17899 for error or warning attributes if CALL_FROM_THUNK_P is set.
17902 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17905 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17906 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17909 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17910 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17912 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17913 instead of -1U in last predictors element's probability member.
17915 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17918 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17919 arguments if they are comparable.
17921 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17923 PR tree-optimization/84634
17924 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17925 masks and masked_loop_p with a single loop_masks, making sure it's
17926 null for bb vectorization.
17928 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17930 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17931 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17932 loop->force_vectorize to check whether there is no alias.
17934 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17937 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17939 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17941 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17942 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17943 instead of a loop around prev_real_insn.
17944 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17947 PR inline-asm/84625
17948 * config/i386/i386.c (ix86_print_operand): Use conditional
17949 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17952 2018-03-02 Richard Biener <rguenther@suse.de>
17954 PR tree-optimization/84427
17955 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17956 (bitmap_set_subtract_values): Rewrite to handle multiple
17959 (prune_clobbered_mems): Likewise.
17960 (phi_translate): Take edge instead of pred/phiblock.
17961 (phi_translate_1): Likewise.
17962 (phi_translate_set): Likewise. Insert all translated
17963 exprs for a value into the set, keeping possibly multiple
17964 expressions per value.
17965 (compute_antic_aux): Adjust for phi_translate changes.
17966 When intersecting union the expressions and prune those
17967 not in the final value set, keeping possibly multiple
17968 expressions per value. Do not use value-insertion
17969 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17970 all expressions. Add verification that the value-sets
17971 only shrink during iteration.
17972 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17973 (do_pre_regular_insertion): Likewise.
17974 (do_pre_partial_partial_insertion): Likewise.
17976 2018-03-02 Richard Biener <rguenther@suse.de>
17979 * config/darwin.c (saved_debug_info_level): New static global.
17980 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17981 (darwin_asm_lto_end): Restore debug info generation settings.
17983 2018-03-01 Martin Liska <mliska@suse.cz>
17986 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17987 volatile arguments.
17989 2018-03-01 Richard Biener <rguenther@suse.de>
17992 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17993 type annotation with LTO when debug was disabled at compile-time.
17995 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17997 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17999 (mips_final_postscan_insn): Likewise.
18001 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18003 PR rtl-optimization/84528
18004 * alias.c (init_alias_target): Add commentary.
18005 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18006 a unique base value if the frame pointer is not eliminated
18007 to the stack pointer.
18009 2018-03-01 Tom de Vries <tom@codesourcery.com>
18011 PR rtl-optimization/83327
18012 * lra-int.h (hard_regs_spilled_into): Declare.
18013 * lra.c (hard_regs_spilled_into): Define.
18014 (init_reg_info): Init hard_regs_spilled_into.
18015 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18016 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18017 (process_bb_lives): Handle hard_regs_spilled_into.
18018 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18019 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18021 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18023 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18024 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18025 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18026 * config/rs6000/aix72.h: New file.
18028 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18030 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18031 instead of warning_at with conditional singular and plural messages
18035 * stor-layout.c (update_alignment_for_field): For
18036 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18037 && !DECL_PACKED (field), do the alignment update, just use
18038 only desired_align instead of MAX (type_align, desired_align)
18040 (place_field): Don't do known_align < desired_align handling
18041 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18042 is non-NULL, instead do it after rli->prev_field handling and
18043 only if not within a bitfield word. For DECL_PACKED (field)
18044 use type_align of BITS_PER_UNIT.
18046 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18048 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18049 superfluous parentheses and trailing spaces.
18051 2018-02-28 Richard Biener <rguenther@suse.de>
18053 PR tree-optimization/84584
18054 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18055 SCoPs with fake exit edge.
18057 2018-02-28 Martin Liska <mliska@suse.cz>
18060 * timevar.c (timer::print): Fix format to properly print 100%
18063 2018-02-28 Richard Biener <rguenther@suse.de>
18065 PR middle-end/84607
18066 * genmatch.c (capture_info::walk_match): Do not mark
18067 captured expressions without operands as expr_p given
18068 they act more like predicates and should be subject to
18069 "lost tail" side-effect preserving.
18071 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18073 PR rtl-optimization/81611
18074 * auto-inc-dec.c (attempt_change): Move dead note from
18075 mem_insn if it's the next use of regno
18076 (find_address): Take address use of reg holding
18077 non-incremented value. Add parm to limit search to the named
18079 (merge_in_block): Attempt to use a mem insn that is the next
18080 use of the original regno.
18082 2018-02-27 Martin Sebor <msebor@redhat.com>
18085 * doc/invoke.texi (-Wmissing-attributes): New option.
18086 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18088 2018-02-27 Martin Sebor <msebor@redhat.com>
18090 PR translation/84207
18091 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18092 n argument to unsigned HOST_WIDE_INT.
18093 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18094 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18095 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18096 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18098 2018-02-27 Richard Biener <rguenther@suse.de>
18100 PR tree-optimization/84512
18101 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18102 Do not use the estimate returned from record_stmt_cost for
18103 the scalar iteration cost but sum properly using add_stmt_cost.
18105 2018-02-27 Richard Biener <rguenther@suse.de>
18107 PR tree-optimization/84466
18108 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18109 Adjust last change to less strictly validate use operands.
18111 2018-02-27 Martin Liska <mliska@suse.cz>
18113 PR gcov-profile/84548
18114 * gcov.c (process_file): Allow partial overlap and consider it
18115 also as group functions.
18116 (output_lines): Properly calculate range of lines for a group.
18118 2018-02-27 Martin Liska <mliska@suse.cz>
18120 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18121 'ggc' suffixes. Change first column width.
18122 (timer::print): Fix formatting of the column.
18124 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18126 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18127 preserve inline entry blocks for the sake of debug inline
18128 entry point markers alone.
18129 (remove_unused_locals): Suggest in comments a better place to
18130 force the preservation of inline entry blocks that are
18131 otherwise unused, but do not preserve them.
18133 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18135 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18137 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18140 * config/i386/constraints.md (Bs): Replace
18141 ix86_indirect_branch_register with
18142 TARGET_INDIRECT_BRANCH_REGISTER.
18144 * config/i386/i386.md (indirect_jump): Likewise.
18145 (tablejump): Likewise.
18146 (*sibcall_memory): Likewise.
18147 (*sibcall_value_memory): Likewise.
18148 Peepholes of indirect call and jump via memory: Likewise.
18149 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18150 (*sibcall_value_GOT_32): Likewise.
18151 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18152 (GOT_memory_operand): Likewise.
18153 (call_insn_operand): Likewise.
18154 (sibcall_insn_operand): Likewise.
18155 (GOT32_symbol_operand): Likewise.
18156 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18158 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18160 PR rtl-optimization/83496
18161 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18162 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18163 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18164 redundant insn, if any.
18165 (relax_delay_slots): Likewise.
18166 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18168 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18170 PR tree-optimization/83965
18171 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18172 that grouped statements are part of a reduction chain. Return
18173 true if the statement is not marked as a reduction itself but
18174 is part of a group.
18175 (vect_recog_dot_prod_pattern): Don't check whether the statement
18176 is part of a group here.
18177 (vect_recog_sad_pattern): Likewise.
18178 (vect_recog_widen_sum_pattern): Likewise.
18180 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18183 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18185 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18188 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18190 (ix86_output_indirect_function_return): New prototype.
18191 (ix86_split_simple_return_pop_internal): Likewise.
18192 * config/i386/i386.c (indirect_return_via_cx): New.
18193 (indirect_return_via_cx_bnd): Likewise.
18194 (indirect_thunk_name): Handle return va CX_REG.
18195 (output_indirect_thunk_function): Create alias for
18196 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18197 (ix86_output_indirect_jmp): Remove the bool argument.
18198 (ix86_output_indirect_function_return): New function.
18199 (ix86_split_simple_return_pop_internal): Likewise.
18200 * config/i386/i386.md (*indirect_jump): Don't pass false
18201 to ix86_output_indirect_jmp.
18202 (*tablejump_1): Likewise.
18203 (simple_return_pop_internal): Change it to define_insn_and_split.
18204 Call ix86_split_simple_return_pop_internal to split it for
18205 -mfunction-return=.
18206 (simple_return_indirect_internal): Call
18207 ix86_output_indirect_function_return instead of
18208 ix86_output_indirect_jmp.
18210 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18213 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18214 memset and value initialization afterwards.
18216 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18218 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18220 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18223 * common/config/aarch64/aarch64-common.c
18224 (aarch_option_optimization_table[]): Switch
18225 off fomit-frame-pointer
18227 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18228 Chung-Ju Wu <jasonwucj@gmail.com>
18230 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18232 (store_multiple): Ditto.
18234 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18236 * config.gcc: Add --with-cpu support for nds32 target.
18237 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18238 * config/nds32/nds32.opt: Add -mcpu= option.
18240 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18242 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18243 isel=yes): Warn for these deprecated options.
18245 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18247 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18248 ISA_2_5_MASKS_EMBEDDED.
18250 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18252 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18253 p->max as pointers rather than using iterative_hash_expr.
18255 2018-02-23 Carl Love <cel@us.ibm.com>
18257 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18258 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18260 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18261 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18262 P8V_BUILTIN_VEC_VUNSIGNED2.
18264 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18267 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18268 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18270 * lra-constraints.c (curr_insn_transform): Set up
18271 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18273 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18274 * lra-eliminations.c (spill_pseudos): Ditto.
18275 (process_insn_for_elimination): Ditto.
18276 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18277 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18278 LRA_NON_CLOBBERED_ALT.
18280 2018-02-22 Martin Sebor <msebor@redhat.com>
18282 PR tree-optimization/84480
18283 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18284 to maybe_diag_stxncpy_trunc. Call it.
18285 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18286 from gimple_fold_builtin_strcpy. Print inlining stack.
18287 (handle_builtin_stxncpy): Print inlining stack.
18288 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18290 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18293 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18294 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18295 and -fcheck-pointer-bounds are used together.
18296 (indirect_thunk_prefix): New enum.
18297 (indirect_thunk_need_prefix): New function.
18298 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18299 "_nt" instead of "_bnd" for NOTRACK prefix.
18300 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18301 (output_indirect_thunk_function): Likewise.
18303 (ix86_code_end): Update output_indirect_thunk_function calls.
18304 (ix86_output_indirect_branch_via_reg): Replace
18305 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18306 (ix86_output_indirect_branch_via_push): Likewise.
18307 (ix86_output_function_return): Likewise.
18308 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18309 incompatible with -fcf-protection=branch and
18310 -fcheck-pointer-bounds.
18312 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18315 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18316 Change gcc_assert call to output_operand_lossage.
18318 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18320 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18322 2018-02-22 DJ Delorie <dj@redhat.com>
18323 Sebastian Perta <sebastian.perta@renesas.com>
18324 Oleg Endo <olegendo@gcc.gnu.org>
18326 * config/rx/rx.c (rx_rtx_costs): New function.
18327 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18329 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18331 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18333 2018-02-22 Martin Liska <mliska@suse.cz>
18336 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18337 Add "native" as a possible value.
18339 2018-02-22 Martin Liska <mliska@suse.cz>
18342 * config/i386/i386.c (ix86_option_override_internal):
18343 Add "native" as a possible value for -march and -mtune.
18345 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18348 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18349 to all type variants.
18351 PR tree-optimization/84503
18352 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18353 width as info->bitpos + info->bitsize - start.
18354 (merged_store_group::merge_overlapping): Simplify width computation.
18355 (check_no_overlap): New function.
18356 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18357 start + width and last_order of the group, fail if check_no_overlap
18359 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18360 to group if check_no_overlap fails.
18362 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18364 * config/rs6000/altivec.md: Delete contraint arguments to
18365 define_expand, define_split, and define_peephole2, and in
18366 define_insn_and_split if always unused.
18367 * config/rs6000/darwin.md: Ditto.
18368 * config/rs6000/dfp.md: Ditto.
18369 * config/rs6000/rs6000.md: Ditto.
18370 * config/rs6000/sync.md: Ditto.
18371 * config/rs6000/vector.md: Ditto.
18372 * config/rs6000/vsx.md: Ditto.
18374 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18376 * config/rs6000/altivec.md: Write output control strings as braced
18377 blocks instead of double-quoted strings.
18378 * config/rs6000/darwin.md: Ditto.
18379 * config/rs6000/rs6000.md: Ditto.
18380 * config/rs6000/vector.md: Ditto.
18381 * config/rs6000/vsx.md: Ditto.
18383 2018-02-21 Jason Merrill <jason@redhat.com>
18385 PR c++/84314 - ICE with templates and fastcall attribute.
18386 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18388 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18390 * ipa-cp.c (determine_versionability): Fix comment typos.
18392 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18395 * ipa-cp.c (determine_versionability): Do not version functions caling
18398 2018-02-21 Martin Liska <mliska@suse.cz>
18401 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18402 Add "native" as a possible value.
18403 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18404 the macro when native cpu detection is available.
18406 2018-02-21 Martin Liska <mliska@suse.cz>
18409 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18410 Add "native" as a possible value.
18411 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18412 when native cpu detection is available.
18414 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18415 Martin Sebor <msebor@redhat.com>
18417 PR tree-optimization/84478
18418 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18420 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18421 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18422 support which is conservatively correct, for 2 only stay conservative
18423 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18424 argument to the 2 argument get_range_strlen, adjust 6 arg
18425 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18427 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18428 (gimple_fold_builtin_strlen): Pass true as last argument to
18431 2018-02-20 Martin Sebor <msebor@redhat.com>
18433 PR middle-end/84095
18434 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18435 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18436 (builtin_memref::builtin_memref): Factor out parts into
18437 set_base_and_offset and call it.
18439 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18441 PR middle-end/84406
18442 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18443 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18444 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18445 search at the associated MODE_INT.
18447 2018-02-20 Jeff Law <law@redhat.com>
18449 PR middle-end/82123
18450 PR tree-optimization/81592
18451 PR middle-end/79257
18452 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18453 for range data rather than using global data.
18454 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18455 range data rather than using global data.
18456 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18457 pass it to children as needed.
18458 (struct directive::fmtresult): Similarly.
18459 (struct directive::set_width): Similarly.
18460 (struct directive::set_precision): Similarly.
18461 (format_integer, format_directive, parse_directive): Similarly.
18462 (format_none): Accept unnamed vr_values parameter.
18463 (format_percent, format_floating, format_character): Similarly.
18464 (format_string, format_plain): Similarly.
18465 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18466 the EVRP range analyzer for range data rather than using global data.
18467 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18468 gimple-ssa-evrp-analyze.h
18469 (class sprintf_dom_walker): Add after_dom_children member function.
18470 Add evrp_range_analyzer member.
18471 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18472 range analyzer as needed.
18473 (sprintf_dom_walker::after_dom_children): New member function.
18474 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18476 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18477 (evrp_range_analyzer::pop_to_marker): Likewise.
18479 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18481 PR tree-optimization/84419
18482 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18483 with the required type if its current type is compatible but
18486 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18488 PR middle-end/82004
18489 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18490 after vectorization.
18492 2018-02-20 Martin Liska <mliska@suse.cz>
18495 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18496 possible values if we don't have a hint.
18498 2018-02-20 Martin Liska <mliska@suse.cz>
18502 * final.c (shorten_branches): Build align_tab array with one
18504 * opts.c (finish_options): Add alignment option limit check.
18505 (MAX_CODE_ALIGN): Likewise.
18506 (MAX_CODE_ALIGN_VALUE): Likewise.
18507 * doc/invoke.texi: Document maximum allowed option value for
18508 all -falign-* options.
18510 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18513 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18514 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18515 * var-tracking.c (emit_note_insn_var_location): Remove all references
18516 to NOTE_INSN_CALL_ARG_LOCATION.
18517 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18518 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18519 Use copy_rtx_if_shared.
18520 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18521 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18522 (dwarf2out_var_location): Remove handling of
18523 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18525 * final.c (final_scan_insn): Remove all references to
18526 NOTE_INSN_CALL_ARG_LOCATION.
18527 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18528 before dumping final insns.
18529 * except.c (emit_note_eh_region_end): Remove all references to
18530 NOTE_INSN_CALL_ARG_LOCATION.
18531 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18532 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18533 * config/arc/arc.c (hwloop_optimize): Likewise.
18534 * config/arm/arm.c (create_fix_barrier): Likewise.
18535 * config/s390/s390.c (s390_chunkify_start): Likewise.
18536 * config/sh/sh.c (find_barrier): Likewise.
18537 * config/i386/i386.c (rest_of_insert_endbranch,
18538 ix86_seh_fixup_eh_fallthru): Likewise.
18539 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18540 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18541 * config/frv/frv.c (frv_function_prologue): Likewise.
18542 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18544 (note_outside_basic_block_p): Remove all references to
18545 NOTE_INSN_CALL_ARG_LOCATION.
18546 * gengtype.c (adjust_field_rtx_def): Likewise.
18547 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18549 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18550 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18553 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18556 PR tree-optimization/84452
18557 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18558 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18561 2018-02-19 Martin Liska <mliska@suse.cz>
18564 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18566 2018-02-19 Martin Liska <mliska@suse.cz>
18567 Richard Sandiford <richard.sandiford@linaro.org>
18569 PR tree-optimization/82491
18570 * gimple-fold.c (get_base_constructor): Make earlier bail out
18573 2018-02-19 Carl Love <cel@us.ibm.com>
18575 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18576 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18578 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18579 P8V_BUILTIN_VEC_NEG.
18581 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18583 * config/rl78/rl78.md (movdf): New define expand.
18585 2018-02-19 Martin Liska <mliska@suse.cz>
18588 * doc/invoke.texi: Fix typo.
18589 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18591 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18593 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18594 handle rs6000_single_float and rs6000_double_float specially for
18597 2018-02-16 Jeff Law <law@redhat.com>
18599 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18600 (pop_regs): Use it.
18602 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18605 * ipa-inline.c (inline_small_functions): Fix a typo.
18607 2018-02-16 Nathan Sidwell <nathan@acm.org>
18609 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18611 2018-02-16 Carl Love <cel@us.ibm.com>
18613 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18614 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18615 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18616 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18617 expansion to P8V_BUILTIN_VEC_FLOAT2.
18619 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18621 PR rtl-optimization/70023
18622 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18623 src_regno into account.
18625 2018-02-16 Carl Love <cel@us.ibm.com>
18627 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18628 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18629 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18630 * config/rs6000/rs6000.c: Remove case statements for
18631 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18632 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18633 and P9V_BUILTIN_VEC_VINSERT4B.
18634 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18635 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18636 * config/rs6000/vsx.md:
18637 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18640 2018-02-16 Carl Love <cel@us.ibm.com>
18642 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18644 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18646 * config/rs6000/rs6000-c.c: Add the definitions for
18647 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18648 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18649 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18650 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18651 definition for insert4b and define insn *insert3b_internal.
18652 * doc/extend.texi: Add documentation for vec_extract4b.
18654 2018-02-16 Nathan Sidwell <nathan@acm.org>
18656 * doc/extend.texi (Backwards Compatibility): Mention friend
18657 injection. Note for-scope is deprecated.
18658 * doc/invoke.texi (-ffriend-injection): Deprecate.
18660 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18662 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18663 that moved to I2, also allow destinations that are a paradoxical
18664 subreg (instead of a normal reg).
18666 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18669 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18672 2018-02-16 Richard Biener <rguenther@suse.de>
18674 PR tree-optimization/84037
18675 PR tree-optimization/84016
18677 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18678 Adjust vec_construct for the fact we need additional higher latency
18679 128bit inserts for AVX256 and AVX512 vector builds.
18680 (ix86_add_stmt_cost): Scale vector construction cost for
18683 2018-02-16 Richard Biener <rguenther@suse.de>
18685 PR tree-optimization/84417
18686 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18687 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18688 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18690 2018-02-16 Martin Liska <mliska@suse.cz>
18693 * internal-fn.def (ASAN_CHECK): Set proper flags.
18694 (ASAN_MARK): Likewise.
18696 2018-02-16 Julia Koval <julia.koval@intel.com>
18698 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18699 from PTA_CANNONLAKE.
18701 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18704 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18705 Use ++iter rather than iter++ for std::list iterators.
18706 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18707 defer deleting them until all nodes in the forest are processed. Do
18708 free even leaf nodes. Change to_process into auto_vec.
18711 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18712 * vec.h (vec_default_construct): Use memset instead of placement new
18713 if BROKEN_VALUE_INITIALIZATION is defined.
18714 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18715 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18718 PR rtl-optimization/83723
18719 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18720 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18721 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18723 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18725 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18727 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18729 PR rtl-optimization/81443
18730 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18731 from inner REGs to paradoxical SUBREGs.
18733 2018-02-16 Richard Biener <rguenther@suse.de>
18735 PR tree-optimization/84399
18736 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18737 For operands we can analyze at their definition make sure we can
18738 analyze them at each use as well.
18740 2018-02-16 Richard Biener <rguenther@suse.de>
18742 PR tree-optimization/84190
18743 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18744 volatile accesses if the decl isn't volatile.
18746 2018-02-15 Jason Merrill <jason@redhat.com>
18748 PR c++/84314 - ICE with templates and fastcall attribute.
18749 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18750 TYPE_CANONICAL on an existing type.
18752 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18754 PR tree-optimization/84383
18755 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18756 dstoff nor call operand_equal_p if dstbase is NULL.
18758 PR tree-optimization/84334
18759 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18760 also a CONSTANT_CLASS_P, punt.
18762 2018-02-14 Jim Wilson <jimw@sifive.com>
18764 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18765 first SMALL_OPERAND check. New local min_second_step. Move assert
18766 to where locals are set. Add TARGET_RVC support.
18767 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18769 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18771 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18773 2018-02-14 Martin Sebor <msebor@redhat.com>
18775 PR tree-optimization/83698
18776 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18777 arrays constrain the offset range to their bounds.
18778 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18779 (builtin_access::overlap): Avoid setting the size of overlap if it's
18781 (maybe_diag_overlap): Also consider arrays when deciding what values
18782 of offsets to include in diagnostics.
18784 2018-02-14 Martin Sebor <msebor@redhat.com>
18787 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18788 that correspond to the kind of a declaration.
18790 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18793 * config/pa/pa.md: Load address of PIC label using the linkage table
18794 if the label is nonlocal.
18796 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18798 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18799 warning message if user requests -maltivec=be.
18800 * doc/invoke.texi: Document deprecation of -maltivec=be.
18802 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18805 * config/rs6000/rs6000-c.c: Update definitions for
18806 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18807 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18809 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18812 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18813 add _get_ssp intrinsics. Remove argument from
18814 __builtin_ia32_rdssp[d|q].
18815 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18816 * config/i386/i386-builtin.def: Remove argument from
18817 __builtin_ia32_rdssp[d|q].
18818 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18819 ix86_expand_special_args_builtin for _rdssp[d|q].
18820 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18821 Clear register before usage.
18822 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18823 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18825 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18827 PR tree-optimization/84357
18828 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18829 operand 1 of an ARRAY_REF too.
18831 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18834 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18835 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18837 (set_of_reg): New struct.
18838 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18839 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18840 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18842 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18843 Split into bitclr, bitset, bitinvert patterns if appropriate.
18844 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18845 use rx_fuse_in_memory_bitop.
18846 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18847 to named insn, correct maximum insn length.
18849 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18852 * machmode.def: Define a complex mode for PARTIAL_INT.
18853 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18855 * doc/rtl.texi: Document CSPImode.
18856 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18858 (msp430_hard_regno_nregs_with_padding): Likewise.
18860 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18863 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18865 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18867 PR rtl-optimization/84169
18868 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18869 we generated a parallel as new i3 and we split that to new i2 and i3
18870 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18871 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18872 those to i2, not i1. Partially rewrite this scan code.
18874 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18877 * stor-layout.c (place_field): For variable length fields, adjust
18878 offset_align afterwards not just based on the field's alignment,
18879 but also on the size.
18881 PR middle-end/84309
18882 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18883 of exps and logs in the use_exp2 case.
18885 2018-02-13 Jeff Law <law@redhat.com>
18887 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18888 entry for "vector".
18890 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18893 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18897 * common.opt (gas-loc-support, gas-locview-support): New.
18898 (ginline-points, ginternal-reset-location-views): New.
18899 * doc/invoke.texi: Document them. Use @itemx where intended.
18900 (gvariable-location-views): Adjust.
18901 * target.def (reset_location_view): New.
18902 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18903 (TARGET_RESET_LOCATION_VIEW): New.
18904 * doc/tm.texi: Rebuilt.
18905 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18906 (dwarf2out_default_as_locview_support): New.
18907 (output_asm_line_debug_info): Use option variables.
18908 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18909 (output_loc_list): Likewise.
18910 (add_high_low_attributes): Check option variables.
18911 Don't output entry view attribute in strict mode.
18912 (gen_inlined_subroutine_die): Check option variables.
18913 (dwarf2out_inline_entry): Likewise.
18914 (init_sections_and_labels): Likewise.
18915 (dwarf2out_early_finish): Likewise.
18916 (maybe_reset_location_view): New, from...
18917 (dwarf2out_var_location): ... here. Call it.
18918 * debug.h (dwarf2out_default_as_loc_support): Declare.
18919 (dwarf2out_default_as_locview_support): Declare.
18920 * hooks.c (hook_int_rtx_insn_0): New.
18921 * hooks.h (hook_int_rtx_insn_0): Declare.
18922 * toplev.c (process_options): Take -gas-loc-support and
18923 -gas-locview-support from dwarf2out. Enable
18924 -gvariable-location-views by default only with locview
18925 assembler support. Enable -ginternal-reset-location-views by
18926 default only if the target defines the corresponding hook.
18927 Enable -ginline-points by default if location views are
18928 enabled; force it disabled if statement frontiers are
18930 * tree-inline.c (expand_call_inline): Check option variables.
18931 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18933 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18935 PR tree-optimization/84321
18936 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18937 handling. Also check whether the anti-range contains any values
18938 that satisfy the mask; switch to a VR_RANGE if not.
18940 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18943 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18945 2018-02-13 Martin Jambor <mjambor@suse.cz>
18948 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18949 of call statements, also set location of a load to a temporary.
18951 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18953 * config/rl78/rl78.c (add_vector_labels): New function.
18954 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18955 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18956 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18957 which checks that no arguments are passed.
18958 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18959 * doc/extend.texi: Documentation for the new attribute.
18961 2018-02-13 Andreas Schwab <schwab@suse.de>
18963 * config/riscv/linux.h (CPP_SPEC): Define.
18965 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18968 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18969 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18970 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18971 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18972 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18973 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18974 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18975 temporarily for AES and PCLMUL builtins.
18977 PR tree-optimization/84339
18978 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18979 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18982 PR middle-end/84309
18983 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18984 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18985 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18987 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18989 * omp-simd-clone.h: New file.
18990 * omp-simd-clone.c: Include omp-simd-clone.h.
18991 (expand_simd_clones): No longer static.
18992 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18993 cgraph.h and omp-simd-clone.h.
18994 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18995 (vect_recog_widen_shift_pattern): Formatting fix.
18996 (vect_pattern_recog_1): Don't check optab for calls.
18999 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19000 operands[2] into a REG before using gen_lowpart on it.
19002 2018-02-12 Jeff Law <law@redhat.com>
19005 * config/sh/sh.c (find_barrier): Consider a sibling call
19008 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19009 successfully back substituting a reg.
19011 2018-02-12 Richard Biener <rguenther@suse.de>
19013 PR tree-optimization/84037
19014 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19015 parameter, move visited init to caller.
19016 (vect_slp_analyze_operations): Separate cost from validity
19017 check, initialize visited once for all instances.
19018 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19020 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19022 (vect_model_promotion_demotion_cost): Likewise.
19023 (vectorizable_bswap): Guard cost modeling with !slp_node
19024 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19026 (vectorizable_call): Likewise.
19027 (vectorizable_conversion): Likewise.
19028 (vectorizable_assignment): Likewise.
19029 (vectorizable_shift): Likewise.
19030 (vectorizable_operation): Likewise.
19031 (vectorizable_store): Likewise.
19032 (vectorizable_load): Likewise.
19033 (vectorizable_condition): Likewise.
19034 (vectorizable_comparison): Likewise.
19036 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19039 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19040 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19041 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19043 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19045 PR middle-end/83665
19046 * params.def (inline-min-speedup): Increase from 8 to 15.
19047 (max-inline-insns-auto): Decrease from 40 to 30.
19048 * ipa-split.c (consider_split): Add some buffer for function to
19049 be considered inlining candidate.
19050 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19053 2018-02-12 Richard Biener <rguenther@suse.de>
19055 PR tree-optimization/84037
19056 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19057 matched stmts if we cannot swap the non-matched ones.
19059 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19061 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19062 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19063 _mm_maskz_scalef_round_ss): New intrinsics.
19064 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19065 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19066 __builtin_ia32_scalefss_round): Remove.
19067 (__builtin_ia32_scalefsd_mask_round,
19068 __builtin_ia32_scalefss_mask_round): New intrinsics.
19069 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19070 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19071 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19072 "<round_constraint>")): Changed to ...
19073 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19074 "<round_scalar_constraint>")): ... this.
19075 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19076 %0, %1, %2<round_op3>}"): Changed to ...
19077 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19078 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19079 %2<round_scalar_mask_op3>}"): ... this.
19080 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19082 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19084 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19085 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19086 (_mm_maskz_sqrt_round_ss): New intrinsics.
19087 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19088 (__builtin_ia32_sqrtsd_mask_round)
19089 (__builtin_ia32_sqrtss_mask_round): New builtins.
19090 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19091 (__builtin_ia32_sqrtss_round): Remove.
19092 (__builtin_ia32_sqrtsd_mask_round)
19093 (__builtin_ia32_sqrtss_mask_round): New builtins.
19094 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19095 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19096 ((match_operand:VF_128 1 "vector_operand"
19097 "xBm,<round_constraint>")): Changed to ...
19098 ((match_operand:VF_128 1 "vector_operand"
19099 "xBm,<round_scalar_constraint>")): ... this.
19100 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19101 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19102 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19103 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19104 %<iptr>1<round_scalar_mask_op3>}): ... this.
19105 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19106 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19108 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19111 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19112 Cast vec_cmpeq result to correct type.
19113 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19114 Cast vec_cmpgt result to correct type.
19116 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19118 * final.c (final_scan_insn_1): Renamed from...
19119 (final_scan_insn): ... this. New wrapper, to recover
19120 seen from the outermost call in recursive ones.
19121 * config/sparc/sparc.c (output_return): Drop seen from call.
19122 (output_sibcall): Likewise.
19123 * config/visium/visium.c (output_branch): Likewise.
19125 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19127 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19130 2018-02-10 Alan Modra <amodra@gmail.com>
19133 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19134 Specify LR as an input.
19136 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19139 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19140 remove_member_access_dummy_vars): New functions.
19141 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19142 lower_omp_1, execute_lower_omp): Use them.
19144 PR rtl-optimization/84308
19145 * shrink-wrap.c (spread_components): Release todo vector.
19147 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19149 PR rtl-optimization/57193
19150 * ira-color.c (struct allocno_color_data): Add member
19151 conflict_allocno_hard_prefs.
19152 (update_conflict_allocno_hard_prefs): New.
19153 (bucket_allocno_compare_func): Add a preference based on
19154 conflict_allocno_hard_prefs.
19155 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19156 (color_allocnos): Remove a dead code. Initiate
19157 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19159 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19162 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19163 constraint from =wa to wa. Avoid a subreg on the output operand,
19164 instead use a pseudo and subreg it in a move.
19165 (p9_xxbrd_<mode>): Changed to ...
19166 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19167 (p9_xxbrd_v2df): New expander.
19168 (p9_xxbrw_<mode>): Changed to ...
19169 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19170 (p9_xxbrw_v4sf): New expander.
19172 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19174 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19176 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19179 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19180 multiply in 32-bit mode.
19181 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19182 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19185 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19187 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19188 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19189 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19190 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19192 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19195 * dwarf2out.c (is_trivial_indirect_ref): New function.
19196 (dwarf2out_late_global_decl): Do not generate a location
19197 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19198 and that are not defined in the current unit.
19200 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19202 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19203 instead of a libcall for UNORDERED.
19205 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19208 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19209 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19211 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19214 * config/s390/s390.c (s390_set_current_function): Invoke
19215 s390_indirect_branch_settings also if fndecl didn't change.
19217 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19219 * config/rs6000/rs6000.md (blockage): Set length to zero.
19221 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19223 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19225 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19228 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19229 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19233 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19234 PARALLEL incoming that failed vt_get_decl_and_offset check.
19236 PR middle-end/84237
19237 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19238 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19240 (get_variable_section): For decls in named .bss* sections pass true as
19241 second argument to bss_initializer_p.
19243 2018-02-09 Marek Polacek <polacek@redhat.com>
19244 Jakub Jelinek <jakub@redhat.com>
19247 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19248 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19249 Sync some changes from cxx_fold_indirect_ref.
19251 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19253 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19255 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19256 (BLOCK_INLINE_ENTRY_LABEL): New.
19257 (dwarf2out_var_location): Disregard inline entry markers.
19258 (inline_entry_data): New struct.
19259 (inline_entry_data_hasher): New hashtable type.
19260 (inline_entry_data_hasher::hash): New.
19261 (inline_entry_data_hasher::equal): New.
19262 (inline_entry_data_table): New variable.
19263 (add_high_low_attributes): Add DW_AT_entry_pc and
19264 DW_AT_GNU_entry_view attributes if a pending entry is found
19265 in inline_entry_data_table. Add old entry_pc attribute only
19266 if debug nonbinding markers are disabled.
19267 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19268 markers are enabled.
19269 (block_within_block_p, dwarf2out_inline_entry): New.
19270 (dwarf2out_finish): Check that no entries remained in
19271 inline_entry_data_table.
19272 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19273 (final_scan_insn, notice_source_line): Likewise.
19274 (rest_of_clean_state): Skip inline entry markers.
19275 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19277 * gimple.c (gimple_build_debug_inline_entry): New.
19278 * gimple.h (enum gimple_debug_subcode): Add
19279 GIMPLE_DEBUG_INLINE_ENTRY.
19280 (gimple_build_debug_inline_entry): Declare.
19281 (gimple_debug_inline_entry_p): New.
19282 (gimple_debug_nonbind_marker_p): Adjust.
19283 * insn-notes.def (INLINE_ENTRY): New.
19284 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19285 inline entry marker notes.
19286 (print_insn): Likewise.
19287 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19288 (INSN_DEBUG_MARKER_KIND): Likewise.
19289 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19290 * tree-inline.c (expand_call_inline): Build and insert
19291 debug_inline_entry stmt.
19292 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19293 inline entry blocks early, if nonbind markers are enabled.
19294 (dump_scope_block): Dump fragment info.
19295 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19296 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19297 (gimple_build_debug_inline_entry): New.
19298 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19299 Enable/disable inline entry points too.
19300 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19301 (DEBUG_INSN): Describe inline entry markers.
19303 * common.opt (gvariable-location-views): New.
19304 (gvariable-location-views=incompat5): New.
19305 * config.in: Rebuilt.
19306 * configure: Rebuilt.
19307 * configure.ac: Test assembler for view support.
19308 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19309 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19310 * dwarf2out.c (var_loc_view): New typedef.
19311 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19312 (dwarf2out_locviews_in_attribute): New.
19313 (dwarf2out_locviews_in_loclist): New.
19314 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19315 (enum dw_line_info_opcode): Add LI_adv_address.
19316 (struct dw_line_info_table): Add view.
19317 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19318 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19319 (zero_view_p): New variable.
19320 (ZERO_VIEW_P): New macro.
19321 (output_asm_line_debug_info): New.
19322 (struct var_loc_node): Add view.
19323 (add_AT_view_list, AT_loc_list): New.
19324 (add_var_loc_to_decl): Add view param. Test it against last.
19325 (new_loc_list): Add view params. Record them.
19326 (AT_loc_list_ptr): Handle loc and view lists.
19327 (view_list_to_loc_list_val_node): New.
19328 (print_dw_val): Handle dw_val_class_view_list.
19329 (size_of_die): Likewise.
19330 (value_format): Likewise.
19331 (loc_list_has_views): New.
19332 (gen_llsym): Set vl_symbol too.
19333 (maybe_gen_llsym, skip_loc_list_entry): New.
19334 (dwarf2out_maybe_output_loclist_view_pair): New.
19335 (output_loc_list): Output view list or entries too.
19336 (output_view_list_offset): New.
19337 (output_die): Handle dw_val_class_view_list.
19338 (output_dwarf_version): New.
19339 (output_compilation_unit_header): Use it.
19340 (output_skeleton_debug_sections): Likewise.
19341 (output_rnglists, output_line_info): Likewise.
19342 (output_pubnames, output_aranges): Update version comments.
19343 (output_one_line_info_table): Output view numbers in asm comments.
19344 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19345 Call maybe_gen_llsym.
19346 (loc_list_from_tree_1): Adjust.
19347 (add_AT_location_description): Create view list attribute if
19348 needed, check it's absent otherwise.
19349 (convert_cfa_to_fb_loc_list): Adjust.
19350 (maybe_emit_file): Call output_asm_line_debug_info for test.
19351 (dwarf2out_var_location): Reset views as needed. Precompute
19352 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19353 attribute. Set view.
19354 (new_line_info_table): Reset next view.
19355 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19356 (dwarf2out_source_line): Likewise. Output view resets and labels to
19357 the assembler, or select appropriate line info opcodes.
19358 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19359 (optimize_string_length): Catch it. Adjust.
19360 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19361 dw_val_class_view_list, and remove it if no longer needed.
19362 (hash_loc_list): Hash view numbers.
19363 (loc_list_hasher::equal): Compare them.
19364 (optimize_location_lists): Check whether a view list symbol is
19365 needed, and whether the locview attribute is present, and
19366 whether they match. Remove the locview attribute if no longer
19368 (index_location_lists): Call skip_loc_list_entry for test.
19369 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19370 Use output_dwarf_version.
19371 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19372 (struct dw_val_node): Add val_view_list.
19373 * final.c (SEEN_NEXT_VIEW): New.
19374 (set_next_view_needed): New.
19375 (clear_next_view_needed): New.
19376 (maybe_output_next_view): New.
19377 (final_start_function): Rename to...
19378 (final_start_function_1): ... this. Take pointer to FIRST,
19379 add SEEN parameter. Emit param bindings in the initial view.
19380 (final_start_function): Reintroduce SEEN-less interface.
19381 (final): Rename to...
19382 (final_1): ... this. Take SEEN parameter. Output final pending
19383 next view at the end.
19384 (final): Reintroduce seen-less interface.
19385 (final_scan_insn): Output pending next view before switching
19386 sections or ending a block. Mark the next view as needed when
19387 outputting variable locations. Notify debug backend of section
19388 changes, and of location view changes.
19389 (rest_of_handle_final): Adjust.
19390 * toplev.c (process_options): Autodetect value for debug variable
19391 location views option. Warn on incompat5 without -gdwarf-5.
19392 * doc/invoke.texi (gvariable-location-views): New.
19393 (gvariable-location-views=incompat5): New.
19394 (gno-variable-location-views): New.
19396 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19398 PR tree-optimization/84136
19399 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19400 that the result of find_edge is non-NULL.
19402 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19405 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19406 storing integer register in SImode. Fix cost of 256 and 512
19407 byte aligned SSE register store.
19409 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19411 * config/i386/i386.c (ix86_multiplication_cost): Fix
19412 multiplication cost for TARGET_AVX512DQ.
19414 2018-02-08 Marek Polacek <polacek@redhat.com>
19416 PR tree-optimization/84238
19417 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19420 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19422 PR tree-optimization/84265
19423 * tree-vect-stmts.c (vectorizable_store): Don't treat
19424 VMAT_CONTIGUOUS accesses as grouped.
19425 (vectorizable_load): Likewise.
19427 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19429 PR tree-optimization/81635
19430 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19431 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19432 (test_round_for_mask): New functions.
19433 (wide_int_cc_tests): Call test_round_for_mask.
19434 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19435 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19436 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19437 range returned by get_range_info.
19439 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19442 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19443 * symtab.c: Include builtins.h
19444 (symtab_node::output_to_lto_symbol_table_p): Move here
19445 from lto-streamer-out.c:output_symbol_p.
19446 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19447 (output_symbol_p): Move all logic to symtab.c
19448 (produce_symtab): Update.
19450 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19452 * config/s390/s390-opts.h (enum indirect_branch): Define.
19453 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19454 (s390_indirect_branch_via_thunk)
19455 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19456 (enum s390_indirect_branch_type): Define.
19457 * config/s390/s390.c (struct s390_frame_layout, struct
19458 machine_function): Remove.
19459 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19460 (indirect_branch_table_label_no, indirect_branch_table_name):
19462 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19463 (enum s390_indirect_branch_option): Define.
19464 (s390_return_addr_from_memory): New function.
19465 (s390_handle_string_attribute): New function.
19466 (s390_attribute_table): Add new attribute handler.
19467 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19468 (s390_indirect_branch_via_thunk): New function.
19469 (s390_indirect_branch_via_inline_thunk): New function.
19470 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19471 sibling call optimization for non z10 compiles.
19472 (s390_emit_call): Force indirect branch target to be a single
19473 register. Add r1 clobber for non-z10 compiles.
19474 (s390_emit_epilogue): Emit return jump via return_use expander.
19475 (s390_reorg): Handle JUMP_INSNs as execute targets.
19476 (s390_option_override_internal): Perform validity checks for the
19477 new command line options.
19478 (s390_indirect_branch_attrvalue): New function.
19479 (s390_indirect_branch_settings): New function.
19480 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19481 (s390_output_indirect_thunk_function): New function.
19482 (s390_code_end): Implement target hook.
19483 (s390_case_values_threshold): Implement target hook.
19484 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19486 * config/s390/s390.h (struct s390_frame_layout)
19487 (struct machine_function): Move here from s390.c.
19488 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19489 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19490 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19491 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19492 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19493 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19494 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19495 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19496 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19497 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19498 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19499 (mnemonic attribute): Add values which aren't recognized
19501 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19502 pattern for branch conversion. Fix mnemonic attribute.
19503 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19504 indirect branch via thunk if requested.
19505 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19506 ("*indirect_jump"): Disable for branch conversion using out of
19508 ("indirect_jump_via_thunk<mode>_z10")
19509 ("indirect_jump_via_thunk<mode>")
19510 ("indirect_jump_via_inlinethunk<mode>_z10")
19511 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19512 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19513 ("casesi_jump_via_inlinethunk<mode>_z10")
19514 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19515 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19516 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19517 ("*indirect2_jump"): Disable for branch conversion.
19518 ("casesi_jump"): Turn into expander and expand patterns for branch
19520 ("return_use"): New expander.
19521 ("*return"): Emit return via thunk and rename it to ...
19522 ("*return<mode>"): ... this one.
19523 * config/s390/s390.opt: Add new options and and enum for the
19526 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19528 * lra-constraints.c (match_reload): Unconditionally use
19529 gen_lowpart_SUBREG, rather than selecting between that
19530 and equivalent gen_rtx_SUBREG code.
19532 2018-02-08 Richard Biener <rguenther@suse.de>
19534 PR tree-optimization/84233
19535 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19536 changed flag instead of boguously re-using phi_inserted.
19538 2018-02-08 Martin Jambor <mjambor@suse.cz>
19540 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19541 static local variables.
19543 2018-02-08 Richard Biener <rguenther@suse.de>
19545 PR tree-optimization/84278
19546 * tree-vect-stmts.c (vectorizable_store): When looking for
19547 smaller vector types to perform grouped strided loads/stores
19548 make sure the mode is supported by the target.
19549 (vectorizable_load): Likewise.
19551 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19553 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19554 Increase LDP/STP opportunities by adding adjacent callee-saves.
19556 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19558 PR rtl-optimization/84068
19559 PR rtl-optimization/83459
19560 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19562 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19564 PR tree-optimization/84224
19565 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19566 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19567 non-zero arguments.
19569 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19572 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19573 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19574 count, remove one USE.
19576 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19578 * doc/install.texi (Configuration): Document the
19579 --with-long-double-format={ibm,ieee} PowerPC configuration
19583 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19584 Convert from define_expand to be define_insn_and_split. Rework
19585 float/double/_Float128 conversions to QI/HI/SImode to work with
19586 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19587 conversions to QI/HImode types did a store and then a load to
19588 truncate the value. For conversions to VSX registers, don't split
19589 the insn, instead emit the code directly. Use the code iterator
19590 any_fix to combine signed and unsigned conversions.
19591 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19592 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19593 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19594 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19595 (fix_<mode>di2_hw): Likewise.
19596 (fixuns_<mode>di2_hw): Likewise.
19597 (fix_<mode>si2_hw): Likewise.
19598 (fixuns_<mode>si2_hw): Likewise.
19599 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19600 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19601 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19602 fix<uns>_trunc<SFDF:mode>si2_p8.
19603 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19604 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19605 (fix<uns>_<mode>_mem): Likewise.
19606 (fctiw<u>z_<mode>_mem): Likewise.
19607 (fix<uns>_<mode>_mem): Likewise.
19608 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19609 the register allocator from doing a direct move to the GPRs to do
19610 a store, and instead use the ISA 3.0 store byte/half-word from
19611 vector register instruction. For IEEE 128-bit floating point,
19612 also optimize stores of 32-bit ints.
19613 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19615 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19617 * genextract.c (push_pathstr_operand): New function to support
19619 (walk_rtx): Call push_pathstr_operand.
19620 (print_path): Support [a-zA-Z].
19622 2018-02-07 Richard Biener <rguenther@suse.de>
19624 PR tree-optimization/84037
19625 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19626 (cse_and_gimplify_to_preheader): Declare.
19627 (vect_get_place_in_interleaving_chain): Likewise.
19628 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19630 (_loop_vec_info::~_loop_vec_info): Delete it.
19631 (cse_and_gimplify_to_preheader): New function.
19632 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19633 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19634 (vectorizable_load): Likewise. For grouped stores always base
19635 the IV on the first element.
19636 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19637 condition before gimplifying.
19639 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19641 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19642 *DIV_EXPR and *MOD_EXPR.
19644 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19647 * config/i386/i386.c (ix86_option_override_internal): Mask out
19648 the CF_SET bit when checking -fcf-protection.
19650 2018-02-07 Tom de Vries <tom@codesourcery.com>
19653 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19656 2018-02-07 Richard Biener <rguenther@suse.de>
19658 PR tree-optimization/84204
19659 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19662 PR tree-optimization/84205
19663 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19664 special-case isl_ast_op_zdiv_r.
19666 PR tree-optimization/84223
19667 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19668 Only add conditions from within the region.
19669 (gather_bbs::after_dom_children): Adjust.
19671 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19674 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19675 * config/avr/avr.md: Only post-reload split REG-REG moves if
19676 either register is GENERAL_REG_P.
19678 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19680 PR tree-optimization/84235
19681 * tree-ssa-scopedtables.c
19682 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19683 if the subtraction is performed in floating point type where NaNs are
19684 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19685 build 1. Formatting fix.
19687 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19690 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19691 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19692 and skip it regardless of bb boundaries. Use CALL_P macro,
19693 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19694 unnecessarily, formatting fix.
19696 2018-02-06 Michael Collison <michael.collison@arm.com>
19698 * config/arm/thumb2.md:
19699 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19700 (*thumb_mov_notscc): Ditto.
19702 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19705 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19706 unsigned_fix, not "s".
19708 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19710 * configure.ac (gcc_fn_eh_frame_ro): New function.
19711 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19712 correct .eh_frame permissions.
19713 * configure: Regenerate.
19715 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19717 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19718 irrelevant options.
19720 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19722 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19723 Display warning message for -mno-speculate-indirect-jumps.
19725 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19727 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19729 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19731 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19733 PR tree-optimization/84225
19734 * tree-eh.c (find_trapping_overflow): Only call
19735 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19737 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19740 * config/i386/i386.c: Reimplement the check of possible options
19741 -mibt/-mshstk conbination. Change error messages.
19742 * doc/invoke.texi: Fix a typo: remove extra '='.
19744 2018-02-06 Marek Polacek <polacek@redhat.com>
19746 PR tree-optimization/84228
19747 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19749 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19752 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19753 emitted arch directives.
19754 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19755 __ARM_FEATURE_COPROC before changing architectures.
19757 2018-02-06 Richard Biener <rguenther@suse.de>
19759 * config/i386/i386.c (print_reg): Fix typo.
19760 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19762 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19764 * configure: Regenerate.
19766 2018-02-05 Martin Sebor <msebor@redhat.com>
19768 PR tree-optimization/83369
19769 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19772 2018-02-05 Martin Liska <mliska@suse.cz>
19774 * doc/invoke.texi: Cherry-pick upstream r323995.
19776 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19778 * ira.c (ira_init_register_move_cost): Adjust comment.
19780 2018-02-05 Martin Liska <mliska@suse.cz>
19782 PR gcov-profile/84137
19783 * doc/gcov.texi: Fix typo in documentation.
19785 2018-02-05 Martin Liska <mliska@suse.cz>
19787 PR gcov-profile/83879
19788 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19789 using dlopen functionality.
19791 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19793 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19794 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19795 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19796 _mm_maskz_range_round_ss): New intrinsics.
19797 (__builtin_ia32_rangesd128_round)
19798 (__builtin_ia32_rangess128_round): Remove.
19799 (__builtin_ia32_rangesd128_mask_round,
19800 __builtin_ia32_rangess128_mask_round): New builtins.
19801 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19802 __builtin_ia32_rangess128_round): Remove.
19803 (__builtin_ia32_rangesd128_mask_round,
19804 __builtin_ia32_rangess128_mask_round): New builtins.
19805 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19806 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19807 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19808 "<round_saeonly_constraint>")): Changed to ...
19809 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19810 "<round_saeonly_scalar_constraint>")): ... this.
19811 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19812 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19813 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19814 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19815 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19817 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19819 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19821 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19822 Remove all values except native, 8540 and 8548.
19824 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19826 * config/i386/i386.c (ix86_output_function_return): Pass
19827 INVALID_REGNUM, instead of -1, as invalid register number to
19828 indirect_thunk_name and output_indirect_thunk.
19830 2018-02-02 Julia Koval <julia.koval@intel.com>
19832 * config.gcc: Add -march=icelake.
19833 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19834 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19835 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19836 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19837 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19838 (processor_target_table): Add icelake.
19839 (ix86_option_override_internal): Handle new PTAs.
19840 (get_builtin_code_for_version): Handle icelake.
19841 (M_INTEL_COREI7_ICELAKE): New.
19842 (fold_builtin_cpu): Handle icelake.
19843 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19844 * doc/invoke.texi: Add -march=icelake.
19846 2018-02-02 Julia Koval <julia.koval@intel.com>
19848 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19849 to wide_int_bitmask.
19850 * wide-int-bitmask.h: New.
19852 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19855 * config/i386/i386.md: Replace Pmode with word_mode in
19856 builtin_setjmp_setup and builtin_longjmp to support x32.
19858 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19862 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19864 (rs6000_supported_cpu_names): New static variable.
19865 (linux_cpu_translation_table): Likewise.
19866 (elf_platform) <cpu>: Define new static variable and use it.
19867 Translate kernel AT_PLATFORM name to canonical name if needed.
19868 Error if platform name is unknown.
19870 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19873 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19875 2018-02-01 Jeff Law <law@redhat.com>
19878 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19879 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19880 the scratch if RELEASE_VIA_POP is false.
19881 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19882 If we have to save a temporary register, decrement SIZE appropriately.
19883 Pass new arguments to release_scratch_register_on_entry.
19884 (ix86_adjust_stack_and_probe): Likewise.
19885 (ix86_emit_probe_stack_range): Pass new arguments to
19886 release_scratch_register_on_entry.
19888 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19890 PR rtl-optimization/84157
19891 * combine.c (change_zero_ext): Use REG_P predicate in
19892 front of HARD_REGISTER_P predicate.
19894 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19896 * config/avr/avr.c (avr_option_override): Move disabling of
19897 -fdelete-null-pointer-checks to...
19898 * common/config/avr/avr-common.c (avr_option_optimization_table):
19901 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19903 PR tree-optimization/81635
19904 * tree-data-ref.c (split_constant_offset_1): For types that
19905 wrap on overflow, try to use range info to prove that wrapping
19908 2018-02-01 Renlin Li <renlin.li@arm.com>
19911 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19912 TAILCALL_ADDR_REGS.
19913 (aarch64_register_move_cost): Likewise.
19914 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19915 TAILCALL_ADDR_REGS.
19916 (REG_CLASS_NAMES): Likewise.
19917 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19918 TAILCALL_ADDR_REGS. Remove IP registers.
19919 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19921 2018-02-01 Richard Biener <rguenther@suse.de>
19923 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19924 for specifying RPO order and allow NULL for that.
19925 * domwalk.c (dom_walker::dom_walker): Likewise.
19926 (dom_walker::walk): Handle NULL RPO order.
19927 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19929 (rewrite_update_dom_walker): Likewise.
19930 (mark_def_dom_walker): Likewise.
19932 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19934 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19935 (aarch64_maybe_expand_sve_subreg_move): Declare.
19936 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19937 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19939 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19940 that are semantically a reverse operation.
19941 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19942 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19943 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19945 (aarch64_can_change_mode_class): For big-endian, forbid changes
19946 between two SVE modes if they have different element sizes.
19948 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19950 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19951 the TImode handling for big-endian targets.
19953 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19955 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19956 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19958 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19959 Remove BSWAP handing for big-endian targets and use the form of
19960 LD1RQ appropariate for the mode.
19962 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19964 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19965 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19966 duplicated element.
19968 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19971 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19972 check for operands that need to go through aarch64_sve_reload_be.
19974 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19976 PR tree-optimization/81661
19977 PR tree-optimization/84117
19978 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19979 * tree-eh.c: Include gimplify.h.
19980 (find_trapping_overflow, replace_trapping_overflow,
19981 rewrite_to_non_trapping_overflow): New functions.
19982 * tree-vect-loop.c: Include tree-eh.h.
19983 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19984 * tree-data-ref.c: Include tree-eh.h.
19985 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19987 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19989 PR rtl-optimization/84123
19990 * combine.c (change_zero_ext): Check if hard register satisfies
19991 can_change_dest_mode before calling gen_lowpart_SUBREG.
19993 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19996 * ira.c (ira_init_register_move_cost): Remove assert.
19998 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20000 PR rtl-optimization/84071
20001 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20002 * doc/tm.texi: Regenerate.
20004 2018-01-31 Richard Biener <rguenther@suse.de>
20006 PR tree-optimization/84132
20007 * tree-data-ref.c (analyze_miv_subscript): Properly
20008 check whether evolution_function_is_affine_multivariate_p
20009 before calling gcd_of_steps_may_divide_p.
20011 2018-01-31 Julia Koval <julia.koval@intel.com>
20014 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20015 * config/i386/i386.md (rdpid_rex64) New.
20016 (rdpid): Make 32bit only.
20018 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20021 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20022 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20024 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20027 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20029 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20031 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20033 PR rtl-optimization/84071
20034 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20035 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20037 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20039 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20040 (arc_attribute_table): Add 'aux' attribute.
20041 (arc_in_small_data_p): Consider aux like variables.
20042 (arc_is_aux_reg_p): New function.
20043 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20044 (arc_get_aux_arg): New function.
20045 (prepare_move_operands): Handle aux-register access.
20046 (arc_handle_aux_attribute): New function.
20047 * doc/extend.texi (ARC Variable attributes): Add subsection.
20049 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20051 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20052 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20053 (arc_attribute_table): Add 'uncached' attribute.
20054 (arc_print_operand): Print '.di' flag for uncached memory
20056 (arc_in_small_data_p): Do not consider for small data the uncached
20058 (arc_is_uncached_mem_p): New function.
20059 * config/arc/predicates.md (compact_store_memory_operand): Check
20060 for uncached memory accesses.
20061 (nonvol_nonimm_operand): Likewise.
20062 * doc/extend.texi (ARC Type Attribute): New subsection.
20064 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20067 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20068 falign-loops=): Add Optimization flag.
20070 2018-01-30 Jeff Law <law@redhat.com>
20073 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20074 INT_REGISTERS_SAVED. Check it prior to calling
20075 get_scratch_register_on_entry.
20076 (ix86_adjust_stack_and_probe): Similarly.
20077 (ix86_emit_probe_stack_range): Similarly.
20078 (ix86_expand_prologue): Corresponding changes.
20080 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20083 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20084 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20086 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20089 * lra-constraints.c (curr_insn_transform): Process AND in the
20092 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20094 PR rtl-optimization/83986
20095 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20096 dependence against last_pending_memory_flush in addition to
20097 pending_jump_insns.
20099 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20101 PR tree-optimization/81611
20102 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20105 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20108 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20111 2018-01-30 Richard Biener <rguenther@suse.de>
20112 Jakub Jelinek <jakub@redhat.com>
20114 PR tree-optimization/84111
20115 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20116 inner loops added during recursion, as they don't have up-to-date
20119 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20122 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20123 (can_inline_edge_by_limits_p): ... here.
20124 (can_early_inline_edge_p, check_callers,
20125 update_caller_keys, update_callee_keys, recursive_inlining,
20126 add_new_edges_to_heap, speculation_useful_p,
20127 inline_small_functions,
20128 inline_small_functions, flatten_function,
20129 inline_to_all_callers_1): Update.
20131 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20133 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20136 2018-01-30 Richard Biener <rguenther@suse.de>
20138 PR tree-optimization/83008
20139 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20140 invariant and constant vector uses in stmts when they need
20141 more than one stmt.
20143 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20146 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20147 * configure: Regenerate.
20149 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20151 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20153 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20154 Use gen_rtx_REG rather than gen_lowpart.
20156 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20158 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20159 rather than 0 when creating partial subregs.
20161 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20163 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20166 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20169 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20170 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20171 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20172 flags. This restores the settings used before the 2017-07-24.
20173 Turning off pre increment/decrement/modify allows IVOPTS to
20174 optimize DF/SF loops where the index is an int.
20176 2018-01-29 Richard Biener <rguenther@suse.de>
20177 Kelvin Nilsen <kelvin@gcc.gnu.org>
20180 * tree-vect-stmts.c (vectorizable_call): Don't call
20181 targetm.vectorize_builtin_md_vectorized_function if callee is
20184 2018-01-22 Carl Love <cel@us.ibm.com>
20186 * doc/extend.tex: Fix typo in second arg in
20187 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20189 2018-01-29 Richard Biener <rguenther@suse.de>
20191 PR tree-optimization/84086
20192 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20193 (flush_ssaname_freelist): When SSA names were released reset
20194 the SCEV hash table.
20196 2018-01-29 Richard Biener <rguenther@suse.de>
20198 PR tree-optimization/84057
20199 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20200 removed paths when removing edges.
20202 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20204 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20205 -mfunction-return=@var{choice}.
20207 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20209 PR diagnostic/84034
20210 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20211 Handle CR like TAB.
20212 (layout::print_source_line): Likewise.
20213 (test_get_line_width_without_trailing_whitespace): Add test cases.
20215 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20217 PR middle-end/84040
20218 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20221 2018-01-26 Jim Wilson <jimw@sifive.com>
20223 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20225 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20228 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20230 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20231 and CMP + SUB-immediate -> SUBS.
20233 2018-01-26 Martin Sebor <msebor@redhat.com>
20235 PR tree-optimization/83896
20236 * tree-ssa-strlen.c (get_string_len): Rename...
20237 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20238 Avoid assuming length is constant.
20239 (handle_char_store): Use HOST_WIDE_INT for string length.
20241 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20244 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20245 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20247 2018-01-26 Richard Biener <rguenther@suse.de>
20249 PR rtl-optimization/84003
20250 * dse.c (record_store): Only record redundant stores when
20251 the earlier store aliases at least all accesses the later one does.
20253 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20255 PR rtl-optimization/83985
20256 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20257 REG_CFA_RESTORE insns.
20258 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20259 REG_CFA_RESTORE insns here.
20262 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20263 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20265 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20267 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20268 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20269 (arc_init): Likewise.
20270 (arc_override_options): Likewise.
20271 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20273 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20275 * config/arc/arc.h (TARGET_DBNZ): Define.
20276 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20277 properly set the tune attribute.
20278 (dbnz): Use TARGET_DBNZ guard.
20279 * config/arc/arc.opt (mtune): Add core3 option.
20281 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20283 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20284 recognize new pic like addresses.
20285 (arc_delegitimize_address): Clean up.
20287 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20289 * config/arc/arc-arches.def: Option mrf16 valid for all
20291 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20292 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20293 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20294 * config/arc/arc-tables.opt: Regenerate.
20295 * config/arc/arc.c (arc_conditional_register_usage): Handle
20296 reduced register file case.
20297 (arc_file_start): Set must have build attributes.
20298 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20299 mrf16 option value.
20300 * config/arc/arc.opt (mrf16): Add new option.
20301 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20302 * config/arc/genmultilib.awk: Handle new mrf16 option.
20303 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20304 * config/arc/t-multilib: Regenerate.
20305 * doc/invoke.texi (ARC Options): Document mrf16 option.
20307 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20309 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20310 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20311 (arc_attribute_table): Add 'secure_call' attribute.
20312 (arc_print_operand): Print secure call operand.
20313 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20315 (arc_is_secure_call_p): New function. * config/arc/arc.md
20316 (call_i): Add support for sjli instruction.
20317 (call_value_i): Likewise.
20318 * config/arc/constraints.md (Csc): New constraint.
20320 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20321 John Eric Martin <John.Martin@emmicro-us.com>
20323 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20324 * config/arc/arc.c (_arc_jli_section): New struct.
20325 (arc_jli_section): New type.
20326 (rc_jli_sections): New static variable.
20327 (arc_handle_jli_attribute): New function.
20328 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20329 (arc_file_end): New function.
20330 (TARGET_ASM_FILE_END): Define.
20331 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20332 (arc_add_jli_section): New function.
20333 (jli_call_scan): Likewise.
20334 (arc_reorg): Call jli_call_scan.
20335 (arc_output_addsi): Remove 'S' from printing asm operand.
20336 (arc_is_jli_call_p): New function.
20337 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20339 (movhi_insn): Likewise.
20340 (movsi_insn): Likewise.
20341 (movsi_set_cc_insn): Likewise.
20342 (loadqi_update): Likewise.
20343 (load_zeroextendqisi_update): Likewise.
20344 (load_signextendqisi_update): Likewise.
20345 (loadhi_update): Likewise.
20346 (load_zeroextendhisi_update): Likewise.
20347 (load_signextendhisi_update): Likewise.
20348 (loadsi_update): Likewise.
20349 (loadsf_update): Likewise.
20350 (movsicc_insn): Likewise.
20351 (bset_insn): Likewise.
20352 (bxor_insn): Likewise.
20353 (bclr_insn): Likewise.
20354 (bmsk_insn): Likewise.
20355 (bicsi3_insn): Likewise.
20356 (cmpsi_cc_c_insn): Likewise.
20357 (movsi_ne): Likewise.
20358 (movsi_cond_exec): Likewise.
20359 (clrsbsi2): Likewise.
20360 (norm_f): Likewise.
20370 (call_i): Remove 'S' asm letter, add jli instruction.
20371 (call_value_i): Likewise.
20372 * config/arc/arc.op (mjli-always): New option.
20373 * config/arc/constraints.md (Cji): New constraint.
20374 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20376 (subsf3_fpx): Likewise.
20377 (mulsf3_fpx): Likewise.
20378 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20380 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20381 function attrbutes.
20382 * doc/invoke.texi (ARC): Document mjli-always option.
20384 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20386 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20387 avoid addition with 0 and use incw and decw where possible.
20389 2018-01-26 Richard Biener <rguenther@suse.de>
20391 PR tree-optimization/81082
20392 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20393 association if it requires casting to unsigned.
20394 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20395 from fold_plusminus_mult_expr to catch important cases late when
20396 range info is available.
20398 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20400 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20401 * configure.ac (hidden_linkonce): New test.
20402 * configure: Regenerate.
20403 * config.in: Regenerate.
20405 2018-01-26 Julia Koval <julia.koval@intel.com>
20407 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20408 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20409 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20410 _mm_mask_bitshuffle_epi64_mask): Fix type.
20411 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20412 USI_FTYPE_V4DI_V4DI_USI): Remove.
20413 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20414 __builtin_ia32_vpshufbitqmb256_mask,
20415 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20416 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20417 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20419 2018-01-26 Alan Modra <amodra@gmail.com>
20422 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20423 UNSPEC_VBPERMQ. Sort other unspecs.
20425 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20427 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20429 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20431 PR middle-end/83055
20432 * predict.c (drop_profile): Do not push/pop cfun; update also
20434 (handle_missing_profiles): Fix logic looking for zero profiles.
20436 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20438 PR middle-end/83977
20439 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20440 on functions with #pragma omp declare simd or functions with simd
20442 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20443 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20444 Remove trailing \n from warning_at calls.
20446 2018-01-25 Tom de Vries <tom@codesourcery.com>
20449 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20450 for neutered workers.
20452 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20455 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20456 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20458 2018-01-24 Jeff Law <law@redhat.com>
20461 * i386.c (get_probe_interval): Move to earlier point.
20462 (ix86_compute_frame_layout): If -fstack-clash-protection and
20463 the frame is larger than the probe interval, then use pushes
20464 to save registers rather than reg->mem moves.
20465 (ix86_expand_prologue): Remove conditional for int_registers_saved
20468 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20471 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20472 min/max for never referenced object.
20474 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20476 PR middle-end/83977
20477 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20479 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20480 attributes from DECL_ATTRIBUTES (decl) without affecting
20481 DECL_ATTRIBUTES (current_function_decl).
20482 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20483 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20485 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20487 PR tree-optimization/83979
20488 * fold-const.c (fold_comparison): Use constant_boolean_node
20489 instead of boolean_{true,false}_node.
20491 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20493 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20496 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20498 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20499 Simplify the clause that sets the length attribute.
20500 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20501 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20502 clause that sets the length attribute.
20503 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20505 2018-01-24 Tom de Vries <tom@codesourcery.com>
20508 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20509 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20510 Add strict parameter.
20511 (prevent_branch_around_nothing): Insert dummy insn between branch to
20512 label and label with no ptx insn inbetween.
20513 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20515 2018-01-24 Tom de Vries <tom@codesourcery.com>
20518 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20519 for neutered threads in warp.
20520 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20522 2018-01-24 Richard Biener <rguenther@suse.de>
20524 PR tree-optimization/83176
20525 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20528 2018-01-24 Richard Biener <rguenther@suse.de>
20530 PR tree-optimization/82819
20531 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20532 code generating pluses that are no-ops in the target precision.
20534 2018-01-24 Richard Biener <rguenther@suse.de>
20536 PR middle-end/84000
20537 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20539 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20541 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20542 to merge probabilities.
20543 * predict.c (probably_never_executed): Also mark as cold functions
20544 with global 0 profile and guessed local profile.
20545 * profile-count.c (profile_probability::combine_with_count): New
20547 * profile-count.h (profile_probability::operator*,
20548 profile_probability::operator*=, profile_probability::operator/,
20549 profile_probability::operator/=): Reduce precision to adjusted
20550 and set value to guessed on contradictory divisions.
20551 (profile_probability::combine_with_freq): Remove.
20552 (profile_probability::combine_wiht_count): Declare.
20553 (profile_count::force_nonzero):: Set to adjusted.
20554 (profile_count::probability_in):: Set quality to adjusted.
20555 * tree-ssa-tail-merge.c (replace_block_by): Use
20556 combine_with_count.
20558 2018-01-23 Andrew Waterman <andrew@sifive.com>
20559 Jim Wilson <jimw@sifive.com>
20561 * config/riscv/riscv.c (riscv_stack_boundary): New.
20562 (riscv_option_override): Set riscv_stack_boundary. Handle
20563 riscv_preferred_stack_boundary_arg.
20564 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20565 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20566 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20567 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20568 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20569 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20571 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20574 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20575 of struct ix86_frame.
20576 (ix86_expand_epilogue): Likewise. Add a local variable for
20577 the reg_save_offset field in struct ix86_frame.
20579 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20581 PR tree-optimization/82604
20582 * tree-loop-distribution.c (enum partition_kind): New enum item
20583 PKIND_PARTIAL_MEMSET.
20584 (partition_builtin_p): Support above new enum item.
20585 (generate_code_for_partition): Ditto.
20586 (compute_access_range): Differentiate cases that equality can be
20587 proven at all loops, the innermost loops or no loops.
20588 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20589 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20590 (finalize_partitions, distribute_loop): Don't fuse partition of
20591 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20592 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20593 parloop is enabled.
20595 2018-01-23 Martin Liska <mliska@suse.cz>
20597 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20598 order to ignore the predictor.
20599 (PRED_POLYMORPHIC_CALL): Likewise.
20600 (PRED_RECURSIVE_CALL): Likewise.
20602 2018-01-23 Martin Liska <mliska@suse.cz>
20604 * tree-profile.c (tree_profiling): Print function header to
20605 aware reader which function we are working on.
20606 * value-prof.c (gimple_find_values_to_profile): Do not print
20607 not interesting value histograms.
20609 2018-01-23 Martin Liska <mliska@suse.cz>
20611 * profile-count.h (enum profile_quality): Add
20612 profile_uninitialized as the first value. Do not number values
20613 as they are zero based.
20614 (profile_count::verify): Update sanity check.
20615 (profile_probability::verify): Likewise.
20617 2018-01-23 Nathan Sidwell <nathan@acm.org>
20619 * doc/invoke.texi (ffor-scope): Deprecate.
20621 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20623 PR tree-optimization/83510
20624 * domwalk.c (set_all_edges_as_executable): New function.
20625 (dom_walker::dom_walker): Convert bool param
20626 "skip_unreachable_blocks" to enum reachability. Move setup of
20627 edge flags to set_all_edges_as_executable and only do it when
20628 reachability is REACHABLE_BLOCKS.
20629 * domwalk.h (enum dom_walker::reachability): New enum.
20630 (dom_walker::dom_walker): Convert bool param
20631 "skip_unreachable_blocks" to enum reachability.
20632 (set_all_edges_as_executable): New decl.
20633 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20634 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20636 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20637 but converting true to REACHABLE_BLOCKS.
20638 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20640 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20641 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20642 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20644 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20645 if check_all_array_refs will be called.
20647 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20649 * tree.c (selftest::test_location_wrappers): Add more test
20652 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20654 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20655 (selftest::test_bit_in_range): Likewise.
20657 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20660 * doc/sourcebuild.texi (vect_float): Say that the selector
20661 only describes the situation when -funsafe-math-optimizations is on.
20662 (vect_float_strict): Document.
20664 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20666 PR tree-optimization/83965
20667 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20668 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20669 instead of checking only for a reduction.
20670 (vect_recog_widen_sum_pattern): Likewise.
20672 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20674 * predict.c (probably_never_executed): Only use precise profile info.
20675 (compute_function_frequency): Skip after inlining hack since we now
20676 have quality checking.
20678 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20680 * profile-count.h (profile_probability::very_unlikely,
20681 profile_probability::unlikely, profile_probability::even): Set
20682 precision to guessed.
20684 2018-01-23 Richard Biener <rguenther@suse.de>
20686 PR tree-optimization/83963
20687 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20688 Properly terminate dominator walk when crossing the exit edge not
20689 when visiting its source block.
20691 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20694 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20695 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20697 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20699 PR tree-optimization/83957
20700 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20701 semicolon after for body surrounded by braces.
20703 PR tree-optimization/83081
20704 * profile-count.h (profile_probability::split): New method.
20705 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20706 Use profile_probability::split.
20707 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20708 when splitting a single conditional jump into 2.
20710 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20712 PR tree-optimization/69452
20713 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20716 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20718 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20719 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20720 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20722 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20724 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20726 * config/rl78/rl78.md (movdi): New define_expand.
20727 * config/rl78/rl78.c (rl78_split_movdi): New function.
20729 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20732 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20734 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20735 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20736 128-bit to produce an UNSPEC move to get the double word with the
20737 signbit and then a shift directly to do signbit.
20738 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20739 implementation with a new version that just does either a direct
20740 move or a regular move. Move memory interface to separate insns.
20741 Move insns so they are next to the expander.
20742 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20743 with signbit move. Split big and little endian case.
20744 (signbit<mode>2_dm_mem_le): Likewise.
20745 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20746 (signbit<mode>2_dm2): Likewise.
20748 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20750 * config/rl78/rl78.md (anddi3): New define_expand.
20752 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20754 * config/rl78/rl78.md (umindi3): New define_expand.
20756 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20758 * config/rl78/rl78.md (smindi3): New define_expand.
20760 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20762 * config/rl78/rl78.md (smaxdi3): New define_expand.
20764 2018-01-22 Carl Love <cel@us.ibm.com>
20766 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20767 LVX_V1TI): Add macro expansion.
20768 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20769 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20770 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20771 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20772 Change check to determine if the instruction is a byte reversing
20773 entry. Fix typo in comment.
20774 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20775 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20776 Add def_builtin calls for new builtins.
20777 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20778 Add define_insn expansion.
20780 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20782 * config/rl78/rl78.md (umaxdi3): New define_expand.
20784 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20786 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20787 for non-QImode registers.
20789 2018-01-22 Richard Biener <rguenther@suse.de>
20791 PR tree-optimization/83963
20792 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20793 including the loop exit block.
20794 (scop_detection::merge_sese): Likewise.
20795 (scop_detection::add_scop): Do it here instead.
20797 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20799 * doc/sourcebuild.texi (arm_softfloat): Document.
20801 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20804 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20805 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20806 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20808 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20809 David Edelsohn <dje.gcc@gmail.com>
20812 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20813 Change "crset eq" to "crset 2".
20814 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20815 (*call_indirect_aix<mode>_nospec): Likewise.
20816 (*call_value_indirect_aix<mode>_nospec): Likewise.
20817 (*call_indirect_elfv2<mode>_nospec): Likewise.
20818 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20819 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20820 change assembly output from . to $.
20821 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20822 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20823 (*tablejump<mode>_internal1_nospec): Likewise.
20825 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20828 * config/sh/sh_optimize_sett_clrt.cc:
20829 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20831 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20833 PR tree-optimization/83940
20834 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20835 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20836 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20837 use it to pass back the definition type.
20838 (vect_check_store_rhs): Likewise rhs_dt_out.
20839 (vect_build_gather_load_calls): Add a mask_dt argument and use
20840 it instead of a call to vect_is_simple_use.
20841 (vectorizable_store): Update calls to vect_check_load_store_mask
20842 and vect_check_store_rhs. Use the dt returned by the latter instead
20843 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20844 instead of calls to vect_is_simple_use. Pass the scalar rather
20845 than the vector operand to vect_is_simple_use when handling
20846 second and subsequent copies of an rhs value.
20847 (vectorizable_load): Update calls to vect_check_load_store_mask
20848 and vect_build_gather_load_calls. Use the cached mask_dt and
20849 gs_info.offset_dt instead of calls to vect_is_simple_use.
20851 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20853 PR middle-end/83945
20854 * tree-emutls.c: Include gimplify.h.
20855 (lower_emutls_2): New function.
20856 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20857 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20858 it before further processing.
20861 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20862 UINTVAL (trueop1) instead of INTVAL (op1).
20864 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20868 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20869 INCOMING_FRAME_SP_OFFSET if not defined.
20870 (scan_trace): Add ENTRY argument. If true and
20871 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20872 emit a note to adjust the CFA offset.
20873 (create_cfi_notes): Adjust scan_trace callers.
20874 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20875 INCOMING_FRAME_SP_OFFSET in the CIE.
20876 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20877 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20879 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20880 * doc/tm.texi: Regenerated.
20882 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20884 PR rtl-optimization/83147
20885 * lra-constraints.c (remove_inheritance_pseudos): Use
20886 lra_substitute_pseudo_within_insn.
20888 2018-01-19 Tom de Vries <tom@codesourcery.com>
20889 Cesar Philippidis <cesar@codesourcery.com>
20892 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20894 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20897 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20898 spaces for function labels.
20900 2018-01-19 Martin Liska <mliska@suse.cz>
20902 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20903 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20904 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20905 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20906 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20907 (PRED_CONST_RETURN): Change from 69 to 65.
20908 (PRED_NULL_RETURN): Change from 91 to 71.
20909 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20910 (PRED_LOOP_GUARD): Change from 66 to 73.
20912 2018-01-19 Martin Liska <mliska@suse.cz>
20914 * predict.c (predict_insn_def): Add new assert.
20915 (struct branch_predictor): Change type to signed integer.
20916 (test_prediction_value_range): Amend test to cover
20917 PROB_UNINITIALIZED.
20918 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20919 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20920 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20921 (PRED_LOOP_IV_COMPARE): Likewise.
20922 * predict.h (PROB_UNINITIALIZED): Define new constant.
20924 2018-01-19 Martin Liska <mliska@suse.cz>
20926 * predict.c (dump_prediction): Add new format for
20927 analyze_brprob.py script which is enabled with -details
20929 * profile-count.h (precise_p): New function.
20931 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20933 PR tree-optimization/83922
20934 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20935 there are no statements that need masking.
20936 (vect_active_double_reduction_p): New function.
20937 (vect_analyze_loop_operations): Use it when handling phis that
20938 are not in the loop header.
20940 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20942 PR tree-optimization/83914
20943 * tree-vect-loop.c (vectorizable_induction): Don't convert
20944 init_expr or apply the peeling adjustment for inductions
20945 that are nested within the vectorized loop.
20947 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20949 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20952 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20956 * function.h (gimplify_parameters): Add gimple_seq * argument.
20957 * function.c: Include gimple.h and options.h.
20958 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20959 for the added local temporaries if needed.
20960 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20961 if there are any parameter cleanups, wrap whole body into a
20962 try/finally with the cleanups.
20964 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20967 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20968 Use GET_MODE_CLASS for scalar floating point.
20970 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20974 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20975 Fix call of call_cgraph_insertion_hooks.
20977 2018-01-18 Martin Sebor <msebor@redhat.com>
20979 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20981 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20984 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20987 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20990 * common.opt: (-ffile-prefix-map): New option.
20991 * opts.c (common_handle_option): Defer it.
20992 * opts-global.c (handle_common_deferred_options): Handle it.
20993 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20994 * file-prefix-map.h: New file.
20995 (remap_debug_filename, add_debug_prefix_map): ...here.
20996 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20997 * final.c (debug_prefix_map, add_debug_prefix_map
20998 remap_debug_filename): Move to...
20999 * file-prefix-map.c: New file.
21000 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21001 generalize, get rid of alloca(), use strrchr() instead of strchr().
21002 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21003 Implement in terms of add_prefix_map().
21004 (remap_macro_filename, remap_debug_filename): Implement in term of
21006 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21007 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21008 * dbxout.c: Include file-prefix-map.h.
21009 * varasm.c: Likewise.
21010 * vmsdbgout.c: Likewise.
21011 * xcoffout.c: Likewise.
21012 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21013 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21014 * doc/invoke.texi (-ffile-prefix-map): Document.
21015 (-fdebug-prefix-map): Update description.
21017 2018-01-18 Martin Liska <mliska@suse.cz>
21019 * config/i386/i386.c (indirect_thunk_name): Document that also
21021 (output_indirect_thunk): Document why both instructions
21022 (pause and lfence) are generated.
21024 2018-01-18 Richard Biener <rguenther@suse.de>
21026 PR tree-optimization/83887
21027 * graphite-scop-detection.c
21028 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21029 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21030 (scop_detection::merge_sese): Re-implement with a flood-fill
21031 algorithm that properly finds a SESE region if it exists.
21033 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21036 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21037 pointer_diff optimizations use view_convert instead of convert.
21039 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21041 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21042 Generate different code for -mno-speculate-indirect-jumps.
21043 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21044 (*call_indirect_aix<mode>): Disable for
21045 -mno-speculate-indirect-jumps.
21046 (*call_indirect_aix<mode>_nospec): New define_insn.
21047 (*call_value_indirect_aix<mode>): Disable for
21048 -mno-speculate-indirect-jumps.
21049 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21050 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21051 -mno-speculate-indirect-jumps.
21052 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21054 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21056 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21057 long double type, set the flags for noting the default long double
21058 type, even if we don't pass or return a long double type.
21060 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21063 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21066 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21068 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21069 support for merge[hl].
21070 (fold_mergehl_helper): New helper function.
21071 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21072 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21073 (altivec_vmrglw_direct): Add xxmrglw insn.
21075 2018-01-17 Andrew Waterman <andrew@sifive.com>
21077 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21078 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21080 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21083 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21084 call the lto_location_cache before reading the
21085 DECL_SOURCE_LOCATION of the types.
21087 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21088 Richard Sandiford <richard.sandiford@linaro.org>
21090 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21091 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21092 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21093 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21094 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21096 * config/aarch64/constraints.md (aarch64_movti_operand):
21098 * config/aarch64/predicates.md (Uti): Add new constraint.
21100 2018-01-17 Carl Love <cel@us.ibm.com>
21102 * config/rs6000/vsx.md (define_expand xl_len_r,
21103 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21104 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21106 (define_expand, define_insn): Move the shift left from the
21107 define_insn to the define_expand for lxvl and stxvl instructions.
21108 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21109 and XL_LEN_R definitions to PURE.
21111 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21113 * config/i386/i386.c (indirect_thunk_name): Declare regno
21114 as unsigned int. Compare regno with INVALID_REGNUM.
21115 (output_indirect_thunk): Ditto.
21116 (output_indirect_thunk_function): Ditto.
21117 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21118 in the call to output_indirect_thunk_function.
21120 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21122 PR middle-end/83884
21123 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21124 rather than the size of inner_type to determine the stack slot size
21125 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21127 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21130 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21133 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21135 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21136 endian Linux systems to optionally enable multilibs for selecting
21137 the long double type if the user configured an explicit type.
21138 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21139 have no long double multilibs if not defined.
21140 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21141 warn if the user used -mabi={ieee,ibm}longdouble and we built
21142 multilibs for long double.
21143 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21144 appropriate multilib option.
21145 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21147 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21148 for building long double multilibs.
21149 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21151 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21153 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21156 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21158 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21161 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21164 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21167 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21169 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21170 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21172 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21174 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21175 different rtl trees depending on TARGET_64BIT.
21176 (rs6000_gen_lvx): Likewise.
21178 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21180 * config/visium/visium.md (nop): Tweak comment.
21181 (hazard_nop): Likewise.
21183 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21185 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21186 -mspeculate-indirect-jumps.
21187 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21188 for -mno-speculate-indirect-jumps.
21189 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21190 (*call_value_indirect_elfv2<mode>): Disable for
21191 -mno-speculate-indirect-jumps.
21192 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21193 (indirect_jump): Emit different RTL for
21194 -mno-speculate-indirect-jumps.
21195 (*indirect_jump<mode>): Disable for
21196 -mno-speculate-indirect-jumps.
21197 (*indirect_jump<mode>_nospec): New define_insn.
21198 (tablejump): Emit different RTL for
21199 -mno-speculate-indirect-jumps.
21200 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21201 (tablejumpsi_nospec): New define_expand.
21202 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21203 (tablejumpdi_nospec): New define_expand.
21204 (*tablejump<mode>_internal1): Disable for
21205 -mno-speculate-indirect-jumps.
21206 (*tablejump<mode>_internal1_nospec): New define_insn.
21207 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21210 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21212 * caller-save.c (insert_save): Drop unnecessary parameter. All
21215 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21216 Richard Biener <rguenth@suse.de>
21219 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21220 return early, inline manually is_gimple_sizepos. Make sure if we
21221 call gimplify_expr we don't end up with a gimple constant.
21222 * tree.c (variably_modified_type_p): Don't return true for
21223 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21224 * gimplify.h (is_gimple_sizepos): Remove.
21226 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21228 PR tree-optimization/83857
21229 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21230 vectorizable_live_operation for pure SLP statements.
21231 (vectorizable_live_operation): Handle PHIs.
21233 2018-01-16 Richard Biener <rguenther@suse.de>
21235 PR tree-optimization/83867
21236 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21237 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21239 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21242 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21243 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21244 If off is not INTEGER_CST, issue a may not be aligned warning
21245 rather than isn't aligned. Use isn%'t rather than isn't.
21246 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21248 <case MULT_EXPR>: Improve the case when bottom and one of the
21249 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21250 operand, in that case check if the other operand is multiple of
21251 bottom divided by the INTEGER_CST operand.
21253 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21256 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21257 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21258 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21259 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21260 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21261 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21262 (pa_function_arg_size): New function.
21264 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21266 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21267 in a separate statement.
21269 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21271 PR tree-optimization/83847
21272 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21273 group gathers and scatters.
21275 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21277 PR rtl-optimization/86620
21278 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21280 PR rtl-optimization/83213
21281 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21282 to last if both are JUMP_INSNs.
21284 PR tree-optimization/83843
21285 * gimple-ssa-store-merging.c
21286 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21287 store_immediate_info for bswap/nop orig_stores.
21289 2018-01-15 Andrew Waterman <andrew@sifive.com>
21291 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21293 <UDIV>: Increase cost if !TARGET_DIV.
21295 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21297 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21298 (define_attr "cr_logical_3op"): New.
21299 (cceq_ior_compare): Adjust.
21300 (cceq_ior_compare_complement): Adjust.
21301 (*cceq_rev_compare): Adjust.
21302 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21303 (is_cracked_insn): Adjust.
21304 (insn_must_be_first_in_group): Adjust.
21305 * config/rs6000/40x.md: Adjust.
21306 * config/rs6000/440.md: Adjust.
21307 * config/rs6000/476.md: Adjust.
21308 * config/rs6000/601.md: Adjust.
21309 * config/rs6000/603.md: Adjust.
21310 * config/rs6000/6xx.md: Adjust.
21311 * config/rs6000/7450.md: Adjust.
21312 * config/rs6000/7xx.md: Adjust.
21313 * config/rs6000/8540.md: Adjust.
21314 * config/rs6000/cell.md: Adjust.
21315 * config/rs6000/e300c2c3.md: Adjust.
21316 * config/rs6000/e500mc.md: Adjust.
21317 * config/rs6000/e500mc64.md: Adjust.
21318 * config/rs6000/e5500.md: Adjust.
21319 * config/rs6000/e6500.md: Adjust.
21320 * config/rs6000/mpc.md: Adjust.
21321 * config/rs6000/power4.md: Adjust.
21322 * config/rs6000/power5.md: Adjust.
21323 * config/rs6000/power6.md: Adjust.
21324 * config/rs6000/power7.md: Adjust.
21325 * config/rs6000/power8.md: Adjust.
21326 * config/rs6000/power9.md: Adjust.
21327 * config/rs6000/rs64.md: Adjust.
21328 * config/rs6000/titan.md: Adjust.
21330 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21332 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21333 ix86_indirect_branch_register logic.
21335 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21337 * config/i386/constraints.md (Bs): Update
21338 ix86_indirect_branch_register check. Don't check
21339 ix86_indirect_branch_register with GOT_memory_operand.
21341 * config/i386/predicates.md (GOT_memory_operand): Don't check
21342 ix86_indirect_branch_register here.
21343 (GOT32_symbol_operand): Likewise.
21345 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21347 * config/i386/predicates.md (constant_call_address_operand):
21348 Rewrite ix86_indirect_branch_register logic.
21349 (sibcall_insn_operand): Likewise.
21351 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21353 * config/i386/constraints.md (Bs): Replace
21354 ix86_indirect_branch_thunk_register with
21355 ix86_indirect_branch_register.
21357 * config/i386/i386.md (indirect_jump): Likewise.
21358 (tablejump): Likewise.
21359 (*sibcall_memory): Likewise.
21360 (*sibcall_value_memory): Likewise.
21361 Peepholes of indirect call and jump via memory: Likewise.
21362 * config/i386/i386.opt: Likewise.
21363 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21364 (GOT_memory_operand): Likewise.
21365 (call_insn_operand): Likewise.
21366 (sibcall_insn_operand): Likewise.
21367 (GOT32_symbol_operand): Likewise.
21369 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21371 PR middle-end/83837
21372 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21373 type rather than type addr's type points to.
21374 (expand_omp_atomic_mutex): Likewise.
21375 (expand_omp_atomic): Likewise.
21377 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21380 * config/i386/i386.c (output_indirect_thunk_function): Use
21381 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21382 for __x86_return_thunk.
21384 2018-01-15 Richard Biener <rguenther@suse.de>
21386 PR middle-end/83850
21387 * expmed.c (extract_bit_field_1): Fix typo.
21389 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21392 * config/arm/iterators.md (VF): New mode iterator.
21393 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21394 Remove integer-related logic from pattern.
21395 (neon_vabd<mode>_3): Likewise.
21397 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21399 PR middle-end/82694
21400 * common.opt (fstrict-overflow): No longer an alias.
21401 (fwrapv-pointer): New option.
21402 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21403 also for pointer types based on flag_wrapv_pointer.
21404 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21405 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21406 opts->x_flag_wrapv got set.
21407 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21408 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21409 POINTER_TYPE_OVERFLOW_UNDEFINED.
21410 * match.pd: Likewise in address comparison pattern.
21411 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21413 2018-01-15 Richard Biener <rguenther@suse.de>
21416 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21417 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21418 Reset type names to their identifier if their TYPE_DECL doesn't
21419 have linkage (and thus is used for ODR and devirt).
21420 (save_debug_info_for_decl): Remove.
21421 (save_debug_info_for_type): Likewise.
21422 (add_tree_to_fld_list): Adjust.
21423 * tree-pretty-print.c (dump_generic_node): Make dumping of
21424 type names more robust.
21426 2018-01-15 Richard Biener <rguenther@suse.de>
21428 * BASE-VER: Bump to 8.0.1.
21430 2018-01-14 Martin Sebor <msebor@redhat.com>
21433 * builtins.c (check_access): Avoid warning when the no-warning bit
21436 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21438 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21439 * ira-color (allocno_hard_regs_compare): Likewise.
21441 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21444 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21445 Use .pushsection/.popsection.
21447 2018-01-14 Martin Sebor <msebor@redhat.com>
21450 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21452 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21454 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21455 entry from extra_headers.
21456 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21457 extra_headers, make the list bitwise identical to the i?86-*-* one.
21459 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21461 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21462 -mcmodel=large with -mindirect-branch=thunk,
21463 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21464 -mfunction-return=thunk-extern.
21465 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21466 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21467 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21469 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21471 * config/i386/i386.c (print_reg): Print the name of the full
21472 integer register without '%'.
21473 (ix86_print_operand): Handle 'V'.
21474 * doc/extend.texi: Document 'V' modifier.
21476 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21478 * config/i386/constraints.md (Bs): Disallow memory operand for
21479 -mindirect-branch-register.
21481 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21482 (GOT_memory_operand): Likewise.
21483 (call_insn_operand): Likewise.
21484 (sibcall_insn_operand): Likewise.
21485 (GOT32_symbol_operand): Likewise.
21486 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21487 for -mindirect-branch-register.
21488 (tablejump): Likewise.
21489 (*sibcall_memory): Likewise.
21490 (*sibcall_value_memory): Likewise.
21491 Disallow peepholes of indirect call and jump via memory for
21492 -mindirect-branch-register.
21493 (*call_pop): Replace m with Bw.
21494 (*call_value_pop): Likewise.
21495 (*sibcall_pop_memory): Replace m with Bs.
21496 * config/i386/i386.opt (mindirect-branch-register): New option.
21497 * doc/invoke.texi: Document -mindirect-branch-register option.
21499 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21501 * config/i386/i386-protos.h (ix86_output_function_return): New.
21502 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21503 set function_return_type.
21504 (indirect_thunk_name): Add ret_p to indicate thunk for function
21506 (output_indirect_thunk_function): Pass false to
21507 indirect_thunk_name.
21508 (ix86_output_indirect_branch_via_reg): Likewise.
21509 (ix86_output_indirect_branch_via_push): Likewise.
21510 (output_indirect_thunk_function): Create alias for function
21511 return thunk if regno < 0.
21512 (ix86_output_function_return): New function.
21513 (ix86_handle_fndecl_attribute): Handle function_return.
21514 (ix86_attribute_table): Add function_return.
21515 * config/i386/i386.h (machine_function): Add
21516 function_return_type.
21517 * config/i386/i386.md (simple_return_internal): Use
21518 ix86_output_function_return.
21519 (simple_return_internal_long): Likewise.
21520 * config/i386/i386.opt (mfunction-return=): New option.
21521 (indirect_branch): Mention -mfunction-return=.
21522 * doc/extend.texi: Document function_return function attribute.
21523 * doc/invoke.texi: Document -mfunction-return= option.
21525 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21527 * config/i386/i386-opts.h (indirect_branch): New.
21528 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21529 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21530 with local indirect jump when converting indirect call and jump.
21531 (ix86_set_indirect_branch_type): New.
21532 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21533 (indirectlabelno): New.
21534 (indirect_thunk_needed): Likewise.
21535 (indirect_thunk_bnd_needed): Likewise.
21536 (indirect_thunks_used): Likewise.
21537 (indirect_thunks_bnd_used): Likewise.
21538 (INDIRECT_LABEL): Likewise.
21539 (indirect_thunk_name): Likewise.
21540 (output_indirect_thunk): Likewise.
21541 (output_indirect_thunk_function): Likewise.
21542 (ix86_output_indirect_branch_via_reg): Likewise.
21543 (ix86_output_indirect_branch_via_push): Likewise.
21544 (ix86_output_indirect_branch): Likewise.
21545 (ix86_output_indirect_jmp): Likewise.
21546 (ix86_code_end): Call output_indirect_thunk_function if needed.
21547 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21549 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21550 (ix86_attribute_table): Add indirect_branch.
21551 * config/i386/i386.h (machine_function): Add indirect_branch_type
21552 and has_local_indirect_jump.
21553 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21555 (tablejump): Likewise.
21556 (*indirect_jump): Use ix86_output_indirect_jmp.
21557 (*tablejump_1): Likewise.
21558 (simple_return_indirect_internal): Likewise.
21559 * config/i386/i386.opt (mindirect-branch=): New option.
21560 (indirect_branch): New.
21563 (thunk-inline): Likewise.
21564 (thunk-extern): Likewise.
21565 * doc/extend.texi: Document indirect_branch function attribute.
21566 * doc/invoke.texi: Document -mindirect-branch= option.
21568 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21571 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21573 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21575 * ipa-inline.c (want_inline_small_function_p): Return false if
21576 inlining has already failed with CIF_FINAL_ERROR.
21577 (update_caller_keys): Call want_inline_small_function_p before
21579 (update_callee_keys): Likewise.
21581 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21583 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21585 (rs6000_quadword_masked_address_p): Likewise.
21586 (quad_aligned_load_p): Likewise.
21587 (quad_aligned_store_p): Likewise.
21588 (const_load_sequence_p): Add comment to describe the outer-most loop.
21589 (mimic_memory_attributes_and_flags): New function.
21590 (rs6000_gen_stvx): Likewise.
21591 (replace_swapped_aligned_store): Likewise.
21592 (rs6000_gen_lvx): Likewise.
21593 (replace_swapped_aligned_load): Likewise.
21594 (replace_swapped_load_constant): Capitalize argument name in
21595 comment describing this function.
21596 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21597 and stores that access quad-word aligned addresses and replace
21598 with stvx or lvx instructions when appropriate.
21599 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21600 New function prototype.
21601 (rs6000_quadword_masked_address_p): Likewise.
21602 (rs6000_gen_lvx): Likewise.
21603 (rs6000_gen_stvx): Likewise.
21604 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21605 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21606 when memory address is aligned.
21607 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21608 this split to select lvx instruction when memory address is aligned.
21609 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21610 instruction when memory address is aligned.
21611 (*vsx_le_perm_load_v16qi): Likewise.
21612 (four unnamed splitters): Modify to select the stvx instruction
21613 when memory is aligned.
21615 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21617 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21618 which appears in the queue multiple times.
21620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21621 Alan Hayward <alan.hayward@arm.com>
21622 David Sherwood <david.sherwood@arm.com>
21624 * tree-vectorizer.h (vec_lower_bound): New structure.
21625 (_loop_vec_info): Add check_nonzero and lower_bounds.
21626 (LOOP_VINFO_CHECK_NONZERO): New macro.
21627 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21628 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21629 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21630 fields. Make seg_len the distance travelled, not including the
21632 (dr_direction_indicator): Declare.
21633 (dr_zero_step_indicator): Likewise.
21634 (dr_known_forward_stride_p): Likewise.
21635 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21637 (runtime_alias_check_p): Allow runtime alias checks with
21639 (operator ==): Compare access_size and align.
21640 (prune_runtime_alias_test_list): Rework for new distinction between
21641 the access_size and seg_len.
21642 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21644 (get_segment_min_max): New function.
21645 (create_intersect_range_checks): Use it.
21646 (dr_step_indicator): New function.
21647 (dr_direction_indicator): Likewise.
21648 (dr_zero_step_indicator): Likewise.
21649 (dr_known_forward_stride_p): Likewise.
21650 * tree-loop-distribution.c (data_ref_segment_size): Return
21651 DR_STEP * (niters - 1).
21652 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21654 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21655 (vect_preserves_scalar_order_p): New function, split out from...
21656 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21657 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21658 (vect_vfa_access_size): New function.
21659 (vect_vfa_align): Likewise.
21660 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21661 (dump_lower_bound): New function.
21662 (vect_check_lower_bound): Likewise.
21663 (vect_small_gap_p): Likewise.
21664 (vectorizable_with_step_bound_p): Likewise.
21665 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21666 depencies if the vectorization factor is 1. Convert the checks
21667 for nonzero steps into checks on the bounds of DR_STEP. Try using
21668 a bunds check for variable steps if the minimum required step is
21669 relatively small. Update calls to the dr_with_seg_len
21670 constructor and to vect_compile_time_alias.
21671 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21673 (vect_loop_versioning): Call it.
21674 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21676 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21678 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21679 Alan Hayward <alan.hayward@arm.com>
21680 David Sherwood <david.sherwood@arm.com>
21682 * doc/sourcebuild.texi (vect_scatter_store): Document.
21683 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21685 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21687 * genopinit.c (main): Add supports_vec_scatter_store and
21688 supports_vec_scatter_store_cached to target_optabs.
21689 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21690 IFN_MASK_SCATTER_STORE.
21691 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21693 * internal-fn.h (internal_store_fn_p): Declare.
21694 (internal_fn_stored_value_index): Likewise.
21695 * internal-fn.c (scatter_store_direct): New macro.
21696 (expand_scatter_store_optab_fn): New function.
21697 (direct_scatter_store_optab_supported_p): New macro.
21698 (internal_store_fn_p): New function.
21699 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21700 IFN_MASK_SCATTER_STORE.
21701 (internal_fn_mask_index): Likewise.
21702 (internal_fn_stored_value_index): New function.
21703 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21704 for scatter stores.
21705 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21706 * optabs-query.c (supports_vec_scatter_store_p): New function.
21707 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21708 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21709 true for scatter stores.
21710 (vect_gather_scatter_fn_p): Handle scatter stores too.
21711 (vect_check_gather_scatter): Consider using scatter stores if
21712 supports_vec_scatter_store_p.
21713 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21714 scatter stores too.
21715 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21716 internal_fn_stored_value_index.
21717 (check_load_store_masking): Handle scatter stores too.
21718 (vect_get_store_rhs): Make public.
21719 (vectorizable_call): Use internal_store_fn_p.
21720 (vectorizable_store): Handle scatter store internal functions.
21721 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21722 when deciding whether the end of the group has been reached.
21723 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21724 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21725 (mask_scatter_store<mode>): New insns.
21727 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21728 Alan Hayward <alan.hayward@arm.com>
21729 David Sherwood <david.sherwood@arm.com>
21731 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21732 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21733 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21735 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21736 Use vect_truncate_gather_scatter_offset if we can't treat the
21737 operation as a normal gather load or scatter store.
21738 (get_group_load_store_type): Take the gather_scatter_info
21739 as argument. Try using a gather load or scatter store for
21740 single-element groups.
21741 (get_load_store_type): Update calls to get_group_load_store_type
21742 and vect_use_strided_gather_scatters_p.
21744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21745 Alan Hayward <alan.hayward@arm.com>
21746 David Sherwood <david.sherwood@arm.com>
21748 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21749 optional tree argument.
21750 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21752 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21753 but continue to use the current value as a fallback.
21754 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21755 to compare the updates.
21756 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21757 (get_load_store_type): Use it when handling a strided access.
21758 (vect_get_strided_load_store_ops): New function.
21759 (vect_get_data_ptr_increment): Likewise.
21760 (vectorizable_load): Handle strided gather loads. Always pass
21761 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21764 Alan Hayward <alan.hayward@arm.com>
21765 David Sherwood <david.sherwood@arm.com>
21767 * doc/md.texi (gather_load@var{m}): Document.
21768 (mask_gather_load@var{m}): Likewise.
21769 * genopinit.c (main): Add supports_vec_gather_load and
21770 supports_vec_gather_load_cached to target_optabs.
21771 * optabs-tree.c (init_tree_optimization_optabs): Use
21772 ggc_cleared_alloc to allocate target_optabs.
21773 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21774 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21776 * internal-fn.h (internal_load_fn_p): Declare.
21777 (internal_gather_scatter_fn_p): Likewise.
21778 (internal_fn_mask_index): Likewise.
21779 (internal_gather_scatter_fn_supported_p): Likewise.
21780 * internal-fn.c (gather_load_direct): New macro.
21781 (expand_gather_load_optab_fn): New function.
21782 (direct_gather_load_optab_supported_p): New macro.
21783 (direct_internal_fn_optab): New function.
21784 (internal_load_fn_p): Likewise.
21785 (internal_gather_scatter_fn_p): Likewise.
21786 (internal_fn_mask_index): Likewise.
21787 (internal_gather_scatter_fn_supported_p): Likewise.
21788 * optabs-query.c (supports_at_least_one_mode_p): New function.
21789 (supports_vec_gather_load_p): Likewise.
21790 * optabs-query.h (supports_vec_gather_load_p): Declare.
21791 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21792 and memory_type field.
21793 (NUM_PATTERNS): Bump to 15.
21794 * tree-vect-data-refs.c: Include internal-fn.h.
21795 (vect_gather_scatter_fn_p): New function.
21796 (vect_describe_gather_scatter_call): Likewise.
21797 (vect_check_gather_scatter): Try using internal functions for
21798 gather loads. Recognize existing calls to a gather load function.
21799 (vect_analyze_data_refs): Consider using gather loads if
21800 supports_vec_gather_load_p.
21801 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21802 (vect_get_gather_scatter_offset_type): Likewise.
21803 (vect_convert_mask_for_vectype): Likewise.
21804 (vect_add_conversion_to_patterm): Likewise.
21805 (vect_try_gather_scatter_pattern): Likewise.
21806 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21807 (vect_vect_recog_func_ptrs): Add it.
21808 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21809 internal_fn_mask_index and internal_gather_scatter_fn_p.
21810 (check_load_store_masking): Take the gather_scatter_info as an
21811 argument and handle gather loads.
21812 (vect_get_gather_scatter_ops): New function.
21813 (vectorizable_call): Check internal_load_fn_p.
21814 (vectorizable_load): Likewise. Handle gather load internal
21816 (vectorizable_store): Update call to check_load_store_masking.
21817 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21818 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21819 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21820 (aarch64_gather_scale_operand_d): New predicates.
21821 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21822 (mask_gather_load<mode>): New insns.
21824 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21825 Alan Hayward <alan.hayward@arm.com>
21826 David Sherwood <david.sherwood@arm.com>
21828 * optabs.def (fold_left_plus_optab): New optab.
21829 * doc/md.texi (fold_left_plus_@var{m}): Document.
21830 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21831 * internal-fn.c (fold_left_direct): Define.
21832 (expand_fold_left_optab_fn): Likewise.
21833 (direct_fold_left_optab_supported_p): Likewise.
21834 * fold-const-call.c (fold_const_fold_left): New function.
21835 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21836 * tree-parloops.c (valid_reduction_p): New function.
21837 (gather_scalar_reductions): Use it.
21838 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21839 (vect_finish_replace_stmt): Declare.
21840 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21841 (needs_fold_left_reduction_p): New function, split out from...
21842 (vect_is_simple_reduction): ...here. Accept reductions that
21843 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21844 (vect_force_simple_reduction): Also store the reduction type in
21845 the assignment's STMT_VINFO_REDUC_TYPE.
21846 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21847 (merge_with_identity): New function.
21848 (vect_expand_fold_left): Likewise.
21849 (vectorize_fold_left_reduction): Likewise.
21850 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21851 scalar phi in place for it. Check for target support and reject
21852 cases that would reassociate the operation. Defer the transform
21853 phase to vectorize_fold_left_reduction.
21854 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21855 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21856 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21858 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21860 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21861 call to ifc_temp_var.
21863 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21864 Alan Hayward <alan.hayward@arm.com>
21865 David Sherwood <david.sherwood@arm.com>
21867 * target.def (legitimize_address_displacement): Take the original
21868 offset as a poly_int.
21869 * targhooks.h (default_legitimize_address_displacement): Update
21871 * targhooks.c (default_legitimize_address_displacement): Likewise.
21872 * doc/tm.texi: Regenerate.
21873 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21874 as an argument, moving assert of ad->disp == ad->disp_term to...
21875 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21876 Try calling targetm.legitimize_address_displacement before expanding
21877 the address rather than afterwards, and adjust for the new interface.
21878 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21879 Match the new hook interface. Handle SVE addresses.
21880 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21881 new hook interface.
21883 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21885 * Makefile.in (OBJS): Add early-remat.o.
21886 * target.def (select_early_remat_modes): New hook.
21887 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21888 * doc/tm.texi: Regenerate.
21889 * targhooks.h (default_select_early_remat_modes): Declare.
21890 * targhooks.c (default_select_early_remat_modes): New function.
21891 * timevar.def (TV_EARLY_REMAT): New timevar.
21892 * passes.def (pass_early_remat): New pass.
21893 * tree-pass.h (make_pass_early_remat): Declare.
21894 * early-remat.c: New file.
21895 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21897 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21899 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21900 Alan Hayward <alan.hayward@arm.com>
21901 David Sherwood <david.sherwood@arm.com>
21903 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21904 vfm1 with a bound_epilog parameter.
21905 (vect_do_peeling): Update calls accordingly, and move the prologue
21906 call earlier in the function. Treat the base bound_epilog as 0 for
21907 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21908 this base when peeling for gaps.
21909 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21910 with fully-masked loops.
21911 (vect_estimate_min_profitable_iters): Handle the single peeled
21912 iteration in that case.
21914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21915 Alan Hayward <alan.hayward@arm.com>
21916 David Sherwood <david.sherwood@arm.com>
21918 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21919 single-element interleaving even if the size is not a power of 2.
21920 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21921 accesses for single-element interleaving if the group size is
21924 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21925 Alan Hayward <alan.hayward@arm.com>
21926 David Sherwood <david.sherwood@arm.com>
21928 * doc/md.texi (fold_extract_last_@var{m}): Document.
21929 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21930 * optabs.def (fold_extract_last_optab): New optab.
21931 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21932 * internal-fn.c (fold_extract_direct): New macro.
21933 (expand_fold_extract_optab_fn): Likewise.
21934 (direct_fold_extract_optab_supported_p): Likewise.
21935 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21936 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21937 EXTRACT_LAST_REDUCTION.
21938 (get_initial_def_for_reduction): Do not create an initial vector
21939 for EXTRACT_LAST_REDUCTION reductions.
21940 (vectorizable_reduction): Leave the scalar phi in place for
21941 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21942 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21943 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21944 transform phase to vectorizable_condition.
21945 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21947 (vect_finish_stmt_generation): ...here.
21948 (vect_finish_replace_stmt): New function.
21949 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21950 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21952 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21954 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21955 Alan Hayward <alan.hayward@arm.com>
21956 David Sherwood <david.sherwood@arm.com>
21958 * doc/md.texi (extract_last_@var{m}): Document.
21959 * optabs.def (extract_last_optab): New optab.
21960 * internal-fn.def (EXTRACT_LAST): New internal function.
21961 * internal-fn.c (cond_unary_direct): New macro.
21962 (expand_cond_unary_optab_fn): Likewise.
21963 (direct_cond_unary_optab_supported_p): Likewise.
21964 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21965 loops using EXTRACT_LAST.
21966 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21967 (extract_last_<mode>): ...this optab.
21968 (vec_extract<mode><Vel>): Update accordingly.
21970 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21971 Alan Hayward <alan.hayward@arm.com>
21972 David Sherwood <david.sherwood@arm.com>
21974 * target.def (empty_mask_is_expensive): New hook.
21975 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21976 * doc/tm.texi: Regenerate.
21977 * targhooks.h (default_empty_mask_is_expensive): Declare.
21978 * targhooks.c (default_empty_mask_is_expensive): New function.
21979 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21980 if the target says that empty masks are expensive.
21981 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21983 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21985 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21986 Alan Hayward <alan.hayward@arm.com>
21987 David Sherwood <david.sherwood@arm.com>
21989 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21990 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21991 (vect_use_loop_mask_for_alignment_p): New function.
21992 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21993 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21994 niters_skip argument. Make sure that the first niters_skip elements
21995 of the first iteration are inactive.
21996 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21997 Update call to vect_set_loop_masks_directly.
21998 (get_misalign_in_elems): New function, split out from...
21999 (vect_gen_prolog_loop_niters): ...here.
22000 (vect_update_init_of_dr): Take a code argument that specifies whether
22001 the adjustment should be added or subtracted.
22002 (vect_update_init_of_drs): Likewise.
22003 (vect_prepare_for_masked_peels): New function.
22004 (vect_do_peeling): Skip prologue peeling if we're using a mask
22005 instead. Update call to vect_update_inits_of_drs.
22006 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22008 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22009 alignment. Do not include the number of peeled iterations in
22010 the minimum threshold in that case.
22011 (vectorizable_induction): Adjust the start value down by
22012 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22013 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22014 Take the number of skipped iterations into account when calculating
22016 * tree-vect-stmts.c (vect_gen_while_not): New function.
22018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22019 Alan Hayward <alan.hayward@arm.com>
22020 David Sherwood <david.sherwood@arm.com>
22022 * doc/sourcebuild.texi (vect_fully_masked): Document.
22023 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22024 default value to 0.
22025 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22027 (vect_analyze_loop_2): ...here. Don't check the vectorization
22028 factor against the number of loop iterations if the loop is
22031 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22032 Alan Hayward <alan.hayward@arm.com>
22033 David Sherwood <david.sherwood@arm.com>
22035 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22036 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22037 (dump_groups): Update accordingly.
22038 (iv_use::mem_type): New member variable.
22039 (address_p): New function.
22040 (record_use): Add a mem_type argument and initialize the new
22042 (record_group_use): Add a mem_type argument. Use address_p.
22043 Remove obsolete null checks of base_object. Update call to record_use.
22044 (find_interesting_uses_op): Update call to record_group_use.
22045 (find_interesting_uses_cond): Likewise.
22046 (find_interesting_uses_address): Likewise.
22047 (get_mem_type_for_internal_fn): New function.
22048 (find_address_like_use): Likewise.
22049 (find_interesting_uses_stmt): Try find_address_like_use before
22050 calling find_interesting_uses_op.
22051 (addr_offset_valid_p): Use the iv mem_type field as the type
22052 of the addressed memory.
22053 (add_autoinc_candidates): Likewise.
22054 (get_address_cost): Likewise.
22055 (split_small_address_groups_p): Use address_p.
22056 (split_address_groups): Likewise.
22057 (add_iv_candidate_for_use): Likewise.
22058 (autoinc_possible_for_pair): Likewise.
22059 (rewrite_groups): Likewise.
22060 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22061 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22062 (get_alias_ptr_type_for_ptr_address): New function.
22063 (rewrite_use_address): Rewrite address uses in calls that were
22064 identified by find_address_like_use.
22066 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22067 Alan Hayward <alan.hayward@arm.com>
22068 David Sherwood <david.sherwood@arm.com>
22070 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22072 * gimple-expr.h (is_gimple_addressable: Likewise.
22073 * gimple-expr.c (is_gimple_address): Likewise.
22074 * internal-fn.c (expand_call_mem_ref): New function.
22075 (expand_mask_load_optab_fn): Use it.
22076 (expand_mask_store_optab_fn): Likewise.
22078 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22079 Alan Hayward <alan.hayward@arm.com>
22080 David Sherwood <david.sherwood@arm.com>
22082 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22083 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22084 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22085 (cond_umax@var{mode}): Document.
22086 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22087 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22088 (cond_umin_optab, cond_umax_optab): New optabs.
22089 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22090 (COND_IOR, COND_XOR): New internal functions.
22091 * internal-fn.h (get_conditional_internal_fn): Declare.
22092 * internal-fn.c (cond_binary_direct): New macro.
22093 (expand_cond_binary_optab_fn): Likewise.
22094 (direct_cond_binary_optab_supported_p): Likewise.
22095 (get_conditional_internal_fn): New function.
22096 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22097 Cope with reduction statements that are vectorized as calls rather
22099 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22100 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22101 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22102 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22103 (UNSPEC_COND_EOR): New unspecs.
22104 (optab): Add mappings for them.
22105 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22106 (sve_int_op, sve_fp_op): New int attributes.
22108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22109 Alan Hayward <alan.hayward@arm.com>
22110 David Sherwood <david.sherwood@arm.com>
22112 * optabs.def (while_ult_optab): New optab.
22113 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22114 * internal-fn.def (WHILE_ULT): New internal function.
22115 * internal-fn.h (direct_internal_fn_supported_p): New override
22116 that takes two types as argument.
22117 * internal-fn.c (while_direct): New macro.
22118 (expand_while_optab_fn): New function.
22119 (convert_optab_supported_p): Likewise.
22120 (direct_while_optab_supported_p): New macro.
22121 * wide-int.h (wi::udiv_ceil): New function.
22122 * tree-vectorizer.h (rgroup_masks): New structure.
22123 (vec_loop_masks): New typedef.
22124 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22125 and fully_masked_p.
22126 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22127 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22128 (vect_max_vf): New function.
22129 (slpeel_make_loop_iterate_ntimes): Delete.
22130 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22131 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22132 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22133 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22134 internal-fn.h, stor-layout.h and optabs-query.h.
22135 (vect_set_loop_mask): New function.
22136 (add_preheader_seq): Likewise.
22137 (add_header_seq): Likewise.
22138 (interleave_supported_p): Likewise.
22139 (vect_maybe_permute_loop_masks): Likewise.
22140 (vect_set_loop_masks_directly): Likewise.
22141 (vect_set_loop_condition_masked): Likewise.
22142 (vect_set_loop_condition_unmasked): New function, split out from
22143 slpeel_make_loop_iterate_ntimes.
22144 (slpeel_make_loop_iterate_ntimes): Rename to..
22145 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22146 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22147 (vect_do_peeling): Update call accordingly.
22148 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22150 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22151 mask_compare_type, can_fully_mask_p and fully_masked_p.
22152 (release_vec_loop_masks): New function.
22153 (_loop_vec_info): Use it to free the loop masks.
22154 (can_produce_all_loop_masks_p): New function.
22155 (vect_get_max_nscalars_per_iter): Likewise.
22156 (vect_verify_full_masking): Likewise.
22157 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22158 retries, and free the mask rgroups before retrying. Check loop-wide
22159 reasons for disallowing fully-masked loops. Make the final decision
22160 about whether use a fully-masked loop or not.
22161 (vect_estimate_min_profitable_iters): Do not assume that peeling
22162 for the number of iterations will be needed for fully-masked loops.
22163 (vectorizable_reduction): Disable fully-masked loops.
22164 (vectorizable_live_operation): Likewise.
22165 (vect_halve_mask_nunits): New function.
22166 (vect_double_mask_nunits): Likewise.
22167 (vect_record_loop_mask): Likewise.
22168 (vect_get_loop_mask): Likewise.
22169 (vect_transform_loop): Handle the case in which the final loop
22170 iteration might handle a partial vector. Call vect_set_loop_condition
22171 instead of slpeel_make_loop_iterate_ntimes.
22172 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22173 (check_load_store_masking): New function.
22174 (prepare_load_store_mask): Likewise.
22175 (vectorizable_store): Handle fully-masked loops.
22176 (vectorizable_load): Likewise.
22177 (supportable_widening_operation): Use vect_halve_mask_nunits for
22179 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22180 (vect_gen_while): New function.
22181 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22182 (aarch64_uqdec<mode>): New insn.
22184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22185 Alan Hayward <alan.hayward@arm.com>
22186 David Sherwood <david.sherwood@arm.com>
22188 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22189 (reduc_xor_scal_optab): New optabs.
22190 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22191 (reduc_xor_scal_@var{m}): Document.
22192 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22193 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22194 internal functions.
22195 * fold-const-call.c (fold_const_call): Handle them.
22196 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22197 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22198 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22199 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22200 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22201 (UNSPEC_XORV): New unspecs.
22202 (optab): Add entries for them.
22203 (BITWISEV): New int iterator.
22204 (bit_reduc_op): New int attributes.
22206 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22207 Alan Hayward <alan.hayward@arm.com>
22208 David Sherwood <david.sherwood@arm.com>
22210 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22211 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22212 * optabs.def (vec_shl_insert_optab): New optab.
22213 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22214 (duplicate_and_interleave): Likewise.
22215 * tree-vect-loop.c: Include internal-fn.h.
22216 (neutral_op_for_slp_reduction): New function, split out from
22217 get_initial_defs_for_reduction.
22218 (get_initial_def_for_reduction): Handle option 2 for variable-length
22219 vectors by loading the neutral value into a vector and then shifting
22220 the initial value into element 0.
22221 (get_initial_defs_for_reduction): Replace the code argument with
22222 the neutral value calculated by neutral_op_for_slp_reduction.
22223 Use gimple_build_vector for constant-length vectors.
22224 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22225 but the first group_size elements have a neutral value.
22226 Use duplicate_and_interleave otherwise.
22227 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22228 Update call to get_initial_defs_for_reduction. Handle SLP
22229 reductions for variable-length vectors by creating one vector
22230 result for each scalar result, with the elements associated
22231 with other scalar results stubbed out with the neutral value.
22232 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22233 Require IFN_VEC_SHL_INSERT for double reductions on
22234 variable-length vectors, or SLP reductions that have
22235 a neutral value. Require can_duplicate_and_interleave_p
22236 support for variable-length unchained SLP reductions if there
22237 is no neutral value, such as for MIN/MAX reductions. Also require
22238 the number of vector elements to be a multiple of the number of
22239 SLP statements when doing variable-length unchained SLP reductions.
22240 Update call to vect_create_epilog_for_reduction.
22241 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22242 and remove initial values.
22243 (duplicate_and_interleave): Make public.
22244 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22245 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22247 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22248 Alan Hayward <alan.hayward@arm.com>
22249 David Sherwood <david.sherwood@arm.com>
22251 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22252 (can_duplicate_and_interleave_p): New function.
22253 (vect_get_and_check_slp_defs): Take the vector of statements
22254 rather than just the current one. Remove excess parentheses.
22255 Restriction rejectinon of vect_constant_def and vect_external_def
22256 for variable-length vectors to boolean types, or types for which
22257 can_duplicate_and_interleave_p is false.
22258 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22259 (duplicate_and_interleave): New function.
22260 (vect_get_constant_vectors): Use gimple_build_vector for
22261 constant-length vectors and suitable variable-length constant
22262 vectors. Use duplicate_and_interleave for other variable-length
22263 vectors. Don't defer the update when inserting new statements.
22265 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22266 Alan Hayward <alan.hayward@arm.com>
22267 David Sherwood <david.sherwood@arm.com>
22269 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22270 min_profitable_iters doesn't go negative.
22272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22273 Alan Hayward <alan.hayward@arm.com>
22274 David Sherwood <david.sherwood@arm.com>
22276 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22277 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22278 * optabs.def (vec_mask_load_lanes_optab): New optab.
22279 (vec_mask_store_lanes_optab): Likewise.
22280 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22281 (MASK_STORE_LANES): Likewise.
22282 * internal-fn.c (mask_load_lanes_direct): New macro.
22283 (mask_store_lanes_direct): Likewise.
22284 (expand_mask_load_optab_fn): Handle masked operations.
22285 (expand_mask_load_lanes_optab_fn): New macro.
22286 (expand_mask_store_optab_fn): Handle masked operations.
22287 (expand_mask_store_lanes_optab_fn): New macro.
22288 (direct_mask_load_lanes_optab_supported_p): Likewise.
22289 (direct_mask_store_lanes_optab_supported_p): Likewise.
22290 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22292 (vect_load_lanes_supported): Likewise.
22293 * tree-vect-data-refs.c (strip_conversion): New function.
22294 (can_group_stmts_p): Likewise.
22295 (vect_analyze_data_ref_accesses): Use it instead of checking
22296 for a pair of assignments.
22297 (vect_store_lanes_supported): Take a masked_p parameter.
22298 (vect_load_lanes_supported): Likewise.
22299 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22300 vect_store_lanes_supported and vect_load_lanes_supported.
22301 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22302 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22303 parameter. Don't allow gaps for masked accesses.
22304 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22305 and vect_load_lanes_supported.
22306 (get_load_store_type): Take a masked_p parameter and update
22307 call to get_group_load_store_type.
22308 (vectorizable_store): Update call to get_load_store_type.
22309 Handle IFN_MASK_STORE_LANES.
22310 (vectorizable_load): Update call to get_load_store_type.
22311 Handle IFN_MASK_LOAD_LANES.
22313 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22314 Alan Hayward <alan.hayward@arm.com>
22315 David Sherwood <david.sherwood@arm.com>
22317 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22319 * config/aarch64/aarch64-protos.h
22320 (aarch64_sve_struct_memory_operand_p): Declare.
22321 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22322 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22323 (VPRED, vpred): Handle SVE structure modes.
22324 * config/aarch64/constraints.md (Utx): New constraint.
22325 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22326 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22327 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22328 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22329 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22330 structure modes. Split into pieces after RA.
22331 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22332 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22334 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22335 SVE structure modes.
22336 (aarch64_classify_address): Likewise.
22337 (sizetochar): Move earlier in file.
22338 (aarch64_print_operand): Handle SVE register lists.
22339 (aarch64_array_mode): New function.
22340 (aarch64_sve_struct_memory_operand_p): Likewise.
22341 (TARGET_ARRAY_MODE): Redefine.
22343 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22344 Alan Hayward <alan.hayward@arm.com>
22345 David Sherwood <david.sherwood@arm.com>
22347 * target.def (array_mode): New target hook.
22348 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22349 * doc/tm.texi: Regenerate.
22350 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22351 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22352 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22353 targetm.array_mode.
22354 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22357 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22358 Alan Hayward <alan.hayward@arm.com>
22359 David Sherwood <david.sherwood@arm.com>
22361 * fold-const.c (fold_binary_loc): Check the argument types
22362 rather than the result type when testing for a vector operation.
22364 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22366 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22367 * doc/tm.texi: Regenerate.
22369 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22370 Alan Hayward <alan.hayward@arm.com>
22371 David Sherwood <david.sherwood@arm.com>
22373 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22374 (sve): Document new AArch64 extension.
22375 * doc/md.texi (w): Extend the description of the AArch64
22376 constraint to include SVE vectors.
22377 (Upl, Upa): Document new AArch64 predicate constraints.
22378 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22380 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22381 (msve-vector-bits=): New option.
22382 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22383 SVE when these are disabled.
22384 (sve): New extension.
22385 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22386 modes. Adjust their number of units based on aarch64_sve_vg.
22387 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22388 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22389 aarch64_addr_query_type.
22390 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22391 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22392 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22393 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22394 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22395 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22396 (aarch64_simd_imm_zero_p): Delete.
22397 (aarch64_check_zero_based_sve_index_immediate): Declare.
22398 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22399 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22400 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22401 (aarch64_sve_float_mul_immediate_p): Likewise.
22402 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22403 rather than an rtx.
22404 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22405 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22406 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22407 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22408 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22409 (aarch64_regmode_natural_size): Likewise.
22410 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22411 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22413 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22414 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22415 for VG and the SVE predicate registers.
22416 (V_ALIASES): Add a "z"-prefixed alias.
22417 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22418 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22419 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22420 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22421 (REG_CLASS_NAMES): Add entries for them.
22422 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22423 and the predicate registers.
22424 (aarch64_sve_vg): Declare.
22425 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22426 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22427 (REGMODE_NATURAL_SIZE): Define.
22428 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22430 * config/aarch64/aarch64.c: Include cfgrtl.h.
22431 (simd_immediate_info): Add a constructor for series vectors,
22432 and an associated step field.
22433 (aarch64_sve_vg): New variable.
22434 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22435 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22436 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22437 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22438 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22439 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22440 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22441 (aarch64_get_mask_mode): New functions.
22442 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22443 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22444 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22445 predicate modes and predicate registers. Explicitly restrict
22446 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22447 to store a vector mode if it is recognized by
22448 aarch64_classify_vector_mode.
22449 (aarch64_regmode_natural_size): New function.
22450 (aarch64_hard_regno_caller_save_mode): Return the original mode
22452 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22453 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22454 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22455 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22457 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22458 does not overlap dest if the function is frame-related. Handle
22460 (aarch64_split_add_offset): New function.
22461 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22462 them aarch64_add_offset.
22463 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22464 and update call to aarch64_sub_sp.
22465 (aarch64_add_cfa_expression): New function.
22466 (aarch64_expand_prologue): Pass extra temporary registers to the
22467 functions above. Handle the case in which we need to emit new
22468 DW_CFA_expressions for registers that were originally saved
22469 relative to the stack pointer, but now have to be expressed
22470 relative to the frame pointer.
22471 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22473 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22474 IP0 and IP1 values for SVE frames.
22475 (aarch64_expand_vec_series): New function.
22476 (aarch64_expand_sve_widened_duplicate): Likewise.
22477 (aarch64_expand_sve_const_vector): Likewise.
22478 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22479 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22480 into the register, rather than emitting a SET directly.
22481 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22482 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22483 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22484 (offset_9bit_signed_scaled_p): New functions.
22485 (aarch64_replicate_bitmask_imm): New function.
22486 (aarch64_bitmask_imm): Use it.
22487 (aarch64_cannot_force_const_mem): Reject expressions involving
22488 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22489 (aarch64_classify_index): Handle SVE indices, by requiring
22490 a plain register index with a scale that matches the element size.
22491 (aarch64_classify_address): Handle SVE addresses. Assert that
22492 the mode of the address is VOIDmode or an integer mode.
22493 Update call to aarch64_classify_symbol.
22494 (aarch64_classify_symbolic_expression): Update call to
22495 aarch64_classify_symbol.
22496 (aarch64_const_vec_all_in_range_p): New function.
22497 (aarch64_print_vector_float_operand): Likewise.
22498 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22499 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22500 and the FP immediates 1.0 and 0.5.
22501 (aarch64_print_address_internal): Handle SVE addresses.
22502 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22503 (aarch64_regno_regclass): Handle predicate registers.
22504 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22506 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22507 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22508 (aarch64_convert_sve_vector_bits): New function.
22509 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22510 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22511 rather than an rtx.
22512 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22513 Handle SVE vector and predicate modes. Accept VL-based constants
22514 that need only one temporary register, and VL offsets that require
22515 no temporary registers.
22516 (aarch64_conditional_register_usage): Mark the predicate registers
22517 as fixed if SVE isn't available.
22518 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22519 Return true for SVE vector and predicate modes.
22520 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22521 rather than an unsigned int. Handle SVE modes.
22522 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22524 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22526 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22527 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22528 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22529 (aarch64_sve_float_mul_immediate_p): New functions.
22530 (aarch64_sve_valid_immediate): New function.
22531 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22532 Explicitly reject structure modes. Check for INDEX constants.
22533 Handle PTRUE and PFALSE constants.
22534 (aarch64_check_zero_based_sve_index_immediate): New function.
22535 (aarch64_simd_imm_zero_p): Delete.
22536 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22537 vector modes. Accept constants in the range of CNT[BHWD].
22538 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22539 ask for an Advanced SIMD mode.
22540 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22541 (aarch64_simd_vector_alignment): Handle SVE predicates.
22542 (aarch64_vectorize_preferred_vector_alignment): New function.
22543 (aarch64_simd_vector_alignment_reachable): Use it instead of
22545 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22546 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22548 (MAX_VECT_LEN): Delete.
22549 (expand_vec_perm_d): Add a vec_flags field.
22550 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22551 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22552 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22554 (aarch64_evpc_rev): Rename to...
22555 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22556 (aarch64_evpc_rev_global): New function.
22557 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22558 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22560 (aarch64_evpc_sve_tbl): New function.
22561 (aarch64_expand_vec_perm_const_1): Update after rename of
22562 aarch64_evpc_rev. Handle SVE permutes too, trying
22563 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22564 than aarch64_evpc_tbl.
22565 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22566 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22567 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22568 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22569 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22570 (aarch64_expand_sve_vcond): New functions.
22571 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22572 of aarch64_vector_mode_p.
22573 (aarch64_dwarf_poly_indeterminate_value): New function.
22574 (aarch64_compute_pressure_classes): Likewise.
22575 (aarch64_can_change_mode_class): Likewise.
22576 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22577 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22578 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22579 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22580 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22581 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22582 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22583 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22585 (Dn, Dl, Dr): Accept const as well as const_vector.
22586 (Dz): Likewise. Compare against CONST0_RTX.
22587 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22588 of "vector" where appropriate.
22589 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22590 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22591 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22592 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22593 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22594 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22595 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22596 (v_int_equiv): Extend to SVE modes.
22597 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22599 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22600 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22601 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22602 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22603 (SVE_COND_FP_CMP): New int iterators.
22604 (perm_hilo): Handle the new unpack unspecs.
22605 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22607 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22608 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22609 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22610 (aarch64_equality_operator, aarch64_constant_vector_operand)
22611 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22612 (aarch64_sve_nonimmediate_operand): Likewise.
22613 (aarch64_sve_general_operand): Likewise.
22614 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22615 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22616 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22617 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22618 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22619 (aarch64_sve_float_arith_immediate): Likewise.
22620 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22621 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22622 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22623 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22624 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22625 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22626 (aarch64_sve_float_arith_operand): Likewise.
22627 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22628 (aarch64_sve_float_mul_operand): Likewise.
22629 (aarch64_sve_vec_perm_operand): Likewise.
22630 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22631 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22632 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22633 as well as const_vector.
22634 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22635 in file. Use CONST0_RTX and CONSTM1_RTX.
22636 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22637 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22638 Use aarch64_simd_imm_zero.
22639 * config/aarch64/aarch64-sve.md: New file.
22640 * config/aarch64/aarch64.md: Include it.
22641 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22642 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22643 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22644 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22645 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22646 (sve): New attribute.
22647 (enabled): Disable instructions with the sve attribute unless
22649 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22650 aarch64_expand_mov_immediate.
22651 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22652 CNT[BHSD] immediates.
22653 (movti): Split CONST_POLY_INT moves into two halves.
22654 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22655 Split additions that need a temporary here if the destination
22656 is the stack pointer.
22657 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22658 (*add<mode>3_poly_1): New instruction.
22659 (set_clobber_cc): New expander.
22661 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22663 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22664 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22665 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22666 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22667 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22668 Change innermode from fixed_mode_size to machine_mode.
22669 (simplify_subreg): Update call accordingly. Handle a constant-sized
22670 subreg of a variable-length CONST_VECTOR.
22672 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22673 Alan Hayward <alan.hayward@arm.com>
22674 David Sherwood <david.sherwood@arm.com>
22676 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22677 (add_offset_to_base): New function, split out from...
22678 (create_mem_ref): ...here. When handling a scale other than 1,
22679 check first whether the address is valid without the offset.
22680 Add it into the base if so, leaving the index and scale as-is.
22682 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22685 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22686 fold_for_warn before checking if arg2 is INTEGER_CST.
22688 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22690 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22691 (store_multiple_operation): Delete.
22692 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22693 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22694 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22695 guarded by TARGET_STRING.
22696 (rs6000_output_load_multiple): Delete.
22697 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22698 OPTION_MASK_STRING / TARGET_STRING handling.
22699 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22700 (const rs6000_opt_masks) <"string">: Change mask to 0.
22701 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22702 (MASK_STRING): Delete.
22703 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22705 (load_multiple): Delete.
22712 (store_multiple): Delete.
22719 (movmemsi_8reg): Delete.
22720 (corresponding unnamed define_insn): Delete.
22721 (movmemsi_6reg): Delete.
22722 (corresponding unnamed define_insn): Delete.
22723 (movmemsi_4reg): Delete.
22724 (corresponding unnamed define_insn): Delete.
22725 (movmemsi_2reg): Delete.
22726 (corresponding unnamed define_insn): Delete.
22727 (movmemsi_1reg): Delete.
22728 (corresponding unnamed define_insn): Delete.
22729 * config/rs6000/rs6000.opt (mno-string): New.
22730 (mstring): Replace by deprecation warning stub.
22731 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22733 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22735 * regrename.c (regrename_do_replace): If replacing the same
22736 reg multiple times, try to reuse last created gen_raw_REG.
22739 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22740 main to workaround a bug in GDB.
22742 2018-01-12 Tom de Vries <tom@codesourcery.com>
22745 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22747 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22749 PR rtl-optimization/80481
22750 * ira-color.c (get_cap_member): New function.
22751 (allocnos_conflict_by_live_ranges_p): Use it.
22752 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22753 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22755 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22758 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22759 (*saddl_se_1): Ditto.
22760 (*ssubsi_1): Ditto.
22761 (*ssubl_se_1): Ditto.
22763 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22765 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22766 rather than wi::to_widest for DR_INITs.
22767 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22768 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22769 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22771 (vect_analyze_group_access_1): Note that here.
22773 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22775 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22776 polynomial type sizes.
22778 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22780 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22781 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22782 (gimple_add_tmp_var): Likewise.
22784 2018-01-12 Martin Liska <mliska@suse.cz>
22786 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22787 (gimple_alloc_sizes): Likewise.
22788 (dump_gimple_statistics): Use PRIu64 in printf format.
22789 * gimple.h: Change uint64_t to int.
22791 2018-01-12 Martin Liska <mliska@suse.cz>
22793 * tree-core.h: Use uint64_t instead of int.
22794 * tree.c (tree_node_counts): Likewise.
22795 (tree_node_sizes): Likewise.
22796 (dump_tree_statistics): Use PRIu64 in printf format.
22798 2018-01-12 Martin Liska <mliska@suse.cz>
22800 * Makefile.in: As qsort_chk is implemented in vec.c, add
22801 vec.o to linkage of gencfn-macros.
22802 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22803 passing the info to record_node_allocation_statistics.
22804 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22806 * ggc-common.c (struct ggc_usage): Add operator== and use
22807 it in operator< and compare function.
22808 * mem-stats.h (struct mem_usage): Likewise.
22809 * vec.c (struct vec_usage): Remove operator< and compare
22810 function. Can be simply inherited.
22812 2018-01-12 Martin Jambor <mjambor@suse.cz>
22815 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22816 * tree-ssa-math-opts.c: Include domwalk.h.
22817 (convert_mult_to_fma_1): New function.
22818 (fma_transformation_info): New type.
22819 (fma_deferring_state): Likewise.
22820 (cancel_fma_deferring): New function.
22821 (result_of_phi): Likewise.
22822 (last_fma_candidate_feeds_initial_phi): Likewise.
22823 (convert_mult_to_fma): Added deferring logic, split actual
22824 transformation to convert_mult_to_fma_1.
22825 (math_opts_dom_walker): New type.
22826 (math_opts_dom_walker::after_dom_children): New method, body moved
22827 here from pass_optimize_widening_mul::execute, added deferring logic
22829 (pass_optimize_widening_mul::execute): Moved most of code to
22830 math_opts_dom_walker::after_dom_children.
22831 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22832 * config/i386/i386.c (ix86_option_override_internal): Added
22833 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22835 2018-01-12 Richard Biener <rguenther@suse.de>
22838 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22839 inline instance vars.
22841 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22844 * config/rx/rx.c (rx_is_restricted_memory_address):
22845 Handle SUBREG case.
22847 2018-01-12 Richard Biener <rguenther@suse.de>
22849 PR tree-optimization/80846
22850 * target.def (split_reduction): New target hook.
22851 * targhooks.c (default_split_reduction): New function.
22852 * targhooks.h (default_split_reduction): Declare.
22853 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22854 target requests first reduce vectors by combining low and high
22856 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22857 (get_vectype_for_scalar_type_and_size): Export.
22858 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22859 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22860 * doc/tm.texi: Regenerate.
22861 * config/i386/i386.c (ix86_split_reduction): Implement
22862 TARGET_VECTORIZE_SPLIT_REDUCTION.
22864 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22867 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22868 in PIC mode except for TARGET_VXWORKS_RTP.
22869 * config/sparc/sparc.c: Include cfgrtl.h.
22870 (TARGET_INIT_PIC_REG): Define.
22871 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22872 (sparc_pic_register_p): New predicate.
22873 (sparc_legitimate_address_p): Use it.
22874 (sparc_legitimize_pic_address): Likewise.
22875 (sparc_delegitimize_address): Likewise.
22876 (sparc_mode_dependent_address_p): Likewise.
22877 (gen_load_pcrel_sym): Remove 4th parameter.
22878 (load_got_register): Adjust call to above. Remove obsolete stuff.
22879 (sparc_expand_prologue): Do not call load_got_register here.
22880 (sparc_flat_expand_prologue): Likewise.
22881 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22882 (sparc_use_pseudo_pic_reg): New function.
22883 (sparc_init_pic_reg): Likewise.
22884 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22885 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22887 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22889 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22890 Add item for branch_cost.
22892 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22894 PR rtl-optimization/83565
22895 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22896 not extend the result to a larger mode for rotate operations.
22897 (num_sign_bit_copies1): Likewise.
22899 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22902 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22904 Use values-Xc.o for -pedantic.
22905 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22907 2018-01-12 Martin Liska <mliska@suse.cz>
22910 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22912 (possible_polymorphic_call_targets): Use it.
22913 (ipa_devirt): Likewise.
22915 2018-01-12 Martin Liska <mliska@suse.cz>
22917 * profile-count.h (enum profile_quality): Use 0 as invalid
22918 enum value of profile_quality.
22920 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22922 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22923 -mext-string options.
22925 2018-01-12 Richard Biener <rguenther@suse.de>
22927 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22928 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22929 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22931 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22933 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22935 * configure.ac (--with-long-double-format): Add support for the
22936 configuration option to change the default long double format on
22938 * config.gcc (powerpc*-linux*-*): Likewise.
22939 * configure: Regenerate.
22940 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22941 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22942 used without modification.
22944 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22946 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22947 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22948 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22949 MISC_BUILTIN_SPEC_BARRIER.
22950 (rs6000_init_builtins): Likewise.
22951 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22953 (speculation_barrier): New define_insn.
22954 * doc/extend.texi: Document __builtin_speculation_barrier.
22956 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22959 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22960 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22961 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22963 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22964 integral modes instead of "ss" and "sd".
22965 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22966 vectors with 32-bit and 64-bit elements.
22967 (vecdupssescalarmodesuffix): New mode attribute.
22968 (vec_dup<mode>): Use it.
22970 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22973 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22974 frame if argument is passed on stack.
22976 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22979 * ree.c (combine_reaching_defs): Optimize also
22980 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22981 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22983 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22985 PR middle-end/83189
22986 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22988 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22990 PR middle-end/83718
22991 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22992 after they are computed.
22994 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22996 PR tree-optimization/83695
22997 * gimple-loop-linterchange.cc
22998 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22999 reset cached scev information after interchange.
23000 (pass_linterchange::execute): Remove call to scev_reset_htab.
23002 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23004 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23005 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23006 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23007 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23008 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23009 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23010 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23011 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23012 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23013 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23014 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23015 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23016 (V_lane_reg): Likewise.
23017 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23019 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23020 (vfmal_lane_low<mode>_intrinsic,
23021 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23022 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23023 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23024 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23025 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23026 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23028 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23030 * config/arm/arm-cpus.in (fp16fml): New feature.
23031 (ALL_SIMD): Add fp16fml.
23032 (armv8.2-a): Add fp16fml as an option.
23033 (armv8.3-a): Likewise.
23034 (armv8.4-a): Add fp16fml as part of fp16.
23035 * config/arm/arm.h (TARGET_FP16FML): Define.
23036 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23038 * config/arm/arm-modes.def (V2HF): Define.
23039 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23040 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23041 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23042 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23043 vfmsl_low, vfmsl_high): New set of builtins.
23044 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23045 (vfml_op): New code attribute.
23046 (VFMLHALVES): New int iterator.
23047 (VFML, VFMLSEL): New mode attributes.
23048 (V_reg): Define mapping for V2HF.
23049 (V_hi, V_lo): New mode attributes.
23050 (VF_constraint): Likewise.
23051 (vfml_half, vfml_half_selector): New int attributes.
23052 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23054 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23055 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23057 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23058 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23059 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23060 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23062 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23063 Document new effective target and option set.
23065 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23067 * config/arm/arm-cpus.in (armv8_4): New feature.
23068 (ARMv8_4a): New fgroup.
23069 (armv8.4-a): New arch.
23070 * config/arm/arm-tables.opt: Regenerate.
23071 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23072 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23073 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23074 Add matching rules for -march=armv8.4-a and extensions.
23075 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23077 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23080 * config/rx/rx.md (BW): New mode attribute.
23081 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23083 2018-01-11 Richard Biener <rguenther@suse.de>
23085 PR tree-optimization/83435
23086 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23087 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23088 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23090 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23091 Alan Hayward <alan.hayward@arm.com>
23092 David Sherwood <david.sherwood@arm.com>
23094 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23096 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23097 (aarch64_print_address_internal): Use it to check for a zero offset.
23099 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23100 Alan Hayward <alan.hayward@arm.com>
23101 David Sherwood <david.sherwood@arm.com>
23103 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23104 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23105 Return a poly_int64 rather than a HOST_WIDE_INT.
23106 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23107 rather than a HOST_WIDE_INT.
23108 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23109 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23110 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23111 final_offset from HOST_WIDE_INT to poly_int64.
23112 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23113 to_constant when getting the number of units in an Advanced SIMD
23115 (aarch64_builtin_vectorized_function): Check for a constant number
23117 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23119 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23120 attribute instead of GET_MODE_NUNITS.
23121 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23122 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23123 GET_MODE_SIZE for fixed-size registers.
23124 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23125 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23126 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23127 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23128 (aarch64_print_operand, aarch64_print_address_internal)
23129 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23130 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23131 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23132 Handle polynomial GET_MODE_SIZE.
23133 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23134 wider than SImode without modification.
23135 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23136 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23137 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23138 passing and returning SVE modes.
23139 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23140 rather than GEN_INT.
23141 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23142 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23143 (aarch64_allocate_and_probe_stack_space): Likewise.
23144 (aarch64_layout_frame): Cope with polynomial offsets.
23145 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23146 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23147 polynomial offsets.
23148 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23149 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23150 poly_int64 rather than a HOST_WIDE_INT.
23151 (aarch64_get_separate_components, aarch64_process_components)
23152 (aarch64_expand_prologue, aarch64_expand_epilogue)
23153 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23154 (aarch64_anchor_offset): New function, split out from...
23155 (aarch64_legitimize_address): ...here.
23156 (aarch64_builtin_vectorization_cost): Handle polynomial
23157 TYPE_VECTOR_SUBPARTS.
23158 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23160 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23161 number of elements from the PARALLEL rather than the mode.
23162 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23163 rather than GET_MODE_BITSIZE.
23164 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23165 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23166 (aarch64_expand_vec_perm_const_1): Handle polynomial
23167 d->perm.length () and d->perm elements.
23168 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23169 Apply to_constant to d->perm elements.
23170 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23171 polynomial CONST_VECTOR_NUNITS.
23172 (aarch64_move_pointer): Take amount as a poly_int64 rather
23174 (aarch64_progress_pointer): Avoid temporary variable.
23175 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23176 the mode attribute instead of GET_MODE.
23178 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23179 Alan Hayward <alan.hayward@arm.com>
23180 David Sherwood <david.sherwood@arm.com>
23182 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23183 x exists before using it.
23184 (aarch64_add_constant_internal): Rename to...
23185 (aarch64_add_offset_1): ...this. Replace regnum with separate
23186 src and dest rtxes. Handle the case in which they're different,
23187 including when the offset is zero. Replace scratchreg with an rtx.
23188 Use 2 additions if there is no spare register into which we can
23189 move a 16-bit constant.
23190 (aarch64_add_constant): Delete.
23191 (aarch64_add_offset): Replace reg with separate src and dest
23192 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23193 Use aarch64_add_offset_1.
23194 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23195 an rtx rather than an int. Take the delta as a poly_int64
23196 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23197 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23198 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23199 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23200 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23201 and aarch64_add_sp.
23202 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23203 aarch64_add_constant.
23205 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23207 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23208 Use scalar_float_mode.
23210 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23212 * config/aarch64/aarch64-simd.md
23213 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23214 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23215 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23216 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23217 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23218 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23219 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23220 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23221 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23222 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23224 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23227 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23228 targ_options->x_arm_arch_string is non NULL.
23230 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23232 * config/aarch64/aarch64.h
23233 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23235 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23238 * expmed.c (emit_store_flag_force): Swap if const op0
23239 and change VOIDmode to mode of op0.
23241 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23243 PR rtl-optimization/83761
23244 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23245 than bytes to mode_for_size.
23247 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23249 PR middle-end/83189
23250 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23251 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23254 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23256 PR middle-end/83575
23257 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23258 when in layout mode.
23259 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23260 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23263 2018-01-10 Michael Collison <michael.collison@arm.com>
23265 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23266 * config/aarch64/aarch64-option-extension.def: Add
23267 AARCH64_OPT_EXTENSION of 'fp16fml'.
23268 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23269 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23270 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23271 * config/aarch64/constraints.md (Ui7): New constraint.
23272 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23273 (VFMLA_SEL_W): Ditto.
23276 (VFMLA16_LOW): New int iterator.
23277 (VFMLA16_HIGH): Ditto.
23278 (UNSPEC_FMLAL): New unspec.
23279 (UNSPEC_FMLSL): Ditto.
23280 (UNSPEC_FMLAL2): Ditto.
23281 (UNSPEC_FMLSL2): Ditto.
23282 (f16mac): New code attribute.
23283 * config/aarch64/aarch64-simd-builtins.def
23284 (aarch64_fmlal_lowv2sf): Ditto.
23285 (aarch64_fmlsl_lowv2sf): Ditto.
23286 (aarch64_fmlalq_lowv4sf): Ditto.
23287 (aarch64_fmlslq_lowv4sf): Ditto.
23288 (aarch64_fmlal_highv2sf): Ditto.
23289 (aarch64_fmlsl_highv2sf): Ditto.
23290 (aarch64_fmlalq_highv4sf): Ditto.
23291 (aarch64_fmlslq_highv4sf): Ditto.
23292 (aarch64_fmlal_lane_lowv2sf): Ditto.
23293 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23294 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23295 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23296 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23297 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23298 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23299 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23300 (aarch64_fmlal_lane_highv2sf): Ditto.
23301 (aarch64_fmlsl_lane_highv2sf): Ditto.
23302 (aarch64_fmlal_laneq_highv2sf): Ditto.
23303 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23304 (aarch64_fmlalq_lane_highv4sf): Ditto.
23305 (aarch64_fmlsl_lane_highv4sf): Ditto.
23306 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23307 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23308 * config/aarch64/aarch64-simd.md:
23309 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23310 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23311 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23312 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23313 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23314 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23315 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23316 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23317 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23318 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23319 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23320 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23321 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23322 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23323 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23324 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23325 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23326 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23327 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23328 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23329 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23330 (vfmlsl_low_u32): Ditto.
23331 (vfmlalq_low_u32): Ditto.
23332 (vfmlslq_low_u32): Ditto.
23333 (vfmlal_high_u32): Ditto.
23334 (vfmlsl_high_u32): Ditto.
23335 (vfmlalq_high_u32): Ditto.
23336 (vfmlslq_high_u32): Ditto.
23337 (vfmlal_lane_low_u32): Ditto.
23338 (vfmlsl_lane_low_u32): Ditto.
23339 (vfmlal_laneq_low_u32): Ditto.
23340 (vfmlsl_laneq_low_u32): Ditto.
23341 (vfmlalq_lane_low_u32): Ditto.
23342 (vfmlslq_lane_low_u32): Ditto.
23343 (vfmlalq_laneq_low_u32): Ditto.
23344 (vfmlslq_laneq_low_u32): Ditto.
23345 (vfmlal_lane_high_u32): Ditto.
23346 (vfmlsl_lane_high_u32): Ditto.
23347 (vfmlal_laneq_high_u32): Ditto.
23348 (vfmlsl_laneq_high_u32): Ditto.
23349 (vfmlalq_lane_high_u32): Ditto.
23350 (vfmlslq_lane_high_u32): Ditto.
23351 (vfmlalq_laneq_high_u32): Ditto.
23352 (vfmlslq_laneq_high_u32): Ditto.
23353 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23354 (AARCH64_FL_FOR_ARCH8_4): New.
23355 (AARCH64_ISA_F16FML): New ISA flag.
23356 (TARGET_F16FML): New feature flag for fp16fml.
23357 (doc/invoke.texi): Document new fp16fml option.
23359 2018-01-10 Michael Collison <michael.collison@arm.com>
23361 * config/aarch64/aarch64-builtins.c:
23362 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23363 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23364 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23365 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23366 (AARCH64_ISA_SHA3): New ISA flag.
23367 (TARGET_SHA3): New feature flag for sha3.
23368 * config/aarch64/iterators.md (sha512_op): New int attribute.
23369 (CRYPTO_SHA512): New int iterator.
23370 (UNSPEC_SHA512H): New unspec.
23371 (UNSPEC_SHA512H2): Ditto.
23372 (UNSPEC_SHA512SU0): Ditto.
23373 (UNSPEC_SHA512SU1): Ditto.
23374 * config/aarch64/aarch64-simd-builtins.def
23375 (aarch64_crypto_sha512hqv2di): New builtin.
23376 (aarch64_crypto_sha512h2qv2di): Ditto.
23377 (aarch64_crypto_sha512su0qv2di): Ditto.
23378 (aarch64_crypto_sha512su1qv2di): Ditto.
23379 (aarch64_eor3qv8hi): Ditto.
23380 (aarch64_rax1qv2di): Ditto.
23381 (aarch64_xarqv2di): Ditto.
23382 (aarch64_bcaxqv8hi): Ditto.
23383 * config/aarch64/aarch64-simd.md:
23384 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23385 (aarch64_crypto_sha512su0qv2di): Ditto.
23386 (aarch64_crypto_sha512su1qv2di): Ditto.
23387 (aarch64_eor3qv8hi): Ditto.
23388 (aarch64_rax1qv2di): Ditto.
23389 (aarch64_xarqv2di): Ditto.
23390 (aarch64_bcaxqv8hi): Ditto.
23391 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23392 (vsha512h2q_u64): Ditto.
23393 (vsha512su0q_u64): Ditto.
23394 (vsha512su1q_u64): Ditto.
23395 (veor3q_u16): Ditto.
23396 (vrax1q_u64): Ditto.
23397 (vxarq_u64): Ditto.
23398 (vbcaxq_u16): Ditto.
23399 * config/arm/types.md (crypto_sha512): New type attribute.
23400 (crypto_sha3): Ditto.
23401 (doc/invoke.texi): Document new sha3 option.
23403 2018-01-10 Michael Collison <michael.collison@arm.com>
23405 * config/aarch64/aarch64-builtins.c:
23406 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23407 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23408 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23409 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23410 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23411 (AARCH64_ISA_SM4): New ISA flag.
23412 (TARGET_SM4): New feature flag for sm4.
23413 * config/aarch64/aarch64-simd-builtins.def
23414 (aarch64_sm3ss1qv4si): Ditto.
23415 (aarch64_sm3tt1aq4si): Ditto.
23416 (aarch64_sm3tt1bq4si): Ditto.
23417 (aarch64_sm3tt2aq4si): Ditto.
23418 (aarch64_sm3tt2bq4si): Ditto.
23419 (aarch64_sm3partw1qv4si): Ditto.
23420 (aarch64_sm3partw2qv4si): Ditto.
23421 (aarch64_sm4eqv4si): Ditto.
23422 (aarch64_sm4ekeyqv4si): Ditto.
23423 * config/aarch64/aarch64-simd.md:
23424 (aarch64_sm3ss1qv4si): Ditto.
23425 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23426 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23427 (aarch64_sm4eqv4si): Ditto.
23428 (aarch64_sm4ekeyqv4si): Ditto.
23429 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23430 (sm3part_op): Ditto.
23431 (CRYPTO_SM3TT): Ditto.
23432 (CRYPTO_SM3PART): Ditto.
23433 (UNSPEC_SM3SS1): New unspec.
23434 (UNSPEC_SM3TT1A): Ditto.
23435 (UNSPEC_SM3TT1B): Ditto.
23436 (UNSPEC_SM3TT2A): Ditto.
23437 (UNSPEC_SM3TT2B): Ditto.
23438 (UNSPEC_SM3PARTW1): Ditto.
23439 (UNSPEC_SM3PARTW2): Ditto.
23440 (UNSPEC_SM4E): Ditto.
23441 (UNSPEC_SM4EKEY): Ditto.
23442 * config/aarch64/constraints.md (Ui2): New constraint.
23443 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23444 * config/arm/types.md (crypto_sm3): New type attribute.
23445 (crypto_sm4): Ditto.
23446 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23447 (vsm3tt1aq_u32): Ditto.
23448 (vsm3tt1bq_u32): Ditto.
23449 (vsm3tt2aq_u32): Ditto.
23450 (vsm3tt2bq_u32): Ditto.
23451 (vsm3partw1q_u32): Ditto.
23452 (vsm3partw2q_u32): Ditto.
23453 (vsm4eq_u32): Ditto.
23454 (vsm4ekeyq_u32): Ditto.
23455 (doc/invoke.texi): Document new sm4 option.
23457 2018-01-10 Michael Collison <michael.collison@arm.com>
23459 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23460 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23461 (AARCH64_FL_FOR_ARCH8_4): New.
23462 (AARCH64_FL_V8_4): New flag.
23463 (doc/invoke.texi): Document new armv8.4-a option.
23465 2018-01-10 Michael Collison <michael.collison@arm.com>
23467 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23468 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23469 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23470 * config/aarch64/aarch64-option-extension.def: Add
23471 AARCH64_OPT_EXTENSION of 'sha2'.
23472 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23473 (crypto): Disable sha2 and aes if crypto disabled.
23474 (crypto): Enable aes and sha2 if enabled.
23475 (simd): Disable sha2 and aes if simd disabled.
23476 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23478 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23479 (TARGET_SHA2): New feature flag for sha2.
23480 (TARGET_AES): New feature flag for aes.
23481 * config/aarch64/aarch64-simd.md:
23482 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23483 conditional on TARGET_AES.
23484 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23485 (aarch64_crypto_sha1hsi): Make pattern conditional
23487 (aarch64_crypto_sha1hv4si): Ditto.
23488 (aarch64_be_crypto_sha1hv4si): Ditto.
23489 (aarch64_crypto_sha1su1v4si): Ditto.
23490 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23491 (aarch64_crypto_sha1su0v4si): Ditto.
23492 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23493 (aarch64_crypto_sha256su0v4si): Ditto.
23494 (aarch64_crypto_sha256su1v4si): Ditto.
23495 (doc/invoke.texi): Document new aes and sha2 options.
23497 2018-01-10 Martin Sebor <msebor@redhat.com>
23499 PR tree-optimization/83781
23500 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23503 2018-01-11 Martin Sebor <msebor@gmail.com>
23504 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23506 PR tree-optimization/83501
23507 PR tree-optimization/81703
23509 * tree-ssa-strlen.c (get_string_cst): Rename...
23510 (get_string_len): ...to this. Handle global constants.
23511 (handle_char_store): Adjust.
23513 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23514 Jim Wilson <jimw@sifive.com>
23516 * config/riscv/riscv-protos.h (riscv_output_return): New.
23517 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23518 (riscv_attribute_table, riscv_output_return),
23519 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23520 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23521 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23523 (riscv_expand_prologue): Add early return for naked function.
23524 (riscv_expand_epilogue): Likewise.
23525 (riscv_function_ok_for_sibcall): Return false for naked function.
23526 (riscv_set_current_function): New.
23527 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23528 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23529 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23530 * doc/extend.texi (RISC-V Function Attributes): New.
23532 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23534 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23535 check for 128-bit long double before checking TCmode.
23536 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23537 128-bit long doubles before checking TFmode or TCmode.
23538 (FLOAT128_IBM_P): Likewise.
23540 2018-01-10 Martin Sebor <msebor@redhat.com>
23542 PR tree-optimization/83671
23543 * builtins.c (c_strlen): Unconditionally return zero for the empty
23545 Use -Warray-bounds for warnings.
23546 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23547 for non-constant array indices with COMPONENT_REF, arrays of
23548 arrays, and pointers to arrays.
23549 (gimple_fold_builtin_strlen): Determine and set length range for
23550 non-constant character arrays.
23552 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23554 PR middle-end/81897
23555 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23558 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23560 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23562 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23565 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23566 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23567 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23568 indexed_or_indirect_operand predicate.
23569 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23570 (*vsx_le_perm_load_v8hi): Likewise.
23571 (*vsx_le_perm_load_v16qi): Likewise.
23572 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23573 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23574 (*vsx_le_perm_store_v8hi): Likewise.
23575 (*vsx_le_perm_store_v16qi): Likewise.
23576 (eight unnamed splitters): Likewise.
23578 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23580 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23581 * config/rs6000/emmintrin.h: Likewise.
23582 * config/rs6000/mmintrin.h: Likewise.
23583 * config/rs6000/xmmintrin.h: Likewise.
23585 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23588 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23590 * tree.c (tree_nop_conversion): Return true for location wrapper
23592 (maybe_wrap_with_location): New function.
23593 (selftest::check_strip_nops): New function.
23594 (selftest::test_location_wrappers): New function.
23595 (selftest::tree_c_tests): Call it.
23596 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23597 (maybe_wrap_with_location): New decl.
23598 (EXPR_LOCATION_WRAPPER_P): New macro.
23599 (location_wrapper_p): New inline function.
23600 (tree_strip_any_location_wrapper): New inline function.
23602 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23605 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23606 stack_realign_offset for the largest alignment of stack slot
23608 (ix86_find_max_used_stack_alignment): New function.
23609 (ix86_finalize_stack_frame_flags): Use it. Set
23610 max_used_stack_alignment if we don't realign stack.
23611 * config/i386/i386.h (machine_function): Add
23612 max_used_stack_alignment.
23614 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23616 * config/arm/arm.opt (-mbranch-cost): New option.
23617 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23620 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23623 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23624 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23626 2018-01-10 Richard Biener <rguenther@suse.de>
23629 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23630 early out so it also covers the case where we have a non-NULL
23633 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23635 PR tree-optimization/83753
23636 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23637 for non-strided grouped accesses if the number of elements is 1.
23639 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23642 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23643 * i386.h (TARGET_USE_GATHER): Define.
23644 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23646 2018-01-10 Martin Liska <mliska@suse.cz>
23649 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23650 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23652 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23653 CLEANUP_NO_PARTITIONING is not set.
23655 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23657 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23658 for vectors, as a partial revert of r254296.
23659 * rtl.h (const_vec_p): Delete.
23660 (const_vec_duplicate_p): Don't test for vector CONSTs.
23661 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23662 * expmed.c (make_tree): Likewise.
23665 * common.md (E, F): Use CONSTANT_P instead of checking for
23667 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23668 checking for CONST_VECTOR.
23670 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23672 PR middle-end/83575
23673 * predict.c (force_edge_cold): Handle in more sane way edges
23674 with no prediction.
23676 2018-01-09 Carl Love <cel@us.ibm.com>
23678 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23680 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23681 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23682 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23683 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23684 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23685 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23686 * config/rs6000/rs6000-protos.h: Add extern defition for
23687 rs6000_generate_float2_double_code.
23688 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23690 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23691 (float2_v2df): Add define_expand.
23693 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23696 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23697 op_mode in the force_to_mode call.
23699 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23701 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23702 instead of checking each element individually.
23703 (aarch64_evpc_uzp): Likewise.
23704 (aarch64_evpc_zip): Likewise.
23705 (aarch64_evpc_ext): Likewise.
23706 (aarch64_evpc_rev): Likewise.
23707 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23708 instead of checking each element individually. Return true without
23710 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23711 whether all selected elements come from the same input, instead of
23712 checking each element individually. Remove calls to gen_rtx_REG,
23713 start_sequence and end_sequence and instead assert that no rtl is
23716 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23718 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23719 order of HIGH and CONST checks.
23721 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23723 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23724 if the destination isn't an SSA_NAME.
23726 2018-01-09 Richard Biener <rguenther@suse.de>
23728 PR tree-optimization/83668
23729 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23731 (canonicalize_loop_form): ... here, renamed from ...
23732 (canonicalize_loop_closed_ssa_form): ... this and amended to
23733 swap successor edges for loop exit blocks to make us use
23734 the RPO order we need for initial schedule generation.
23736 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23738 PR tree-optimization/64811
23739 * match.pd: When optimizing comparisons with Inf, avoid
23740 introducing or losing exceptions from comparisons with NaN.
23742 2018-01-09 Martin Liska <mliska@suse.cz>
23745 * asan.c (shadow_mem_size): Add gcc_assert.
23747 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23749 Don't save registers in main().
23752 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23753 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23754 * config/avr/avr.c (avr_set_current_function): Don't error if
23755 naked, OS_task or OS_main are specified at the same time.
23756 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23758 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23760 * common/config/avr/avr-common.c (avr_option_optimization_table):
23761 Switch on -mmain-is-OS_task for optimizing compilations.
23763 2018-01-09 Richard Biener <rguenther@suse.de>
23765 PR tree-optimization/83572
23766 * graphite.c: Include cfganal.h.
23767 (graphite_transform_loops): Connect infinite loops to exit
23768 and remove fake edges at the end.
23770 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23772 * ipa-inline.c (edge_badness): Revert accidental checkin.
23774 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23777 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23778 symbols; not inline clones.
23780 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23783 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23784 hard registers. Formatting fixes.
23786 PR preprocessor/83722
23787 * gcc.c (try_generate_repro): Pass
23788 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23789 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23792 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23793 Kito Cheng <kito.cheng@gmail.com>
23795 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23796 (riscv_leaf_function_p): Delete.
23797 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23799 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23801 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23803 (do_ifelse): New function.
23804 (do_isel): New function.
23805 (do_sub3): New function.
23806 (do_add3): New function.
23807 (do_load_mask_compare): New function.
23808 (do_overlap_load_compare): New function.
23809 (expand_compare_loop): New function.
23810 (expand_block_compare): Call expand_compare_loop() when appropriate.
23811 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23812 option description.
23813 (-mblock-compare-inline-loop-limit): New option.
23815 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23818 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23819 Reverse order of second and third operands in first alternative.
23820 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23821 of first and second elements in UNSPEC_VPERMR vector.
23822 (altivec_expand_vec_perm_le): Likewise.
23824 2018-01-08 Jeff Law <law@redhat.com>
23826 PR rtl-optimizatin/81308
23827 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23828 (process_switch): If group_case_labels makes a change, then set
23830 (pass_convert_switch::execute): If a switch is converted, then
23831 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23833 PR rtl-optimization/81308
23834 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23837 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23839 PR target/83663 - Revert r255946
23840 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23841 generation for cases where splatting a value is not useful.
23842 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23843 across a vec_duplicate and a paradoxical subreg forming a vector
23844 mode to a vec_concat.
23846 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23848 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23849 -march=armv8.3-a variants.
23850 * config/arm/t-multilib: Likewise.
23851 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23853 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23855 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23857 (cceq_ior_compare_complement): Give it a name so I can use it, and
23858 change boolean_or_operator predicate to boolean_operator so it can
23859 be used to generate a crand.
23860 (eqne): New code iterator.
23861 (bd/bd_neg): New code_attrs.
23862 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23863 a single define_insn.
23864 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23865 decrement (bdnzt/bdnzf/bdzt/bdzf).
23866 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23867 with the new names of the branch decrement patterns, and added the
23868 names of the branch decrement conditional patterns.
23870 2018-01-08 Richard Biener <rguenther@suse.de>
23872 PR tree-optimization/83563
23873 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23876 2018-01-08 Richard Biener <rguenther@suse.de>
23878 PR middle-end/83713
23879 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23881 2018-01-08 Richard Biener <rguenther@suse.de>
23883 PR tree-optimization/83685
23884 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23885 references to abnormals.
23887 2018-01-08 Richard Biener <rguenther@suse.de>
23890 * dwarf2out.c (output_indirect_strings): Handle empty
23891 skeleton_debug_str_hash.
23892 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23894 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23896 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23897 (emit_store_direct): Likewise.
23898 (arc_trampoline_adjust_address): Likewise.
23899 (arc_asm_trampoline_template): New function.
23900 (arc_initialize_trampoline): Use asm_trampoline_template.
23901 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23902 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23903 * config/arc/arc.md (flush_icache): Delete pattern.
23905 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23907 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23908 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23911 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23914 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23915 by not USED_FOR_TARGET.
23916 (make_pass_resolve_sw_modes): Likewise.
23918 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23920 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23923 2018-01-08 Richard Biener <rguenther@suse.de>
23925 PR middle-end/83580
23926 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23928 2018-01-08 Richard Biener <rguenther@suse.de>
23930 PR middle-end/83517
23931 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23933 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23935 PR middle-end/81897
23936 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23937 basic blocks with a small number of successors.
23938 (convert_control_dep_chain_into_preds): Improve handling of
23940 (dump_predicates): Split apart into...
23941 (dump_pred_chain): ...here...
23942 (dump_pred_info): ...and here.
23943 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23944 (can_chain_union_be_invalidated_p): Improve check for invalidation
23946 (uninit_uses_cannot_happen): Avoid unnecessary if
23947 convert_control_dep_chain_into_preds yielded nothing.
23949 2018-01-06 Martin Sebor <msebor@redhat.com>
23951 PR tree-optimization/83640
23952 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23953 subtracting negative offset from size.
23954 (builtin_access::overlap): Adjust offset bounds of the access to fall
23955 within the size of the object if possible.
23957 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23959 PR rtl-optimization/83699
23960 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23961 extract_bit_field_as_subreg to cases in which the extracted
23962 value is also a vector.
23964 * lra-constraints.c (process_alt_operands): Test for the equivalence
23965 substitutions when detecting a possible reload cycle.
23967 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23970 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23971 by default if flag_selective_schedling{,2}. Formatting fixes.
23973 PR rtl-optimization/83682
23974 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23975 if it has non-VECTOR_MODE element mode.
23976 (vec_duplicate_p): Likewise.
23978 PR middle-end/83694
23979 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23980 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23982 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23985 * config/i386/i386-builtin.def
23986 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23987 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23988 Require also OPTION_MASK_ISA_AVX512F in addition to
23989 OPTION_MASK_ISA_GFNI.
23990 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23991 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23992 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23993 to OPTION_MASK_ISA_GFNI.
23994 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23995 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23996 OPTION_MASK_ISA_AVX512BW.
23997 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23998 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23999 addition to OPTION_MASK_ISA_GFNI.
24000 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24001 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24002 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24003 to OPTION_MASK_ISA_GFNI.
24004 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24005 a requirement for all ISAs rather than any of them with a few
24007 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24009 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24010 bitmasks to be enabled with 3 exceptions, instead of requiring any
24011 enabled ISA with lots of exceptions.
24012 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24013 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24014 Change avx512bw in isa attribute to avx512f.
24015 * config/i386/sgxintrin.h: Add license boilerplate.
24016 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24017 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24018 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24019 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24021 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24022 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24023 temporarily sse2 rather than sse if not enabled already.
24026 * config/i386/sse.md (VI248_VLBW): Rename to ...
24027 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24028 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24029 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24030 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24031 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24032 mode iterator instead of VI248_VLBW.
24034 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24036 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24037 (record_modified): Skip clobbers; add debug output.
24038 (param_change_prob): Use sreal frequencies.
24040 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24042 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24043 punt for user-aligned variables.
24045 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24047 * tree-chrec.c (chrec_contains_symbols): Return true for
24050 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24053 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24054 of (x|y) == x for BICS pattern.
24056 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24058 PR tree-optimization/83605
24059 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24060 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24063 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24065 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24066 * config/epiphany/rtems.h: New file.
24068 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24069 Uros Bizjak <ubizjak@gmail.com>
24072 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24073 QIreg_operand instead of register_operand predicate.
24074 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24075 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24076 comments instead of -fmitigate[-_]rop.
24078 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24081 * cgraphunit.c (symbol_table::compile): Switch to text_section
24082 before calling assembly_start debug hook.
24083 * run-rtl-passes.c (run_rtl_passes): Likewise.
24086 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24088 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24089 range_int_cst_p rather than !symbolic_range_p before calling
24090 extract_range_from_multiplicative_op_1.
24092 2018-01-04 Jeff Law <law@redhat.com>
24094 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24095 redundant test in assertion.
24097 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24099 * doc/rtl.texi: Document machine_mode wrapper classes.
24101 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24103 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24104 using tree_to_uhwi.
24106 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24108 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24109 the VEC_PERM_EXPR fold to fail.
24111 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24114 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24115 to switched_sections.
24117 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24120 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24121 test for d.testing.
24123 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24126 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24127 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24129 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24132 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24133 is BLKmode and bitpos not zero or mode change is needed.
24135 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24138 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24141 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24144 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24145 instead of MULT rtx. Update all corresponding splitters.
24146 (*saddl_se): Ditto.
24147 (*ssub<modesuffix>): Ditto.
24148 (*ssubl_se): Ditto.
24149 (*cmp_sadd_di): Update split patterns.
24150 (*cmp_sadd_si): Ditto.
24151 (*cmp_sadd_sidi): Ditto.
24152 (*cmp_ssub_di): Ditto.
24153 (*cmp_ssub_si): Ditto.
24154 (*cmp_ssub_sidi): Ditto.
24155 * config/alpha/predicates.md (const23_operand): New predicate.
24156 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24157 Look for ASHIFT, not MULT inner operand.
24158 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24160 2018-01-04 Martin Liska <mliska@suse.cz>
24162 PR gcov-profile/83669
24163 * gcov.c (output_intermediate_file): Add version to intermediate
24165 * doc/gcov.texi: Document new field 'version' in intermediate
24166 file format. Fix location of '-k' option of gcov command.
24168 2018-01-04 Martin Liska <mliska@suse.cz>
24171 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24173 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24175 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24177 2018-01-03 Martin Sebor <msebor@redhat.com>
24179 PR tree-optimization/83655
24180 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24181 checking calls with invalid arguments.
24183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24185 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24186 (vectorizable_mask_load_store): Delete.
24187 (vectorizable_call): Return false for masked loads and stores.
24188 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24189 instead of gimple_assign_rhs1.
24190 (vectorizable_load): Handle IFN_MASK_LOAD.
24191 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24193 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24195 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24197 (vectorizable_mask_load_store): ...here.
24198 (vectorizable_load): ...and here.
24200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24202 * tree-vect-stmts.c (vect_build_all_ones_mask)
24203 (vect_build_zero_merge_argument): New functions, split out from...
24204 (vectorizable_load): ...here.
24206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24208 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24210 (vectorizable_mask_load_store): ...here.
24211 (vectorizable_store): ...and here.
24213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24215 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24217 (vectorizable_mask_load_store): ...here.
24219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24221 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24222 (vect_model_store_cost): Take a vec_load_store_type instead of a
24224 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24225 (vect_model_store_cost): Take a vec_load_store_type instead of a
24227 (vectorizable_mask_load_store): Update accordingly.
24228 (vectorizable_store): Likewise.
24229 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24233 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24234 IFN_MASK_LOAD calls here rather than...
24235 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24238 Alan Hayward <alan.hayward@arm.com>
24239 David Sherwood <david.sherwood@arm.com>
24241 * expmed.c (extract_bit_field_1): For vector extracts,
24242 fall back to extract_bit_field_as_subreg if vec_extract
24245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24246 Alan Hayward <alan.hayward@arm.com>
24247 David Sherwood <david.sherwood@arm.com>
24249 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24250 they are variable or constant sized.
24251 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24252 slots for constant-sized data.
24254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24255 Alan Hayward <alan.hayward@arm.com>
24256 David Sherwood <david.sherwood@arm.com>
24258 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24259 handling COND_EXPRs with boolean comparisons, try to find a better
24260 basis for the mask type than the boolean itself.
24262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24264 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24265 is calculated and how it can be overridden.
24266 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24267 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24269 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24273 Alan Hayward <alan.hayward@arm.com>
24274 David Sherwood <david.sherwood@arm.com>
24276 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24277 Remove the mode argument.
24278 (aarch64_simd_valid_immediate): Remove the mode and inverse
24280 * config/aarch64/iterators.md (bitsize): New iterator.
24281 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24282 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24283 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24284 aarch64_simd_valid_immediate.
24285 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24286 (aarch64_reg_or_bic_imm): Likewise.
24287 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24288 with an insn_type enum and msl with a modifier_type enum.
24289 Replace element_width with a scalar_mode. Change the shift
24290 to unsigned int. Add constructors for scalar_float_mode and
24291 scalar_int_mode elements.
24292 (aarch64_vect_float_const_representable_p): Delete.
24293 (aarch64_can_const_movi_rtx_p)
24294 (aarch64_simd_scalar_immediate_valid_for_move)
24295 (aarch64_simd_make_constant): Update call to
24296 aarch64_simd_valid_immediate.
24297 (aarch64_advsimd_valid_immediate_hs): New function.
24298 (aarch64_advsimd_valid_immediate): Likewise.
24299 (aarch64_simd_valid_immediate): Remove mode and inverse
24300 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24301 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24302 and aarch64_float_const_representable_p on the result.
24303 (aarch64_output_simd_mov_immediate): Remove mode argument.
24304 Update call to aarch64_simd_valid_immediate and use of
24305 simd_immediate_info.
24306 (aarch64_output_scalar_simd_mov_immediate): Update call
24309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24310 Alan Hayward <alan.hayward@arm.com>
24311 David Sherwood <david.sherwood@arm.com>
24313 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24314 (mode_nunits): Likewise CONST_MODE_NUNITS.
24315 * machmode.def (ADJUST_NUNITS): Document.
24316 * genmodes.c (mode_data::need_nunits_adj): New field.
24317 (blank_mode): Update accordingly.
24318 (adj_nunits): New variable.
24319 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24321 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24322 listed in adj_nunits.
24323 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24324 listed in adj_nunits. Don't emit case statements for such modes.
24325 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24326 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24327 nothing if adj_nunits is nonnull.
24328 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24329 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24330 (emit_mode_fbit): Update use of print_maybe_const_decl.
24331 (emit_move_size): Likewise. Treat the array as non-const
24333 (emit_mode_adjustments): Handle adj_nunits.
24335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24337 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24338 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24339 (VECTOR_MODES): Use it.
24340 (make_vector_modes): Take the prefix as an argument.
24342 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24343 Alan Hayward <alan.hayward@arm.com>
24344 David Sherwood <david.sherwood@arm.com>
24346 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24347 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24348 for MODE_VECTOR_BOOL.
24349 * machmode.def (VECTOR_BOOL_MODE): Document.
24350 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24351 (make_vector_bool_mode): New function.
24352 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24354 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24355 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24357 * stor-layout.c (int_mode_for_mode): Likewise.
24358 * tree.c (build_vector_type_for_mode): Likewise.
24359 * varasm.c (output_constant_pool_2): Likewise.
24360 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24361 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24362 for MODE_VECTOR_BOOL.
24363 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24364 of mode class checks.
24365 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24366 instead of a list of mode class checks.
24367 (expand_vector_scalar_condition): Likewise.
24368 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24371 Alan Hayward <alan.hayward@arm.com>
24372 David Sherwood <david.sherwood@arm.com>
24374 * machmode.h (mode_size): Change from unsigned short to
24376 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24377 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24378 or if measurement_type is not polynomial.
24379 (fixed_size_mode::includes_p): Check for constant-sized modes.
24380 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24381 return a poly_uint16 rather than an unsigned short.
24382 (emit_mode_size): Change the type of mode_size from unsigned short
24383 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24384 (emit_mode_adjustments): Cope with polynomial vector sizes.
24385 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24387 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24389 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24390 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24391 * caller-save.c (setup_save_areas): Likewise.
24392 (replace_reg_with_saved_mem): Likewise.
24393 * calls.c (emit_library_call_value_1): Likewise.
24394 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24395 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24396 (gen_lowpart_for_combine): Likewise.
24397 * convert.c (convert_to_integer_1): Likewise.
24398 * cse.c (equiv_constant, cse_insn): Likewise.
24399 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24400 (cselib_subst_to_values): Likewise.
24401 * dce.c (word_dce_process_block): Likewise.
24402 * df-problems.c (df_word_lr_mark_ref): Likewise.
24403 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24404 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24405 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24406 (rtl_for_decl_location): Likewise.
24407 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24408 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24409 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24410 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24411 (expand_expr_real_1): Likewise.
24412 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24413 (pad_below): Likewise.
24414 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24415 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24416 * ira.c (get_subreg_tracking_sizes): Likewise.
24417 * ira-build.c (ira_create_allocno_objects): Likewise.
24418 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24419 (ira_sort_regnos_for_alter_reg): Likewise.
24420 * ira-costs.c (record_operand_costs): Likewise.
24421 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24422 (resolve_simple_move): Likewise.
24423 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24424 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24425 (lra_constraints): Likewise.
24426 (CONST_POOL_OK_P): Reject variable-sized modes.
24427 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24428 (add_pseudo_to_slot, lra_spill): Likewise.
24429 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24430 * optabs-query.c (get_best_extraction_insn): Likewise.
24431 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24432 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24433 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24434 * recog.c (offsettable_address_addr_space_p): Likewise.
24435 * regcprop.c (maybe_mode_change): Likewise.
24436 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24437 * regrename.c (build_def_use): Likewise.
24438 * regstat.c (dump_reg_info): Likewise.
24439 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24440 (find_reloads, find_reloads_subreg_address): Likewise.
24441 * reload1.c (eliminate_regs_1): Likewise.
24442 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24443 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24444 (simplify_binary_operation_1, simplify_subreg): Likewise.
24445 * targhooks.c (default_function_arg_padding): Likewise.
24446 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24447 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24448 (verify_gimple_assign_ternary): Likewise.
24449 * tree-inline.c (estimate_move_cost): Likewise.
24450 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24451 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24452 (get_address_cost_ainc): Likewise.
24453 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24454 (vect_supportable_dr_alignment): Likewise.
24455 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24456 (vectorizable_reduction): Likewise.
24457 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24458 (vectorizable_operation, vectorizable_load): Likewise.
24459 * tree.c (build_same_sized_truth_vector_type): Likewise.
24460 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24461 * var-tracking.c (emit_note_insn_var_location): Likewise.
24462 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24463 (ADDR_VEC_ALIGN): Likewise.
24465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24466 Alan Hayward <alan.hayward@arm.com>
24467 David Sherwood <david.sherwood@arm.com>
24469 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24471 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24472 or if measurement_type is polynomial.
24473 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24474 * combine.c (make_extraction): Likewise.
24475 * dse.c (find_shift_sequence): Likewise.
24476 * dwarf2out.c (mem_loc_descriptor): Likewise.
24477 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24478 (extract_bit_field, extract_low_bits): Likewise.
24479 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24480 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24481 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24482 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24483 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24484 * reload.c (find_reloads): Likewise.
24485 * reload1.c (alter_reg): Likewise.
24486 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24487 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24488 * tree-if-conv.c (predicate_mem_writes): Likewise.
24489 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24490 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24491 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24492 * valtrack.c (dead_debug_insert_temp): Likewise.
24493 * varasm.c (mergeable_constant_section): Likewise.
24494 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24497 Alan Hayward <alan.hayward@arm.com>
24498 David Sherwood <david.sherwood@arm.com>
24500 * expr.c (expand_assignment): Cope with polynomial mode sizes
24501 when assigning to a CONCAT.
24503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24504 Alan Hayward <alan.hayward@arm.com>
24505 David Sherwood <david.sherwood@arm.com>
24507 * machmode.h (mode_precision): Change from unsigned short to
24509 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24511 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24512 or if measurement_type is not polynomial.
24513 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24514 in which the mode is already known to be a scalar_int_mode.
24515 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24516 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24518 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24519 for GET_MODE_PRECISION.
24520 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24521 for GET_MODE_PRECISION.
24522 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24524 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24525 (expand_field_assignment, make_extraction): Likewise.
24526 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24527 (get_last_value): Likewise.
24528 * convert.c (convert_to_integer_1): Likewise.
24529 * cse.c (cse_insn): Likewise.
24530 * expr.c (expand_expr_real_1): Likewise.
24531 * lra-constraints.c (simplify_operand_subreg): Likewise.
24532 * optabs-query.c (can_atomic_load_p): Likewise.
24533 * optabs.c (expand_atomic_load): Likewise.
24534 (expand_atomic_store): Likewise.
24535 * ree.c (combine_reaching_defs): Likewise.
24536 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24537 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24538 * tree.h (type_has_mode_precision_p): Likewise.
24539 * ubsan.c (instrument_si_overflow): Likewise.
24541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24542 Alan Hayward <alan.hayward@arm.com>
24543 David Sherwood <david.sherwood@arm.com>
24545 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24546 polynomial numbers of units.
24547 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24548 (valid_vector_subparts_p): New function.
24549 (build_vector_type): Remove temporary shim and take the number
24550 of units as a poly_uint64 rather than an int.
24551 (build_opaque_vector_type): Take the number of units as a
24552 poly_uint64 rather than an int.
24553 * tree.c (build_vector_from_ctor): Handle polynomial
24554 TYPE_VECTOR_SUBPARTS.
24555 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24556 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24557 (build_vector_from_val): If the number of units is variable,
24558 use build_vec_duplicate_cst for constant operands and
24559 VEC_DUPLICATE_EXPR otherwise.
24560 (make_vector_type): Remove temporary is_constant ().
24561 (build_vector_type, build_opaque_vector_type): Take the number of
24562 units as a poly_uint64 rather than an int.
24563 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24565 * cfgexpand.c (expand_debug_expr): Likewise.
24566 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24567 (store_constructor, expand_expr_real_1): Likewise.
24568 (const_scalar_mask_from_tree): Likewise.
24569 * fold-const-call.c (fold_const_reduction): Likewise.
24570 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24571 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24572 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24573 (fold_relational_const): Likewise.
24574 (native_interpret_vector): Likewise. Change the size from an
24575 int to an unsigned int.
24576 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24577 TYPE_VECTOR_SUBPARTS.
24578 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24579 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24580 duplicating a non-constant operand into a variable-length vector.
24581 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24582 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24583 * ipa-icf.c (sem_variable::equals): Likewise.
24584 * match.pd: Likewise.
24585 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24586 * print-tree.c (print_node): Likewise.
24587 * stor-layout.c (layout_type): Likewise.
24588 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24589 * tree-cfg.c (verify_gimple_comparison): Likewise.
24590 (verify_gimple_assign_binary): Likewise.
24591 (verify_gimple_assign_ternary): Likewise.
24592 (verify_gimple_assign_single): Likewise.
24593 * tree-pretty-print.c (dump_generic_node): Likewise.
24594 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24595 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24596 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24597 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24598 (vect_shift_permute_load_chain): Likewise.
24599 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24600 (expand_vector_condition, optimize_vector_constructor): Likewise.
24601 (lower_vec_perm, get_compute_type): Likewise.
24602 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24603 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24604 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24605 (vect_recog_mask_conversion_pattern): Likewise.
24606 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24607 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24608 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24609 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24610 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24611 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24612 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24613 (supportable_widening_operation): Likewise.
24614 (supportable_narrowing_operation): Likewise.
24615 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24617 * varasm.c (output_constant): Likewise.
24619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24620 Alan Hayward <alan.hayward@arm.com>
24621 David Sherwood <david.sherwood@arm.com>
24623 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24624 so that both the length == 3 and length != 3 cases set up their
24625 own permute vectors. Add comments explaining why we know the
24626 number of elements is constant.
24627 (vect_permute_load_chain): Likewise.
24629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24630 Alan Hayward <alan.hayward@arm.com>
24631 David Sherwood <david.sherwood@arm.com>
24633 * machmode.h (mode_nunits): Change from unsigned char to
24635 (ONLY_FIXED_SIZE_MODES): New macro.
24636 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24637 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24638 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24640 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24641 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24642 or if measurement_type is not polynomial.
24643 * genmodes.c (ZERO_COEFFS): New macro.
24644 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24646 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24647 Use ZERO_COEFFS when emitting initializers.
24648 * data-streamer.h (bp_pack_poly_value): New function.
24649 (bp_unpack_poly_value): Likewise.
24650 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24651 for GET_MODE_NUNITS.
24652 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24653 for GET_MODE_NUNITS.
24654 * tree.c (make_vector_type): Remove temporary shim and make
24655 the real function take the number of units as a poly_uint64
24656 rather than an int.
24657 (build_vector_type_for_mode): Handle polynomial nunits.
24658 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24659 * emit-rtl.c (const_vec_series_p_1): Likewise.
24660 (gen_rtx_CONST_VECTOR): Likewise.
24661 * fold-const.c (test_vec_duplicate_folding): Likewise.
24662 * genrecog.c (validate_pattern): Likewise.
24663 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24664 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24665 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24666 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24667 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24668 * rtlanal.c (subreg_get_info): Likewise.
24669 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24670 (vect_grouped_load_supported): Likewise.
24671 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24672 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24673 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24674 (simplify_const_unary_operation, simplify_binary_operation_1)
24675 (simplify_const_binary_operation, simplify_ternary_operation)
24676 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24677 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24678 instead of CONST_VECTOR_NUNITS.
24679 * varasm.c (output_constant_pool_2): Likewise.
24680 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24681 explicit-encoded elements in the XVEC for variable-length vectors.
24683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24685 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24688 Alan Hayward <alan.hayward@arm.com>
24689 David Sherwood <david.sherwood@arm.com>
24691 * coretypes.h (fixed_size_mode): Declare.
24692 (fixed_size_mode_pod): New typedef.
24693 * builtins.h (target_builtins::x_apply_args_mode)
24694 (target_builtins::x_apply_result_mode): Change type to
24695 fixed_size_mode_pod.
24696 * builtins.c (apply_args_size, apply_result_size, result_vector)
24697 (expand_builtin_apply_args_1, expand_builtin_apply)
24698 (expand_builtin_return): Update accordingly.
24700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24702 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24703 * cselib.c (cselib_hash_rtx): Likewise.
24704 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24705 CONST_VECTOR encoding.
24707 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24708 Jeff Law <law@redhat.com>
24711 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24712 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24713 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24714 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24717 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24718 explicitly probe *sp in a noreturn function if there were any callee
24719 register saves or frame pointer is needed.
24721 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24724 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24725 BLKmode for ternary, binary or unary expressions.
24728 * var-tracking.c (delete_vta_debug_insn): New inline function.
24729 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24730 insns from get_insns () to NULL instead of each bb separately.
24731 Use delete_vta_debug_insn. No longer static.
24732 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24733 delete_vta_debug_insns callers.
24734 * rtl.h (delete_vta_debug_insns): Declare.
24735 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24736 instead of variable_tracking_main.
24738 2018-01-03 Martin Sebor <msebor@redhat.com>
24740 PR tree-optimization/83603
24741 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24742 arguments past the endof the argument list in functions declared
24743 without a prototype.
24744 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24745 Avoid checking when arguments are null.
24747 2018-01-03 Martin Sebor <msebor@redhat.com>
24750 * doc/extend.texi (attribute const): Fix a typo.
24751 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24752 issuing -Wsuggest-attribute for void functions.
24754 2018-01-03 Martin Sebor <msebor@redhat.com>
24756 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24757 offset_int::from instead of wide_int::to_shwi.
24758 (maybe_diag_overlap): Remove assertion.
24759 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24760 * gimple-ssa-sprintf.c (format_directive): Same.
24761 (parse_directive): Same.
24762 (sprintf_dom_walker::compute_format_length): Same.
24763 (try_substitute_return_value): Same.
24765 2018-01-03 Jeff Law <law@redhat.com>
24767 PR middle-end/83654
24768 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24769 non-constant residual for zero at runtime and avoid probing in
24770 that case. Reorganize code for trailing problem to mirror handling
24773 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24775 PR tree-optimization/83501
24776 * tree-ssa-strlen.c (get_string_cst): New.
24777 (handle_char_store): Call get_string_cst.
24779 2018-01-03 Martin Liska <mliska@suse.cz>
24781 PR tree-optimization/83593
24782 * tree-ssa-strlen.c: Include tree-cfg.h.
24783 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24784 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24785 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24787 (strlen_dom_walker::before_dom_children): Call
24788 gimple_purge_dead_eh_edges. Dump tranformation with details
24790 (strlen_dom_walker::before_dom_children): Update call by adding
24791 new argument cleanup_eh.
24792 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24794 2018-01-03 Martin Liska <mliska@suse.cz>
24797 * cif-code.def (VARIADIC_THUNK): New enum value.
24798 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24801 2018-01-03 Jan Beulich <jbeulich@suse.com>
24803 * sse.md (mov<mode>_internal): Tighten condition for when to use
24804 vmovdqu<ssescalarsize> for TI and OI modes.
24806 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24808 Update copyright years.
24810 2018-01-03 Martin Liska <mliska@suse.cz>
24813 * ipa-visibility.c (function_and_variable_visibility): Skip
24814 functions with noipa attribure.
24816 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24818 * gcc.c (process_command): Update copyright notice dates.
24819 * gcov-dump.c (print_version): Ditto.
24820 * gcov.c (print_version): Ditto.
24821 * gcov-tool.c (print_version): Ditto.
24822 * gengtype.c (create_file): Ditto.
24823 * doc/cpp.texi: Bump @copying's copyright year.
24824 * doc/cppinternals.texi: Ditto.
24825 * doc/gcc.texi: Ditto.
24826 * doc/gccint.texi: Ditto.
24827 * doc/gcov.texi: Ditto.
24828 * doc/install.texi: Ditto.
24829 * doc/invoke.texi: Ditto.
24831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24833 * vector-builder.h (vector_builder::m_full_nelts): Change from
24834 unsigned int to poly_uint64.
24835 (vector_builder::full_nelts): Update prototype accordingly.
24836 (vector_builder::new_vector): Likewise.
24837 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24838 (vector_builder::operator ==): Likewise.
24839 (vector_builder::finalize): Likewise.
24840 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24841 Take the number of elements as a poly_uint64 rather than an
24843 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24844 from unsigned int to poly_uint64.
24845 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24846 (vec_perm_indices::new_vector): Likewise.
24847 (vec_perm_indices::length): Likewise.
24848 (vec_perm_indices::nelts_per_input): Likewise.
24849 (vec_perm_indices::input_nelts): Likewise.
24850 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24851 number of elements per input as a poly_uint64 rather than an
24852 unsigned int. Use the original encoding for variable-length
24853 vectors, rather than clamping each individual element.
24854 For the second and subsequent elements in each pattern,
24855 clamp the step and base before clamping their sum.
24856 (vec_perm_indices::series_p): Handle polynomial element counts.
24857 (vec_perm_indices::all_in_range_p): Likewise.
24858 (vec_perm_indices_to_tree): Likewise.
24859 (vec_perm_indices_to_rtx): Likewise.
24860 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24861 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24862 (tree_vector_builder::new_binary_operation): Handle polynomial
24863 element counts. Return false if we need to know the number
24864 of elements at compile time.
24865 * fold-const.c (fold_vec_perm): Punt if the number of elements
24866 isn't known at compile time.
24868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24870 * vec-perm-indices.h (vec_perm_builder): Change element type
24871 from HOST_WIDE_INT to poly_int64.
24872 (vec_perm_indices::element_type): Update accordingly.
24873 (vec_perm_indices::clamp): Handle polynomial element_types.
24874 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24875 (vec_perm_indices::all_in_range_p): Likewise.
24876 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24878 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24879 polynomial vec_perm_indices element types.
24880 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24881 * fold-const.c (fold_vec_perm): Likewise.
24882 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24883 * tree-vect-generic.c (lower_vec_perm): Likewise.
24884 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24885 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24886 element type to HOST_WIDE_INT.
24888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24889 Alan Hayward <alan.hayward@arm.com>
24890 David Sherwood <david.sherwood@arm.com>
24892 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24893 rather than an int. Use plus_constant.
24894 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24895 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24898 Alan Hayward <alan.hayward@arm.com>
24899 David Sherwood <david.sherwood@arm.com>
24901 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24902 a HOST_WIDE_INT to a poly_int64.
24904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24905 Alan Hayward <alan.hayward@arm.com>
24906 David Sherwood <david.sherwood@arm.com>
24908 * calls.c (load_register_parameters): Cope with polynomial
24909 mode sizes. Require a constant size for BLKmode parameters
24910 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24911 forces a parameter to be padded at the lsb end in order to
24912 fill a complete number of words, require the parameter size
24913 to be ordered wrt UNITS_PER_WORD.
24915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24916 Alan Hayward <alan.hayward@arm.com>
24917 David Sherwood <david.sherwood@arm.com>
24919 * reload1.c (spill_stack_slot_width): Change element type
24920 from unsigned int to poly_uint64_pod.
24921 (alter_reg): Treat mode sizes as polynomial.
24923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24924 Alan Hayward <alan.hayward@arm.com>
24925 David Sherwood <david.sherwood@arm.com>
24927 * reload.c (complex_word_subreg_p): New function.
24928 (reload_inner_reg_of_subreg, push_reload): Use it.
24930 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24931 Alan Hayward <alan.hayward@arm.com>
24932 David Sherwood <david.sherwood@arm.com>
24934 * lra-constraints.c (process_alt_operands): Reject matched
24935 operands whose sizes aren't ordered.
24936 (match_reload): Refer to this check here.
24938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24939 Alan Hayward <alan.hayward@arm.com>
24940 David Sherwood <david.sherwood@arm.com>
24942 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24943 that the mode size is in the set {1, 2, 4, 8, 16}.
24945 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24946 Alan Hayward <alan.hayward@arm.com>
24947 David Sherwood <david.sherwood@arm.com>
24949 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24950 Use plus_constant instead of gen_rtx_PLUS.
24952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24953 Alan Hayward <alan.hayward@arm.com>
24954 David Sherwood <david.sherwood@arm.com>
24956 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24957 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24958 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24959 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24960 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24961 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24962 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24963 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24964 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24965 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24967 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24968 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24969 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24970 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24971 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24972 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24973 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24974 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24975 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24976 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24978 * expr.c (emit_move_resolve_push): Treat the input and result
24979 of PUSH_ROUNDING as a poly_int64.
24980 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24981 (emit_push_insn): Likewise.
24982 * lra-eliminations.c (mark_not_eliminable): Likewise.
24983 * recog.c (push_operand): Likewise.
24984 * reload1.c (elimination_effects): Likewise.
24985 * rtlanal.c (nonzero_bits1): Likewise.
24986 * calls.c (store_one_arg): Likewise. Require the padding to be
24987 known at compile time.
24989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24990 Alan Hayward <alan.hayward@arm.com>
24991 David Sherwood <david.sherwood@arm.com>
24993 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24994 Use plus_constant instead of gen_rtx_PLUS.
24996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24997 Alan Hayward <alan.hayward@arm.com>
24998 David Sherwood <david.sherwood@arm.com>
25000 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25001 rather than an int.
25003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25004 Alan Hayward <alan.hayward@arm.com>
25005 David Sherwood <david.sherwood@arm.com>
25007 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25008 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25009 via stack temporaries. Treat the mode size as polynomial too.
25011 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25012 Alan Hayward <alan.hayward@arm.com>
25013 David Sherwood <david.sherwood@arm.com>
25015 * expr.c (expand_expr_real_2): When handling conversions involving
25016 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25017 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25018 as a poly_uint64 too.
25020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25021 Alan Hayward <alan.hayward@arm.com>
25022 David Sherwood <david.sherwood@arm.com>
25024 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25026 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25027 Alan Hayward <alan.hayward@arm.com>
25028 David Sherwood <david.sherwood@arm.com>
25030 * combine.c (can_change_dest_mode): Handle polynomial
25031 REGMODE_NATURAL_SIZE.
25032 * expmed.c (store_bit_field_1): Likewise.
25033 * expr.c (store_constructor): Likewise.
25034 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25035 and polynomial REGMODE_NATURAL_SIZE.
25036 (gen_lowpart_common): Likewise.
25037 * reginfo.c (record_subregs_of_mode): Likewise.
25038 * rtlanal.c (read_modify_subreg_p): Likewise.
25040 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25041 Alan Hayward <alan.hayward@arm.com>
25042 David Sherwood <david.sherwood@arm.com>
25044 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25045 numbers of elements.
25047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25048 Alan Hayward <alan.hayward@arm.com>
25049 David Sherwood <david.sherwood@arm.com>
25051 * match.pd: Cope with polynomial numbers of vector elements.
25053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25054 Alan Hayward <alan.hayward@arm.com>
25055 David Sherwood <david.sherwood@arm.com>
25057 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25058 in a POINTER_PLUS_EXPR.
25060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25061 Alan Hayward <alan.hayward@arm.com>
25062 David Sherwood <david.sherwood@arm.com>
25064 * omp-simd-clone.c (simd_clone_subparts): New function.
25065 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25066 (ipa_simd_modify_function_body): Likewise.
25068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25069 Alan Hayward <alan.hayward@arm.com>
25070 David Sherwood <david.sherwood@arm.com>
25072 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25073 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25074 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25075 (expand_vector_condition, vector_element): Likewise.
25076 (subparts_gt): New function.
25077 (get_compute_type): Use subparts_gt.
25078 (count_type_subparts): Delete.
25079 (expand_vector_operations_1): Use subparts_gt instead of
25080 count_type_subparts.
25082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25083 Alan Hayward <alan.hayward@arm.com>
25084 David Sherwood <david.sherwood@arm.com>
25086 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25087 (vect_compile_time_alias): ...this new function. Do the calculation
25088 on poly_ints rather than trees.
25089 (vect_prune_runtime_alias_test_list): Update call accordingly.
25091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25092 Alan Hayward <alan.hayward@arm.com>
25093 David Sherwood <david.sherwood@arm.com>
25095 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25097 (vect_schedule_slp_instance): Likewise.
25099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25100 Alan Hayward <alan.hayward@arm.com>
25101 David Sherwood <david.sherwood@arm.com>
25103 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25104 constant and extern definitions for variable-length vectors.
25105 (vect_get_constant_vectors): Note that the number of units
25106 is known to be constant.
25108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25109 Alan Hayward <alan.hayward@arm.com>
25110 David Sherwood <david.sherwood@arm.com>
25112 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25113 of units as polynomial. Choose between WIDE and NARROW based
25116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25117 Alan Hayward <alan.hayward@arm.com>
25118 David Sherwood <david.sherwood@arm.com>
25120 * tree-vect-stmts.c (simd_clone_subparts): New function.
25121 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25124 Alan Hayward <alan.hayward@arm.com>
25125 David Sherwood <david.sherwood@arm.com>
25127 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25128 vectors as polynomial. Use build_index_vector for
25129 IFN_GOMP_SIMD_LANE.
25131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25132 Alan Hayward <alan.hayward@arm.com>
25133 David Sherwood <david.sherwood@arm.com>
25135 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25136 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25137 for variable-length vectors.
25138 (vectorizable_mask_load_store): Treat the number of units as
25139 polynomial, asserting that it is constant if the condition has
25140 already been enforced.
25141 (vectorizable_store, vectorizable_load): Likewise.
25143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25144 Alan Hayward <alan.hayward@arm.com>
25145 David Sherwood <david.sherwood@arm.com>
25147 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25148 of units as polynomial. Punt if we can't tell at compile time
25149 which vector contains the final result.
25151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25152 Alan Hayward <alan.hayward@arm.com>
25153 David Sherwood <david.sherwood@arm.com>
25155 * tree-vect-loop.c (vectorizable_induction): Treat the number
25156 of units as polynomial. Punt on SLP inductions. Use an integer
25157 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25158 cast of such a series for variable-length floating-point
25161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25162 Alan Hayward <alan.hayward@arm.com>
25163 David Sherwood <david.sherwood@arm.com>
25165 * tree.h (build_index_vector): Declare.
25166 * tree.c (build_index_vector): New function.
25167 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25168 of units as polynomial, forcibly converting it to a constant if
25169 vectorizable_reduction has already enforced the condition.
25170 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25171 to create a {1,2,3,...} vector.
25172 (vectorizable_reduction): Treat the number of units as polynomial.
25173 Choose vectype_in based on the largest scalar element size rather
25174 than the smallest number of units. Enforce the restrictions
25177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25178 Alan Hayward <alan.hayward@arm.com>
25179 David Sherwood <david.sherwood@arm.com>
25181 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25182 number of units as polynomial.
25184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25185 Alan Hayward <alan.hayward@arm.com>
25186 David Sherwood <david.sherwood@arm.com>
25188 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25189 * target.def (autovectorize_vector_sizes): Return the vector sizes
25190 by pointer, using vector_sizes rather than a bitmask.
25191 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25192 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25193 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25195 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25196 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25197 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25198 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25199 * omp-general.c (omp_max_vf): Likewise.
25200 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25201 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25202 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25203 * tree-vect-slp.c (vect_slp_bb): Likewise.
25204 * doc/tm.texi: Regenerate.
25205 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25207 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25208 the vector size as a poly_uint64 rather than an unsigned int.
25209 (current_vector_size): Change from an unsigned int to a poly_uint64.
25210 (get_vectype_for_scalar_type): Update accordingly.
25211 * tree.h (build_truth_vector_type): Take the size and number of
25212 units as a poly_uint64 rather than an unsigned int.
25213 (build_vector_type): Add a temporary overload that takes
25214 the number of units as a poly_uint64 rather than an unsigned int.
25215 * tree.c (make_vector_type): Likewise.
25216 (build_truth_vector_type): Take the number of units as a poly_uint64
25217 rather than an unsigned int.
25219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25220 Alan Hayward <alan.hayward@arm.com>
25221 David Sherwood <david.sherwood@arm.com>
25223 * target.def (get_mask_mode): Take the number of units and length
25224 as poly_uint64s rather than unsigned ints.
25225 * targhooks.h (default_get_mask_mode): Update accordingly.
25226 * targhooks.c (default_get_mask_mode): Likewise.
25227 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25228 * doc/tm.texi: Regenerate.
25230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25231 Alan Hayward <alan.hayward@arm.com>
25232 David Sherwood <david.sherwood@arm.com>
25234 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25235 * omp-general.c (omp_max_vf): Likewise.
25236 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25237 (expand_omp_simd): Handle polynomial safelen.
25238 * omp-low.c (omplow_simd_context): Add a default constructor.
25239 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25240 (lower_rec_simd_input_clauses): Update accordingly.
25241 (lower_rec_input_clauses): Likewise.
25243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25244 Alan Hayward <alan.hayward@arm.com>
25245 David Sherwood <david.sherwood@arm.com>
25247 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25248 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25249 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25250 (vect_analyze_slp_cost): Likewise.
25251 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25252 (vect_model_load_cost): Likewise.
25254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25255 Alan Hayward <alan.hayward@arm.com>
25256 David Sherwood <david.sherwood@arm.com>
25258 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25259 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25260 from an unsigned int * to a poly_uint64_pod *.
25261 (calculate_unrolling_factor): New function.
25262 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25265 Alan Hayward <alan.hayward@arm.com>
25266 David Sherwood <david.sherwood@arm.com>
25268 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25269 from an unsigned int to a poly_uint64.
25270 (_loop_vec_info::slp_unrolling_factor): Likewise.
25271 (_loop_vec_info::vectorization_factor): Change from an int
25273 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25274 (vect_get_num_vectors): New function.
25275 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25276 (vect_get_num_copies): Use vect_get_num_vectors.
25277 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25278 to an unsigned int *.
25279 (vect_analyze_data_refs): Change min_vf from an int * to a
25281 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25282 than an unsigned HOST_WIDE_INT.
25283 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25284 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25285 to an unsigned int *.
25286 (vect_analyze_data_ref_dependences): Likewise.
25287 (vect_compute_data_ref_alignment): Handle polynomial vf.
25288 (vect_enhance_data_refs_alignment): Likewise.
25289 (vect_prune_runtime_alias_test_list): Likewise.
25290 (vect_shift_permute_load_chain): Likewise.
25291 (vect_supportable_dr_alignment): Likewise.
25292 (dependence_distance_ge_vf): Take the vectorization factor as a
25293 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25294 (vect_analyze_data_refs): Change min_vf from an int * to a
25296 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25297 vfm1 as a poly_uint64 rather than an int. Make the same change
25298 for the returned bound_scalar.
25299 (vect_gen_vector_loop_niters): Handle polynomial vf.
25300 (vect_do_peeling): Likewise. Update call to
25301 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25302 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25304 * tree-vect-loop.c (vect_determine_vectorization_factor)
25305 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25306 (vect_get_known_peeling_cost): Likewise.
25307 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25308 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25309 (vect_transform_loop): Likewise. Use the lowest possible VF when
25310 updating the upper bounds of the loop.
25311 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25312 rather than an int.
25313 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25314 polynomial unroll factors.
25315 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25316 (vect_make_slp_decision): Likewise.
25317 (vect_supported_load_permutation_p): Likewise, and polynomial
25319 (vect_analyze_slp_cost): Handle polynomial vf.
25320 (vect_slp_analyze_node_operations): Likewise.
25321 (vect_slp_analyze_bb_1): Likewise.
25322 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25323 than an unsigned HOST_WIDE_INT.
25324 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25325 (vectorizable_load): Handle polynomial vf.
25326 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25328 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25331 Alan Hayward <alan.hayward@arm.com>
25332 David Sherwood <david.sherwood@arm.com>
25334 * match.pd: Handle bit operations involving three constants
25335 and try to fold one pair.
25337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25339 * tree-vect-loop-manip.c: Include gimple-fold.h.
25340 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25341 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25342 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25343 Add a path that uses a step of VF instead of 1, but disable it
25345 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25346 and niters_no_overflow parameters. Update calls to
25347 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25348 Create a new SSA name if the latter choses to use a ste other
25349 than zero, and return it via niters_vector_mult_vf_var.
25350 * tree-vect-loop.c (vect_transform_loop): Update calls to
25351 vect_do_peeling, vect_gen_vector_loop_niters and
25352 slpeel_make_loop_iterate_ntimes.
25353 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25354 (vect_gen_vector_loop_niters): Update declarations after above changes.
25356 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25358 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25359 128-bit round to integer instructions.
25360 (ceil<mode>2): Likewise.
25361 (btrunc<mode>2): Likewise.
25362 (round<mode>2): Likewise.
25364 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25366 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25367 unaligned VSX load/store on P8/P9.
25368 (expand_block_clear): Allow the use of unaligned VSX
25369 load/store on P8/P9.
25371 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25373 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25375 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25376 swap associated with both a load and a store.
25378 2018-01-02 Andrew Waterman <andrew@sifive.com>
25380 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25381 * config/riscv/riscv.md (clear_cache): Use it.
25383 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25385 * web.c: Remove out-of-date comment.
25387 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25389 * expr.c (fixup_args_size_notes): Check that any existing
25390 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25391 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25392 (emit_single_push_insn): ...here.
25394 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25396 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25397 (const_vector_encoded_nelts): New function.
25398 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25399 (const_vector_int_elt, const_vector_elt): Declare.
25400 * emit-rtl.c (const_vector_int_elt_1): New function.
25401 (const_vector_elt): Likewise.
25402 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25403 of CONST_VECTOR_ELT.
25405 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25407 * expr.c: Include rtx-vector-builder.h.
25408 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25409 directly on the tree encoding.
25410 (const_vector_from_tree): Likewise.
25411 * optabs.c: Include rtx-vector-builder.h.
25412 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25413 sequence of "u" values.
25414 * vec-perm-indices.c: Include rtx-vector-builder.h.
25415 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25416 directly on the vec_perm_indices encoding.
25418 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25420 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25421 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25422 * rtx-vector-builder.h: New file.
25423 * rtx-vector-builder.c: Likewise.
25424 * rtl.h (rtx_def::u2): Add a const_vector field.
25425 (CONST_VECTOR_NPATTERNS): New macro.
25426 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25427 (CONST_VECTOR_DUPLICATE_P): Likewise.
25428 (CONST_VECTOR_STEPPED_P): Likewise.
25429 (CONST_VECTOR_ENCODED_ELT): Likewise.
25430 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25431 (unwrap_const_vec_duplicate): Likewise.
25432 (const_vec_series_p): Check for a non-duplicated vector encoding.
25433 Say that the function only returns true for integer vectors.
25434 * emit-rtl.c: Include rtx-vector-builder.h.
25435 (gen_const_vec_duplicate_1): Delete.
25436 (gen_const_vector): Call gen_const_vec_duplicate instead of
25437 gen_const_vec_duplicate_1.
25438 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25439 (gen_const_vec_duplicate): Use rtx_vector_builder.
25440 (gen_const_vec_series): Likewise.
25441 (gen_rtx_CONST_VECTOR): Likewise.
25442 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25443 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25444 Build a new vector rather than modifying a CONST_VECTOR in-place.
25445 (handle_special_swappables): Update call accordingly.
25446 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25447 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25448 Build a new vector rather than modifying a CONST_VECTOR in-place.
25449 (handle_special_swappables): Update call accordingly.
25451 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25453 * simplify-rtx.c (simplify_const_binary_operation): Use
25454 CONST_VECTOR_ELT instead of XVECEXP.
25456 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25458 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25459 the selector elements to be different from the data elements
25460 if the selector is a VECTOR_CST.
25461 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25462 ssizetype for the selector.
25464 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25466 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25467 before testing each element individually.
25468 * tree-vect-generic.c (lower_vec_perm): Likewise.
25470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25472 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25473 * selftest-run-tests.c (selftest::run_tests): Call it.
25474 * vector-builder.h (vector_builder::operator ==): New function.
25475 (vector_builder::operator !=): Likewise.
25476 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25477 (vec_perm_indices::all_from_input_p): New function.
25478 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25479 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25480 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25481 instead of reading the VECTOR_CST directly. Detect whether both
25482 vector inputs are the same before constructing the vec_perm_indices,
25483 and update the number of inputs argument accordingly. Use the
25484 utility functions added above. Only construct sel2 if we need to.
25486 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25488 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25489 the broadcast of the low byte.
25490 (expand_mult_highpart): Use an explicit encoding for the permutes.
25491 * optabs-query.c (can_mult_highpart_p): Likewise.
25492 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25493 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25494 (vectorizable_bswap): Likewise.
25495 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25496 explicit encoding for the power-of-2 permutes.
25497 (vect_permute_store_chain): Likewise.
25498 (vect_grouped_load_supported): Likewise.
25499 (vect_permute_load_chain): Likewise.
25501 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25503 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25504 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25505 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25506 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25507 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25508 (vect_gen_perm_mask_any): Likewise.
25510 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25512 * int-vector-builder.h: New file.
25513 * vec-perm-indices.h: Include int-vector-builder.h.
25514 (vec_perm_indices): Redefine as an int_vector_builder.
25515 (auto_vec_perm_indices): Delete.
25516 (vec_perm_builder): Redefine as a stand-alone class.
25517 (vec_perm_indices::vec_perm_indices): New function.
25518 (vec_perm_indices::clamp): Likewise.
25519 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25520 (vec_perm_indices::new_vector): New function.
25521 (vec_perm_indices::new_expanded_vector): Update for new
25522 vec_perm_indices class.
25523 (vec_perm_indices::rotate_inputs): New function.
25524 (vec_perm_indices::all_in_range_p): Operate directly on the
25525 encoded form, without computing elided elements.
25526 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25527 encoding. Update for new vec_perm_indices class.
25528 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25529 the given vec_perm_builder.
25530 (expand_vec_perm_var): Update vec_perm_builder constructor.
25531 (expand_mult_highpart): Use vec_perm_builder instead of
25532 auto_vec_perm_indices.
25533 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25534 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25535 or double series encoding as appropriate.
25536 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25537 vec_perm_indices instead of auto_vec_perm_indices.
25538 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25539 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25540 (vect_permute_store_chain): Likewise.
25541 (vect_grouped_load_supported): Likewise.
25542 (vect_permute_load_chain): Likewise.
25543 (vect_shift_permute_load_chain): Likewise.
25544 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25545 (vect_transform_slp_perm_load): Likewise.
25546 (vect_schedule_slp_instance): Likewise.
25547 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25548 (vectorizable_mask_load_store): Likewise.
25549 (vectorizable_bswap): Likewise.
25550 (vectorizable_store): Likewise.
25551 (vectorizable_load): Likewise.
25552 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25553 vec_perm_indices instead of auto_vec_perm_indices. Use
25554 tree_to_vec_perm_builder to read the vector from a tree.
25555 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25556 vec_perm_builder instead of a vec_perm_indices.
25557 (have_whole_vector_shift): Use vec_perm_builder and
25558 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25559 truncation to calc_vec_perm_mask_for_shift.
25560 (vect_create_epilog_for_reduction): Likewise.
25561 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25562 from auto_vec_perm_indices to vec_perm_indices.
25563 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25564 instead of changing individual elements.
25565 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25566 the vector in d.perm.
25567 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25568 from auto_vec_perm_indices to vec_perm_indices.
25569 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25570 instead of changing individual elements.
25571 (arm_vectorize_vec_perm_const): Use new_vector to install
25572 the vector in d.perm.
25573 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25574 Update vec_perm_builder constructor.
25575 (rs6000_expand_interleave): Likewise.
25576 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25577 (rs6000_expand_interleave): Likewise.
25579 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25581 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25582 to qimode could truncate the indices.
25583 * optabs.c (expand_vec_perm_var): Likewise.
25585 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25587 * Makefile.in (OBJS): Add vec-perm-indices.o.
25588 * vec-perm-indices.h: New file.
25589 * vec-perm-indices.c: Likewise.
25590 * target.h (vec_perm_indices): Replace with a forward class
25592 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25593 * optabs.h: Include vec-perm-indices.h.
25594 (expand_vec_perm): Delete.
25595 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25596 (expand_vec_perm_const): Declare.
25597 * target.def (vec_perm_const_ok): Replace with...
25598 (vec_perm_const): ...this new hook.
25599 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25600 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25601 * doc/tm.texi: Regenerate.
25602 * optabs.def (vec_perm_const): Delete.
25603 * doc/md.texi (vec_perm_const): Likewise.
25604 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25605 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25606 expand_vec_perm for constant permutation vectors. Assert that
25607 the mode of variable permutation vectors is the integer equivalent
25608 of the mode that is being permuted.
25609 * optabs-query.h (selector_fits_mode_p): Declare.
25610 * optabs-query.c: Include vec-perm-indices.h.
25611 (selector_fits_mode_p): New function.
25612 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25613 is defined, instead of checking whether the vec_perm_const_optab
25614 exists. Use targetm.vectorize.vec_perm_const instead of
25615 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25616 fit in the vector mode before using a variable permute.
25617 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25618 vec_perm_indices instead of an rtx.
25619 (expand_vec_perm): Replace with...
25620 (expand_vec_perm_const): ...this new function. Take the selector
25621 as a vec_perm_indices rather than an rtx. Also take the mode of
25622 the selector. Update call to shift_amt_for_vec_perm_mask.
25623 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25624 Use vec_perm_indices::new_expanded_vector to expand the original
25625 selector into bytes. Check whether the indices fit in the vector
25626 mode before using a variable permute.
25627 (expand_vec_perm_var): Make global.
25628 (expand_mult_highpart): Use expand_vec_perm_const.
25629 * fold-const.c: Includes vec-perm-indices.h.
25630 * tree-ssa-forwprop.c: Likewise.
25631 * tree-vect-data-refs.c: Likewise.
25632 * tree-vect-generic.c: Likewise.
25633 * tree-vect-loop.c: Likewise.
25634 * tree-vect-slp.c: Likewise.
25635 * tree-vect-stmts.c: Likewise.
25636 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25638 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25639 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25640 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25641 (aarch64_vectorize_vec_perm_const): ...this new function.
25642 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25643 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25644 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25645 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25646 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25647 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25648 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25650 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25651 check for NEON modes.
25652 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25653 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25654 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25655 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25657 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25658 the old VEC_PERM_CONST conditions.
25659 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25660 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25661 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25662 (ia64_vectorize_vec_perm_const_ok): Merge into...
25663 (ia64_vectorize_vec_perm_const): ...this new function.
25664 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25665 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25666 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25667 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25668 * config/mips/mips.c (mips_expand_vec_perm_const)
25669 (mips_vectorize_vec_perm_const_ok): Merge into...
25670 (mips_vectorize_vec_perm_const): ...this new function.
25671 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25672 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25673 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25674 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25675 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25676 (rs6000_expand_vec_perm_const): Delete.
25677 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25679 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25680 (altivec_expand_vec_perm_const_le): Take each operand individually.
25681 Operate on constant selectors rather than rtxes.
25682 (altivec_expand_vec_perm_const): Likewise. Update call to
25683 altivec_expand_vec_perm_const_le.
25684 (rs6000_expand_vec_perm_const): Delete.
25685 (rs6000_vectorize_vec_perm_const_ok): Delete.
25686 (rs6000_vectorize_vec_perm_const): New function.
25687 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25688 an element count and rtx array.
25689 (rs6000_expand_extract_even): Update call accordingly.
25690 (rs6000_expand_interleave): Likewise.
25691 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25692 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25693 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25694 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25695 (rs6000_expand_vec_perm_const): Delete.
25696 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25697 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25698 (altivec_expand_vec_perm_const_le): Take each operand individually.
25699 Operate on constant selectors rather than rtxes.
25700 (altivec_expand_vec_perm_const): Likewise. Update call to
25701 altivec_expand_vec_perm_const_le.
25702 (rs6000_expand_vec_perm_const): Delete.
25703 (rs6000_vectorize_vec_perm_const_ok): Delete.
25704 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25705 reference to the SPE evmerge intructions.
25706 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25707 an element count and rtx array.
25708 (rs6000_expand_extract_even): Update call accordingly.
25709 (rs6000_expand_interleave): Likewise.
25710 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25711 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25713 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25717 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25718 vector mode and that that mode matches the mode of the data
25720 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25721 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25722 directly using expand_vec_perm_1 when forcing selectors into
25724 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25726 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25728 * optabs-query.h (can_vec_perm_p): Delete.
25729 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25730 * optabs-query.c (can_vec_perm_p): Split into...
25731 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25732 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25733 particular selector is valid.
25734 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25735 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25736 (vect_grouped_load_supported): Likewise.
25737 (vect_shift_permute_load_chain): Likewise.
25738 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25739 (vect_transform_slp_perm_load): Likewise.
25740 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25741 (vectorizable_bswap): Likewise.
25742 (vect_gen_perm_mask_checked): Likewise.
25743 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25744 implementations of variable permutation vectors into account
25745 when deciding which selector to use.
25746 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25747 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25748 with a false third argument.
25749 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25750 to test whether the constant selector is valid and can_vec_perm_var_p
25751 to test whether a variable selector is valid.
25753 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25755 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25756 * optabs-query.c (can_vec_perm_p): Likewise.
25757 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25758 instead of vec_perm_indices.
25759 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25760 (vect_gen_perm_mask_checked): Likewise,
25761 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25762 (vect_gen_perm_mask_checked): Likewise,
25764 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25766 * optabs-query.h (qimode_for_vec_perm): Declare.
25767 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25768 (qimode_for_vec_perm): ...this new function.
25769 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25771 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25773 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25774 does not have a conditional at the top.
25776 2018-01-02 Richard Biener <rguenther@suse.de>
25778 * ipa-inline.c (big_speedup_p): Fix expression.
25780 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25783 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25786 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25790 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25791 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25792 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25793 cond_taken_branch_cost 3->4.
25795 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25797 PR tree-optimization/83581
25798 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25799 TODO_cleanup_cfg if any changes have been made.
25801 PR middle-end/83608
25802 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25803 convert_modes if target mode has the right side, but different mode
25806 PR middle-end/83609
25807 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25808 last argument when extracting from CONCAT. If either from_real or
25809 from_imag is NULL, use expansion through memory. If result is not
25810 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25811 the parts directly to inner mode, if even that fails, use expansion
25814 PR middle-end/83623
25815 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25816 check for bswap in mode rather than HImode and use that in expand_unop
25819 Copyright (C) 2018 Free Software Foundation, Inc.
25821 Copying and distribution of this file, with or without modification,
25822 are permitted in any medium without royalty provided the copyright
25823 notice and this notice are preserved.