substring-locations: add class format_string_diagnostic_t
[official-gcc.git] / gcc / ChangeLog
blob26d7be6584f2352a2c6f73a64277b5aa7b7eceae
1 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4         format_string_diagnostic_t.
5         (fmtwarn_n): Likewise.
6         * substring-locations.c
7         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8         (format_warning_n_va): Convert to...
9         (format_string_diagnostic_t::emit_warning_n_va): ...this.
10         (format_warning_va): Convert to...
11         (format_string_diagnostic_t::emit_warning_va): ...this.
12         (format_warning_at_substring): Convert to...
13         (format_string_diagnostic_t::emit_warning): ...this.
14         (format_warning_at_substring_n): Convert to...
15         (format_string_diagnostic_t::emit_warning_n): ...this.
16         * substring-locations.h (class format_string_diagnostic_t): New
17         class.
18         (format_warning_va): Convert to
19         format_string_diagnostic_t::emit_warning_va.
20         (format_warning_n_va): Convert to
21         format_string_diagnostic_t::emit_warning_n_va.
22         (format_warning_at_substring): Convert to
23         format_string_diagnostic_t::emit_warning.
24         (format_warning_at_substring_n): Convert to
25         format_string_diagnostic_t::emit_warning_n.
27 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
28             Bernd Schmidt <bernds_cb1@t-online.de>
30         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
31         SImode args.
33 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
35         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
36         operand 0 predicate to nonimmediate operand.
37         (rint<mode>2_frndint): Remove insn pattern.
38         (rint<mode>2): Change operand 1 predicate to general_operand.
39         Extend operand 1 to XFmode and generate rintxf2 insn.
40         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
41         Do not use X87MODEF mode macro.
42         (frndintxf2_<rounding>_i387): Rename from
43         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
44         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
45         to XFmode and generate significandxf3 insn.
47 2018-09-17  Richard Biener  <rguenther@suse.de>
49         PR tree-optimization/87328
50         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
51         visiting unexecutable backedges when not iterating.
52         (do_rpo_vn): Mark all edges not executable even when not
53         iterating.
55 2018-09-17  Martin Jambor  <mjambor@suse.cz>
57         PR c/63886
58         * doc/invoke.texi (Warning Options): Likewise.
60 2018-09-17  Richard Biener  <rguenther@suse.de>
62         PR tree-optimization/87301
63         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
64         clean EH info from leftover copy assignments.
66 2018-09-17  Martin Liska  <mliska@suse.cz>
68         PR gcov-profile/85871
69         * gcov.c (output_intermediate_file): Fix out of bounds
70         access.
72 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
74         * config/arc/arc.c: Object attributes for core4 not reflected
75         correctly.
76         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
77         core3).
79 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
81         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
83 2018-09-17  Martin Liska  <mliska@suse.cz>
85         * doc/gcov.texi: Document new option --use-hotness-colors.
86         * gcov.c (struct source_info): Declare new field.
87         (source_info::source_info): Set default for maximum_count.
88         (print_usage): Add new -q option.
89         (process_args): Process it.
90         (accumulate_line_info): Save src->maximum_count.
91         (output_line_beginning): Make color line number if
92         flag_use_hotness_colors is set.
93         (output_line_details): Pass default argument value.
94         (output_lines): Pass src->maximum_count.
96 2018-09-17  Martin Liska  <mliska@suse.cz>
98         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
99         Use processor_names table.
100         * config/i386/i386.c (ix86_default_align): Use
101         processor_cost_table for alignment values.
102         (ix86_option_override_internal): Use processor_names.
103         (ix86_function_specific_print): Likewise.
104         * config/i386/i386.h (struct processor_costs):
105         Add alignment values.
106         (struct ptt): Remove and replace with const char *.
107         * config/i386/x86-tune-costs.h (struct processor_costs):
108         Declare default alignments for all costs.
110 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
112         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
113         symbolics or VR_VARYING ranges for ABS_EXPR.
114         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
115         when range will wrap.
117 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
119         PR middle-end/86864
120         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
121         before and after a JUMP_TABLE_DATA.
123 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
125         PR middle-end/87188
126         * dojump.c (do_compare_and_jump): Canonicalize function pointers
127         when one operand is a function pointer.  Use POINTER_TYPE_P and
128         FUNC_OR_METHOD_TYPE_P.
129         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
130         * fold-const.c (build_range_check): Likewise.
131         * match.pd (simple_comparison): Likewise.
133 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
135         PR c/82967
136         * spellcheck.c (get_edit_distance_cutoff): New function.
137         (selftest::test_edit_distance_unit_test_oneway): Rename to...
138         (selftest::test_get_edit_distance_one_way): ...this.
139         (selftest::test_get_edit_distance_unit): Rename to...
140         (selftest::test_get_edit_distance_both_ways): ...this.
141         (selftest::test_edit_distances): Move tests to this new function,
142         and test some more pairs of strings.  Update for above renaming.
143         (selftest::get_old_cutoff): New function.
144         (selftest::test_get_edit_distance_cutoff): New function.
145         (selftest::assert_suggested_for): New function.
146         (ASSERT_SUGGESTED_FOR): New macro.
147         (selftest::assert_not_suggested_for): New function.
148         (ASSERT_NOT_SUGGESTED_FOR): New macro.
149         (selftest::test_suggestions): New function.
150         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
151         tests to selftest::test_edit_distances and call it.  Add calls to
152         selftest::test_get_edit_distance_cutoff and
153         selftest::test_suggestions.
154         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
155         (best_match::consider): Replace hard-coded cutoff calculation with
156         a call to...
157         (best_match::get_cutoff): New declaration.
158         (best_match::get_best_meaningful_candidate): Likewise.
160 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
162         * builtins.c (fold_builtin_strlen): Remove TODO comment.
164 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
166         revert:
167         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
169         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
170         terminated string literal.
172 2018-09-14  Martin Sebor  <msebor@redhat.com>
174         * builtins.c (unterminated_array): Handle ARRAY_REF.
175         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
176         * builtins.h (unterminated_array): Declare extern.
177         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
178         arrays.
179         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
180         calls.
182 2018-09-14  Martin Sebor  <msebor@redhat.com>
183             Jeff Law  <law@redhat.com>
185         * builtins.c (unterminated_array): New.
186         (expand_builtin_strcpy): Adjust.
187         (expand_builtin_strcpy_args): Detect unterminated arrays.
188         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
189         unterminated arrays.
190         * gimple-fold.h (get_maxval_strlen): Add argument.
191         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
193         * gimple-fold.c (get_range_strlen): Add argument.
194         (get_maxval_strlen): Adjust.
195         * gimple-fold.h (get_range_strlen): Add argument.
197 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
199         * config/i386/movdirintrin.h: Fix copyright year.
201 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
203         * reg-stack.c: Include regs.h.
204         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
205         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
206         FIRST_STACK_REG, not DFmode.
207         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
208         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
209         (change stack): Default register mode to the reg_raw_mode of
210         FIRST_STACK_REG, not DFmode.
211         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
212         (*swapxf): Rename from swapxf.
214 2018-09-14  Carl Love  <cel@us.ibm.com>
216         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
217         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
219 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
221         PR target/87224
222         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
223         alternatives.
225 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
227         PR target/85628
228         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
230 2018-09-14  Jason Merrill  <jason@redhat.com>
232         Fix --enable-gather-detailed-mem-stats.
233         * hash-table.c (hash_table_usage): Change from variable to function.
234         * hash-table.h: Adjust.
235         * Makefile.in: Add missing dependencies on hash-table.h.
237 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
239         PR tree-optimization/87259
240         PR lto/87283
241         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
242         execute_cse_reciprocals_1 has tried transforming.
244 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
246         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
247         VR_VARYING for PLUS/MINUS_EXPR.
249 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
251         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
252         formatting.
254 2018-09-14  Richard Biener  <rguenther@suse.de>
256         PR middle-end/63155
257         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
258         bits for the merged partition.
260 2018-09-13  Martin Sebor  <msebor@redhat.com>
261             Bernd Edlinger  <bernd.edlinger@hotmail.de>
263         * builtins.h (c_srlen): Add argument.
264         * builtins.c (warn_string_no_nul): New function.
265         (c_strlen): Add argument and use it.  Update recursive calls.
266         Pass DECL argument to string_constant to get info on non
267         terminated strings.  Update *NONSTR as needed.
268         (fold_builtin_strlen): Add argument to calls to c_strlen.
269         Warn for unterminated arrays.
270         (warn_string_no_null): Add prototype.
271         * expr.c (string_constant): Update arguments.  Update recursive
272         calls appropriately.  Detect missing NUL terminator and outermost
273         declaration its missing in.
274         Improve checks for arrays with nonzero lower bound or elements
275         that are not a single byte.  Simplify offset computation.
276         Simplify checks for non-NUL terminated strings.
277         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
278         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
280 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
282         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
283         correctly.
284         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
285         argument.  Fix range checks.
286         * fold-const.h (c_getstr): Adjust protoype.
287         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
288         string is constant but contains no NUL byte.
290         * expr.c (string_constant): Adjust function comment.
291         Remove bogus check for zero termination.
293         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
295         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
296         (get_constant_size): Don't make STRING_CSTs larger than they are.
297         (check_string_literal): New check function for STRING_CSTs.
298         (output_constant): Use it.
300 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
302         PR target/86812
303         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
305 2018-09-13  Richard Biener  <rguenther@suse.de>
307         PR tree-optimization/87263
308         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
309         (struct unwind_state): Add max_rpo field.
310         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
311         Compute max_rpo, the max RPO number a block can be backwards reached
312         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
313         separating it from the iterating mode.
315 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
317         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
318         (rfs_decision): New scheduling decision.
320 2018-09-13  Richard Biener  <rguenther@suse.de>
322         PR bootstrap/87134
323         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
324         (vn_nary_op_insert_pieces_predicated): Do not write useless
325         valid_dominated_by_p entry outside of the allocated storage.
327 2018-09-13  Omar Sandoval  <osandov@osandov.com>
328             Tom de Vries  <tdevries@suse.de>
330         PR debug/86985
331         * dwarf2out.c (is_c): New function.
332         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
334 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
336         PR target/85628
337         * config/aarch64/aarch64.md (*aarch64_bfxil):
338         Define.
339         * config/aarch64/constraints.md (Ulc): Define.
340         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
341         Define.
342         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
343         New function.
345 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
347         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
348         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
349         aarch64_layout_frame call. 
350         (aarch64_expand_epilogue): Likewise.
351         (aarch64_initial_elimination_offset): Likewise.
352         (aarch64_get_separate_components): Likewise.
353         (aarch64_use_return_insn_p): Likewise.
354         (aarch64_layout_frame): Remove unneeded check.
356 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
358         * configure.ac: Only append
359         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
360         gcc_config_arguments if it was never reconfigured or last reconfigure
361         was with different arguments.
362         * configure: Regenerated.
364 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
365             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
367         PR middle-end/87290
368         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
369         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
371 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
373         PR tree-optimization/87287
374         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
375         X % C == 0 to X % (unsigned) C == 0 optimization to ...
376         * match.pd (X % C == 0): ... here.  New optimization.
378 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
380         PR middle-end/82853
381         * expr.h (maybe_optimize_mod_cmp): Declare.
382         * expr.c (mod_inv): New function.
383         (maybe_optimize_mod_cmp): New function.
384         (do_store_flag): Use it.
385         * cfgexpand.c (expand_gimple_cond): Likewise.
387 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
388             Julian Brown  <julian@codesourcery.com>
390         PR middle-end/86336
391         * gimplify.c (gimplify_scan_omp_clauses): Set
392         target_firstprivatize_array_bases in OpenACC parallel and kernels
393         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
394         OpenACC data regions.
396 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
398         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
399         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
401 2018-09-12  Richard Biener  <rguenther@suse.de>
403         PR tree-optimization/87280
404         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
405         edge but unreachable target.
406         (do_rpo_vn): For conservatively handling a PHI only mark
407         the backedge executable but not the block reachable.
409 2018-09-12  Richard Biener  <rguenther@suse.de>
411         PR tree-optimization/87266
412         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
413         visited blocks.
415 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
417         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
418         constants.
419         ("trunc<BFP:mode><DFP_ALL:mode>2")
420         ("trunc<DFP_ALL:mode><BFP:mode>2")
421         ("extend<BFP:mode><DFP_ALL:mode>2")
422         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
423         according to the target operand type.
425 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
426             Andreas Krebbel  <krebbel@linux.ibm.com>
428         PR tree-optimization/86844
429         * gimple-ssa-store-merging.c
430         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
431         there are any overlapping stores in between them, make sure they are
432         also coalesced or we give up completely.
434 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
436         PR middle-end/87248
437         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
438         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
440 2018-09-12  Tom de Vries  <tdevries@suse.de>
442         * common.opt (gdescribe-dies): Add option.
443         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
444         attribute for artifical and nameless decls.
445         (dwarf2out_register_external_die): Add description attribute to
446         external reference die.
447         (add_desc_attribute): New functions.
448         (gen_subprogram_die): Add description attribute to
449         DW_TAG_call_site_parameter.
450         * tree-pretty-print.c (print_generic_expr_to_str): New function.
451         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
452         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
453         -gno-describe-dies.
454         (@item -gdescribe-dies): Add.
456 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
458         * tree-vrp.c (vrp_shift_undefined_p): Remove.
459         (extract_range_from_binary_expr_1: Call
460         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
461         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
462         depend on sign.
464 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
466         * gimple-ssa-warn-alloca.c
467         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
468         field for ALLOCA_BOUND_*_LARGE.
470 2018-09-11  Nathan Sidwell  <nathan@acm.org>
472         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
474 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
476         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
477         for clobbers.  Remove obsolete comment.
479 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
481         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
482         mpxchk, mpxld and mpxst types.
483         (define_attr length_immediate): Remove all processing of mpx types.
484         (define_attr prefix_0f): Ditto.
485         (define_attr memory): Ditto.
487 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
489         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
490         (log<mode>2): Change operand 1 predicate to general_operand.
491         Extend operand 1 to XFmode and generate logxf3 insn.
492         (log10<mode>2): Change operand 1 predicate to general_operand.
493         Extend operand 1 to XFmode and generate log10xf3 insn.
494         (log2<mode>2): Change operand 1 predicate to general_operand.
495         Extend operand 1 to XFmode and generate log2xf3 insn.
496         (fyl2xp1_extend<mode>xf3_i387): Remove.
497         (log1p<mode>2): Change operand 1 predicate to general_operand.
498         Extend operand 1 to XFmode and generate log1pxf3 insn.
499         (fxtract_extend<mode>xf3_i387): Remove.
500         (logb<mode>2): Change operand 1 predicate to general_operand.
501         Extend operand 1 to XFmode and generate logbxf3 insn.
502         (ilogb<mode>2): Change operand 1 predicate to general_operand.
503         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
504         (significand<mode>2): Change operand 1 predicate to general_operand.
505         Extend operand 1 to XFmode and generate significandxf3 insn.
507 2018-09-11  Nathan Sidwell  <nathan@acm.org>
509         * gcc.c (perror_with_name, pfatal_with_name): Delete.
510         (load_specs): Use fatal_error.
511         (DELETE_IF_ORDINARY, process_command): Use error.
512         (execute, run_attempt): Use fatal_error.
514 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
516         * diagnostic-core.h (sorry_at): New prototype.
517         * diagnostic.c (sorry_at): New function.
519 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
521         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
522         by zero as VR_UNDEFINED.
524 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
526         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
527         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
528         (<sincos>mode2): New expander.
529         (sincos_extend<mode>xf3_i387): Remove insn pattern.
530         (sincos -> sin, cos splitters): Remove splitter patterns.
531         (sincos<mode>3): Change operand 2 predicate to general_operand.
532         Extend operand 2 to XFmode and generate sincosxf3 insn.
533         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
534         Change operand 3 predicate to const1_operand.
535         (fptan_extend<mode>xf4_i387): Remove insn pattern.
536         (tanxf2): Update operands in the call to fptanxf4_i387.
537         (tan<mode>2): Change operand 1 predicate to general_operand.
538         Extend operand 1 to XFmode and generate tanxf3 insn.
539         (atan2xf3): Rename from *fpatanxf3_i387.
540         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
541         (atan2xf3): Remove expander.
542         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
543         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
544         (atan<mode>2): Change operand 1 predicate to general_operand.
545         Extend operand 1 to XFmode and generate atanxf3 insn.
547 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
549         * config/i386/i386.md (x87/SSE constant load splitter): Use
550         memory_operand instead of nonimmediate_operand for input operand
551         predicate.
553 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
555         * config/i386/i386.md (float partial SSE register stall splitter): Move
556         splitter near its instruction pattern.
557         (float_extend partial SSE register stall splitter): Ditto.
558         (float_truncate partial SSE register stall splitter): Ditto.
560 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
562         PR target/86794
563         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
564         to speculation_safe_value_not_needed.
566         PR target/85666
567         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
568         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
569         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
570         leaf_function_p, instead use has_hard_reg_initial_val.
572 2018-09-09  Nathan Sidwell  <nathan@acm.org>
574         * gcc.h (pfatal_with_name): Don't declare here.
575         * gcc.c (pfatal_with_name): Make static.
577 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
579         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
580         earlyclobber.
582 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
584         PR rtl-optimization/85458
585         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
586         priority hook to reduce the priority of EXPR.
588 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
590         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
591         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
592         with X87_ENABLE_FLOAT.  Remove preparation code.
593         (*float<SWI48:mode><MODEF:mode>2): Rename from
594         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
595         math using "enabled" attribute.
596         (*floatdi<MODEF:mode>2_i387): Rename from
597         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
598         enable for 32bit targets only.
599         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
600         splitter.
601         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
602         as operand 1 predicate.  Rewrite as define_insn_and_split.
603         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
605 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
607         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
608         to fallthru to FLOAT case.
610 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
612         PR target/86731
613         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
614         around folding of vec_sl to handle out of range shift values.
616 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
618         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
619         Update callers to gen_fix_trunc<mode>_i387_fisttp
620         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
621         nonimmediate_operand.
622         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
623         and corresponding splitters.
624         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
625         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
626         (fix_truncdi_i387_with_temp): Remove insn pattern
627         and corresponding splitters.
628         (fix_trunc<mode>_i387): Change operand 0 predicate to
629         nonimmediate_operand.
630         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
631         and corresponding splitters.
632         (*fistdi2_1): Remove.
633         (fistdi2): Ditto.
634         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
635         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
636         (*fist<mode>2_1): Remove.
637         (fist<mode>2): Ditto.
638         (fist<mode>2_with_temp): Remove insn pattern and corresponding
639         splitters.
640         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
641         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
642         (fistdi2_<rounding>): Change operand 0 predicate to
643         nonimmediate_operand.
644         (fistdi2_<rounding>_with_temp): Remove insn pattern
645         and corresponding splitters.
646         (fist<mode>2_<rounding>): Change operand 0 predicate to
647         nonimmediate_operand.
648         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
649         and corresponding splitters.
651         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
653 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
655         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
656         the init value.
658 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
660         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
661         early gimple folding of vec_splat().
662         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
663         * gimple-fold.h: Add an extern define for tree_vec_extract().
665 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
667         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
668         wrappers around TREE_TYPE comparisons.
670 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
672         PR target/80080
673         * config/s390/predicates.md: Add nonsym_memory_operand.
674         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
675         contains a SYMBOL_REF, load it into an intermediate pseudo.
676         (s390_emit_compare_and_swap): Legitimize operand.
677         * config/s390/s390.md: Use the new nonsym_memory_operand
678         with UNSPECV_CAS patterns.
680 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
682         PR target/80080
683         * config/s390/s390-passes.def: New file.
684         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
685         declaration.
686         (make_pass_s390_early_mach): Add declaration.
687         * config/s390/s390.c (make_pass_s390_early_mach):
688         (s390_option_override): Remove dynamic registration.
689         * config/s390/t-s390: Add s390-passes.def.
691 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
693         * config/s390/s390.c (s390_decompose_constant_pool_ref):
694         Remove UNSPEC_LTREL_BASE check.
695         (annotate_constant_pool_refs): Likewise.
696         (find_constant_pool_ref): Likewise.
697         (find_ltrel_base): Removed.
698         (replace_ltrel_base): Removed.
699         (s390_mainpool_finish): Remove replace_ltrel_base call.
700         (s390_chunkify_start): Remove pending LTREL_BASE logic.
701         (s390_chunkify_finish): Remove replace_ltrel_base call.
702         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
704 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
706         PR target/86779
707         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
708         to speculation_safe_value_not_needed.
710 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
711             Bernd Schmidt  <bernds_cb1@t-online.de>
713         * config/nvptx/nvptx-opts.h: New file.
714         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
715         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
716         (ASM_SPEC): Define.
717         (TARGET_SM35): New macro.
718         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
719         correct predicate.
720         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
721         values.
722         (misa=): New option.
723         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
725 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
727         * config/i386/i386.md (truncdfsf2): Remove expander.
728         (truncdfsf2_with_temp): Ditto.
729         (truncxf<mode>2): Ditto.
730         (*truncdfsf_fast_mixed): Remove insn pattern.
731         (*truncdfsf_fast_i387): Ditto.
732         (*truncdfsf_mixed): Ditto.
733         (*truncdfsf_i387): Ditto.
734         (*truncdfsf2_i387_1): Ditto.
735         (*truncxfsf2_mixed): Ditto.
736         (*truncxfdf2_mixed): Ditto.
737         (*truncxf<mode>2_i387_noop): Ditto. Update callers
738         to call gen_truncxf<mode>2 instead.
739         (*truncxf<mode>2_i387): Remove.
740         (reg->reg splitters): Remove splitter pattern.
741         (reg->mem splitters): Ditto.
743         (truncdfsf2): New insn pattern.
744         (truncxf<mode>2): Ditto.
746 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
748         * tree-ssa-math-opts.c (is_mult_by): New function.
749         (is_square_of): Use the above.
750         (optimize_recip_sqrt): New function.
751         (pass_cse_reciprocals::execute): Use the above.
753 2018-09-05  Richard Biener  <rguenther@suse.de>
755         PR bootstrap/87134
756         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
757         to zero-init the emplaced vec.
759 2018-09-05  Martin Liska  <mliska@suse.cz>
761         PR tree-optimization/87205
762         * tree-switch-conversion.c (pass_lower_switch::execute):
763         Group cases for switch statements.
765 2018-09-05  Richard Biener  <rguenther@suse.de>
767         PR tree-optimization/87217
768         * tree-ssa-sccvn.c (vuse_valueize): New.
769         (vn_reference_lookup_pieces): Use it.
770         (vn_reference_lookup): Likewise.
772 2018-09-05  Nathan Sidwell  <nathan@acm.org>
774         PR c++/87137
775         * stor-layout.c (place_field): Scan forwards to check last
776         bitfield when ms_bitfield_placement is in effect.
778 2018-09-05  Richard Biener  <rguenther@suse.de>
780         PR bootstrap/87225
781         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
782         return.
784 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
785             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
787         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
788         * config.gcc (extra_objs): Build it.
789         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
790         Likewise.
791         * config/aarch64/aarch64-passes.def
792         (pass_tag_collision_avoidance): New pass.
793         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
794         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
795         (aarch64_classify_address): Remove static qualifier.
796         (aarch64_address_info, aarch64_address_type): Move to...
797         * config/aarch64/aarch64-protos.h: ... here.
798         (make_pass_tag_collision_avoidance): New function.
799         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
800         New tuning flag.
802 2018-09-05  Martin Liska  <mliska@suse.cz>
804         * doc/gcov.texi: Update documentation of humar
805         readable mode.
806         * gcov.c (format_count): Print one decimal place, it provides
807         more fine number of situations like '1G' vs. '1.4G'.
809 2018-09-05  Martin Liska  <mliska@suse.cz>
811         PR target/87164
812         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
813         * optc-gen.awk: Allow 'Var' for Deprecated options in order
814         to generate a MASK value.
816 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
818         PR debug/86593
819         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
820         if frame pointer isn't used.
821         (compute_frame_pointer_to_fb_displacement): Likewise.
823 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
825         PR target/87198
826         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
827         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
828         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
829         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
830         and OPTION_MASK_ISA_XSAVEC_UNSET.
832 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
834         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
835         XOR operations in NAND case.
837 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
839         * wide-int-range.cc (wide_int_range_convert): New.
840         * wide-int-range.h (wide_int_range_convert): New.
841         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
842         code into wide_int_range_convert.
843         (extract_range_into_wide_ints): Do not munge anti range constants
844         into the entire domain.  Just return the range back.
846 2018-09-04  Martin Liska  <mliska@suse.cz>
848         * genmatch.c (output_line_directive): Add new argument
849         fnargs.
850         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
852 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
854         * doc/invoke.texi (Option Summary): Add whitespace.
856         * doc/invoke.texi (Option Summary): Add -Waligned-new.
858 2018-09-04  Richard Biener  <rguenther@suse.de>
860         PR tree-optimization/87211
861         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
862         backedge value we're supposed to treat as VARYING also number
863         the PHI to VARYING in case it got a different value-number already.
865 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
867         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
868         (extract_range_from_binary_expr_1): Do not call
869         vrp_can_optimize_bit_op.
870         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
871         static.
872         (wide_int_range_get_mask_and_bounds): New.
873         (wide_int_range_optimize_bit_op): New.
874         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
875         (wide_int_range_bit_and): Same.
876         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
877         (wide_int_range_optimize_bit_op): New.
878         (wide_int_range_get_mask_and_bounds): New.
880 2018-09-04  Richard Biener  <rguenther@suse.de>
882         PR tree-optimization/87176
883         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
884         variable.  When value-numbering a virtual PHI node make sure
885         to not value-number to the backedge value.
887 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
889         * doc/extend.texi (Long Long, Hex Floats): Document support for
890         long long and hex floats in more recent versions of ISO C++.
892 2018-09-03  Richard Biener  <rguenther@suse.de>
894         PR tree-optimization/87177
895         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
896         cleanup.
898 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
900         * bb-reorder.c (edge_order): Convert to C-qsort-style
901         tri-state comparator.
902         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
904 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
906         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
907         tri-state comparator.
908         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
910 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
912         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
913         (mergesort): ... here as maximum count for using netsort.
914         (gcc_qsort): Set nlim to 3 if stable sort is requested.
915         (gcc_stablesort): New.
916         * system.h (gcc_stablesort): Declare.
918 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
920         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
921         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
922         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
924 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
926         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
927         lxsdx and stxsdx alternatives.
928         (*mov<mode>_hardfloat64): Ditto.
929         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
931 2018-09-03  Richard Biener  <rguenther@suse.de>
933         PR tree-optimization/87200
934         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
935         simplify result.
937 2018-09-03  Martin Liska  <mliska@suse.cz>
939         PR tree-optimization/87201
940         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
941         Fix parenthesis in an expression.
943 2018-09-03  Richard Biener  <rguenther@suse.de>
945         PR tree-optimization/87197
946         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
947         visited.  CSE the VN_INFO hashtable lookup.
949         PR tree-optimization/87169
950         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
951         iterating make sure there's no extra backedges from irreducible
952         regions feeding the header.  Mark the destination block
953         executable.
955 2018-09-03  Martin Liska  <mliska@suse.cz>
957         PR driver/83193
958         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
959         * common/common-targhooks.c (default_get_valid_option_values):
960         New function.
961         * common/common-targhooks.h (default_get_valid_option_values):
962         Likewise.
963         * common/config/i386/i386-common.c: Move processor_target_table
964         from i386.c.
965         (ix86_get_valid_option_values): New function.
966         (TARGET_GET_VALID_OPTION_VALUES): New macro.
967         * config/i386/i386.c (struct ptt): Move to i386-common.c.
968         (PTA_*): Move all defined masks into i386-common.c.
969         (ix86_function_specific_restore): Use new processor_cost_table.
970         * config/i386/i386.h (struct ptt): Moved from i386.c.
971         (struct pta): Likewise.
972         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
973         * doc/tm.texi.in: Likewise.
974         * opt-suggestions.c (option_proposer::suggest_option):
975         Pass prefix to build_option_suggestions.
976         (option_proposer::get_completions): Likewise.
977         (option_proposer::build_option_suggestions): Use the new target
978         hook.
979         * opts.c (struct option_help_tuple): New struct.
980         (print_filtered_help): Use the new target hook.
982 2018-09-03  Martin Liska  <mliska@suse.cz>
984         PR middle-end/59521
985         * predict.c (set_even_probabilities): Add likely_edges
986         argument and handle cases where we have precisely one
987         likely edge.
988         (combine_predictions_for_bb): Catch also likely_edges.
989         (tree_predict_by_opcode): Handle gswitch statements.
990         * tree-cfg.h (find_case_label_for_value): New declaration.
991         (find_taken_edge_switch_expr): Likewise.
992         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
993         Find pivot in decision tree based on probabily, not by number of
994         nodes.
996 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
998         * doc/standards.texi (Standards): Update Objective-C reference.
1000 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1002         * doc/install.texi (Prerequisites): Update link for MPC.
1004 2018-09-01  Michael Matz  <matz@suse.de>
1006         PR tree-optimization/87074
1007         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1008         PHIs for outer-loop uses.
1010 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1012         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1013         * doc/invoke.texi (C Dialect Options): Ditto.
1015 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1017         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1019 2018-08-31  Richard Biener  <rguenther@suse.de>
1021         PR tree-optimization/87168
1022         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1023         (rpo_elim::eliminate_avail): When OP was not visited it must
1024         be available.
1026 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
1028         * tree-vrp.c (copy_value_range): Convert param "from" from
1029         "value_range *" to "const value_range *".
1030         (range_is_null): Likewise for param "vr".
1031         (range_int_cst_p): Likewise.
1032         (range_int_cst_singleton_p): Likewise.
1033         (symbolic_range_p): Likewise.
1034         (value_ranges_intersect_p): Likewise for both params.
1035         (value_range_nonnegative_p): Likewise for param "vr".
1036         (value_range_constant_singleton): Likewise.
1037         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1038         (extract_range_into_wide_ints): Likewise for param "vr".
1039         (extract_range_from_multiplicative_op): Likewise for params "vr0"
1040         and "vr1".
1041         (vrp_can_optimize_bit_op): Likewise.
1042         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1043         "vr1_".
1044         (extract_range_from_unary_expr): Likewise.
1045         (debug_value_range): Likewise for param "vr".
1046         (value_range::dump): Add "const" qualifier.
1047         (vrp_prop::check_array_ref): Convert local "vr" from
1048         "value_range *" to "const value_range *".
1049         (vrp_prop::check_mem_ref): Likewise.
1050         (vrp_prop::visit_stmt): Likewise for local "old_vr".
1051         (vrp_intersect_ranges_1): Likewise for param "vr_1".
1052         (vrp_intersect_ranges): Likewise.
1053         (simplify_stmt_for_jump_threading): Likewise for local "vr".
1054         (vrp_prop::vrp_finalize): Likewise.
1055         * tree-vrp.h (value_range::dump): Add "const" qualifier.
1056         (vrp_intersect_ranges): Add "const" qualifier to params as above.
1057         (extract_range_from_unary_expr): Likewise.
1058         (value_range_constant_singleton): Likewise.
1059         (symbolic_range_p): Likewise.
1060         (copy_value_range): Likewise.
1061         (extract_range_from_binary_expr_1): Likewise.
1062         (range_int_cst_p): Likewise.
1063         (vrp_set_zero_nonzero_bits): Likewise.
1064         (range_int_cst_singleton_p): Likewise.
1066 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
1068         * config/aarch64/arm_neon.h (vabsd_s64): New.
1069         (vnegd_s64): Likewise.
1071 2018-08-31  Martin Jambor  <mjambor@suse.cz>
1073         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1075 2018-08-31  Martin Liska  <mliska@suse.cz>
1077         * ipa-icf.c (sem_item::add_type): Use
1078         sem_item::m_type_hash_cache.
1079         * ipa-icf.h: Move the cache from sem_item_optimizer
1080         to sem_item.
1082 2018-08-31  Nathan Sidwell  <nathan@acm.org>
1084         * doc/extend.texi (Backwards Compatibility): Remove implicit
1085         extern C leeway of () being (...).
1087 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1089         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1091 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
1093         PR target/86684
1094         PR target/87149
1095         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1097 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
1099         PR middle-end/87138
1100         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1101         gen_int_mode.  Formatting fixes.
1103 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
1105         * target.def (custom_function_descriptors): Improve documentation.
1106         * doc/tm.texi.in (Trampolines): Expand discussion of function
1107         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1108         beginning of the section.
1109         * doc/tm.texi: Regenerated.
1111 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
1113         * cfg.h (class auto_edge_flag): Spell out the template-id of the
1114         base class in the initializer list.  This is a workaround for
1115         building with older GCC.
1116         (class auto_bb_flag): Likewise.
1118 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
1120         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1121         (altivec_vcmpequ<VI_char>_p): Remove star.
1122         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1123         vector load modes.
1124         (expand_strncmp_vec_sequence): New function.
1125         (emit_final_str_compare_vec): New function.
1126         (expand_strn_compare): Add support for vector strncmp.
1127         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1128         length specification to bytes.
1129         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1130         (vcmpnezb_p): New pattern.
1131         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1132         for option -mstring-compare-inline-limit.
1134 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
1136         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1137         (PTA_SKYLAKE): Add PTA_AES.
1138         (PTA_GOLDMONT): Likewise.
1140 2018-08-29  Jan Hubicka  <jh@suse.cz>
1142         PR lto/86517
1143         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1144         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1146 2018-08-29  Jan Hubicka  <jh@suse.cz>
1148         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1149         TYPE_STUB_DECL.
1150         (hash_tree): Do not visit TYPE_STUB_DECL.
1151         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1152         stream TYPE_STUB_DECL.
1153         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1154         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1155         after free_lang_data.
1156         (type_in_anonymous_namespace_p): Likewise.
1158 2018-08-29  Jan Hubicka  <jh@suse.cz>
1160         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1161         comment that it has to be even number.
1162         (class sreal): Change m_sig type to int32_t.
1163         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1164         int64_t for temporary calculations.
1165         (sreal_verify_basics): Drop one bit from minimum and maximum.
1167 2018-08-30  Richard Biener  <rguenther@suse.de>
1169         PR tree-optimization/87147
1170         * tree-ssa-sccvn.c (SSA_VISITED): New function.
1171         (visit_phi): When the degenerate result is from the backedge and
1172         we didn't visit its definition yet drop to VARYING.
1173         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1175 2018-08-29  Jan Hubicka  <jh@suse.cz>
1177         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1178         DECL_VINDEX.
1179         (hash_tree): Likewise.
1181 2018-08-29  Jan Hubicka  <jh@suse.cz>
1183         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1184         and TYPE_NEXT_REF_TO.
1186 2018-08-29  Jan Hubicka  <jh@suse.cz>
1188         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1189         comment that it has to be even number.
1190         (class sreal): Change m_sig type to int32_t.
1191         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1192         int64_t for temporary calculations.
1193         (sreal_verify_basics): Drop one bit from minimum and maximum.
1195 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
1197         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1199 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
1201         PR middle-end/86995
1202         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1203         if to_add is negative.
1205 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1207         PR middle-end/87053
1208         * builtins.c (c_strlen): Improve range checks.
1210 2018-08-29  Martin Sebor  <msebor@redhat.com>
1211             Jeff Law  <law@redhat.com>
1213         PR tree-optimization/86714
1214         PR tree-optimization/86711
1215         * builtins.c (c_strlen): Add arguments to call to string_constant.
1216         * expr.c (string_constant): Add argument.  Detect missing nul
1217         terminator and outermost declaration it's missing in.
1218         * expr.h (string_constant): Add argument.
1219         * fold-const.c (read_from_constant_string): Add arguments to call to
1220         string_constant.
1221         (c_getstr): Likewise.
1222         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1223         to string_constant.
1224         * tree-ssa-strlen.c (get_stridx): Likewise.
1226 2018-08-29  Jan Hubicka  <jh@suse.cz>
1228         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1229         Do not stream DECL_VINDEX.
1230         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1231         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1232         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1234 2018-08-29  Richard Biener  <rguenther@suse.de>
1236         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1237         virtual operands that are not default defs to honor region
1238         boundaries.
1239         (rpo_vn_valueize): Remove ineffective code here.
1241 2018-08-29  Richard Biener  <rguenther@suse.de>
1243         PR tree-optimization/87132
1244         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1245         when skipping defs reachable over backedges.
1247 2018-08-29  Richard Biener  <rguenther@suse.de>
1249         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1250         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1251         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1252         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1253         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1254         (vn_reference_lookup_3): Remove use of const_parms.
1255         (free_rpo_vn): Do not free const_parms.
1256         (do_rpo_vn): Do not call init_const_parms.
1257         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1258         SSA_NAME_POINTS_TO_READONLY_MEMORY.
1259         (call_may_clobber_ref_p_1): Likewise.
1261 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
1263         PR other/86726
1264         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1265         (-O): Ditto.
1266         (-ftree-scev-cprop): Document.
1268 2018-08-29  Jan Hubicka  <jh@suse.cz>
1270         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1271         parameters.
1272         (sreal constructor): Update.
1273         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1274         sreal:operator/): Update.
1276 2018-08-29  Martin Liska  <mliska@suse.cz>
1278         * tree-switch-conversion.c (switch_conversion::expand):
1279         Strenghten assumption about gswitch statements.
1281 2018-08-29  Richard Biener  <rguenther@suse.de>
1283         PR tree-optimization/87117
1284         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1285         re-value-number released SSA VDEFs.
1287 2018-08-29  Richard Biener  <rguenther@suse.de>
1289         PR tree-optimization/87126
1290         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1292 2018-08-28  Jim Wilson  <jimw@sifive.com>
1294         * config/riscv/pic.md: Rewrite.
1295         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1296         invalid address.
1297         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1298         (SOFTF, default_load, softload, softstore): New.
1300 2018-08-28  Jeff Law  <law@redhat.com>
1302         * fold-const.c (fold_binary_loc): Remove recently added assert.
1304 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1306         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1307         to OP parmeter of generated function.
1309 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1311         PR tree-optimization/87009
1312         * match.pd: Add boolean optimizations.
1314 2018-08-28  Martin Sebor  <msebor@redhat.com>
1316         PR middle-end/86631
1317         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1318         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1319         (pass_walloca::gate): Use it.
1320         (alloca_call_type): Same.
1321         (pass_walloca::execute): Same.
1322         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1324 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1326         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1327         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1328         >= 3005 to >= 9000.
1330 2018-08-28  Richard Biener  <rguenther@suse.de>
1332         PR tree-optimization/87124
1333         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1334         constants before looking up avail.
1336 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1338         PR middle-end/87099
1339         * calls.c (maybe_warn_nonstring_arg): Punt early if
1340         warn_stringop_overflow is zero.  Don't call get_range_strlen
1341         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1342         Swap comparison operands to have constants on rhs.  Only use
1343         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1344         increment lenrng[0].
1346 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1348         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1349         use of tree_to_shwi.  Remove duplicated test for the size being
1350         a whole number of bytes.
1352 2018-08-28  Richard Biener  <rguenther@suse.de>
1354         PR tree-optimization/87117
1355         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1356         Handle removed stmt without LHS (GIMPLE_NOP).
1358 2018-08-28  Richard Biener  <rguenther@suse.de>
1360         PR tree-optimization/87117
1361         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1362         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1364 2018-08-28  Richard Biener  <rguenther@suse.de>
1366         PR tree-optimization/87117
1367         * tree-ssa-pre.c (compute_avail): Do not make expressions
1368         with predicated values available.
1369         (get_expr_value_id): Assert we do not run into predicated value
1370         expressions.
1372 2018-08-28  Richard Biener  <rguenther@suse.de>
1374         PR tree-optimization/87117
1375         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1376         get virtual operands.
1377         (get_expr_operands): Handle STRING_CST like other decls.
1379 2018-08-28  Martin Liska  <mliska@suse.cz>
1381         * tree.h: Update documentation of fndecl_built_in_p
1382         functions.
1385 2018-08-27  Jeff Law  <law@redhat.com>
1386         PR tree-optimization/87110
1387         * tree-ssa-dse.c (compute_trims): Handle non-constant
1388         TYPE_SIZE_UNIT.
1390 2018-08-27  Martin Sebor  <msebor@redhat.com>
1392         PR tree-optimization/86914
1393         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1395 2018-08-27  Martin Sebor  <msebor@redhat.com>
1397         PR tree-optimization/87112
1398         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1399         the type of the bound argument.
1401 2018-08-27  Jeff Law  <law@redhat.com>
1403         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1404         type does not have a TYPE_SIZE_UNIT.
1406 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1408         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1409         with include of backend.h.
1411 2018-08-27  Richard Biener  <rguenther@suse.de>
1413         PR tree-optimization/86927
1414         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1415         use const cond reduction code.
1417 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1419         PR tree-optimization/85758
1420         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1422 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1424         PR c++/87091
1425         * diagnostic-show-locus.c (class layout_range): Update for
1426         conversion of show_caret_p to a tri-state.
1427         (layout_range::layout_range): Likewise.
1428         (make_range): Likewise.
1429         (layout::maybe_add_location_range): Likewise.
1430         (layout::should_print_annotation_line_p): Don't show annotation
1431         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1432         (layout::get_state_at_point): Update for conversion of
1433         show_caret_p to a tri-state.  Bail out early for
1434         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1435         underlining or source colorization.
1436         (gcc_rich_location::add_location_if_nearby): Update for conversion
1437         of show_caret_p to a tri-state.
1438         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1439         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1440         Likewise.
1441         (selftest::test_one_liner_labels): Likewise.
1442         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1443         conversion of show_caret_p to a tri-state.
1444         * pretty-print.c (text_info::set_location): Likewise.
1445         * pretty-print.h (text_info::set_location): Likewise.
1446         * substring-locations.c (format_warning_n_va): Likewise.
1447         * tree-diagnostic.c (default_tree_printer): Likewise.
1448         * tree-pretty-print.c (newline_and_indent): Likewise.
1450 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1452         PR c++/87091
1453         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1454         line above for line-insertion fix-it hints.
1455         (selftest::test_fixit_insert_containing_newline): Update the
1456         expected results, and add a test with line-numbering enabled.
1458 2018-08-27  Martin Liska  <mliska@suse.cz>
1460         PR sanitizer/86962
1461         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1462         params with DECL_HAS_VALUE_EXPR_P.
1464 2018-08-27  Martin Liska  <mliska@suse.cz>
1466         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1467         selected expansion strategy.
1469 2018-08-27  Martin Liska  <mliska@suse.cz>
1471         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1472         * builtins.c (is_builtin_fn): Likewise.
1473         * attribs.c (diag_attr_exclusions): Use new function
1474         fndecl_built_in_p and remove check for FUNCTION_DECL if
1475         possible.
1476         (builtin_mathfn_code): Likewise.
1477         (fold_builtin_expect): Likewise.
1478         (fold_call_expr): Likewise.
1479         (fold_builtin_call_array): Likewise.
1480         (fold_call_stmt): Likewise.
1481         (set_builtin_user_assembler_name): Likewise.
1482         (is_simple_builtin): Likewise.
1483         * calls.c (gimple_alloca_call_p): Likewise.
1484         (maybe_warn_nonstring_arg): Likewise.
1485         * cfgexpand.c (expand_call_stmt): Likewise.
1486         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1487         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1488         (cgraph_node::verify_node): Likewise.
1489         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1490         (cgraph_node::create_clone): Likewise.
1491         * config/arm/arm.c (arm_insert_attributes): Likewise.
1492         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1493         * dse.c (scan_insn): Likewise.
1494         * expr.c (expand_expr_real_1): Likewise.
1495         * fold-const.c (operand_equal_p): Likewise.
1496         (fold_binary_loc): Likewise.
1497         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1498         * gimple-low.c (lower_stmt): Likewise.
1499         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1500         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1501         * gimple.c (gimple_build_call_from_tree): Likewise.
1502         (gimple_call_builtin_p): Likewise.
1503         (gimple_call_combined_fn): Likewise.
1504         * gimplify.c (gimplify_call_expr): Likewise.
1505         (gimple_boolify): Likewise.
1506         (gimplify_modify_expr): Likewise.
1507         (gimplify_addr_expr): Likewise.
1508         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1509         * ipa-cp.c (determine_versionability): Likewise.
1510         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1511         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1512         * ipa-split.c (visit_bb): Likewise.
1513         (split_function): Likewise.
1514         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1515         * lto-cgraph.c (input_node): Likewise.
1516         * lto-streamer-out.c (write_symbol): Likewise.
1517         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1518         (lower_omp_1): Likewise.
1519         * predict.c (strip_predict_hints): Likewise.
1520         * print-tree.c (print_node): Likewise.
1521         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1522         * trans-mem.c (is_tm_irrevocable): Likewise.
1523         (is_tm_load): Likewise.
1524         (is_tm_simple_load): Likewise.
1525         (is_tm_store): Likewise.
1526         (is_tm_simple_store): Likewise.
1527         (is_tm_abort): Likewise.
1528         (tm_region_init_1): Likewise.
1529         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1530         * tree-cfg.c (verify_gimple_call): Likewise.
1531         (move_stmt_r): Likewise.
1532         (stmt_can_terminate_bb_p): Likewise.
1533         * tree-eh.c (lower_eh_constructs_2): Likewise.
1534         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1535         * tree-inline.c (remap_gimple_stmt): Likewise.
1536         (copy_bb): Likewise.
1537         (estimate_num_insns): Likewise.
1538         (fold_marked_statements): Likewise.
1539         * tree-sra.c (scan_function): Likewise.
1540         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1541         (optimize_stack_restore): Likewise.
1542         (pass_fold_builtins::execute): Likewise.
1543         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1544         (mark_all_reaching_defs_necessary_1): Likewise.
1545         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1546         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1547         (pass_forwprop::execute): Likewise.
1548         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1549         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1550         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1551         * tree-ssa-strlen.c (get_string_length): Likewise.
1552         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1553         (find_func_aliases_for_call): Likewise.
1554         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1555         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1556         * tree-tailcall.c (find_tail_calls): Likewise.
1557         * tree.c (need_assembler_name_p): Likewise.
1558         (free_lang_data_in_decl): Likewise.
1559         (get_call_combined_fn): Likewise.
1560         * ubsan.c (is_ubsan_builtin_p): Likewise.
1561         * varasm.c (incorporeal_function_p): Likewise.
1562         * tree.h (DECL_BUILT_IN): Remove and replace with
1563         fndecl_built_in_p.
1564         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1565         (fndecl_built_in_p): New.
1567 2018-08-27  Martin Liska  <mliska@suse.cz>
1569         PR tree-optimization/86847
1570         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1571         Dump also subtree probability.
1572         (switch_decision_tree::do_jump_if_equal): New function.
1573         (switch_decision_tree::emit_case_nodes): Handle special
1574         situations in balanced tree that can be emitted much simpler.
1575         Fix calculation of probabilities that happen in tree expansion.
1576         * tree-switch-conversion.h (struct cluster): Add
1577         is_single_value_p.
1578         (struct simple_cluster): Likewise.
1579         (struct case_tree_node): Add new function has_child.
1580         (do_jump_if_equal): New.
1582 2018-08-27  Martin Liska  <mliska@suse.cz>
1584         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1585         Add new argument to bit_test_cluster constructor.
1586         (bit_test_cluster::emit): Set bits really number of values
1587         handlel by a test.
1588         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1589         probability argument.
1590         * tree-switch-conversion.h (struct bit_test_cluster):
1591         Add m_handles_entire_switch.
1593 2018-08-27  Martin Liska  <mliska@suse.cz>
1595         PR tree-optimization/86702
1596         * tree-switch-conversion.c (jump_table_cluster::emit):
1597         Make probabilities even for values in jump table
1598         according to number of cases handled.
1599         (switch_decision_tree::compute_cases_per_edge): Pass
1600         argument to reset_out_edges_aux function.
1601         (switch_decision_tree::analyze_switch_statement): Likewise.
1602         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1603         Make it static.
1605 2018-08-27  Martin Liska  <mliska@suse.cz>
1607         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1608         cfun argument explicitly.
1609         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1610         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1611         function gimple_switch_default_bb.
1612         (convert_switch_statements):
1613         (expand_builtins):
1614         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1615         * stmt.c (label_to_block_fn): Use label_to_block and pass
1616         cfun argument explicitly and use gimple_switch_label_bb.
1617         (expand_case): Likewise.
1618         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1619         cfun argument explicitly. Likewise.
1620         (make_edges_bb): Likewise.
1621         (make_cond_expr_edges): Likewise.
1622         (get_cases_for_edge): Likewise.
1623         (make_gimple_switch_edges): Likewise.
1624         (label_to_block_fn): Likewise.
1625         (label_to_block): Likewise.
1626         (make_goto_expr_edges): Likewise.
1627         (make_gimple_asm_edges): Likewise.
1628         (main_block_label): Likewise.
1629         (group_case_labels_stmt): Likewise.
1630         (find_taken_edge_computed_goto): Likewise.
1631         (find_taken_edge_switch_expr): Likewise.
1632         (gimple_verify_flow_info): Likewise.
1633         (gimple_redirect_edge_and_branch): Likewise.
1634         (gimple_switch_label_bb): New function.
1635         (gimple_switch_default_bb): Likewise.
1636         (gimple_switch_edge): Likewise.
1637         (gimple_switch_default_edge): Likewise.
1638         * tree-cfg.h (label_to_block_fn): Remove and replace ...
1639         (label_to_block): ... with this.
1640         (gimple_switch_label_bb): New.
1641         (gimple_switch_default_bb): Likewise.
1642         (gimple_switch_edge): Likewise.
1643         (gimple_switch_default_edge): Likewise.
1644         * tree-cfgcleanup.c (convert_single_case_switch): Use
1645         new gimple functions and pass new argument to label_to_block.
1646         (cleanup_control_flow_bb):
1647         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1648         cfun argument explicitly.
1649         (make_eh_edges): Likewise.
1650         (redirect_eh_dispatch_edge): Likewise.
1651         (lower_resx): Likewise.
1652         (lower_eh_dispatch): Likewise.
1653         (maybe_remove_unreachable_handlers): Likewise.
1654         (unsplit_eh): Likewise.
1655         (cleanup_empty_eh): Likewise.
1656         (verify_eh_edges): Likewise.
1657         (verify_eh_dispatch_edge): Likewise.
1658         * tree-ssa-dom.c (record_edge_info): Likewise.
1659         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1660         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1661         (thread_through_normal_block): Likewise.
1662         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1663         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1664         * tree-switch-conversion.c (switch_conversion::collect): Use new
1665         gimple functions.
1666         (switch_conversion::check_final_bb): Likewise.
1667         (switch_conversion::gather_default_values): Pass new argument
1668         to label_to_block.
1669         (switch_conversion::build_constructors): Likewise.
1670         (switch_decision_tree::compute_cases_per_edge): Use new
1671         gimple_switch_edge function.
1672         (switch_decision_tree::analyze_switch_statement): Pass new argument
1673         to label_to_block.
1674         (switch_decision_tree::try_switch_expansion): Use
1675         gimple_switch_default_edge.
1676         * tree-vrp.c (find_switch_asserts): Pass new argument
1677         to label_to_block.
1678         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1679         (vr_values::simplify_switch_using_ranges): Likewise.
1681 2018-08-27  Richard Biener  <rguenther@suse.de>
1683         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1684         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1686         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1687         (struct vn_nary_op_s): Add unwind_to member.  Add
1688         predicated_values flag and put result into a union together
1689         with a linked list of vn_pval.
1690         (struct vn_ssa_aux): Add name member to make maintaining
1691         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1692         needed info, dfsnum, low, visited, on_sccstack, use_processed
1693         and range_info_anti_range_p members.
1694         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1695         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1696         New functions.
1697         (vn_valueize): New global.
1698         (vn_context_bb): Likewise.
1699         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1700         VN_INFO_PTR_INFO): Remove.
1701         * tree-ssa-sccvn.c: ... (rewrite)
1702         (pass_fre::execute): For -O2+ initialize loops and run
1703         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1704         run RPO VN in non-optimistic mode.
1705         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1706         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1707         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1708         (rpo-vn-max-loop-depth): Document.
1709         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1710         when valuezing the VUSE signals we walked out of the region.
1711         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1712         (phi_translate): Set VN context block to use for availability
1713         lookup.
1714         (compute_avail): Likewise.
1715         (pre_valueize): New function.
1716         (pass_pre::execute): Adjust to the RPO VN API.
1718         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1719         (propagate_constants_for_unrolling): Remove.
1720         (tree_unroll_loops_completely): Perform value-numbering
1721         on the unrolled bodies loop parent.
1723 2018-08-27  Richard Biener  <rguenther@suse.de>
1725         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1726         for partial antic compute.
1728 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1730         PR rtl-optimization/87065
1731         * combine.c (simplify_if_then_else): Formatting fix.
1732         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1733         check.
1734         (known_cond): Don't return const_true_rtx for vector modes.  Use
1735         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1737 2018-08-27  Martin Liska  <mliska@suse.cz>
1739         PR gcov-profile/87069
1740         * gcov.c (process_file): Record files already processed
1741         and warn about a file being processed multiple times.
1743 2018-08-27  Martin Liska  <mliska@suse.cz>
1745         PR driver/83193
1746         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1747         Set default values for x_aarch64_*_string strings.
1748         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1749         prefix.  For -mabi do not print '=ABI' in help and use
1750         <option_value> format for -msve-vector-bits and -moverride
1751         options.
1753 2018-08-26  Jeff Law  <law@redhat.com>
1755         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1756         "cfg.h"
1758 2018-08-26  Marek Polacek  <polacek@redhat.com>
1760         PR c++/87029, Implement -Wredundant-move.
1761         * doc/invoke.texi: Document -Wredundant-move.
1763 2018-08-25  Martin Sebor  <msebor@redhat.com>
1765         PR tree-optimization/87059
1766         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1767         to the same type as the other.
1768         * fold-const.c (fold_binary_loc): Assert expectation.
1770 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1772         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1773         extraneous parentheses, dead code section and formatting.
1775 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1777         PR c++/87091
1778         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1779         wide enough for jumps in the line-numbering to be visible.
1780         (layout::print_gap_in_line_numbering): New member function.
1781         (layout::calculate_line_spans): When using line numbering, merge
1782         line spans that are only 1 line apart.
1783         (diagnostic_show_locus): When printing line numbers, show gaps in
1784         line numbering directly, rather than printing headers.
1785         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1786         line-numbering with multiple line spans.
1787         (selftest::test_fixit_insert_containing_newline_2): Add test of
1788         line-numbering, in which the spans are close enough to be merged.
1790 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1792         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1793         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1794         * tree-vrp.c (range_is_nonnull): Remove.
1795         (range_includes_zero_p): Accept value_range instead of min/max.
1796         (extract_range_from_binary_expr_1): Do not early bail on
1797         POINTER_PLUS_EXPR.
1798         Use range_includes_zero_p instead of range_is_nonnull.
1799         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1800         of range_is_nonnull.
1801         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1802         special case VR_ANTI_RANGE.
1803         (vrp_finalize): Same.
1804         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1805         instead of min/max.
1806         (range_is_nonnull): Remove.
1807         * vr-values.c (vrp_stmt_computes_nonzero): Use
1808         range_includes_zero_p instead of range_is_nonnull.
1809         (extract_range_basic): Pass value_range to range_includes_zero_p
1810         instead of range_is_nonnull.
1812 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1814         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1815         * emit-rtl.h (rtl_data): Remove return_bnd.
1816         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1817         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1818         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1819         (POINTER_BOUNDS_MODE): Remove definition.
1820         (make_pointer_bounds_mode): Remove.
1821         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1822         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1823         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1824         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1825         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1826         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1827         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1829         * config/i386/i386-modes.def (BND32, BND64): Remove.
1830         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1831         (dbx64_register_map): Ditto.
1832         (svr4_dbx_register_map): Ditto.
1833         (indirect_thunk_bnd_needed): Remove.
1834         (indirect_thunks_bnd_used): Ditto.
1835         (indirect_return_bnd_needed): Ditto.
1836         (indirect_return_via_cx_bnd): Ditto.
1837         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1838         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1839         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1840         (output_indirect_thunk_function): Remove handling of
1841         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1842         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1843         (ix86_save_reg): Remove handling of crtl->return_bnd.
1844         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1845         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1846         and UNSPEC_BNDLX_ADDR.
1847         (ix86_output_indirect_branch_via_reg): Remove handling of
1848         indirect_thunk_prefix_bnd.
1849         (ix86_output_indirect_branch_via_push): Ditto.
1850         (ix86_output_function_return): Ditto.
1851         (ix86_output_indirect_function_return): Ditto.
1852         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1853         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1854         (CALL_USED_REGISTERS): Ditto.
1855         (REG_ALLOC_ORDER): Update for removal of bound registers.
1856         (HI_REGISTER_NAMES): Ditto.
1857         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1858         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1859         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1860         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1861         (FIRST_PSEUDO_REG): Update.
1862         (BND): Remove mode iterator.
1863         * config/i386/predicates.md (bnd_mem_operator): Remove.
1865 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1867         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1868         vectors.
1870 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1872         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1873         the case in which the permute needs only a single element and
1874         repeats for every vector of the result.  Extend that case to
1875         handle variable-length vectors.
1876         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1878 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1880         PR debug/79342
1881         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1882         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1884 2018-08-24  Richard Biener  <rguenther@suse.de>
1886         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1887         bb_flags_allocated members.
1888         (auto_flag): New RAII class for allocating flags.
1889         (auto_edge_flag): New RAII class for allocating edge flags.
1890         (auto_bb_flag): New RAII class for allocating bb flags.
1891         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1892         flag dynamically.
1893         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1894         in favor of temporarily allocated BB flag.
1895         * hsa-brig.c: Re-order includes.
1896         * hsa-dump.c: Likewise.
1897         * hsa-regalloc.c: Likewise.
1898         * print-rtl.c: Likewise.
1899         * profile-count.c: Likewise.
1901 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1903         PR target/86989
1904         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1905         the TOC register.
1907 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1909         PR 87073/bootstrap
1910         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1911         from wide_int_range_multiplicative_op.
1913 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1915         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1916         "permutaion".
1918 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1920         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1921         to 'expanded'.
1923 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1925         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1926         full GENERIC expression used for replacement.
1928 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1930         * tree-vrp.c (abs_extent_range): Remove.
1931         (extract_range_into_wide_ints): Pass wide ints by reference.
1932         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1933         Pass wide ints by reference in all calls to
1934         extract_range_into_wide_ints.
1935         * wide-int-range.cc (wide_int_range_div): New.
1936         * wide-int-range.h (wide_int_range_div): New.
1937         (wide_int_range_includes_zero_p): New.
1938         (wide_int_range_zero_p): New.
1940 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1942         * config/aarch64/aarch64.md (arches): New enum.
1943         (arch): New enum attr.
1944         (arch_enabled): New attr.
1945         (enabled): Now uses arch_enabled only.
1946         (simd, sve, fp16): Removed attribute.
1947         (fp): Attr now defined in terms of 'arch'.
1948         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1949         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1950         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1951         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1952         attributes into 'arch'.
1953         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1954         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1955         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1956         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1957         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1958         'simd' attribute into 'arch'.
1959         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1960         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1961         Convert use of 'fp' attribute to 'arch'.
1962         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1963         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1964         into 'arch'.
1965         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1966         (different modes) Merge 'fp' and 'simd' into 'arch'.
1967         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1968         'simd' into 'arch'.
1970 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1972         PR rtl-optimization/87026
1973         * expmed.c (canonicalize_comparison): If we can no longer create
1974         pseudoregisters, don't.
1976 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1978         PR target/86951
1979         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1980         prototype.
1981         * config/arm/arm.c (speculation_barrier_libfunc): New static
1982         variable.
1983         (arm_init_libfuncs): Initialize it.
1984         (arm_emit_speculation_barrier): New function.
1985         * config/arm/arm.md (speculation_barrier): Call
1986         arm_emit_speculation_barrier for architectures that do not have
1987         DSB or ISB.
1988         (speculation_barrier_insn): Only match on Armv7 or later.
1990 2018-08-23  Richard Biener  <rguenther@suse.de>
1992         PR middle-end/87024
1993         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1994         calls.
1996 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1998         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1999         of single-vector TBLs.
2000         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2001         one input is given.
2003 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
2005         PR target/85910
2006         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2007         aarch64_evpc_tbl guard.
2009 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2011         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2012         behaviour.
2014 2018-08-22  Martin Sebor  <msebor@redhat.com>
2016         PR middle-end/87052
2017         * tree-pretty-print.c (pretty_print_string): Add argument.
2018         (dump_generic_node): Call to pretty_print_string with string size.
2020 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
2022         PR rtl-optimization/86771
2023         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2024         of two SETs into those two SETs, one to be placed at i2, if that SETs
2025         destination is modified between i2 and i3.
2027 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2029         PR tree-optimization/86725
2030         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2031         function.
2032         (vect_analyze_scalar_cycles_1): Check it.
2034 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2036         PR tree-optimization/86725
2037         * tree-vect-loop.c (vect_is_simple_reduction): When treating
2038         an outer loop phi as a double reduction, make sure that the
2039         single user of the phi result is an inner loop phi.
2041 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2043         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2044         grouped stores with gaps to a strided group.
2046 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
2048         * tree-vect-stmts.c (get_group_load_store_type)
2049         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2050         first statement in a group.
2052 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2054         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2055         the sequence used in gcc/gcc.c.
2057 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2059         PR other/704
2060         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2061         building it.
2063 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2065         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2066         Darwin10-specific unwinder-shim.
2067         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2068         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
2069         New to cater for Darwin10 Rosetta.
2071 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2073         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2074         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2076 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
2078         PR bootstrap/81033
2079         PR target/81733
2080         PR target/52795
2081         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2082         (dwarf2out_switch_text_section): Generate a local label for the
2083         second function sub-section and apply it as the second FDE start
2084         label.
2085         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2086         second sub-section start.
2088 2018-08-22  Richard Biener  <rguenther@suse.de>
2090         PR tree-optimization/86988
2091         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2093 2018-08-22  Richard Biener  <rguenther@suse.de>
2095         PR tree-optimization/86945
2096         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2098 2018-08-22  Alexandre Oliva <oliva@adacore.com>
2100         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2101         a comment about how uses of r2 for .sdata2 come about.
2103 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
2105         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2107 2018-08-21  Marek Polacek  <polacek@redhat.com>
2109         PR c++/86981, Implement -Wpessimizing-move.
2110         * doc/invoke.texi: Document -Wpessimizing-move.
2112 2018-08-21  Jan Hubicka  <jh@suse.cz>
2114         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2115         * tree.h (is_redundant_typedef): Remove.
2116         * dwarf2out.c (is_redundant_typedef): Turn into static function.
2118 2018-08-21  Jan Hubicka  <jh@suse.cz>
2120         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2121         when possible.
2123 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
2125         * expmed.c (extract_low_bits): Reject invalid subregs early.
2127 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2129         PR middle-end/86121
2130         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2131         behaviour.
2133 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2135         * config/vxworks.h: Guard vxworks_asm_out_constructor and
2136         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2137         * config/vxworks.c: Likewise.
2139 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2141         * config/vxworks.c: Set targetm.have_ctors_dtors
2142         if HAVE_INITFINI_ARRAY_SUPPORT.
2143         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2144         if HAVE_INITFINI_ARRAY_SUPPORT.
2146 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2148         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2149         default search path for VxWorks < 7.
2151 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2153         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2154         (get_format_string): Refer to c_getstr.
2156 2018-08-21  Tom de Vries  <tdevries@suse.de>
2158         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2159         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2160         (debuginfo_early_stop): Declare.
2161         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2162         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2163         (debuginfo_early_stop): New function.
2164         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2165         and debuginfo_early_stop.
2166         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2167         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2168         (general_init): Call debuginfo_early_init.
2169         (finalize): Call debuginfo_fini.
2170         (do_compile): Call debuginfo_init.
2171         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2172         -fdump-early-debug.
2173         (@item -fdump-debug, @item -fdump-earlydebug): Add.
2175 2018-08-21  Tom de Vries  <tdevries@suse.de>
2177         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2178         flag_dump_noaddr and flag_dump_unnumbered.
2180 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
2182         * wide-int-range.cc (wide_int_range_abs): New.
2183         (wide_int_range_order_set): Rename from wide_int_range_min_max.
2184         * wide-int-range.h (wide_int_range_abs): New.
2185         (wide_int_range_min_max): New.
2186         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2187         case to call wide_int_range_abs.
2188         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2189         (extract_range_from_abs_expr): Delete.
2191 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
2193         PR target/87033
2194         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2195         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2196         for indexed loads.
2198 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2199             Jeff Law <law@redhat.com>
2201         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2202         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2204 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
2206         PR other/84889
2207         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2208         (decl_attributes): Likewise.
2209         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2210         instance.
2211         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2212         * diagnostic-core.h (class auto_diagnostic_group): New class.
2213         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2214         (diagnostic_report_diagnostic): Handle the first diagnostics within
2215         a group.
2216         (emit_diagnostic): Add auto_diagnostic_group instance.
2217         (inform): Likewise.
2218         (inform_n): Likewise.
2219         (warning): Likewise.
2220         (warning_at): Likewise.
2221         (warning_n): Likewise.
2222         (pedwarn): Likewise.
2223         (permerror): Likewise.
2224         (error): Likewise.
2225         (error_n): Likewise.
2226         (error_at): Likewise.
2227         (sorry): Likewise.
2228         (fatal_error): Likewise.
2229         (internal_error): Likewise.
2230         (internal_error_no_backtrace): Likewise.
2231         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2232         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2233         * diagnostic.h (struct diagnostic_context): Add fields
2234         "diagnostic_group_nesting_depth",
2235         "diagnostic_group_emission_count", "begin_group_cb",
2236         "end_group_cb".
2237         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2238         Add auto_diagnostic_group instance(s).
2239         (find_explicit_erroneous_behavior): Likewise.
2240         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2241         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2242         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2243         (gimplify_va_arg_expr): Likewise.
2244         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2245         (HSA_SORRY_AT): Likewise.
2246         * ipa-devirt.c (compare_virtual_tables): Likewise.
2247         (warn_odr): Likewise.
2248         * multiple_target.c (expand_target_clones): Likewise.
2249         * opts-common.c (cmdline_handle_error): Likewise.
2250         * reginfo.c (globalize_reg): Likewise.
2251         * substring-locations.c (format_warning_n_va): Likewise.
2252         * tree-inline.c (expand_call_inline): Likewise.
2253         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2254         * tree-ssa-loop-niter.c
2255         (do_warn_aggressive_loop_optimizations): Likewise.
2256         * tree-ssa-uninit.c (warn_uninit): Likewise.
2257         * tree.c (warn_deprecated_use): Likewise.
2259 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2261         PR target/87014
2262         * config/i386/i386.md (eh_return): Always update EH return
2263         address in word_mode.
2265 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
2267         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2268         TARGET_SPLIT_COMPLEX_ARG is defined.
2270 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2272         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2274 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2276         PR target/86984
2277         * expr.c (expand_assignment): Assert that bitpos is positive.
2278         (store_field): Likewise
2279         (expand_expr_real_1): Make sure that bitpos is positive.
2280         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2281         integer overflow.
2283 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2285         * Makefile.in (CPP_ID_DATA_H): Delete.
2286         (CPP_INTERNAL_H): Don't add it.
2287         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2288         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2290 2018-08-20  Richard Biener  <rguenther@suse.de>
2292         PR tree-optimization/78655
2293         * tree-vrp.c (extract_range_from_binary_expr_1): Make
2294         pointer + offset nonnull if either operand is nonnull work.
2296 2018-08-20  Tom de Vries  <tdevries@suse.de>
2298         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2299         unless the referenced die describes the added property using
2300         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2301         Otherwise, add a DW_AT_location to the referenced die.
2303 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2305         PR target/86994
2306         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2307         register_operand when calling ix86_set_reg_reg_cost.
2308         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2309         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2310         predicate and to 1 otherwise.
2312 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2314         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2315         emit a diagnostic that it is not supported and reset the option.
2316         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2317         supported and consume the option.  (ASM_FINAL_SPEC): New.
2319 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2321         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2322         a sentence.
2324 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2326         C-SKY port: Documentation
2328         * doc/extend.texi (C-SKY Function Attributes): New section.
2329         * doc/invoke.texi (Option Summary): Add C-SKY options.
2330         (C-SKY Options): New section.
2331         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2333 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2334             Huibin Wang  <huibin_wang@c-sky.com>
2335             Sandra Loosemore  <sandra@codesourcery.com>
2336             Chung-Lin Tang  <cltang@codesourcery.com>
2338         C-SKY port: Backend implementation
2340         * config/csky/*: New.
2341         * common/config/csky/*: New.
2343 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2344             Huibin Wang  <huibin_wang@c-sky.com>
2345             Sandra Loosemore  <sandra@codesourcery.com>
2346             Chung-Lin Tang  <cltang@codesourcery.com>
2347             Andrew Jenner  <andrew@codesourcery.com>
2349         C-SKY port: Configury
2351         * config.gcc (csky-*-*): New.
2352         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2353         * configure: Regenerated.
2355 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2357         * dump-context.h: Include "dumpfile.h".
2358         (dump_context::dump_printf_va): Convert final param from va_list
2359         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2360         ATTRIBUTE_GCC_DUMP_PRINTF.
2361         (dump_context::dump_printf_loc_va): Likewise.
2362         * dumpfile.c: Include "stringpool.h".
2363         (make_item_for_dump_printf_va): Delete.
2364         (make_item_for_dump_printf): Delete.
2365         (class dump_pretty_printer): New class.
2366         (dump_pretty_printer::dump_pretty_printer): New ctor.
2367         (dump_pretty_printer::emit_items): New member function.
2368         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2369         function.
2370         (dump_pretty_printer::emit_item): New member function.
2371         (dump_pretty_printer::stash_item): New member function.
2372         (dump_pretty_printer::format_decoder_cb): New member function.
2373         (dump_pretty_printer::decode_format): New member function.
2374         (dump_context::dump_printf_va): Reimplement in terms of
2375         dump_pretty_printer.
2376         (dump_context::dump_printf_loc_va): Convert final param from va_list
2377         to va_list *.
2378         (dump_context::begin_scope): Reimplement call to
2379         make_item_for_dump_printf.
2380         (dump_printf): Update for change to dump_printf_va.
2381         (dump_printf_loc): Likewise.
2382         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2383         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2384         with %T, %E, and %G.
2385         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2386         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2387         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2388         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2389         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2390         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2391         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2392         within a dump_printf_loc call to "%wu".
2393         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2394         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2395         missing space after "=".
2396         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2397         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2398         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2399         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2400         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2401         duplicate "vectorized" from message.
2403 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2405         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2406         polyNxK_t element's TYPE_STRING_FLAG.
2408 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2410         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2411         (they were unnamed before).  Fix comments.
2413 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2415         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2417 2018-08-17  Richard Biener  <rguenther@suse.de>
2419         PR tree-optimization/86841
2420         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2422 2018-08-17  Martin Liska  <mliska@suse.cz>
2424         * common.opt: Remove Warn, Init and Report for options with
2425         Ignore/Deprecated flag. Warning is done automatically for
2426         Deprecated flags.
2427         * config/i386/i386.opt: Likewise.
2428         * config/ia64/ia64.opt: Likewise.
2429         * config/rs6000/rs6000.opt: Likewise.
2430         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2431         Remove usage of flag_check_pointer_bounds.
2432         * lto-wrapper.c (merge_and_complain): Do not handle
2433         OPT_fcheck_pointer_bounds.
2434         (append_compiler_options): Likewise.
2435         * opt-functions.awk: Do not handle Deprecated.
2436         * optc-gen.awk: Check that Var, Report and Init are not
2437         used for an option with Ignore/Deprecated flag.
2438         * opts-common.c (decode_cmdline_option): Do not report
2439         CL_ERR_DEPRECATED.
2440         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2441         options.
2442         * opts.h (struct cl_option): Remove cl_deprecated flag.
2443         (CL_ERR_DEPRECATED): Remove error enum value.
2445 2018-08-17  Richard Biener  <rguenther@suse.de>
2447         PR middle-end/86505
2448         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2449         across a va-arg-pack using call adjust its return value accordingly.
2451 2018-08-16  Martin Sebor  <msebor@redhat.com>
2453         PR tree-optimization/86853
2454         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2455         (struct fmtresult): Add member and initialize it in ctors.
2456         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2457         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2458         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2459         (parse_directive): Handle %C same as %c.
2460         (sprintf_dom_walker::compute_format_length): Adjust.
2461         (is_call_safe): Adjust.
2463 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2465         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2466         for determining how to count the elements.
2467         * builtins.h (c_strlen): Adjust prototype.
2468         * expr.c (string_constant): Add new parameter mem_size.
2469         Set *mem_size appropriately.
2470         * expr.h (string_constant): Adjust protoype.
2471         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2472         * gimple-fold.h (get_range_strlen): Adjust prototype.
2473         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2474         (format_string): Call get_string_length with eltsize.
2476 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2478         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2479         to emit the span, rather than setting it as the prefix.
2481 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2483         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2484         "margin_char" parameter, defaulting to space.  Use it in place
2485         of pp_space for the initial part of the margin.
2486         (layout::print_leading_fixits): Use '+' when filling the margin
2487         of line-insertion fix-it hints.
2489 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2491         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2492         Delete.
2494 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2496         * config/rs6000/altivec.md: Don't set length attribute to the default
2497         value.
2498         * config/rs6000/darwin.md: Ditto.
2499         * config/rs6000/dfp.md: Ditto.
2500         * config/rs6000/htm.md: Ditto.
2501         * config/rs6000/rs6000.md: Ditto.
2502         * config/rs6000/sync.md: Ditto.
2503         * config/rs6000/vsx.md: Ditto.
2505 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2507         * config/rs6000/altivec.md: Don't set length attribute to the default
2508         value, for branch instructions.
2509         * config/rs6000/darwin.md: Ditto.
2510         * config/rs6000/rs6000.md: Ditto.
2512 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2514         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2515         (unnamed conditional branch define_insn): Set length to 4 or 8
2516         depending on offset.
2517         (<bd>_<mode>): Similar, for alternative 0.
2518         (<bd>tf_<mode>): Ditto.
2520 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2522         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2524 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2526         * doc/rtl.texi: Replace old RTX class names with new names.
2529 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2531         * expmed.h (canonicalize_comparison): New declaration.
2532         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2533         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2534         * optabs.c (prepare_cmp_insn): Likewise.
2535         * rtl.h (unsigned_condition_p): New function which checks if a
2536         comparison operator is unsigned.
2538 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2540         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2541         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2543 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2545         PR target/84711
2546         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2547         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2548         (mov<mov>): ..this and enable unconditionally.
2550 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2552         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2554 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2556         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2557         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2558         "Common" with "Target".
2560 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2562         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2563         * doc/invoke.texi (mmitigate-rop): Remove.
2564         * config/i386/i386.c: Do not include "regrename.h".
2565         (ix86_rop_should_change_byte_p, reg_encoded_number)
2566         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2567         Remove.
2568         (ix86_reorg): Remove call to ix86_mitigate_rop.
2569         * config/i386/i386.md (attr "modrm_class"): Remove.
2570         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2571         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2572         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2574 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2576         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2577         allow folding of mergeh() and mergel() for the float and double types.
2578         (fold_mergehl_helper): Rework to handle building a permute tree
2579         for float vectors.
2581 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2583         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2584         for TARGET_SSE.
2586 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2588         * common.opt (fdiagnostics-show-labels): New option.
2589         * diagnostic-show-locus.c (class layout_range): Add field
2590         "m_label".
2591         (class layout): Add field "m_show_labels_p".
2592         (layout_range::layout_range): Add param "label" and use it to
2593         initialize m_label.
2594         (make_range): Pass in NULL for new "label" param of layout_range's
2595         ctor.
2596         (layout::layout): Initialize m_show_labels_p.
2597         (layout::maybe_add_location_range): Pass in loc_range->m_label
2598         when constructing layout_range instances.
2599         (struct line_label): New struct.
2600         (layout::print_any_labels): New member function.
2601         (layout::print_line): Call it if label-printing is enabled.
2602         (selftest::test_one_liner_labels): New test.
2603         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2604         * diagnostic.c (diagnostic_initialize): Initialize
2605         context->show_labels_p.
2606         * diagnostic.h (struct diagnostic_context): Add field
2607         "show_labels_p".
2608         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2609         -fno-diagnostics-show-labels.
2610         * dwarf2out.c (gen_producer_string): Add
2611         OPT_fdiagnostics_show_labels to the ignored options.
2612         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2613         param.
2614         (gcc_rich_location::maybe_add_expr): Likewise.
2615         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2616         label" param, defaulting to NULL.
2617         (gcc_rich_location::add_expr): Add "label" param.
2618         (gcc_rich_location::maybe_add_expr): Likewise.
2619         (class text_range_label): New class.
2620         (class range_label_for_type_mismatch): New class.
2621         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2622         of format_warning_va.
2623         (fmtwarn_n): Likewise for new params of format_warning_n_va.
2624         * lto-wrapper.c (merge_and_complain): Add
2625         OPT_fdiagnostics_show_labels to the "pick one setting" options.
2626         (append_compiler_options): Likewise to the dropped options.
2627         (append_diag_options): Likewise to the passed-on options.
2628         * opts.c (common_handle_option): Handle the new option.
2629         * selftest-diagnostic.c
2630         (test_diagnostic_context::test_diagnostic_context): Enable
2631         show_labels_p.
2632         * substring-locations.c: Include "gcc-rich-location.h".
2633         (format_warning_n_va): Add "fmt_label" and "param_label" params
2634         and use them as appropriate.
2635         (format_warning_va): Add "fmt_label" and "param_label" params,
2636         passing them on to format_warning_n_va.
2637         (format_warning_at_substring): Likewise.
2638         (format_warning_at_substring_n): Likewise.
2639         * substring-locations.h (format_warning_va): Add "fmt_label" and
2640         "param_label" params.
2641         (format_warning_n_va): Likewise.
2642         (format_warning_at_substring): Likewise.
2643         (format_warning_at_substring_n): Likewise.
2644         * toplev.c (general_init): Initialize global_dc->show_labels_p.
2646 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
2648         PR testsuite/86519
2649         * builtins.c (expand_builtin_memcmp): Do not expand the call
2650         when overflow is detected.
2652 2018-08-15  Martin Sebor  <msebor@redhat.com>
2654         PR tree-optimization/71625
2655         * config/aarch64/aarch64-builtins.c
2656         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2658 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2660         * config/s390/s390.c (s390_reorg): Remove loop.
2662 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2664         * config/darwin.c
2665          (darwin_function_switched_text_sections): Delete.
2666         * gcc/config/darwin.h
2667          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2669 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2671         PR target/81685
2672         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2673         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2674         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2676 2018-08-15  Martin Liska  <mliska@suse.cz>
2678         PR tree-optimization/86925
2679         * predict.c (expr_expected_value_1): When taking
2680         later predictor, assign also probability.
2681         Use fold_build2_initializer_loc in order to fold
2682         the expression in -frounding-math.
2684 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2686         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2687         patterns.
2688         (expand_vec_perm_1): Try the new method.
2690 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2692         PR target/86547
2693         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2694         Check whether lra_live_max_point is 0 before dividing.
2696 2018-08-14  Martin Sebor  <msebor@redhat.com>
2698         PR tree-optimization/86650
2699         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2700         (vrp_prop::check_mem_ref): Same.
2702 2018-08-13  Liu Hao <lh_mouse@126.com>
2704         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2705         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2706         and clear it thereafter, as it only works for DBCS.
2708 2018-08-13  Liu Hao <lh_mouse@126.com>
2710         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2711         handle returned by _get_osf_handle().
2713 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2715         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2716         for folding vec_perm.
2718 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2720         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2721         Add support for gimple-folding of vec_pack() and vec_unpack()
2722         intrinsics.
2724 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2726         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2727         vec_xst variants to the list.
2728         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2729         vector loads and stores.
2731 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2733         * config.gcc (rs6000-ibm-aix4.x): Delete.
2734         (rs6000-ibm-aix5.1): Delete.
2735         (rs6000-ibm-aix5.2): Delete.
2736         (rs6000-ibm-aix5.3): Delete.
2737         * config/rs6000/aix43.h: Delete.
2738         * config/rs6000/aix51.h: Delete.
2739         * config/rs6000/aix52.h: Delete.
2740         * config/rs6000/t-aix43: Delete.
2742 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2744         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2745         New function.
2746         (s390_decompose_address): Factor out constant pool ref
2747         decomposition.
2749 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2751         * config/nds32/nds32-predicates.c
2752         (nds32_can_use_bclr_p): Change return type as bool.
2753         (nds32_can_use_bset_p): Ditto.
2754         (nds32_can_use_btgl_p): Ditto.
2755         (nds32_can_use_bitci_p): Ditto.
2756         * config/nds32/nds32-protos.h
2757         (nds32_can_use_bclr_p): Change declaration.
2758         (nds32_can_use_bset_p): Ditto.
2759         (nds32_can_use_btgl_p): Ditto.
2760         (nds32_can_use_bitci_p): Ditto.
2762 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2764         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2765         Support -msched-prolog-epilog option.
2766         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2768 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2770         * common/config/nds32/nds32-common.c
2771         (nds32_option_optimization_table): Enalbe -malways-align.
2773 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2775         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2776         extra_headers.
2777         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2778         OPT_misr_secure_ case.
2779         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2780         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2781         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2782         secure attribute.
2783         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2784         (nds32_isr_info): New field security_level.
2785         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2786         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2787         * config/nds32/nds32.opt (misr-secure): New option.
2788         * config/nds32/nds32_init.inc: New file.
2789         * config/nds32/nds32_isr.h: New file.
2791 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2793         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2794         Update comment for atomic instructions.
2795         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2796         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2797         Remove.
2798         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2799         load for __ATOMIC_SEQ_CST model.
2800         (atomic_loaddi_1): Remove float register target.
2801         (atomic_storedi): Handle CONST_INT values.
2802         (atomic_storedi_1): Remove float register source.  Add special case
2803         for zero value.
2804         (memory_barrier): New expander and insn.
2806 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2808         PR tree-optimization/86835
2809         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2810         new_stmt after def_gsi, make sure to insert new_square_stmt after
2811         that stmt, not 2 stmts before it.
2813 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2815         PR target/82418
2816         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2817         instead of SWI48.
2819 2018-08-10  Martin Liska  <mliska@suse.cz>
2821         PR target/83610
2822         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2823         function type.
2824         * builtins.c (expand_builtin_expect_with_probability):
2825         New function.
2826         (expand_builtin_expect_with_probability): New function.
2827         (build_builtin_expect_predicate): Add new argumnet probability
2828         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2829         (fold_builtin_expect):
2830         (fold_builtin_2):
2831         (fold_builtin_3):
2832         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2833         * builtins.h (fold_builtin_expect): Set new argument.
2834         * doc/extend.texi: Document __builtin_expect_with_probability.
2835         * doc/invoke.texi: Likewise.
2836         * gimple-fold.c (gimple_fold_call): Pass new argument.
2837         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2838         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2839         * predict.c (get_predictor_value): New function.
2840         (expr_expected_value): Add new argument probability. Assume
2841         that predictor and probability are always non-null.
2842         (expr_expected_value_1): Likewise.  For __builtin_expect and
2843         __builtin_expect_with_probability set probability.  Handle
2844         combination in binary expressions.
2845         (tree_predict_by_opcode): Simplify code by simply calling
2846         get_predictor_value.
2847         (pass_strip_predict_hints::execute): Add handling of
2848         BUILT_IN_EXPECT_WITH_PROBABILITY.
2849         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2850         new predictor.
2851         * tree.h (DECL_BUILT_IN_P): New function.
2853 2018-08-10  Martin Liska  <mliska@suse.cz>
2855         PR tree-optimization/85799
2856         * passes.def: Add argument for pass_strip_predict_hints.
2857         * predict.c (class pass_strip_predict_hints): Add new argument
2858         early_p.
2859         (strip_predictor_early): New function.
2860         (pass_strip_predict_hints::execute): Call the function to
2861         strip predictors.
2862         (strip_predict_hints): New function.
2863         * predict.def: Fix comment.
2865 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2867         * Makefile.in: Clarify which tm.texi to copy over to assert the
2868         right to grant a GFDL license for all.
2870 2018-08-09  Jeff Law  <law@redhat.com>
2872         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2873         unused variable.
2875 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2877         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2878         prototype.
2880 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2882         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2883         reductions for variable-length vectors.
2885 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2887         PR other/84889
2888         * common.opt (fdiagnostics-show-line-numbers): New option.
2889         * diagnostic-show-locus.c (class layout): Add fields
2890         "m_show_line_numbers_p" and "m_linenum_width";
2891         (num_digits): New function.
2892         (test_num_digits): New function.
2893         (layout::layout): Initialize new fields.  Update m_x_offset
2894         logic to handle any left margin.
2895         (layout::print_source_line): Print line number when requested.
2896         (layout::start_annotation_line): New member function.
2897         (layout::print_annotation_line): Call it.
2898         (layout::print_leading_fixits): Likewise.
2899         (layout::print_trailing_fixits): Likewise.  Update calls to
2900         move_to_column for new parameter.
2901         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2902         it to potentially call start_annotation_line.
2903         (layout::show_ruler): Call start_annotation_line.
2904         (selftest::test_line_numbers_multiline_range): New selftest.
2905         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2906         and selftest::test_line_numbers_multiline_range.
2907         * diagnostic.c (diagnostic_initialize): Initialize
2908         show_line_numbers_p.
2909         * diagnostic.h (struct diagnostic_context): Add field
2910         "show_line_numbers_p".
2911         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2912         -fno-diagnostics-show-line-numbers.
2913         * dwarf2out.c (gen_producer_string): Add
2914         OPT_fdiagnostics_show_line_numbers to the ignored options.
2915         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2916         one setting" options.
2917         (append_compiler_options): Likewise to the dropped options.
2918         (append_diag_options): Likewise to the passed-on options.
2919         * opts.c (common_handle_option): Handle the new option.
2920         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2922 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2924         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2925         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2926         third argument of type "const signed char" to descriptions of
2927         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2928         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2929         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2930         __builtin_bcdsub_ov functions.
2932 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2934         PR tree-optimization/86858
2935         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2936         flow_bb_inside_loop_p calls.
2938 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2940         PR tree-optimization/86871
2941         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2942         instead of gimple_assign_lhs.
2944 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2946         PR target/86887
2947         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2948         register constraint to operand 0.
2949         (add<mode>3_carryinC): Likewise.
2950         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2952 2018-08-09  Martin Liska  <mliska@suse.cz>
2954         PR c/86895
2955         * common.opt: Remove extra line.
2957 2018-08-09  Martin Liska  <mliska@suse.cz>
2959         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2960         at the end of a line, make first letter capital and end up
2961         a sentence with a dot.
2962         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2963         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2964         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2965         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2966         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2967         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2968         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2969         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2970         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2971         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2972         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2973         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2974         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2975         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2976         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2977         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2978         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2979         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2981 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2983         PR target/84332
2984         * config/s390/s390.c (s390_option_override_internal): Reduce the
2985         stack-clash-protection-probe-interval param if it would be too big
2986         for z900.
2988 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2990         PR target/46179
2991         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2992         * config/m68k/m68k.c (handle_move_double): Don't call
2993         m68k_final_prescan_insn.
2994         (m68k_adjust_decorated_operand): Renamed from
2995         m68k_final_prescan_insn, remove first and third operand and
2996         simplify.
2997         (print_operand): Call it.
2998         (print_operand_address): Call it.
3000 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3002         * diagnostic.c (diagnostic_report_current_module): Use
3003         linemap_included_from & linemap_included_from_linemap.
3005 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
3007         * config/aarch64/aarch64-cores.def: Add phecda core.
3008         * config/aarch64/aarch64-tune.md: Regenerate.
3009         * doc/invoke.texi: Add phecda core.
3011 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3013         PR target/85295
3014         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3015         definitions.
3016         * config/s390/s390.md ("movti"): Add more alternatives for
3017         constant to GPR copies.
3019 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
3021         * config/s390/s390.c: Fix whitespace damage throughout the file.
3022         * config/s390/s390.h: Likewise.
3023         * config/s390/tpf.h: Likewise.
3025 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3027         * config/s390/s390.c (s390_loadrelative_operand_p):
3028         Remove TARGET_CPU_ZARCH usages.
3029         (s390_rtx_costs): Likewise.
3030         (s390_legitimate_constant_p): Likewise.
3031         (s390_cannot_force_const_mem): Likewise.
3032         (legitimate_reload_constant_p): Likewise.
3033         (s390_preferred_reload_class): Likewise.
3034         (legitimize_pic_address): Likewise.
3035         (legitimize_tls_address): Likewise.
3036         (s390_split_branches): Removed.
3037         (s390_add_execute): Removed.
3038         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3039         (s390_mainpool_start): Likewise.
3040         (s390_mainpool_finish): Likewise.
3041         (s390_mainpool_cancel): Removed.
3042         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3043         (s390_chunkify_cancel): Likewise.
3044         (s390_return_addr_rtx): Likewise.
3045         (s390_register_info): Remove split_branches_pending_p uages.
3046         (s390_optimize_register_info): Likewise.
3047         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3048         split_branches_pending_p usages.
3049         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3050         (s390_load_got): Likewise.
3051         (s390_expand_split_stack_prologue): Likewise.
3052         (output_asm_nops): Likewise.
3053         (s390_function_profiler): Likewise.
3054         (s390_emit_call): Likewise.
3055         (s390_conditional_register_usage): Likewise.
3056         (s390_optimize_prologue): Likewise.
3057         (s390_reorg): Remove TARGET_CPU_ZARCH and
3058         split_branches_pending_p usages.
3059         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3060         usages.
3061         (s390_output_indirect_thunk_function): Likewise.
3062         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3063         (TARGET_CPU_ZARCH_P): Removed.
3064         (struct machine_function): Remove split_branches_pending_p.
3065         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3067 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
3069         * common/config/s390/s390-common.c (processor_flags_table):
3070         Remove flags.
3071         * config.gcc: Remove with_arch/with_tune support.
3072         * config/s390/2064.md: Remove cpu attribute comparisons.
3073         * config/s390/driver-native.c (s390_host_detect_local_cpu):
3074         Remove MTN.
3075         * config/s390/linux.h (ASM_SPEC):
3076         Remove -march support.
3077         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3078         Use a table to get an arch level.
3079         * config/s390/s390-opts.h (enum processor_type):
3080         Remove enum values.
3081         * config/s390/s390.c
3082         (processor_table): Remove entries, add arch_level values.
3083         (s390_issue_rate): Remove cases.
3084         (s390_option_override): Adjust
3085         s390_option_override_internal() call.
3086         (s390_option_override_internal): Remove deprecation warning.
3087         (s390_valid_target_attribute_tree): Adjust
3088         s390_option_override_internal() call.
3089         * config/s390/s390.h (struct s390_processor):
3090         Share with s390-c.c, add arch_level field.
3091         * config/s390/s390.md:
3092         Remove occurrences in cpu attribute.
3093         * config/s390/s390.opt: Remove -march/-mtune support.
3094         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3095         * doc/invoke.texi: Remove deprecation warning.
3097 2018-08-08  Luis Machado  <luis.machado@linaro.org>
3099         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3100         global.
3101         (qdf24xx_tunings): Set vector cost structure to
3102         qdf24xx_vector_cost.
3104         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3105         <register_sextend>: Set to 3.
3107 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
3109         PR target/86838
3110         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3111         * config/aarch64/aarch64-simd.md
3112         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3113         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3114         (aarch64_frecpx<mode>): ...this new pattern.
3115         * config/aarch64/aarch64-simd-builtins.def: Remove comment
3116         about aarch64_frecp<FRECP:frecp_suffix><mode>.
3118 2018-08-07  Martin Liska  <mliska@suse.cz>
3120         PR middle-end/83023
3121         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3122         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3123         * predict.def (PRED_MALLOC_NONNULL): New predictor.
3124         * doc/extend.texi: Document that malloc attribute adds
3125         hit to compiler.
3127 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
3129         PR target/86785
3130         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3131         Define to speculation_safe_value_not_needed.
3133 2018-08-06  Jeff Law  <law@redhat.com>
3135         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3136         the vr_values instance to cprop_into_stmt.
3137         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3138         (cprop_operand): Also query EVRP to determine if OP is a constant.
3140 2018-08-06  Nathan Sidwell  <nathan@acm.org>
3142         * diagnostic.c (diagnostic_report_current_module): Reroll
3143         included-at loop.  Translate text.
3145 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
3147         * function-tests.c (selftest::test_expansion_to_rtl): Call
3148         free_after_compilation.
3150 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3152         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3154 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3156         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3157         loops with memory block operations from getting unrolled.
3159 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
3161         PR target/86807
3162         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3163         Define to speculation_safe_value_not_needed.
3165 2018-08-06  Jeff Law  <law@redhat.com>
3167         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3168         assert.
3170 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3172         PR target/86662
3173         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3174         with all enabled __intN types.
3176         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3178 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3180         * alias.c (record_set): Check for clobber high.
3181         * cfgexpand.c (expand_gimple_stmt): Likewise.
3182         * combine-stack-adj.c (single_set_for_csa): Likewise.
3183         * combine.c (find_single_use_1): Likewise.
3184         (set_nonzero_bits_and_sign_copies): Likewise.
3185         (get_combine_src_dest): Likewise.
3186         (is_parallel_of_n_reg_sets): Likewise.
3187         (try_combine): Likewise.
3188         (record_dead_and_set_regs_1): Likewise.
3189         (reg_dead_at_p_1): Likewise.
3190         (reg_dead_at_p): Likewise.
3191         * dce.c (deletable_insn_p): Likewise.
3192         (mark_nonreg_stores_1): Likewise.
3193         (mark_nonreg_stores_2): Likewise.
3194         * df-scan.c (df_find_hard_reg_defs): Likewise.
3195         (df_uses_record): Likewise.
3196         (df_get_call_refs): Likewise.
3197         * dwarf2out.c (mem_loc_descriptor): Likewise.
3198         * haifa-sched.c (haifa_classify_rtx): Likewise.
3199         * ira-build.c (create_insn_allocnos): Likewise.
3200         * ira-costs.c (scan_one_insn): Likewise.
3201         * ira.c (equiv_init_movable_p): Likewise.
3202         (rtx_moveable_p): Likewise.
3203         (interesting_dest_for_shprep): Likewise.
3204         * jump.c (mark_jump_label_1): Likewise.
3205         * postreload-gcse.c (record_opr_changes): Likewise.
3206         * postreload.c (reload_cse_simplify): Likewise.
3207         (struct reg_use): Add source expr.
3208         (reload_combine): Check for clobber high.
3209         (reload_combine_note_use): Likewise.
3210         (reload_cse_move2add): Likewise.
3211         (move2add_note_store): Likewise.
3212         * print-rtl.c (print_pattern): Likewise.
3213         * recog.c (decode_asm_operands): Likewise.
3214         (store_data_bypass_p): Likewise.
3215         (if_test_bypass_p): Likewise.
3216         * regcprop.c (kill_clobbered_value): Likewise.
3217         (kill_set_value): Likewise.
3218         * reginfo.c (reg_scan_mark_refs): Likewise.
3219         * reload1.c (maybe_fix_stack_asms): Likewise.
3220         (eliminate_regs_1): Likewise.
3221         (elimination_effects): Likewise.
3222         (mark_not_eliminable): Likewise.
3223         (scan_paradoxical_subregs): Likewise.
3224         (forget_old_reloads_1): Likewise.
3225         * reorg.c (find_end_label): Likewise.
3226         (try_merge_delay_insns): Likewise.
3227         (redundant_insn): Likewise.
3228         (own_thread_p): Likewise.
3229         (fill_simple_delay_slots): Likewise.
3230         (fill_slots_from_thread): Likewise.
3231         (dbr_schedule): Likewise.
3232         * resource.c (update_live_status): Likewise.
3233         (mark_referenced_resources): Likewise.
3234         (mark_set_resources): Likewise.
3235         * rtl.c (copy_rtx): Likewise.
3236         * rtlanal.c (reg_referenced_p): Likewise.
3237         (single_set_2): Likewise.
3238         (noop_move_p): Likewise.
3239         (note_stores): Likewise.
3240         * sched-deps.c (sched_analyze_reg): Likewise.
3241         (sched_analyze_insn): Likewise.
3243 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3245         * cse.c (invalidate_reg): New function extracted from...
3246         (invalidate): ...here.
3247         (canonicalize_insn): Check for clobber high.
3248         (invalidate_from_clobbers): invalidate clobber highs.
3249         (invalidate_from_sets_and_clobbers): Likewise.
3250         (count_reg_usage): Check for clobber high.
3251         (insn_live_p): Likewise.
3252         * cselib.c (cselib_expand_value_rtx_1):Likewise.
3253         (cselib_invalidate_regno): Check for clobber in setter.
3254         (cselib_invalidate_rtx): Pass through setter.
3255         (cselib_invalidate_rtx_note_stores):
3256         (cselib_process_insn): Check for clobber high.
3257         * cselib.h (cselib_invalidate_rtx): Add operand.
3259 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3261         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3262         (mark_not_eliminable): Likewise.
3263         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3264         * lra-lives.c (process_bb_lives): Check for clobber high.
3265         * lra.c (new_insn_reg): Remember clobber highs.
3266         (collect_non_operand_hard_regs): Check for clobber high.
3267         (lra_set_insn_recog_data): Likewise.
3268         (add_regs_to_insn_regno_info): Likewise.
3269         (lra_update_insn_regno_info): Likewise.
3271 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3273         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3274         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3276 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3278         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3279         (copy_insn_1): Likewise.
3280         (gen_hard_reg_clobber_high): New gen function.
3281         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3282         * genemit.c (gen_exp): Likewise.
3283         (gen_emit_seq): Pass through info.
3284         (gen_insn): Check for CLOBBER_HIGH.
3285         (gen_expand): Pass through info.
3286         (gen_split): Likewise.
3287         (output_add_clobbers): Likewise.
3288         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3289         (remove_clobbers): Likewise.
3290         * rtl.h (gen_hard_reg_clobber_high): New declaration.
3292 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3294         * doc/rtl.texi (clobber_high): Add.
3295         (parallel): Add in clobber high
3296         * rtl.c (rtl_check_failed_code3): Add function.
3297         * rtl.def (CLOBBER_HIGH): Add expression.
3298         * rtl.h (RTL_CHECKC3): Add macro.
3299         (rtl_check_failed_code3): Add declaration.
3300         (XC3EXP): Add macro.
3302 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3304         PR target/86386
3305         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3306         cfun->machine->max_used_stack_alignment if needed.
3308 2018-08-04  Martin Sebor  <msebor@redhat.com>
3310         PR tree-optimization/86571
3311         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3312         NaN output to 4.
3314 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3316         PR target/86799
3317         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3318         Define.
3320 2018-08-03  Jeff Law  <law@redhat.com>
3322         PR target/86795
3323         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3324         Define to speculation_safe_value_not_needed.
3326 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3328         * doc/gcov.texi (-x): Remove duplicate "to".
3329         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3330         (-Wif-not-aligned): Remove duplicate "is".
3331         (-flto): Remove duplicate "the".
3332         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3333         duplicate "v5.00.b".
3334         (MSP430 Options): Remove duplicate "and" from the description
3335         of "-mgprel-sec=regexp".
3336         (x86 Options): Remove duplicate copies of "vmldLog102" and
3337         vmlsLog104 from description of "-mveclibabi=type".
3339 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3341         * internal-fn.h (first_commutative_argument): Declare.
3342         * internal-fn.c (first_commutative_argument): New function.
3343         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3344         restrictions for pattern statements.  Use first_commutative_argument
3345         to look for commutative operands in calls to internal functions.
3347 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3349         * Makefile.in (wide-int-range.o): New.
3350         * tree-vrp.c: Move all the wide_int_* functions to...
3351         * wide-int-range.cc: ...here.
3352         * tree-vrp.h: Move all the wide_int_* prototypes to...
3353         * wide-int-range.h: ...here.
3355 2018-08-03  Tom de Vries  <tdevries@suse.de>
3357         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3358         UI_NONE.
3359         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3360         * except.c (output_function_exception_table): Do early exit if
3361         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3363 2018-08-03  Martin Liska  <mliska@suse.cz>
3365         * predict.c (dump_prediction): Change to 2 digits
3366         in fraction part.
3368 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3370         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3371         neon_dup_q to...
3372         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3374 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3376         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3377         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3378         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3379         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3380         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3382 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3384         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3385         pp_take_prefix when saving the existing prefix.
3386         * diagnostic.c (diagnostic_append_note): Likewise.
3387         * langhooks.c (lhd_print_error_function): Likewise.
3388         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3389         param's type.  Free the existing prefix.
3390         (pp_take_prefix): New function.
3391         (pretty_printer::pretty_printer): Drop the prefix parameter.
3392         Rename the length parameter to match the comment.
3393         (pretty_printer::~pretty_printer): Free the prefix.
3394         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3395         parameter.
3396         (struct pretty_printer): Drop the "const" from "prefix" field's
3397         type and clarify memory management.
3398         (pp_set_prefix): Drop the "const" from the 2nd param.
3399         (pp_take_prefix): New decl.
3401 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3403         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3404         for word_mode_ok here instead of passing as argument.
3405         (expand_block_compare): Change select_block_compare_mode() call.
3406         (expand_strncmp_gpr_sequence): New function.
3407         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3409 2018-08-02  Jeff Law  <law@redhat.com>
3411         PR target/86790
3412         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3413         Define to speculation_safe_value_not_needed.
3415         PR target/86784
3416         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3417         Define to speculation_safe_value_not_needed.
3419 2018-08-02  Tom de Vries  <tdevries@suse.de>
3421         PR target/86660
3422         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3423         function.  Return UI_TARGET unconditionally.
3424         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3425         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3427 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3429         * genemit.c (print_overload_test): Fix typo.
3431 2018-08-02  Richard Biener  <rguenther@suse.de>
3433         PR tree-optimization/86816
3434         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3435         which checks for value availability before querying it.
3436         (gvn_uses_equal): Use it.
3437         (same_succ_hash): Likewise.
3438         (gimple_equal_p): Likewise.
3440 2018-08-02  Nick Clifton  <nickc@redhat.com>
3442         PR target/86813
3443         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3444         Define to speculation_safe_value_not_needed.
3446         PR target/86810
3447         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3448         Define to speculation_safe_value_not_needed.
3450         PR target/86810
3451         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3452         Define to speculation_safe_value_not_needed.
3454         PR target/86803
3455         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3456         Define to speculation_safe_value_not_needed.
3458         PR target/86797
3459         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3460         Define to speculation_safe_value_not_needed.
3462         PR target/86791
3463         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3464         Define to speculation_safe_value_not_needed.
3466         PR target/86789
3467         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3468         Define to speculation_safe_value_not_needed.
3470         PR target/86787
3471         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3472         Define to speculation_safe_value_not_needed.
3474         PR target/86782
3475         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3476         speculation_safe_value_not_needed.
3478         PR target/86781
3479         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3480         to speculation_safe_value_not_needed.
3482 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3484         * doc/md.texi: Expand the documentation of instruction names
3485         to mention port-local uses.  Document '@' in pattern names.
3486         * read-md.h (overloaded_instance, overloaded_name): New structs.
3487         (mapping): Declare.
3488         (md_reader::handle_overloaded_name): New member function.
3489         (md_reader::get_overloads): Likewise.
3490         (md_reader::m_first_overload): New member variable.
3491         (md_reader::m_next_overload_ptr): Likewise.
3492         (md_reader::m_overloads_htab): Likewise.
3493         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3494         m_next_overload_ptr and m_overloads_htab.
3495         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3496         (get_mode_token, get_code_token, get_int_token): New functions.
3497         (map_attr_string): Add an optional argument that passes back
3498         the associated iterator.
3499         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3500         (md_reader::handle_overloaded_name, add_overload_instance): New
3501         functions.
3502         (apply_iterators): Handle '@' names.  Report an error if '@'
3503         is used without iterators.
3504         (initialize_iterators): Initialize the new iterator_group fields.
3505         * genopinit.c (handle_overloaded_code_for)
3506         (handle_overloaded_gen): New functions.
3507         (main): Use them to print declarations of maybe_code_for_* and
3508         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3509         * genemit.c (print_overload_arguments, print_overload_test)
3510         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3511         (main): Use it to print definitions of maybe_code_for_* and
3512         maybe_gen_* functions.
3513         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3514         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3515         instead of explicit mode checks.
3516         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3517         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3518         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3519         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3520         (aarch64_expand_compare_and_swap): Likewise
3521         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3522         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3523         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3524         (aarch64_constant_pool_reload_icode): Delete.
3525         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3526         instead of aarch64_constant_pool_reload_icode.  Use
3527         code_for_aarch64_reload_mov instead of explicit mode checks.
3528         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3529         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3530         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3531         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3532         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3533         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3534         (aarch64_atomic_load_op_code): Delete.
3535         (aarch64_emit_atomic_load_op): Likewise.
3536         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3537         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3538         instead of aarch64_emit_atomic_load_op.
3539         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3540         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3541         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3542         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3543         character before the pattern name.
3544         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3545         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3546         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3547         (aarch64_frecps<mode>): Likewise.
3548         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3549         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3550         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3551         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3552         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3554 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3556         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3557         Allow HFmode constants if TARGET_FP_F16INST.
3559 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3561         PR target/86014
3562         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3563         No longer check last store for clobber of address register.
3565 2018-08-02  Martin Liska  <mliska@suse.cz>
3567         PR gcov-profile/86817
3568         * gcov.c (process_all_functions): New function.
3569         (main): Call it.
3570         (process_file): Move functions processing to
3571         process_all_functions.
3573 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3575         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3576         "const" to the "gimple *" and "rtx_insn *" parameters.
3577         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3578         Likewise.
3579         (dump_location_t::dump_location_t): Likewise.
3581 2018-08-01  Martin Sebor  <msebor@redhat.com>
3583         PR tree-optimization/86650
3584         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3585         rather than a "gcall *".  Directly pass the data of interest
3586         to percent_K_format, rather than building a temporary CALL_EXPR
3587         to hold it.
3588         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3589         (gimple_fold_builtin_strncat): Adjust.
3590         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3591         gcall* argument with gimple*.
3592         * gimple-ssa-warn-restrict.c (check_call): Same.
3593         (wrestrict_dom_walker::before_dom_children): Same.
3594         (builtin_access::builtin_access): Same.
3595         (check_bounds_or_overlap): Same
3596         (maybe_diag_overlap): Same.
3597         (maybe_diag_offset_bounds): Same.
3598         * tree-diagnostic.c (default_tree_printer): Move usage of
3599         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3600         to this callsite.
3601         * tree-pretty-print.c (percent_K_format): Add argument.
3602         * tree-pretty-print.h: Add argument.
3603         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3604         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3605         (maybe_diag_stxncpy_trunc): Same.
3606         (handle_builtin_stxncpy): Same.
3607         (handle_builtin_strcat): Same.
3609 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3611         * match.pd: Optimise pointer range checks.
3613 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3615         PR tree-optimization/86758
3616         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3617         to remove pattern statements.
3619 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3621         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3622         result of dfs_enumerate_from when constructing stmt_vec_infos,
3623         instead of additionally calling get_loop_body.
3625 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3627         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3628         parameter.
3629         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3630         When creating an iv, assert that the step is not known to be zero.
3631         (vect_setup_realignment): Update call accordingly.
3632         * tree-vect-stmts.c (vectorizable_store): Likewise.
3633         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
3635 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3637         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3638         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3639         (vectorizable_reduction): Likewise.
3640         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3641         (vect_detect_hybrid_slp_stmts): Likewise.
3642         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3644 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
3646         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3647         (wide_int_set_zero_nonzero_bits): ...this.
3648         (zero_nonzero_bits_from_vr): Rename to...
3649         (vrp_set_zero_nonzero_bits): ...this.
3650         (extract_range_from_multiplicative_op_1): Abstract wide int
3651         code...
3652         (wide_int_range_multiplicative_op): ...here.
3653         (extract_range_from_binary_expr_1): Extract wide int binary
3654         operations into their own functions.
3655         (wide_int_range_lshift): New.
3656         (wide_int_range_can_optimize_bit_op): New.
3657         (wide_int_range_shift_undefined_p): New.
3658         (wide_int_range_bit_xor): New.
3659         (wide_int_range_bit_ior): New.
3660         (wide_int_range_bit_and): New.
3661         (wide_int_range_trunc_mod): New.
3662         (extract_range_into_wide_ints): New.
3663         (vrp_shift_undefined_p): New.
3664         (extract_range_from_multiplicative_op): New.
3665         (vrp_can_optimize_bit_op): New.
3666         * tree-vrp.h (value_range::dump): New.
3667         (wide_int_range_multiplicative_op): New.
3668         (wide_int_range_lshift):New.
3669         (wide_int_range_shift_undefined_p): New.
3670         (wide_int_range_bit_xor): New.
3671         (wide_int_range_bit_ior): New.
3672         (wide_int_range_bit_and): New.
3673         (wide_int_range_trunc_mod): New.
3674         (zero_nonzero_bits_from_bounds): Rename to...
3675         (wide_int_set_zero_nonzero_bits): ...this.
3676         (zero_nonzero_bits_from_vr): Rename to...
3677         (vrp_set_zero_nonzero_bits): ...this.
3678         (range_easy_mask_min_max): Rename to...
3679         (wide_int_range_can_optimize_bit_op): this.
3680         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3681         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3683 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3685         * tree-vectorizer.h (vect_orig_stmt): New function.
3686         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3687         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3688         (vect_create_epilog_for_reduction): Likewise.
3689         (vectorizable_live_operation): Likewise.
3690         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3691         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3692         * tree-vect-stmts.c (vectorizable_call): Likewise.
3693         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3695 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3697         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3698         argument.
3699         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3700         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3701         (vect_transform_loop): Likewise.
3702         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3704 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3706         * tree-vectorizer.h (vect_schedule_slp): Return void.
3707         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3708         (vect_schedule_slp): Likewise.
3710 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3712         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3713         argument.
3714         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3715         instances before the main loop, if any exist.
3717 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3719         PR tree-optimization/86749
3720         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3721         If the lhs is used in a COND_EXPR, check that it is being used
3722         as the "then" or "else" value.
3724 2018-08-01  Tom de Vries  <tdevries@suse.de>
3726         PR target/86800
3727         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3728         speculation_safe_value_not_needed.
3730 2018-08-01  Richard Biener  <rguenther@suse.de>
3732         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3733         as base and offset.
3735 2018-08-01  Martin Liska  <mliska@suse.cz>
3737         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3738         format how successful transformation is dumped.
3739         (gimple_mod_pow2_value_transform): Likewise.
3740         (gimple_mod_subtract_transform): Likewise.
3741         (gimple_stringops_transform): Likewise.
3743 2018-08-01  Martin Liska  <mliska@suse.cz>
3745         PR value-prof/35543
3746         * value-prof.c (interesting_stringop_to_profile_p):
3747         Simplify the code and add BUILT_IN_MEMMOVE.
3748         (gimple_stringops_transform): Likewise.
3750 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3752         * config/aarch64/aarch64-simd.md
3753         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3754         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3755         use GPI iterator instead of SI mode.
3757 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3759         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3760         rs6000_speculation_barrier.
3761         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3762         new barrier pattern name.
3764 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3766         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3767         (speculation_barrier): New insn.
3769 2018-08-01  Richard Biener  <rguenther@suse.de>
3771         PR bootstrap/86724
3772         * graphite.h: Include isl/id.h and isl/space.h to allow build
3773         with ISL 0.20.
3775 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3777         PR target/86651
3778         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3779         mode for COFF targets.
3780         * defaults.h (TARGET_COFF): Define.
3781         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3782         TARGET_COFF): Define.
3783         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3784         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3785         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3787 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3789         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3790         * gimple-streamer-out.c (output_bb): Save it.
3791         * lto-streamer-in.c (input_struct_function_base): Restore
3792         instance discriminator if available.  Create map on demand.
3793         * lto-streamer-out.c (output_struct_function_base): Save it if
3794         available.
3795         * final.c (decl_to_instance_map): Document LTO strategy.
3797 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3798             Olivier Hainque  <hainque@adacore.com>
3800         * debug.h (decl_to_instance_map_t): New type.
3801         (decl_to_instance_map): Declare.
3802         (maybe_create_decl_to_instance_map): New inline function.
3803         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3804         to track basic block discriminators.
3805         (final_start_function_1): Initialize them.
3806         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3807         bb_discriminator.
3808         (decl_to_instance_map): New variable.
3809         (map_decl_to_instance, maybe_set_discriminator): New functions.
3810         (notice_source_line): Set discriminator.
3812 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3814         * targhooks.c (default_have_speculation_safe_value): Add
3815         ATTRIBUTE_UNUSED.
3817 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3819         * dump-context.h: Include "pretty-print.h".
3820         (dump_context::refresh_dumps_are_enabled): New decl.
3821         (dump_context::emit_item): New decl.
3822         (class dump_context): Add fields "m_test_pp" and
3823         "m_test_pp_flags".
3824         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3825         (temp_dump_context::get_dumped_text): New decl.
3826         (class temp_dump_context): Add field "m_pp".
3827         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3828         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3829         m_test_pp.
3830         (set_dump_file): Update for above change.
3831         (set_alt_dump_file): Likewise.
3832         (dump_loc): New overload, taking a pretty_printer *.
3833         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3834         to any test pretty-printer.
3835         (make_item_for_dump_gimple_stmt): New function, adapted from
3836         optinfo::add_gimple_stmt.
3837         (dump_context::dump_gimple_stmt): Call it, and use the result,
3838         eliminating the direct usage of dump_file and alt_dump_file in
3839         favor of indirectly using them via emit_item.
3840         (make_item_for_dump_gimple_expr): New function, adapted from
3841         optinfo::add_gimple_expr.
3842         (dump_context::dump_gimple_expr): Call it, and use the result,
3843         eliminating the direct usage of dump_file and alt_dump_file in
3844         favor of indirectly using them via emit_item.
3845         (make_item_for_dump_generic_expr): New function, adapted from
3846         optinfo::add_tree.
3847         (dump_context::dump_generic_expr): Call it, and use the result,
3848         eliminating the direct usage of dump_file and alt_dump_file in
3849         favor of indirectly using them via emit_item.
3850         (make_item_for_dump_printf_va): New function, adapted from
3851         optinfo::add_printf_va.
3852         (make_item_for_dump_printf): New function.
3853         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3854         and use the result, eliminating the direct usage of dump_file and
3855         alt_dump_file in favor of indirectly using them via emit_item.
3856         (make_item_for_dump_dec): New function.
3857         (dump_context::dump_dec): Call it, and use the result,
3858         eliminating the direct usage of dump_file and alt_dump_file in
3859         favor of indirectly using them via emit_item.
3860         (make_item_for_dump_symtab_node): New function, adapted from
3861         optinfo::add_symtab_node.
3862         (dump_context::dump_symtab_node): Call it, and use the result,
3863         eliminating the direct usage of dump_file and alt_dump_file in
3864         favor of indirectly using them via emit_item.
3865         (dump_context::begin_scope): Reimplement, avoiding direct usage
3866         of dump_file and alt_dump_file in favor of indirectly using them
3867         via emit_item.
3868         (dump_context::emit_item): New member function.
3869         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3870         Set up test pretty-printer on the underlying context.  Call
3871         refresh_dumps_are_enabled.
3872         (temp_dump_context::~temp_dump_context): Call
3873         refresh_dumps_are_enabled.
3874         (temp_dump_context::get_dumped_text): New member function.
3875         (selftest::verify_dumped_text): New function.
3876         (ASSERT_DUMPED_TEXT_EQ): New macro.
3877         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3878         and then without optinfo enabled.  Add uses of
3879         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3880         * dumpfile.h: Update comment for the dump_* API.
3881         * optinfo-emit-json.cc
3882         (selftest::test_building_json_from_dump_calls): Update for new
3883         param for temp_dump_context ctor.
3884         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3885         and "m_owned" field.
3886         (optinfo_item::~optinfo_item): Likewise.
3887         (optinfo::add_item): New member function.
3888         (optinfo::emit): Update comment.
3889         (optinfo::add_string): Delete.
3890         (optinfo::add_printf): Delete.
3891         (optinfo::add_printf_va): Delete.
3892         (optinfo::add_gimple_stmt): Delete.
3893         (optinfo::add_gimple_expr): Delete.
3894         (optinfo::add_tree): Delete.
3895         (optinfo::add_symtab_node): Delete.
3896         (optinfo::add_dec): Delete.
3897         * optinfo.h (class dump_context): New forward decl.
3898         (optinfo::add_item): New decl.
3899         (optinfo::add_string): Delete.
3900         (optinfo::add_printf): Delete.
3901         (optinfo::add_printf_va): Delete.
3902         (optinfo::add_gimple_stmt): Delete.
3903         (optinfo::add_gimple_expr): Delete.
3904         (optinfo::add_tree): Delete.
3905         (optinfo::add_symtab_node): Delete.
3906         (optinfo::add_dec): Delete.
3907         (optinfo::add_poly_int): Delete.
3908         (optinfo_item::optinfo_item): Remove "owned" param.
3909         (class optinfo_item): Remove field "m_owned".
3911 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3913         PR middle-end/86705
3914         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3915         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3916         requested variable alignment.
3917         (expand_one_ssa_partition): Likewise.
3918         (expand_one_var): Likewise.
3920 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3922         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3923         to speculation_safe_value_not_needed.
3925 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3927         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3928         * targhooks.c (speculation_safe_value_not_needed): New function.
3929         * target.def (have_speculation_safe_value): Update documentation.
3930         * doc/tm.texi: Regenerated.
3932 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3934         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3935         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3936         expand.
3937         (despeculate_copy<ALLI:mode>_insn): New insn.
3938         (despeculate_copyti_insn): New insn.
3939         (despeculate_simple<ALLI:mode>): New insn
3940         (despeculate_simpleti): New insn.
3941         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3942         function.
3943         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3944         aarch64_speculation_safe_value.
3945         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3947 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3949         * config/aarch64/aarch64-speculation.cc: New file.
3950         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3951         before pass_reorder_blocks.
3952         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3953         prototype.
3954         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3955         X14 and X15 when tracking speculation.
3956         * config/aarch64/aarch64.md (register name constants): Add
3957         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3958         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3959         (speculation_barrier): New insn attribute.
3960         (cmp<mode>): Allow SP in comparisons.
3961         (speculation_tracker): New insn.
3962         (speculation_barrier): Add speculation_barrier attribute.
3963         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3964         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3965         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3967 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3969         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3970         aarch64_track_speculation is true.
3971         (tb<optab><mode>1): Likewise.
3972         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3973         generate CB[N]Z when tracking speculation.
3974         (aarch64_split_compare_and_swap): Likewise.
3975         (aarch64_split_atomic_op): Likewise.
3977 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3979         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3981 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3983         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3984         (speculation_barrier): New insn.
3986 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3988         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3989         * config/arm/arm.md (speculation_barrier): New expand.
3990         (speculation_barrier_insn): New pattern.
3992 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3994         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3995         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3996         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3997         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3998         list.
3999         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4000         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4001         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4002         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4003         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4004         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4005         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4006         * builtins.c (expand_speculation_safe_value): New function.
4007         (expand_builtin): Call it.
4008         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4009         * doc/extend.texi: Document __builtin_speculation_safe_value.
4010         * doc/md.texi: Document "speculation_barrier" pattern.
4011         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4012         TARGET_HAVE_SPECULATION_SAFE_VALUE.
4013         * doc/tm.texi: Regenerated.
4014         * target.def (have_speculation_safe_value, speculation_safe_value): New
4015         hooks.
4016         * targhooks.c (default_have_speculation_safe_value): New function.
4017         (default_speculation_safe_value): New function.
4018         * targhooks.h (default_have_speculation_safe_value): Add prototype.
4019         (default_speculation_safe_value): Add prototype.
4021 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
4023         * dump-context.h (dump_context::dump_loc): New decl.
4024         * dumpfile.c (dump_context::dump_loc): New member function.
4025         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4026         and dump_gimple_stmt.
4027         (dump_context::dump_gimple_expr_loc): Likewise, using
4028         dump_gimple_expr.
4029         (dump_context::dump_generic_expr_loc): Likewise, using
4030         dump_generic_expr.
4031         (dump_context::dump_printf_loc_va): Likewise, using
4032         dump_printf_va.
4033         (dump_context::begin_scope): Explicitly using the global function
4034         "dump_loc", rather than the member function.
4036 2018-07-31  Martin Sebor  <msebor@redhat.com>
4038         PR tree-optimization/86741
4039         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4041 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
4043         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4044         depend on whether prefetch instructions will be emitted or not.
4045         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4046         will be emitted or not.
4047         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4048         (TARGET_SETMEM_PFD): New macros.
4050 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4052         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4053         (NULL_STMT_VEC_INFO): Delete.
4054         (stmt_vec_info::operator*): Likewise.
4055         (stmt_vec_info::operator gimple *): Likewise.
4056         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4057         of NULL_STMT_VEC_INFO.
4058         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4059         (vect_reassociating_reduction_p): Likewise.
4060         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4061         (vectorizable_store): Likewise.
4062         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4063         (vec_info::free_stmt_vec_infos): Likewise.
4065 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4067         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4068         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4070 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4072         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4073         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4074         (vec_info::free_stmt_vec_info): New private member functions.
4075         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4076         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4077         * tree-parloops.c (gather_scalar_reductions): Remove calls to
4078         set_stmt_vec_info_vec and free_stmt_vec_infos.
4079         * tree-vect-loop.c (_loop_vec_info): Remove call to
4080         set_stmt_vec_info_vec.
4081         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4082         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4083         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4084         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4085         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
4086         assignments in {vec_info::,}new_stmt_vec_info that are redundant
4087         with the clearing in the xcalloc.
4088         (stmt_vec_info_vec): Delete.
4089         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4090         (vectorize_loops): Likewise.
4091         (vec_info::~vec_info): Remove argument from call to
4092         free_stmt_vec_infos.
4093         (vec_info::add_stmt): Remove vinfo argument from call to
4094         new_stmt_vec_info.
4096 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4098         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4099         rather than a gimple stmt.
4100         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
4101         information for pattern statements when passed the original
4102         statement; instead wait to be passed the pattern statement itself.
4103         Don't call set_vinfo_for_stmt here.
4104         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4105         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4106         stmt_vec_infos here.
4107         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4108         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4109         stmt_vec_infos entry.
4111 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4113         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4114         * tree-vectorizer.c (vec_info::replace_stmt): New function.
4115         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4116         * tree-vect-stmts.c (vectorizable_call): Likewise.
4117         (vectorizable_simd_clone_call): Likewise.
4119 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4121         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4122         * tree-vectorizer.c (vec_info::remove_stmt): New function.
4123         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4124         * tree-vect-loop.c (vect_transform_loop): Likewise.
4125         * tree-vect-slp.c (vect_schedule_slp): Likewise.
4126         * tree-vect-stmts.c (vect_remove_stores): Likewise.
4128 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4130         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4131         (vect_dr_stmt): Delete.
4132         * tree-vectorizer.c (vec_info::lookup_dr): New function.
4133         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4134         of DR_VECT_AUX.
4135         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4136         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4137         (vect_verify_datarefs_alignment, vect_peeling_supportable)
4138         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4139         (vect_analyze_data_refs): Likewise.
4140         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
4141         argument.
4142         (vect_find_same_alignment_drs): Likewise.
4143         (vect_slp_analyze_node_dependences): Update calls accordingly.
4144         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4145         instead of DR_VECT_AUX.
4146         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4147         of a vector data references.  Use vec_info::lookup_dr instead of
4148         DR_VECT_AUX.
4149         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4150         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
4151         instead of DR_VECT_AUX.
4153 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4155         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4156         dr_vec_info.
4157         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4158         accordingly.
4159         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4160         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4161         (vect_gen_prolog_loop_niters): Likewise.
4163 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4165         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4166         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4167         (vect_known_alignment_in_bytes, vect_dr_behavior)
4168         (vect_get_scalar_dr_size): Take references as dr_vec_infos
4169         instead of data_references.  Update calls to other routines for
4170         which the same change has been made.
4171         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4172         dr_vec_infos instead of stmt_vec_infos.
4173         (vect_analyze_data_ref_dependence): Update call accordingly.
4174         (vect_slp_analyze_data_ref_dependence)
4175         (vect_record_base_alignments): Use DR_VECT_AUX.
4176         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4177         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4178         (vector_alignment_reachable_p, vect_get_data_access_cost)
4179         (vect_peeling_supportable, vect_analyze_group_access_1)
4180         (vect_analyze_group_access, vect_analyze_data_ref_access)
4181         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4182         (vect_compile_time_alias, vect_small_gap_p)
4183         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4184         (vect_supportable_dr_alignment): Take references as dr_vec_infos
4185         instead of data_references.  Update calls to other routines for
4186         which the same change has been made.
4187         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4188         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4189         (vect_slp_analyze_and_verify_node_alignment)
4190         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4191         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4192         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
4193         above changes.
4194         (_vect_peel_info::dr): Replace with...
4195         (_vect_peel_info::dr_info): ...this new field.
4196         (vect_peeling_hash_get_most_frequent)
4197         (vect_peeling_hash_choose_best_peeling): Update accordingly.
4198         (vect_peeling_hash_get_lowest_cost):
4199         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
4200         routines for which the same change has been made.
4201         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
4202         data_reference.
4203         * tree-vect-loop-manip.c (get_misalign_in_elems)
4204         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
4205         above changes.
4206         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4207         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4208         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4209         (get_group_load_store_type, get_negative_load_store_type)
4210         (vect_get_data_ptr_increment, vectorizable_store)
4211         (vectorizable_load): Likewise.
4212         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4213         Update calls to other routines for which the same change has been made.
4215 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4217         * tree-vectorizer.h (vec_info::move_dr): New member function.
4218         (dataref_aux): Rename to...
4219         (dr_vec_info): ...this and add "dr" and "stmt" fields.
4220         (_stmt_vec_info::dr_aux): Update accordingly.
4221         (_stmt_vec_info::data_ref_info): Delete.
4222         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4223         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4224         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4225         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4226         of data_ref.
4227         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
4228         (STMT_VINFO_DR_INFO): New macro.
4229         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4230         (set_dr_misalignment): Update after rename of dataref_aux.
4231         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
4232         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4233         initialization of STMT_VINFO_DATA_REF.
4234         * tree-vectorizer.c (vec_info::move_dr): New function.
4235         * tree-vect-patterns.c (vect_recog_bool_pattern)
4236         (vect_recog_mask_conversion_pattern)
4237         (vect_recog_gather_scatter_pattern): Use it.
4238         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4239         the "dr" and "stmt" fields of dr_vec_info instead of
4240         STMT_VINFO_DATA_REF.
4242 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4244         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4245         (is_pattern_stmt_p): Use it.
4246         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4247         on pattern statements.
4249 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4251         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4252         original stmt as a stmt_vec_info rather than a gimple stmt.
4253         (vect_pattern_recog_1): Take the statement directly as a
4254         stmt_vec_info, rather than via a gimple_stmt_iterator.
4255         Update call to vect_mark_pattern_stmts.
4256         (vect_pattern_recog): Update calls accordingly.
4258 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4260         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4261         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4262         a vect_def_type for the first argument.
4263         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4264         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
4265         operand if it isn't defined by a vectorized statement.
4266         (vect_build_gather_load_calls): Remove the mask_dt argument and
4267         update calls to vect_get_vec_def_for_stmt_copy.
4268         (vectorizable_bswap): Likewise the dt argument.
4269         (vectorizable_call): Update calls to vectorizable_bswap and
4270         vect_get_vec_def_for_stmt_copy.
4271         (vectorizable_simd_clone_call, vectorizable_assignment)
4272         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4273         (vectorizable_comparison): Update calls to
4274         vect_get_vec_def_for_stmt_copy.
4275         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
4276         vect_is_simple_use.
4277         (vect_get_loop_based_defs): Remove dt argument and update call
4278         to vect_get_vec_def_for_stmt_copy.
4279         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4280         and vect_get_vec_def_for_stmt_copy.
4281         (vectorizable_load): Update calls to vect_build_gather_load_calls
4282         and vect_get_vec_def_for_stmt_copy.
4283         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4284         (vectorizable_reduction, vectorizable_live_operation): Update calls
4285         to vect_get_vec_def_for_stmt_copy.
4287 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4289         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4290         and gimple stmt arguments with a stmt_vec_info.
4291         (vect_record_base_alignments): Update calls accordingly.
4292         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4293         and gimple stmt arguments with a stmt_vec_info.
4294         (vect_build_slp_tree_1): Remove vinfo argument and update call
4295         to vect_record_max_nunits.
4296         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4297         and vect_record_max_nunits.
4299 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4301         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4302         file and take a stmt_vec_info instead of a gimple stmt.
4303         (supportable_widening_operation, vect_finish_replace_stmt)
4304         (vect_finish_stmt_generation, vect_get_store_rhs)
4305         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4306         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4307         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4308         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4309         (vect_create_data_ref_ptr, bump_vector_ptr)
4310         (vect_permute_store_chain, vect_setup_realignment)
4311         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4312         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4313         (vectorizable_reduction, vectorizable_induction)
4314         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4315         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4316         than gimple stmts as arguments.
4317         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4318         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4319         (can_group_stmts_p, vect_check_gather_scatter)
4320         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4321         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4322         (vect_permute_load_chain, vect_shift_permute_load_chain)
4323         (vect_transform_grouped_load)
4324         (vect_record_grouped_load_vectors): Likewise.
4325         * tree-vect-loop.c (vect_fixup_reduc_chain)
4326         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4327         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4328         (vectorizable_reduction, vectorizable_induction)
4329         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4330         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4331         (vect_get_load_store_mask): Likewise.
4332         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4333         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4334         * tree-vect-stmts.c (vect_mark_relevant)
4335         (is_simple_and_all_uses_invariant)
4336         (exist_non_indexing_operands_for_use_p, process_use)
4337         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4338         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4339         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4340         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4341         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4342         (get_negative_load_store_type, get_load_store_type)
4343         (vect_check_load_store_mask, vect_check_store_rhs)
4344         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4345         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4346         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4347         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4348         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4349         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4350         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4351         (supportable_widening_operation): Likewise.
4353 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4355         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4356         a stmt_vec_info instead of a gcall.
4357         (vect_check_gather_scatter): Update call accordingly.
4358         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4359         of a gphi.
4360         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4361         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4362         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4363         instead of a gimple stmt.
4364         (vect_transform_loop): Update calls accordingly.
4365         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4366         stmt_vec_infos instead of gimple stmts.
4367         (vect_analyze_slp_instance): Update use accordingly.
4368         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4369         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4370         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4371         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4372         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4373         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4374         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4375         down to subroutines.
4377 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4379         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4380         of the worklist from a vector of gimple stmts to a vector of
4381         stmt_vec_infos.
4382         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4383         (vect_mark_stmts_to_be_vectorized): Likewise
4385 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4387         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4388         statement before passing it to vect_analyze_stmt.
4389         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4390         the chain of phi vector definitions.  Track the exit phi via its
4391         stmt_vec_info.
4392         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4393         STMT_VINFO_REDUC_DEF.
4394         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4395         stmt_vec_infos to handle the statement chains.
4396         (vect_get_slp_defs): Record the first statement in the node
4397         using a stmt_vec_info.
4398         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4399         statements here and pass their stmt_vec_info down to subroutines.
4400         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4401         down to vect_finish_stmt_generation.
4402         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4403         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4404         stmt_vec_infos to subroutines.
4405         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4406         chains.
4408 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4410         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4411         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4412         (vect_permute_store_chain, vect_setup_realignment)
4413         (vect_permute_load_chain, vect_shift_permute_load_chain)
4414         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4415         stmts internally, and when passing values to other vectorizer routines.
4416         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4417         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4418         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4419         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4420         (vectorizable_reduction, vectorizable_induction)
4421         (vectorizable_live_operation, vect_transform_loop_stmt)
4422         (vect_transform_loop): Likewise.
4423         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4424         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4425         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4426         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4427         (vect_slp_analyze_node_operations_1): Likewise.
4428         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4429         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4430         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4431         (vect_finish_stmt_generation_1, get_group_load_store_type)
4432         (get_load_store_type, vect_build_gather_load_calls)
4433         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4434         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4435         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4436         (vectorizable_store, vectorizable_load, vectorizable_condition)
4437         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4438         (supportable_widening_operation): Likewise.
4439         (vect_get_vector_types_for_stmt): Likewise.
4440         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4442 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4444         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4445         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4446         (vect_permute_store_chain, vect_permute_load_chain)
4447         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4448         repeated stmt_vec_info lookups.
4449         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4450         (vect_update_ivs_after_vectorizer): Likewise.
4451         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4452         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4453         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4454         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4455         (vect_bb_slp_scalar_cost): Likewise.
4456         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4458 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4460         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4461         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4462         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4463         to get gassigns and gcalls, rather than operating on generc gimple
4464         stmts.
4465         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4466         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4467         (vectorizable_load, vect_analyze_stmt): Likewise.
4468         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4470 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4472         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4473         return stmt_vec_infos rather than gimple stmts.  Do not accept
4474         null arguments.
4475         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4476         of a gimple stmt.
4477         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4478         Update use of get_later_stmt.
4479         (vect_get_constant_vectors): Update call accordingly.
4480         (vect_schedule_slp_instance): Likewise
4481         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4482         (vect_slp_analyze_instance_dependence): Likewise.
4483         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4485 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4487         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4488         (stmt_info_for_cost::stmt_info): ...this new field.
4489         (add_stmt_costs): Update accordingly.
4490         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4491         (vect_get_known_peeling_cost): Likewise.
4492         (vect_estimate_min_profitable_iters): Likewise.
4493         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4497         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4498         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4499         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4500         accordingly.
4501         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4503 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4505         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4506         a gimple stmt to a stmt_vec_info.
4507         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4509 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4511         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4512         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4513         (_loop_vec_info::reduction_chains): Likewise.
4514         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4515         accordingly.
4516         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4518 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4520         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4521         a gimple stmt to a stmt_vec_info.
4522         (_stmt_vec_info::next_element): Likewise.
4523         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4524         (vect_slp_analyze_and_verify_node_alignment)
4525         (vect_analyze_group_access_1, vect_analyze_group_access)
4526         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4527         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4528         (vect_supportable_dr_alignment): Update accordingly.
4529         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4530         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4531         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4532         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4533         * tree-vect-slp.c (vect_build_slp_tree_1)
4534         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4535         (vect_split_slp_store_group, vect_analyze_slp_instance)
4536         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4537         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4538         (get_group_load_store_type, get_load_store_type)
4539         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4540         (vect_transform_stmt, vect_remove_stores): Likewise.
4542 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4544         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4545         than a gimple stmt.
4546         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4547         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4548         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4549         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4550         (vector_alignment_reachable_p, vect_get_data_access_cost)
4551         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4552         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4553         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4554         (vect_analyze_group_access_1, vect_analyze_group_access)
4555         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4556         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4557         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4558         result of vect_dr_stmt and use the stmt_vec_info instead of
4559         the associated gimple stmt.
4560         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4561         (vect_gen_prolog_loop_niters): Likewise.
4562         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4566         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4567         to a vec<stmt_vec_info>.
4568         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4569         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4570         vec<stmt_vec_info>.
4571         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4572         to a vec<stmt_vec_info>.
4573         (bst_traits::value_type, bst_traits::value_type): Likewise.
4574         (bst_traits::hash): Update accordingly.
4575         (vect_get_and_check_slp_defs): Change the stmts parameter from
4576         a vec<gimple *> to a vec<stmt_vec_info>.
4577         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4578         (vect_build_slp_tree): Likewise.
4579         (vect_build_slp_tree_2): Likewise.  Update uses of
4580         SLP_TREE_SCALAR_STMTS.
4581         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4582         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4583         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4584         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4585         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4586         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4587         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4588         (vect_get_constant_vectors, vect_get_slp_defs)
4589         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4590         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4591         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4592         instead of gimple stmts.
4593         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4594         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4595         (vect_slp_analyze_instance_dependence): Update uses of
4596         SLP_TREE_SCALAR_STMTS.
4597         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4598         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4599         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4600         (get_initial_defs_for_reduction): Likewise.
4601         (vect_create_epilog_for_reduction): Likewise.
4602         (vectorize_fold_left_reduction): Likewise.
4603         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4604         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4605         (can_vectorize_live_stmts): Likewise.
4607 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4609         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4610         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4611         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4612         than gimple stmts.
4613         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4614         of a gimple stmt.
4615         (gather_scalar_reductions): Update after above interface changes.
4616         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4617         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4618         than gimple stmts.
4619         (vect_force_simple_reduction): Likewise.
4620         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4621         LOOP_VINFO_REDUCTIONS.
4622         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4624 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4626         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4627         a gimple stmt to a stmt_vec_info.
4628         * tree-vect-loop.c (vect_active_double_reduction_p)
4629         (vect_force_simple_reduction, vectorizable_reduction): Update
4630         accordingly.
4632 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4634         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4635         vec<gimple *> to a vec<stmt_vec_info>.
4636         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4637         the reduction_phis argument from a vec<gimple *> to a
4638         vec<stmt_vec_info>.
4639         (vectorizable_reduction): Likewise the phis local variable that
4640         is passed to vect_create_epilog_for_reduction.  Update for new type
4641         of SLP_TREE_VEC_STMTS.
4642         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4643         (vectorizable_live_operation): Likewise.
4644         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4645         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4647 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4649         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4650         a gimple stmt to a stmt_vec_info.
4651         (vectorizable_condition, vectorizable_live_operation)
4652         (vectorizable_reduction, vectorizable_induction): Pass back the
4653         vectorized statement as a stmt_vec_info.
4654         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4655         use of STMT_VINFO_VEC_STMT.
4656         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4657         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4658         as stmt_vec_infos rather than gimple stmts.
4659         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4660         to a stmt_vec_info.
4661         (vectorizable_live_operation): Likewise.
4662         (vectorizable_reduction, vectorizable_induction): Likewise,
4663         updating use of STMT_VINFO_VEC_STMT.
4664         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4665         of STMT_VINFO_VEC_STMT.
4666         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4667         (vectorizable_simd_clone_call, vectorizable_conversion)
4668         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4669         (vectorizable_store, vectorizable_load, vectorizable_condition)
4670         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4671         from a gimple stmt to a stmt_vec_info.
4672         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4673         pointer to a stmt_vec_info to the vectorizable_* routines.
4675 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4677         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4678         a gimple stmt to a stmt_vec_info.
4679         (is_pattern_stmt_p): Update accordingly.
4680         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4681         (vect_record_grouped_load_vectors): Likewise.
4682         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4683         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4684         (vect_model_reduction_cost): Likewise.
4685         (vect_create_epilog_for_reduction): Likewise.
4686         (vectorizable_reduction, vectorizable_induction): Likewise.
4687         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4688         Return the stmt_vec_info for the pattern statement.
4689         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4690         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4691         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4692         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4693         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4694         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4695         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4696         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4698 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4700         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4701         (vect_finish_stmt_generation): Likewise.
4702         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4703         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4704         (vect_build_gather_load_calls): Use the return value of the above
4705         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4706         scopes for the input gimple stmt and wider scopes for the associated
4707         stmt_vec_info.  Use vec_info::lookup_def when setting these
4708         stmt_vec_infos from an SSA_NAME definition.
4709         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4710         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4711         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4712         (vectorizable_store, vectorizable_load, vectorizable_condition)
4713         (vectorizable_comparison): Likewise.
4714         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4715         (vectorizable_reduction): Likewise.
4717 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4719         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4720         stmt_vec_info * parameter before the optional gimple **.
4721         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4722         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4723         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4724         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4725         (vectorizable_live_operation): Likewise.
4726         * tree-vect-patterns.c (type_conversion_p): Likewise.
4727         (vect_look_through_possible_promotion): Likewise.
4728         (vect_recog_rotate_pattern): Likewise.
4729         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4731 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4733         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4734         a typedef to a wrapper class.
4735         (NULL_STMT_VEC_INFO): New macro.
4736         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4737         (stmt_vec_info::operator*): New function.
4738         (stmt_vec_info::operator gimple *): Likewise.
4739         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4740         (add_stmt_costs): Likewise.
4741         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4742         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4743         (vect_get_known_peeling_cost): Likewise.
4744         (vect_estimate_min_profitable_iters): Likewise.
4745         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4746         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4747         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4748         (vectorizable_store, free_stmt_vec_infos): Likewise.
4749         (new_stmt_vec_info): Change return type of xcalloc to
4750         _stmt_vec_info *.
4752 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4754         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4755         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4756         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4757         a single_imm_use-based sequence.
4758         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4760 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4762         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4763         * tree-vectorizer.c (vec_info::lookup_def): New function.
4764         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4765         (vect_widened_op_tree): Likewise.
4766         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4767         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4768         (vectorizable_reduction): Likewise.
4769         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4770         of a gimple *.
4771         (vect_is_slp_reduction): Update calls accordingly.  Use
4772         vec_info::lookup_def.
4773         (vect_is_simple_reduction): Likewise
4774         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4776 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4778         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4779         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4780         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4781         of vinfo_for_stmt.
4782         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4783         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4784         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4785         (vect_is_slp_reduction, vectorizable_induction)
4786         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4787         * tree-vect-patterns.c (vect_init_pattern_stmt):
4788         (vect_determine_min_output_precision_1, vect_determine_precisions)
4789         (vect_pattern_recog): Likewise.
4790         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4791         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4792         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4793         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4794         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4795         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4796         info field from a loop to a loop_vec_info.
4798 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4800         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4801         (vec_info::add_stmt): Declare.
4802         * tree-vectorizer.c (vec_info::add_stmt): New function.
4803         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4804         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4805         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4806         (vectorizable_induction): Likewise.
4807         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4808         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4809         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4810         (vectorizable_load): Likewise.
4811         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4812         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4813         (vect_recog_gather_scatter_pattern): Likewise.
4814         (append_pattern_def_seq): Likewise.  Remove a check that is
4815         performed by add_stmt itself.
4817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4819         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4820         which make_ssa_name was called with new_stmt before new_stmt
4821         had been created.
4823 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4825         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4826         split out from...
4827         (vect_is_slp_reduction): ...here...
4828         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4829         that are already known to be false.
4831 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4833         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4834         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4835         STMT_VINFO_NUM_SLP_USES when it's true.
4836         (vect_free_slp_instance): Add a final_p parameter and pass it to
4837         vect_free_slp_tree.
4838         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4839         (vect_analyze_slp_instance): Likewise.
4840         (vect_slp_analyze_operations): Likewise.
4841         (vect_slp_analyze_bb_1): Likewise.
4842         * tree-vectorizer.c (vec_info): Likewise.
4843         * tree-vect-loop.c (vect_transform_loop): Likewise.
4845 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4847         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4848         function is not called for second and subsequent members of
4849         a reduction group.
4851 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4853         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4854         cases for nested loops from here to ...
4855         (vect_create_epilog_for_reduction): ...here.  Only call
4856         vect_is_simple_use for inner-loop reductions.
4858 2018-07-31  Martin Liska  <mliska@suse.cz>
4860         PR gcov-profile/85338
4861         PR gcov-profile/85350
4862         PR gcov-profile/85372
4863         * profile.c (struct location_triplet): New.
4864         (struct location_triplet_hash): Likewise.
4865         (output_location): Do not output a BB that
4866         is already recorded for a line.
4867         (branch_prob): Use streamed_locations.
4869 2018-07-31  Martin Liska  <mliska@suse.cz>
4871         PR gcov-profile/85370
4872         * coverage.c (coverage_begin_function): Do not mark target
4873         clones as artificial functions.
4875 2018-07-31  Martin Liska  <mliska@suse.cz>
4877         PR gcov-profile/83813
4878         PR gcov-profile/84758
4879         PR gcov-profile/85217
4880         PR gcov-profile/85332
4881         * profile.c (branch_prob): Do not record GOTO expressions
4882         for GIMPLE statements which locations are already streamed.
4884 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4886         * gcc.c (handle_spec_function): Accept a soft_matched_part
4887         argument, as do_spec_1.  Pass it down to ...
4888         (eval_spec_function): Accept a soft_matched_part argument,
4889         and pass it down to ...
4890         (do_spec_2): Accept a soft_matched_part argument, and pass
4891         it down to do_spec_1.
4892         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4893         (handle_braces): Update call to handle_spec_function.
4894         (driver::set_up_specs): Update calls to do_spec_2.
4895         (compare_debug_dump_opt_spec_function): Likewise.
4896         (compare_debug_self_opt_spec_function): Likewise.
4898 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4900         * common.opt (nolibc): New option.
4901         * doc/invoke.texi (Link Options): Document it.
4902         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4903         * config/alpha/linux.h: Likewise.
4904         * config/arc/elf.h: Likewise.
4905         * config/arm/uclinux-elf.h: Likewise.
4906         * config/arm/unknown-elf.h: Likewise.
4907         * config/avr/avrlibc.h: Likewise.
4908         * config/bfin/bfin.h: Likewise.
4909         * config/bfin/linux.h: Likewise.
4910         * config/bfin/uclinux.h: Likewise.
4911         * config/darwin.h: Likewise.
4912         * config/darwin10.h: Likewise.
4913         * config/darwin12.h: Likewise.
4914         * config/gnu-user.h: Likewise.
4915         * config/lm32/uclinux-elf.h: Likewise.
4916         * config/pa/pa-hpux11.h: Likewise.
4917         * config/pa/pa64-hpux.h: Likewise.
4918         * config/sparc/sparc.h: Likewise.
4920 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4922         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4923         undefined variables.
4925 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4927         PR target/86640
4928         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4929         instead of GEN_INT.
4931 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4933         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4934         terminated string literal.
4936 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4938         PR rtl-optimization/85160
4939         * combine.c (is_just_move): New function.
4940         (try_combine): Allow combining two instructions into two if neither of
4941         the original instructions was a move.
4943 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4945         PR target/86673
4946         * doc/extend.texi (Global Register Variables): Discourage use of type
4947         qualifiers.
4948         (Local Register Variables): Likewise.
4950 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4952         PR tree-optimization/86506
4953         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4955 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4957         PR target/86547
4958         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4959         hard_regno, make sure no insn between `from` and `to` clobbers it.
4961 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4962             Tom de Vries  <tdevries@suse.de>
4964         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4965         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4966         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4967         PTX_DEFAULT_RUNTIME_DIM.
4968         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4970 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4972         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4973         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4974         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4976 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4978         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4979         used.
4980         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4981         predicate to reflect toc fusion has been deleted.
4982         (toc_fusion_mem_raw): Delete, no longer used.
4983         (toc_fusion_mem_wrapped): Likewise.
4984         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4985         fusion mask bit.
4986         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4987         Delete, no longer used.
4988         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4989         meant to be used for toc fusion.
4990         (rs6000_debug_print_mode): Delete toc fusion debugging.
4991         (rs6000_debug_reg_global): Likewise.
4992         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4993         fusion and secondary reload support that were never used.
4994         (rs6000_option_override_internal): Delete TOC fusion, that was only
4995         partially defined, and it did not work unless you also used the
4996         -mcmodel= switch.
4997         (rs6000_legitimate_address_p): Delete TOC fusion support.
4998         (rs6000_opt_masks): Likewise.
4999         (fusion_wrap_memory_address): Delete function, no longer used.
5000         (fusion_split_address); Delete TOC fusion support.
5001         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5002         longer used with toc fusion being deleted.
5003         (TARGET_TOC_FUSION_FP): Likewise.
5004         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5005         UNSPEC.
5006         (toc fusion spliter): Delete TOC fusion support.
5007         (toc_fusionload_<mode>): Likewise.
5008         (toc_fusionload_di): Likewise.
5009         (fusion_gpr_load_<mode>): Delete generator function, this insn no
5010         longer needs to be named.  Rename predicate to delete TOC fusion.
5011         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5012         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5013         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5014         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5015         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5017 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5019         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5020         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
5021         __int128 in built-in function prototypes.
5022         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5023         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5025 2018-07-27  Martin Sebor  <msebor@redhat.com>
5027         PR tree-optimization/86696
5028         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5029         types, including enums.
5030         (handle_char_store): Be prepared for the above function to fail.
5032 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
5034         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5035         when optimization level is lower than 2 or optimize for size.
5037 2018-07-26  Martin Sebor  <msebor@redhat.com>
5039         PR tree-optimization/86043
5040         PR tree-optimization/86042
5041         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5042         (get_string_cst_length): Rename...
5043         (get_min_string_length): ...to this.  Add argument.
5044         (handle_char_store): Extend to handle multi-character stores by
5045         MEM_REF.
5046         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
5047         * tree.h (initializer_zerop): Add argument.
5049 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
5051         PR middle-end/86660
5052         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5053         declare target to variables if they have always,{to,from,tofrom} map
5054         kinds.
5056 2018-07-26  Martin Liska  <mliska@suse.cz>
5058         PR lto/86548
5059         * lto-wrapper.c: Add linker_output as prefix
5060         for ltrans_output_file.
5062 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
5064         PR rtl-optimization/85805
5065         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5066         value for hard registers if that was written in the same mode.
5068 2018-07-26  Martin Liska  <mliska@suse.cz>
5070         PR gcov-profile/86536
5071         * gcov.c (format_gcov): Use printf format %.*f directly
5072         and do not handle special values.
5074 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5076         * common/config/arc/arc-common.c (arc_option_optimization_table):
5077         Update default optimizations for size.
5079 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5081         * config/arc/arc.md (movsf_insn): Add short instruction selection.
5082         * config/arc/constraints.md (CfZ): New constraint.
5083         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5084         (subsf3_fpu): Likewise.
5085         (cmpsf_fpu): Likewise.
5086         (cmpsf_fpu_uneq): Likewise.
5088 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5090         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5091         accesses as well.
5092         (arc_is_uncached_mem_p): uncached applies to both the variable and
5093         the pointer.
5095 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
5097         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5098         register names.
5100 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
5102         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5103         field "m_scopes" from vec to auto_vec.
5105 2018-07-25  Martin Liska  <mliska@suse.cz>
5107         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5108         return type.
5110 2018-07-25  Richard Biener  <rguenther@suse.de>
5112         PR debug/86654
5113         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5114         special wrt context_die late.
5115         (gen_subprogram_die): Re-use DIEs in local scope.
5117 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
5119         PR tree-optimization/86644
5120         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
5122 2018-07-25  Martin Liska  <mliska@suse.cz>
5124         PR middle-end/86645
5125         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5126         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5128 2018-07-25  Martin Liska  <mliska@suse.cz>
5130         PR sanitizer/79635
5131         * params.def: Explain ASan abbreviation and provide
5132         a documentation link.
5134 2018-07-24  Martin Sebor  <msebor@redhat.com>
5136         PR tree-optimization/86622
5137         PR tree-optimization/86532
5138         * builtins.h (string_length): Declare.
5139         * builtins.c (c_strlen): Correct handling of non-constant offsets.
5140         (check_access): Be prepared for non-constant length ranges.
5141         (string_length): Make extern.
5142         * expr.c (string_constant): Only handle the minor non-constant
5143         array index.  Use string_constant to compute the length of
5144         a generic string constant.
5146 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
5148         PR tree-optimization/86618
5149         * tree-vect-stmts.c (vectorizable_call): Don't take the address
5150         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5152 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
5154         PR tree-optimization/86636
5155         * json.cc (json::object::set): Fix comment.  Add assertions.
5156         (json::array::append): Move here from json.h.  Add comment and an
5157         assertion.
5158         (json::string::string): Likewise.
5159         * json.h (json::array::append): Move to json.cc.
5160         (json::string::string): Likewise.
5161         * optinfo-emit-json.cc
5162         (optrecord_json_writer::impl_location_to_json): Assert that we
5163         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5164         wrapper around it.  Expand the location once, rather than three
5165         times.
5166         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5167         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5168         wrappers.
5169         (optrecord_json_writer::optinfo_to_json): Likewise, in four
5170         places.  Fix some overlong lines.
5172 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
5174         * config/aarch64/aarch64-simd.md
5175         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5176         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5177         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5178         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5179         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5180         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5181         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5182         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5183         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5185 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
5187         PR middle-end/86627
5188         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5189         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
5190         and abs_d == d, do the power of two handling if profitable.
5192 2018-07-24  Richard Biener  <rguenther@suse.de>
5194         * match.pd: Add BIT_FIELD_REF canonicalizations.
5196 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5198         PR c/86617
5199         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5201 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5203         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5204         terminated STRING_CST object.
5206 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5208         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5210 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
5212         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5213         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5214         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5215         the elements into a register.
5216         (rs6000_split_v4si_init_di_reg): Delete.
5217         (rs6000_split_v4si_init): Delete.
5218         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5219         (vsx_init_v4si): Rewrite as a define_expand.
5221 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
5223         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5224         zero_extend argument from memory): New.
5226 2018-07-22  Martin Sebor  <msebor@redhat.com>
5228         PR bootstrap/86621
5229         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5230         diagnosing calls with unknown arguments unless -Walloca-larger-than
5231         is restricted to less than PTRDIFF_MAX bytes.
5233 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
5235         * doc/gcov.texi (Invoking Gcov): Editorial changes.
5237 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5239         * pretty-print.c (text_info::set_location): Remove redundant
5240         "line_table" parameter from call to rich_location::set_range.
5242 2018-07-20  Martin Sebor  <msebor@redhat.com>
5244         PR middle-end/82063
5245         * builtins.c (expand_builtin_alloca): Adjust.
5246         * calls.c (alloc_max_size): Simplify.
5247         * cgraphunit.c (cgraph_node::expand): Adjust.
5248         * common.opt (larger_than_size, warn_frame_larger_than): Remove
5249         variables.
5250         (frame_larger_than_size): Same.
5251         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5252         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5253         Initialize.
5254         * doc/invoke.texi (GCC Command Options): Document option arguments.
5255         Explain byte-size arguments and suffixes.
5256         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5257         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5258         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5259         * doc/options.texi (UInteger): Expand.
5260         (Host_Wide_Int, ByteSize): Document new properties.
5261         * final.c (final_start_function_1): Include sizes in an error message.
5262         * function.c (frame_offset_overflow): Same.
5263         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5264         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5265         Diagnose unbounded alloca calls only for limits of less than
5266         PTRDIFF_MAX.
5267         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
5268         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
5269         for alloca(0).
5270         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
5271         only for limits of less than PTRDIFF_MAX.
5272         * langhooks-def.h (lhd_handle_option): Change function argument
5273         to HOST_WIDE_INT.
5274         * langhooks.c (lhd_handle_option): Same.
5275         * langhooks.h (handle_option): Same.
5276         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5277         ByteSize flags.
5278         (var_type, var_type_struct): Same.
5279         (var_set): Handle ByteSize flag.
5280         * optc-gen.awk: Add comments to output to ease debugging.  Make
5281         use of HOST_WIDE_INT where appropriate.
5282         * opts-gen-save.awk:  Use %lx to format unsigned long.
5283         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5284         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5285         arguments.  Parse bytes-size suffixes.
5286         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5287         (enum_value_to_arg): Same.
5288         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
5289         (handle_option): Adjust.
5290         (generate_option): Change function argument to HOST_WIDE_INT.
5291         (cmdline_handle_error): Adjust.
5292         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5293         (set_option): Change function argument to HOST_WIDE_INT.
5294         (option_enabled): Handle cl_host_wide_int.
5295         (get_option_state): Handle CLVC_SIZE.
5296         (control_warning_option): Same.
5297         * opts.c (common_handle_option): Change function argument to
5298         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5299         OPT_Wvla_larger_than_.
5300         * opts.h (enum cl_var_type): Add an enumerator.
5301         * stor-layout.c (layout_decl): Print a more meaningful warning.
5302         * toplev.c (output_stack_usage): Adjust.
5304 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5306         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5307         call to inline_expand_builtin_string_cmp.
5308         (expand_builtin_strcmp): Likewise.
5309         (expand_builtin_strncmp): Likewise.
5310         (inline_string_cmp): Delete the last parameter, change char_type_node
5311         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5312         two operands.
5313         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5314         the inlining expansion on target where the type of the call has same or
5315         narrower precision than unsigned char.
5317 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5319         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5320         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5321         * common.opt (fsave-optimization-record): New option.
5322         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5323         * doc/invoke.texi (-fsave-optimization-record): New option.
5324         * dumpfile.c: Include "optinfo-emit-json.h".
5325         (struct kv_pair): Move to coretypes.h.
5326         (optgroup_options): Make non-static.
5327         (dump_context::end_scope): Call
5328         optimization_records_maybe_pop_dump_scope.
5329         * dumpfile.h (optgroup_options): New decl.
5330         * json.cc: New file.
5331         * json.h: New file.
5332         * optinfo-emit-json.cc: New file.
5333         * optinfo-emit-json.h: New file.
5334         * optinfo.cc: Include "optinfo-emit-json.h".
5335         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5336         (optinfo_enabled_p): Check optimization_records_enabled_p.
5337         (optinfo_wants_inlining_info_p): Likewise.
5338         * optinfo.h: Update comment.
5339         * profile-count.c (profile_quality_as_string): New function.
5340         * profile-count.h (profile_quality_as_string): New decl.
5341         (profile_count::quality): New accessor.
5342         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5343         and optinfo_emit_json_cc_tests.
5344         * selftest.h (selftest::json_cc_tests): New decl.
5345         (selftest::optinfo_emit_json_cc_tests): New decl.
5346         * toplev.c: Include "optinfo-emit-json.h".
5347         (compile_file): Call optimization_records_finish.
5348         (do_compile): Call optimization_records_start.
5349         * tree-ssa-live.c: Include optinfo.h.
5350         (remove_unused_scope_block_p): Retain inlining information if
5351         optinfo_wants_inlining_info_p returns true.
5353 2018-07-20  Richard Biener  <rguenther@suse.de>
5355         PR debug/86585
5356         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5357         to cover -flto-partition=none.
5359 2018-07-20  Martin Liska  <mliska@suse.cz>
5361         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5362         (get_decl_source_range): Remove unused function.
5364 2018-07-20  Richard Biener  <rguenther@suse.de>
5366         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5367         (struct vn_phi_s): Likewise.
5368         (struct vn_reference_s): Likewise.
5369         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5370         for searching the slot of an entry known to be in the hash itself.
5371         (vn_phi_hasher::equal): Likewise.
5372         (vn_reference_hasher::equal): Likewise.
5373         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5374         globals.
5375         (optimistic_info, current_info): Remove, keeping only valid_info.
5376         (vn_reference_lookup_1): Remove fallback lookup.
5377         (vn_reference_lookup_2): Likewise.
5378         (vn_nary_op_lookup_1): Likewise.
5379         (vn_phi_lookup): Likewise.
5380         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5381         hash element.
5382         (vn_reference_insert): Adjust, chain the inserted hash element
5383         at last_inserted_ref.
5384         (vn_reference_insert_pieces): Likewise.
5385         (visit_reference_op_call): Likewise.
5386         (vn_nary_op_insert_into): Chain the inserted hash element at
5387         last_inserted_nary.
5388         (vn_nary_op_insert_pieces): Adjust.
5389         (vn_nary_op_insert): Likewise.
5390         (vn_nary_op_insert_stmt): Likewise.
5391         (vn_phi_insert): Adjust, chain the inserted hash element at
5392         last_inserted_phi.
5393         (process_scc): Remove clearing and copying the optimistic
5394         table.  Instead remove elements inserted during an optimistic
5395         iteration from the single table we maintain.
5396         (init_scc_vn): Adjust.
5397         (free_scc_vn): Likewise.
5398         (sccvn_dom_walker::record_cond): Likewise.
5399         (sccvn_dom_walker::after_dom_children): Likewise.
5401 2018-07-19  Martin Sebor  <msebor@redhat.com>
5403         PR tree-optimization/84047
5404         PR tree-optimization/83776
5405         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5406         (check_array_bounds): Call it.
5408 2018-07-19  Martin Sebor  <msebor@redhat.com>
5410         * align.h (align_flags): Use member initialization.
5412 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5414         * Makefile.in (OBJS): Add optinfo.o.
5415         * coretypes.h (class symtab_node): New forward decl.
5416         (struct cgraph_node): New forward decl.
5417         (class varpool_node): New forward decl.
5418         * dump-context.h: New file.
5419         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5420         "tree-pass.h".
5421         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5422         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5423         (set_alt_dump_file): Likewise.
5424         (dump_context::~dump_context): New dtor.
5425         (dump_gimple_stmt): Move implementation to...
5426         (dump_context::dump_gimple_stmt): ...this new member function.
5427         Add the stmt to any pending optinfo, creating one if need be.
5428         (dump_gimple_stmt_loc): Move implementation to...
5429         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5430         Start a new optinfo and add the stmt to it.
5431         (dump_gimple_expr): Move implementation to...
5432         (dump_context::dump_gimple_expr): ...this new member function.
5433         Add the stmt to any pending optinfo, creating one if need be.
5434         (dump_gimple_expr_loc): Move implementation to...
5435         (dump_context::dump_gimple_expr_loc): ...this new member function.
5436         Start a new optinfo and add the stmt to it.
5437         (dump_generic_expr): Move implementation to...
5438         (dump_context::dump_generic_expr): ...this new member function.
5439         Add the tree to any pending optinfo, creating one if need be.
5440         (dump_generic_expr_loc): Move implementation to...
5441         (dump_context::dump_generic_expr_loc): ...this new member
5442         function.  Add the tree to any pending optinfo, creating one if
5443         need be.
5444         (dump_printf): Move implementation to...
5445         (dump_context::dump_printf_va): ...this new member function.  Add
5446         the text to any pending optinfo, creating one if need be.
5447         (dump_printf_loc): Move implementation to...
5448         (dump_context::dump_printf_loc_va): ...this new member function.
5449         Start a new optinfo and add the stmt to it.
5450         (dump_dec): Move implementation to...
5451         (dump_context::dump_dec): ...this new member function.  Add the
5452         value to any pending optinfo, creating one if need be.
5453         (dump_context::dump_symtab_node): New member function.
5454         (dump_context::get_scope_depth): New member function.
5455         (dump_context::begin_scope): New member function.
5456         (dump_context::end_scope): New member function.
5457         (dump_context::ensure_pending_optinfo): New member function.
5458         (dump_context::begin_next_optinfo): New member function.
5459         (dump_context::end_any_optinfo): New member function.
5460         (dump_context::s_current): New global.
5461         (dump_context::s_default): New global.
5462         (dump_scope_depth): Delete global.
5463         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5464         (dump_symtab_node): New function.
5465         (get_dump_scope_depth): Reimplement in terms of dump_context.
5466         (dump_begin_scope): Likewise.
5467         (dump_end_scope): Likewise.
5468         (selftest::temp_dump_context::temp_dump_context): New ctor.
5469         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5470         (selftest::verify_item): New function.
5471         (ASSERT_IS_TEXT): New macro.
5472         (ASSERT_IS_TREE): New macro.
5473         (ASSERT_IS_GIMPLE): New macro.
5474         (selftest::test_capture_of_dump_calls): New test.
5475         (selftest::dumpfile_c_tests): Call it.
5476         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5477         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5478         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5479         descriptive comment.
5480         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5481         (dump_node, dump_bb): Move these unrelated decls.
5482         (class dump_manager): Add leading comment.
5483         * optinfo.cc: New file.
5484         * optinfo.h: New file.
5486 2018-07-19  Michael Collison  <michael.collison@arm.com>
5487             Richard Henderson <rth@redhat.com>
5489         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5490         (subti): Handle op1 zero.
5491         (subvti4, usub4ti4): New.
5492         (*sub<GPI>3_compare1_imm): New.
5493         (sub<GPI>3_carryinCV): New.
5494         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5495         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5497 2018-07-19  Michael Collison  <michael.collison@arm.com>
5498             Richard Henderson <rth@redhat.com>
5500         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5501         (addti3): Create simpler code if low part is already known to be 0.
5502         (addvti4, uaddvti4): New.
5503         (*add<GPI>3_compareC_cconly_imm): New.
5504         (*add<GPI>3_compareC_cconly): New.
5505         (*add<GPI>3_compareC_imm): New.
5506         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5507         handle constants within this pattern..
5508         (*add<GPI>3_compareV_cconly_imm): New.
5509         (*add<GPI>3_compareV_cconly): New.
5510         (*add<GPI>3_compareV_imm): New.
5511         (add<GPI>3_compareV): New.
5512         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5513         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5514         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5515         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5516         with 'comparison' operator.
5517         (*add<GPI>3_compareV_cconly_imm): Ditto.
5518         (*add<GPI>3_compareV_cconly): Ditto.
5519         (*add<GPI>3_compareV_imm): Ditto.
5520         (add<GPI>3_compareV): Ditto.
5521         (add<mode>3_carryinC): Ditto.
5522         (*add<mode>3_carryinC_zero): Ditto.
5523         (*add<mode>3_carryinC): Ditto.
5524         (add<mode>3_carryinV): Ditto.
5525         (*add<mode>3_carryinV_zero): Ditto.
5526         (*add<mode>3_carryinV): Ditto.
5528 2018-07-19  Michael Collison  <michael.collison@arm.com>
5529             Richard Henderson <rth@redhat.com>
5531         * config/aarch64/aarch64-modes.def (CC_V): New.
5532         * config/aarch64/aarch64-protos.h
5533         (aarch64_addti_scratch_regs): Declare
5534         (aarch64_subvti_scratch_regs): Declare.
5535         (aarch64_expand_subvti): Declare.
5536         (aarch64_gen_unlikely_cbranch): Declare
5537         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5538         for signed overflow using CC_Vmode.
5539         (aarch64_get_condition_code_1): Handle CC_Vmode.
5540         (aarch64_gen_unlikely_cbranch): New function.
5541         (aarch64_addti_scratch_regs): New function.
5542         (aarch64_subvti_scratch_regs): New function.
5543         (aarch64_expand_subvti): New function.
5545 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5547         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5548         extension.
5549         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5550         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5551         extension.
5553 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5555         PR target/83009
5556         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5557         address check not strict.
5559 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5561         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5562         Umq with Umn.
5563         (store_pair_lanes<mode>): Likewise.
5564         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5565         enum value 'ADDR_QUERY_LDP_STP_N'.
5566         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5567         (aarch64_print_address_internal): Add declaration.
5568         (aarch64_print_ldpstp_address): Remove.
5569         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5570         (aarch64_print_operand): Change printing of 'y'.
5571         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5572         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5573         'true' rather than '1'.
5574         * config/aarch64/constraints.md (Uml): Likewise.
5575         (Uml): Rename to Umn.
5576         (Umq): Remove.
5578 2018-07-19  Richard Biener  <rguenther@suse.de>
5580         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5581         a trailing array.
5582         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5583         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5584         (vn_reference_hasher): Likewise.
5585         (struct vn_tables_s): Remove obstack and alloc-pool members.
5586         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5587         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5588         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5589         (vn_reference_insert_pieces): Likewise.
5590         (alloc_vn_nary_op_noinit): Adjust.
5591         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5592         (vn_phi_eq): Adjust.
5593         (shared_lookup_phiargs): Remove.
5594         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5595         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5596         (visit_reference_op_call): Likewise.
5597         (copy_nary, copy_phi, copy_reference): Remove.
5598         (process_scc): Rewind the obstack when iterating.  Do not
5599         copy the elements to valid_info but just move them from one
5600         hashtable to the other.
5601         (allocate_vn_table): Adjust.
5602         (free_vn_table): Likewise.
5603         (init_scc_vn): Likewise.
5604         (free_scc_vn): Likewise.
5606 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5608         PR target/86560
5609         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5610         indirect_return as function type attribute.
5611         (ix86_attribute_table): Change indirect_return to function
5612         type attribute.
5613         * doc/extend.texi: Update indirect_return attribute.
5615 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
5617         * wide-int.h (widest2_int): New.
5618         * gimple-fold.c (arith_overflowed_p): Use it.
5619         * tree.h (widest2_int_cst): New.
5620         * tree-vrp.c (wide_int_binop_overflow): Rename from
5621         vrp_int_const_binop.
5622         Rewrite to work on trees.
5623         (extract_range_from_multiplicative_op_1): Abstract code to...
5624         (wide_int_range_min_max): ...here.
5625         (wide_int_range_cross_product): ...and here.
5626         (extract_range_from_binary_expr_1): Abstract overflow code to...
5627         (wide_int_range_mult_wrapping): ...here.
5628         * tree-vrp.h (wide_int_range_cross_product): New.
5629         (wide_int_range_mult_wrapping): New.
5631 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
5632             Julia Koval  <julia.koval@intel.com>
5634         * config/i386/x86-tune-costs.h (skylake_memcpy,
5635         skylake_memset): Replace rep_prefix with unrolling for size 512.
5637 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
5639         PR middle-end/86544
5640         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5641         comparision with EQ_EXPR in last stmt.
5643 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5645         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5646         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5647         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5648         previously known as "PowerPC AltiVec Built-in Functions".  Move
5649         some material to new subsubsections "PowerPC AltiVec Built-in
5650         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5651         ISA 2.07".
5652         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5653         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5654         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5655         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5657 2018-07-18  Richard Biener  <rguenther@suse.de>
5659         PR tree-optimization/86557
5660         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5661         EXACT_DIV_EXPR.
5663 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5665         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5667 2018-07-17  Jeff Law  <law@redhat.com>
5669         * config/arm/arm.c (get_label_padding): Update for recent
5670         changes to label_to_alignment.
5672         PR tree-optimization/86010
5673         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5675         * config/mips/mips.c (vr4130_align_insns): Update for recent
5676         changes to label_to_alignment.
5678         * config/frv/frv.c (frv_label_align): Update for recent changes
5679         to label_to_alignment.
5681         * config/nios2/nios2.c (nios2_label_align): Update for recent
5682         changes which dropped ALIGN_LABELS_LOG.
5684 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5686         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5687         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5689 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5691         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5692         deprecated align_labels_log.
5694 2018-07-17  Richard Biener  <rguenther@suse.de>
5696         PR lto/86456
5697         * dwarf2out.c (init_sections_and_labels): Always generate
5698         a debug_line_str_section for early LTO debug.
5699         (dwarf2out_finish): Reset debug_line_str_hash output early.
5700         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5701         with fat LTO part.
5702         (dwarf2out_early_finish): Output debug_line_str.
5704 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5706         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5707         index register on z196 or later.
5709 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5711         * config/s390/s390.c (s390_default_align): Set default function
5712         alignment to 16.
5713         (s390_override_options_after_change): Call s390_default align.
5714         (s390_option_override_internal): Call s390_default_align.
5715         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5717 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5719         PR middle-end/86542
5720         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5721         to _looptemp_ clauses, other than the first two.
5723 2018-07-17  Martin Liska  <mliska@suse.cz>
5725         * opts.c: Do not enable OPT_falign_* for -Os.
5727 2018-07-17  Martin Liska  <mliska@suse.cz>
5729         * align.h (MAX_CODE_ALIGN): New.
5730         (MAX_CODE_ALIGN_VALUE): New.
5731         * common/config/i386/i386-common.c (ix86_handle_option):
5732         (MAX_CODE_ALIGN): Moved to align.h.
5733         * final.c (MAX_CODE_ALIGN): Likewise.
5734         * opts.c (parse_and_check_align_values):
5735         (MAX_CODE_ALIGN): Likewise.
5736         (MAX_CODE_ALIGN_VALUE): Likewise.
5738 2018-07-17  Martin Liska  <mliska@suse.cz>
5740         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5741         in order to fulfil coding style.
5742         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5743         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5744         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5745         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5746         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5747         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5748         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5749         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5750         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5752 2018-07-17  Martin Liska  <mliska@suse.cz>
5754         * align.h: New file.
5755         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5756         directly.
5757         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5758         align_flags of label_to_alignment.
5759         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5760         align_flags class.
5761         * config/m68k/m68k.c: Do not use removed align_labels_value and
5762         align_loops_value.
5763         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5764         (LOOP_ALIGN): Likewise.
5765         (LABEL_ALIGN): Likewise.
5766         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5767         Remove not used macro.
5768         (rs6000_loop_align): Change return type to align_flags.
5769         (rs6000_loop_align_max_skip): Remove.
5770         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5771         Change return type to align_flags.
5772         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5773         Remove not used macro.
5774         (rs6000_loop_align):  Change return type to align_flags.
5775         (rs6000_loop_align_max_skip): Remove.
5776         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5777         * config/rx/rx-protos.h (rx_align_for_label): Make it
5778         static function.
5779         * config/rx/rx.c (rx_align_for_label): Change return type
5780         to align_flags.
5781         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5782         macro definitions.
5783         into align_flags class.
5784         (LABEL_ALIGN): Likewise.
5785         (LOOP_ALIGN): Likewise.
5786         * config/s390/s390.c (s390_label_align): Use align_flags
5787         class member.
5788         (s390_asm_output_function_label): Likewise.
5789         * config/sh/sh.c (sh_override_options_after_change):
5790         Use align_flags class directly without macros.
5791         (find_barrier): Likewise.
5792         (barrier_align): Likewise.
5793         (sh_loop_align): Likewise.
5794         * config/spu/spu.c (spu_option_override):
5795         Use align_flags_tuple::get_value instead of removed macros.
5796         (spu_sched_init): Likewise.
5797         * config/spu/spu.h (GTY): Likewise.
5798         * config/visium/visium.c (visium_option_override):
5799         Set "8" as default secondary alignment.
5800         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5801         in order to guarantee secondary alignment of 8.
5802         * coretypes.h: Include align.h header file.
5803         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5804         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5805         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5806         * doc/tm.texi.in: Likewise.
5807         * final.c (struct label_alignment): Remove not used structure.
5808         (LABEL_ALIGN): Change type to align_flags.
5809         (LOOP_ALIGN): Likewise.
5810         (JUMP_ALIGN): Likewise.
5811         (default_loop_align_max_skip): Remove.
5812         (default_label_align_max_skip): Likewise.
5813         (default_jump_align_max_skip): Likewise.
5814         (default_label_align_after_barrier_max_skip):
5815         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5816         (LABEL_TO_MAX_SKIP): Remove.
5817         (label_to_alignment): Return align_flags type instead of integer.
5818         (label_to_max_skip): Remove.
5819         (align_fuzz): Use align_flags type.
5820         (compute_alignments): Use align_flags type and use align_flags::max
5821         to combine multiple alignments.
5822         (grow_label_align): Grow vec instead of C array.
5823         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5824         (shorten_branches):  Use align_flags type and use align_flags::max
5825         to combine multiple alignments.
5826         (final_scan_insn_1): Remove usage of secondary alignment that comes
5827         from label alignment, but instead use proper secondary alignment
5828         which is computed in grow_label_align.
5829         * flags.h (struct align_flags_tuple): Move to align.h.
5830         (struct align_flags): Likewise.
5831         (state_align_loops): Rename to align_loops.
5832         (state_align_jumps): Rename to align_jumps.
5833         (state_align_labels): Rename to align_labels.
5834         (state_align_functions): Rename to align_functions.
5835         (align_loops_log): Remove.
5836         (align_jumps_log): Remove.
5837         (align_labels_log): Remove.
5838         (align_functions_log): Remove.
5839         (align_loops_max_skip): Remove.
5840         (align_jumps_max_skip): Remove.
5841         (align_labels_max_skip): Remove.
5842         (align_functions_max_skip): Remove.
5843         (align_loops_value): Remove.
5844         (align_jumps_value): Remove.
5845         (align_labels_value): Remove.
5846         (align_functions_value): Remove.
5847         * output.h (label_to_alignment): Change return type to align_flags.
5848         (label_to_max_skip): Remove.
5849         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5850         jump_align_max_skip macros.
5851         * targhooks.h (default_loop_align_max_skip): Remove.
5852         (default_label_align_max_skip): Likewise.
5853         (default_jump_align_max_skip): Likewise.
5854         (default_label_align_after_barrier_max_skip): Remove.
5855         * toplev.c (read_log_maxskip): Use ::normalize function.
5856         (parse_N_M): Remove not used argument and also call ::normalize.
5857         (parse_alignment_opts): Do not pass unused arguments.
5858         * varasm.c (assemble_start_function): Use directly align_functions
5859         instead of removed macros.
5860         * system.h: Do not poison removed macros.
5862 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5864         PR middle-end/86539
5865         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5866         and cond temporaries don't have reference type if iterator has
5867         pointer type.  For init use &for_pre_body instead of pre_p if
5868         for_pre_body is non-empty.
5870 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5872         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5873         double-double modes to SFmode directly directly.
5874         (trunc<mode>sf2_fprs): Delete.
5876 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5878         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5879         for conversions between IFmode and the decimal floating point modes.
5880         (init_float128_ieee): Use the correct names for conversions between
5881         KFmode and the decimal floating point modes.
5883 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5885         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5886         for the conversions between TDmode and IFmode.
5887         (init_float128_ieee): Use more correct names for the conversions
5888         between TDmode and KFmode.
5890 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5892         PR tree-optimization/86526
5893         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5894         (inline_expand_builtin_string_cmp): Likewise.
5895         (inline_string_cmp): Likewise.  Use c_readstr instead of
5896         builtin_memcpy_read_str.  Add unit_mode temporary.
5898 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5900         PR middle-end/86528
5901         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5902         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5904 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5906         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5907         Alphabetize prototypes of built-in functions, separating out
5908         built-in functions that are listed in this section but should be
5909         described elsewhere.
5911 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5913         PR target/86511
5914         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5915         conditional move when trapping comparison was split to a
5916         non-trapping one (and vice versa).
5918 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5920         * config/s390/s390.c (s390_function_profiler): Generate nops
5921         instead of profiler call sequences.
5922         * config/s390/s390.opt: Add the new option.
5924 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5926         * config/s390/s390.c (s390_function_profiler): Generate
5927         __mcount_loc section.
5928         * config/s390/s390.opt: Add the new option.
5930 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5932         * common.opt: Add the new warning.
5933         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5934         %r0,__fentry__" when -mfentry is specified.
5935         (s390_option_override_internal): Disallow -mfentry for 31-bit
5936         CPUs.
5937         * config/s390/s390.opt: Add the new option.
5939 2018-07-16  Richard Biener  <rguenther@suse.de>
5941         PR lto/86523
5942         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5943         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5945 2018-07-16  Martin Liska  <mliska@suse.cz>
5947         PR ipa/86529
5948         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5949         to ::get_create.
5951 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5953         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5955 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5957         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5958         for ARCHS4x.
5959         * config/arc/arc-cpus.def (hs4x): New cpu.
5960         (hs4xd): Likewise.
5961         * config/arc/arc-tables.opt: Regenerate.
5962         * config/arc/arc.c (arc_sched_issue_rate): New function.
5963         (TARGET_SCHED_ISSUE_RATE): Define.
5964         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5965         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5966         fpu_cvt.
5967         (attr tune): Add ARCHS4x tune values.
5968         (attr tune_dspmpy): Define.
5969         (*tst): Correct instruction type.
5970         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5971         * config/arc/arcHS4x.md: New file.
5972         * config/arc/fpu.md: Update instruction type attributes.
5973         * config/arc/t-multilib: Regenerate.
5975 2018-07-16  Tom de Vries  <tdevries@suse.de>
5977         PR debug/86455
5978         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5980 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5982         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5983         early clobber.
5985 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5987         PR tree-optimization/86514
5988         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5989         conversion to a boolean type from a type with greater precision.
5991 2018-07-16  Tom de Vries  <tdevries@suse.de>
5993         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5994         dump_flags request TDF_SLIM.
5996 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5998         * fold-const.c (int_const_binop_1): Abstract...
5999         (wide_int_binop): ...wide int code here.
6000         (poly_int_binop): ...poly int code here.
6001         Abstract the rest of int_const_binop_1 into int_const_binop.
6002         * fold-const.h (wide_int_binop): New.
6003         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6004         Remove useless PLUS/MINUS_EXPR case.
6005         (zero_nonzero_bits_from_vr): Move wide int code...
6006         (zero_nonzero_bits_from_bounds): ...here.
6007         (extract_range_from_binary_expr_1): Move mask optimization code...
6008         (range_easy_mask_min_max): ...here.
6009         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6010         (range_easy_mask_min_max): New.
6012 2018-07-15  Jeff Law  <law@redhat.com>
6014         PR target/85993
6015         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6016         block.
6018 2018-07-14  Jim Wilson  <jimw@sifive.com>
6020         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6022 2018-07-14  Paul Koning  <ni1d@arrl.net>
6024         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6026 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
6028         * lto-streamer-out.c (copy_function_or_variable): Dump info about
6029         copying section.
6031 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
6032             Steve Munroe  <munroesj52@gmail.com>
6034         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6035         (_mm_andnot_si128): Likewise.
6036         (_mm_or_si128): Likewise.
6037         (_mm_xor_si128): Likewise.
6039 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
6041         PR middle-end/78809
6042         * builtins.c (expand_builtin_memcmp): Inline the calls first
6043         when result_eq is false.
6044         (expand_builtin_strcmp): Inline the calls first.
6045         (expand_builtin_strncmp): Likewise.
6046         (inline_string_cmp): New routine. Expand a string compare
6047         call by using a sequence of char comparison.
6048         (inline_expand_builtin_string_cmp): New routine. Inline expansion
6049         a call to str(n)cmp/memcmp.
6050         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6051         New option.
6052         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6054 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
6056         * config/arm/driver-arm.c: Include arm-native.h.
6057         (host_detect_local_cpu): Use auto-generated data tables.
6058         (vendors, arm_cpu_table): Delete.  Move part information to ...
6059         * config/arm/arm-cpus.in: ... here.
6060         * config/arm/parsecpu.awk (gen_native): New function.
6061         (vendor, part): New CPU fields.
6062         (END): Add support for building the native CPU detection tables.
6063         * config/arm/t-arm (arm-native.h): Add build rule.
6064         (driver-arm.o): Add dependency on arm-native.h.
6066 2018-07-13  Richard Biener  <rguenther@suse.de>
6068         PR middle-end/85974
6069         * match.pd (addr1 - addr2): Allow either of the operand to
6070         have a conversion.
6072 2018-07-13  Tom de Vries  <tdevries@suse.de>
6074         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6075         in remap_ssa_name.
6077 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
6079         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6080         arrays instead of numbered variables.
6082 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
6084         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6085         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6087 2018-07-13  Richard Biener  <rguenther@suse.de>
6089         PR debug/86452
6090         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6091         instead of get_context_die.
6093 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
6094             Richard Biener  <rguenther@suse.de>
6096         PR middle-end/86489
6097         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6098         that the loop latch destination where phi is defined.
6100 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
6102         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6103         (riscv_expand_epilogue): Add assertion to check interrupt mode.
6104         (riscv_set_current_function): Extract getting interrupt type to new
6105         function.
6106         (riscv_get_interrupt_type): New function.
6107         (riscv_merge_decl_attributes): New function, checking interrupt type is
6108         same.
6109         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6111 2018-07-12  Paul Koning  <ni1d@arrl.net>
6113         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6114         directive.
6116 2018-07-12  Paul Koning  <ni1d@arrl.net>
6118         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6119         zero reference, add doloop_end instead.
6120         * doc/md.texi (decrement_and_branch_until_zero): Remove.
6121         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
6122         detail for doloop_end.
6124 2018-07-12  Martin Sebor  <msebor@redhat.com>
6126         PR c/86453
6127         * attribs.c (decl_attributes): Reject conflicting attributes before
6128         calling attribute handlers.
6130 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6132         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6133          parameter.
6134         (gcc::dump_manager::get_dump_file_name): likewise.
6135         (dump_begin): Likewise.
6136         * dumpfile.h (dump_begin): Update prototype.
6137         (gcc::dump_manager::get_dump_file_name,
6138         gcc::dump_manager::get_dump_file_name): Update prototype.
6140 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6142         * internal-fn.h (vectorizable_internal_fn_p): New function.
6143         * tree-vect-slp.c (compatible_calls_p): Likewise.
6144         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
6145         to internal functions.
6146         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6148 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6150         * fold-const.h (inverse_conditions_p): Declare.
6151         * fold-const.c (inverse_conditions_p): New function.
6152         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
6153         that test the inverse condition of a conditional internal function.
6154         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6155         * internal-fn.c (internal_fn_mask_index): Handle conditional
6156         internal functions.
6157         (vectorized_internal_fn_supported_p): New function.
6158         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6159         (any_pred_load_store): Replace with...
6160         (need_to_predicate): ...this new variable.
6161         (redundant_ssa_names): New variable.
6162         (ifcvt_can_use_mask_load_store): Move initial checks to...
6163         (ifcvt_can_predicate): ...this new function.  Handle tree codes
6164         for which a conditional internal function exists.
6165         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6166         instead of ifcvt_can_use_mask_load_store.  Update after variable
6167         name change.
6168         (predicate_load_or_store): New function, split out from
6169         predicate_mem_writes.
6170         (check_redundant_cond_expr): New function.
6171         (value_available_p): Likewise.
6172         (predicate_rhs_code): Likewise.
6173         (predicate_mem_writes): Rename to...
6174         (predicate_statements): ...this.  Use predicate_load_or_store
6175         and predicate_rhs_code.
6176         (combine_blocks, tree_if_conversion): Update after above name changes.
6177         (ifcvt_local_dce): Handle redundant_ssa_names.
6178         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6179         general conditional functions.
6180         * tree-vect-stmts.c (vectorizable_call): Likewise.
6182 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6183             Alan Hayward  <alan.hayward@arm.com>
6184             David Sherwood  <david.sherwood@arm.com>
6186         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6187         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6188         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6189         plus and minus and convert them into IFN_COND_FMA-based sequences.
6190         (convert_mult_to_fma): Handle conditional plus and minus.
6192 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6194         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6195         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6196         (cond_fnms_optab): New optabs.
6197         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6198         internal functions.
6199         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6200         * internal-fn.h (get_conditional_internal_fn): Declare.
6201         (get_unconditional_internal_fn): Likewise.
6202         * internal-fn.c (cond_ternary_direct): New macro.
6203         (expand_cond_ternary_optab_fn): Likewise.
6204         (direct_cond_ternary_optab_supported_p): Likewise.
6205         (FOR_EACH_COND_FN_PAIR): Likewise.
6206         (get_conditional_internal_fn): New function.
6207         (get_unconditional_internal_fn): Likewise.
6208         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6209         (gimple_match_op::gimple_match_op): Add a new overload for 5
6210         operands.
6211         (gimple_match_op::set_op): Likewise.
6212         (gimple_resimplify5): Declare.
6213         * genmatch.c (decision_tree::gen): Generate simplifications for
6214         5 operands.
6215         * gimple-match-head.c (gimple_simplify): Define an overload for
6216         5 operands.  Handle calls with 5 arguments in the top-level overload.
6217         (convert_conditional_op): Handle conversions from unconditional
6218         internal functions to conditional ones.
6219         (gimple_resimplify5): New function.
6220         (build_call_internal): Pass a fifth operand.
6221         (maybe_push_res_to_seq): Likewise.
6222         (try_conditional_simplification): Try converting conditional
6223         internal functions to unconditional internal functions.
6224         Handle 3-operand unconditional forms.
6225         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6226         Define ternary equivalents of the current rules for binary conditional
6227         internal functions.
6228         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6229         ternary operations.
6230         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6231         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6232         (optab): Handle them.
6233         (SVE_COND_FP_TERNARY): New int iterator.
6234         (sve_fmla_op, sve_fmad_op): New int attributes.
6235         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6236         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6237         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6239 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6241         * target.def (preferred_else_value): New target hook.
6242         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6243         * doc/tm.texi: Regenerate.
6244         * targhooks.h (default_preferred_else_value): Declare.
6245         * targhooks.c (default_preferred_else_value): New function.
6246         * internal-fn.h (conditional_internal_fn_code): Declare.
6247         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6248         (get_conditional_internal_fn): Use it.
6249         (conditional_internal_fn_code): New function.
6250         * gimple-match.h (gimple_match_cond): New struct.
6251         (gimple_match_op): Add a cond member function.
6252         (gimple_match_op::gimple_match_op): Update all forms to take a
6253         gimple_match_cond.
6254         * genmatch.c (expr::gen_transform): Use the same condition as res_op
6255         for the suboperation, but don't specify a particular else_value.
6256         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6257         (visit_nary_op, visit_reference_op_load): Pass
6258         gimple_match_cond::UNCOND to the gimple_match_op constructor.
6259         * gimple-match-head.c: Include tree-eh.h
6260         (convert_conditional_op): New function.
6261         (maybe_resimplify_conditional_op): Likewise.
6262         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6263         (gimple_resimplify2): Likewise.
6264         (gimple_resimplify3): Likewise.
6265         (gimple_resimplify4): Likewise.
6266         (maybe_push_res_to_seq): Return null for conditional operations.
6267         (try_conditional_simplification): New function.
6268         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
6269         constructor.
6270         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6271         IFN_COND_* call.
6272         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6273         function.
6274         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6276 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6278         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6279         DECL_FCONTEXT
6280         (hash_tree): Do not hash DECL_FCONTEXT
6281         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6282         Do not stream DECL_FCONTEXT.
6283         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6284         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6286 2018-07-12  Richard Biener  <rguenther@suse.de>
6288         PR debug/86462
6289         * dwarf2out.c (gen_block_die): Only output blocks when they have
6290         at least one !DECL_IGNORED_P variable.
6292 2018-07-12  Richard Biener  <rguenther@suse.de>
6294         PR target/84829
6295         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6296         Remove -mieee-fp handling.
6298 2018-07-12  Richard Biener  <rguenther@suse.de>
6300         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6301         left-over from last patch.
6303 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6305         PR tree-optimization/86492
6306         * gimple-ssa-store-merging.c
6307         (imm_store_chain_info::coalesce_immediate_stores): Call
6308         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6310 2018-07-12  Richard Biener  <rguenther@suse.de>
6312         PR middle-end/86479
6313         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6314         move possibly trapping operations into the conditional.
6316 2018-07-12  Richard Biener  <rguenther@suse.de>
6318         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6319         (vn_lookup_simplify_result): Remove recursion limit applied
6320         here.
6321         (vn_nary_build_or_lookup_1): Adjust.
6322         (try_to_simplify): Likewise.
6323         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6324         here.
6325         (gimple_resimplify2): Likewise.
6326         (gimple_resimplify3): Likewise.
6327         (gimple_resimplify4): Likewise.
6329 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6331         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6332         Use __mmask64 type instead of __mmask8 for __M argument.
6333         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6334         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6335         __U argument.
6336         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6337         __mmask16 for __M argument.
6338         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6339         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6340         to __mmask16 instead of __mmask8.
6341         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6342         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6343         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6344         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6345         instead of __mmask16 for __U argument.
6346         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6347         __mmask16 instead of __mmask8 for __U argument.
6348         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6349         __U argument.
6350         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6351         __mmask16.
6352         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6353         argument.
6354         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6355         __U argument.
6356         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6357         __mmask16.
6358         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6359         of __mmask16.
6360         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6361         __U argument.
6362         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6363         __U argument.
6364         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6365         __U argument.
6366         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6367         __U argument.
6368         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6369         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6370         return type as well as __M argument type and all casts from __mmask8
6371         to __mmask32.
6372         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6373         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6374         return type as well as __M argument type and all casts from __mmask8
6375         to __mmask16.
6376         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6377         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6378         return type as well as __M argument type and all casts from __mmask8
6379         to __mmask32.
6380         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6381         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6382         return type as well as __M argument type and all casts from __mmask8
6383         to __mmask16.
6384         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6385         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6386         __mmask16.
6388 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6390         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6391         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6392         for __U argument.
6394 2018-07-11  Paul Koning  <ni1d@arrl.net>
6396         * doc/md.texi (define_subst): Document how multiple occurrences of
6397         the same argument in the replacement pattern are handled.
6399 2018-07-11  Paul Koning  <ni1d@arrl.net>
6401         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6402         alphabetical order.
6403         (Common Type Attributes): Add "mode" attribute.
6405 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6407         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6408         stream DECL_ORIGINAL_TYPE.
6409         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6410         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6411         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6412         Do not walk original type.
6413         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6414         external decls.
6415         (write_ts_decl_non_common_tree_pointers): Do not stream
6416         DECL_ORIGINAL_TYPE
6417         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6418         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6420 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6422         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6423         thread twice from the same starting edge.
6425 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6427         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6428         * gimple.c (gimple_call_nonnull_result_p): ...here...
6429         (gimple_call_nonnull_arg): ...and here.
6430         * gimple.h (gimple_call_nonnull_result_p): New.
6431         (gimple_call_nonnull_arg): New.
6433 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6435         * config/arm/arm-cpus.in: Move information from fpu field of each
6436         cpu definition to the isa field.
6437         * config/arm/parsecpu.awk (fpu): Delete match rule.
6438         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6440 2018-07-11  Richard Biener  <rguenther@suse.de>
6442         PR debug/86457
6443         * dwarf2out.c (init_sections_and_labels): Use
6444         output_asm_line_debug_info consistently.
6445         (dwarf2out_early_finish): Likewise.
6446         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6447         type units.
6449 2018-07-11  Richard Biener  <rguenther@suse.de>
6451         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6452         Rework father_bb setting in a way to avoid propagating constants
6453         multiple times on a loop body.
6455 2018-07-10  Mark Wielaard  <mark@klomp.org>
6457         PR debug/86459
6458         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6460 2018-07-10  Richard Biener  <rguenther@suse.de>
6462         * hash-map.h (hash_map::iterator::operator*): Return
6463         references to key and value.
6465 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6467         PR c++/86443
6468         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6469         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6470         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6471         (gimplify_omp_for): For composite loops, move outer
6472         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6473         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6474         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6475         TREE_LIST for both the original class iterator and the "last" helper
6476         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6477         loop, remember has_decl_expr from outer composite loops for the
6478         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6480 2018-07-09  Martin Sebor  <msebor@redhat.com>
6482         PR middle-end/77357
6483         PR middle-end/86428
6484         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6485         accessing implicitly initialized array elements.
6486         * expr.c (string_constant): Handle string initializers of
6487         character arrays within aggregates.
6488         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6489         Store element offset.  As a special case, handle zero size.
6490         (fold_nonarray_ctor_reference): Same.
6491         (fold_ctor_reference): Add argument.  Store subobject offset.
6492         * gimple-fold.h (fold_ctor_reference): Add argument.
6494 2018-07-09  Paul Koning  <ni1d@arrl.net>
6496         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6497         (pdp11_insn_cost): New function.
6498         (pdp11_md_asm_adjust): New function.
6499         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6500         (pdp11_rtx_costs): Update to match machine better.
6501         (output_addr_const_pdp11): Correct format mismatch warnings.
6502         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6503         * config/pdp11/pdp11.md: General change to add base_cost and/or
6504         length attributes for use by new pdp11_insn_cost function.
6505         (MIN_BRANCH): Correct definition.
6506         (MIN_SOB): Ditto.
6507         (doloop_end): Use standard pattern name for looping pattern.
6508         (doloop_end_nocc): New.
6509         (movsf): Add another constraint alternative.
6510         (zero_extendqihi2): Add constraint alternatives for not in place
6511         extend.
6512         (zero_extendhisi2): Remove.
6513         (shift patterns): Add CC handling variants.
6514         (bswaphi2): New.
6515         (bswapsi2): New.
6516         (rothi3): New.
6517         (define_peephole2): New peephole to recognize mov that sets CC for
6518         subsequent test.
6520 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6522         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6523         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6524         wi::add.
6526 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6528         PR c/86420
6529         * real.c (real_nextafter): Return true if result is denormal.
6531 2018-07-09  Martin Liska  <mliska@suse.cz>
6533         * common.opt: Add back wrongly removed attribute.
6535 2018-07-09  Richard Biener  <rguenther@suse.de>
6537         PR debug/86413
6538         * dwarf2out.c (gen_block_die): For an early generated DIE
6539         always output high/low PC attributes.
6541 2018-07-09  Tom de Vries  <tdevries@suse.de>
6543         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6544         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6545         onto VAR_DECL with abstract origin.
6547 2018-07-07  Jim Wilson  <jimw@sifive.com>
6549         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6551 2018-07-07  Tom de Vries  <tdevries@suse.de>
6553         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6555 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6557         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6558         overflow_type.
6559         (combine_bound): Use wide-int overflow calculation instead of
6560         rolling our own.
6561         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6562         overflow_type.
6563         * fold-const.c (int_const_binop_2): Same.
6564         (extract_muldiv_1): Same.
6565         (fold_div_compare): Same.
6566         (fold_abs_const): Same.
6567         * match.pd: Same.
6568         * poly-int.h (add): Same.
6569         (sub): Same.
6570         (neg): Same.
6571         (mul): Same.
6572         * predict.c (predict_iv_comparison): Same.
6573         * profile-count.c (slow_safe_scale_64bit): Same.
6574         * simplify-rtx.c (simplify_const_binary_operation): Same.
6575         * tree-chrec.c (tree_fold_binomial): Same.
6576         * tree-data-ref.c (split_constant_offset_1): Same.
6577         * tree-if-conv.c (idx_within_array_bound): Same.
6578         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6579         * tree-ssa-phiopt.c (minmax_replacement): Same.
6580         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6581         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6582         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6583         * wide-int.cc (wi::add_large): Same.
6584         (wi::mul_internal): Same.
6585         (wi::sub_large): Same.
6586         (wi::divmod_internal): Same.
6587         * wide-int.h: Change overflow type to overflow_type for neg, add,
6588         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6589         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6590         mul_internal, divmod_internal.
6591         (overflow_type): New enum.
6592         (accumulate_overflow): New.
6594 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6596         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6597         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6599 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6601         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6602         argument is checked for zero before entering loop, avoid checking again.
6604 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6606         * gimplify.h (generic_expr_could_trap_p): Set as global function.
6607         * gimplify.h (generic_expr_could_trap_p): Likwise.
6608         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6610 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
6612         PR tree-optimization/86401
6613         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6614         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6615         (fold_bit_and_mask): ... here.  New helper function for match.pd.
6616         * fold-const.h (fold_bit_and_mask): Declare.
6617         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6619 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
6621         PR target/86324
6622         * target.def (translate_mode_attribute): New hook.
6623         * targhooks.h (default_translate_mode_attribute): Declare.
6624         * targhooks.c (default_translate_mode_attribute): New function.
6625         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6626         * doc/tm.texi: Regenerate.
6627         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6628         (rs6000_translate_mode_attribute): New function.
6630 2018-07-06  Paul Koning  <ni1d@arrl.net>
6632         * doc/md.texi (define_split): Document DONE and FAIL.
6633         (define_peephole2): Ditto.
6635 2018-07-05  Jeff Law  <law@redhat.com>
6637         PR tree-optimization/86010
6638         * tree-ssa-dse.c (compute_trims): More aggressively trim at
6639         both the head and tail of mem* and str* calls.
6641 2018-07-05  Jim Wilson  <jimw@sifive.com>
6643         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6645 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
6647         * config/aarch64/aarch64-simd.md: correct flags text for
6648         MIN_EXPR replacement.
6650 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6652         * configure: Regenerated.
6654 2018-07-05  Carl Love  <cel@us.ibm.com>
6656         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6657         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6658         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6659         VSX_BUILTIN_DOUBLEL_V4SF.
6661 2018-07-05  Martin Sebor  <msebor@redhat.com>
6663         PR c++/86400
6664         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6665         than its domain to compute its the upper bound of a char array.
6667 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6669         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6670         * doc/cpp.texi: Update comment.
6671         * doc/tm.texi: Rebuilt.
6672         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6673         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6674         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6675         headers affected by extern "C".
6676         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6677         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6678         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6679         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6680         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6681         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6682         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6683         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6684         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6685         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6686         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6687         config/sparc/sp64-elf.h, config/spu/spu.h,
6688         config/stormy16/stormy16.h, config/v850/v850.h,
6689         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6690         define NO_IMPLICIT_EXTERN_C.
6691         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6693 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6695         PR target/84711
6696         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6697         instead of GET_MODE_SIZE when comparing Units.
6699 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6701         PR target/84711
6702         * rtlanal.c (set_noop_p): Constrain on mode change,
6703         include hard-reg-set.h
6705 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6707         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6709 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6711         Revert
6712         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6714         PR sanitizer/84250
6715         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6716         libasan.
6717         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6719 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6721         PR sanitizer/84250
6722         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6723         libasan.
6724         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6726 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6728         PR middle-end/86380
6729         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6731 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6733         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6734         neg_*_op* variables.
6736 2018-07-04  Martin Liska  <mliska@suse.cz>
6738         * tree-switch-conversion.c: Define
6739         max_ratio_for_speed and max_ratio_for_size constants.
6741 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6742             Martin Liska  <mliska@suse.cz>
6744         PR middle-end/66240
6745         PR target/45996
6746         PR c/84100
6747         * common.opt: Rename align options with 'str_' prefix.
6748         * common/config/i386/i386-common.c (set_malign_value): New
6749         function.
6750         (ix86_handle_option): Use it to set -falign-* options/
6751         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6752         type from int to string.
6753         * config/aarch64/aarch64.c: Update default values from int
6754         to string.
6755         * config/alpha/alpha.c (alpha_override_options_after_change):
6756         Likewise.
6757         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6758         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6759         max skip conditionally.
6760         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6761         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6762         max skip conditionally.
6763         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6764         max skip conditionally.
6765         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6766         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6767         max skip conditionally.
6768         * config/i386/i386.c (struct ptt): Change type from int to
6769         string.
6770         (ix86_default_align): Set default values.
6771         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6772         max skip conditionally.
6773         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6774         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6775         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6776         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6777         max skip conditionally.
6778         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6779         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6780         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6781         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6782         max skip conditionally.
6783         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6784         * config/ia64/ia64.c (ia64_option_override): Set default values
6785         for alignment options.
6786         * config/m68k/m68k.c: Handle new str_align_* options.
6787         * config/mips/mips.c (mips_set_compression_mode): Change
6788         type of constants.
6789         (mips_option_override): Set default values for options.
6790         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6791         Likewise.
6792         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6793         Likewise.
6794         * config/rx/rx.c (rx_option_override): Likewise.
6795         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6796         (LABEL_ALIGN): Use align_labels_log.
6797         (LOOP_ALIGN): Use align_loops_align.
6798         * config/s390/s390.c (s390_asm_output_function_label): Use new
6799         macros.
6800         * config/sh/sh.c (sh_override_options_after_change):
6801         Change type of constants.
6802         * config/spu/spu.c (spu_sched_init): Likewise.
6803         * config/sparc/sparc.c (sparc_option_override): Set default
6804         values for options.
6805         * config/visium/visium.c (visium_option_override): Likewise.
6806         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6807         emit p2align format with last argument if it's not needed.
6808         * doc/invoke.texi: Document extended format of -falign-*.
6809         * final.c: Use align_labels alignment.
6810         * flags.h (struct target_flag_state): Change type to use
6811         align_flags.
6812         (struct align_flags_tuple): New.
6813         (struct align_flags): Likewise.
6814         (align_loops_log): Redefine macro to use new types.
6815         (align_loops_max_skip): Redefine macro to use new types.
6816         (align_jumps_log): Redefine macro to use new types.
6817         (align_jumps_max_skip): Redefine macro to use new types.
6818         (align_labels_log): Redefine macro to use new types.
6819         (align_labels_max_skip): Redefine macro to use new types.
6820         (align_functions_log): Redefine macro to use new types.
6821         (align_loops): Redefine macro to use new types.
6822         (align_jumps): Redefine macro to use new types.
6823         (align_labels): Redefine macro to use new types.
6824         (align_functions): Redefine macro to use new types.
6825         (align_functions_max_skip): Redefine macro to use new types.
6826         (align_loops_value): New macro.
6827         (align_jumps_value): New macro.
6828         (align_labels_value): New macro.
6829         (align_functions_value): New macro.
6830         * function.c (invoke_set_current_function_hook): Propagate
6831         alignment values from flags to global variables default in
6832         topleev.h.
6833         * ipa-icf.c (sem_function::equals_wpa): Use
6834         cl_optimization_option_eq instead of memcmp.
6835         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6836         of string types.
6837         (cl_optimization_stream_in): Likewise.
6838         * optc-save-gen.awk: Support strings in cl_optimization.
6839         * opth-gen.awk: Likewise.
6840         * opts.c (finish_options): Remove error checking of invalid
6841         value ranges.
6842         (MAX_CODE_ALIGN): Remove.
6843         (MAX_CODE_ALIGN_VALUE): Likewise.
6844         (parse_and_check_align_values): New function.
6845         (check_alignment_argument): Likewise.
6846         (common_handle_option): Use check_alignment_argument.
6847         * opts.h (parse_and_check_align_values): Declare.
6848         * toplev.c (init_alignments): Remove.
6849         (read_log_maxskip): New.
6850         (parse_N_M): Likewise.
6851         (parse_alignment_opts): Likewise.
6852         (backend_init_target): Remove usage of init_alignments.
6853         * toplev.h (parse_alignment_opts): Declare.
6854         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6855         argument.
6856         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6857         * tree.c (cl_option_hasher::equal): New.
6858         * varasm.c: Use new global macros.
6860 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6862         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6863         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6864         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6865         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6866         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6867         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6868         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6869         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6870         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6871         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6872         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6873         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6874         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6876 2018-07-04  Martin Liska  <mliska@suse.cz>
6877             Jonathan Wakely  <jwakely@redhat.com>
6879         * coverage.c: Use correct type.
6880         * doc/invoke.texi: Language correction.
6882 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6884         PR target/85620
6885         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6886         ENDBRANCH for non-tail call which may return via indirect branch.
6887         * doc/extend.texi: Document indirect_return attribute.
6889 2018-07-03  Martin Sebor  <msebor@redhat.com>
6891         PR tree-optimization/86274
6892         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6893         precondition.
6894         (format_floating): Correct handling of infinities and NaNs.
6896 2018-07-03  Martin Sebor  <msebor@redhat.com>
6898         * print-tree.c (print_real_cst): New function.
6899         (print_node_brief): Call it.
6900         (print_node): Ditto.
6902 2018-07-03  Jeff Law  <law@redhat.com>
6904         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6905         into a single pattern.
6907         * config/h8300/h8300.md (ors code_iterator): New.
6908         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6909         a single pattern and single splitter.
6910         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6911         (iorqi3_1, xorqi3_1): Likewise.
6912         (iorqi3, xorqi3 expanders): Similarly.
6914         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6915         (movmd_internal) into a single pattern using the P mode iterator.
6916         (movmd splitters): Similarly.
6917         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6918         (movsd splitters): Similarly.
6920         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6921         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6922         right table based on the size of the operand.
6923         * config/h8300/h8300.md (length_table): Corresponding changes. All
6924         references to "addb", "addw" and "addl" changed to "add".
6925         (btst patterns): Merge two variants into a single pattern.
6926         (tstqi, tsthi): Likewise.
6927         (addhi3_incdec, addsi3_incdec): Likewise.
6928         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6929         (mulhi3, mulsi3): Likewise.
6930         (udivhi3, udivsi3): Likewise.
6931         (divhi3, divsi3): Likewise.
6932         (andorqi3, andorhi3, andorsi3): Likewise.
6934 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6936         PR target/85694
6937         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6938         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6940 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6942         PR tree-optimization/85694
6943         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6944         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6945         UNSPEC_URHADD.
6946         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6947         (<u>avg<mode>3_ceil): New patterns.
6949 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6951         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6952         scan-tree-dump directive.
6953         * gcc.dg/vect/slp-perm-2.c: Likewise.
6954         * gcc.dg/vect/slp-perm-3.c: Likewise.
6955         * gcc.dg/vect/slp-perm-5.c: Likewise.
6956         * gcc.dg/vect/slp-perm-6.c: Likewise.
6957         * gcc.dg/vect/slp-perm-7.c: Likewise.
6958         * gcc.dg/vect/slp-perm-8.c: Likewise.
6960 2018-07-03  Marek Polacek  <polacek@redhat.com>
6962         PR middle-end/86202
6963         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6965 2018-07-03  Richard Biener  <rguenther@suse.de>
6967         PR ipa/86389
6968         * tree-ssa-structalias.c (find_func_clobbers): Properly
6969         handle indirect calls.
6971 2018-07-03  Jeff Law  <law@redhat.com>
6973         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6974         (shifts): New code iterator.
6975         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6976         expander.  Fix HImode handling on H8/SX.
6977         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6978         (subqi3, subhi3, subsi3 expanders): Likewise.
6979         (andqi3, andhi3, andsi3 expanders): Likewise.
6980         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6981         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6982         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6983         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6984         (zero_extendqihi2, zero_extendqisi2): Likewise.
6985         (extendqihi2, extendqisi2): Likewise.
6986         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6987         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6988         (rotlqi3_1, rotlhi3_1): Likewise.
6989         (logicalhi3_sn, logicalsi3_sn): Likewise.
6990         (logicalhi3, logicalsi3): Likewise.
6992 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6994         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6995         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6996         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6997         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6998         type to append_pattern_def_seq instead of creating a stmt_vec_info
6999         directly.
7000         (build_mask_conversion): Likewise.  Remove vinfo argument.
7001         (vect_add_conversion_to_patterm): Likewise, renaming to...
7002         (vect_add_conversion_to_pattern): ...this.
7003         (vect_recog_mask_conversion_pattern): Update call to
7004         build_mask_conversion.  Pass the vector type to
7005         append_pattern_def_seq here too.
7006         (vect_recog_gather_scatter_pattern): Update call to
7007         vect_add_conversion_to_pattern.
7009 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7011         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7012         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7013         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7014         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7015         STMT_VINFO_PATTERN_DEF_SEQ to null here.
7016         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7017         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7018         append_pattern_def_seq instead of new_pattern_def_seq.
7019         (vect_recog_divmod_pattern): Do both of the above.
7020         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7021         is null.
7023 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7025         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7026         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7027         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7028         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7029         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7030         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7031         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7032         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7033         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7034         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7035         parameter with a single stmt_vec_info.
7036         (vect_recog_func_ptr): Likewise.
7037         (vect_recog_gather_scatter_pattern): Likewise, folding in...
7038         (vect_try_gather_scatter_pattern): ...this.
7039         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7040         the stmt_vec_info of the statement to be matched.  Don't clear
7041         STMT_VINFO_RELATED_STMT.
7042         (vect_pattern_recog): Update call accordingly.
7044 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7046         PR tree-optimization/85694
7047         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7048         (uavgM3_ceil): Document new optabs.
7049         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7050         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7051         functions.
7052         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7053         (savg_ceil_optab): New optabs.
7054         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7055         (vect_vect_recog_func_ptrs): Add it.
7056         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7057         constant directly from the associated lhs.
7059 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7061         * tree-vect-patterns.c (vect_split_statement): New function.
7062         (vect_convert_input): Use it to try to split an existing cast.
7064 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7066         * poly-int.h (print_hex): New function.
7067         * dumpfile.h (dump_dec, dump_hex): Declare.
7068         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7069         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7070         min_input_precision, operation_precision and operation_sign.
7071         * tree-vect-patterns.c (vect_get_range_info): New function.
7072         (vect_same_loop_or_bb_p, vect_single_imm_use)
7073         (vect_operation_fits_smaller_type): Delete.
7074         (vect_look_through_possible_promotion): Add an optional
7075         single_use_p parameter.
7076         (vect_recog_over_widening_pattern): Rewrite to use new
7077         stmt_vec_info infomration.  Handle one operation at a time.
7078         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7079         (vect_truncatable_operation_p, vect_set_operation_type)
7080         (vect_set_min_input_precision): New functions.
7081         (vect_determine_min_output_precision_1): Likewise.
7082         (vect_determine_min_output_precision): Likewise.
7083         (vect_determine_precisions_from_range): Likewise.
7084         (vect_determine_precisions_from_users): Likewise.
7085         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7086         (vect_vect_recog_func_ptrs): Put over_widening first.
7087         Add cast_forwprop.
7088         (vect_pattern_recog): Call vect_determine_precisions.
7090 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
7092         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7093         statements that have been replaced by further pattern statements.
7094         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7096 2018-07-03  Richard Biener  <rguenther@suse.de>
7098         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7099         always set *dt.  Dump vectype in vectype overload.
7100         * dumpfile.h (dump_gimple_expr): New function.
7101         (dump_gimple_expr_loc): Likewise.
7102         * dumpfile.c (dump_gimple_expr): New function.
7103         (dump_gimple_expr_loc): Likewise.
7105 2018-07-02  Jeff Law  <law@redhat.com>
7107         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7108         the H8/300, H8/300H and H8/S variants into a single pattern.
7109         (movhi_h8300, movqi_h8300hs): Similarly.
7110         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7111         (QHI mode iterator): New.
7113         * config/h8300/h8300.md: Remove trailing whitespace.
7115 2018-07-02  Jim Wilson  <jimw@sifive.com>
7117         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7118         instead of emit_insn for interrupt returns.
7119         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7120         (riscv_sret, riscv_uret): Likewise.
7122 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7124         * pretty-print.c (selftest::test_pp_format): Move save and restore
7125         of quotes to class auto_fix_quotes, and add an instance.
7126         * selftest.c: Include "intl.h".
7127         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7128         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7129         * selftest.h (selftest::auto_fix_quotes): New class.
7131 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
7133         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7134         (aarch64_sve_prepare_conditional_op): Remove.
7135         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7136         Allow aarch64_simd_reg_or_zero as select operand; remove
7137         the aarch64_sve_prepare_conditional_op call.
7138         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7139         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7140         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7141         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7142         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7143         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7144         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7145         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7146         and a splitters to match all of the *_any patterns.
7147         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7149         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7150         (SVE_COND_FP_BINARY_REV): Remove.
7151         (sve_int_op_rev, sve_fp_op_rev): New.
7152         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7153         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7154         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7155         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7156         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7157         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7158         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7159         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7160         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7162         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7163         Remove match_dup 1 from the inner unspec.
7164         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7166         * config/aarch64/aarch64.md (movprfx): New attr.
7167         (length): Default movprfx to 8.
7168         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7169         (*madd<SVE_I>, *msub<SVE_I): Likewise.
7170         (*<su>mul<SVE_I>3_highpart): Likewise.
7171         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7172         (*v<ASHIFT><SVE_I>3): Likewise.
7173         (*<su><MAXMIN><SVE_I>3): Likewise.
7174         (*<su><MAXMIN><SVE_F>3): Likewise.
7175         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7176         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7177         (*div<SVE_F>4): Likewise.
7179 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
7181         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7182         in dump string.
7184 2018-07-02  Richard Biener  <rguenther@suse.de>
7186         PR tree-optimization/86363
7187         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7188         memset argument refers to a non-variable address.
7190 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7192         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7193         {PLUS,MINUS}_EXPR code to...
7194         (adjust_symbolic_bound): ...here,
7195         (combine_bound): ...here,
7196         (set_value_range_with_overflow): ...and here.
7198 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
7200         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7201         code...
7202         (extract_range_from_abs_expr): ...here.
7204 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7206         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7207         -fno-omit-frame-pointer when not optimizing.
7209 2018-07-02  Martin Liska  <mliska@suse.cz>
7211         PR ipa/86279
7212         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7213         (propagate_nothrow): Likewise.
7215 2018-07-02  Martin Liska  <mliska@suse.cz>
7217         PR ipa/86323
7218         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7220 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
7222         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7223         function in r262149, changing "loc" param from source_location to
7224         const dump_location_t &.
7225         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7226         declaration, as above.
7228 2018-07-01  Paul Koning  <ni1d@arrl.net>
7230         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7231         -munit-asm, -mgnu-asm, -mdec-asm.
7232         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7233         (pdp11_output_labelref): New.
7234         (pdp11_output_def): New.
7235         (pdp11_output_addr_vec_elt): New.
7236         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
7237         %# and %@ format codes.
7238         (pdp11_option_override): New.
7239         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7240         (pdp11_output_ident): New.
7241         (pdp11_asm_named_section): New.
7242         (pdp11_asm_init_sections): New.
7243         (pdp11_file_start): New.
7244         (pdp11_file_end): New.
7245         (output_ascii): Use .ascii/.asciz for -mdec-asm.
7246         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
7247         %o, like %c but octal.
7248         (pdp11_option_override): New.
7249         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7250         -mdec-asm.
7251         (DATA_SECTION_ASM_OP): Ditto.
7252         (READONLY_DATA_SECTION_ASM_OP): New.
7253         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7254         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7255         (ASM_OUTPUT_LABELREF): Ditto.
7256         (ASM_OUTPUT_DEF): Ditto.
7257         (ASM_OUTPUT_EXTERNAL): New.
7258         (ASM_OUTPUT_SOURCE_FILENAME): New.
7259         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7260         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7261         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
7262         %# and %@ format codes.
7263         * config/pdp11/pdp11.opt (mgnu-asm): New.
7264         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7265         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7266         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7268 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
7270         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7271         dereferencing path[] beyond its length.
7272         (debug_path): New.
7273         (debug_all_paths): New.
7274         (rewire_first_differing_edge): New.
7275         (adjust_paths_after_duplication): New.
7276         (duplicate_thread_path): Call adjust_paths_after_duplication.
7277         Add new argument.
7278         (thread_through_all_blocks): Add new argument to
7279         duplicate_thread_path.
7281 2018-06-30  Jim Wilson  <jimw@sifive.com>
7283         * config/riscv/predicates.md (p2m1_shift_operand): New.
7284         (high_mask_shift_operand): New.
7285         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7286         pattern using p2m1_shift_operand.
7287         (lshsi3_zero_extend_3+2): New combiner pattern using
7288         high_mask_shift_operand.
7290 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7292         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7293         split out from...
7294         (vect_recog_rotate_pattern): ...here.
7295         (vect_convert_input): Try to insert casts of invariants in the
7296         preheader.
7297         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7298         preheader to be empty.
7300 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7302         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7303         vector type.  If given, install it in the new statement's
7304         STMT_VINFO_VECTYPE.
7305         (vect_element_precision): New function.
7306         (vect_unpromoted_value): New struct.
7307         (vect_unpromoted_value::vect_unpromoted_value): New function.
7308         (vect_unpromoted_value::set_op): Likewise.
7309         (vect_look_through_possible_promotion): Likewise.
7310         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7311         (vect_widened_op_tree, vect_convert_input): Likewise.
7312         (vect_convert_inputs, vect_convert_output): Likewise.
7313         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7314         to handle the optional cast of the multiplication result and
7315         vect_widened_op_tree to detect the widened multiplication itself.
7316         Do not require the input and output of promotion casts to have
7317         the same sign, but base the signedness of the operation on the
7318         input rather than the result.  If the pattern includes two
7319         promotions, check that those promotions have the same sign.
7320         Do not restrict the MULT_EXPR handling to a double-width result;
7321         handle quadruple-width results and wider.  Use vect_convert_inputs
7322         to convert the inputs to the common type.
7323         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7324         to handle the optional cast of the ABS result.  Also allow a sign
7325         change or a sign extension between the ABS and MINUS.
7326         Use vect_widened_op_tree to detect the widened subtraction and use
7327         vect_convert_inputs to convert the inputs to the common type.
7328         (vect_handle_widen_op_by_const): Delete.
7329         (vect_recog_widen_op_pattern): New function.
7330         (vect_recog_widen_mult_pattern): Use it.
7331         (vect_recog_widen_shift_pattern): Likewise.
7332         (vect_recog_widen_sum_pattern): Use
7333         vect_look_through_possible_promotion to handle the promoted
7334         PLUS_EXPR operand.
7336 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7338         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7339         the containing gimple_seq *.
7340         * gimple-iterator.h (gsi_for_stmt): Declare it.
7341         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7342         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7343         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7344         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7345         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7346         checks.
7347         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7348         split out from...
7349         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7350         statement being replaced is part of an existing pattern
7351         definition sequence, inserting the new pattern statements before
7352         the original one.
7353         (vect_pattern_recog_1): Don't return a bool.  If the statement
7354         is already part of a pattern, instead apply pattern matching
7355         to the pattern definition statements.  Don't clear the
7356         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7357         (vect_pattern_recog): Don't break after the first match;
7358         continue processing the pattern definition statements instead.
7359         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7361 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7363         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7364         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7365         (vect_recog_widen_sum_pattern): Use it.
7367 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7369         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7370         phi is not a pattern statement and has not been replaced by
7371         a pattern statement.
7372         * tree-vect-patterns.c (type_conversion_p): Don't check
7373         STMT_VINFO_IN_PATTERN_P.
7374         (vect_recog_vector_vector_shift_pattern): Likewise.
7375         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7376         the pattern statement rather than the original statement; check
7377         directly for a WIDEN_MULT_EXPR here.
7378         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7379         vect_is_simple_use to return the pattern statement rather
7380         than the original statement; use is_pattern_stmt_p to check
7381         for such a pattern statement.
7382         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7383         to return the pattern statement rather than the original statement;
7384         don't do the same transformation here.
7385         (vect_is_simple_use): If the defining statement has been replaced
7386         by a pattern statement, return the pattern statement instead.
7387         Remove the corresponding (local) transformation from the vectype
7388         overload.
7390 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7392         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7393         end and default to null.
7394         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7395         (vectorizable_reduction): Update calls accordingly, dropping the
7396         gimple ** argument if the passed-back statement isn't needed.
7397         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7398         (vect_recog_rotate_pattern): Likewise.
7399         (vect_recog_mask_conversion_pattern): Likewise.
7400         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7401         (vect_mask_constant_operand_p): Likewise.
7402         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7403         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7404         (get_group_load_store_type, get_load_store_type): Likewise.
7405         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7406         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7407         (vectorizable_conversion, vectorizable_assignment): Likewise.
7408         (vectorizable_shift, vectorizable_operation): Likewise.
7409         (vectorizable_store, vect_is_simple_cond): Likewise.
7410         (vectorizable_condition, vectorizable_comparison): Likewise.
7411         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7412         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7413         and move it to the end.  Cope with null def_stmt_outs.
7415 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7417         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7419 2018-06-29  Jeff Law  <law@redhat.com>
7421         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7422         displacements for TARGET_V850E2V3 and newer.
7423         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7424         * config/v850/v850.md (sign23byte_load): Remove.
7425         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7426         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7428 2018-06-29  Martin Liska  <mliska@suse.cz>
7430         PR lto/85759
7431         * coverage.c (coverage_init): Mangle full path name.
7432         * doc/invoke.texi: Document the change.
7433         * gcov-io.c (mangle_path): New.
7434         * gcov-io.h (mangle_path): Likewise.
7435         * gcov.c (mangle_name): Use mangle_path for path mangling.
7437 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7439         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7440         if starting source register is not even.
7442 2018-06-29  Martin Liska  <mliska@suse.cz>
7444         PR tree-optimization/86263
7445         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7446         Make edge redirection.
7448 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7450         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7451         (dump_scope_depth): New variable.
7452         (get_dump_scope_depth): New function.
7453         (dump_begin_scope): New function.
7454         (dump_end_scope): New function.
7455         * dumpfile.h (get_dump_scope_depth): New declaration.
7456         (dump_begin_scope): New declaration.
7457         (dump_end_scope): New declaration.
7458         (class auto_dump_scope): New class.
7459         (AUTO_DUMP_SCOPE): New macro.
7460         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7461         AUTO_DUMP_SCOPE.
7463 2018-06-29  Richard Biener  <rguenther@suse.de>
7465         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7466         compute_all_dependences succeeds.
7467         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7468         exceed --param loop-max-datarefs-for-datadeps.
7470 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7472         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7474 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7476         PR target/86348
7477         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7478         alternative 0 in preferred_for_speed attribute.
7480 2018-06-28  Paul Koning  <ni1d@arrl.net>
7482         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7483         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7484         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7485         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7486         for shift insn patterns.
7488 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7490         * cgraph.c (cgraph_node::get_body): Replace assignments to
7491         "dump_file" with calls to set_dump_file.
7492         * dumpfile.c (alt_dump_file): Make static, and group with...
7493         (alt_flags): ...this definition.
7494         (dumps_are_enabled): New variable.
7495         (refresh_dumps_are_enabled): New function.
7496         (set_dump_file): New function.
7497         (set_alt_dump_file): New function.
7498         (gcc::dump_manager::dump_start): Replace assignments to
7499         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7500         set_alt_dump_file.
7501         (gcc::dump_manager::dump_finish): Likewise.
7502         * dumpfile.h (alt_dump_file): Delete decl.
7503         (dumps_are_enabled): New variable decl.
7504         (set_dump_file): New function decl.
7505         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7506         global.
7507         * tree-nested.c (lower_nested_functions): Replace assignments to
7508         "dump_file" with calls to set_dump_file.
7510 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7512         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7513         goto_locus of each outgoing edge of each basic block.
7515 2018-06-28  Richard Biener  <rguenther@suse.de>
7517         * dwarf2out.c (decl_scope_table): Remove.
7518         (push_decl_scope): Likewise.
7519         (pop_decl_scope): Likewise.
7520         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7521         (gen_struct_or_union_type_die): Likewise.
7522         (gen_tagged_type_die): Likewise.
7523         (dwarf2out_init): Do not initialize decl_scope_table.
7524         (dwarf2out_c_finalize): Do not free it.
7526 2018-06-28  Richard Biener  <rguenther@suse.de>
7528         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7529         deciding whether to not re-use a DIE.
7531 2018-06-28  Richard Biener  <rguenther@suse.de>
7533         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7534         DW_AT_abstract_origin attribute.
7536 2018-06-28  Martin Liska  <mliska@suse.cz>
7538         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7539         Use newly introduced constants.
7540         * tree-switch-conversion.h (struct jump_table_cluster):
7541         Define max_ratio_for_size and max_ratio_for_speed.
7543 2018-06-28  Martin Liska  <mliska@suse.cz>
7545         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7546         Add new checking assert to catch invalid state.
7547         (jump_table_cluster::can_be_handled): Handle single case
7548         clusters.
7549         (jump_table_cluster::is_beneficial): Bail out for such case.
7550         (bit_test_cluster::find_bit_tests):
7551         Add new checking assert to catch invalid state.
7552         (bit_test_cluster::can_be_handled): Handle single case
7553         clusters.
7554         (bit_test_cluster::is_beneficial): Bail out for such case.
7555         (switch_decision_tree::analyze_switch_statement):
7556         Fix comment.
7558 2018-06-28  Martin Liska  <mliska@suse.cz>
7560         * common.opt: Introduce -completion option.
7561         * gcc.c (driver_handle_option): Handle it.
7562         (driver::main): Print completions if completion
7563         is set.
7564         * opt-suggestions.c (option_proposer::get_completions):
7565         New function.
7566         (option_proposer::suggest_completion): Likewise.
7567         (option_proposer::find_param_completions): Likewise.
7568         (verify_autocompletions): Likewise.
7569         (test_completion_valid_options): Likewise.
7570         (test_completion_valid_params): Likewise.
7571         (in_completion_p): Likewise.
7572         (empty_completion_p): Likewise.
7573         (test_completion_partial_match): Likewise.
7574         (test_completion_garbage): Likewise.
7575         (opt_proposer_c_tests): Likewise.
7576         * opt-suggestions.h: Declare new functions.
7577         * opts.c (common_handle_option): Handle OPT__completion_.
7578         * selftest-run-tests.c (selftest::run_tests): Add
7579         opt_proposer_c_tests.
7580         * selftest.c (assert_str_startswith): New.
7581         * selftest.h (assert_str_startswith): Likewise.
7582         (opt_proposer_c_tests): New.
7583         (ASSERT_STR_STARTSWITH): Likewise.
7585 2018-06-28  Martin Liska  <mliska@suse.cz>
7587         * Makefile.in: Add opt-suggestions.o.
7588         * gcc-main.c: Include opt-suggestions.h.
7589         * gcc.c (driver::driver): Likewise.
7590         (driver::~driver): Remove m_option_suggestions.
7591         (driver::build_option_suggestions): Moved to option_proposer.
7592         (driver::suggest_option): Likewise.
7593         (driver::handle_unrecognized_options): Use option_proposer.
7594         * gcc.h (class driver): Add new memver m_option_proposer.
7595         * opt-suggestions.c: New file.
7596         * opt-suggestions.h: New file.
7598 2018-06-28  Martin Liska  <mliska@suse.cz>
7600         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7601         (auto_string_vec::~auto_string_vec): Likewise.
7603 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7605         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7606         prevent_decl_creation_for_types fields up and add reset_location field.
7607         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7608         statement if id->reset_location is true.
7609         (copy_edges_for_bb): Do not set goto_locus on the new edges if
7610         id->reset_location is true.
7611         (copy_phis_for_bb): Force input_location on the arguments if
7612         id->reset_location is true.
7613         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7614         is set on the function to be inlined.
7616 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
7618         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7620 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
7622         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7623         registers for Pmode.
7624         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7625         hard registers for the clobbered pseudo.
7627 2018-06-27  Paul Koning  <ni1d@arrl.net>
7629         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7630         mutually exclusive options.
7631         * config/pdp11/constraints.md (h): New constraint.
7632         (O): Update definition to match shift code generation.
7633         (D): New constraint.
7634         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7635         (CCFP): Remove.
7636         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7637         function.
7638         (output_jump): Change arguments.
7639         (pdp11_fixed_cc_regs): New function.
7640         (pdp11_cc_mode): Ditto.
7641         (pdp11_expand_shift): Ditto.
7642         (pdp11_assemble_shift): Ditto.
7643         (pdp11_small_shift): Ditto.
7644         (pdp11_branch_cost): Remove.
7645         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7646         from output.
7647         (pdp11_register_move_cost): Update for CC registers.
7648         (pdp11_rtx_costs): Add case for LSHIFTRT.
7649         (pdp11_output_jump): Add CCNZ mode conditional branches.
7650         (notice_update_cc_on_set): Remove.
7651         (pdp11_cc_mode): New function.
7652         (simple_memory_operand): Correct pre/post decrement case.
7653         (no_side_effect_operand): New function.
7654         (pdp11_regno_reg_class): Add CC_REGS class.
7655         (pdp11_fixed_cc_regs): New function.
7656         (pdp11_small_shift): New function.
7657         (pdp11_expand_shift): New function to expand shift insns.
7658         (pdp11_assemble_shift): New function to output shifts.
7659         (pdp11_branch_cost): Remove.
7660         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7661         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7662         (WCHAR_TYPE): Ditto.
7663         (PTRDIFF_TYPE): Ditto.
7664         (ADJUST_INSN_LENGTH): New macro.
7665         (FIXED_REGISTERS): Add CC registers.
7666         (CALL_USED_REGISTERS): Ditto.
7667         (reg_class): Ditto.
7668         (REG_CLASS_NAMES): Ditto.
7669         (REG_CLASS_CONTENTS): Ditto.
7670         (SELECT_CC_MODE): Use new function.
7671         (TARGET_FLAGS_REGNUM): New macro.
7672         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7673         (cc0_reg_rtx): Remove.
7674         (CC_STATUS_MDEP): Remove.
7675         (CC_STATUS_MDEFP_INIT): Remove.
7676         (CC_IN_FPU): Remove.
7677         (NOTICE_UPDATE_CC): Remove.
7678         (REGISTER_NAMES): Add CC registers.
7679         (BRANCH_COST): Change to constant 1.
7680         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7681         handling.
7682         * config/pdp11/pdp11.opt (mbcopy): Remove.
7683         (mbcopy-builtin): Remove.
7684         (mbranch-cheap): Remove.
7685         (mbranch-expensive): Remove.
7686         * config/pdp11/predicates.md (expand_shift_operand): Update to
7687         match shift code generation.
7688         (ccnz_operator): New predicate.
7689         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7690         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7691         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7692         exclusive options.
7693         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7694         description of O constraint.
7696 2018-06-27  Jeff Law  <law@redhat.com>
7697             Austin Law  <austinklaw@gmail.com>
7699         * config/v850/v850.md (addsi3_set_flags): New pattern.
7700         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7701         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7702         (zero_extendhisi2_v850_set_flags): Likewise.
7703         (zero_extendqisi2_v850_set_flags): Likewise.
7704         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7705         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7706         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7708         * config/v850/v850-protos.h (notice_update_cc): Remove.
7709         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7710         (v850_print_operand): Handle 'D' and "d".
7711         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7712         Add handling of arithmetic/logical operations compared against zero.
7713         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7714         Do not look at v850_compare_op, instead get mode from last argument.
7715         (v850_gen_compare): Remove
7716         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7717         after reload for prologue insns.
7718         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7719         patterns.
7720         (construct_save_jarl): Likewise.
7721         (TARGET_FLAGS_REGNUM): Define.
7722         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7723         (NOTICE_UPDATE_CC): Remove.
7724         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7725         than cc0.  Conditionalize on reload_completed.
7726         (cmpsi_insn, setfcc_insn): Likewise.
7727         (tst1 splitter): Turn into define_and_split which sets the flags
7728         after reload.
7729         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7730         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7731         (cstoresf4, cstoredf4): Clobber the flags.
7732         (cmpsi, cmpsf, cmpdf): Remove expanders.
7733         (setf_insn): Remove pattern.
7734         (addsi3): Turn into define_and_split which clobbers the flags after
7735         reload and a suitable pattern (addsi3_clobber_flags) for use after
7736         reload.
7737         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7738         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7739         (ashrsi3, ashrsi3_v850e2): Likewise.
7740         (bins): Clobber the flags.
7741         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7742         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7743         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7744         (call_value_internal_short, call_value_internal_long): Likewise.
7745         (callt_save_interrupt, callt_return_interrupt): Likewise.
7746         (save_interrupt, return_interrupt): Likewise.
7747         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7748         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7749         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7750         (All FP comparisons): Only allow after reload has completed.
7751         (trfsr): Likewise.
7752         (divh, divhu): Tweak output template.
7753         (branch_z_normal, branch_z_invert): Remove
7754         (branch_nz_normal, branch_nz_invert): Likewise.
7755         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7757         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7758         * config/v850/v850.c (notice_update_cc): Remove.
7759         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7760         (CC_NO_CARRY): Likewise.
7761         (NOTICE_UPDATE_CC): Define to nothing.
7762         * config/v850/v850.md: Remove block comment on cc0 handling
7763         Remove "cc" attribute from all patterns.  Remove cc_status handling
7764         from all patterns.  Minor formatting fixes.
7766 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7768         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7769         (cortex-a76.cortex-a55): Likewise.
7770         * config/aarch64/aarch64-tune.md: Regenerate.
7771         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7772         cortex-a76.cortex-a55.
7774 2018-06-27  Jeff Law  <law@redhat.com>
7776         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7777         (MULTILIB_DIRNAMES): Similarly.
7779 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7781         * gimple.h (gimple_return_retbnd): Delete.
7782         (gimple_return_set_retbnd): Likewise.
7783         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7784         gimple_return_set_retbnd.
7785         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7786         gimple_return_retbnd and adjust.
7787         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7788         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7789         Explicitly return NULL in a couple more cases.  Move assertion
7790         on debug statements and remove unreachable code.
7791         (reset_debug_binding): Do not test id->retbnd.
7792         (expand_call_inline): Do not set it.
7794 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7796         * configure.ac: Add --disable-gcov option.
7797         * configure: Regenerate.
7798         * Makefile.in: Honour @enable_gcov@.
7799         * doc/install.texi: Document --disable-gcov.
7801 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7803         * config/arm/arm-cpus.in (cortex-a76): New entry.
7804         (cortex-a76.cortex-a55): Likewise.
7805         * config/arm/arm-tables.opt: Regenerate.
7806         * config/arm/arm-tune.md: Likewise.
7807         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7808         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7809         cortex-a76.cortex-a55.
7811 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7813         PR target/85769
7814         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7816 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7818         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7819         comment.
7820         (EPILOGUE_USES): Likewise.
7822 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7824         * tree-inline.c (remap_location): New function extracted from...
7825         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7826         (copy_phis_for_bb): ...here.  Call remap_location.
7827         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7829 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7831         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7832         unaligned vsx for 16B memset.
7834 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7836         PR target/86285
7837         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7838         ieee128_float_type_node to long_double_type_node unless
7839         TARGET_LONG_DOUBLE_128 is set.
7841 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7843         * cfgloop.c (get_loop_location): Convert return type from
7844         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7845         by implicit construction from rtx_insn *, and using
7846         dump_user_location_t::from_function_decl for the fallback case.
7847         * cfgloop.h (get_loop_location): Convert return type from
7848         location_t to dump_user_location_t.
7849         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7850         dump_printf_loc to pass in a dump_location_t rather than a
7851         location_t, via the gimple stmt.
7852         * coverage.c (get_coverage_counts): Update calls to
7853         dump_printf_loc to pass in dump_location_t rather than a
7854         location_t.
7855         * doc/optinfo.texi (Dump types): Convert example of
7856         dump_printf_loc from taking "locus" to taking "insn".  Update
7857         description of the "_loc" calls to cover dump_location_t.
7858         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7859         "selftest.h".
7860         (dump_user_location_t::dump_user_location_t): New constructors,
7861         from gimple *stmt and rtx_insn *.
7862         (dump_user_location_t::from_function_decl): New function.
7863         (dump_loc): Make static.
7864         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7865         const dump_location_t &.
7866         (dump_generic_expr_loc): Delete.
7867         (dump_printf_loc): Convert param "loc" from location_t to
7868         const dump_location_t &.
7869         (selftest::test_impl_location): New function.
7870         (selftest::dumpfile_c_tests): New function.
7871         * dumpfile.h: Include "profile-count.h".
7872         (class dump_user_location_t): New class.
7873         (struct dump_impl_location_t): New struct.
7874         (class dump_location_t): New class.
7875         (dump_printf_loc): Convert 2nd param from source_location to
7876         const dump_location_t &.
7877         (dump_generic_expr_loc): Delete.
7878         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7879         const dump_location_t &.
7880         * gimple-fold.c (fold_gimple_assign): Update call to
7881         dump_printf_loc to pass in a dump_location_t rather than a
7882         location_t, via the gimple stmt.
7883         (gimple_fold_call): Likewise.
7884         * gimple-loop-interchange.cc
7885         (loop_cand::analyze_iloop_reduction_var): Update for change to
7886         check_reduction_path.
7887         (tree_loop_interchange::interchange): Update for change to
7888         find_loop_location.
7889         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7890         change in return-type of find_loop_location.
7891         (graphite_regenerate_ast_isl): Likewise.
7892         * graphite-optimize-isl.c (optimize_isl): Likewise.
7893         * graphite.c (graphite_transform_loops): Likewise.
7894         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7895         pass in a dump_location_t rather than a location_t, via the
7896         gimple stmt.
7897         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7898         * ipa.c (walk_polymorphic_call_targets): Likewise.
7899         * loop-unroll.c (report_unroll): Convert "locus" param from
7900         location_t to dump_location_t.
7901         (decide_unrolling): Update for change to get_loop_location's
7902         return type.
7903         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7904         location_t to dump_user_location_t.
7905         (grid_find_single_omp_among_assignments_1): Updates calls to
7906         dump_printf_loc to pass in a dump_location_t rather than a
7907         location_t, via the gimple stmt.
7908         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7909         location_t to dump_location_t.  Updates calls to dump_printf_loc
7910         to pass in a dump_location_t rather than a location_t, via the
7911         gimple stmt.
7912         (grid_inner_loop_gridifiable_p): Likewise.
7913         (grid_dist_follows_simple_pattern): Likewise.
7914         (grid_gfor_follows_tiling_pattern): Likewise.
7915         (grid_target_follows_gridifiable_pattern): Likewise.
7916         (grid_attempt_target_gridification): Convert initialization
7917         of local "grid" from memset to zero-initialization; FIXME: does
7918         this require C++11?  Update call to dump_printf_loc to pass in a
7919         optinfo_location rather than a location_t, via the gimple stmt.
7920         * profile.c (read_profile_edge_counts): Updates call to
7921         dump_printf_loc to pass in a dump_location_t rather than a
7922         location_t
7923         (compute_branch_probabilities): Likewise.
7924         * selftest-run-tests.c (selftest::run_tests): Call
7925         dumpfile_c_tests.
7926         * selftest.h (dumpfile_c_tests): New decl.
7927         * tree-loop-distribution.c (pass_loop_distribution::execute):
7928         Update for change in return type of find_loop_location.
7929         * tree-parloops.c (parallelize_loops): Likewise.
7930         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7931         "locus" from location_t to dump_user_location_t.
7932         (canonicalize_loop_induction_variables): Likewise.
7933         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7934         for change in return type of find_loop_location.
7935         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7936         to dump_printf_loc to pass in a dump_location_t rather than a
7937         location_t, via the stmt.
7938         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7939         Likewise.
7940         * tree-vect-loop-manip.c (find_loop_location): Convert return
7941         type from source_location to dump_user_location_t.
7942         (vect_do_peeling): Update for above change.
7943         (vect_loop_versioning): Update for change in type of
7944         vect_location.
7945         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7946         from location_t to dump_user_location_t.
7947         (vect_estimate_min_profitable_iters): Update for change in type
7948         of vect_location.
7949         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7950         location_t to dump_location_t.
7951         (vect_slp_bb): Update for change in type of vect_location.
7952         * tree-vectorizer.c (vect_location): Convert from source_location
7953         to dump_user_location_t.
7954         (try_vectorize_loop_1): Update for change in vect_location's type.
7955         (vectorize_loops): Likewise.
7956         (increase_alignment): Likewise.
7957         * tree-vectorizer.h (vect_location): Convert from source_location
7958         to dump_user_location_t.
7959         (find_loop_location): Convert return type from source_location to
7960         dump_user_location_t.
7961         (check_reduction_path): Convert 1st param from location_t to
7962         dump_user_location_t.
7963         * value-prof.c (check_counter): Update call to dump_printf_loc to
7964         pass in a dump_user_location_t rather than a location_t; update
7965         call to error_at for change in type of "locus".
7966         (check_ic_target): Update call to dump_printf_loc to
7967         pass in a dump_user_location_t rather than a location_t, via the
7968         call_stmt.
7970 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7972         * config/s390/s390.h (enum processor_flags): Do not use
7973         default tune parameter when -march was specified.
7975 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7977         PR target/86314
7978         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7979         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7980         operands.
7982 2018-06-26  Richard Biener  <rguenther@suse.de>
7984         PR tree-optimization/86287
7985         PR bootstrap/86316
7986         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7987         (vect_analyze_loop): Initialize n_stmts.
7989 2018-06-26  Richard Biener  <rguenther@suse.de>
7991         PR middle-end/86271
7992         * fold-const.c (fold_convertible_p): Pointer extension
7993         isn't valid.
7995 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7997         PR debug/86064
7998         * dwarf2out.c (loc_list_has_views): Adjust comments.
7999         (dw_loc_list): Split single cross-partition range with
8000         nonzero locview.
8002 2018-06-25  Jeff Law  <law@redhat.com>
8004         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8005         on -mbig-switch by default.
8007         * config/v850/predicates.md (const_float_1_operand): Fix match_code
8008         test.
8009         (const_float_0_operand): Remove unused predicate.
8010         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8011         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8012         (recipsf2): New expander.  Original pattern now called
8013         (recipsf2_insn).
8014         (recipdf2, recipdf2_insn): Similarly.
8015         (rsqrtsf2, rsqrtsf2_insn): Similarly
8016         (rsqrtdf2, rsqrtdf2_insn): Similarly
8018 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
8020         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8021         Simplify logic for FreeBSD (twice).
8023 2018-06-25  Martin Sebor  <msebor@redhat.com>
8025         PR tree-optimization/86204
8026         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8027         a strnlen result if it's less than the length of the string.
8029 2018-06-25  Martin Sebor  <msebor@redhat.com>
8031         PR tree-optimization/85700
8032         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8033         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8034         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8036 2018-06-25  Martin Sebor  <msebor@redhat.com>
8038         * doc/extend.texi (Zero-length arrays): Update and clarify.
8040 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
8042         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8043         added IEEE/IBM long double multilib support on PowerPC little
8044         endian Linux systems.
8045         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8046         (MULTILIB_DEFAULTS): Likewise.
8047         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8048         Likewise.
8049         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8050         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8051         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8053 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
8055         PR middle-end/86311
8056         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8057         (REORDER_45): Likewise.
8059 2018-06-25  Jeff Law  <law@redhat.com>
8061         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8062         dividend to 32 bits.  Adjust length.
8063         (udivmodhi4): Cleanup output template.  Fix length.
8065 2018-06-25  Carl Love  <cel@us.ibm.com>
8067         * config/rs6000/vsx.md: Change word selector to prefered location.
8069 2018-06-25  Richard Biener  <rguenther@suse.de>
8071         PR tree-optimization/86304
8072         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8073         epilogue-if-converted loops as well.
8075 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
8077         * lto-section-out.c (lto_begin_section): Do not print section
8078         name for noaddr and unnumbered dumps.
8080 2018-06-25  Richard Biener  <rguenther@suse.de>
8082         * tree-vectorizer.h (struct vec_info_shared): New structure
8083         with parts split out from struct vec_info and loop_nest from
8084         struct _loop_vec_info.
8085         (struct vec_info): Adjust accordingly.
8086         (struct _loop_vec_info): Likewise.
8087         (LOOP_VINFO_LOOP_NEST): Adjust.
8088         (LOOP_VINFO_DATAREFS): Likewise.
8089         (LOOP_VINFO_DDRS): Likewise.
8090         (struct _bb_vec_info): Likewise.
8091         (BB_VINFO_DATAREFS): Likewise.
8092         (BB_VINFO_DDRS): Likewise.
8093         (struct _stmt_vec_info): Add dr_aux member.
8094         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8095         (DR_MISALIGNMENT_UNINITIALIZED): New.
8096         (set_dr_misalignment): Adjust.
8097         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8098         (vect_analyze_loop): Adjust prototype.
8099         (vect_analyze_loop_form): Likewise.
8100         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8101         Compute dependences lazily.
8102         (vect_record_base_alignments): Use shared datarefs/ddrs.
8103         (vect_verify_datarefs_alignment): Likewise.
8104         (vect_analyze_data_refs_alignment): Likewise.
8105         (vect_analyze_data_ref_accesses): Likewise.
8106         (vect_analyze_data_refs): Likewise.
8107         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8108         constructor parameter for shared part.
8109         (vect_analyze_loop_form): Pass in shared part and adjust.
8110         (vect_analyze_loop_2): Pass in storage for the number of
8111         stmts.  Move loop nest finding to the caller.  Compute
8112         datarefs lazily.
8113         (vect_analyze_loop): Pass in shared part.
8114         (vect_transform_loop): Verify shared datarefs are unchanged.
8115         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8116         constructor parameter for shared part.
8117         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8118         (vect_slp_bb): Verify shared datarefs are unchanged before
8119         transform.
8120         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8121         change.
8122         (new_stmt_vec_info): Initialize DR_AUX misalignment to
8123         DR_MISALIGNMENT_UNINITIALIZED.
8124         * tree-vectorizer.c (vec_info::vec_info): Add constructor
8125         parameter for shared part.
8126         (vec_info::~vec_info): Adjust.
8127         (vec_info_shared::vec_info_shared): New.
8128         (vec_info_shared::~vec_info_shared): Likewise.
8129         (vec_info_shared::save_datarefs): Likewise.
8130         (vec_info_shared::check_datarefs): Likewise.
8131         (try_vectorize_loop_1): Construct shared part live for analyses
8132         of a single loop for multiple vector sizes.
8133         * tree-parloops.c (gather_scalar_reductions): Adjust.
8135 2018-06-25  Richard Biener  <rguenther@suse.de>
8137         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8138         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8139         (vect_analyze_data_refs): Remove similar code from here and
8140         simplify accordingly.
8142 2018-06-25  Richard Biener  <rguenther@suse.de>
8144         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8145         for reverse storage order accesses rather than asserting
8146         they cannot happen here.
8148 2018-06-25  Tom de Vries  <tdevries@suse.de>
8150         PR debug/86257
8151         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8152         Use data16 instead of .byte for insn prefix.
8154 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
8156         PR C++/86082
8157         * parser.c (make_char_string_pack): Pass this literal chars
8158         through cpp_interpret_string.
8159         (cp_parser_userdef_numeric_literal): Check the result of
8160         make_char_string_pack.
8162 2018-06-24  Maya Rashish  <coypu@sdf.org>
8164         * ginclude/stddef.h: Simplify conditions around avoiding
8165         re-definition of __size_t.
8167 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8169         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8170         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8172 2018-06-22  Maya Rashish  <coypu@sdf.org>
8174         * doc/invoke.texi (mno-fancy-math-387): Update for changes
8175         made to OpenBSD and NetBSD through the years.
8177 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8179         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8180         behavior of vec_pack (vector double, vector double) to match
8181         behavior of vec_float2 (vector double, vector double).
8183 2018-06-22  Olivier Hainque  <hainque@adacore.com>
8185         * gimplify.c (gimplify_function_tree): Prevent creation
8186         of a trampoline for the address of the current function
8187         passed to entry/exit instrumentation hooks.
8189 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
8191         PR target/86222
8192         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8193         correctly.
8195 2018-06-22  Martin Liska  <mliska@suse.cz>
8197         PR tree-optimization/86263
8198         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8199         Bail out if is_enabled is false.
8200         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8201         New declaration.
8202         (jump_table_cluster::is_enabled): New function.
8204 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8206         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8207         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8208         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8209         (lto_input_ts_binfo_tree_pointers): Likewise.
8210         * tree-streamer-out.c (streamer_write_tree_bitfields,
8211         write_ts_binfo_tree_pointers): Likewise.
8212         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8214 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
8216         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8218 2018-06-22  Martin Liska  <mliska@suse.cz>
8220         * symbol-summary.h (get): Make it pure and inline move
8221         functionality from ::get function.
8222         (get): Remove and inline into ::get and ::get_create.
8223         (get_create): Move code from ::get function.
8225 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8227         PR target/85994
8228         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8229         -x assembler-with-cpp.
8231 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8233         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8234         _FILE_OFFSET_BITS=64 for C++.
8236 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
8238         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8239         conversion insn that shows up when pr85657-3.c is compiled using
8240         IEEE 128-bit long double.
8241         (neg<mode>2_internal): Use the correct mode to check whether the
8242         mode is IBM extended.
8243         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8244         multiply and divide external functions from being created more
8245         than once.
8247 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8249         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8250         functions.
8251         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
8252         the edge can be forwarded.
8253         (cfg_layout_merge_blocks): Likewise.
8255 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8257         * except.c (finish_eh_generation): Commit edge insertions only after
8258         the EH edges have been redirected from post-landing to landing pads.
8260 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8262         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8263         create_tmp_var_for to create the FRAME decl.
8264         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8266 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8268         * tree-inline.c (copy_edges_for_bb): Minor tweak.
8269         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8270         debug statement when resetting its value.
8271         (expand_call_inline): Copy the locus of the call onto the assignment
8272         of the return value, if any.  Use local variable in more cases.
8274 2018-06-21  Martin Liska  <mliska@suse.cz>
8276         * ipa-pure-const.c (propagate_nothrow): Use
8277         funct_state_summaries->get.
8278         (dump_malloc_lattice): Likewise.
8279         (propagate_malloc): Likewise.
8281 2018-06-21  Richard Biener  <rguenther@suse.de>
8283         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8284         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8285         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8286         comment.
8287         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8288         BLOCK_ABSTRACT_ORIGIN unconditionally.
8290 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
8292         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8293         deleting it.
8294         * ipa-reference.c (ipa_reference_c_finalize): Delete
8295         ipa_ref_opt_sum_summaries and set it to NULL.
8297 2018-06-21  Tom de Vries  <tdevries@suse.de>
8299         PR tree-optimization/85859
8300         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8301         test with comment from bb_no_side_effects_p.
8303 2018-06-21  Richard Biener  <rguenther@suse.de>
8305         PR tree-optimization/86232
8306         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8307         max for constant niter.
8309 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8311         * config/aarch64/aarch64-simd.md
8312         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8314 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8316         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8317         Make opernads of the unspec commutative.
8319 2018-06-21  Richard Biener  <rguenther@suse.de>
8321         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8322         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8323         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8324         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8325         NULL DR_STEP.
8326         (vect_record_base_alignments): Do not record base alignment
8327         for gathers or scatters.
8328         (vect_compute_data_ref_alignment): Drop return value that is always
8329         true.  Bail out early for gathers or scatters.
8330         (vect_enhance_data_refs_alignment): Bail out early for gathers
8331         or scatters.
8332         (vect_find_same_alignment_drs): Likewise.
8333         (vect_analyze_data_refs_alignment): Remove dead code.
8334         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8335         (vect_analyze_data_refs): For possible gathers or scatters do
8336         not create an alternate DR, just check their possible validity
8337         and mark them.  Adjust DECL_NONALIASED handling to not rely
8338         on DR_BASE_ADDRESS.
8339         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8340         update inits of gathers or scatters.
8341         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8342         Also copy gather/scatter flag to pattern vinfo.
8344 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8346         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8347         behavior of vec_packsu (vector unsigned long long, vector unsigned
8348         long long) to match behavior of vec_packs with same signature.
8350 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8351             Thomas Schwinge <thomas@codesourcery.com>
8352             Cesar Philippidis  <cesar@codesourcery.com>
8354         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8355         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8356         (gimplify_adjust_omp_clauses): Likewise.
8357         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8358         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8359         (gimplify_omp_target_update): Update handling of acc update and
8360         enter/exit data.
8361         * omp-low.c (install_var_field): Remove unused parameter
8362         base_pointers_restrict.
8363         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8364         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8365         FINALIZE}
8366         (omp_target_base_pointers_restrict_p): Delete.
8367         (scan_omp_target): Update call to scan_sharing_clauses.
8368         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8369         FINALIZE}.
8370         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8371         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8372         (convert_local_omp_clauses): Likewise.
8373         * tree-pretty-print.c (dump_omp_clause): Likewise.
8374         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8375         FINALIZE}.
8376         (omp_clause_code_name): Likewise.
8378 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8380         PR debug/86194
8381         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8382         be narrowed.
8384         PR tree-optimization/86231
8385         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8386         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8388 2018-06-20  Tom de Vries  <tdevries@suse.de>
8390         PR tree-optimization/86097
8391         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8392         iv type if signedness of iv type is not the same as that of *nit.
8394 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8396         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8397         EDGE_EH edges, verify they are all EDGE_EH.
8399 2018-06-20  Maya Rashish  <coypu@sdf.org>
8401         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8403 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8405         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8406         * config/aarch64/aarch64.c (xgene1_tunings): Add
8407         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8408         (aarch64_mode_valid_for_sched_fusion_p):
8409         Allow 16-byte modes.
8410         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8411         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8412         128-bit modes.
8413         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8414         New pattern.
8415         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8416         * config/aarch64/iterators.md (VQ2): New mode iterator.
8418 2018-06-20  Martin Liska  <mliska@suse.cz>
8420         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8421         Change default ratio from 10 to 8.
8423 2018-06-20  Martin Liska  <mliska@suse.cz>
8425         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8426         New.
8427         (bit_test_cluster::find_bit_tests): Likewise.
8428         (switch_decision_tree::analyze_switch_statement): Find clusters.
8429         * tree-switch-conversion.h (struct jump_table_cluster): Document
8430         hierarchy.
8432 2018-06-20  Martin Liska  <mliska@suse.cz>
8434         * tree-switch-conversion.c (switch_conversion::collect):
8435         Record m_uniq property.
8436         (switch_conversion::expand): Bail out for special conditions.
8437         (group_cluster::~group_cluster): New.
8438         (group_cluster::group_cluster): Likewise.
8439         (group_cluster::dump): Likewise.
8440         (jump_table_cluster::emit): New.
8441         (switch_decision_tree::fix_phi_operands_for_edges): New.
8442         (struct case_node): Remove struct.
8443         (jump_table_cluster::can_be_handled): New.
8444         (case_values_threshold): Moved to header.
8445         (reset_out_edges_aux): Likewise.
8446         (jump_table_cluster::is_beneficial): New.
8447         (bit_test_cluster::can_be_handled): Likewise.
8448         (add_case_node): Remove.
8449         (bit_test_cluster::is_beneficial): New.
8450         (case_bit_test::cmp): New.
8451         (bit_test_cluster::emit): New.
8452         (expand_switch_as_decision_tree_p): Remove.
8453         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8454         (fix_phi_operands_for_edge): Likewise.
8455         (switch_decision_tree::analyze_switch_statement): New.
8456         (compute_cases_per_edge): Move ...
8457         (switch_decision_tree::compute_cases_per_edge): ... here.
8458         (try_switch_expansion): Likewise.
8459         (switch_decision_tree::try_switch_expansion): Likewise.
8460         (record_phi_operand_mapping): Likewise.
8461         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8462         (emit_case_decision_tree): Likewise.
8463         (switch_decision_tree::emit): Likewise.
8464         (balance_case_nodes): Likewise.
8465         (switch_decision_tree::balance_case_nodes): Likewise.
8466         (dump_case_nodes): Likewise.
8467         (switch_decision_tree::dump_case_nodes): Likewise.
8468         (emit_jump): Likewise.
8469         (switch_decision_tree::emit_jump): Likewise.
8470         (emit_cmp_and_jump_insns): Likewise.
8471         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8472         (emit_case_nodes): Likewise.
8473         (switch_decision_tree::emit_case_nodes): Likewise.
8474         (conditional_probability): Remove.
8475         * tree-switch-conversion.h (enum cluster_type): New.
8476         (PRINT_CASE): New.
8477         (struct cluster): Likewise.
8478         (cluster::cluster): Likewise.
8479         (struct simple_cluster): Likewise.
8480         (simple_cluster::simple_cluster): Likewise.
8481         (struct group_cluster): Likewise.
8482         (struct jump_table_cluster): Likewise.
8483         (struct bit_test_cluster): Likewise.
8484         (struct min_cluster_item): Likewise.
8485         (struct case_tree_node): Likewise.
8486         (case_tree_node::case_tree_node): Likewise.
8487         (jump_table_cluster::case_values_threshold): Likewise.
8488         (struct case_bit_test): Likewise.
8489         (struct switch_decision_tree): Likewise.
8490         (struct switch_conversion): Likewise.
8491         (switch_decision_tree::reset_out_edges_aux): Likewise.
8493 2018-06-20  Martin Liska  <mliska@suse.cz>
8495         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8496         (hoist_edge_and_branch_if_true): Likewise.
8497         (expand_switch_using_bit_tests_p): Likewise.
8498         (struct case_bit_test): Likewise.
8499         (case_bit_test_cmp): Likewise.
8500         (emit_case_bit_tests): Likewise.
8501         (switch_conversion::switch_conversion): New class.
8502         (struct switch_conv_info): Remove old struct.
8503         (collect_switch_conv_info): More to ...
8504         (switch_conversion::collect): ... this.
8505         (check_range): Likewise.
8506         (switch_conversion::check_range): Likewise.
8507         (check_all_empty_except_final): Likewise.
8508         (switch_conversion::check_all_empty_except_final): Likewise.
8509         (check_final_bb): Likewise.
8510         (switch_conversion::check_final_bb): Likewise.
8511         (create_temp_arrays): Likewise.
8512         (switch_conversion::create_temp_arrays): Likewise.
8513         (free_temp_arrays): Likewise.
8514         (gather_default_values): Likewise.
8515         (switch_conversion::gather_default_values): Likewise.
8516         (build_constructors): Likewise.
8517         (switch_conversion::build_constructors): Likewise.
8518         (constructor_contains_same_values_p): Likewise.
8519         (switch_conversion::contains_same_values_p): Likewise.
8520         (array_value_type): Likewise.
8521         (switch_conversion::array_value_type): Likewise.
8522         (build_one_array): Likewise.
8523         (switch_conversion::build_one_array): Likewise.
8524         (build_arrays): Likewise.
8525         (switch_conversion::build_arrays): Likewise.
8526         (gen_def_assigns): Likewise.
8527         (switch_conversion::gen_def_assigns): Likewise.
8528         (prune_bbs): Likewise.
8529         (switch_conversion::prune_bbs): Likewise.
8530         (fix_phi_nodes): Likewise.
8531         (switch_conversion::fix_phi_nodes): Likewise.
8532         (gen_inbound_check): Likewise.
8533         (switch_conversion::gen_inbound_check): Likewise.
8534         (process_switch): Use the newly created class.
8535         (switch_conversion::expand): New.
8536         (switch_conversion::~switch_conversion): New.
8537         * tree-switch-conversion.h: New file.
8539 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8541         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8542         tree-vect-patterns.c.
8543         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8544         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8545         (vect_recog_sad_pattern): Likewise.
8546         (vect_recog_widen_sum_pattern): Likewise.
8547         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8548         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8549         (vect_recog_rotate_pattern): Likewise.
8550         (vect_recog_mult_pattern): Likewise.
8551         (vect_recog_vector_vector_shift_pattern): Likewise.
8552         (vect_recog_divmod_pattern): Likewise.
8553         (vect_recog_mixed_size_cond_pattern): Likewise.
8554         (vect_recog_bool_pattern): Likewise.
8555         (vect_recog_mask_conversion_pattern): Likewise.
8556         (vect_try_gather_scatter_pattern): Likewise.
8557         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8558         (vect_recog_over_widening_pattern): Likewise.
8559         (vect_recog_gather_scatter_pattern): Likewise.
8560         (vect_recog_func_ptr): Move from tree-vectorizer.h
8561         (vect_vect_recog_func_ptrs): Move further down the file.
8562         (vect_recog_func): Likewise.  Remove the third argument.
8563         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8564         (vect_pattern_recog_1): Expect the pattern function to do any
8565         necessary target tests.  Also expect it to provide a vector type.
8566         Remove the type_in handling.
8568 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8570         * tree-vect-patterns.c (vect_pattern_detected): New function.
8571         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8572         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8573         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8574         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8575         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8576         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8577         (vect_recog_mask_conversion_pattern)
8578         (vect_try_gather_scatter_pattern): Likewise.
8580 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8582         * tree-vect-patterns.c (vect_get_internal_def): New function.
8583         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8584         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8585         (search_type_for_mask_1): Use it.
8587 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8589         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8590         redundant WIDEN_SUM_EXPR handling.
8591         (vect_recog_sad_pattern): Likewise.
8593 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8595         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8596         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8597         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8598         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8599         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8601 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8603         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8604         use the stmt_vec_info of the original bb statement for the
8605         new zero assignment, even if the call is part of a pattern.
8607 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8609         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8610         that the sequence is attached to the original statement rather
8611         than the pattern statement.
8612         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8613         PATTERN_DEF_SEQ from the original statement rather than
8614         the main pattern statement.
8615         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8616         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8617         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8619 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8621         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8622         definition statements before the early exit for statements that aren't
8623         live or relevant.
8624         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8625         split out from...
8626         (vect_transform_loop): ...here.  Process pattern definition
8627         statements without first checking whether the main pattern
8628         statement is live or relevant.
8630 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8632         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8633         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8635 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
8637         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8638         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8639         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8640         (expand_block_compare): Change select_block_compare_mode call.
8641         (expand_strncmp_align_check): Use new functions, fix comment.
8642         (emit_final_str_compare_gpr): New function.
8643         (expand_strn_compare): Refactor and clean up code.
8644         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8646 2018-06-19  Tony Reix  <tony.reix@atos.com>
8647             Damien Bergamini  <damien.bergamini@atos.com>
8648             David Edelsohn  <dje.gcc@gmail.com>
8650         * collect2.c (static_obj): New variable.
8651         (static_libs): New variable.
8652         (is_in_list): Uncomment declaration.
8653         (main): Track AIX libraries linked statically.
8654         (is_in_list): Uncomment definition.
8655         (scan_prog_file): Don't add AIX shared libraries initializer
8656         to constructor list if linking statically.
8658 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8660         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8661         constant.
8662         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8664 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8666         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8667         blocks.
8669 2018-06-19  Martin Liska  <mliska@suse.cz>
8671         * config/i386/i386.c (ix86_can_inline_p): Do not use
8672         ipa_fn_summaries::get_create.
8673         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8674         get.
8675         (devirtualization_time_bonus): Likewise.
8676         (ipcp_propagate_stage): Likewise.
8677         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8678         (edge_set_predicate): Likewise.
8679         (evaluate_conditions_for_known_args): Likewise.
8680         (evaluate_properties_for_edge): Likewise.
8681         (ipa_call_summary::reset): Tranform to ...
8682         (ipa_call_summary::~ipa_call_summary): ... this.
8683         (ipa_fn_summary::reset): Transform to ...
8684         (ipa_fn_summary::~ipa_fn_summary): ... this.
8685         (ipa_fn_summary_t::remove): Rename to ...
8686         (ipa_fn_summary_t::remove_callees): ... this.
8687         (ipa_fn_summary_t::duplicate): Use placement new
8688         instead of memory copy.
8689         (ipa_call_summary_t::duplicate): Likewise.
8690         (ipa_call_summary_t::remove): Remove.
8691         (dump_ipa_call_summary): Change get_create to get.
8692         (ipa_dump_fn_summary): Dump only when summary exists.
8693         (analyze_function_body): Use symbol_summary::get instead
8694         of get_create.
8695         (compute_fn_summary): Likewise.
8696         (estimate_edge_devirt_benefit): Likewise.
8697         (estimate_edge_size_and_time): Likewise.
8698         (inline_update_callee_summaries): Likewise.
8699         (remap_edge_change_prob): Likewise.
8700         (remap_edge_summaries): Likewise.
8701         (ipa_merge_fn_summary_after_inlining): Likewise.
8702         (write_ipa_call_summary): Likewise.
8703         (ipa_fn_summary_write): Likewise.
8704         (ipa_free_fn_summary): Likewise.
8705         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8706         (struct ipa_call_summary): Likewise.
8707         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8708         of get_create.
8709         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8710         (estimate_size_after_inlining): Likewise.
8711         (estimate_growth): Likewise.
8712         (growth_likely_positive): Likewise.
8713         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8714         (inline_call): Likewise.
8715         * ipa-inline.c (caller_growth_limits): Likewise.
8716         (can_inline_edge_p): Likewise.
8717         (can_inline_edge_by_limits_p): Likewise.
8718         (compute_uninlined_call_time): Likewise.
8719         (compute_inlined_call_time): Likewise.
8720         (want_inline_small_function_p): Likewise.
8721         (edge_badness): Likewise.
8722         (update_caller_keys): Likewise.
8723         (update_callee_keys): Likewise.
8724         (inline_small_functions): Likewise.
8725         (inline_to_all_callers_1): Likewise.
8726         (dump_overall_stats): Likewise.
8727         (early_inline_small_functions): Likewise.
8728         (early_inliner): Likewise.
8729         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8730         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8731         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8732         * ipa-split.c (execute_split_functions): Likewise.
8733         * symbol-summary.h: Likewise.
8734         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8736 2018-06-19  Richard Biener  <rguenther@suse.de>
8738         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8739         (vectorize_loops): ... here.  Fix dbgcnt handling.
8740         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8742 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8744         PR target/86197
8745         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8746         ieee128 argument takes up only one (vector) register, not two (floating
8747         point) registers.
8749 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8751         * gimplify.c (gimplify_init_constructor): Really never clear for an
8752         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8754 2018-06-19  Richard Biener  <rguenther@suse.de>
8756         PR tree-optimization/86179
8757         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8758         after failed recognition.
8760 2018-06-18  Martin Sebor  <msebor@redhat.com>
8762         PR middle-end/85602
8763         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8764         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8765         Handle integer subtraction.
8766         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8767         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8769 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8771         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8772         param from rtx to rtx_insn *.
8773         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8774         param.
8775         (frv_ifcvt_modify_insn): Likwise.
8776         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8777         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8778         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8779         as_a <rtx_insn *> cast to local "unprotected_region" once
8780         it's been established that it's not NULL or pc_rtx.
8781         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8782         param "sethi" from rtx to rtx_insn *.
8783         (nds32_group_float_insns): Likewise for param "insn".
8784         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8785         param.
8786         (vax_output_int_subtract): Likewise.
8787         * config/vax/vax.c (vax_output_int_add): Likewise for param
8788         "insn".
8789         (vax_output_int_subtract): Likewise.
8790         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8791         (emit_pattern_after): Likewise for param "after".
8792         (emit_insn_after): Likewise.
8793         (emit_jump_insn_after): Likewise.
8794         (emit_call_insn_after): Likewise.
8795         (emit_debug_insn_after): Likewise.
8796         (emit_pattern_before): Likewise for param "before".
8797         (emit_insn_before): Likewise.
8798         (emit_jump_insn_before): Likewise.
8799         * final.c (get_insn_template): Likewise for param "insn", removing
8800         a cast.
8801         * output.h (get_insn_template): Likewise for 2nd param.
8802         * rtl.h (emit_insn_before): Likewise.
8803         (emit_jump_insn_before): Likewise.
8804         (emit_debug_insn_before_noloc): Likewise.
8805         (emit_insn_after): Likewise.
8806         (emit_jump_insn_after): Likewise.
8807         (emit_call_insn_after): Likewise.
8808         (emit_debug_insn_after): Likewise.
8809         (set_insn_deleted): Likewise for param.
8811 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8813         PR target/85358
8814         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8815         floating point modes, so that IFmode is numerically greater than
8816         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8817         to declare the ordering.  This prevents IFmode from being
8818         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8819         machine.  Include rs6000-modes.h to share the fractional values
8820         between genmodes* and the rest of the compiler.
8821         (IFmode): Likewise.
8822         (KFmode): Likewise.
8823         (TFmode): Likewise.
8824         * config/rs6000/rs6000-modes.h: New file.
8825         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8826         meaning of rs6000_long_double_size so that 126..128 selects an
8827         appropriate 128-bit floating point type.
8828         (rs6000_option_override_internal): Likewise.
8829         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8830         (TARGET_LONG_DOUBLE_128): Change the meaning of
8831         rs6000_long_double_size so that 126..128 selects an appropriate
8832         128-bit floating point type.
8833         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8834         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8835         source and destination to match the standard usage.
8836         (truncifkf2): Likewise.
8837         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8838         ISA 2.07 to use an explicit clobber, instead of passing in a
8839         temporary.
8840         (copysign<mode>3_soft): Likewise.
8842 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8844         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8845         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8846         (vect_slp_analyze_instance_dependence): Likewise.
8847         (vect_enhance_data_refs_alignment): Likewise.
8848         (vect_analyze_data_refs_alignment): Likewise.
8849         (vect_slp_analyze_and_verify_instance_alignment
8850         (vect_analyze_data_ref_accesses): Likewise.
8851         (vect_prune_runtime_alias_test_list): Likewise.
8852         (vect_analyze_data_refs): Likewise.
8853         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8854         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8855         (vect_analyze_scalar_cycles_1): Likewise.
8856         (vect_get_loop_niters): Likewise.
8857         (vect_analyze_loop_form_1): Likewise.
8858         (vect_update_vf_for_slp): Likewise.
8859         (vect_analyze_loop_operations): Likewise.
8860         (vect_analyze_loop): Likewise.
8861         (vectorizable_induction): Likewise.
8862         (vect_transform_loop): Likewise.
8863         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8864         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8865         (vect_make_slp_decision): Likewise.
8866         (vect_detect_hybrid_slp): Likewise.
8867         (vect_slp_analyze_operations): Likewise.
8868         (vect_slp_bb): Likewise.
8869         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8870         (vectorizable_bswap): Likewise.
8871         (vectorizable_call): Likewise.
8872         (vectorizable_simd_clone_call): Likewise.
8873         (vectorizable_conversion): Likewise.
8874         (vectorizable_assignment): Likewise.
8875         (vectorizable_shift): Likewise.
8876         (vectorizable_operation): Likewise.
8877         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8879 2018-06-18  Martin Sebor  <msebor@redhat.com>
8881         PR tree-optimization/81384
8882         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8883         * builtins.c (expand_builtin_strnlen): New function.
8884         (expand_builtin): Call it.
8885         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8886         * builtins.def (BUILT_IN_STRNLEN): New.
8887         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8888         Warn for bounds in excess of maximum object size.
8889         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8890         single-value ranges.  Handle strnlen.
8891         (handle_builtin_strlen): Handle strnlen.
8892         (strlen_check_and_optimize_stmt): Same.
8893         * doc/extend.texi (Other Builtins): Document strnlen.
8895 2018-06-18  Maya Rashish  <coypu@sdf.org>
8897         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8898         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8899         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8901         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8902         here to ...
8903         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8905 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8907         * tree.c (escaped_string::escape): Replace cast to char * by
8908         const_cast<char *> (unescaped).
8910 2018-06-18  Nick Clifton  <nickc@redhat.com>
8912         PR 84195
8913         * tree.c (escaped_string): New class.  Converts an unescaped
8914         string into its escaped equivalent.
8915         (warn_deprecated_use): Use the new class to convert the
8916         deprecation message, if present.
8917         (test_escaped_strings): New self test.
8918         (test_c_tests): Add test_escaped_strings.
8919         * doc/extend.texi (deprecated): Add a note that the
8920         deprecation message is affected by the -fmessage-length
8921         option, and that control characters will be escaped.
8922         (#pragma GCC error): Document this pragma.
8923         (#pragma GCC warning): Likewise.
8924         * doc/invoke.texi (-fmessage-length): Document this option's
8925         effect on the #warning and #error preprocessor directives and
8926         the deprecated attribute.
8928 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8930         * tree.c (decl_value_expr_lookup): Revert latest change.
8931         (decl_value_expr_insert): Likewise.
8933 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8935         * gimplify.c (nonlocal_vlas): Delete.
8936         (nonlocal_vla_vars): Likewise.
8937         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8938         referenced VLAs.
8939         (gimplify_body): Do not create and destroy nonlocal_vlas.
8940         * tree-nested.c: Include diagnostic.h.
8941         (use_pointer_in_frame): Tweak.
8942         (lookup_field_for_decl): Add assertion and declare the transformation.
8943         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8944         internal error when the reference is in a wrong context.  Do not
8945         create a debug decl by default.
8946         (note_nonlocal_block_vlas): Delete.
8947         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8948         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8949         create a debug decl by default.
8950         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8951         call is in a wrong context.
8952         (fixup_vla_decls): New function.
8953         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8954         debug variables were created.
8955         * tree.c (decl_value_expr_lookup): Add checking assertion.
8956         (decl_value_expr_insert): Likewise.
8958 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8960         PR middle-end/82479
8961         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8962         * tree-scalar-evolution.c (interpret_expr): Likewise.
8963         (expression_expensive_p): Likewise.
8964         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8965         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8966         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8967         (ssa_defined_by_minus_one_stmt_p): New.
8969 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8971         PR middle-end/64946
8972         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8973         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8974         * dojump.c (do_jump): Likewise.
8975         * expr.c (expand_expr_real_2): Check operand type's sign.
8976         * fold-const.c (const_unop): Handle ABSU_EXPR.
8977         (fold_abs_const): Likewise.
8978         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8979         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8980         (strip_sign_op_1): Likesise.
8981         * match.pd: Add new pattern to generate ABSU_EXPR.
8982         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8983         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8984         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8985         * tree-inline.c (estimate_operator_cost): Likewise.
8986         * tree-pretty-print.c (dump_generic_node): Likewise.
8987         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8988         * tree.def (ABSU_EXPR): New.
8990 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8992         PR middle-end/86095
8993         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8994         documented as preserved for backward compatibility only.
8995         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8997         PR rtl-optimization/86108
8998         * bb-reorder.c (create_forwarder_block): Renamed to ...
8999         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
9000         jump from new landing pad to the second part.
9001         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9002         Adjust callers.
9004 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
9006         PR middle-end/85878
9007         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9008         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9009         Only call store_expr for halves if the mode is the same.
9011         PR middle-end/86123
9012         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9013         Fix up comment formatting.
9015 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9017         * typed-splay-tree.h (typed_splay_tree::remove): New function.
9018         (typed_splay_tree::closure,
9019         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9020         (typed_splay_tree::typed_splay_tree,
9021         typed_splay_tree::operator =): Declared private.
9022         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9023         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9024         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9025         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9026         typed_splay_tree::splay_tree_splay,
9027         typed_splay_tree::splay_tree_foreach_helper,
9028         typed_splay_tree::splay_tree_insert,
9029         typed_splay_tree::splay_tree_remove,
9030         typed_splay_tree::splay_tree_lookup,
9031         typed_splay_tree::splay_tree_predecessor,
9032         typed_splay_tree::splay_tree_successor,
9033         typed_splay_tree::splay_tree_min,
9034         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9035         (typed_splay_tree::root, typed_splay_tree::comp,
9036         typed_splay_tree::delete_key,
9037         typed_splay_tree::delete_value): New data members.
9038         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9039         typed_splay_tree::remove.
9041 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
9043         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9044         -mginv and -mno-ginv to the assembler.
9045         * config/mips/mips.opt (-mcrc): New option.
9046         (-mginv): Likewise.
9047         * doc/invoke.text (-mcrc): Document.
9048         (-mginv): Likewise.
9050 2018-06-15  Nick Clifton  <nickc@redhat.com>
9052         PR 84195
9053         * tree.c (escaped_string): New class.  Converts an unescaped
9054         string into its escaped equivalent.
9055         (warn_deprecated_use): Use the new class to convert the
9056         deprecation message, if present.
9057         (test_escaped_strings): New self test.
9058         (test_c_tests): Add test_escaped_strings.
9059         * doc/extend.texi (deprecated): Add a note that the
9060         deprecation message is affected by the -fmessage-length
9061         option, and that control characters will be escaped.
9062         (#pragma GCC error): Document this pragma.
9063         (#pragma GCC warning): Likewise.
9064         * doc/invoke.texi (-fmessage-length): Document this option's
9065         effect on the #warning and #error preprocessor directives and
9066         the deprecated attribute.
9068 2018-06-15  Richard Biener  <rguenther@suse.de>
9070         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9071         here, also noting vector size used.
9072         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
9073         size used in MSG_OPTIMIZED_LOCATIONS dump.
9074         (pass_slp_vectorize::execute): Adjust.
9076 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
9078         PR target/85968
9079         * config/arc/arc.c (arc_return_address_register): Fix
9080         if-condition.
9082 2018-06-15  Richard Biener  <rguenther@suse.de>
9084         PR middle-end/86159
9085         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9086         leave useless conversion stripping to force_gimple_operand_gsi.
9087         (gimplify_build2): Likewise.
9088         (gimplify_build1): Likewise.
9090 2018-06-15  Richard Biener  <rguenther@suse.de>
9092         PR middle-end/86076
9093         * tree-cfg.c (move_stmt_op): unshare invariant addresses
9094         before adjusting their block.
9096 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9098         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9099         multilibs for *-*-rtems*.
9100         * config/riscv/t-rtems: New file.
9102 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
9104         PR middle-end/86122
9105         * match.pd ((A +- CST1) +- CST2): Punt if last resort
9106         unsigned_type_for returns NULL.
9108         PR target/85945
9109         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9110         subregs of multi-word pseudos unless the float mode has word size.
9112 2018-06-14  Richard Biener  <rguenther@suse.de>
9114         PR middle-end/86139
9115         * tree-vect-generic.c (build_word_mode_vector_type): Remove
9116         duplicate and harmful type_hash_canon.
9117         * tree.c (type_hash_canon): Assert we didn't find ourselves.
9119 2018-06-14  Richard Biener  <rguenther@suse.de>
9121         PR ipa/86124
9122         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9123         NULL cgraph_node.
9125 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9127         * config/rtems.h (STDINT_LONG32): Define.
9129 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
9130             Prachi Godbole  <prachi.godbole@imgtec.com>
9132         * config/mips/mips-cpus.def: Define P6600.
9133         * config/mips/mips-tables.opt: Regenerate.
9134         * config/mips/mips.c (mips_ucbranch_type): New enum.
9135         (mips_rtx_cost_data): Add support for P6600.
9136         (mips_issue_rate): Likewise.
9137         (mips_multipass_dfa_lookahead): Likewise.
9138         (mips_avoid_hazard): Likewise.
9139         (mips_reorg_process_insns): Likewise.
9140         (mips_classify_branch_p6600): New function.
9141         * config/mips/mips.h (TUNE_P6600): New define.
9142         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9143         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9144         * config/mips/mips.md: Include p6600.md.
9145         (processor): Add p6600.
9146         * config/mips/p6600.md: New file.
9147         * doc/invoke.texi: Add p6600 to supported architectures.
9149 2018-06-13  Martin Sebor  <msebor@redhat.com>
9151         PR tree-optimization/86114
9152         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9153         of integer types.
9154         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9156 2018-06-13  Richard Biener  <rguenther@suse.de>
9158         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9159         Properly set vector type of the intermediate stmt.
9160         * tree-vect-stmts.c (vectorizable_operation): The destination
9161         var always has vectype_out type.
9163 2018-06-13  Jeff Law  <law@redhat.com>
9165         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9166         integer 0 for argument to print_rtl_with_bb.
9167         (rl78_reorg): Likewise.
9169 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
9171         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9172         from rtx to rtx_insn *.
9173         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9174         "label".
9175         (add_sched_insns_for_speculation): Likewise for local "target",
9176         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9177         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9178         from rtx_insn ** to rtx_code_label **.
9179         (reorg_emit_nops): Likewise.
9180         (c6x_reorg): Likewise for local "call_labels".
9181         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9182         rtx to rtx_insn *.
9183         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9184         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9185         the loops over LABEL_REFS.
9186         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9187         braf_label.
9188         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9189         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9190         (split_branches): Strengthen local "olabel" from rtx to
9191         rtx_insn *, adding a safe_as_a cast.
9192         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9193         to "rtx_insn *".
9194         (add_insn_after): Likewise for first two params.
9195         (add_insn_before): Likewise.
9196         (remove_insn): Likewise for param.
9197         (emit_pattern_before_noloc): Likewise for second and third params.
9198         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9199         (emit_call_insn_before_noloc): Likewise.
9200         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9201         to "rtx_insn *".
9202         (emit_barrier_before): Likewise.
9203         (emit_label_before): Strengthen "label" param from "rtx" to
9204         "rtx_code_label *".  Strengthen "before" param from "rtx" to
9205         "rtx_insn *".
9206         (emit_insn_after_1): Strengthen "after" param from "rtx" to
9207         "rtx_insn *".
9208         (emit_pattern_after_noloc): Likewise.
9209         (emit_insn_after_noloc): Likewise.
9210         (emit_jump_insn_after_noloc): Likewise.
9211         (emit_call_insn_after_noloc): Likewise.
9212         (emit_debug_insn_after_noloc): Likewise.
9213         (emit_barrier_after): Likewise.
9214         (emit_label_after): Likewise for both params.
9215         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
9216         "loc" param from "int" to "location_t".
9217         (emit_insn_after_setloc): Likewise.
9218         (emit_jump_insn_after_setloc): Likewise.
9219         (emit_call_insn_after_setloc): Likewise.
9220         (emit_debug_insn_after_setloc): Likewise.
9221         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
9222         "loc" param from "int" to "location_t".
9223         (emit_pattern_before): Convert NULL_RTX to NULL.
9224         (emit_insn_before_setloc): Convert "loc" param from "int" to
9225         "location_t".
9226         (emit_jump_insn_before_setloc): Likewise.
9227         (emit_call_insn_before_setloc): Likewise.
9228         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9229         rtx_insn *.  Convert "loc" param from "int" to "location_t".
9230         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9231         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9232         Convert 3rd param from "int" to "location_t".
9233         (emit_barrier_before, emit_barrier_after, next_real_insn):
9234         Strengthen param from rtx to rtx_insn *.
9235         (emit_label_before): Strengthen 1st param from "rtx" to
9236         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
9237         "rtx_insn *".
9238         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9239         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9240         Strengthen 2nd param from "rtx" to "rtx_insn *".
9241         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9242         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9243         Likewise. Convert 3rd param from "int" to "location_t".
9244         (emit_label_after): Strengthen 1st param from "rtx" to
9245         "rtx_code_label *".
9246         (next_real_insn, remove_insn): Strengthen param from "rtx" to
9247         "rtx_insn *".
9248         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9249         from "rtx" to "rtx_insn *".
9251 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
9253         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9254         bodies streamed in with -Q.
9255         * dumpfile.c (dump_files): Add lto-stream-out dump file.
9256         * dumpfile.h (tree_dump_index): Add lto_stream_out.
9257         * gimple-streamer-out.c: Include gimple-pretty-print.h
9258         (output_bb): Dump stmts streamed.
9259         * lto-section-out.c: Include print-tree.h
9260         (lto_begin_section): Dump sections created.
9261         (lto_output_decl_index): Dump decl encoded.
9262         * lto-streamer-out.c: Include print-tree.h
9263         (create_output_block): Dump output block created.
9264         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9265         (output_function): Dump function output.
9266         (output_constructor): Dump constructor streamed.
9267         (write_global_stream): Output indexes encoded.
9268         (produce_asm_for_decls): Dump streams encoded.
9269         * lto-streamer.c (streamer_dump_file): New global var.
9270         * lto-streamer.h (streamer_dump_file): Declare.
9271         * passes.c (ipa_write_summaries): Initialize streamer dump.
9272         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9273         in.
9275 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9277         PR target/86048
9278         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9279         offsets for register save directives.  Emit a second batch of save
9280         directives, if need be, when the function accesses prior frames.
9282 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9284         * config/arc/fpu.md (fmasf4): Force operand to register.
9285         (fnmasf4): Likewise.
9287 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9289         * config/arc/arc-protos.h (arc_pad_return): Remove.
9290         * config/arc/arc.c (machine_function): Remove force_short_suffix
9291         and size_reason.
9292         (arc_print_operand): Adjust printing of '&'.
9293         (arc_verify_short): Remove conditional printing of short suffix.
9294         (arc_final_prescan_insn): Remove reference to size_reason.
9295         (pad_return): New function.
9296         (arc_reorg): Call pad_return.
9297         (arc_pad_return): Remove.
9298         (arc_init_machine_status): Remove reference to force_short_suffix.
9299         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9300         (attr length): When attribute iscompact is true force to 2
9301         regardless; in the case of maybe check if we want to force the
9302         instruction to have 4 bytes length.
9303         (nopv): Change it to generate 4 byte long nop as well.
9304         (blockage): New pattern.
9305         (simple_return): Remove call to arc_pad_return.
9306         (p_return_i): Likewise.
9308 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9310         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9312 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9314         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9315         ARC cores.
9317 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9319         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9320         for ARC700 and ARCv2.
9322 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9324         PR target/86076
9325         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9326         operands[2] instead of operands[1].
9329 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9331         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9332         case, check whether the outer register overlaps an unallocatable
9333         register, not just whether it fits the required class.
9335 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9337         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9338         are poly_ints.
9339         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9340         (memrefs_conflict_p): Likewise.
9341         (init_alias_analysis): Likewise.
9342         * cfgexpand.c (expand_debug_expr): Likewise.
9343         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9344         * cse.c (fold_rtx): Likewise.
9345         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9346         * expr.c (emit_block_move_hints): Likewise.
9347         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9348         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9349         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9350         (emit_group_store): Likewise.
9351         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9352         to read the PRE/POST_MODIFY increment.
9353         * calls.c (store_one_arg): Use strip_offset.
9354         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9355         poly_int_rtx_p.
9356         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9357         by a VEC_SELECT.
9358         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9359         (simplify_binary_operation_1): Extend CONST_INT handling to
9360         poly_int_rtx_p.
9361         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9362         than a HOST_WIDE_INT.
9363         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9364         poly_int64.
9365         (adjust_mems, add_stores): Update accodingly.
9366         (vt_canonicalize_addr): Track polynomial offsets.
9367         (emit_note_insn_var_location): Likewise.
9368         (vt_add_function_parameter): Likewise.
9369         (vt_initialize): Likewise.
9371 2018-06-12  Jeff Law  <law@redhat.com>
9373         * config.gcc (alpha*-*-freebsd*): Remove.
9374         * config/alpha/freebsd.h: Remove.
9376 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9378         PR other/69968
9379         * spellcheck-tree.c (levenshtein_distance): Rename to...
9380         (get_edit_distance): ...this, and update for underlying renaming.
9381         * spellcheck-tree.h (levenshtein_distance): Rename to...
9382         (get_edit_distance): ...this.
9383         * spellcheck.c (levenshtein_distance): Rename to...
9384         (get_edit_distance): ...this.  Convert from Levenshtein distance
9385         to Damerau-Levenshtein distance by supporting transpositions of
9386         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9387         "v_one_ago".
9388         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9389         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9390         update for underlying renaming.
9391         (selftest::levenshtein_distance_unit_test): Rename to...
9392         (selftest::test_get_edit_distance_unit): ...this, and update for
9393         underlying renaming.
9394         (selftest::test_find_closest_string): Add example from PR 69968
9395         where transposition helps
9396         (selftest::test_metric_conditions): Update for renaming.
9397         (selftest::test_metric_conditions): Likewise.
9398         (selftest::spellcheck_c_tests): Likewise.
9399         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9400         (get_edit_distance): ...this.
9401         (best_match::consider): Update for renaming.
9403 2018-06-12  Martin Sebor  <msebor@redhat.com>
9405         PR tree-optimization/85259
9406         * builtins.c (compute_objsize): Handle constant offsets.
9407         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9408         true iff a warning has been issued.
9409         * gimple.h (gimple_nonartificial_location): New function.
9410         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9411         gimple_nonartificial_location and handle -Wno-system-headers.
9412         (handle_builtin_stxncpy): Same.
9414 2018-06-12  Martin Sebor  <msebor@redhat.com>
9416         PR c/85931
9417         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9419 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9421         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9422         BUILTIN_VEC_XST entries for pointer to double and long long.
9424 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9426         PR target/85990
9427         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9428         Update comments.
9429         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9430         Likewise.
9432 2018-06-12  Martin Liska  <mliska@suse.cz>
9434         * doc/options.texi: Document IntegerRange.
9436 2018-06-12  Martin Liska  <mliska@suse.cz>
9438         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9439         * opt-functions.awk: Handle Deprecated flag.
9440         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9441         and report error.
9442         (read_cmdline_option): Report warning for a deprecated option.
9443         * opts.h (struct cl_option): Add new field cl_deprecated.
9444         (CL_ERR_DEPRECATED): New.
9446 2018-06-12  Martin Liska  <mliska@suse.cz>
9448         * doc/options.texi: Document Deprecated option flag.
9450 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9452         * config/arc/arc-arch.h (arc_extras): New enum.
9453         (arc_cpu_t):Add field extra.
9454         (arc_cpu_types): Consider the extras.
9455         * config/arc/arc-cpus.def: Add extras info.
9456         * config/arc/arc-opts.h (processor_type): Consider extra field.
9457         * config/arc/arc.c (arc_override_options): Handle extra field.
9459 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9461         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9462         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9463         field.
9464         * config/arc/arc.c (arc_init): Update pic warning.
9465         (irq_range): Update irq range parsing warnings.
9466         (arc_override_options): Update various warning messages.
9467         (arc_handle_aux_attribute): Likewise.
9469 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9471         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9473 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9475         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9476         compiler messages directives.
9478 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9480         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9481         * config/mips/mips-tables.opt: Regenerate.
9482         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9483         mips64r6.
9484         * doc/invoke.texi: Document -march=i6500.
9486 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9488         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9489         (i6400_gpmul): Add cpu_unit.
9490         (i6400_gpdiv): Likewise.
9491         (i6400_msa_add_d): Update reservations.
9492         (i6400_msa_int_add) Likewise.
9493         (i6400_msa_short_logic3) Likewise.
9494         (i6400_msa_short_logic2) Likewise.
9495         (i6400_msa_short_logic) Likewise.
9496         (i6400_msa_move) Likewise.
9497         (i6400_msa_cmp) Likewise.
9498         (i6400_msa_short_float2) Likewise.
9499         (i6400_msa_div_d) Likewise.
9500         (i6400_msa_long_logic1) Likewise.
9501         (i6400_msa_long_logic2) Likewise.
9502         (i6400_msa_mult) Likewise.
9503         (i6400_msa_long_float2) Likewise.
9504         (i6400_msa_long_float4) Likewise.
9505         (i6400_msa_long_float5) Likewise.
9506         (i6400_msa_long_float8) Likewise.
9507         (i6400_fpu_fadd): Include frint type.
9508         (i6400_fpu_store): New define_insn_reservation.
9509         (i6400_fpu_load): Likewise.
9510         (i6400_fpu_move): Likewise.
9511         (i6400_fpu_fcmp): Likewise.
9512         (i6400_fpu_fmadd): Likewise.
9513         (i6400_int_mult): Include imul3nc type and update reservation.
9514         (i6400_int_div): Include idiv3 type and update reservation.
9515         (i6400_int_load): Update to check type not move_type.
9516         (i6400_int_store): Likewise.
9517         (i6400_int_prefetch): Set zero latency.
9519 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9521         * gcc.c: Document new %@{...} sequence.
9522         (LINK_COMMAND_SPEC): Use it for the -L switches.
9523         (cpp_unique_options): Use it for the -I switches.
9524         (at_file_argbuf): New global variable.
9525         (in_at_file): Likewise.
9526         (alloc_args): Create at_file_argbuf.
9527         (clear_args): Truncate at_file_argbuf.
9528         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9529         (open_at_file): New function.
9530         (close_at_file): Likewise.
9531         (create_at_file): Delete.
9532         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9533         <'o'>: Likewise.
9534         <'@'>: New case.
9535         (validate_switches_from_spec): Deal with %@{...} sequence.
9536         (validate_switches): Likewise.
9537         (driver::finalize): Call clear_args.
9539 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9541         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9543 2018-06-11  Martin Sebor  <msebor@redhat.com>
9545         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9546         (Wno-class-memaccess): Add @opindex.
9547         (Wno-templates, Wno-multiple-inheritance): Same.
9548         (Wno-virtual-inheritance, Wno-namespaces): Same.
9549         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9550         (Wno-format-overflow, Wno-format-truncation): Same.
9551         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9552         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9553         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9554         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9555         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9556         (Wno-misspelled-isr): Same.
9558 2018-06-11  Martin Sebor  <msebor@redhat.com>
9560         * PR tree-optimization/86083
9561         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9563 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9565         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9567 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9569         PR target/85755
9570         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9571         on the correct operand.
9572         (*movdi_internal64): Ditto.
9574 2018-06-11  Martin Liska  <mliska@suse.cz>
9576         PR tree-optimization/86089
9577         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9579 2018-06-11  Julia Koval  <julia.koval@intel.com>
9581         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9582         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9583         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9585 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9587         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9588         for Ada with strict dwarf2.
9590 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9592         PR target/85755
9593         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9594         addresses.
9596 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9598         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9600 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9602         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9603         TARGET_ELF.
9605 2018-06-08  Martin Liska  <mliska@suse.cz>
9607         * tree-cfg.h (debug_function): Fix argument type to match
9608         implementation.
9610 2018-06-08  Martin Liska  <mliska@suse.cz>
9612         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9613         Remove usage of MPX-related (and removed) fields.
9614         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9616 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
9618         * cfg.c (debug): Use TDF_NONE rather than 0.
9619         * cfghooks.c (debug): Likewise.
9620         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9621         (struct dump_option_value_info): Convert to...
9622         (struct kv_pair): ...this template type.
9623         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9624         rather than 0.
9625         (optinfo_verbosity_options): Likewise.
9626         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9627         OPTGROUP_NONE.
9628         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9629         than int for "optgroup_flags" param.
9630         (dump_generic_expr_loc): Use dump_flags_t rather than int for
9631         "dump_kind" param.
9632         (dump_dec): Likewise.
9633         (dump_finish): Use TDF_NONE rather than 0.
9634         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9635         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
9636         than 0.  Update for change to option_ptr.
9637         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9638         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
9639         0.  Update for changes to optinfo_verbosity_options and
9640         optgroup_options.
9641         (opt_info_switch_p): Convert optgroup_flags from int to
9642         optgroup_flags_t.
9643         (dump_basic_block): Use dump_flags_t rather than int
9644         for "dump_kind" param.
9645         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9646         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9647         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9648         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9649         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9650         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9651         TDF_NONE): Convert from macros to...
9652         (enum dump_flag): ...this new enum.
9653         (dump_flags_t): Update to use enum.
9654         (operator|, operator&, operator~, operator|=, operator&=):
9655         Implement for dump_flags_t.
9656         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9657         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9658         Convert from macros to...
9659         (enum optgroup_flag): ...this new enum.
9660         (optgroup_flags_t): New typedef.
9661         (operator|, operator|=): Implement for optgroup_flags_t.
9662         (struct dump_file_info): Convert field "alt_flags" to
9663         dump_flags_t.  Convert field "optgroup_flags" to
9664         optgroup_flags_t.
9665         (dump_basic_block): Use dump_flags_t rather than int for param.
9666         (dump_generic_expr_loc): Likewise.
9667         (dump_dec): Likewise.
9668         (dump_register): Convert param "optgroup_flags" to
9669         optgroup_flags_t.
9670         (opt_info_enable_passes): Likewise.
9671         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9672         than 0.
9673         * gimple-pretty-print.c (debug): Likewise.
9674         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9675         (merged_store_group::apply_stores): Likewise.
9676         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9677         * gimple.c (verify_gimple_pp): Likewise.
9678         * graphite-poly.c (print_pbb_body): Likewise.
9679         * passes.c (pass_manager::register_one_dump_file): Convert
9680         local "optgroup_flags" to optgroup_flags_t.
9681         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9682         (debug): Likewise.
9683         (debug_body): Likewise.
9684         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9685         to optgroup_flags_t.
9686         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9687         than 0.
9688         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9689         (convert_mult_to_fma): Likewise.
9690         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9691         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9692         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9693         "dump_kind" to dump_flags_t.
9695 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9697         * config/rs6000/rs6000.c (min, max): Delete.
9699 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9701         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9702         -mabi=spe and -mabi=no-spe.
9704 2018-06-08  Martin Liska  <mliska@suse.cz>
9706         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9707         where we expect an existing summary.
9709 2018-06-08  Martin Liska  <mliska@suse.cz>
9711         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9712         * ipa-inline.h (estimate_edge_growth): Likewise.
9714 2018-06-08  Martin Liska  <mliska@suse.cz>
9716         * cgraph.c (function_version_hasher::hash): Use
9717         cgraph_node::get_uid ().
9718         (function_version_hasher::equal):
9719         * cgraph.h (cgraph_node::get_uid): New method.
9720         * ipa-inline.c (update_caller_keys): Use
9721         cgraph_node::get_uid ().
9722         (update_callee_keys): Likewise.
9723         * ipa-utils.c (searchc): Likewise.
9724         (ipa_reduced_postorder): Likewise.
9725         * lto-cgraph.c (input_node): Likewise.
9726         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9727         * symbol-summary.h (symtab_insertion): Likewise.
9728         (symtab_removal): Likewise.
9729         (symtab_duplication): Likewise.
9730         * tree-pretty-print.c (dump_function_header): Likewise.
9731         * tree-sra.c (convert_callers_for_node): Likewise.
9733 2018-06-08  Martin Liska  <mliska@suse.cz>
9735         * cgraph.c (symbol_table::create_edge): Always assign a new
9736         unique number.
9737         (symbol_table::free_edge): Do not recycle numbers.
9738         * cgraph.h (cgraph_edge::get): New method.
9739         * symbol-summary.h (symtab_removal): Use it.
9740         (symtab_duplication): Likewise.
9741         (call_summary::hashable_uid): Remove.
9743 2018-06-08  Martin Liska  <mliska@suse.cz>
9745         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9746         (initialize_growth_caches): Remove.
9747         (free_growth_caches): Likewise.
9748         (do_estimate_edge_time): Use edge_growth_cache.
9749         (do_estimate_edge_size): Likewise.
9750         (do_estimate_edge_hints): Likewise.
9751         * ipa-inline.c (reset_edge_caches): Likewise.
9752         (recursive_inlining): Likewise.
9753         (inline_small_functions): Likewise.
9754         * ipa-inline.h (initialize_growth_caches): Remove.
9755         (estimate_edge_size): Likewise.
9756         (estimate_edge_time): Likewise.
9757         (estimate_edge_hints): Likewise.
9758         (reset_edge_growth_cache): Likewise.
9759         * symbol-summary.h (call_summary::remove): New method.
9761 2018-06-08  Martin Liska  <mliska@suse.cz>
9763         * ipa-cp.c (class edge_clone_summary): New summary.
9764         (grow_edge_clone_vectors): Remove.
9765         (ipcp_edge_duplication_hook): Remove.
9766         (class edge_clone_summary_t): New call_summary class.
9767         (ipcp_edge_removal_hook): Remove.
9768         (edge_clone_summary_t::duplicate): New function.
9769         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9770         (create_specialized_node): Likewise.
9771         (ipcp_driver): Initialize edge_clone_summaries and do not
9772         register hooks.
9774 2018-06-08  Martin Liska  <mliska@suse.cz>
9776         * symbol-summary.h (get): New function.
9777         (call_summary::m_initialize_when_cloning): New class member.
9779 2018-06-08  Martin Liska  <mliska@suse.cz>
9781         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9782         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9783         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9784         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9785         (remove_cgraph_node_from_order): Use the removed_nodes set.
9786         (do_per_function_toporder): Likwise.
9787         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9788         instead of summary_uid.
9789         (symtab_removal): Likewise.
9790         (symtab_duplication): Likewise.
9792 2018-06-08  Martin Liska  <mliska@suse.cz>
9794         * ipa-cp.c (ipcp_store_bits_results): Use
9795         ipcp_transformation_sum.
9796         (ipcp_store_vr_results): Likewise.
9797         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9798         to ...
9799         (ipcp_transformation_initialize): ... this.
9800         (ipa_set_node_agg_value_chain):
9801         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9802         (write_ipcp_transformation_info): Likewise.
9803         (read_ipcp_transformation_info): Likewise.
9804         (ipcp_update_bits): Likewise.
9805         (ipcp_update_vr): Likewise.
9806         (ipcp_transform_function): Likewise.
9807         * ipa-prop.h: Rename ipcp_transformation_summary to
9808         ipcp_transformation.
9809         (class ipcp_transformation_t): New function summary.
9810         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9811         (ipa_get_agg_replacements_for_node): Likewise.
9813 2018-06-08  Martin Liska  <mliska@suse.cz>
9815         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9816         of struct.
9817         (class funct_state_summary_t): New function_summary class.
9818         (has_function_state): Remove.
9819         (get_function_state): Likewise.
9820         (set_function_state): Likewise.
9821         (add_new_function): Likewise.
9822         (funct_state_summary_t::insert): New function.
9823         (duplicate_node_data): Remove.
9824         (remove_node_data): Remove.
9825         (funct_state_summary_t::duplicate): New function.
9826         (register_hooks): Create new funct_state_summaries.
9827         (pure_const_generate_summary): Use it.
9828         (pure_const_write_summary): Likewise.
9829         (pure_const_read_summary): Likewise.
9830         (propagate_pure_const): Likewise.
9831         (propagate_nothrow): Likewise.
9832         (dump_malloc_lattice): Likewise.
9833         (propagate_malloc): Likewise.
9834         (execute): Do not register hooks, just remove summary
9835         instead.
9836         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9837         constructor.
9839 2018-06-08  Martin Liska  <mliska@suse.cz>
9841         * ipa-reference.c (remove_node_data): Remove.
9842         (duplicate_node_data): Likewise.
9843         (class ipa_ref_var_info_summary_t): New class.
9844         (class ipa_ref_opt_summary_t): Likewise.
9845         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9846         (get_reference_optimization_summary): Use
9847         ipa_ref_opt_sum_summaries.
9848         (set_reference_vars_info): Remove.
9849         (set_reference_optimization_summary): Likewise.
9850         (ipa_init): Create summaries.
9851         (init_function_info): Use function summary.
9852         (ipa_ref_opt_summary_t::duplicate): New function.
9853         (ipa_ref_opt_summary_t::remove): New function.
9854         (get_read_write_all_from_node): Fix GNU coding style.
9855         (propagate): Use function summary.
9856         (write_node_summary_p): Fix GNU coding style.
9857         (stream_out_bitmap): Likewise.
9858         (ipa_reference_read_optimization_summary): Use function summary.
9859         (ipa_reference_c_finalize): Do not release hooks.
9861 2018-06-08  Martin Liska  <mliska@suse.cz>
9863         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9864         (analyze_function_body): Extract multiple calls of get_create.
9865         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9866         * ipa-inline.c (recursive_inlining): Use ::get method.
9867         * ipa-inline.h (estimate_edge_growth): Likewise.
9869 2018-06-08  Martin Liska  <mliska@suse.cz>
9871         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9872         HSA_INVALID.
9873         (hsa_function_summary::hsa_function_summary): Use the new enum
9874         value.
9875         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9876         * hsa-gen.c (hsa_get_host_function): Likewise.
9877         (get_brig_function_name): Likewise.
9878         * ipa-hsa.c (process_hsa_functions): Likewise.
9879         (ipa_hsa_write_summary): Likewise.
9880         * symbol-summary.h (symtab_duplication): Use ::get function/
9881         (get): New function.
9883 2018-06-08  Martin Liska  <mliska@suse.cz>
9885         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9886         of get.
9887         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9888         (hsa_register_kernel): Likewise.
9889         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9890         * hsa-gen.c (hsa_get_host_function): Likewise.
9891         (get_brig_function_name): Likewise.
9892         (generate_hsa): Likewise.
9893         (pass_gen_hsail::execute): Likewise.
9894         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9895         (devirtualization_time_bonus): Likewise.
9896         (ipcp_propagate_stage): Likewise.
9897         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9898         (edge_set_predicate): Likewise.
9899         (evaluate_conditions_for_known_args): Likewise.
9900         (evaluate_properties_for_edge): Likewise.
9901         (ipa_fn_summary::reset): Likewise.
9902         (ipa_fn_summary_t::duplicate): Likewise.
9903         (dump_ipa_call_summary): Likewise.
9904         (ipa_dump_fn_summary): Likewise.
9905         (analyze_function_body): Likewise.
9906         (compute_fn_summary): Likewise.
9907         (estimate_edge_devirt_benefit): Likewise.
9908         (estimate_edge_size_and_time): Likewise.
9909         (estimate_calls_size_and_time): Likewise.
9910         (estimate_node_size_and_time): Likewise.
9911         (inline_update_callee_summaries): Likewise.
9912         (remap_edge_change_prob): Likewise.
9913         (remap_edge_summaries): Likewise.
9914         (ipa_merge_fn_summary_after_inlining): Likewise.
9915         (ipa_update_overall_fn_summary): Likewise.
9916         (read_ipa_call_summary): Likewise.
9917         (inline_read_section): Likewise.
9918         (write_ipa_call_summary): Likewise.
9919         (ipa_fn_summary_write): Likewise.
9920         (ipa_free_fn_summary): Likewise.
9921         * ipa-hsa.c (process_hsa_functions): Likewise.
9922         (ipa_hsa_write_summary): Likewise.
9923         (ipa_hsa_read_section): Likewise.
9924         * ipa-icf.c (sem_function::merge): Likewise.
9925         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9926         (do_estimate_edge_time): Likewise.
9927         (estimate_size_after_inlining): Likewise.
9928         (estimate_growth): Likewise.
9929         (growth_likely_positive): Likewise.
9930         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9931         (inline_call): Likewise.
9932         * ipa-inline.c (caller_growth_limits): Likewise.
9933         (can_inline_edge_p): Likewise.
9934         (can_inline_edge_by_limits_p): Likewise.
9935         (compute_uninlined_call_time): Likewise.
9936         (compute_inlined_call_time): Likewise.
9937         (want_inline_small_function_p): Likewise.
9938         (edge_badness): Likewise.
9939         (update_caller_keys): Likewise.
9940         (update_callee_keys): Likewise.
9941         (recursive_inlining): Likewise.
9942         (inline_small_functions): Likewise.
9943         (inline_to_all_callers_1): Likewise.
9944         (dump_overall_stats): Likewise.
9945         (early_inline_small_functions): Likewise.
9946         (early_inliner): Likewise.
9947         * ipa-inline.h (estimate_edge_growth): Likewise.
9948         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9949         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9950         * ipa-prop.h (IPA_NODE_REF): Likewise.
9951         (IPA_EDGE_REF): Likewise.
9952         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9953         (propagate_malloc): Likewise.
9954         * ipa-split.c (execute_split_functions): Likewise.
9955         * symbol-summary.h: Rename get to get_create.
9956         (get): Likewise.
9957         (get_create): Likewise.
9958         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9960 2018-06-08  Martin Liska  <mliska@suse.cz>
9962         * symbol-summary.h (release): Move definition out of class
9963         declaration.
9964         (symtab_removal): Likewise.
9965         (symtab_duplication): Likewise.
9967 2018-06-08  Martin Liska  <mliska@suse.cz>
9969         * symbol-summary.h (function_summary): Move constructor
9970         implementation out of class declaration.
9971         (release): Likewise.
9972         (symtab_insertion): Likewise.
9973         (symtab_removal): Likewise.
9974         (symtab_duplication): Likewise.
9975         (get): Likewise.
9977 2018-06-08  Martin Liska  <mliska@suse.cz>
9979         * Makefile.in: Remove support for MPX (macros, related functions,
9980         fields in cgraph_node, ...).
9981         * builtin-types.def (BT_BND): Likewise.
9982         (BT_FN_BND_CONST_PTR): Likewise.
9983         (BT_FN_CONST_PTR_BND): Likewise.
9984         (BT_FN_VOID_PTR_BND): Likewise.
9985         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9986         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9987         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9988         (expand_builtin_mempcpy_with_bounds): Likewise.
9989         (expand_builtin_memset_with_bounds): Likewise.
9990         (expand_builtin_memset_args): Likewise.
9991         (std_expand_builtin_va_start): Likewise.
9992         (expand_builtin): Likewise.
9993         (expand_builtin_with_bounds): Likewise.
9994         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9995         (DEF_LIB_BUILTIN_CHKP): Likewise.
9996         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9997         (DEF_CHKP_BUILTIN): Likewise.
9998         (BUILT_IN_MEMCPY): Likewise.
9999         (BUILT_IN_MEMMOVE): Likewise.
10000         (BUILT_IN_MEMPCPY): Likewise.
10001         (BUILT_IN_MEMSET): Likewise.
10002         (BUILT_IN_STPCPY): Likewise.
10003         (BUILT_IN_STRCAT): Likewise.
10004         (BUILT_IN_STRCHR): Likewise.
10005         (BUILT_IN_STRCPY): Likewise.
10006         (BUILT_IN_STRLEN): Likewise.
10007         (BUILT_IN_MEMCPY_CHK): Likewise.
10008         (BUILT_IN_MEMMOVE_CHK): Likewise.
10009         (BUILT_IN_MEMPCPY_CHK): Likewise.
10010         (BUILT_IN_MEMSET_CHK): Likewise.
10011         (BUILT_IN_STPCPY_CHK): Likewise.
10012         (BUILT_IN_STRCAT_CHK): Likewise.
10013         (BUILT_IN_STRCPY_CHK): Likewise.
10014         * calls.c (store_bounds): Likewise.
10015         (emit_call_1): Likewise.
10016         (special_function_p): Likewise.
10017         (maybe_warn_nonstring_arg): Likewise.
10018         (initialize_argument_information): Likewise.
10019         (finalize_must_preallocate): Likewise.
10020         (compute_argument_addresses): Likewise.
10021         (expand_call): Likewise.
10022         * cfgexpand.c (expand_call_stmt): Likewise.
10023         (expand_return): Likewise.
10024         (expand_gimple_stmt_1): Likewise.
10025         (pass_expand::execute): Likewise.
10026         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10027         (cgraph_node::remove): Likewise.
10028         (cgraph_node::dump): Likewise.
10029         (cgraph_node::verify_node): Likewise.
10030         * cgraph.h (chkp_function_instrumented_p): Likewise.
10031         (symtab_node::get_alias_target): Likewise.
10032         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10033         (cgraph_local_p): Likewise.
10034         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10035         (cgraph_edge::rebuild_references): Likewise.
10036         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10037         (walk_polymorphic_call_targets): Likewise.
10038         (cgraph_node::expand_thunk): Likewise.
10039         (symbol_table::output_weakrefs): Likewise.
10040         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10041         (ix86_handle_option): Likewise.
10042         * config/i386/constraints.md: Likewise.
10043         * config/i386/i386-builtin-types.def (BND): Likewise.
10044         (VOID): Likewise.
10045         (PVOID): Likewise.
10046         (ULONG): Likewise.
10047         * config/i386/i386-builtin.def (BDESC_END): Likewise.
10048         (BDESC_FIRST): Likewise.
10049         (BDESC): Likewise.
10050         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10051         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10052         * config/i386/i386.c (enum reg_class): Likewise.
10053         (ix86_target_string): Likewise.
10054         (ix86_option_override_internal): Likewise.
10055         (ix86_conditional_register_usage): Likewise.
10056         (ix86_valid_target_attribute_inner_p): Likewise.
10057         (ix86_set_indirect_branch_type): Likewise.
10058         (ix86_set_current_function): Likewise.
10059         (ix86_function_arg_regno_p): Likewise.
10060         (init_cumulative_args): Likewise.
10061         (ix86_function_arg_advance): Likewise.
10062         (ix86_function_arg): Likewise.
10063         (ix86_pass_by_reference): Likewise.
10064         (ix86_function_value_regno_p): Likewise.
10065         (ix86_function_value_1): Likewise.
10066         (ix86_function_value_bounds): Likewise.
10067         (ix86_return_in_memory): Likewise.
10068         (ix86_setup_incoming_vararg_bounds): Likewise.
10069         (ix86_va_start): Likewise.
10070         (indirect_thunk_need_prefix): Likewise.
10071         (print_reg): Likewise.
10072         (ix86_print_operand): Likewise.
10073         (ix86_expand_call): Likewise.
10074         (ix86_output_function_return): Likewise.
10075         (reg_encoded_number): Likewise.
10076         (BDESC_VERIFYS): Likewise.
10077         (ix86_init_mpx_builtins): Likewise.
10078         (ix86_init_builtins): Likewise.
10079         (ix86_emit_cmove): Likewise.
10080         (ix86_emit_move_max): Likewise.
10081         (ix86_expand_builtin): Likewise.
10082         (ix86_builtin_mpx_function): Likewise.
10083         (ix86_get_arg_address_for_bt): Likewise.
10084         (ix86_load_bounds): Likewise.
10085         (ix86_store_bounds): Likewise.
10086         (ix86_load_returned_bounds): Likewise.
10087         (ix86_store_returned_bounds): Likewise.
10088         (ix86_class_likely_spilled_p): Likewise.
10089         (ix86_hard_regno_mode_ok): Likewise.
10090         (x86_order_regs_for_local_alloc): Likewise.
10091         (ix86_mitigate_rop): Likewise.
10092         (ix86_bnd_prefixed_insn_p): Likewise.
10093         (ix86_mpx_bound_mode): Likewise.
10094         (ix86_make_bounds_constant): Likewise.
10095         (ix86_initialize_bounds): Likewise.
10096         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10097         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10098         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10099         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10100         (TARGET_CHKP_BOUND_MODE): Likewise.
10101         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10102         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10103         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10104         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10105         * config/i386/i386.h (TARGET_MPX): Likewise.
10106         (TARGET_MPX_P): Likewise.
10107         (VALID_BND_REG_MODE): Likewise.
10108         (FIRST_BND_REG): Likewise.
10109         (LAST_BND_REG): Likewise.
10110         (enum reg_class): Likewise.
10111         (BND_REG_P): Likewise.
10112         (BND_REGNO_P): Likewise.
10113         (BNDmode): Likewise.
10114         (ADJUST_INSN_LENGTH): Likewise.
10115         * config/i386/i386.md: Likewise.
10116         * config/i386/i386.opt: Likewise.
10117         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10118         (defined): Likewise.
10119         (LINK_MPX): Likewise.
10120         (MPX_SPEC): Likewise.
10121         (LIBMPX_SPEC): Likewise.
10122         (LIBMPXWRAPPERS_SPEC): Likewise.
10123         (CHKP_SPEC): Likewise.
10124         * config/i386/predicates.md: Likewise.
10125         * dbxout.c (dbxout_type): Likewise.
10126         * doc/extend.texi: Likewise.
10127         * doc/invoke.texi: Likewise.
10128         * doc/md.texi: Likewise.
10129         * doc/tm.texi: Likewise.
10130         * doc/tm.texi.in: Likewise.
10131         * dwarf2out.c (is_base_type): Likewise.
10132         (gen_formal_types_die): Likewise.
10133         (gen_subprogram_die): Likewise.
10134         (gen_type_die_with_usage): Likewise.
10135         (gen_decl_die): Likewise.
10136         (dwarf2out_late_global_decl): Likewise.
10137         * expr.c (expand_assignment): Likewise.
10138         (emit_storent_insn): Likewise.
10139         (store_expr_with_bounds): Likewise.
10140         (store_expr): Likewise.
10141         (expand_expr_real_1): Likewise.
10142         * expr.h (store_expr_with_bounds): Likewise.
10143         * function.c (use_register_for_decl): Likewise.
10144         (struct bounds_parm_data): Likewise.
10145         (assign_parms_augmented_arg_list): Likewise.
10146         (assign_parm_find_entry_rtl): Likewise.
10147         (assign_parm_is_stack_parm): Likewise.
10148         (assign_parm_load_bounds): Likewise.
10149         (assign_bounds): Likewise.
10150         (assign_parms): Likewise.
10151         (expand_function_start): Likewise.
10152         * gcc.c (CHKP_SPEC): Likewise.
10153         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10154         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10155         (wrestrict_dom_walker::check_call): Likewise.
10156         * gimple.c (gimple_build_call_from_tree): Likewise.
10157         * gimple.h (enum gf_mask): Likewise.
10158         (gimple_call_with_bounds_p): Likewise.
10159         (gimple_call_set_with_bounds): Likewise.
10160         * gimplify.c (gimplify_init_constructor): Likewise.
10161         * ipa-cp.c (initialize_node_lattices): Likewise.
10162         (propagate_constants_across_call): Likewise.
10163         (find_more_scalar_values_for_callers_subset): Likewise.
10164         * ipa-hsa.c (process_hsa_functions): Likewise.
10165         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10166         * ipa-icf.c (sem_function::merge): Likewise.
10167         * ipa-inline.c (early_inliner): Likewise.
10168         * ipa-pure-const.c (warn_function_noreturn): Likewise.
10169         (warn_function_cold): Likewise.
10170         (propagate_pure_const): Likewise.
10171         * ipa-ref.h (enum GTY): Likewise.
10172         * ipa-split.c (find_retbnd): Likewise.
10173         (consider_split): Likewise.
10174         (split_function): Likewise.
10175         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10176         * ipa.c (walk_polymorphic_call_targets): Likewise.
10177         (symbol_table::remove_unreachable_nodes): Likewise.
10178         (process_references): Likewise.
10179         (cgraph_build_static_cdtor_1): Likewise.
10180         * lto-cgraph.c (lto_output_node): Likewise.
10181         (output_refs): Likewise.
10182         (compute_ltrans_boundary): Likewise.
10183         (input_overwrite_node): Likewise.
10184         (input_node): Likewise.
10185         (input_cgraph_1): Likewise.
10186         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10187         * passes.c (pass_manager::execute_early_local_passes): Likewise.
10188         (class pass_chkp_instrumentation_passes): Likewise.
10189         (make_pass_chkp_instrumentation_passes): Likewise.
10190         * passes.def: Likewise.
10191         * rtl.h (struct GTY): Likewise.
10192         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10193         * stor-layout.c (layout_type): Likewise.
10194         * symtab.c: Likewise.
10195         * target.def: Likewise.
10196         * targhooks.c (default_chkp_bound_type): Likewise.
10197         (default_chkp_bound_mode): Likewise.
10198         (default_builtin_chkp_function): Likewise.
10199         (default_chkp_function_value_bounds): Likewise.
10200         (default_chkp_make_bounds_constant): Likewise.
10201         (default_chkp_initialize_bounds): Likewise.
10202         * targhooks.h (default_chkp_bound_type): Likewise.
10203         (default_chkp_bound_mode): Likewise.
10204         (default_builtin_chkp_function): Likewise.
10205         (default_chkp_function_value_bounds): Likewise.
10206         (default_chkp_make_bounds_constant): Likewise.
10207         (default_chkp_initialize_bounds): Likewise.
10208         * toplev.c (compile_file): Likewise.
10209         (process_options): Likewise.
10210         * tree-core.h (DEF_BUILTIN): Likewise.
10211         (DEF_BUILTIN_CHKP): Likewise.
10212         * tree-inline.c (declare_return_variable): Likewise.
10213         (remap_gimple_stmt): Likewise.
10214         (copy_bb): Likewise.
10215         (initialize_inlined_parameters): Likewise.
10216         (expand_call_inline): Likewise.
10217         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10218         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10219         (make_pass_ipa_chkp_produce_thunks): Likewise.
10220         (make_pass_chkp): Likewise.
10221         (make_pass_chkp_opt): Likewise.
10222         (make_pass_chkp_instrumentation_passes): Likewise.
10223         * tree-pretty-print.c (dump_generic_node): Likewise.
10224         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10225         * tree-ssa-dce.c (propagate_necessity): Likewise.
10226         (eliminate_unnecessary_stmts): Likewise.
10227         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10228         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10229         * tree-ssa-sccvn.h: Likewise.
10230         * tree-ssa-strlen.c (get_string_length): Likewise.
10231         (valid_builtin_call): Likewise.
10232         (adjust_last_stmt): Likewise.
10233         (handle_builtin_strchr): Likewise.
10234         (handle_builtin_strcpy): Likewise.
10235         (handle_builtin_stxncpy): Likewise.
10236         (handle_builtin_memcpy): Likewise.
10237         (handle_builtin_strcat): Likewise.
10238         (strlen_check_and_optimize_stmt): Likewise.
10239         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10240         * tree-streamer-in.c: Likewise.
10241         * tree-streamer.c (record_common_node): Likewise.
10242         * tree.c (tree_code_size): Likewise.
10243         (wide_int_to_tree_1): Likewise.
10244         (type_contains_placeholder_1): Likewise.
10245         (build_common_tree_nodes): Likewise.
10246         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10247         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10248         (POINTER_BOUNDS_P): Likewise.
10249         (BOUNDED_TYPE_P): Likewise.
10250         (BOUNDED_P): Likewise.
10251         (CALL_WITH_BOUNDS_P): Likewise.
10252         (pointer_bounds_type_node): Likewise.
10253         * value-prof.c (gimple_ic): Likewise.
10254         * var-tracking.c (vt_add_function_parameters): Likewise.
10255         * varasm.c (make_decl_rtl): Likewise.
10256         (assemble_start_function): Likewise.
10257         (output_constant): Likewise.
10258         (maybe_assemble_visibility): Likewise.
10259         * varpool.c (ctor_for_folding): Likewise.
10260         * chkp-builtins.def: Remove.
10261         * ipa-chkp.c: Remove.
10262         * ipa-chkp.h: Remove.
10263         * rtl-chkp.c: Remove.
10264         * rtl-chkp.h: Remove.
10265         * tree-chkp-opt.c: Remove.
10266         * tree-chkp.c: Remove.
10267         * tree-chkp.h: Remove.
10269 2018-06-07  Carl Love  <cel@us.ibm.com>
10271         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10272         vextract_fp_from_shortl): Add BE support.
10274 2018-06-07  Paul Koning  <ni1d@arrl.net>
10276         * compare-elim.c (try_merge_compare): Don't merge compare if
10277         address contains a side effect.
10278         (try_eliminate_compare): Likewise.
10280 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
10282         * config.gcc: Support "tremont".
10283         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10284         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10285         PROCESSOR_TREMONT.
10286         * config/i386/i386.c (m_TREMONT): Define.
10287         (processor_target_table): Add "tremont".
10288         (PTA_TREMONT): Define.
10289         (ix86_lea_outperforms): Add TARGET_TREMONT.
10290         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10291         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10292         and M_INTEL_GOLDMONT_PLUS.
10293         (fold_builtin_cpu): Add "tremont".
10294         (ix86_add_stmt_cost): Add TARGET_TREMONT.
10295         (ix86_option_override_internal): Add "tremont".
10296         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10297         (processor_type): Add PROCESSOR_TREMONT.
10298         * config/i386/x86-tune.def: Add m_TREMONT.
10299         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10301 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10303         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10304         symbol defined for msp430i* devices to be lower case.
10306 2018-06-07  Richard Biener  <rguenther@suse.de>
10308         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10309         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10310         Properly wrap signed arithmetic if overflow wraps.
10312 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10314         PR tree-optimization/69615
10315         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10316         of a cast from a same precision integral SSA_NAME in a bb dominated
10317         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10318         cast to utype if rhs2 has already a compatible type.
10320 2018-06-07  Richard Biener  <rguenther@suse.de>
10322         PR tree-optimization/85935
10323         * graphite-scop-detection.c (find_params_in_bb): Analyze
10324         condition operands with respect to the correct loop.  Assert
10325         the analysis doesn't fail.
10327 2018-06-04  Carl Love  <cel@us.ibm.com>
10329         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10330         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10331         as it is slightly cheaper.
10332         (first_match_or_eos_index_<mode>):
10333         Calculate index using natural element order.
10334         (first_match_index_<mode>):
10335         Calculate index using natural element order.
10336         (first_match_or_eos_index_<mode>):
10337         Calculate index using natural order.
10338         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10339         for BE and LE modes.
10340         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10341         P9V_BUILTIN_VCLZLSBB_V16QI.
10342         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10343         specific.
10345 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10347         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10348         indentation and line wrap for many prototypes.  Add missing
10349         @smallexample directives around block of prototypes for vec_xl and
10350         vec_xst.
10352 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10354         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10355         track if we pass or return IEEE 128-bit floating point.
10356         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10357         C++ mangling that is compatible with GCC 8.1.
10358         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10359         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10360         floating point types.
10361         (rs6000_function_arg_advance_1): Likewise.
10362         (rs6000_mangle_type): Optionally generate mangled names that match
10363         what GCC 8.1 generated for IEEE 128-bit floating point types.
10364         (rs6000_globalize_decl_name): If we have an external function that
10365         passes or returns IEEE 128-bit types, generate a weak reference
10366         from the mangled name used in GCC 8.1 to the current mangled
10367         name.
10368         (rs6000_init_builtins): Make __ibm128 use the long double type if
10369         long double is IBM extended double.  Make __float128 use the long
10370         double type if long double is IEEE 128-bit.
10372         PR target/85657
10373         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10374         macro for __ibm128 built-in functions.
10375         (PACK_IF): Add __ibm128 pack/unpack functions.
10376         (UNPACK_IF): Likewise.
10377         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10378         enable long double built-in functions if long double is IEEE
10379         128-bit floating point.
10380         (rs6000_invalid_builtin): Update long double built-in function
10381         error message.
10382         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10383         functions, adjust the built-in function to use the long double
10384         built-in function if __ibm128 and long double are the same type.
10385         * doc/extend.texi (PowerPC builtins): Update documention for
10386         __builtin_{,un}pack_longdouble.  Add documentation for
10387         __builtin_{,un}pack_ibm128.
10389 2018-06-06  Jim Wilson  <jimw@sifive.com>
10391         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10392         (struct machine_function): New field interrupt_mode.
10393         (riscv_handle_type_attribute): New function.  Add forward declaration.
10394         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10395         (riscv_expand_epilogue): Check interrupt_mode field.
10396         (riscv_set_current_function): Check interrupt attribute args and
10397         set interrupt_mode field.
10398         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10399         (riscv_sret, riscv_uret): New.
10400         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10401         new arguments to interrupt attribute.
10403 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10405         PR target/63177
10406         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10407         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10409 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10411         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10412         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10413         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10414         several redundant entries.
10416 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10418         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10419         type from "rtx" to "rtx_insn *".
10420         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10421         for local "call_insn", removing cast.
10422         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10424 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10426         PR tree-optimization/86066
10427         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10428         for BIT_INSERT_EXPR stores.
10430 2018-06-06  Richard Biener  <rguenther@suse.de>
10432         PR tree-optimization/86062
10433         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10434         component refs ontop
10435         of to be offsetted base.
10437 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10439         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10440         to be static and remove check on interrupt attribute name.
10442 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10444         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10445         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10447 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10449         PR target/79924
10450         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10451         second argument.
10452         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10453         Remove second argument, change how error is called.
10454         (aarch64_layout_arg): Remove second argument from
10455         aarch64_err_no_fpadvsimd call.
10456         (aarch64_init_cumulative_args): Ditto.
10457         (aarch64_gimplify_va_arg_expr): Ditto.
10458         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10460 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10462         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10463         (*simple_return_indirect_internal<mode>): Rename from
10464         simple_return_indirect_internal.  Use W mode iterator.
10465         (rstorssp): New expander.
10466         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10467         (clrssbsy): New expander.
10468         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10470 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10472         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10473         __typeof__.
10474         (cmse_check_pointed_object): Likewise.
10476 2018-06-05  Martin Liska  <mliska@suse.cz>
10478         PR gcov-profile/47618
10479         * doc/invoke.texi: Document how -fprofile-dir format
10480         is extended.
10482 2018-06-05  Richard Biener  <rguenther@suse.de>
10484         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10485         removal pretend DOM info isn't available so we do not update
10486         it and only remove edges, not dominated blocks.  Actually free
10487         DOM info in case we removed something.  Remove unreachable blocks.
10488         (mfb_keep_latches): Work with either DOM info or marked backedges.
10489         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10490         first.  Mark backedges if DOM info isn't available.
10491         (Re-)compute DOM info after cleanup_control_flow_pre.
10493 2018-06-05  Richard Biener  <rguenther@suse.de>
10495         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10496         (locus_discrim_hasher::hash): Adjust.
10497         (locus_discrim_hasher::equal): Likewise.
10498         (next_discriminator_for_locus): Work on line directly.
10499         (same_line_p): Pass in expanded locus1 as well.
10500         (assign_discriminators): Avoid redundant location expansions.
10502 2018-06-05  Richard Biener  <rguenther@suse.de>
10504         PR tree-optimization/86046
10505         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10506         if required after clearing TREE_ADDRESSABLE.
10508 2018-06-05  Richard Biener  <rguenther@suse.de>
10510         PR tree-optimization/86047
10511         * tree-ssa-loop.c (for_each_index): Glob handling of all
10512         decls and constants and really handle all of them.
10514 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10516         PR target/81497
10517         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10518         qualifier_void_pointer and qualifier_const_void_pointer.
10519         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10520         (arm_init_builtins): Handle the above.
10521         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10522         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10523         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10524         void intrinsics.
10526 2018-06-05  Martin Liska  <mliska@suse.cz>
10528         * auto-profile.c (read_autofdo_file): Do not use
10529         gcov_ctr_summary struct.
10530         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10531         * coverage.c (struct counts_entry): Likewise.
10532         (read_counts_file): Read just single summary entry.
10533         (get_coverage_counts): Use gcov_summary struct.
10534         * coverage.h (get_coverage_counts): Likewise.
10535         * gcov-dump.c (dump_working_sets): Likewise.
10536         (tag_summary): Dump just single summary.
10537         * gcov-io.c (gcov_write_summary): Write just histogram
10538         summary.
10539         (gcov_read_summary): Read just single summary.
10540         (compute_working_sets): Use gcov_summary struct.
10541         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10542         of GCOV_COUNTERS_SUMMABLE.
10543         (GCOV_COUNTERS_SUMMABLE): Remove.
10544         (GCOV_FIRST_VALUE_COUNTER): Replace with
10545         GCOV_COUNTER_V_INTERVAL.
10546         (struct gcov_ctr_summary): Remove.
10547         (struct gcov_summary): Directly use fields of former
10548         gcov_ctr_summary.
10549         (compute_working_sets): Use gcov_summary struct.
10550         * gcov.c (read_count_file): Do not use ctrs fields.
10551         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10552         struct.
10553         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10554         struct.
10555         * profile.c: Likewise.
10556         * profile.h: Likewise.
10558 2018-06-05  Martin Liska  <mliska@suse.cz>
10560         PR gcov-profile/84846
10561         * gcov.c (output_lines): Print working directory only
10562         in intermediate format.
10564 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10566         * config/s390/s390-builtin-types.def: Add void function type.
10567         * config/s390/s390-builtins.def: Use the function type for the
10568         tbeginc builtin.
10570 2018-06-04  Jim Wilson  <jimw@sifive.com>
10572         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10573         to int.
10574         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10575         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10576         handle EH_RETURN_DATA_REGNO registers properly.
10577         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10578         (riscv_expand_epilogue): Update comment.  Change argument name and
10579         type.  Update code to use new name and type.  Pass new args to
10580         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10581         EXCEPTION_RETURN.
10582         * config/riscv/riscv.md (NORMAL_RETURN): New.
10583         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10584         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10585         (eh_return): Call gen_eh_return_internal and emit barrier.
10586         (eh_return_internal): Call riscv_expand_epilogue.
10588 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10590         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10591         bit_insertion field and declare can_be_merged_into method.
10592         (merged_store_group::can_be_merged_into): New method.
10593         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10594         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10595         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10597 2018-06-04  Richard Biener  <rguenther@suse.de>
10599         PR tree-optimization/85955
10600         * builtins.c (fold_builtin_sincos): Convert pointers to
10601         destination to appropriate type before dereferencing.
10603 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10605         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10607 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
10609         * expr.c (expand_expr_real_1): Force the operand into memory if
10610         its TYPE_MODE is BLKmode and if there is no integer mode for
10611         the number of bits being extracted.
10613 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10615         PR target/85832
10616         PR target/86036
10617         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10618         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10620 2018-06-04  Richard Biener  <rguenther@suse.de>
10622         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10623         (cleanup_tree_cfg_noloop): ... single caller.  Do
10624         start_recording_case_labels later.
10626 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
10628         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10629         to _IMMINTRIN_H_INCLUDED.
10630         * config/i386/pconfigintrin.h: Ditto.
10631         * config/i386/waitpkgintrin.h: Ditto.
10632         * config/i386/immintrin.h: Add includes for sgxintrin.h,
10633         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10634         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10635         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10636         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10637         waitpkgintrin.h and cldemoteintrin.h.
10639 2018-06-04  Richard Biener  <rguenther@suse.de>
10641         PR tree-optimization/86038
10642         * tracer.c (find_best_successor): Check probability for
10643         being initialized, bail out if not.
10645 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
10647         PR target/86003
10648         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10649         of bits to ignore when comparing architectures.
10651 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10653         PR tree-optimization/69615
10654         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10655         maximum or minimum of the type, try to merge it also as if
10656         range1 is + [-, x - 1] or + [x + 1, -].
10658         PR c++/86025
10659         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10661 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10663         PR tree-optimization/86034
10664         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10665         the unsigned bitfield type in a bit insertion sequence if it does not
10666         have a larger precision than the bitfield size.
10667         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10669 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10671         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10673 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10675         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10676         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10677         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10678         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10680 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10682         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10683         Disable -fdelete-null-pointer-checks for ELF toolchain.
10685 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10686             Kito Cheng  <kito.cheng@gmail.com>
10688         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10689         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10690         (nds32*-*-*): Add glibc and uclibc conditions.
10691         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10692         (TARGET_EXCEPT_UNWIND_INFO): Define.
10693         * config/nds32/elf.h: New file.
10694         * config/nds32/linux.h: New file.
10695         * config/nds32/nds32-elf.opt: New file.
10696         * config/nds32/nds32-linux.opt: New file.
10697         * config/nds32/nds32-fp-as-gp.c
10698         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10699         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10700         TARGET_LINUX_ABI.
10701         (nds32_asm_file_end): Ditto.
10702         (nds32_print_operand): Ditto.
10703         (nds32_insert_attributes): Ditto.
10704         (nds32_init_libfuncs): New function.
10705         (TARGET_HAVE_TLS): Define.
10706         (TARGET_INIT_LIBFUNCS): Define.
10707         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10708         spec content.
10709         (TARGET_ELF): Apply different mcmodel setting.
10710         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10711         been migrated into elf.h and linux.h files.
10712         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10713         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10714         (mcmodel): The content has been migrated into nds32-elf.opt and
10715         nds32-linux.opt files.
10716         * config/nds32/t-elf: New file.
10717         * config/nds32/t-linux: New file.
10719 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10720             Shiva Chen  <shiva0217@gmail.com>
10722         * config/nds32/constants.md (unspec_volatile_element): Add
10723         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10724         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10725         optimization.
10726         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10727         (make_pass_nds32_fp_as_gp): Declare.
10728         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10729         optmization pass.
10730         (nds32_asm_function_end_prologue): Remove unused asm output.
10731         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10732         (nds32_asm_file_start): Output necessary fp_as_gp information.
10733         (nds32_option_override): Adjust register usage.
10734         (nds32_expand_prologue): Consider fp_as_gp situation.
10735         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10736         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10737         (epilogue): Ditto.
10738         (return): Ditto.
10739         (simple_return): Ditto.
10740         (omit_fp_begin): Output special directive for fp_as_gp.
10741         (omit_fp_end): Output special directive for fp_as_gp.
10742         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10743         mforbid-fp-as-gp): New options.
10745 2018-06-01  Mark Wielaard  <mark@klomp.org>
10747         * dwarf2out.c (dwarf2out_finish): Remove generation of
10748         DW_AT_loclists_base.
10750 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10752         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10753         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10754         (struct merged_store_group): Add bit_insertion field.
10755         (dump_char_array): Use standard hexadecimal format.
10756         (merged_store_group::merged_store_group): Set bit_insertion to false.
10757         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10758         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10759         also print the mask in the dump file.
10760         (pass_store_merging::gate): Minor tweak.
10761         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10762         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10763         stores with INTEGER_CST stores.
10764         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10765         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10766         and use it throughout.  Generate bit insertion sequences if need be.
10767         (pass_store_merging::process_store): Remove redundant condition.
10768         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10770 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10772         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10773         the 128-bit floating point types.  Fix function comment.
10775 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10777         * config/aarch64/aarch64-simd.md
10778         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10779         mnemonics.
10780         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10781         mnemonics.
10783 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10785         PR tree-optimization/85989
10786         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10787         variable.
10788         (backprop::intersect_uses): Check it when deciding whether this
10789         is a backedge reference.
10790         (backprop::process_block): Add each phi to m_visited_phis
10791         after visiting it, then clear it at the end.
10793 2018-06-01  Richard Biener  <rguenther@suse.de>
10795         * tree-vectorizer.h (vect_dr_stmt): New function.
10796         (vect_get_load_cost): Adjust.
10797         (vect_get_store_cost): Likewise.
10798         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10799         Use vect_dr_stmt instead of DR_SMTT.
10800         (vect_record_base_alignments): Likewise.
10801         (vect_calculate_target_alignment): Likewise.
10802         (vect_compute_data_ref_alignment): Likewise and make static.
10803         (vect_update_misalignment_for_peel): Likewise.
10804         (vect_verify_datarefs_alignment): Likewise.
10805         (vector_alignment_reachable_p): Likewise.
10806         (vect_get_data_access_cost): Likewise.  Pass down
10807         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10808         (vect_get_peeling_costs_all_drs): Likewise.
10809         (vect_peeling_hash_get_lowest_cost): Likewise.
10810         (vect_enhance_data_refs_alignment): Likewise.
10811         (vect_find_same_alignment_drs): Likewise.
10812         (vect_analyze_data_refs_alignment): Likewise.
10813         (vect_analyze_group_access_1): Likewise.
10814         (vect_analyze_group_access): Likewise.
10815         (vect_analyze_data_ref_access): Likewise.
10816         (vect_analyze_data_ref_accesses): Likewise.
10817         (vect_vfa_segment_size): Likewise.
10818         (vect_small_gap_p): Likewise.
10819         (vectorizable_with_step_bound_p): Likewise.
10820         (vect_prune_runtime_alias_test_list): Likewise.
10821         (vect_analyze_data_refs): Likewise.
10822         (vect_supportable_dr_alignment): Likewise.
10823         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10824         (vect_gen_prolog_loop_niters): Likewise.
10825         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10826         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10827         modify DR_STMT.
10828         (vect_recog_mask_conversion_pattern): Likewise.
10829         (vect_try_gather_scatter_pattern): Likewise.
10830         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10831         to vect_get_store_cost.
10832         (vect_get_store_cost): Get stmt_info instead of DR.
10833         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10834         (vect_get_load_cost): Get stmt_info instead of DR.
10836 2018-06-01  Richard Biener  <rguenther@suse.de>
10838         PR middle-end/86017
10839         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10840         vars wrapped in MEM_REFs.
10842 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10844         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10845         Fix subreg tests so that we only return a choice between
10846         GENERAL_REGS and FP_REGS if the original classes included both.
10848 2018-06-01  Richard Biener  <rguenther@suse.de>
10850         PR ipa/85960
10851         * tree-ssa-structalias.c (get_function_part_constraint):
10852         Handle NULL fi->decl.
10853         (find_func_aliases_for_call): Properly handle indirect
10854         fi from direct call.
10855         (find_func_clobbers): Likewise.
10856         (ipa_pta_execute): Likewise.
10857         (create_variable_info_for): For functions that are ifunc_resolver
10858         resolve to a varinfo that contains the result of the resolver call.
10859         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10860         aliases.
10862 2018-05-31  Michael Collison  <michael.collison@arm.com>
10864         * config/aarch64/aarch64.md:
10865         (*fix_to_zero_extenddfdi2): New pattern.
10866         * gcc.target/aarch64/fix_extend1.c: New testcase.
10868 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10870         PR middle-end/78809
10871         PR middle-end/83026
10872         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10873         and BUILT_IN_STRNCMP_EQ.
10874         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10875         BUILT_IN_STRNCMP_EQ.
10876         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10877         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10878         (gimple_fold_builtin): Likewise.
10879         * tree-ssa-strlen.c (compute_string_length): New function.
10880         (determine_min_obsize): New function.
10881         (handle_builtin_string_cmp): New function to handle calls to
10882         string compare functions.
10883         (strlen_optimize_stmt): Add handling to builtin string compare
10884         calls.
10885         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10886         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10887         * tree.c (build_common_builtin_nodes): Add new defines of
10888         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10890 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10892         PR target/85984
10893         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10894         functions with naked attribute.
10896 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10898         * config/i386/sse.md (avx_vec_concat<mode>):
10899         Substitute concat_tg_mode mode attribute with xtg_mode.
10900         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10901         (concat_tg_mode): Remove mode attribute.
10903 2018-05-31  Martin Sebor  <msebor@redhat.com>
10905         PR c/82063
10906         * calls.c (alloc_max_size): Correct a logic error/typo.
10907         Treat excessive arguments as infinite.  Warn for invalid arguments.
10908         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10910 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10912         PR target/85829
10913         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10914         and movx for Haswell.
10916 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10917             Cesar Philippidis  <cesar@codesourcery.com>
10919         PR middle-end/85879
10920         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10921         when emitting error on private/firstprivate reductions.
10922         * omp-low.c (lower_omp_target): Avoid reference-type processing
10923         on pointers for firstprivate clause.
10925 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10927         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10928         (st1x2): Likewise.
10929         (st1x3): Likewise.
10930         * config/aarch64/aarch64-simd.md
10931         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10932         (aarch64_ld1_x3_<mode>): Likewise
10933         (aarch64_st1x2<VALLDIF:mode>): Likewise
10934         (aarch64_st1_x2_<mode>): Likewise
10935         (aarch64_st1x3<VALLDIF:mode>): Likewise
10936         (aarch64_st1_x3_<mode>): Likewise
10937         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10938         (vld1_s8_x3): Likewise.
10939         (vld1_u16_x3): Likewise.
10940         (vld1_s16_x3): Likewise.
10941         (vld1_u32_x3): Likewise.
10942         (vld1_s32_x3): Likewise.
10943         (vld1_u64_x3): Likewise.
10944         (vld1_s64_x3): Likewise.
10945         (vld1_f16_x3): Likewise.
10946         (vld1_f32_x3): Likewise.
10947         (vld1_f64_x3): Likewise.
10948         (vld1_p8_x3): Likewise.
10949         (vld1_p16_x3): Likewise.
10950         (vld1_p64_x3): Likewise.
10951         (vld1q_u8_x3): Likewise.
10952         (vld1q_s8_x3): Likewise.
10953         (vld1q_u16_x3): Likewise.
10954         (vld1q_s16_x3): Likewise.
10955         (vld1q_u32_x3): Likewise.
10956         (vld1q_s32_x3): Likewise.
10957         (vld1q_u64_x3): Likewise.
10958         (vld1q_s64_x3): Likewise.
10959         (vld1q_f16_x3): Likewise.
10960         (vld1q_f32_x3): Likewise.
10961         (vld1q_f64_x3): Likewise.
10962         (vld1q_p8_x3): Likewise.
10963         (vld1q_p16_x3): Likewise.
10964         (vld1q_p64_x3): Likewise.
10965         (vst1_s64_x2): Likewise.
10966         (vst1_u64_x2): Likewise.
10967         (vst1_f64_x2): Likewise.
10968         (vst1_s8_x2): Likewise.
10969         (vst1_p8_x2): Likewise.
10970         (vst1_s16_x2): Likewise.
10971         (vst1_p16_x2): Likewise.
10972         (vst1_s32_x2): Likewise.
10973         (vst1_u8_x2): Likewise.
10974         (vst1_u16_x2): Likewise.
10975         (vst1_u32_x2): Likewise.
10976         (vst1_f16_x2): Likewise.
10977         (vst1_f32_x2): Likewise.
10978         (vst1_p64_x2): Likewise.
10979         (vst1q_s8_x2): Likewise.
10980         (vst1q_p8_x2): Likewise.
10981         (vst1q_s16_x2): Likewise.
10982         (vst1q_p16_x2): Likewise.
10983         (vst1q_s32_x2): Likewise.
10984         (vst1q_s64_x2): Likewise.
10985         (vst1q_u8_x2): Likewise.
10986         (vst1q_u16_x2): Likewise.
10987         (vst1q_u32_x2): Likewise.
10988         (vst1q_u64_x2): Likewise.
10989         (vst1q_f16_x2): Likewise.
10990         (vst1q_f32_x2): Likewise.
10991         (vst1q_f64_x2): Likewise.
10992         (vst1q_p64_x2): Likewise.
10993         (vst1_s64_x3): Likewise.
10994         (vst1_u64_x3): Likewise.
10995         (vst1_f64_x3): Likewise.
10996         (vst1_s8_x3): Likewise.
10997         (vst1_p8_x3): Likewise.
10998         (vst1_s16_x3): Likewise.
10999         (vst1_p16_x3): Likewise.
11000         (vst1_s32_x3): Likewise.
11001         (vst1_u8_x3): Likewise.
11002         (vst1_u16_x3): Likewise.
11003         (vst1_u32_x3): Likewise.
11004         (vst1_f16_x3): Likewise.
11005         (vst1_f32_x3): Likewise.
11006         (vst1_p64_x3): Likewise.
11007         (vst1q_s8_x3): Likewise.
11008         (vst1q_p8_x3): Likewise.
11009         (vst1q_s16_x3): Likewise.
11010         (vst1q_p16_x3): Likewise.
11011         (vst1q_s32_x3): Likewise.
11012         (vst1q_s64_x3): Likewise.
11013         (vst1q_u8_x3): Likewise.
11014         (vst1q_u16_x3): Likewise.
11015         (vst1q_u32_x3): Likewise.
11016         (vst1q_u64_x3): Likewise.
11017         (vst1q_f16_x3): Likewise.
11018         (vst1q_f32_x3): Likewise.
11019         (vst1q_f64_x3): Likewise.
11020         (vst1q_p64_x3): Likewise.
11022 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11024         * config/msp430/msp430.c (msp430_output_labelref): Prepend
11025         user_label_prefix to name.
11027         * tree-core.h: Update comment about the format of NAME string
11028         passed to handler in attribute_spec.
11030         * config/msp430/msp430.md: Remove erroneous subreg expression from
11031         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11032         zero_extend{q,h}isi2.
11034 2018-05-30  Borislav Petkov  <bp@suse.de>
11036         * doc/extend.texi: Document some architecture specific
11037         constraints and sort entries.
11039 2018-05-30  Martin Sebor  <msebor@redhat.com>
11041         PR middle-end/85369
11042         * builtins.c (expand_builtin_stpcpy_1): New function.
11043         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11044         only if the former succeeds.
11046 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
11048         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11049         in saphira.
11051 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11053         * doc/invoke.texi (-flinker-output): Document
11055 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11057         * passes.c (ipa_write_summaries): Only modify statements if body
11058         is in memory.
11059         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11060         incrementally linking.
11061         (ipa_passes): Likewise.
11062         * lto-cgraph.c (lto_output_node): When incrementally linking do not
11063         pass down resolution info.
11064         * common.opt (flag_incremental_link): Update info.
11065         * gcc.c (plugin specs): Turn flinker-output=* to
11066         -plugin-opt=-linker-output-known
11067         * toplev.c (compile_file): Also cut compilation when doing incremental
11068         link.
11069         * flag-types. (enum lto_partition_model): Add
11070         LTO_LINKER_OUTPUT_NOLTOREL.
11071         (invoke.texi): Add -flinker-output docs.
11072         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11073         link same way as WPA; do not stream in dead initializers.
11075         * dwarf2out.c (dwarf2out_die_ref_for_decl,
11076         darf2out_register_external_decl): Support incremental link.
11078 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11080         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11082 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
11084         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11085         it down to simple_object_copy_lto_debug_sections.
11086         (run_gcc): Determine incremental LTO link time and configure
11087         lto1 into non-wpa mode, disable renaming of debug sections.
11089 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11091         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11092         descriptions of various incorrectly documented functions.
11094 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11096         Revert:
11097         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11098         address check not strict.
11100 2018-05-30  Richard Biener  <rguenther@suse.de>
11102         PR tree-optimization/85964
11103         * tracer.c (better_p): Drop initialized count check, we only
11104         call the function with initialized counts now.
11105         (find_best_successor): Do find a best edge if one
11106         has uninitialized count.
11107         (find_best_predecessor): Likewise.  Do BB frequency check only
11108         if count is initialized.
11110 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
11112         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11113         (aarch64_ldrstr_offset_compare): New.
11114         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11115         load/store orderings.
11116         (aarch64_gen_adjusted_ldpstp): Likewise.
11118 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
11120         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11121         Check for subset of GENERAL_REGS and FP_REGS.
11122         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11123         r=w alternative.
11125 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
11127         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11128         and wi::to_poly_offset.  Add the current offset and then check
11129         whether the sum fits, rather than using an unchecked addition of
11130         a checked term.  Check for a shwi rather than a uhwi.
11131         * expr.c (get_bit_range): Use tree_to_poly_uint64.
11132         (store_constructor): Use poly_int_tree_p.
11133         (expand_expr_real_1): Likewise.
11134         * function.c (assign_temp): Likewise.
11135         * fold-const.c (const_binop): Use poly_int_tree_p and
11136         wi::to_poly_offset.
11137         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
11138         division.
11139         * ipa-icf-gimple.c (func_checker::compare_operand): Use
11140         to_poly_offset for MEM offsets.
11141         * ipa-icf.c (sem_variable::equals): Likewise.
11142         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11143         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11144         wi::to_poly_offset for BIT_FIELD_REF offsets.
11145         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11146         wi::to_poly_offset.
11147         * var-tracking.c (emit_note_insn_var_location): Use
11148         tree_to_poly_uint64.
11150 2018-05-29  Jim Wilson  <jimw@sifive.com>
11152         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11154 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
11156         PR target/85950
11157         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11158         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11159         sequence.
11160         (sse4_1_round<mode>2): Use nonimmediate_operand
11161         for operand 1 predicate.
11163 2018-05-29  Martin Sebor  <msebor@redhat.com>
11164             Richard Biener  <rguenther@suse.de>
11166         PR testsuite/85888
11167         * calls.c (get_size_range): Call determine_value_range instead
11168         of get_value_range..
11169         * tree-vrp.h (determine_value_range): Declared new function.
11170         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11172 2018-05-29  Richard Biener  <rguenther@suse.de>
11174         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11175         sure to use non-pattern stmts for get_earlier_stmt arguments.
11176         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11177         called on pattern stmts.
11178         (get_later_stmt): Likewise.
11180 2018-05-29  Martin Liska  <mliska@suse.cz>
11182         PR gcov-profile/85759
11183         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11184         env variables.
11186 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
11188         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11189         VEC_UNPACK_*_EXPR.
11190         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11191         VEC_PACK_*_EXPR.
11193         PR target/85918
11194         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11195         VEC_PACK_FLOAT_EXPR): New tree codes.
11196         * tree-pretty-print.c (op_code_prio): Handle
11197         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11198         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11199         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11200         * tree-inline.c (estimate_operator_cost): Likewise.
11201         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11202         * fold-const.c (const_binop): Likewise.
11203         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11204         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11205         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11206         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11207         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11208         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11209         * expr.c (expand_expr_real_2): Likewise.
11210         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11211         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11212         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11213         optabs.
11214         * optabs.c (expand_widen_pattern_expr): For
11215         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11216         sign from result type rather than operand's type.
11217         (expand_binop_directly): For vec_packu_float_optab and
11218         vec_packs_float_optab allow result type to be different from operand's
11219         type.
11220         * optabs-tree.c (optab_for_tree_code): Handle
11221         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11222         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
11223         * tree-vect-generic.c (expand_vector_operations_1):  Handle
11224         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11225         VEC_PACK_FLOAT_EXPR.
11226         * tree-vect-stmts.c (supportable_widening_operation): Handle
11227         FIX_TRUNC_EXPR.
11228         (supportable_narrowing_operation): Handle FLOAT_EXPR.
11229         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11230         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11231         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
11232         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11233         mode attributes.
11234         (vec_pack<floatprefix>_float_<mode>): New expander.
11235         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11236         attributes.
11237         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11238         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11239         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11240         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11241         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11242         Document.
11243         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11244         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11245         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11246         VEC_PACK_FLOAT_EXPR): Document.
11248 2018-05-29  Richard Biener  <rguenther@suse.de>
11250         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11251         member.
11252         (stmt_vec_info_vec): Make pointer.
11253         (init_stmt_vec_info_vec): Remove.
11254         (free_stmt_vec_info_vec): Likewise.
11255         (set_stmt_vec_info_vec): New function.
11256         (free_stmt_vec_infos): Likewise.
11257         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11258         (set_vinfo_for_stmt): Likewise.
11259         (get_earlier_stmt): Likewise.
11260         (get_later_stmt): Likewise.
11261         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11262         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11263         (vec_info::~vec_info): Free stmt_vec_infos.
11264         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11265         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11266         (pass_slp_vectorize::execute): Likewise.
11267         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11268         (free_stmt_vec_info_vec): Likewise.
11269         (set_stmt_vec_info_vec): New function.
11270         (free_stmt_vec_infos): Likewise.
11271         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11272         the global stmt_vec_info_vec.
11273         * tree-parloops.c (gather_scalar_reductions): Use
11274         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11275         vector.
11277 2018-05-29  Richard Biener  <rguenther@suse.de>
11279         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11281 2018-05-29  Martin Liska  <mliska@suse.cz>
11282             David Malcolm  <dmalcolm@redhat.com>
11284         * vec.c (test_reverse): New.
11285         (vec_c_tests): Add new test.
11286         * vec.h (vl_ptr>::reverse): New function.
11288 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
11290         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11292         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11293         and later.
11295 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11297         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11299 2018-05-28  Richard Biener  <rguenther@suse.de>
11301         PR tree-optimization/85933
11302         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11303         look at stmts marked as vectorizable.
11305 2018-05-28  Richard Biener  <rguenther@suse.de>
11307         PR tree-optimization/85934
11308         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11309         vector boolean check before scalar optimization.
11311 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11313         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11314         for armv5te.
11316 2018-05-28  Mark Wielaard  <mark@klomp.org>
11318         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11319         if it is an expression containing a minus sign.
11321 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11323         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11325 2018-05-27  Paul Koning  <ni1d@arrl.net>
11327         * config/pdp11/pdp11.md (truncsihi2): Remove.
11329 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11330             Chung-Ju Wu  <jasonwucj@gmail.com>
11332         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11333         implementation.
11334         (unaligned_store_dw): Ditto.
11335         * config/nds32/nds32-memory-manipulation.c
11336         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11337         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11338         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11339         (emit_setmem_word_loop): Rename to ...
11340         (emit_setmem_doubleword_loop): ... this.
11341         (nds32_gen_dup_4_byte_to_word_value): New function.
11342         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11343         (nds32_expand_setmem_loop): Refine implementation.
11344         (nds32_expand_setmem_loop_v3m): Ditto.
11345         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11346         pattern.
11348 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11350         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11352 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11354         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11355         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11356         machine->attr_no_prologue_p.
11357         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11358         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11359         (nds32_expand_epilogue): Consider attr_naked_p.
11360         (nds32_expand_epilogue_v3pop): Likewise.
11361         (nds32_can_use_return_insn): Likewise.
11362         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11363         attr_no_prologue_p fields.
11364         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11366 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11368         PR target/85918
11369         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11370         attributes.
11371         * config/i386/sse.md
11372         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11373         Rename to ...
11374         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11375         ... this.
11376         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11377         Rename to ...
11378         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11379         ... this.
11380         (*<floatsuffix>floatv2div2sf2): Rename to ...
11381         (*float<floatunssuffix>v2div2sf2): ... this.
11382         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11383         (float<floatunssuffix>v2div2sf2_mask): ... this.
11384         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11385         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11386         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11387         to ...
11388         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11389         ... this.
11390         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11391         Rename to ...
11392         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11393         ... this.
11394         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11395         Rename to ...
11396         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11397         ... this.
11398         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11399         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11400         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11401         gen_ufix_truncv8dfv8si2.
11402         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11403         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11404         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11405         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11406         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11407         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11408         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11409         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11411 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11413         PR target/85900
11414         PR target/85345
11415         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11417 2018-05-25  Jim Wilson  <jimw@sifive.com>
11419         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11420         * config/riscv/riscv.c (struct machine_function): Add
11421         interrupt_handler_p and attribute_checked_p fields.
11422         (riscv_attribute_table): Add interrupt.
11423         (riscv_interrupt_type_p): New.
11424         (riscv_save_reg_p): Save extra regs for interrupt handler.
11425         (riscv_use_save_libcall): Return false  for interrupt handler.
11426         (riscv_first_stack_step): Add forward declaration.
11427         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11428         for interrupt handler with large frame.  Use it for saved reg list.
11429         (riscv_expand_prologue): Move flag_stack_usage_info support to
11430         eliminate duplication.
11431         (riscv_expand_epilogue): Generate mret for interrupt handler.
11432         (riscv_epilogue_uses): New.
11433         (riscv_can_use_return_insn): Return false for interrupt handler.
11434         (riscv_function_ok_for_sibcall): Likewise.
11435         (riscv_set_current_function): Add interrupt handler support.
11436         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11437         * config/riscv/riscv.md (UNSPECV_MRET): New.
11438         (GP_REGNUM): New.
11439         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11440         (riscv_mret): New.
11441         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11443 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11445         PR tree-optimization/85712
11446         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11447         this candidate has already been replaced in-situ by a copy.
11449 2018-05-25  Jason Merrill  <jason@redhat.com>
11451         PR c++/80485 - inline function non-zero address.
11452         * symtab.c (nonzero_address): Check DECL_COMDAT.
11454 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11456         PR target/83628
11457         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11458         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11459         extension of SImode operation.  Use const123_operand predicate.
11460         (*saddsi_1): Remove.
11461         (*saddl_se_1): Ditto.
11462         (*ssubsi_1): Ditto.
11463         (*ssubl_se_1): Ditto.
11464         * config/alpha/predicates.md (const123_operand): New predicate.
11465         * config/alpha/constraints.md (P): Use IN_RANGE.
11467 2018-05-25  Richard Biener  <rguenther@suse.de>
11469         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11470         defaulted to true.
11471         (ref_maybe_used_by_stmt_p): Likewise.
11472         (stmt_may_clobber_ref_p): Likewise.
11473         (stmt_may_clobber_ref_p_1): Likewise.
11474         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11475         and pass it along.
11476         (ref_maybe_used_by_stmt_p): Likewise.
11477         (stmt_may_clobber_ref_p): Likewise.
11478         (stmt_may_clobber_ref_p_1): Likewise.
11479         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11480         the alias oracle to disambiguate DRs with stmts DR analysis
11481         couldn't handle.
11482         (vect_analyze_data_refs): Do not give up on not analyzable
11483         DRs for BB vectorization.  Remove code truncating the dataref
11484         vector.
11486 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11488         PR target/85832
11489         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11490         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11491         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11493 2018-05-25  Richard Biener  <rguenther@suse.de>
11495         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11496         function, combining stmt data ref gathering and fatal analysis
11497         parts.
11498         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11499         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11500         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11501         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11502         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11504 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11506         PR tree-optimization/85720
11507         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11508         SCC if all partitions are builtins.
11509         (version_loop_by_alias_check): New parameter.  Generate cancelable
11510         runtime alias check if all partitions are builtins.
11511         (distribute_loop): Update call to above function.
11513 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11515         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11516         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11517         (parm_default_def_partition_arg): Ditto.
11518         (set_parm_default_def_partition): Ditto.
11519         (get_parm_default_def_partitions): Ditto and make it static.
11520         (get_undefined_value_partitions): Ditto and make it static.
11521         (remove_ssa_form): Refactor call to init_var_map here.
11522         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11523         computation for loop region.
11524         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11525         (register_default_def): Delete.
11526         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11527         (parm_default_def_partition_arg): Ditto.
11528         (set_parm_default_def_partition): Ditto.
11529         (get_parm_default_def_partitions): Ditto and make it static.
11530         (get_undefined_value_partitions): Ditto and make it static.
11531         (coalesce_with_default, coalesce_with_default): Update comment.
11532         (create_coalesce_list_for_region): New func factored out from
11533         create_outofssa_var_map.
11534         (populate_coalesce_list_for_outofssa): New func factored out from
11535         create_outofssa_var_map and coalesce_ssa_name.
11536         (create_outofssa_var_map): Delete.
11537         (coalesce_ssa_name): Refactor to support live range computation.
11538         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11539         (get_parm_default_def_partitions): Delete.
11540         (get_undefined_value_partitions): Ditto.
11541         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11542         computation for loop region.
11543         (new_tree_live_info, loe_visit_block): Ditto.
11544         (live_worklist, set_var_live_on_entry): Ditto.
11545         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11546         * tree-ssa-live.h (struct _var_map): New fields.
11547         (init_var_map): Change decl.
11548         (region_contains_p): New.
11550 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11552         * tree-ssa-live.h (live_merge_and_clear): Delete.
11554 2018-05-25  Richard Biener  <rguenther@suse.de>
11556         PR c++/85912
11557         * tree-dump.c (dequeue_and_dump): Remove access to removed
11558         operand 2 of a SWITCH_EXPR.
11560 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11562         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11563         multiplication and division.
11564         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11565         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11566         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11567         (cond_udiv_optab, cond_umod_optab): New optabs.
11568         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11569         (IFN_COND_RDIV): New internal functions.
11570         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11571         TRUNC_MOD_EXPR and RDIV_EXPR.
11572         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11573         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11574         New unspecs.
11575         (SVE_INT_BINARY): Include mult.
11576         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11577         (optab, sve_int_op): Handle mult.
11578         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11579         UNSPEC_COND_DIV.
11580         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11581         for SVE_INT_BINARY_SD.
11583 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11585         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11586         (optab, sve_int_op): Handle div and udiv.
11587         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11588         for SVE_INT_BINARY_SD.
11589         (*<optab><mode>3): New insn for the same.
11591 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11593         * tree-vect-patterns.c: Include predict.h.
11594         (vect_recog_divmod_pattern): Restrict check for division support
11595         to when optimizing for size.
11597 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11599         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11600         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11601         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11602         (gimple_match_op::set_op): Likewise.
11603         (gimple_resimplify4): Declare.
11604         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11605         (expr::gen_transform): Likewise.
11606         (decision_tree::gen): Generate a simplification routine for 4 operands.
11607         * gimple-match-head.c (gimple_simplify): Add an overload for
11608         4 operands.  In the top-level function, handle up to 4 call
11609         arguments and call gimple_resimplify4.
11610         (gimple_resimplify4): New function.
11611         (build_call_internal): Pass a fourth operand.
11612         (maybe_push_to_seq): Likewise.
11613         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11614         Fold VEC_COND_EXPRs of an operation and a default value into
11615         an IFN_COND_* function if possible.
11616         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11617         New unspecs.
11618         (SVE_COND_FP_BINARY): Include them.
11619         (optab, sve_fp_op): Handle them.
11620         (SVE_INT_BINARY_REV): New code iterator.
11621         (SVE_COND_FP_BINARY_REV): New int iterator.
11622         (commutative): New int attribute.
11623         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11624         Declare.
11625         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11626         function.
11627         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11628         (*cond_<optab><mode>): New patterns for reversed operands.
11630 2018-05-25  Richard Biener  <rguenther@suse.de>
11632         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11633         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11634         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11635         (STMT_VINFO_GROUPED_ACCESS): Adjust.
11636         * tree-vect-data-refs.c (everywhere): Adjust users.
11637         * tree-vect-loop.c (everywhere): Likewise.
11638         * tree-vect-slp.c (everywhere): Likewise.
11639         * tree-vect-stmts.c (everywhere): Likewise.
11640         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11642 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11644         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11645         Rename to...
11646         (gcc_cv_as_section_exclude): ... this.
11647         Try Solaris as #exclude syntax.
11648         * configure: Regenerate.
11649         * config.in: Regenerate.
11650         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11651         SECTION_EXCLUDE.
11652         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11653         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11655         * varasm.c (default_elf_asm_named_section): Don't check if
11656         HAVE_GAS_SECTION_EXCLUDE is defined.
11658 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11660         * doc/md.texi: Update the documentation of the cond_* optabs
11661         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11662         Describe the scalar case too.
11663         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11664         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11665         instead of 2.
11666         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11667         (get_conditional_internal_fn): Update comment.
11668         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11669         accumulator value as a final argument to conditional functions.
11670         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11671         a define_expand and add an "else" operand.  Assert for now that
11672         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11673         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11674         (*cond_<optab><mode>): New patterns.
11675         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11676         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11677         (UNSPEC_COND_EOR): Delete.
11678         (optab): Remove associated mappings.
11679         (SVE_INT_BINARY): New code iterator.
11680         (sve_int_op): Remove int attribute and add "minus" to the code
11681         attribute.
11682         (SVE_COND_INT_OP): Delete.
11683         (SVE_COND_FP_OP): Rename to...
11684         (SVE_COND_FP_BINARY): ...this.
11686 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11688         * optabs.c (can_reuse_operands_p): New function.
11689         (maybe_legitimize_operands): Try to reuse the results for
11690         earlier operands.
11692 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11694         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11695         Add {q} suffix to insn mnemonic.
11697 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11699         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11700         (msp430_warn_func_return): New.
11702 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11704         * fold-const.c (tree_nonzero_bits): New function.
11705         * fold-const.h (tree_nonzero_bits): Likewise.
11706         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11707         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11709 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11711         PR target/85900
11712         PR target/85345
11713         * varasm.c (assemble_alias): Check ifunc_resolver only on
11714         FUNCTION_DECL.
11716 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11718         PR target/85903
11719         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11720         when memory input operand is handled.
11722 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11724         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11725         global.
11726         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11728 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11730         * match.pd: Delay FMA folds until after vectorization.
11732 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11734         PR target/83009
11735         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11736         address check not strict.
11738 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11740         * gimple-match.h (gimple_match_op): New class.
11741         (mprts_hook): Replace parameters with a gimple_match_op *.
11742         (maybe_build_generic_op): Likewise.
11743         (gimple_simplified_result_is_gimple_val): Replace parameters with
11744         a const gimple_match_op *.
11745         (gimple_simplify): Replace code_helper * and tree * parameters with
11746         a gimple_match_op * parameter.
11747         (gimple_resimplify1): Replace code_helper *, tree and tree *
11748         parameters with a gimple_match_op * parameter.
11749         (gimple_resimplify2): Likewise.
11750         (gimple_resimplify3): Likewise.
11751         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11752         parameters with a gimple_match_op * parameter.
11753         * gimple-match-head.c (gimple_simplify): Change prototypes of
11754         auto-generated functions to take a gimple_match_op * instead of
11755         separate code_helper * and tree * parameters.  Make the same
11756         change in the top-level overload and update calls to the
11757         gimple_resimplify routines.  Update calls to the auto-generated
11758         functions and to maybe_push_res_to_seq in the publicly-facing
11759         operation-specific gimple_simplify overloads.
11760         (gimple_match_op::MAX_NUM_OPS): Define.
11761         (gimple_resimplify1): Replace rcode and ops with a single res_op
11762         parameter.  Update call to gimple_simplify.
11763         (gimple_resimplify2): Likewise.
11764         (gimple_resimplify3): Likewise.
11765         (mprts_hook): Replace parameters with a gimple_match_op *.
11766         (maybe_build_generic_op): Likewise.
11767         (build_call_internal): Replace type, nargs and ops with
11768         a gimple_match_op *.
11769         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11770         with a single gimple_match_op *.  Update calls to mprts_hook,
11771         build_call_internal and gimple_simplified_result_is_gimple_val.
11772         Factor out code that is common to the tree_code and combined_fn cases.
11773         * genmatch.c (expr::gen_transform): Replace tem_code and
11774         tem_ops with a gimple_match_op called tem_op.  Update calls
11775         to the gimple_resimplify functions and maybe_push_res_to_seq.
11776         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11777         res_ops.  Update call to the gimple_resimplify functions.
11778         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11779         (decision_tree::gen): Make the functions take a gimple_match_op *
11780         called res_op instead of separate res_code and res_ops parameters.
11781         Update call accordingly.
11782         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11783         and ops with a single res_op parameter.  Update calls to
11784         maybe_build_generic_op and maybe_push_res_to_seq.
11785         (fold_stmt_1): Update calls to gimple_simplify and
11786         replace_stmt_with_simplification.
11787         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11788         and gimple_simplified_result_is_gimple_val.
11789         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11790         gimple_simplify.
11791         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11792         with a gimple_match_op *.
11793         (vn_nary_build_or_lookup): Likewise.  Update call to
11794         vn_nary_build_or_lookup_1.
11795         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11796         gimple_match_op *.  Update calls to the gimple_resimplify routines
11797         and to gimple_simplified_result_is_gimple_val.
11798         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11799         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11800         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11801         (visit_nary_op): Likewise.
11802         (visit_reference_op_load): Likewise.
11804 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11806         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11807         modifier for printing the step amount.
11809 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11811         PR target/78849
11812         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11813         types.
11815 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11817         * doc/sourcebuild.texi (Endianness): New subsubsection.
11819 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11821         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11822         <prefetch_dynamic_strides>: New const bool field.
11823         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11824         prefetch_dynamic_strides.
11825         (exynosm1_prefetch_tune): Likewise.
11826         (thunderxt88_prefetch_tune): Likewise.
11827         (thunderx_prefetch_tune): Likewise.
11828         (thunderx2t99_prefetch_tune): Likewise.
11829         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11830         false.
11831         (aarch64_override_options_internal): Update to set
11832         PARAM_PREFETCH_DYNAMIC_STRIDES.
11833         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11834         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11835         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11836         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11837         prefetch-dynamic-strides setting.
11839 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11841         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11842         <minimum_stride>: New const int field.
11843         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11844         minimum_stride field defaulting to -1.
11845         (exynosm1_prefetch_tune): Likewise.
11846         (thunderxt88_prefetch_tune): Likewise.
11847         (thunderx_prefetch_tune): Likewise.
11848         (thunderx2t99_prefetch_tune): Likewise.
11849         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11850         <default_opt_level>: Set to 3.
11851         (aarch64_override_options_internal): Update to set
11852         PARAM_PREFETCH_MINIMUM_STRIDE.
11853         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11854         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11855         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11856         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11857         stride is constant and is below the minimum stride threshold.
11859 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11861         * config/arm/arm-cpus.in (mode26): Delete.
11862         (armv4): Delete mode26 reference.
11863         * config/arm/arm.c (arm_configure_build_target): Delete use of
11864         isa_bit_mode26.
11866 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11868         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11869         New insn pattern.
11870         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11871         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11872         for non-SSE modes.
11873         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11874         (floatunsdidf2): Ditto.
11876 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11878         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11879         (fixuns_trunc<mode>si2_avx512f): Ditto.
11880         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11881         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11882         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11884 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11886         PR rtl-optimization/79985
11887         * df-scan.c (df_insn_refs_collect): Remove special case for
11888         global registers and asm statements.
11890 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11892         * extend.texi (Global Register Variables): Rewrite the bullet list.
11893         Note that the register is available for allocation. Note that access
11894         via inline asm must use constraints. Add note about async-signal
11895         handlers. Remove paragraph about automagic register selection.
11897 2018-05-23  Richard Biener  <rguenther@suse.de>
11899         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11900         of fixed offset from memset VN.
11902 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11904         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11905         first_interp field.
11906         (alloc_cand_and_find_basis): Initialize first_interp field.
11907         (slsr_process_mul): Modify first_interp field.
11908         (slsr_process_add): Likewise.
11909         (slsr_process_cast): Modify first_interp field for each new
11910         interpretation.
11911         (slsr_process_copy): Likewise.
11912         (dump_candidate): Dump first_interp field.
11913         (replace_mult_candidate): Process all interpretations, not just
11914         subsequent ones.
11915         (replace_rhs_if_not_dup): Likewise.
11916         (replace_one_candidate): Likewise.
11918 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11920         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11921         Add new boolean.
11922         (aarch64_needs_frame_chain): New function.
11923         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11925 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11927         PR target/84882
11928         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11929         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11930         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11931         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11932         as true for strict-align.
11933         (aarch64_can_inline_p): Perform checks even when callee has no
11934         attributes to check for strict alignment.
11935         * doc/extend.texi (AArch64 Function Attributes): Document
11936         no-strict-align.
11937         * doc/invoke.texi: (AArch64 Options): Likewise.
11939 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11941         PR tree-optimization/85853
11942         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11943         the handling of the root of the node to...
11944         (vect_slp_analyze_node_operations_1): ...this new function,
11945         and run the whole thing with the child nodes' def types
11946         set according to their SLP node's def type.
11948 2018-05-23  Richard Biener  <rguenther@suse.de>
11950         PR middle-end/85874
11951         * tree-data-ref.c (create_runtime_alias_checks): Defer
11952         and ignore overflow warnings.
11954 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11956         PR tree-optimization/85822
11957         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11958         constants.
11960 2018-05-23  Richard Biener  <rguenther@suse.de>
11962         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11963         memset constants via native_interpret_expr.
11965 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11967         PR target/85345
11968         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11969         attribute.
11970         (cgraph_node::create_alias): Likewise.
11971         (cgraph_node::get_availability): Check ifunc_resolver instead
11972         of looking up ifunc attribute.
11973         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11974         * varasm.c (do_assemble_alias): Likewise.
11975         (assemble_alias): Likewise.
11976         (default_binds_local_p_3): Likewise.
11977         * cgraph.h (cgraph_node): Add ifunc_resolver.
11978         (cgraph_node::only_called_directly_or_aliased_p): Return false
11979         for IFUNC resolver.
11980         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11981         attribute.
11982         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11983         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11984         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11985         instead of looking up ifunc attribute.
11987 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11989         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11991 2018-05-22  Martin Sebor  <msebor@redhat.com>
11993         PR middle-end/85359
11994         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11995         only when expasion succeeds.
11996         (expand_builtin_strcmp): Same.
11997         (expand_builtin_strncmp): Same.
11999 2018-05-22  Martin Sebor  <msebor@redhat.com>
12001         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12003 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12004             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12006         * config/aarch64/aarch64-ldpstp.md: Replace uses of
12007         aarch64_mem_pair_operand with memory_operand and delete operand swapping
12008         code.
12009         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12010         Add check for legitimate_address.
12011         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12012         (aarch64_swap_ldrstr_operands): New.
12013         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12014         Define prototype.
12016 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
12017             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12019         * config/aarch64/aarch64.md: New patterns to generate stp
12020         and ldp.
12021         (store_pair_sw, store_pair_dw): New patterns to generate stp for
12022         single words and double words.
12023         (load_pair_sw, load_pair_dw): Likewise.
12024         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12025         Delete.
12026         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12027         Delete.
12028         * config/aarch64/aarch64-ldpstp.md: Modify peephole
12029         for different mode ldpstp and add peephole for merged zero stores.
12030         Likewise for loads.
12031         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12032         Add size check.
12033         (aarch64_gen_store_pair): Rename calls to match new patterns.
12034         (aarch64_gen_load_pair): Rename calls to match new patterns.
12035         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12036         (load_pair<DREG:mode><DREG2:mode>): ... This.
12037         (store_pair<mode>): Rename to...
12038         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12039         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12040         New mode iterators.
12041         (V_INT_EQUIV): Handle SImode.
12042         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12043         New predicate.
12045 2018-05-22  Martin Sebor  <msebor@redhat.com>
12047         PR c/85623
12048         * calls.c (maybe_warn_nonstring_arg): Use string length to set
12049         or ajust the presumed bound on an operation to avoid unnecessary
12050         warnings.
12052 2018-05-22  Martin Sebor  <msebor@redhat.com>
12054         PR tree-optimization/85826
12055         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12056         assuming that a DECL necesarily has a constant size.
12058 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
12060         PR middle-end/85862
12061         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12063 2018-05-22  Richard Biener  <rguenther@suse.de>
12065         PR tree-optimization/85834
12066         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12067         non-constant and non-zero memset arguments.
12069 2018-05-22  Martin Liska  <mliska@suse.cz>
12071         PR ipa/85607
12072         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12074 2018-05-22  Richard Biener  <rguenther@suse.de>
12076         PR tree-optimization/85863
12077         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12078         comparisons when vectype is specified.
12079         (vectorizable_condition): Do not specify vectype for
12080         vect_is_simple_cond when SLP vectorizing.
12082 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
12084         PR target/85657
12085         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12086         define __ibm128 as long double.
12087         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12088         as a distinct type when IEEE 128-bit support is enabled.
12089         (init_float128_ieee): Fix up conversions between IFmode and IEEE
12090         128-bit types to use the correct functions.
12091         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12092         convert between 128-bit floating point types that have different
12093         modes but the same representation, instead of using gen_lowpart to
12094         makean alias.
12095         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12096         KFmode.
12097         (IFKF_reg): New attributes to give the register constraints for
12098         IFmode and KFmode.
12099         (extend<mode>tf2_internal): New insns to mark an explicit
12100         conversion between 128-bit floating point types that have a
12101         different mode but share the same representation.
12103 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
12105         PR tree-optimization/85814
12106         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12107         a null return from get_strinfo when unsharing the next
12108         strinfo in the chain.
12110 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12112         PR gcc/84923
12113         * varasm.c (weak_finish): Clean up weak_decls.
12115 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12117         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12118         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12119         UNSPEC_UADALP values.
12120         * config/aarch64/iterators.md (ABAL): New int iterator.
12121         (ABDL2): Likewise.
12122         (ADALP): Likewise.
12123         (sur): Add mappings for the above.
12124         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12125         New define_insn.
12126         (aarch64_<sur>abal<mode>_4): Likewise.
12127         (aarch64_<sur>adalp<mode>_3): Likewise.
12128         (<sur>sadv16qi): New define_expand.
12130 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
12132         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12133         (*movdf_internal): Ditto.
12134         (*rcpsf2_sse): Ditto.
12135         (*rsqrtsf2_sse): Ditto.
12136         (*sqrt<mode>2_sse): Ditto.
12138 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
12140         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12141         eor3q<mode>4.
12142         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12143         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12144         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12145         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12146         vbcaxq_s64): New.
12147         * config/aarch64/arm_neon.h: Likewise.
12148         * config/aarch64/iterators.md (VQ_I): New.
12150 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
12152         * config.gcc: Add arc/t-multilib-linux to tmake_file for
12153         arc*-*-linux*.
12154         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12155         MULTILIB_DIRNAMES
12157 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12159         * config/nds32/constraints.md (S): New constraint.
12160         * config/nds32/nds32.md (call_internal): Use constraint S.
12161         (call_value_internal): Likewise.
12162         (sibcall_internal): Likewise.
12163         (sibcall_value_internal): Likewise.
12165 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12166             Chung-Ju Wu  <jasonwucj@gmail.com>
12168         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12169         into consideration.
12171 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
12172             Chung-Ju Wu  <jasonwucj@gmail.com>
12174         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12175         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12176         (nds32_rtx_costs_impl): Simplify.
12177         (nds32_address_cost_impl): Simplify.
12178         (nds32_init_rtx_costs): New function.
12179         (nds32_rtx_costs_speed_prefer): Likewise.
12180         (nds32_rtx_costs_size_prefer): Likewise.
12181         (nds32_address_cost_speed_prefer): Likewise.
12182         (nds32_address_cost_speed_fwprop): Likewise.
12183         (nds32_address_cost_size_prefer): Likewise.
12184         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12185         * config/nds32/nds32.c (nds32_option_override): Use
12186         nds32_init_rtx_costs function.
12188 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
12190         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12191         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12192         (TARGET_PIPELINE_N8): Likewise.
12193         (TARGET_PIPELINE_N10): Likewise.
12194         (TARGET_PIPELINE_N13): Likewise.
12195         (TARGET_PIPELINE_GRAYWOLF): Likewise.
12197 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
12199         * config/nds32/nds32-fpu.md: Update copyright year.
12201 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12203         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12205 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12207         * config/nds32/nds32.c
12208         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12209         * config/nds32/nds32.opt (minline-asm-r15): New option.
12211 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12213         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12214         MASK_HW_ABS.
12215         * config/nds32/nds32.md (abssi2): New pattern.
12217 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
12219         * config/i386/i386.md (rex64namesuffix): New mode attribute.
12220         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12221         Merge insn pattern from sse_cvtsi2ss<round_name> and
12222         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12223         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12224         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12225         using SWI48 mode iterator.
12226         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12227         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12228         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12229         pattern from sse_cvttss2si<round_saeonly_name>
12230         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12231         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12232         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12233         using SWI48 mode iterator.
12234         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12235         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12236         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12237         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12238         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12239         using SWI48 mode iterator.
12240         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12241         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12242         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12243         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12244         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12245         SWI48 mode iterator.
12246         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12247         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12248         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12249         pattern from sse_cvttsd2si<round_saeonly_name>
12250         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12252 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12254         * config/nds32/nds32-md-auxiliary.c
12255         (nds32_valid_smw_lwm_base_p): Refine.
12256         (nds32_output_smw_single_word): Refine.
12257         (nds32_output_smw_double_word): New.
12258         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12260 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12262         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12263         (nds32_output_stack_pop): Refine.
12264         (nds32_expand_unaligned_load): Refine.
12265         (nds32_expand_unaligned_store): Refine.
12267 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12268             Chung-Ju Wu  <jasonwucj@gmail.com>
12270         * config/nds32/constants.md: Add TP_REGNUM constant.
12271         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12272         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12273         UNSPEC_ADD32.
12274         * config/nds32/nds32-doubleword.md: Consider flag_pic.
12275         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12276         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12277         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12278         and PIC code generation.
12279         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12280         code generation.
12281         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12282         optimization.
12283         * config/nds32/nds32.md: Support TLS and PIC.
12284         * config/nds32/nds32.c: Support TLS and PIC.
12285         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12286         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12287         predicate.
12289 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12291         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12292         mode with E_ prefix.
12294 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12295             Chung-Ju Wu  <jasonwucj@gmail.com>
12297         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12298         * config/nds32/nds32-md-auxiliary.c
12299         (symbolic_reference_mentioned_p): New.
12300         (nds32_legitimize_ict_address): New.
12301         (nds32_expand_ict_move): New.
12302         (nds32_indirect_call_referenced_p): New.
12303         (nds32_symbol_binds_local_p): Delete.
12304         (nds32_long_call_p): Modify.
12305         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12306         * config/nds32/nds32-protos.h
12307         (symbolic_reference_mentioned_p): Declare.
12308         (nds32_legitimize_ict_address): Declare.
12309         (nds32_expand_ict_move): Declare.
12310         (nds32_indirect_call_referenced_p): Declare.
12311         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12312         (nds32_relax_group): Use nds32_ict_const_p as condition.
12313         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12314         (nds32_asm_file_start): Output ict_model directive in asm code.
12315         (nds32_legitimate_address_p): Consider indirect call.
12316         (nds32_print_operand): Consider indirect call.
12317         (nds32_print_operand_address): Consider indirect call.
12318         (nds32_insert_attributes): Handle "indirect_call" attribute.
12319         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12320         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12321         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12322         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12323         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12324         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12325         (TARGET_ICT_MODEL_SMALL): Define.
12326         (TARGET_ICT_MODEL_LARGE): Define.
12327         * config/nds32/nds32.md (movsi): Consider ict model.
12328         (call, call_value): Consider ict model.
12329         (sibcall, sibcall_value): Consider ict model.
12330         * config/nds32/nds32.opt (mict-model): New option.
12331         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12332         model.
12334 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12335             Monk Chiang  <sh.chiang04@gmail.com>
12336             Jim Wilson <jimw@sifive.com>
12338         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12339         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12340         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12341         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12342         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12343         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12344         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12345         compute save_libcall_adjustment properly.
12346         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12347         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12348         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12349         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12350         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12351         (ABI_SPEC): Handle mabi=ilp32e.
12352         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12353         (RVE): Add RVE mask.
12354         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12355         <-march>: Add rv32e as an example.
12357 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12359         PR c++/82899
12360         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12361         (intra_create_variable_infos): Handle C++ constructors.
12363 2018-05-18  Martin Liska  <mliska@suse.cz>
12365         * passes.def: Remove a redundant pass.
12367 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12369         PR bootstrap/85838
12370         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12372 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12374         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12375         (ARMv4): Update.
12376         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12377         (ARMv6m): Update.
12378         (armv2, armv2a, armv3, armv3m): Delete architectures.
12379         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12380         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12381         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12382         Delete cpus.
12383         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12384         (*mulsidi3adddi): Likewise.
12385         (mulsidi3): Likewise.
12386         (*mulsidi3_nov6): Likewise.
12387         (umulsidi3): Likewise.
12388         (umulsidi3_nov6): Likewise.
12389         (umaddsidi4): Likewise.
12390         (*umulsidi3adddi): Likewise.
12391         (smulsi3_highpart): Likewise.
12392         (*smulsi3_highpart_nov6): Likewise.
12393         (umulsi3_highpart): Likewise.
12394         (*umulsi3_highpart_nov6): Likewise.
12395         * config/arm/arm.h (arm_arch3m): Delete.
12396         * config/arm/arm.c (arm_arch3m): Delete.
12397         (arm_option_override_internal): Update armv3-related comment.
12398         (arm_configure_build_target): Delete use of isa_bit_mode32.
12399         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12400         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12401         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12402         (mulsa3): Likewise.
12403         (mulusa3): Likewise.
12404         * config/arm/arm-protos.h (arm_arch3m): Delete.
12405         * config/arm/arm-tables.opt: Regenerate.
12406         * config/arm/arm-tune.md: Likewise.
12407         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12408         deleted architectures.
12410 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12412         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12413         (armv5t, armv5te): New features.
12414         (ARMv5, ARMv5e): Delete fgroups.
12415         (ARMv5t, ARMv5te): Adjust for above changes.
12416         (ARMv6m): Likewise.
12417         (armv5, armv5e): Delete arches.
12418         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12419         arm_arch5.
12420         (*call_reg_arm): Likewise.
12421         (*call_value_reg_armv5): Likewise.
12422         (*call_value_reg_arm): Likewise.
12423         (*call_symbol): Likewise.
12424         (*call_value_symbol): Likewise.
12425         (*sibcall_insn): Likewise.
12426         (*sibcall_value_insn): Likewise.
12427         (clzsi2): Likewise.
12428         (prefetch): Likewise.
12429         (define_split and define_peephole2 dependent on arm_arch5):
12430         Likewise.
12431         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12432         arm_arch5e.
12433         (TARGET_ARM_QBIT): Likewise.
12434         (TARGET_DSP_MULTIPLY): Likewise.
12435         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12436         (arm_arch5, arm_arch5e): Delete.
12437         (arm_arch5t, arm_arch5te): Declare.
12438         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12439         (arm_arch5t): Declare.
12440         (arm_option_reconfigure_globals): Update for the above.
12441         (arm_options_perform_arch_sanity_checks): Update comment, replace
12442         use of arm_arch5 with arm_arch5t.
12443         (use_return_insn): Likewise.
12444         (arm_emit_call_insn): Likewise.
12445         (output_return_instruction): Likewise.
12446         (arm_final_prescan_insn): Likewise.
12447         (arm_coproc_builtin_available): Likewise.
12448         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12449         arm_arch5e with arm_arch5t and arm_arch5te.
12450         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12451         (arm_arch5t, arm_arch5te): Declare.
12452         * config/arm/arm-tables.opt: Regenerate.
12453         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12454         * config/arm/t-multilib: Likewise.
12455         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12456         instead of arm_arch5.
12457         (*call_reg_thumb1): Likewise.
12458         (*call_value_reg_thumb1_v5): Likewise.
12459         (*call_value_reg_thumb1): Likewise.
12460         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12461         unreachable path.
12462         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12464 2018-05-18  Martin Liska  <mliska@suse.cz>
12466         PR gcov-profile/84846
12467         * doc/gcov.texi: Document -t option of gcov tool.
12469 2018-05-18  Martin Liska  <mliska@suse.cz>
12471         PR gcov-profile/84846
12472         * gcov.c (print_usage): Add new -t option.
12473         (process_args): Handle the option.
12474         (generate_results): Use stdout as output when requested by
12475         the option.
12477 2018-05-18  Martin Liska  <mliska@suse.cz>
12479         PR gcov-profile/84846
12480         * coverage.c (coverage_init): Write PWD to .gcno file.
12481         * doc/gcov.texi: Document how working directory is printed.
12482         * gcov-dump.c (dump_gcov_file): Print PWD.
12483         * gcov.c (output_intermediate_file): Likewise.
12484         (read_graph_file): Read PWD string.
12485         (output_lines): Print PWD.
12487 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12489         PR middle-end/85817
12490         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12491         for retval and return false if all args to phi are zero.
12493 2018-05-18  Richard Biener  <rguenther@suse.de>
12495         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12496         method.
12497         (evrp_dom_walker::before_dom_children): Call it.
12499 2018-05-18  Richard Biener  <rguenther@suse.de>
12501         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12502         results when processing array refs with variable index.
12504 2018-05-18  Toon Moene  <toon@moene.org>
12506         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12507         directly after that of -floop-interchange. Indicate that both
12508         options are enabled by default when specifying -O3.
12510 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12512         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12513         iterator.  Delete separate integer-mode vec_set<mode> expander.
12514         (aarch64_simd_vec_setv2di): Delete.
12515         (vec_setv2di): Delete.
12516         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12517         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12518         the "w, r" alternative.
12520 2018-05-18  Martin Liska  <mliska@suse.cz>
12522         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12523         * tree-pass.h (make_pass_lower_switch_O0): New function.
12524         * tree-switch-conversion.c (node_has_low_bound): Remove.
12525         (node_has_high_bound): Likewise.
12526         (node_is_bounded): Likewise.
12527         (class pass_lower_switch): Make it a template type and create
12528         two instances.
12529         (pass_lower_switch::execute): Add template argument.
12530         (make_pass_lower_switch): New function.
12531         (make_pass_lower_switch_O0): New function.
12532         (do_jump_if_equal): Remove.
12533         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12534         all the hard work to tree optimization passes.
12536 2018-05-18  Martin Liska  <mliska@suse.cz>
12538         * dbgcnt.c (limit_low): Renamed from limit.
12539         (limit_high): New variable.
12540         (dbg_cnt_is_enabled): Check for upper limit.
12541         (dbg_cnt): Adjust dumping.
12542         (dbg_cnt_set_limit_by_index): Add new argument for high
12543         value.
12544         (dbg_cnt_set_limit_by_name): Likewise.
12545         (dbg_cnt_process_single_pair): Parse new format.
12546         (dbg_cnt_process_opt): Use strtok.
12547         (dbg_cnt_list_all_counters): Remove 'value' and add
12548         'limit_high'.
12549         * doc/invoke.texi: Document changes.
12551 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12553         * doc/sourcebuild.texi (scalar_all_fma): Document.
12554         * tree.def (FMA_EXPR): Delete.
12555         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12556         * internal-fn.c (ternary_direct): New macro.
12557         (expand_ternary_optab_fn): Likewise.
12558         (direct_ternary_optab_supported_p): Likewise.
12559         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12560         * builtins.c (fold_builtin_fma): Delete.
12561         (fold_builtin_3): Don't call it.
12562         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12563         * expr.c (expand_expr_real_2): Likewise.
12564         * fold-const.c (operand_equal_p): Likewise.
12565         (fold_ternary_loc): Likewise.
12566         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12567         * gimple.c (DEFTREECODE): Likewise.
12568         * gimplify.c (gimplify_expr): Likewise.
12569         * optabs-tree.c (optab_for_tree_code): Likewise.
12570         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12571         * tree-eh.c (operation_could_trap_p): Likewise.
12572         (stmt_could_throw_1_p): Likewise.
12573         * tree-inline.c (estimate_operator_cost): Likewise.
12574         * tree-pretty-print.c (dump_generic_node): Likewise.
12575         (op_code_prio): Likewise.
12576         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12577         * tree-ssa-operands.c (get_expr_operands): Likewise.
12578         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12579         * fold-const-call.h (fold_fma): Delete.
12580         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12581         CFN_FNMA and CFN_FNMS.
12582         (fold_fma): Delete.
12583         * genmatch.c (combined_fn): New enum.
12584         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12585         (commutative_op): New function.
12586         (commutate): Use it.  Handle more than 2 operands.
12587         (dt_operand::gen_gimple_expr): Use commutative_op.
12588         (parser::parse_expr): Allow :c to be used with non-binary
12589         operators if the commutative operand is known.
12590         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12591         CFN_FMS, CFN_FNMA and CFN_FNMS.
12592         (backprop::process_assign_use): Remove FMA_EXPR handling.
12593         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12594         (gen_hsa_fma): New function.
12595         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12596         IFN_FNMA and IFN_FNMS.
12597         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12598         * gimple-fold.h (follow_all_ssa_edges): Declare.
12599         * gimple-fold.c (follow_all_ssa_edges): New function.
12600         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12601         gimple_build interface and use follow_all_ssa_edges to fold the result.
12602         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12603         instead of checking for optabs directly.
12604         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12605         rather than FMA_EXPRs.
12606         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12607         call to IFN_FMA instead of an FMA_EXPR.
12609 2018-05-17  Jim Wilson  <jimw@sifive.com>
12611         * expr.c (do_tablejump): When converting index to Pmode, if we have a
12612         sign extended promoted subreg, and the range does not have the sign bit
12613         set, then do a sign extend.
12615         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12616         test, check for sign extended subreg and/or constant operands, and
12617         do a sign extend in that case.
12619 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
12621         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12622         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12623         Add untyped.
12624         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12625         Change logics_shift_reg to logics_shift_imm.
12626         (thunderx2t99_fp_loadpair_basic): Delete.
12627         (thunderx2t99_fp_storepair_basic): Delete.
12628         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12629         (thunderx2t99_asimd_polynomial): Delete.
12630         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12631         and neon_fp_mul_d_scalar_q.
12632         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12633         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12634         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12635         (thunderx2t99_asimd_lut): Add missing tbl types.
12636         (thunderx2t99_asimd_ext): Delete.
12637         (thunderx2t99_asimd_load1_1_mult): Delete.
12638         (thunderx2t99_asimd_load1_2_mult): Delete.
12639         (thunderx2t99_asimd_load1_ldp): New.
12640         (thunderx2t99_asimd_load1): New.
12641         (thunderx2t99_asimd_load2): Add missing *load2* types.
12642         (thunderx2t99_asimd_load3): New.
12643         (thunderx2t99_asimd_load4): New.
12644         (thunderx2t99_asimd_store1_1_mult): Delete.
12645         (thunderx2t99_asimd_store1_2_mult): Delete.
12646         (thunderx2t99_asimd_store2_mult): Delete.
12647         (thunderx2t99_asimd_store2_onelane): Delete.
12648         (thunderx2t99_asimd_store_stp): New.
12649         (thunderx2t99_asimd_store1): New.
12650         (thunderx2t99_asimd_store2): New.
12651         (thunderx2t99_asimd_store3): New.
12652         (thunderx2t99_asimd_store4): New.
12654 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12656         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12657         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12659 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12660             Segher Boessenkool  <segher@kernel.crashing.org>
12662         PR target/85698
12663         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12664         operand.
12666 2018-05-17  Richard Biener  <rguenther@suse.de>
12668         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12669         for pruning loop and prune defs feeding only already visited PHIs.
12671 2018-05-17  Richard Biener  <rguenther@suse.de>
12673         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12675 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12676             Richard Biener  <rguenther@suse.de>
12678         PR tree-optimization/85793
12679         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12680         for VMAT_ELEMENTWISE.
12682 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12684         * internal-fn.h (lookup_internal_fn): Declare
12685         * internal-fn.c (lookup_internal_fn): New function.
12686         * gimple.c (gimple_build_call_from_tree): Handle calls to
12687         internal functions.
12688         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12689         internal function names.
12690         * tree-pretty-print.c (dump_generic_node): Likewise.
12691         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12693 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12695         * gimple-fold.h (gimple_build): Make the function forms take
12696         combined_fn rather than built_in_function.
12697         (gimple_simplify): Likewise.
12698         * gimple-match-head.c (gimple_simplify): Likewise.
12699         * gimple-fold.c (gimple_build): Likewise.
12700         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12701         rather than gimple_build_call_internal.
12702         (get_initial_defs_for_reduction): Likewise.
12703         (vect_create_epilog_for_reduction): Likewise.
12704         (vectorizable_live_operation): Likewise.
12706 2018-05-17  Martin Liska  <mliska@suse.cz>
12708         * gimple-ssa-sprintf.c (format_directive): Do not use
12709         space in between 'G_' and '('.
12711 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12713         PR target/85323
12714         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12715         even if the mask is not all ones.
12717         PR target/85323
12718         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12719         vector.
12720         (ix86_gimple_fold_builtin): Likewise.
12722         PR target/85323
12723         * config/i386/i386.c: Include tree-vector-builder.h.
12724         (ix86_vector_shift_count): New function.
12725         (ix86_fold_builtin): Fold shift builtins by scalar count.
12726         (ix86_gimple_fold_builtin): Likewise.
12728         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12729         _mm512_setzero): New intrinsics.
12731 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12732             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12734         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12735         code generation for cases where splatting a value is not useful.
12736         * simplify-rtx.c (simplify_ternary_operation): Simplify
12737         vec_merge across a vec_duplicate and a paradoxical subreg forming
12738         a vector mode to a vec_concat.
12740 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12742         * config.gcc: Support "goldmont-plus".
12743         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12744         "goldmont-plus".
12745         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12746         PROCESSOR_GOLDMONT_PLUS.
12747         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12748         (processor_target_table): Add "goldmont-plus".
12749         (PTA_GOLDMONT_PLUS): Define.
12750         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12751         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12752         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12753         (fold_builtin_cpu): Add "goldmont-plus".
12754         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12755         (ix86_option_override_internal): Add "goldmont-plus".
12756         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12757         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12758         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12759         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12761 2018-05-17  Richard Biener  <rguenther@suse.de>
12763         PR tree-optimization/85757
12764         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12765         remove defs that only feed that PHI from further processing.
12767 2018-05-16  Jim Wilson  <jimw@sifive.com>
12769         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12770         asterisk to name.
12771         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12773 2018-05-16  Mark Wielaard  <mark@klomp.org>
12775         * dwarf2out.c (count_index_strings): New function.
12776         (output_indirect_strings): Call count_index_strings and generate
12777         header for dwarf_version >= 5.
12779 2018-05-16  Mark Wielaard  <mark@klomp.org>
12781         * dwarf2out.c (dwarf_FORM): New function.
12782         (set_indirect_string): Use dwarf_FORM.
12783         (reset_indirect_string): Likewise.
12784         (size_of_die): Likewise.
12785         (value_format): Likewise.
12786         (output_die): Likewise.
12787         (add_skeleton_AT_string): Likewise.
12788         (output_macinfo_op): Likewise.
12789         (index_string): Likewise.
12790         (output_index_string_offset): Likewise.
12791         (output_index_string): Likewise.
12792         (count_index_strings): Likewise.
12794 2018-05-16  Carl Love  <cel@us.ibm.com>
12796         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12797         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12799 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12801         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12802         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12804 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12806         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12807         (fnma<mode>4): Likewise.
12808         (fms<mode>4): Likewise.
12809         (fnms<mode>4): Likewise.
12810         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12811         (aarch64_fnma<mode>4): Likewise.
12812         (aarch64_fms<mode>4): Likewise.
12813         (aarch64_fnms<mode>4): Likewise.
12814         (aarch64_fnmadd<mode>4): Likewise.
12816 2018-05-16  Jason Merrill  <jason@redhat.com>
12818         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12820 2018-05-16  Richard Biener  <rguenther@suse.de>
12822         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12823         (dump_stmt_cost): Declare.
12824         (add_stmt_cost): Dump cost we add.
12825         (add_stmt_costs): New function.
12826         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12827         No longer exported.
12828         (vect_analyze_stmt): Adjust prototype.
12829         (vectorizable_condition): Likewise.
12830         (vectorizable_live_operation): Likewise.
12831         (vectorizable_reduction): Likewise.
12832         (vectorizable_induction): Likewise.
12833         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12834         cost vector to pass to vectorizable_ and record afterwards.
12835         (vect_model_reduction_cost): Take cost vector argument and adjust.
12836         (vect_model_induction_cost): Likewise.
12837         (vectorizable_reduction): Likewise.
12838         (vectorizable_induction): Likewise.
12839         (vectorizable_live_operation): Likewise.
12840         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12841         SLP_TREE_NUMBER_OF_VEC_STMTS.
12842         (vect_analyze_slp_cost_1): Remove.
12843         (vect_analyze_slp_cost): Likewise.
12844         (vect_slp_analyze_node_operations): Take visited args and
12845         a target cost vector.  Avoid processing already visited stmt sets.
12846         (vect_slp_analyze_operations): Use a local cost vector to gather
12847         costs and register those of non-discarded instances.
12848         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12849         (vect_schedule_slp_instance): Remove copying of
12850         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12851         zero.
12852         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12853         adding cost.  Record cost entry location.
12854         (vect_prologue_cost_for_slp_op): Function to compute cost of
12855         a constant or invariant generated for SLP vect in the prologue,
12856         split out from vect_analyze_slp_cost_1.
12857         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12858         (vect_model_promotion_demotion_cost): Likewise.
12859         (vect_model_store_cost): Likewise, make static.
12860         (vect_model_load_cost): Likewise.
12861         (vectorizable_bswap): Add cost vector arg and adjust.
12862         (vectorizable_call): Likewise.
12863         (vectorizable_simd_clone_call): Likewise.
12864         (vectorizable_conversion): Likewise.
12865         (vectorizable_assignment): Likewise.
12866         (vectorizable_shift): Likewise.
12867         (vectorizable_operation): Likewise.
12868         (vectorizable_store): Likewise.
12869         (vectorizable_load): Likewise.
12870         (vectorizable_condition): Likewise.
12871         (vectorizable_comparison): Likewise.
12872         (can_vectorize_live_stmts): Likewise.
12873         (vect_analyze_stmt): Likewise.
12874         (vect_transform_stmt): Adjust calls to vectorizable_*.
12875         * tree-vectorizer.c: Include gimple-pretty-print.h.
12876         (dump_stmt_cost): New function.
12878 2018-05-16  Richard Biener  <rguenther@suse.de>
12880         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12881         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12882         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12883         (check_name): New callback.
12884         (dse_classify_store): Track cycles via a visited bitmap of PHI
12885         defs and simplify handling of in-loop and across loop dead stores
12886         and properly fail for loop-variant refs.  Handle byte-tracking with
12887         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12888         limiting the walk.
12890 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12892         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12893         (vect_get_mask_type_for_stmt): Likewise.
12894         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12895         split out from...
12896         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12897         to determine the statement's vector type and the vector type that
12898         should be used for calculating nunits.  Deal with cases in which
12899         the type has to be deferred.
12900         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12901         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12902         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12903         (vect_determine_vf_for_stmt): New functions, split out from...
12904         (vect_determine_vectorization_factor): ...here.
12905         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12906         (vect_get_mask_type_for_stmt): New functions, split out from
12907         vect_determine_vectorization_factor.
12909 2018-05-16  Richard Biener  <rguenther@suse.de>
12911         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12912         verify the [VEC_]COND_EXPR embedded comparison.
12914 2018-05-15  Martin Sebor  <msebor@redhat.com>
12916         PR tree-optimization/85753
12917         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12918         RECORD_TYPE in addition to ARRAY_TYPE.
12920 2018-05-15  Martin Sebor  <msebor@redhat.com>
12922         PR middle-end/85643
12923         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12925 2018-05-15  Richard Biener  <rguenther@suse.de>
12927         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12928         add by_clobber_p one.  Change algorithm to collect all defs
12929         representing uses we need to walk and try reducing them to
12930         a single one before failing.
12931         (dse_dom_walker::dse_optimize_stmt): Adjust.
12933 2018-05-13  Mark Wielaard  <mark@klomp.org>
12935         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12936         (size_of_loc_descr): Likewise.
12937         (output_loc_operands): Likewise.
12938         (output_loc_operands_raw): Likewise.
12939         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12940         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12941         (hash_loc_operands): Likewise.
12942         (compare_loc_operands): Likewise.
12944 2018-05-14  Mark Wielaard  <mark@klomp.org>
12946         * dwarf2out.c (count_index_addrs): New function.
12947         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12949 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12951         PR tree-optimization/83648
12952         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12953         return value as malloc candidate.
12955 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12957         PR ipa/85734
12958         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12959         param as true in call to suggest_attribute.
12961 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12963         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12964         -mreadonly-in-sdata.
12966 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12968         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12969         New pattern.
12970         (aarch64_crypto_aesd_fused): Likewise.
12972 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12974         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12975         (movsi_aarch64): Likewise.
12976         (load_pairsi): Likewise.
12977         (load_pairdi): Likewise.
12978         (store_pairsi): Likewise.
12979         (store_pairdi): Likewise.
12980         (load_pairsf): Likewise.
12981         (load_pairdf): Likewise.
12982         (store_pairsf): Likewise.
12983         (store_pairdf): Likewise.
12984         (zero_extend): Likewise.
12985         (trunc): Swap alternatives.
12986         (fcvt_target): Add '?' to prefer w over r.
12988 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12990         PR target/85756
12991         * config/i386/i386.md: Disallow non-commutative arithmetics in
12992         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12993         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12994         in the peephole2 before it.
12996 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12998         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12999         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13000         (ix86_handle_option): Handle -mcldemote.
13001         * config.gcc: New header.
13002         * config/i386/cldemoteintrin.h: New file.
13003         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13004         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13005         -mcldemote.
13006         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13007         OPTION_MASK_ISA_CLDEMOTE.
13008         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13009         (ix86_valid_target_attribute_inner_p): Ditto.
13010         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13011         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13012         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13013         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13014         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13015         (cldemote): New.
13016         * config/i386/i386.opt: Add -mcldemote.
13017         * config/i386/x86intrin.h: New header.
13018         * doc/invoke.texi: Add -mcldemote.
13020 2018-05-14  Richard Biener  <rguenther@suse.de>
13022         * doc/match-and-simplify.texi: Adjust :s documentation.
13024 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
13026         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13027         intended memcpy size.
13028         (REORDER_45): Likewise.
13030 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
13032         * sort.cc: New file.
13033         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13034         * vec.c (qsort_chk): Use gcc_qsort.
13035         * Makefile.in (OBJS-libcommon): Add sort.o.
13036         (build/sort.o): New target.  Use it...
13037         (BUILD_RTL): ... here, and...
13038         (build/gencfn-macros): ... here, and...
13039         (build/genmatch): ... here.
13041 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13042             Chung-Ju Wu  <jasonwucj@gmail.com>
13044         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13045         * config/nds32/nds32-graywolf.md: New file.
13046         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13047         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13048         pipeline.
13049         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13050         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13051         * config/nds32/nds32.md (pipeline_model): Add graywolf.
13052         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13053         * config/nds32/pipelines.md: Include n15 settings.
13055 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13056             Chung-Ju Wu  <jasonwucj@gmail.com>
13058         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13059         * config/nds32/nds32-n13.md: New file.
13060         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13061         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13062         pipeline.
13063         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13064         * config/nds32/nds32.md (pipeline_model): Add n13.
13065         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13066         * config/nds32/pipelines.md: Include n13 settings.
13068 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
13069             Chung-Ju Wu  <jasonwucj@gmail.com>
13071         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13072         * config/nds32/nds32-n10.md: New file.
13073         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13074         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13075         pipeline.
13076         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13077         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13078         * config/nds32/nds32.md (pipeline_model): Add n10.
13079         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13080         * config/nds32/pipelines.md: Include n10 settings.
13082 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
13083             Kito Cheng  <kito.cheng@gmail.com>
13084             Chung-Ju Wu  <jasonwucj@gmail.com>
13086         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13087         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13088         Add enum values for DSP extension instructions.
13089         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13090         New constraints.
13091         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13092         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13093         New code iterators.
13094         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13095         * config/nds32/nds32-dspext.md: New file for DSP implementation.
13096         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13097         * config/nds32/nds32-intrinsic.md: Likewise.
13098         * config/nds32/nds32_intrinsic.h: Likewise.
13099         * config/nds32/nds32-md-auxiliary.c: Likewise.
13100         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13101         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13102         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13103         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13104         * config/nds32/nds32-protos.h: New declarations for DSP extension.
13105         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13106         TYPE_DMAC in switch statement.
13107         * config/nds32/nds32.c: New checking and implementation for DSP
13108         extension instructions.
13109         * config/nds32/nds32.h: Likewise.
13110         * config/nds32/nds32.md: Likewise.
13111         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13112         * config/nds32/predicates.md: Implement new predicates for DSP
13113         extension.
13115 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
13117         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13118         Reformat alternatives and attributes so it is easier to identify
13119         which constraints/attributes go with which instruction.
13120         (mov<mode>_hardfloat32, FMOVE64): Likewise.
13121         (mov<mode>_softfloat32, FMOVE64): Likewise.
13122         (mov<mode>_hardfloat64, FMOVE64): Likewise.
13123         (mov<mode>_softfloat64, FMOVE64): Likewise.
13125 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13127         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13128         subsection.
13129         (Basic PowerPC Built-in Functions): The new name of the
13130         subsection previously known as "PowerPC Built-in Functions".
13131         (Basic PowerPC Built-in Functions Available on all Configurations):
13132         New subsubsection.
13133         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13134         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13135         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13136         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13138 2018-05-11  Martin Jambor  <mjambor@suse.cz>
13140         PR ipa/85655
13141         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13142         single const.
13144 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13146         PR target/85733
13147         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13149 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
13151         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13152         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13153         (ix86_handle_option): Handle -mwaitpkg.
13154         * config.gcc: New header.
13155         * config/i386/cpuid.h (bit_WAITPKG): New bit.
13156         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13157         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13158         function type.
13159         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13160         OPTION_MASK_ISA_WAITPKG.
13161         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13162         (ix86_option_override_internal): Add PTA_WAITPKG.
13163         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13164         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13165         IX86_BUILTIN_TPAUSE.
13166         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13167         __builtin_ia32_umwait and __builtin_ia32_tpause.
13168         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13169         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13170         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13171         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13172         UNSPECV_TPAUSE): New.
13173         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13174         * config/i386/i386.opt: Add -mwaitpkg.
13175         * config/i386/waitpkgintrin.h: New file.
13176         * config/i386/x86intrin.h: New header.
13177         * doc/invoke.texi: Add -mwaitpkg.
13179 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
13181         PR target/85606
13182         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13183         equivalent.
13184         (cortex-m0): Use armv6s-m isa.
13185         (cortex-m0plus): Likewise.
13186         (cortex-m1): Likewise.
13187         (cortex-m0.small-multiply): Likewise.
13188         (cortex-m0plus.small-multiply): Likewise.
13189         (cortex-m1.small-multiply): Likewise.
13191 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
13192             Jakub Jelinek  <jakub@redhat.com>
13194         PR tree-optimization/85692
13195         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13196         source permute as well.
13198 2018-05-11  Martin Liska  <mliska@suse.cz>
13200         PR sanitizer/85556
13201         * doc/extend.texi: Document LLVM style format for no_sanitize
13202         attribute.
13204 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
13206         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13207         mode_supports_vsx_dform_quad to mode_supports_dq_form.
13208         (mode_supports_vsx_dform_quad): Likewise.
13209         (mode_supports_vmx_dform): Move these functions to be next to the
13210         other mode_supports functions.
13211         (mode_supports_dq_form): Likewise.
13212         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13213         mode_supports_dq_form.
13214         (reg_offset_addressing_ok_p): Likewise.
13215         (offsettable_ok_by_alignment): Likewise.
13216         (rs6000_legitimate_offset_address_p): Likewise.
13217         (legitimate_lo_sum_address_p): Likewise.
13218         (rs6000_legitimize_address): Likewise.
13219         (rs6000_legitimize_reload_address): Likewise.
13220         (rs6000_secondary_reload_inner): Likewise.
13221         (rs6000_preferred_reload_class): Likewise.
13222         (rs6000_output_move_128bit): Likewise.
13224 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
13226         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13227         Generate SImode target register for null target.
13228         <case IX86_BUILTIN_XGETBV>: Ditto.
13229         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13230         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13232 2018-05-10  Carl Love  <cel@us.ibm.com>
13234         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13235         dcbtt and dcbtstt if operands[2] is 0.
13237 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
13239         PR target/85693
13240         * config/i386/sse.md (usadv64qi): New expander.
13242 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
13244         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13245         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13246         -maltivec=be support.
13247         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13248         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13249         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13250         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13251         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13252         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13253         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13254         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13255         altivec_vsumsws): Adjust.
13256         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13257         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13258         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13259         support.
13260         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13261         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13262         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13263         (altivec_lve<VI_char>x): Delete expand.
13264         (*altivec_lve<VI_char>x_internal): Rename to...
13265         (altivec_lve<VI_char>x): ... this.
13266         (altivec_lvxl_<mode>): Delete expand.
13267         (*altivec_lvxl_<mode>_internal): Rename to ...
13268         (altivec_lvxl_<mode>): ... this.
13269         (altivec_stvxl_<mode>): Delete expand.
13270         (*altivec_stvxl_<mode>_internal): Rename to ...
13271         (altivec_stvxl_<mode>): ... this.
13272         (altivec_stve<VI_char>x): Delete expand.
13273         (*altivec_stve<VI_char>x_internal): Rename to ...
13274         (altivec_stve<VI_char>x): ... this.
13275         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13276         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13277         reduc_plus_scal_<mode>): Adjust.
13278         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13279         comment.
13280         (rs6000_cpu_cpp_builtins): Adjust.
13281         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13282         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13283         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13284         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13285         -maltivec=be support.
13286         (rs6000_split_vec_extract_var): Adjust.
13287         (rs6000_split_v4si_init): Adjust.
13288         (swap_selector_for_mode): Delete.
13289         (altivec_expand_lvx_be, altivec_expand_stvx_be,
13290         altivec_expand_stvex_be): Delete.
13291         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13292         -maltivec=be support.
13293         (rs6000_gimple_fold_builtin): Ditto.
13294         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13295         Adjust.
13296         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13297         (TARGET_DIRECT_MOVE_64BIT): Adjust.
13298         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13299         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13300         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13301         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13302         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13303         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13304         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13305         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13306         anonymous split): Adjust.
13307         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13308         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13310 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13312         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13313         when --with-gxx-include-dir is also specified.
13314         * configure: Regenerate.
13316 2018-05-09  Jim Wilson  <jimw@sifive.com>
13318         PR target/84797
13319         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13320         * config/riscv/t-withmultilib: New.
13321         * config/riscv/withmultilib.h: New.
13322         * doc/install.texi: Document RISC-V --with-multilib-list support.
13324 2018-05-09  Richard Biener  <rguenther@suse.de>
13326         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13327         vector.
13328         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13329         actual scalar cost using the cost vector and the add_stmt_cost
13330         machinery.
13332 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13334         PR rtl-optimization/85645
13335         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13336         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13338 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13340         PR rtl-optimization/85645
13341         * shrink-wrap.c (spread_components): Return a boolean saying if
13342         anything was changed.
13343         (try_shrink_wrapping_separate): Iterate spread_components until
13344         nothing changes anymore.
13346 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13348         PR rtl-optimization/85645
13349         * regrename.c (build_def_use): Also kill the chains that include the
13350         destination of a REG_CFA_REGISTER note.
13352 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13354         PR rtl-optimization/85645
13355         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13356         insn that has a REG_CFA_REGISTER note.
13358 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13360         * cfgexpand.c (expand_clobber): New function.
13361         (expand_gimple_stmt_1): Use it.
13362         * tree-vect-stmts.c (vect_clobber_variable): New function,
13363         split out from...
13364         (vectorizable_simd_clone_call): ...here.
13365         (vectorizable_store): Emit a clobber either side of an
13366         IFN_STORE_LANES sequence.
13367         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13369 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13371         PR target/85626
13372         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13373         (define_insn "trap_if_false"): Add exit after trap.
13375 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13377         PR rtl-optimization/85638
13378         * bb-reorder.c: Include common/common-target.h.
13379         (create_forwarder_block): New function extracted from...
13380         (fix_up_crossing_landing_pad): ...here.  Rename into...
13381         (dw2_fix_up_crossing_landing_pad): ...this.
13382         (sjlj_fix_up_crossing_landing_pad): New function.
13383         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13384         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13385         from both partitions and exit the loop after one iteration.
13387 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13389         Revert:
13390         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13391         subsection.
13392         (Basic PowerPC Built-in Functions): The new name of the
13393         subsection previously known as "PowerPC Built-in Functions".
13394         (Basic PowerPC Built-in Functions Available on all Configurations):
13395         New subsubsection.
13396         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13397         subsubsection.
13398         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13399         subsubsection.
13400         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13401         subsubsection.
13402         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13403         subsubsection.
13405 2018-05-08  Jim Wilson  <jimw@sifive.com>
13407         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13408         (LD_EMUL_SUFFIX): New.
13409         (LINK_SPEC): Use it.
13411 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13413         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13414         subsection.
13415         (Basic PowerPC Built-in Functions): The new name of the
13416         subsection previously known as "PowerPC Built-in Functions".
13417         (Basic PowerPC Built-in Functions Available on all Configurations):
13418         New subsubsection.
13419         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13420         subsubsection.
13421         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13422         subsubsection.
13423         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13424         subsubsection.
13425         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13426         subsubsection.
13428 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13430         PR target/85683
13431         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13432         after cmpelim optimization.
13434 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13436         * config.gcc: Support "goldmont".
13437         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13438         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13439         PROCESSOR_GOLDMONT.
13440         * config/i386/i386.c (m_GOLDMONT): Define.
13441         (processor_target_table): Add "goldmont".
13442         (PTA_GOLDMONT): Define.
13443         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13444         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13445         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13446         (fold_builtin_cpu): Add "goldmont".
13447         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13448         (ix86_option_override_internal): Add "goldmont".
13449         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13450         (processor_type): Add PROCESSOR_GOLDMONT.
13451         * config/i386/i386.md: Add CPU "glm".
13452         * config/i386/glm.md: New file.
13453         * config/i386/x86-tune.def: Add m_GOLDMONT.
13454         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13456 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13458         PR target/85572
13459         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13460         E_V4DImode.
13461         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13462         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13463         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13465         PR target/85317
13466         * config/i386/i386.c (ix86_fold_builtin): Handle
13467         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13469         PR target/85480
13470         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13471         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13473 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13475         PR target/85658
13476         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13477         (check_arch): Likewise.
13478         (check_fpu): Return the result rather than printing it.
13479         (end arch): Fix operator precedence.
13480         (end cpu): Likewise.
13481         (END): Print the result from check_fpu.
13483 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13484             Alan Hayward  <alan.hayward@arm.com>
13485             David Sherwood  <david.sherwood@arm.com>
13487         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13488         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13489         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13490         (*fcmuo<mode>_and): New patterns.
13492 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13494         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13495         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13496         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13497         (cmp_op, sve_imm_con): New code attributes.
13498         (SVE_COND_INT_CMP, imm_con): Delete.
13499         (cmp_op): Remove above unspecs from int attribute.
13500         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13501         to...
13502         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13503         comparison-specific unspecs.
13504         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13505         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13506         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13507         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13508         (*vec_fcm<cmp_op><mode>): Rename to...
13509         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13510         (*vec_fcmuo<mode>): Rename to...
13511         (*fcmuo<mode>): ...this and adjust likewise.
13512         (*pred_fcm<cmp_op><mode>): New pattern.
13513         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13514         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13515         functions.
13516         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13517         and UNORDERED.
13518         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13519         (aarch64_emit_sve_predicated_cond): New function.
13520         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13521         (aarch64_emit_unspec_cond_or): Replace with...
13522         (aarch64_emit_sve_or_conds): ...this new function.  Use
13523         aarch64_emit_sve_ptrue_op for the individual comparisons and
13524         aarch64_emit_binop to OR them together.
13525         (aarch64_emit_inverted_unspec_cond): Replace with...
13526         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13527         aarch64_emit_sve_ptrue_op for the comparison and
13528         aarch64_emit_unop to invert the result.
13529         (aarch64_expand_sve_vec_cmp_float): Update after the above
13530         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13532 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13534         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13535         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13536         (Backwards Compatibility): Likewise.
13538 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13540         PR bootstrap/85681
13541         Revert:
13542         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13544         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13545         <prefetch_dynamic_strides>: New const bool field.
13546         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13547         prefetch_dynamic_strides.
13548         (exynosm1_prefetch_tune): Likewise.
13549         (thunderxt88_prefetch_tune): Likewise.
13550         (thunderx_prefetch_tune): Likewise.
13551         (thunderx2t99_prefetch_tune): Likewise.
13552         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13553         to false.
13554         (aarch64_override_options_internal): Update to set
13555         PARAM_PREFETCH_DYNAMIC_STRIDES.
13556         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13557         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13558         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13559         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13560         prefetch-dynamic-strides setting.
13562         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13564         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13565         <minimum_stride>: New const int field.
13566         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13567         minimum_stride field.
13568         (exynosm1_prefetch_tune): Likewise.
13569         (thunderxt88_prefetch_tune): Likewise.
13570         (thunderx_prefetch_tune): Likewise.
13571         (thunderx2t99_prefetch_tune): Likewise.
13572         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13573         (aarch64_override_options_internal): Update to set
13574         PARAM_PREFETCH_MINIMUM_STRIDE.
13575         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13576         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13577         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13578         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13579         stride is constant and is below the minimum stride threshold.
13581 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13583         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13584         to 512.
13586 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13588         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13589         <prefetch_dynamic_strides>: New const bool field.
13590         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13591         prefetch_dynamic_strides.
13592         (exynosm1_prefetch_tune): Likewise.
13593         (thunderxt88_prefetch_tune): Likewise.
13594         (thunderx_prefetch_tune): Likewise.
13595         (thunderx2t99_prefetch_tune): Likewise.
13596         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13597         to false.
13598         (aarch64_override_options_internal): Update to set
13599         PARAM_PREFETCH_DYNAMIC_STRIDES.
13600         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13601         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13602         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13603         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13604         prefetch-dynamic-strides setting.
13606 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13608         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13609         <minimum_stride>: New const int field.
13610         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13611         minimum_stride field.
13612         (exynosm1_prefetch_tune): Likewise.
13613         (thunderxt88_prefetch_tune): Likewise.
13614         (thunderx_prefetch_tune): Likewise.
13615         (thunderx2t99_prefetch_tune): Likewise.
13616         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13617         (aarch64_override_options_internal): Update to set
13618         PARAM_PREFETCH_MINIMUM_STRIDE.
13619         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13620         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13621         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13622         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13623         stride is constant and is below the minimum stride threshold.
13625 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
13627         PR c++/85659
13628         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13629         the type is addressable.  Don't force op into register if it has
13630         BLKmode.
13632 2018-05-05  Roland McGrath  <mcgrathr@google.com>
13634         PR other/77609
13635         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13636         any section for which we don't know a specific type it should have,
13637         regardless of name.  Previously this was done only for the exact
13638         names ".init_array", ".fini_array", and ".preinit_array".
13639         (default_elf_asm_named_section): Add comment about
13640         relationship with default_section_type_flags and SECTION_NOTYPE.
13641         (get_section): Don't consider it a type conflict if one side has
13642         SECTION_NOTYPE and the other doesn't, as long as neither has the
13643         SECTION_BSS et al used in the default_section_type_flags logic.
13645 2018-05-05  Tom de Vries  <tom@codesourcery.com>
13647         PR target/85653
13648         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13649         (workaround_barsyncs): New function.
13650         (nvptx_reorg): Use workaround_barsyncs.
13651         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13652         (define_expand "nvptx_membar_cta"): New define_expand.
13653         (define_insn "*nvptx_membar_cta"): New insn.
13655 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13657         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13658         To improve optimization opportunities.
13659         * builtin-types.def: The new needed builtin types for the above.
13661 2018-05-04  Richard Biener  <rguenther@suse.de>
13663         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13664         * gimple-ssa-store-merging.c
13665         (imm_store_chain_info::output_merged_store): Remove redundant create,
13666         release split_store vector contents on failure.
13667         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13668         scalar stmt vector on cache hit.
13670 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13672         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13673         Xilinx FP support.
13674         * config.gcc (powerpc-xilinx-eabi*): Remove.
13675         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13676         support.
13677         (fusion_addis_mem_combo_load): Ditto.
13678         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13679         FP support.
13680         (rs6000_cpu_cpp_builtins): Ditto.
13681         * config/rs6000/rs6000-linux.c
13682         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13683         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13684         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13685         support.
13686         (rs6000_setup_reg_addr_masks): Ditto.
13687         (rs6000_init_hard_regno_mode_ok): Ditto.
13688         (rs6000_option_override_internal): Ditto.
13689         (legitimate_lo_sum_address_p): Ditto.
13690         (rs6000_legitimize_address): Ditto.
13691         (rs6000_legitimize_reload_address): Ditto.
13692         (rs6000_legitimate_address_p): Ditto.
13693         (abi_v4_pass_in_fpr): Ditto.
13694         (setup_incoming_varargs): Ditto.
13695         (rs6000_gimplify_va_arg): Ditto.
13696         (rs6000_split_multireg_move): Ditto.
13697         (rs6000_savres_strategy): Ditto.
13698         (rs6000_emit_prologue_components): Ditto.
13699         (rs6000_emit_epilogue_components): Ditto.
13700         (rs6000_emit_prologue): Ditto.
13701         (rs6000_emit_epilogue): Ditto.
13702         (rs6000_elf_file_end): Ditto.
13703         (rs6000_function_value): Ditto.
13704         (rs6000_libcall_value): Ditto.
13705         * config/rs6000/rs6000.h: Ditto.
13706         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13707         (TARGET_MINMAX): ... this.  New.
13708         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13709         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13710         (*movsi_internal1_single): Delete.
13711         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13712         mfpu=, mxilinx-fpu): Delete.
13713         * config/rs6000/singlefp.h: Delete.
13714         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13715         * config/rs6000/t-rs6000: Ditto.
13716         * config/rs6000/t-xilinx: Delete.
13717         * config/rs6000/titan.md: Adjust for fp_type removal.
13718         * config/rs6000/vsx.md: Remove Xilinx FP support.
13719         (VStype_simple): Delete.
13720         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13721         * config/rs6000/xfpu.h: Delete.
13722         * config/rs6000/xfpu.md: Delete.
13723         * config/rs6000/xilinx.h: Delete.
13724         * config/rs6000/xilinx.opt: Delete.
13725         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13726         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13728 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13730         PR libgomp/85639
13731         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13732         if ignore == 0.
13734 2018-05-04  Richard Biener  <rguenther@suse.de>
13736         PR middle-end/85627
13737         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13738         (expand_complex_div_wide): Likewise.
13739         (expand_complex_operations_1): Likewise.
13740         (expand_complex_libcall): Preserve EH info of the original stmt.
13741         (tree_lower_complex): Handle removed blocks.
13742         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13743         on complex multiplication and division libcall builtins.
13745 2018-05-04  Richard Biener  <rguenther@suse.de>
13747         PR middle-end/85574
13748         * fold-const.c (negate_expr_p): Restrict negation of operand
13749         zero of a division to when we know that can happen without
13750         overflow.
13751         (fold_negate_expr_1): Likewise.
13753 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13755         PR libstdc++/85466
13756         * real.h (real_nextafter): Declare.
13757         * real.c (real_nextafter): New function.
13758         * fold-const-call.c (fold_const_nextafter): New function.
13759         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13760         CASE_CFN_NEXTTOWARD.
13761         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13762         even when arg1_mode is different from arg0_mode.
13764 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13766         * doc/extend.texi (Deprecated Features): Remove
13767         -ffriend-injection.
13768         (Backwards Compatibility): Likewise.
13769         * doc/invoke.texi (C++ Language Options): Likewise.
13770         (C++ Dialect Options): Likewise.
13772 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13774         PR target/85530
13775         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13776         _mm512_mask_mullox_epi64): New intrinsics.
13778 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13780         PR testsuite/85106
13781         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13782         dump files): Add offload-tree.
13784 2018-05-03  Richard Biener  <rguenther@suse.de>
13786         PR tree-optimization/85615
13787         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13788         to loops not nested in BBs loop father to avoid creating multi-entry
13789         loops.
13791 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13793         PR tree-optimization/70291
13794         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13795         arguments.  Change return type to tree.  Emit libcall as a new
13796         statement rather than replacing existing one when inplace_p is true.
13797         (expand_complex_multiplication_components): New function.
13798         (expand_complex_multiplication): Expand floating-point complex
13799         multiplication using the above.
13800         (expand_complex_division): Rename inner_type parameter to type.
13801         Update expand_complex_libcall call-site.
13802         (expand_complex_operations_1): Update expand_complex_multiplication
13803         and expand_complex_division call-sites.
13805 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13807         PR target/85582
13808         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13809         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13810         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13811         the highest significant bit of the shift count mask is clear.  In
13812         check whether and[sq]i3 is needed verify that all significant bits
13813         of the shift count other than the highest are set.
13815 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13817         PR libgomp/82428
13818         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13819         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13820         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13821         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13822         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13823         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13824         __builtin_goacc_parlevel_size.
13826 2018-05-02  Richard Biener  <rguenther@suse.de>
13828         PR tree-optimization/85597
13829         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13830         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13831         directly.
13833 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13835         PR testsuite/85106
13836         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13837         dump files): Add ltrans-tree.
13839 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13841         PR testsuite/85106
13842         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13843         dump files): Add wpa-ipa.
13845 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13847         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13848         powerpc*-*-linux*paired* target.
13849         * config/rs6000/750cl.h: Delete.
13850         * config/rs6000/paired.h: Delete.
13851         * config/rs6000/paired.md: Delete.
13852         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13853         float support.
13854         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13855         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13856         comment.  Remove paired float support.
13857         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13858         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13859         VECTOR_PAIRED.
13860         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13861         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13862         declarations.
13863         * config/rs6000/rs6000.c: Remove paired float support.
13864         (paired_expand_vector_init, paired_expand_vector_move,
13865         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13866         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13867         paired_expand_builtin, paired_expand_predicate_builtin,
13868         paired_init_builtins): Delete.
13869         * config/rs6000/rs6000.h: Remove paired float support.
13870         * config/rs6000/rs6000.md: Remove paired float support.
13871         (move_from_CR_ov_bit): Delete.
13872         * config/rs6000/rs6000.opt (mpaired): Delete.
13873         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13874         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13876 2018-05-02  Richard Biener  <rguenther@suse.de>
13878         PR middle-end/85567
13879         * gimplify.c (gimplify_save_expr): When in SSA form allow
13880         SAVE_EXPRs to compute to SSA vars.
13882 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13884         PR target/85582
13885         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13886         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13887         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13888         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13890 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13892         PR tree-optimization/85586
13893         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13894         exit early for statements in the same group if the accesses are
13895         not strided.
13897 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13899         PR lto/85451
13900         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13901         error message.
13903 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13905         PR tree-optimization/85143
13906         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13908 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13910         PR lto/85451
13911         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13912         not found" error message.
13914 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13916         PR other/83786
13917         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13918         * vec.c (test_ordered_remove_if): New function.
13919         (vec_c_tests): Call test_ordered_remove_if.
13920         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13921         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13922         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13923         VEC_ORDERED_REMOVE_IF.
13925 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13927         PR tree-optimization/82665
13928         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13929         pointer subtraction where arguments come from a memchr call.
13931 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13933         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13934         --push-state --as-needed and --pop-state instead of --as-needed and
13935         --no-as-needed if ld supports it.
13936         * configure: Regenerated.
13938         PR web/85578
13939         * doc/install.texi2html: Replace _002d with - and _002a with * in
13940         generated html files using sed.
13942 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13944         PR c++/85523
13945         * gcc-rich-location.c (blank_line_before_p): New function.
13946         (use_new_line): New function.
13947         (gcc_rich_location::add_fixit_insert_formatted): New function.
13948         * gcc-rich-location.h
13949         (gcc_rich_location::add_fixit_insert_formatted): New function.
13951 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13953         * selftest.c (assert_streq): Rename "expected" and "actual" to
13954         "val1" and "val2".  Extend NULL-handling to cover both inputs
13955         symmetrically, while still requiring both to be non-NULL for a pass.
13956         * selftest.h (assert_streq): Rename "expected" and "actual" to
13957         "val1" and "val2".
13958         (ASSERT_EQ): Likewise.
13959         (ASSERT_EQ_AT): Likewise.
13960         (ASSERT_KNOWN_EQ): Likewise.
13961         (ASSERT_KNOWN_EQ_AT): Likewise.
13962         (ASSERT_NE): Likewise.
13963         (ASSERT_MAYBE_NE): Likewise.
13964         (ASSERT_MAYBE_NE_AT): Likewise.
13965         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13966         the assertion to pass.
13967         (ASSERT_STREQ_AT): Likewise.
13969 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13971         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13972         interaction with -pie.
13974 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13976         * selftest.h: Fix alphabetization of per-source-file selftest
13977         declarations.
13979 2018-04-30  Jason Merrill  <jason@redhat.com>
13981         PR c++/61982 - dead stores to destroyed objects.
13982         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13983         of clobber.
13985 2018-04-30  Jason Merrill  <jason@redhat.com>
13987         * tree.c (build_clobber): New.
13988         * tree.h: Declare it.
13989         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13991 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13993         * diagnostic-show-locus.c (layout::layout): Update for
13994         location_get_source_line returning a char_span.
13995         (struct char_span): Move to input.h.
13996         (struct correction): Update for fields in char_span becoming
13997         private.
13998         (struct source_line): Update for location_get_source_line
13999         returning a char_span.
14000         (layout::print_line): Likewise.
14001         * edit-context.c (edited_file::print_content): Likewise.
14002         (edited_file::print_diff_hunk): Likewise.
14003         (edited_file::print_run_of_changed_lines): Likewise.
14004         (edited_file::get_num_lines): Likewise.
14005         (edited_line::edited_line): Likewise.
14006         * final.c (asm_show_source): Likewise.
14007         * input.c (location_get_source_line): Convert return type
14008         from const char * to char_span, losing the final "line_len"
14009         param.
14010         (dump_location_info): Update for the above.
14011         (get_substring_ranges_for_loc): Likewise.  Use a char_span
14012         when handling the literal within the line.
14013         (test_reading_source_line): Update for location_get_source_line
14014         returning a char_span.
14015         * input.h (class char_span): Move here from
14016         diagnostic-show-locus.c, converting from a struct to a class.
14017         Make data members private.
14018         (char_span::operator bool): New.
14019         (char_span::length): New.
14020         (char_span::get_buffer): New.
14021         (char_span::operator[]): New.
14022         (char_span::subspan): Make const.
14023         (char_span::xstrdup): New.
14024         (location_get_source_line): Convert return type from const char *
14025         to char_span, losing the final "line_size" param.
14027 2018-04-30  Jan Hubicka  <jh@suse.cz>
14029         * lto-wrapper.c (ltrans_priorities): New static var.
14030         (cmp_priority): New.
14031         (run_gcc): Read priorities and if doing parallel build order
14032         the Makefile by them.
14034 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
14036         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14038 2018-04-30  Richard Biener  <rguenther@suse.de>
14040         * tree-cfg.c (verify_address): Remove base argument, add
14041         flag whether to check TREE_ADDRESSABLE and do that.
14042         (verify_expr): Remove.
14043         (verify_types_in_gimple_reference): Add pieces from verify_expr.
14044         (verify_gimple_assign_single): Likewise.
14045         (verify_gimple_switch): Likewise.
14046         (verify_expr_location_1): Dereference tp once.  Add (disabled)
14047         piece from verify_expr.
14048         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14050 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14052         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14054 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14056         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14057         (small_data_pattern): Likewise.
14058         (arc_rewrite_small_data): Likewise.
14059         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14060         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14061         (get_symbol_alignment): New function.
14062         (legitimate_small_data_address_p): Likewise.
14063         (legitimate_scaled_address): Update, call
14064         legitimate_small_data_address_p.
14065         (output_sdata): New static variable.
14066         (arc_print_operand): Update how we handle small data operands.
14067         (arc_print_operand_address): Likewise.
14068         (arc_legitimate_address_p): Update, use
14069         legitimate_small_data_address_p.
14070         (arc_rewrite_small_data_p): Remove.
14071         (arc_rewrite_small_data_1): Likewise.
14072         (arc_rewrite_small_data): Likewise.
14073         (small_data_pattern): Likewise.
14074         (compact_sda_memory_operand): Update to use
14075         legitimate_small_data_address_p and get_symbol_alignment.
14076         (prepare_move_operands): Don't rewite sdata pattern.
14077         (prepare_extend_operands): Remove.
14078         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14079         pattern.
14080         (zero_extendqisi2): Likewise.
14081         (zero_extendhisi2): Likewise.
14082         (extendqihi2): Likewise.
14083         (extendqisi2): Likewise.
14084         (extendhisi2): Likewise.
14085         (addsi3): Likewise.
14086         (subsi3): Likewise.
14087         (andsi3): Likewise.
14088         * config/arc/constraints.md (Usd): Change it to memory constraint.
14090 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
14092         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14093         as source of std instructions.
14094         * config/arc/arc.md (movsi_insn): Update pattern predicate to
14095         allow 6-bit constants as source for store instructions.
14096         (movdi_insn): Update instruction pattern to allow 6-bit constants
14097         as source for store instructions.
14099 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
14101         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14103 2018-04-30  Nathan Sidwell  <nathan@acm.org>
14104             Sandra Loosemore <sandra@codesourcery.com>
14106         * dumpfile.c (dump_open): Allow '-' for stdout.
14107         * doc/invoke.texi (Developer Options): Document dump filename
14108         determination early.  Document stdin/stdout selection.
14110 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
14112         Microblaze Target: PIC data text relative
14114         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14115         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14116         Add declaration.
14117         * config/microblaze/microblaze.h (microblaze_constant_address_p):
14118         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14119         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14120         New addressing mode for data-text relative position indepenedent code.
14121         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14122         'ADDRESS_SYMBOLIC_TXT_REL'.
14123         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14124         (microblaze_legitimate_pic_operand): Exclude function calls from
14125         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14126         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14127         addresses cases.
14128         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14129         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14130         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14131         for 'address + offset'.
14132         (microblaze_expand_prologue): Add new function prologue call for
14133         'r20' assignation.
14134         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14135         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14136         table in case of TARGET_PIC_DATA_TEXT_REL.
14137         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14138         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14139         Add new macros 'UNSPEC_TEXT',
14140         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14141         + exclude function calls from 'UNSPEC_PLT' in case of data text
14142         relative mode.
14143         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14144         new target hook for generating address diff vector tables in case of
14145         flag_pic.
14146         * doc/tm.texi : Regenerate.
14147         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14148         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14149         of addr diff vector generation.
14150         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14151         target hook definition.
14152         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14153         Add default function for generate_pic_addr_diff_vec -> flag_pic.
14154         * doc/invoke.texi (Add new pic option): Add new microblaze pic
14155         option for data text relative.
14157 2018-04-30  Richard Biener  <rguenther@suse.de>
14159         * tree-chrec.h (evolution_function_is_constant_p): Remove
14160         redundant check.
14161         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14163 2018-04-30  Richard Biener  <rguenther@suse.de>
14165         PR bootstrap/85571
14166         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14168 2018-04-30  Richard Biener  <rguenther@suse.de>
14170         PR tree-optimization/28364
14171         PR tree-optimization/85275
14172         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14173         copying first exit test.
14175 2018-04-28  Mark Wielaard  <mark@klomp.org>
14177         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14178         dwarf_version >= 5.
14179         (dwarf_AT): Handle DW_AT_addr_base.
14180         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14182 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
14184         PR target/84431
14185         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14186         (*ashl<dwi>3_doubleword_mask_1): Ditto.
14187         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14188         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14190 2018-04-28  Richard Biener  <rguenther@suse.de>
14192         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14193         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14194         to reflect use.  Only add interesting stmts.
14196 2018-04-27  Martin Jambor  <mjambor@suse.cz>
14198         PR ipa/85549
14199         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14200         the jump function allows for passing through aggregate values.
14202 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
14204         * input.h (in_system_header_at): Convert from macro to inline
14205         function.
14206         (from_macro_expansion_at): Likewise.
14207         (from_macro_definition_at): Likewise.
14209 2018-04-27  Jeff Law  <law@redhat.com>
14211         * config.gcc: Mark tile* targets as deprecated/obsolete.
14213 2018-04-27  Richard Biener  <rguenther@suse.de>
14215         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14216         fix for ILP32.
14218 2018-04-27  Richard Biener  <rguenther@suse.de>
14220         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14222 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
14224         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14225         with Yd constraint. Set "preferred_for_speed" attribute from
14226         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14227         with Yd constraint.
14228         (*movdi_internal): Ditto.
14229         (movti_interunit splitters): Remove
14230         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14231         (movdi_interunit splitters): Ditto.
14232         * config/i386/constraints.md (Ye): Remove.
14233         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14235 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14237         PR target/85512
14238         * config/aarch64/constraints.md (Usg): Limit to 31.
14239         (Usj): Limit to 63.
14241 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
14243         PR tree-optimization/85529
14244         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14245         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14246         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14247         zero extension or masking of the MSB bit.
14248         (optimize_range_tests): Add FIRST_BB argument, pass it through
14249         to optimize_range_tests_var_bound.
14250         (maybe_optimize_range_tests, reassociate_bb): Adjust
14251         optimize_range_tests callers.
14253 2018-04-26  Richard Biener  <rguenther@suse.de>
14254             Jakub Jelinek  <jakub@redhat.com>
14256         * cgraph.h (symbol_table): Just declare debug method here.
14257         * symtab.c (symbol_table::debug): Define.
14259 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
14261         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14263 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
14265         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14266         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14267         (*movdi_internal): Substitute Yi and Yj constraint with x
14268         and Ym and Yn constraint with y constraint.  Update "isa"
14269         attribute and set "preferred_for_speed" attribute from
14270         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14271         (*movsi_internal): Ditto.
14272         (*movdf_internal): Ditto.
14273         (*movsf_internal): Ditto.
14274         (*zero_extendsidi2): Ditto.
14275         * config/i386/sse.md (vec_set<mode>_0): Ditto.
14276         (sse2_loadld): Ditto.
14277         (*vec_extract<ssevecmodelower>_0): Ditto.
14278         (*vec_extractv4si_0_zext_sse4): Ditto.
14279         (vec_concatv2di): Ditto.
14280         (*vec_dup<mode>): Ditto.
14281         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14282         * config/i386/constraints.md (Yi): Remove.
14283         (Yj): Remove.
14284         (Ym): Remove.
14285         (Yn): Remove.
14287 2018-04-26  Nathan Sidwell  <nathan@acm.org>
14289         * dumpfile.c (dump_open): New.
14290         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14291         (dump_finish): Detect stdio/stderr by value not name.
14293 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
14295         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14297 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14299         PR target/84952
14300         * config/nvptx/nvptx.c (verify_neutering_jumps)
14301         (verify_neutering_labels): New function
14302         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14304 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14306         PR target/84025
14307         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14308         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14309         need neutering.
14311 2018-04-26  Richard Biener <rguenther@suse.de>
14312             Tom de Vries  <tom@codesourcery.com>
14314         PR lto/85422
14315         * lto-streamer-out.c (output_function): Fixup loops if required to match
14316         discovery done in the reader.
14318 2018-04-26  Richard Biener  <rguenther@suse.de>
14320         PR tree-optimization/85116
14321         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14322         have a loop exit from the single latch predecessor.  Remove
14323         case of header with just condition.
14324         (ch_base::copy_headers): Exclude infinite loops from any
14325         processing.
14326         (pass_ch::execute): Record exits.
14328 2018-04-26  Richard Biener  <rguenther@suse.de>
14330         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14331         prologue cost vector and pass it to vect_get_load_cost.
14332         (vect_get_peeling_costs_all_drs): Likewise.
14333         (vect_peeling_hash_get_lowest_cost): Likewise.
14334         (vect_enhance_data_refs_alignment): Likewise.
14336 2018-04-26  Richard Biener  <rguenther@suse.de>
14338         PR middle-end/85450
14339         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14340         checking of integer<->pointer conversions.
14341         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14342         sign-/zero-extending pointer types.
14343         (expand_omp_for_static_chunk): Likewise.
14345 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14346             Jean Lee  <xiaoyur347@gmail.com>
14348         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14349         (TARGET_ASAN_SHADOW_OFFSET): Define.
14350         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14351         true for -fsanitize=address.
14353 2018-04-25  Mark Wielaard  <mark@klomp.org>
14355         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14356         shorter ones.
14358 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14360         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14361         than "alu", remove explicit "memory" and "imm_disp" attributes.
14362         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14364         PR middle-end/85414
14365         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14366         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14367         gen_lowpart_no_emit.
14369 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14371         PR target/85473
14372         * config/i386/i386.c (ix86_expand_builtin): Change memory
14373         operand to XI, extend p0 to Pmode.
14374         * config/i386/i386.md: Change unspec volatile and operand
14375         1 mode to XI, change operand 0 mode to P.
14377 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14379         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14380         GET_MODE_MASK before any checking.
14381         (nds32_can_use_bset_p): Likewise.
14382         (nds32_can_use_btgl_p): Likewise.
14384 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14386         * config/nds32/nds32-doubleword.md: New define_split pattern for
14387         illegal register number.
14389 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14391         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14393 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14395         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14397 2018-04-25  Richard Biener  <rguenther@suse.de>
14399         * lto-streamer.h (LTO_major_version): Bump to 8.
14401 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14403         * BASE-VER: Set to 9.0.0.
14405 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14407         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14408         in __abskf2 and __powikf2.
14410 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14412         PR target/85512
14413         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14414         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14415         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14416         Use the above on operand 2.  Reindent.
14417         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14419 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14421         PR target/85485
14422         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14423         handle OPT_mcet.
14424         * config/i386/i386.opt (mcet): Removed.
14425         * doc/install.texi: Remove -mcet documentation.
14426         * doc/invoke.texi: Likewise.
14428 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14430         PR target/85485
14431         * doc/install.texi: Remove -mcet from bootstrap-cet.
14433 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14435         PR target/85511
14436         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14437         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14438         if TARGET_64BIT.
14440         PR target/85503
14441         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14442         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14443         containing a CONST_VECTOR.
14445 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14447         * doc/install.texi: Update newlib dependency for nvptx.
14449 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14451         PR target/85508
14452         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14453         instead of INTVAL when shifting x left.
14455 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14457         PR tree-optimization/85478
14458         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14459         vect_grouped_store_supported for single element vectors.
14461 2018-04-24  Richard Biener  <rguenther@suse.de>
14463         PR target/85491
14464         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14465         load cost increase to the case of non-constant step.
14467 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14469         PR target/84828
14470         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14471         destination if any_malformed_asm.
14473 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14475         PR middle-end/85496
14476         * expr.c (store_field): In the bitfield case, if the value comes from
14477         a function call and is returned in registers by means of a PARALLEL,
14478         do not change the mode of the temporary unless BLKmode and VOIDmode.
14480 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14482         PR rtl-optimization/85423
14483         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14484         dependencies to debug insns when the previous insn is non-debug.
14486 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14488         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14489         enums into a single definition.
14490         (fls): Fix predicates and printing.
14491         (seti): Likewise.
14493 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14495         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14496         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14497         and short u6 immediate.
14498         (check_if_valid_sleep_operand): Remove.
14499         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14501 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14503         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14504         flag_always_save_lp condition.
14505         * config/nds32/nds32.opt (malways-save-lp): New option.
14507 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14509         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14510         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14511         * config/nds32/nds32.h
14512         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14513         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14515 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14517         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14518         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14520 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14521             Chung-Ju Wu  <jasonwucj@gmail.com>
14523         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14524         Declare.
14525         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14526         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14528 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14530         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14532 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14534         * config/nds32/nds32-protos.h (nds32_data_alignment,
14535         nds32_local_alignment): Declare.
14536         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14537         nds32_local_alignment): New functions.
14538         (TARGET_CONSTANT_ALIGNMENT): Define.
14539         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14541 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14543         * config/nds32/nds32.c
14544         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14545         (TARGET_MODES_TIEABLE_P): Likewise.
14547 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14549         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14550         level Ofast and Og.
14552 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14553             Chung-Ju Wu  <jasonwucj@gmail.com>
14555         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14556         for unaligned access.
14557         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14558         unaligned access.
14559         * config/nds32/nds32-intrinsic.md: Likewise.
14560         * config/nds32/nds32_intrinsic.h: Likewise.
14561         * config/nds32/nds32.h (nds32_builtins): Likewise.
14562         * config/nds32/nds32.opt (munaligned-access): New option.
14563         * config/nds32/nds32.c (nds32_asm_file_start): Display
14564         flag_unaligned_access status.
14566 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14568         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14569         -mno-relax is present.
14570         * config/riscv/linux.h (LINK_SPEC): Ditto.
14572 2018-04-20  Martin Sebor  <msebor@redhat.com>
14574         PR c/85365
14575         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14576         for null pointers.
14577         (gimple_fold_builtin_stxcpy_chk): Same.
14578         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14580 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14582         PR target/85456
14583         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14584         __powikf2 when long double is IEEE 128-bit.
14586 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14588         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14589         step to make sure stack always aligned.
14591 2018-04-20  Carl Love  <cel@us.ibm.com>
14593         PR target/83402
14594         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14595         size check for arg0.
14597 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14598             Tom de Vries  <tom@codesourcery.com>
14600         PR target/85445
14601         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14602         Emit insns for calls too.
14603         (nvptx_find_par): Always look for worker-level predecessor insn.
14604         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14605         calls.
14606         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14607         (nvptx_process_pars): Propagate frames for calls.
14609 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
14611         PR target/85469
14612         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14613         Removed.
14614         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14615         (ix86_handle_option): Don't handle OPT_mibt.
14616         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14617         __SHSTK__.
14618         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14619         has_ibt and ibt.
14620         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14621         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14622         (ix86_target_macros): Define __CET__ with flag_cf_protection
14623         for -fcf-protection.
14624         * config/i386/i386.c (isa2_opts): Remove -mibt.
14625         * config/i386/i386.h (TARGET_IBT): Removed.
14626         (TARGET_IBT_P): Likewise.
14627         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14628         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14629         * config/i386/i386.opt (mcet): Update help message.
14630         (mshstk): Likewise.
14631         (mibt): Removed.
14632         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
14633         -mcet as an alias for -mshstk.
14635 2018-04-20  Richard Biener <rguenther@suse.de>
14637         PR middle-end/85475
14638         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14639         complexity by forcing a single use of the multiply operand.
14641 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14643         ipa/85449
14644         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14645         recursion dependency to only apply to non-clones.
14647 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14649         ipa/85447
14650         * ipa-cp.c (create_specialized_node): Check that clones of
14651         self-recursive edges exist during IPA-CP.
14653 2018-04-19  Toon Moene  <toon@moene.org>
14655         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14656         by -O3.
14658 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14660         PR tree-optimization/85467
14661         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14662         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14663         VECTOR_CST element to type.
14665 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14667         PR target/85397
14668         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14669         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14670         (builtin_longjmp): Likewise.
14671         (save_stack_nonlocal): New pattern.
14672         (restore_stack_nonlocal): Likewise.
14674 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14676         PR target/85404
14677         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14678         Replace ASM_OUTPUT_LABEL with fprintf.
14680 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14682         PR target/85417
14683         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14684         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14685         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14686         define __IBT__ and __SHSTK__ for -fcf-protection.
14687         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14688         TARGET_IBT.
14689         (ix86_trampoline_init): Likewise.
14690         (x86_output_mi_thunk): Likewise.
14691         (ix86_notrack_prefixed_insn_p): Likewise.
14692         (ix86_option_override_internal): Don't disallow -fcf-protection.
14693         * config/i386/i386.md (rdssp<mode>): Also enable for
14694         -fcf-protection.
14695         (incssp<mode>): Likewise.
14696         (nop_endbr): Likewise.
14697         * config/i386/i386.opt (mcet): Change help message to built-in
14698         functions only.
14699         (mibt): Likewise.
14700         (mshstk): Likewise.
14701         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14702         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14703         enable CET built-in functions.
14705 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14707         * common/config/i386/i386-common.c
14708         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14709         OPTION_MASK_ISA_MOVDIRI_UNSET,
14710         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14711         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14712         * config.gcc (movdirintrin.h): New header.
14713         * config/i386/cpuid.h (bit_MOVDIRI,
14714         bit_MOVDIR64B): New bits.
14715         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14716         and -mmvodir64b.
14717         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14718         (VOID, PVOID, PCVOID)): New function types.
14719         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14720         __builtin_ia32_directstoreu_u64,
14721         __builtin_ia32_movdir64b): New builtins.
14722         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14723         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14724         and -mmovdiri.
14725         (ix86_valid_target_attribute_inner_p): Ditto.
14726         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14727         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14728         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14729         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14730         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14731         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14732         (movdiri<mode>, movdir64b_<mode>): New.
14733         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14734         * config/i386/immintrin.h: Include movdirintrin.h.
14735         * config/i386/movdirintrin.h: New file.
14736         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14738 2018-04-19  Richard Biener  <rguenther@suse.de>
14740         PR middle-end/85455
14741         * cfg.c (clear_bb_flags): When loop state says we have
14742         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14744 2018-04-19  Richard Biener  <rguenther@suse.de>
14746         PR tree-optimization/84737
14747         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14748         copying restrict info.
14749         (vect_setup_realignment): Use it.
14750         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14751         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14752         the first DR to all generated stores.
14753         (vectorizable_load): Likewise for loads.
14755 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14757         PR tree-optimization/85446
14758         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14759         the integral and pointer types to have the same precision.
14761         * doc/install.texi: Document --disable-cet being the default and
14762         --enable-cet=auto.
14764 2018-04-18  Martin Liska  <mliska@suse.cz>
14766         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14767         style.
14769 2018-04-18  Martin Liska  <mliska@suse.cz>
14771         Revert
14772         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14774         PR ipa/83983
14775         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14776         arguments if they are comparable.
14778 2018-04-18  Martin Liska  <mliska@suse.cz>
14780         Revert
14781         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14783         PR lto/84805
14784         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14785         incomplete types.
14787 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14789         PR target/85388
14790         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14791         ENDBR after calling __morestack.
14793 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14795         PR jit/85384
14796         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14797         by using gcc_base_ver to generate a gcc_driver_version, and use
14798         it when generating GCC_DRIVER_NAME.
14799         * configure: Regenerate.
14801 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14803         PR target/81084
14804         * config.gcc: Obsolete powerpc*-*-*spe*.
14806 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14808         PR debug/84637
14809         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14810         (stabstr_D): Change type of unum from unsigned int to
14811         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14812         type.
14814 2018-04-17  Jim Wilson  <jimw@sifive.com>
14816         PR 84856
14817         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14818         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14819         Set arg_pointer_offset after using pretend_args_size.
14821 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14823         PR rtl-optimization/85431
14824         * dse.c (record_store): Ignore zero width stores.
14826         PR sanitizer/85230
14827         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14828         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14829         __builtin_stack_restore rather than after it.
14830         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14831         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14832         argument instead of virtual_dynamic_stack_rtx.
14834 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14836         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14837         New prototype.
14838         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14839         Add note to error message to explain internal mapping of overloaded
14840         built-in function name to non-overloaded built-in function name.
14841         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14842         function.
14844 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14846         PR target/85424
14847         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14848         where the inputs overlap with the output.
14850 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14852         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14853         (=v, v) alternative and explicit "memory" attribute.
14854         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14855         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14856         attributes.
14857         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14858         "sselog1" type instead of "sselog".
14859         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14860         "sselog".  Remove explicit "memory" attribute.
14861         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14862         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14863         attributes.
14864         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14865         "sselog1" type instead of "sselog".  Remove explicit "memory"
14866         attribute.
14867         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14868         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14869         attribute.
14870         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14871         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14872         attributes.
14873         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14874         "sselog1" type instead of "sselog".  Remove explicit "memory"
14875         attribute.
14876         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14877         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14878         attribute.
14880         PR target/85430
14881         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14883         PR middle-end/85414
14884         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14885         on a SUBREG.
14887 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14889         PR ipa/85421
14890         * ipa-cp.c (create_specialized_node): Call
14891         expand_all_artificial_thunks if necessary.
14893 2018-04-17  Martin Liska  <mliska@suse.cz>
14895         PR lto/85405
14896         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14897         in message, remote space in between '_G' and '('.
14899 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14901         PR target/85281
14902         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14903         avx512f_vmcmp<mode>3<round_saeonly_name>,
14904         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14905         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14906         avx512f_rndscale<mode><round_saeonly_name>,
14907         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14908         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14909         Use %<iptr>2 instead of %2 for -masm=intel.
14910         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14911         avx512f_vcvttss2usi<round_saeonly_name>,
14912         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14913         -masm=intel.
14914         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14915         avx512f_vcvttsd2usi<round_saeonly_name>,
14916         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14917         Use %q1 instead of %1 for -masm=intel.
14918         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14919         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14920         of %3 for -masm=intel.
14921         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14922         -masm=intel.
14923         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14924         -masm=intel.
14925         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14926         -masm=intel.
14927         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14928         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14929         %g1.
14930         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14931         -masm=intel.
14932         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14933         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14934         %g1 and one with %0 and %1.
14935         (avx512er_vmrcp28<mode><round_saeonly_name>,
14936         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14937         %1 for -masm=intel.
14938         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14939         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14940         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14941         of %0 and %{%4%} for -masm=intel.
14942         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14943         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14944         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14945         order of %0 and %{%5%}%{z%} for -masm=intel.
14947 2018-04-17  Jan Hubicka  <jh@suse.cz>
14949         PR lto/85405
14950         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14952 2018-04-17  Martin Liska  <mliska@suse.cz>
14954         PR ipa/85329
14955         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14956         for target_clone error message.  Make default implementation
14957         clone to be a local declaration.
14958         (separate_attrs): Add new argument and check for an empty
14959         string.
14960         (expand_target_clones): Handle it.
14961         (ipa_target_clone): Make redirection just for target_clones
14962         functions.
14964 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14965             Tom de Vries  <tom@codesourcery.com>
14967         PR middle-end/84955
14968         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14969         tiled basic blocks without omp continue statements.
14971 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14973         PR target/83660
14974         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14975         vec_extract expression as having side effects to make sure it gets
14976         a cleanup point.
14978 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14980         PR target/85403
14981         * config/i386/i386.c (get_builtin_code_for_version): Check
14982         error_mark_node.
14984 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14986         PR target/84331
14987         * config.gcc: Support "skylake".
14988         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14989         PROCESSOR_SKYLAKE.
14990         * config/i386/i386.c (m_SKYLAKE): Define.
14991         (processor_target_table): Add "skylake".
14992         (ix86_option_override_internal): Add "skylake".
14993         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14994         PROCESSOR_CANNONLAKE.
14995         (get_builtin_code_for_version): Fix priority for
14996         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14997         PROCESSOR_SKYLAKE-AVX512.
14998         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14999         (processor_type): Add PROCESSOR_SKYLAKE.
15001 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
15002             Jason Merrill  <jason@redhat.com>
15004         PR c++/85112
15005         * convert.c (convert_to_integer_1): Use direct recursion for
15006         enumeral types and types with a precision less than the number
15007         of bits in their mode.
15009 2018-04-16  Julia Koval  <julia.koval@intel.com>
15011         PR target/84413
15012         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15013         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15015 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
15017         PR target/85293
15018         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15019         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15020         and -mno-direct-move.
15022 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
15024         PR target/83402
15025         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15026         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15027         Ensure negative shifts result in {0}.
15029 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
15031         PR rtl-optimization/79916
15032         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15033         regs (if any) to define how to gnerate SD moves when LRA is in
15034         progress.
15036 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
15038         PR rtl-optimization/85393
15039         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15040         * except.c (expand_dw2_landing_pad_for_region): Make static.
15041         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15042         a label and unconditional jump to old_bb, rather than
15043         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15044         basic block.
15046         PR rtl-optimization/85376
15047         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15048         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15049         instead of a specific value.
15051 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15052             Bin Cheng  <bin.cheng@arm.com>
15054         PR tree-optimization/82965
15055         PR tree-optimization/83991
15056         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15057         by_profile_only parameter.
15058         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15059         information if the loop was predicted to iterate too many times.
15060         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15062 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
15064         PR lto/71991
15065         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15066         always inline.
15068 2018-04-13  Martin Liska  <mliska@suse.cz>
15069             Jakub Jelinek  <jakub@redhat.com>
15071         PR middle-end/81657
15072         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15073         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15074         * builtins.c (expand_builtin_memory_copy_args): Use
15075         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15076         handle dest_addr == pc_rtx.
15078 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
15080         PR target/85291
15081         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15082         asked to not generate direct moves.
15083         (fix_trunc<mode>si2_stfiwx): Similar.
15084         (fix_trunc<mode>si2_internal): Similar.
15086 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15088         PR debug/83157
15089         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15090         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15091         lookup if dest in some wider mode is known to be const0_rtx and
15092         if so, record permanent equivalence for it to be ZERO_EXTEND of
15093         the narrower mode destination.
15095 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15097         * lto-streamer-out.c (output_function): Revert 259346.
15098         * omp-expand.c (expand_oacc_for): Likewise.
15100 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
15102         PR rtl-optimization/85354
15103         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15104         * sel-sched.c (sel_global_init): ... here.
15106 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
15108         PR target/85238
15109         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15110         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15111         mode for PE-COFF targets.
15112         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15113         (i386_pe_asm_lto_end): Likewise.
15114         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15115         (TARGET_ASM_LTO_END): Likewise.
15116         * config/i386/winnt.c (saved_debug_info_level): New static variable.
15117         (i386_pe_asm_lto_start): New function.
15118         (i386_pe_asm_lto_end): Likewise.
15120 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
15121             Richard Biener  <rguenther@suse.de>
15123         PR middle-end/84955
15124         * lto-streamer-out.c (output_function): Fix CFG loop state before
15125         streaming out.
15126         * omp-expand.c (expand_oacc_for): Handle calls to internal
15127         functions like regular functions.
15129 2018-04-12  Richard Biener  <rguenther@suse.de>
15131         PR lto/85371
15132         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15133         for the early LTO debug to properly generate references to it
15134         during DIE emission.  Do not re-use that for the skeleton for
15135         split-dwarf.
15136         (dwarf2out_early_finish): Likewise.
15138 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15140         PR target/85328
15141         * config/i386/sse.md
15142         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15143         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15144         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15145         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15146         and output is a reg, avoid creating invalid lowpart subreg, but
15147         instead split into a 512-bit move.  Don't split if not AVX512VL,
15148         input is xmm16+ reg and output is a mem.
15149         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15150         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15151         xmm16+ reg and output is a mem.
15153 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15155         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15156         also for flag_dwarf2_cfi_asm.
15158 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
15160         PR rtl-optimization/85342
15161         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15162         a bool scalar var inside of the loop instead.  Don't try to update
15163         recog_data.operand after failed apply_change_group.
15165 2018-04-12  Tom de Vries  <tom@codesourcery.com>
15167         PR target/85296
15168         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15169         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
15170         array with flexible array member as array without given dimension.
15171         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15172         argument for undefined param to true.
15174 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
15176         PR target/85321
15177         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15178         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15179         from PowerPC section.
15180         * config/rs6000/sysv4.opt (mcall-): Improve help text.
15181         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15182         help text that is too long.
15183         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15184         help text that is too long.
15185         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15186         help text that is too long.
15188 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
15190         * config/alpha/alpha.md (stack_probe_internal): Rename
15191         from "probe_stack".  Update all callers.
15193 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15195         PR rtl-optimization/84566
15196         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15197         sched_macro_fuse_insns.
15199 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15201         PR target/84301
15202         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15203         (compute_block_dependences): ... from here.
15205 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15207         PR tree-optimization/85331
15208         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15209         from int to HOST_WIDE_INT.
15211 2018-04-11  Martin Jambor  <mjambor@suse.cz>
15213         PR ipa/84149
15214         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15215         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15216         not the same as the source val.
15217         (cgraph_edge_brings_value_p): New parameter.
15218         (gather_edges_for_value): Pass destination value to
15219         cgraph_edge_brings_value_p.
15220         (perhaps_add_new_callers): Likewise.
15221         (get_info_about_necessary_edges): Likewise and exclude values brought
15222         only by self-recursive edges.
15223         (create_specialized_node): Redirect only clones of self-calling edges.
15224         (+self_recursive_pass_through_p): New function.
15225         (find_more_scalar_values_for_callers_subset): Use it.
15226         (find_aggregate_values_for_callers_subset): Likewise.
15227         (known_aggs_to_agg_replacement_list): Removed.
15228         (decide_whether_version_node): Re-calculate known constants for all
15229         remaining context clones.
15231 2018-04-11  Richard Biener  <rguenther@suse.de>
15233         PR lto/85339
15234         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15235         from early DWARF output.
15236         (dwarf2out_early_finish): Output line info unconditionally into
15237         early DWARF and add reference to it.
15239 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15241         PR target/85281
15242         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15243         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15244         other than V2DFmode using iptr mode attribute.
15245         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15247 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15249         PR rtl-optimization/84659
15250         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15252 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15254         PR debug/85302
15255         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15256         SIZEP is NULL.
15257         (output_loc_list): Pass address of a dummy size variable even in the
15258         locview handling loop.
15259         (index_location_lists): Add comment on why skip_loc_list_entry can't
15260         call size_of_locs.
15262 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15264         PR target/85261
15265         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15266         into register.
15268 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
15270         PR target/85321
15271         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15272         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15273         and -mstring-compare-inline-limit.
15275 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15277         PR target/85287
15278         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15279         for stack clash protection in a register whenever we need it to be in
15280         a register.
15282 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15284         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15285         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15287 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15289         PR target/85321
15290         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15291         the help text.
15292         (mlong-double-): Ditto.
15293         * config/rs6000/sysv4.opt (msdata=): Ditto.
15294         (mtls-size=): Ditto.
15296 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15298         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15299         erroneous entries for
15300         "vector int vec_ldl (int, long int *)", and
15301         "vector unsigned int vec_ldl (int, unsigned long int *)".
15302         Add comments and entries for
15303         "vector bool char vec_ldl (int, bool char *)",
15304         "vector bool short vec_ldl (int, bool short *)",
15305         "vector bool int vec_ldl (int, bool int *)",
15306         "vector bool long long vec_ldl (int, bool long long *)",
15307         "vector pixel vec_ldl (int, pixel *)",
15308         "vector long long vec_ldl (int, long long *)",
15309         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15310         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15311         type tree bool_long_long_type_node and correct definition of
15312         bool_V2DI_type_node to make reference to this new type tree.
15313         (rs6000_mangle_type): Replace erroneous reference to
15314         bool_long_type_node with bool_long_long_type_node.
15315         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15316         comments to emphasize sign distinctions for char and int types and
15317         replace RS6000_BTI_bool_long constant with
15318         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15319         use of RS6000_BTI_pixel.
15320         (bool_long_type_node): Remove this macro definition.
15321         (bool_long_long_type_node): New macro definition
15323 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15325         PR rtl-optimization/85300
15326         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15327         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15328         simplify_unary_operation fails.
15330 2018-04-10  Martin Liska  <mliska@suse.cz>
15332         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15333         cgraph_edge and ipa_ref.
15335 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15337         PR target/85177
15338         PR target/85255
15339         * config/i386/sse.md
15340         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15341         computation of the VEC_MERGE selector from mask.
15342         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15343         Fix decoding of the VEC_MERGE selector into mask.
15345 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15347         PR tree-optimization/85286
15348         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15350 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15352         * final.c (final_1): Set insn_last_address as well as
15353         insn_current_address.
15355 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15357         PR target/85173
15358         * explow.c (emit_stack_probe): Call validize_mem on memory location
15359         before passing it to gen_probe_stack.  Create address operand and
15360         legitimize it for the probe_stack_address case.
15362 2018-04-09  Jan Hubicka  <jh@suse.cz>
15364         PR lto/85078
15365         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15366         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15367         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15368         walk basetypes.
15369         (free_lang_data): Rebuild type inheritance graph.
15371 2018-04-09  Martin Sebor  <msebor@redhat.com>
15373         * invoke.texi (-finline-small-functions): Mention other optimization
15374         options.
15375         (-findirect-inlining, -fpartial-inlining): Same.
15376         (-finline-functions-called-once): Same.
15377         (-freorder-blocks-and-partition): Same.
15379 2018-04-09  Jan Hubicka  <jh@suse.cz>
15381         PR rtl/84058
15382         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15383         jumps; choose last target that matches the criteria (i.e.
15384         no partition changes for non-crossing jumps).
15385         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15386         support for redirecting crossing jumps to non-crossing.
15388 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15390         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15391         also for naked functions.
15393 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15395         * config/arc/arc.md (add_shift): New pattern.
15396         (add_shift2): Likewise.
15397         (sub_shift): Likewise.
15398         (sub_shift_cmp0_noout): Likewise.
15399         (compare_si_ashiftsi): Likewise.
15400         (xbfu_cmp0_noout): New combine pattern.
15401         (xbfu_cmp0"): Likewise.
15402         (movsi_set_cc_insn): Place the predicable variant first.
15403         (commutative_binary_cmp0_noout): Remove clobber.
15404         (commutative_binary_cmp0): New pattern.
15405         (noncommutative_binary_cmp0): Likewise.
15406         (noncommutative_binary_cmp0_noout): Likewise.
15407         (noncommutative_binary_comparison_result_used): Removed.
15408         (rsub_cmp0): New pattern.
15409         (rsub_cmp0_noout): Likewise.
15410         (extzvsi): Changed, keep only meaningful variants.
15411         (SQH, SEZ): New iterators.
15412         (SQH_postfix): New mode attribute.
15413         (SEZ_prefix): New code attribute.
15414         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15415         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15416         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15417         of numerical value.
15418         (noncommutative_operator): Check the availability of barrel
15419         shifter option.
15421 2018-04-09  Richard Biener  <rguenther@suse.de>
15423         PR tree-optimization/85284
15424         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15425         Only use the niter constraining form of simple_iv when the exit
15426         is always executed.
15428 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15430         PR target/84041
15431         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15432         (define_expand "*memory_barrier"): New define_expand.
15433         (define_insn "memory_barrier"): New insn.
15435 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15437         PR rtl-optimization/80463
15438         PR rtl-optimization/83972
15439         PR rtl-optimization/83480
15441         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15442         correct producer for the insn.
15443         (tidy_control_flow): Fixup seqnos in case of debug insns.
15445 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15447         PR rtl-optimization/83913
15449         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15450         different sched-times when merging exprs.
15452 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15454         PR rtl-optimization/83962
15456         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15457         tidy_fallthru_edge and tidy_control_flow.
15459 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15461         PR rtl-optimization/83530
15463         * sel-sched.c (force_next_insn): New global variable.
15464         (remove_insn_for_debug): When force_next_insn is true, also leave only
15465         next insn in the ready list.
15466         (sel_sched_region): When the region wasn't scheduled, make another pass
15467         over it with force_next_insn set to 1.
15469 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15471         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15472         into tm_file.
15473         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15474         for interrupt control.
15475         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15476         functions for interrupt control.
15477         * config/nds32/nds32-intrinsic.md: Likewise.
15478         * config/nds32/nds32_intrinsic.h: Likewise.
15479         * config/nds32/nds32.h (nds32_builtins): Likewise.
15481 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15483         * config/nds32/nds32.c (nds32_init_machine_status,
15484         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15485         strict_aligned_p field.
15486         (nds32_expand_to_rtl_hook): New function.
15487         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15488         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15490 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15491             Chung-Ju Wu  <jasonwucj@gmail.com>
15493         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15494         * config/nds32/nds32-n7.md: New file.
15495         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15496         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15497         pipeline.
15498         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15499         * config/nds32/nds32.md (pipeline_model): Add n7.
15500         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15501         * config/nds32/pipelines.md: Include n7 settings.
15503 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15504             Chung-Ju Wu  <jasonwucj@gmail.com>
15506         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15507         * config/nds32/nds32-e8.md: New file.
15508         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15509         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15510         pipeline.
15511         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15512         * config/nds32/nds32.md (pipeline_model): Add e8.
15513         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15514         * config/nds32/pipelines.md: Include e8 settings.
15516 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15517             Chung-Ju Wu  <jasonwucj@gmail.com>
15519         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15520         * config/nds32/nds32-n8.md: New file.
15521         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15522         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15523         pipeline.
15524         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15525         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15526         * config/nds32/nds32.md (pipeline_model): Add n8.
15527         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15528         * config/nds32/pipelines.md: Include n8 settings.
15530 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15531             Chung-Ju Wu  <jasonwucj@gmail.com>
15533         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15534         * config/nds32/nds32-n9-2r1w.md: New file.
15535         * config/nds32/nds32-n9-3r2w.md: New file.
15536         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15537         nds32_register_ports): New or modify for cpu n9.
15538         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15539         pipeline.
15540         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15541         * config/nds32/nds32-utils.c: New file.
15542         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15543         TARGET_MUL_SLOW): Define.
15544         * config/nds32/nds32.md (pipeline_model): New attribute.
15545         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15546         New options that support cpu n9.
15547         * config/nds32/pipelines.md: Include n9 settings.
15548         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15550 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15552         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15553         information if necessary.
15554         (output_cond_branch_compare_zero): Likewise.
15555         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15556         (nds32_target_alignment): Refine for alignment.
15557         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15558         (FUNCTION_BOUNDARY): Modify.
15559         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15560         align case.
15561         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15563 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15565         * config/nds32/constants.md (unspec_volatile_element): Add values for
15566         TLB operation and data prefetch.
15567         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15568         functions for TLB operation and data prefetch.
15569         * config/nds32/nds32-intrinsic.md: Likewise.
15570         * config/nds32/nds32_intrinsic.h: Likewise.
15571         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15572         (nds32_print_operand): Likewise.
15573         * config/nds32/nds32.h (nds32_builtins): Likewise.
15575 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15576         Andrew Pinski <pinsika@gcc.gnu.org>
15578         PR middle-end/82976
15579         * match.pd: Use constant_boolean_node of correct type instead of
15580         boolean_true_node or boolean_false_node for simplifying
15581         pointer comparisons to zero.
15583 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15585         PR tree-optimization/80021
15586         * tree.c (verify_type_variant): Make error call in verify_variant_match
15587         translatable and remove final full stop.
15589 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15591         * config/nds32/constants.md (unspec_volatile_element): Add
15592         UNSPEC_VOLATILE_EH_RETURN.
15593         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15594         nds32_output_stack_pop): Support dwarf exception handling process.
15595         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15596         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15597         exception handling process.
15598         (nds32_compute_stack_frame): Likewise.
15599         (nds32_return_addr_rtx): Likewise.
15600         (nds32_initial_elimination_offset): Likewise.
15601         (nds32_expand_prologue): Likewise.
15602         (nds32_expand_epilogue): Likewise.
15603         (nds32_dynamic_chain_address): New function.
15604         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15605         exception handling.
15606         (DYNAMIC_CHAIN_ADDRESS): Define.
15607         (EH_RETURN_DATA_REGNO): Define.
15608         (EH_RETURN_STACKADJ_RTX): Define.
15609         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15610         patterns for dwarf exception handling.
15612 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15614         * config/nds32/nds32.h: Clean up obsolete macros.
15616 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15618         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15619         Add enum values for particular instructions.
15620         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15621         particular intrinsic functions.
15622         * config/nds32/nds32-intrinsic.md: Likewise.
15623         * config/nds32/nds32_intrinsic.h: Likewise.
15624         * config/nds32/nds32.h (nds32_builtins): Likewise.
15625         * config/nds32/nds32.md (type): Add pbsad and pbsada.
15626         (btst, ave): New patterns for particular instructions.
15628 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15630         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15631         Add enum values for atomic load/store and memory sync.
15632         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15633         and memory sync.
15634         * config/nds32/nds32-intrinsic.md: Likewise.
15635         * config/nds32/nds32_intrinsic.h: Likewise.
15636         * config/nds32/nds32.h (nds32_builtins): Likewise.
15638 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15640         PR tree-optimization/85257
15641         * fold-const.c (native_encode_vector): If not all elts could fit
15642         and off is -1, return 0 rather than offset.
15643         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15644         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15645         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
15646         adjust buffer in native_interpret_expr call.
15648 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15650         * config/nds32/constants.md (unspec_volatile_element): Add cache
15651         control enum values.
15652         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15653         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15654         * config/nds32/nds32.c (nds32_cctl_names): New.
15655         (nds32_print_operand): Handle cache control register names.
15656         * config/nds32/nds32.h (nds32_builtins): New enum values.
15657         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15658         macros.
15659         * config/nds32/nds32.md (type): Add mmu.
15660         * config/nds32/pipelines.md (simple_insn): Add mmu.
15662 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15664         * config/nds32/nds32.md (type): Remove call.
15665         * config/nds32/pipelines.md (simple_insn): Likewise.
15667 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15669         * config/nds32/constants.md (unspec_volatile_element): Add
15670         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15671         UNSPEC_VOLATILE_FMFCFG.
15672         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15673         description for fmfcfg and fmfcsr.
15674         (bdesc_1arg): Add fmtcsr.
15675         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15676         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15677         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15678         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15679         unspec_fmfcfg): New patterns.
15680         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15681         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15682         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15683         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15684         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15685         __nds32__fmfcfg): Define.
15687 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15689         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15690         intrinsic register names.
15691         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15692         intrinsic register enum values and macros.
15694 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15696         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15697         for load/store addressing form.
15698         (nds32_print_operand_address): Likewise.
15700 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15702         PR target/85196
15703         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15704         based on LABEL_REF.  Remove useless assertion.
15705         (pic_address_needs_scratch): Fix formatting.
15706         (sparc_legitimize_pic_address): Minor tweaks.
15707         (sparc_delegitimize_address): Adjust assertion accordingly.
15708         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15709         into symbolic_operand.
15710         (movsi_high_pic_label_ref): Likewise.
15711         (movsi_lo_sum_pic_label_ref): Likewise.
15712         (movdi_pic_label_ref): Likewise.
15713         (movdi_high_pic_label_ref): Likewise.
15714         (movdi_lo_sum_pic_label_ref): Likewise.
15716 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15718         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15719         custom LIB_SPEC setup.
15721 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15722             Kito Cheng  <kito.cheng@gmail.com>
15724         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15725         * config/riscv/freebsd.h: New.
15727 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15729         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15730         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15731         file.
15733 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15734             Kito Cheng  <kito.cheng@gmail.com>
15736         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15737         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15738         * config/nds32/nds32-protos.h (nds32_output_call,
15739         nds32_output_return): Declare.
15740         * config/nds32/nds32.md: Refine all the call and return patterns.
15742 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15744         PR debug/85252
15745         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15746         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15748         PR rtl-optimization/84872
15749         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15750         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15751         EDGE_CROSSING edge.
15753 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15755         * expr.c (copy_blkmode_to_reg): Revert 254862.
15756         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15758 2018-04-06  Richard Biener  <rguenther@suse.de>
15760         PR middle-end/85244
15761         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15762         after seeing a component reference with an adjacent field.  Treat
15763         refs to arrays at struct end of external decls similar to
15764         refs to unconstrained commons.
15766 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15768         PR sanitizer/85213
15769         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15770         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15771         recursive calls.
15772         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15773         save_p here.
15775 2018-04-06  Richard Biener  <rguenther@suse.de>
15777         PR middle-end/85180
15778         * alias.c (find_base_term): New wrapper around find_base_term
15779         unwinding CSELIB_VAL_PTR changes.
15780         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15781         recursion.
15783 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15785         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15786         instructions.
15787         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15788         constant definitions.
15789         ("nop"): lr 0,0 -> nopr r0
15790         ("nop_lr0", "nop_lr1"): New insn definitions.
15792 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15794         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15795         NDS32_V3PUSH_AVAILABLE_P macro.
15797 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15798             Chung-Ju Wu  <jasonwucj@gmail.com>
15800         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15801         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15802         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15803         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15804         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15805         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15806         * config/nds32/constraints.md: New constraints and checking for hard
15807         float configuration.
15808         * config/nds32/iterators.md: New mode iterator and attribute for hard
15809         float configuration.
15810         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15811         patterns.
15812         * config/nds32/nds32-fpu.md: New file.
15813         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15814         deal with hard float code generation.
15815         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15816         ARCH_V3S.
15817         (abi_type, float_reg_number): New enum type.
15818         * config/nds32/nds32-predicates.c: New predicates for hard float.
15819         * config/nds32/nds32-protos.h: Declare functions for hard float.
15820         * config/nds32/nds32.c: Implementation for hard float configuration.
15821         * config/nds32/nds32.h: Definitions for hard float configuration.
15822         * config/nds32/nds32.md: Include hard float machine description and
15823         modify patterns for hard float configuration.
15824         * config/nds32/nds32.opt: New options for hard float configuration.
15825         * config/nds32/predicates.md: New predicates for hard float
15826         configuration.
15828 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15830         * common/config/nds32/nds32-common.c
15831         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15833 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15835         PR middle-end/85195
15836         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15837         CONSTRUCTOR_ELT (ctor, ...)->value.
15839 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15841         PR target/85193
15842         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15844 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15846         PR target/85204
15847         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15848         cond jump.
15850 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15851             Kito Cheng  <kito.cheng@gmail.com>
15853         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15854         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15855         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15856         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15858 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15859             Kito Cheng  <kito.cheng@gmail.com>
15861         * config/nds32/constraints.md (Ufe): New memory constraint.
15862         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15863         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15864         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15865         operands.
15866         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15867         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15869 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15871         * config/nds32/nds32.md: Use optimize_size in the condition for
15872         alu-shift instructions.
15874 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15876         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15878 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15880         * config/nds32/nds32.md (negsi2): Refine pattern.
15882 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15883             Chung-Ju Wu  <jasonwucj@gmail.com>
15885         * config/nds32/iterators.md (shift_rotate): New code iterator.
15886         (shift): New code attribute.
15887         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15888         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15889         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15890         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15891         bit-wise operations.
15892         (andsi3, *andsi3): Ditto.
15893         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15894         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15895         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15896         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15897         nds32_ior_operand, nds32_xor_operand): New predicates.
15899 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15901         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15902         (addsi3, subsi3): ... this.
15904 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15906         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15908 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15910         * config/nds32/nds32.md: Adjust indention.
15912 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15914         * config/nds32/nds32.md (feature): New attribute.
15916 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15918         * config/nds32/nds32.md (subtype): New attribute.
15920 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15922         PR target/85203
15923         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15924         expansion to perform a bitwise AND of the argument followed by a
15925         boolean negation of the result.
15927 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15929         PR rtl-optimization/84878
15930         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15931         the basic block.  Assert the use reference is not artificial and that
15932         it has an associated insn.
15934 2018-04-04  Michael Matz  <matz@suse.de>
15936         * builtins.c (compute_objsize): Pass correct operand
15937         to array_at_struct_end_p.
15939 2018-04-04  Richard Biener  <rguenther@suse.de>
15941         PR lto/85176
15942         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15943         from contexts for DINFO_LEVEL_TERSE and below.
15945 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15947         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15948         resiter_operand condition.
15949         * config/nds32/nds32.md (*move<mode>): Ditto.
15951 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15952             Monk Chiang  <sh.chiang04@gmail.com>
15954         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15956 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15958         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15960 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15961             Kito Cheng  <kito.cheng@gmail.com>
15963         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15964         nds32_cond_code_str, output_cond_branch,
15965         output_cond_branch_compare_zero, nds32_expand_cbranch,
15966         nds32_expand_cstore, nds32_expand_movcc,
15967         nds32_output_cbranchsi4_equality_zero,
15968         nds32_output_cbranchsi4_equality_reg,
15969         nds32_output_cbranchsi4_equality_reg_or_const_int,
15970         nds32_output_cbranchsi4_greater_less_zero: New functions.
15971         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15972         nds32_expand_cstore, nds32_expand_movcc,
15973         nds32_output_cbranchsi4_equality_zero,
15974         nds32_output_cbranchsi4_equality_reg,
15975         nds32_output_cbranchsi4_equality_reg_or_const_int,
15976         nds32_output_cbranchsi4_greater_less_zero): Declare.
15977         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15978         nds32_rimm11s_operand): New predicates.
15979         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15980         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15981         patterns.
15983 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15985         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15986         * config/nds32/nds32.md: Ditto.
15987         * config/nds32/pipelines.md: Ditto.
15989 2018-04-04  Richard Biener  <rguenther@suse.de>
15991         PR tree-optimization/85168
15992         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15993         propagating abnormals.
15995 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15997         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15999 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
16000             Kito Cheng  <kito.cheng@gmail.com>
16002         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16003         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16004         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16005         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16006         * config/nds32/nds32.md (sibcall_internal): New.
16007         (sibcall_register): Remove.
16008         (sibcall_immediate): Remove.
16009         (sibcall_value_internal): New.
16010         (sibcall_value_register): Remove.
16011         (sibcall_value_immediate): Remove.
16012         * config/nds32/predicates.md (nds32_general_register_operand): New.
16013         (nds32_call_address_operand): New.
16015 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16017         PR rtl-optimization/85167
16018         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16019         bb_defs if *split_p, instead preinitialize it to NULL.
16021         PR tree-optimization/85156
16022         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16023         evaluating the argument multiple times.
16025 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
16027         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16028         than vector.
16029         (_mm_cvtpd_ps): Likewise.
16030         (_mm_cvttpd_epi32): Likewise.
16031         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16032         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16033         vector, pixel, and bool following altivec.h include.
16035 2018-04-03  Martin Sebor  <msebor@redhat.com>
16037         * doc/extend.texi (Common Function Attributes): Clarify.
16038         (const attribute): Likewise.
16039         (pure attribute): Likewise.
16041 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
16043         PR target/85169
16044         * config/i386/i386.c (ix86_expand_vector_set): Use
16045         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
16047 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
16049         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16050         instructions when changing rounding bits to preserve precision bits
16051         in the x87 control word.
16053 2018-04-03  Martin Liska  <mliska@suse.cz>
16055         PR tree-optimization/82491
16056         * rtl.h (strip_offset_and_add): Replace += suboffset with
16057         poly_uint64 () + suboffset.
16059 2018-03-29  Martin Liska  <mliska@suse.cz>
16060             Martin Jambor  <mjambor@suse.cz>
16062         PR ipa/84947
16063         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16064         param_type is not an integral or pointer type.
16066 2018-04-03  Richard Biener  <rguenther@suse.de>
16068         * sese.h (recompute_all_dominators): Remove.
16070 2018-04-02  Martin Sebor  <msebor@redhat.com>
16072         * doc/invoke.texi (-Wrestrict): Fix typos.
16074 2018-04-02  Jim Wilson  <jimw@sifive.com>
16076         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16077         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16078         (<optab>di3, <optab>si3_extend): Likewise.
16079         (<optab>si3_mask, <optab>si3_mask_1): New.
16080         (<optab>di3_mask, <optab>di3_mask_1): New.
16081         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16082         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16083         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16085 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
16087         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16088         example.
16090 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16092         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16093         (nds32_canonicalize_comparison): New function.
16095 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16096             Kito Cheng  <kito.cheng@gmail.com>
16097             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
16099         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16100         * config/nds32/constants.md (unspec_volatile_element): Add
16101         UNSPEC_VOLATILE_RELAX_GROUP.
16102         * config/nds32/nds32-relax-opt.c: New file.
16103         * config/nds32/nds32-predicates.c
16104         (nds32_symbol_load_store_p): New function.
16105         * config/nds32/nds32-protos.h
16106         (nds32_symbol_load_store_p): Declare function.
16107         (make_pass_nds32_relax_opt): Declare new rtl pass function.
16108         * config/nds32/nds32.c
16109         (nds32_register_pass): New function to register pass.
16110         (nds32_register_passes): New function to register passes.
16111         * config/nds32/nds32.md (relax_group): New pattern.
16112         * config/nds32/nds32.opt (mrelax-hint): New option.
16113         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16115 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
16117         * config/nds32/t-nds32: Modify files dependency.
16119 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16121         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16122         (PROFILE_HOOK): Define its implementation.
16124 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
16126         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16127         type and 32-bit size.
16129 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
16131         PR middle-end/85090
16132         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16133         (V_128_256): New mode iterator.
16134         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16135         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16136         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16137         of V.
16138         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16139         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16141 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
16143         PR target/83315
16144         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16145         NaN inputs correctly.
16147 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
16149         PR target/80546
16150         * config/rs6000/vsx.md (??r): New mode attribute.
16151         (*vsx_mov<mode>_64bit): Use it.
16152         (*vsx_mov<mode>_32bit): Likewise.
16154 2018-03-30  Martin Sebor  <msebor@redhat.com>
16156         PR tree-optimization/84818
16157         * builtins.c (check_access): Use warning_n.
16159 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16161         PR target/83822
16162         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16163         condition.
16164         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16165         condition.
16167 2018-03-30  Julia Koval  <julia.koval@intel.com>
16169         PR target/84413
16170         * x86-tune.def (movx, partial_reg_dependency): Enable for
16171         m_SKYLAKE_AVX512.
16173 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
16175         PR inline-asm/84985
16176         * lra-constraints.c (process_alt_operands): Move setting
16177         this_alternative_matches below.
16179 2018-03-29  Martin Liska  <mliska@suse.cz>
16181         PR lto/84995.
16182         * doc/invoke.texi: Document how LTO works with debug info.
16183         Describe auto-load support of binutils.  Mention 'x86-64'
16184         as valid option value of -march option.
16186 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
16188         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16190         PR c/85094
16191         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16192         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16193         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16194         checking.
16196 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
16198         PR target/84912
16199         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16200         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16201         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16202         for RS6000_BTM_POWERPC64.
16203         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16204         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16205         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16206         definition.
16207         (DIVDE): Use it.
16208         (DIVDEU): Likewise.
16210 2018-03-28  Carl Love  <cel@us.ibm.com>
16212         Revert
16213         2017-09-27  Carl Love  <cel@us.ibm.com>
16215         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16216         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16217         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16218         fctiw instruction.
16220 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16222         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16223         instead of __vector bool.
16224         (_mm_max_pu8): Likewise.
16225         (_mm_min_pi16): Likewise.
16227 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
16229         PR target/84912
16230         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16231         (DIVWEUO): Likewise.
16232         (DIVDEO): Likewise.
16233         (DIVDEUO): Likewise.
16234         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16235         DIVWEUO and DIVDEUO.
16236         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16237         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16238         (div_extend): Likewise.
16239         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16240         builtin function.
16241         (__builtin_divweuo): Likewise.
16242         (__builtin_divdeo): Likewise.
16243         (__builtin_divdeuo): Likewise.
16245 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16247         PR target/85095
16248         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16249         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16251         PR tree-optimization/82004
16252         * gimple-match-head.c (optimize_pow_to_exp): New function.
16253         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16254         Don't fold to exp if optimize_pow_to_exp is false.
16256 2018-03-28  Martin Liska  <mliska@suse.cz>
16258         PR other/84819
16259         * calls.c (initialize_argument_information): Fix trailing space.
16260         * common.opt: Fix typo and provide better explanation for
16261         -fsanitize-coverage option.
16262         * config/i386/i386.opt: Fix typo.
16264 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16265             Martin Liska  <mliska@suse.cz>
16267         PR sanitizer/85081
16268         * gimplify.c (asan_poison_variable): Don't do the check for
16269         gimplify_omp_ctxp here.
16270         (gimplify_decl_expr): Do it here.
16271         (gimplify_target_expr): Likewise.
16273 2018-03-28  Martin Liska  <mliska@suse.cz>
16275         PR target/84988
16276         * config/i386/i386.c (ix86_function_arg_advance): Do not call
16277         chkp_type_bounds_count if MPX is not enabled.
16279 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16281         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16283 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
16285         PR target/84914
16286         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16287         function to create the function decl for complex long double
16288         multiply and divide for -mabi=ieeelongdouble.
16289         (init_float128_ieee): Call it.
16291 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
16293         PR target/85044
16294         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16295         -fcf-protection=branch -mibt.
16296         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16298 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16300         PR target/81863
16301         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16302         arm_word_relocations.
16304 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16306         PR target/85056
16307         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16308         extern array declarations.
16310 2018-03-27  Richard Biener  <rguenther@suse.de>
16312         PR middle-end/84067
16313         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16314         explicit single_use checks.
16316 2018-03-27  Richard Biener  <rguenther@suse.de>
16318         PR tree-optimization/85082
16319         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16320         Valueize the VUSE.
16322 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16324         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16325         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16326         Turn on fasynchronous-unwind-tables and funwind-tables.
16328 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16330         PR target/85073
16331         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16332         (*bmi_blsr_<mode>_ccz): Ditto.
16334 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16336         PR tree-optimization/85063
16337         * omp-general.c (offloading_function_p): New function.  Factor out
16338         of ...
16339         * omp-offload.c (pass_omp_target_link::gate): ... here.
16340         * omp-general.h (offloading_function_p): Declare.
16341         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16342         with attribute omp declare target for offloading functions.
16344 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16346         PR tree-optimization/84005
16347         * tree-data-ref.h (get_base_for_alignment): Declare.
16348         * tree-data-ref.c (get_base_for_alignment_1): New function.
16349         (get_base_for_alignment): Likewise.
16350         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16351         get_base_for_alignment to find a suitable base object, instead
16352         of always using drb->base_address.
16354 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16356         PR inline-asm/85022
16357         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16358         known size by default.
16360 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16362         PR inline-asm/85030
16363         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16364         and non BLKmode operands.
16366 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16368         PR target/85026
16369         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16370         Clean up attributes.
16372 2018-03-23  Richard Biener  <rguenther@suse.de>
16374         PR debug/85020
16375         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16376         we are going to emit early debug for LTO.
16378 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16380         PR inline-asm/85034
16381         * function.c (match_asm_constraints_1): Don't optimize if input
16382         doesn't satisfy general_operand predicate for output's mode.
16384         PR inline-asm/85022
16385         * alias.c (write_dependence_p): Don't require for x_canonicalized
16386         non-VOIDmode if x has VOIDmode.
16388         PR sanitizer/85029
16389         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16390         just don't try to optimize it rather than assert it never happens.
16392 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16394         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16395         macro expansions for definition of ST_INTERNAL_<mode> and
16396         LD_INTERNAL_<mode> builtins.
16397         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16398         Remove prototype.
16399         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16400         function.
16401         (altivec_expand_st_builtin): Likewise.
16402         (altivec_expand_builtin): Remove calls to deleted functions.
16403         (rs6000_address_for_altivec): Delete this function.
16404         * config/rs6000/vector.md: Remove expands for
16405         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16407 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16409         PR target/84826
16410         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16411         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16412         re-computing once computed.
16413         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16414         (arm_init_machine_status): Initialize
16415         machine->static_chain_stack_bytes.
16417 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16419         PR target/84760
16420         * doc/extend.texi: Add four new prototypes for vec_ld.
16421         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16422         definitions for more logical presentation.
16423         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16424         entries for V1TI variants of __builtin_altivec_ld builtin.
16425         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16426         handling of V1TI variant of LVX icode pattern.
16427         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16428         (rs6000_gimple_fold_builtin): Likewise.
16429         (altivec_init_builtins): Add code to define
16430         __builtin_altivec_lvx_v1ti function.
16432 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16434         PR inline-asm/84941
16435         * function.c (match_asm_constraints_1): Don't do the optimization
16436         if input isn't a REG, SUBREG, MEM or constant.
16438 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16440         PR tree-optimization/84956
16441         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16442         bb_has_abnormal_pred.
16444 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16446         PR sanitizer/85018
16447         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16448         DECL_INITIAL (decl) to decl at the end.
16449         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16450         adjust the comment.
16452 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16454         * doc/extend.texi (__builtin_tgmath): Document when complex
16455         integer types are treated as _Complex _Float64.
16457 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16459         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16461 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16463         PR tree-optimization/84960
16464         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16465         if it is ENTRY block, move them into single succ of ENTRY in that case.
16467 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16469         PR tree-optimization/84811
16470         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16471         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16472         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16473         (known_subrange_p): Update accordingly.  Cast each value involved
16474         in the size comparison, rather than casting the result of the
16475         subtraction.
16477 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16479         PR tree-optimization/84982
16480         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16481         by flipping the least significant bit rather than all bits from
16482         bitpos to bitpos + bitsize - 1.
16484 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16486         * doc/extend.texi (Deprecated Features): Remove mention of
16487         long-deleted deprecations.
16489 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16491         PR jit/84288
16492         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16493         * configure: Regenerate.
16495 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16497         PR tree-optimization/83126
16498         * tree-parloops.c (num_phis): New function.
16499         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16501 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16503         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16504         mention anon-struct/union members and trailing attributes.
16506 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16508         PR tree-optimization/84969
16509         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16510         builtin memset partitions if they set different rhs values.
16512 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16514         PR rtl-optimization/84989
16515         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16516         VEC_DUPLICATE with scalar result mode.
16518 2018-03-21  Martin Liska  <mliska@suse.cz>
16520         PR ipa/84963
16521         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16522         not intended return statement.
16524 2018-03-21  Martin Liska  <mliska@suse.cz>
16526         PR target/84988
16527         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16528         (chkp_find_bound_slots_1): Limit number of iterations.
16530 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16532         PR target/84838
16533         * Minor grammar fixes for x86 options.
16535 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16537         PR debug/84875
16538         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16539         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16541 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16543         PR target/83789
16544         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16545         (altivec_lvx_<mode>_1op): Likewise.
16546         (altivec_stvx_<mode>_2op): Likewise.
16547         (altivec_stvx_<mode>_1op): Likewise.
16548         (altivec_lvx_<VM2:mode>): New define_expand.
16549         (altivec_stvx_<VM2:mode>): Likewise.
16550         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16551         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16552         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16553         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16554         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16555         (rs6000_gen_lvx): Likewise.
16556         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16557         (altivec_expand_stv_builtin): Likewise.
16558         (altivec_expand_builtin): Likewise.
16559         * config/rs6000/vector.md: Likewise.
16561 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16563         PR target/82518
16564         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16565         BYTES_BIG_ENDIAN.
16567 2018-03-20  Richard Biener  <rguenther@suse.de>
16569         PR target/84986
16570         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16571         sign-conversions as zero, fall back to standard scalar_stmt
16572         cost for the rest.
16574 2018-03-20  Martin Liska  <mliska@suse.cz>
16576         PR ipa/84825
16577         * predict.c (rebuild_frequencies): Handle case when we have
16578         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16580 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16582         PR target/84990
16583         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16584         flag_section_anchors.
16585         * varasm.c (use_blocks_for_decl_p): Remove hack for
16586         dw2_force_const_mem.
16588         PR target/84845
16589         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16590         to ...
16591         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16592         be created, use lowpart_subreg of operands[0] rather than operands[0]
16593         itself.
16594         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16595         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16596         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16597         and n constraint instead of aarch64_shift_imm_di and Usd.
16598         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16599         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16601 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16603         PR target/82989
16604         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16605         to favor GPR over NEON registers.
16606         (<shift>di3_neon): Likewise.
16608 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16610         PR target/84952
16611         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16612         (nvptx_process_pars): Emit bar.sync asap and alap.
16614 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16616         PR target/84954
16617         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16618         seen_label if seen_label is already set.
16620 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16622         PR target/84945
16623         * config/i386/i386.c (fold_builtin_cpu): For features above 31
16624         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16625         Use 1U instead of 1.  Formatting fixes.
16627         PR c/84953
16628         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16629         instead of TREE_TYPE (s1) for the return value.
16631 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
16633         PR tree-optimization/84946
16634         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16635         bitsize + bitsize in poly_uint64 rather than poly_int64.
16637         PR sanitizer/78651
16638         * dwarf2asm.c: Include fold-const.c.
16639         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16640         of decl rather than decl itself.
16642         PR rtl-optimization/84643
16643         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16645 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
16647         PR sanitizer/78651
16648         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16649         calling assemble_variable.
16651 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16653         PR target/81647
16654         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16655         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16657 2018-03-19  Jim Wilson  <jimw@sifive.com>
16659         PR bootstrap/84856
16660         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16661         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16662         (riscv_first_stack_step): Likewise.
16663         (riscv_option_override): Use STACK_BOUNDARY instead of
16664         MIN_STACK_BOUNDARY.
16665         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16666         MIN_STACK_BOUNDARY.
16667         (BIGGEST_ALIGNMENT): Set to 128.
16668         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16669         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16670         STACK_BOUNDARY.
16672 2018-03-19  Richard Biener  <rguenther@suse.de>
16674         PR tree-optimization/84933
16675         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16676         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16678 2018-03-19  Richard Biener  <rguenther@suse.de>
16680         PR tree-optimization/84859
16681         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16682         (cond_if_else_store_replacement): Perform sinking operation on
16683         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16684         Generalize what a BB with a single eligible store is.
16686 2018-03-19  Richard Biener  <rguenther@suse.de>
16688         PR tree-optimization/84929
16689         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16690         chrec_is_positive against non-chrec arg.
16692 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16694         PR target/84711
16695         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16697 2018-03-18  Martin Liska  <mliska@suse.cz>
16699         PR rtl-optimization/84635
16700         * regrename.c (build_def_use): Use matches_mode only when
16701         matches >= 0.
16703 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16705         PR tree-optimization/84913
16706         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16707         vectorize chains of COND_EXPRs.
16709 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16711         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16713 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16715         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16717 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16719         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16721 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16722             Kito Cheng  <kito.cheng@gmail.com>
16724         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16725         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16726         (nds32_adjust_reg_alloc_order): New function.
16727         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16729 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16731         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16732         nds32_print_operand, nds32_print_operand_address): Use
16733         HOST_WIDE_INT_PRINT_DEC instead.
16735 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16737         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16739 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16741         PR target/84902
16742         * config/i386/i386.c (initial_ix86_tune_features,
16743         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16744         unsigned long long.
16745         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16746         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16747         rather than 1u << ix86_tune.  Formatting fix.
16748         (ix86_option_override_internal): Change ix86_arch_mask from
16749         unsigned int to unsigned HOST_WIDE_INT, initialize to
16750         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16751         (ix86_function_specific_restore): Likewise.
16753 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16755         PR target/84899
16756         * postreload.c (reload_combine_recognize_pattern): Perform
16757         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16758         truncate_int_for_mode the result for the destination's mode.
16760         PR c/84909
16761         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16762         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16763         Likewise.
16764         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16765         Likewise.
16767 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16769         PR target/84876
16770         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16771         regno_allocno_class_array and sorted_pseudos.
16772         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16773         insns where regno is used.
16775 2018-03-16  Martin Liska  <mliska@suse.cz>
16777         PR ipa/84833
16778         * multiple_target.c (create_dispatcher_calls): Redirect
16779         reference in the symbol table.
16781 2018-03-16  Martin Liska  <mliska@suse.cz>
16783         PR ipa/84722
16784         * multiple_target.c (create_dispatcher_calls): Redirect also
16785         an alias.
16787 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16789         PR c++/79937
16790         PR c++/82410
16791         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16792         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16793         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16795 2018-03-16  Julia Koval  <julia.koval@intel.com>
16797         * doc/invoke.texi (Skylake Server): Add CLWB.
16798         Cannonlake): Remove CLWB.
16800 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16802         PR tree-optimization/84841
16803         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16804         1 << 3.
16805         (FLOAT_ONE_CONST_TYPE): Define.
16806         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16807         (sort_by_operand_rank): Put entries with higher constant_type last
16808         rather than first to match comments.
16810 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16812         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16813         split predicate.
16815 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16817         PR c++/79085
16818         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16819         check and use address of target always.
16821 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16823         PR target/84574
16824         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16825         (indirect_thunk_bnd_needed): Likewise.
16826         (indirect_thunks_used): Likewise.
16827         (indirect_thunks_bnd_used): Likewise.
16828         (indirect_return_needed): New.
16829         (indirect_return_bnd_needed): Likewise.
16830         (output_indirect_thunk_function): Add a bool argument for
16831         function return.
16832         (output_indirect_thunk_function): Don't generate alias for
16833         function return thunk.
16834         (ix86_code_end): Call output_indirect_thunk_function to generate
16835         function return thunks.
16836         (ix86_output_function_return): Set indirect_return_bnd_needed
16837         and indirect_return_needed instead of indirect_thunk_bnd_needed
16838         and indirect_thunk_needed.
16840 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16842         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16843         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16844         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16846 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16847             Paul Hua <paul.hua.gm@gmail.com>
16849         PR c/84852
16850         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16852 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16854         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16855         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16856         resp. SFmode cases.
16858 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16860         PR target/84711
16861         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16862         instead of GET_MODE_SIZE when comparing Units.
16864 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16866         PR target/68256
16867         * varasm.c (hash_section): Return an unchangeble hash value
16868         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16869         Return !aarch64_can_use_per_function_literal_pools_p ().
16871 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16873         PR target/84860
16874         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16875         rather than address of cmode as last argument to prepare_cmp_insn.
16877 2018-03-15  Julia Koval  <julia.koval@intel.com>
16879         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16880         F_AVX512VNNI, F_AVX512BITALG): New.
16882 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16884         PR target/83451
16885         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16886         insn for floating-point loads and stores.
16888 2018-03-14  Carl Love  <cel@us.ibm.com>
16890         * config/rs6000/rs6000-c.c: Add macro definitions for
16891         ALTIVEC_BUILTIN_VEC_PERMXOR.
16892         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16893         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16894         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16895         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16896         UNSPEC_VPERMXOR.
16897         * config/doc/extend.texi: Add prototypes for vec_permxor.
16899 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16901         PR c/84852
16902         * diagnostic-show-locus.c (class layout_point): Convert m_line
16903         from int to linenum_type.
16904         (line_span::comparator): Use linenum "compare" function when
16905         comparing line numbers.
16906         (test_line_span): New function.
16907         (layout_range::contains_point): Convert param "row" from int to
16908         linenum_type.
16909         (layout_range::intersects_line_p): Likewise.
16910         (layout::will_show_line_p): Likewise.
16911         (layout::print_source_line): Likewise.
16912         (layout::should_print_annotation_line_p): Likewise.
16913         (layout::print_annotation_line): Likewise.
16914         (layout::print_leading_fixits): Likewise.
16915         (layout::annotation_line_showed_range_p): Likewise.
16916         (struct line_corrections): Likewise for field m_row.
16917         (line_corrections::line_corrections): Likewise for param "row".
16918         (layout::print_trailing_fixits): Likewise.
16919         (layout::get_state_at_point): Likewise.
16920         (layout::get_x_bound_for_row): Likewise.
16921         (layout::print_line): Likewise.
16922         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16923         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16924         * input.c (selftest::test_linenum_comparisons): New function.
16925         (selftest::input_c_tests): Call it.
16926         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16927         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16928         * selftest.h (ASSERT_GT): New macro.
16929         (ASSERT_GT_AT): New macro.
16930         (ASSERT_LT): New macro.
16931         (ASSERT_LT_AT): New macro.
16933 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16935         PR rtl-optimization/84780
16936         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16938 2018-03-14  Martin Liska  <mliska@suse.cz>
16940         * tree.c (record_node_allocation_statistics): Use
16941         get_stats_node_kind.
16942         (get_stats_node_kind): New function extracted from
16943         record_node_allocation_statistics.
16944         (free_node): Use get_stats_node_kind.
16946 2018-03-14  Richard Biener  <rguenther@suse.de>
16948         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16949         that the value-set of ANTIC_IN doesn't grow.
16951         Revert
16952         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16953         member.
16954         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16955         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16957 2018-03-14  Julia Koval  <julia.koval@intel.com>
16959         * config.gcc (icelake-client, icelake-server): New.
16960         (icelake): Remove.
16961         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16962         (initial_ix86_arch_features): Ditto.
16963         (PTA_SKYLAKE): Add SGX.
16964         (PTA_ICELAKE): Remove.
16965         (PTA_ICELAKE_CLIENT): New.
16966         (PTA_ICELAKE_SERVER): New.
16967         (ix86_option_override_internal): Split up icelake on icelake client and
16968         icelake server.
16969         (get_builtin_code_for_version): Ditto.
16970         (fold_builtin_cpu): Ditto.
16971         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16972         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16973         * config/i386/i386.h (processor_type): Ditto.
16974         * doc/invoke.texi: Ditto.
16976 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16978         PR sanitizer/83392
16979         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16980         INTEGER_CST offset, add it together with bitpos / 8 and
16981         sign extend based on POINTER_SIZE.
16983         PR target/84844
16984         Revert
16985         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16987         PR target/78090
16988         * config/i386/constraints.md (Yc): New register constraint.
16989         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16990         Use Yc constraint for alternative 2 of operand 0.  Remove
16991         preferred_for_speed attribute.
16993 2018-03-14  Richard Biener  <rguenther@suse.de>
16995         PR tree-optimization/84830
16996         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16997         with the old one to avoid oscillations.
16999 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
17001         PR target/83712
17002         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17003         pseudos.
17004         (assign_by_spills): Return a flag of reload assignment failure.
17005         Do not process the reload assignment failures.  Do not spill other
17006         reload pseudos if they has the same reg class.  Update n if
17007         necessary.
17008         (lra_assign): Add a return arg.  Set up from the result of
17009         assign_by_spills call.
17010         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17011         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17012         usage_insns if it is not NULL.
17013         (spill_hard_reg_in_range): New function.
17014         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17015         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17016         function prototypes.
17017         (lra_assign): Change prototype.
17018         * lra.c (lra): Add code to deal with fails by splitting hard reg
17019         live ranges.
17021 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
17023         * config/riscv/riscv.opt (mrelax): New option.
17024         * config/riscv/riscv.c (riscv_file_start): Emit ".option
17025         "norelax" when riscv_mrelax is disabled.
17026         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17028 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17030         PR target/84743
17031         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17032         reassociation for int modes.
17034 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17036         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17037         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17038         for big-endian.
17039         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17040         * config/aarch64/aarch64-sve.md
17041         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17042         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17043         (*extend<mode><Vwide>2): Rename to...
17044         (aarch64_sve_extend<mode><Vwide>2): ...this.
17045         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17046         renaming the old pattern to...
17047         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
17048         unsigned packs.
17049         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17050         define_expand, renaming the old pattern to...
17051         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17052         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17053         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17054         account when deciding which SVE instruction the optab should use.
17055         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17057 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17059         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17060         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17061         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17062         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17063         (tlsdesc_small_<mode>): Turn a define_expand and use
17064         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
17065         (tlsdesc_small_advsimd_<mode>): ...this.
17066         (tlsdesc_small_sve_<mode>): New pattern.
17068 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
17070         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17071         (UNSPEC_UMUL_HIGHPART): New constants.
17072         (MUL_HIGHPART): New int iteraor.
17073         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17074         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17075         define_expand.
17076         (*<su>mul<mode>3_highpart): New define_insn.
17078 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17080         PR lto/84805
17081         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17082         incomplete types.
17084 2018-03-13  Martin Liska  <mliska@suse.cz>
17086         PR ipa/84658.
17087         * (sem_item_optimizer::sem_item_optimizer): Initialize new
17088         vector.
17089         (sem_item_optimizer::~sem_item_optimizer): Release it.
17090         (sem_item_optimizer::merge_classes): Register variable aliases.
17091         (sem_item_optimizer::fixup_pt_set): New function.
17092         (sem_item_optimizer::fixup_points_to_sets): Likewise.
17093         * ipa-icf.h: Declare new variables and functions.
17095 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
17097         PR middle-end/84834
17098         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17099         integer_pow2p@2 and test integer_pow2p in condition.
17100         (A < 0 ? C : 0): Similarly for @1.
17102         PR middle-end/84831
17103         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17104         characters starting at p contain '\0' character, don't look beyond
17105         that.
17107         PR target/84827
17108         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17109         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17111         PR target/84828
17112         * reg-stack.c (change_stack): Change update_end var from int to
17113         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17114         also call set_block_for_insn on the newly added insns and rescan.
17116         PR target/84786
17117         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17118         on the last operand.
17120         PR c++/84704
17121         * tree.c (stabilize_reference_1): Return save_expr (e) for
17122         STATEMENT_LIST even if it doesn't have side-effects.
17124 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
17126         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17128 2018-03-12  Renlin Li  <renlin.li@arm.com>
17130         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17131         aarch64_output_scalar_simd_mov_immediate.
17133 2018-03-12  Martin Sebor  <msebor@redhat.com>
17135         PR tree-optimization/83456
17136         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17137         for perfectly overlapping calls to memcpy.
17138         (gimple_fold_builtin_memory_chk): Same.
17139         (gimple_fold_builtin_strcpy): Handle no-warning.
17140         (gimple_fold_builtin_stxcpy_chk): Same.
17141         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17143 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17145         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17146         parameter.  Use it for SFmode.
17147         (rs6000_function_arg_advance_1): Adjust.
17148         (rs6000_function_arg): Adjust.
17149         (rs6000_gimplify_va_arg): Pass false for that new parameter.
17151 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
17153         PR rtl-optimization/84169
17154         PR rtl-optimization/84780
17155         * combine.c (can_combine_p): Check for a 2-insn combination whether
17156         the destination register is used between the two insns, too.
17158 2018-03-12  Richard Biener  <rguenther@suse.de>
17160         PR tree-optimization/84803
17161         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17162         for refs DR analysis didn't process.
17164 2018-03-12  Richard Biener  <rguenther@suse.de>
17166         PR tree-optimization/84777
17167         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17168         force-vectorize loops ignore whether we are optimizing for size.
17170 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17172         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17173         (TARGET_MD_ASM_ADJUST): Define.
17175 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
17176             Kito Cheng  <kito.cheng@gmail.com>
17177             Chung-Ju Wu  <jasonwucj@gmail.com>
17179         * config/nds32/nds32.c (nds32_compute_stack_frame,
17180         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17181         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17182         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17183         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17184         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17185         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17186         * config/nds32/nds32.md (prologue, epilogue): Use macro
17187         NDS32_V3PUSH_AVAILABLE_P to do checking.
17189 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
17191         PR debug/58150
17192         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17193         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17194         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
17195         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
17196         addition of most attributes on !orig_type_die or the attribute not
17197         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17199 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17200             Chung-Ju Wu  <jasonwucj@gmail.com>
17202         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17203         __NDS32_VH__ macro.
17204         * config/nds32/nds32.opt (mvh): New option.
17206 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17207             Chung-Ju Wu  <jasonwucj@gmail.com>
17209         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17210         function.
17211         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17212         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17213         definition.
17215 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
17216             Chung-Ju Wu  <jasonwucj@gmail.com>
17218         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17219         function.
17220         * config/nds32/nds32-multiple.md (strlensi): New pattern.
17221         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17223 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
17224             Kito Cheng  <kito.cheng@gmail.com>
17225             Chung-Ju Wu  <jasonwucj@gmail.com>
17227         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17228         UNSPEC_FFMISM and UNSPEC_FLMISM.
17229         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17230         for ffb, ffmism and flmism.
17231         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17232         (unspec_ffmism): Ditto.
17233         (unspec_flmism): Ditto.
17234         (nds32_expand_builtin_impl): Check if string extension is available.
17235         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17236         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17238 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
17240         Reverting patch:
17241         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17243         PR target/83712
17244         * lra-assigns.c (assign_by_spills): Return a flag of reload
17245         assignment failure.  Do not process the reload assignment
17246         failures.  Do not spill other reload pseudos if they has the same
17247         reg class.
17248         (lra_assign): Add a return arg.  Set up from the result of
17249         assign_by_spills call.
17250         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17251         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17252         usage_insns if it is not NULL.
17253         (spill_hard_reg_in_range): New function.
17254         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17255         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17256         function prototypes.
17257         (lra_assign): Change prototype.
17258         * lra.c (lra): Add code to deal with fails by splitting hard reg
17259         live ranges.
17261 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
17263         PR target/84807
17264         * config/i386/i386.opt: Replace Enforcment with Enforcement.
17266 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
17268         PR debug/84620
17269         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17270         (dw_val_node): Add val_symbolic_view.
17271         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17272         (symview_upper_bound): New.
17273         (new_line_info_table): Initialize symviews_since_reset.
17274         (dwarf2out_source_line): Count symviews_since_reset and set
17275         symview_upper_bound.
17276         (dw_val_equal_p): Handle symview.
17277         (add_AT_symview): New.
17278         (print_dw_val): Handle symview.
17279         (attr_checksum, attr_checksum_ordered): Likewise.
17280         (same_dw_val_p, size_of_die): Likewise.
17281         (value_format, output_die): Likewise.
17282         (add_high_low_attributes): Use add_AT_symview for entry_view.
17283         (dwarf2out_finish): Reset symview_upper_bound, clear
17284         zero_view_p.
17286 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
17288         PR target/83969
17289         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17290         Add strict argument and use it.
17291         (rs6000_split_multireg_move): Update for new strict argument.
17292         (mem_operand_gpr): Disallow all non-offsettable addresses.
17293         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17295 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
17297         PR target/84772
17298         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17299         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17300         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17302         PR c++/84767
17303         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17304         decl, use remap_type if we want to use the type.
17306 2018-03-09  Martin Sebor  <msebor@redhat.com>
17308         PR tree-optimization/84526
17309         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17310         Remove dead code.
17311         (builtin_access::generic_overlap): Be prepared to handle non-array
17312         base objects.
17314 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17316         PR rtl-optimization/84682
17317         * lra-constraints.c (process_address_1): Check is_address flag
17318         for address constraints.
17319         (process_alt_operands): Likewise.
17320         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17321         preprocess_constraints.
17322         * recog.h (preprocess_constraints): Add oploc parameter.
17323         Adjust callers.
17324         * recog.c (preprocess_constraints): Test address_operand for
17325         CT_ADDRESS constraints.
17327 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17329         PR target/83712
17330         * lra-assigns.c (assign_by_spills): Return a flag of reload
17331         assignment failure.  Do not process the reload assignment
17332         failures.  Do not spill other reload pseudos if they has the same
17333         reg class.
17334         (lra_assign): Add a return arg.  Set up from the result of
17335         assign_by_spills call.
17336         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17337         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17338         usage_insns if it is not NULL.
17339         (spill_hard_reg_in_range): New function.
17340         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17341         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17342         function prototypes.
17343         (lra_assign): Change prototype.
17344         * lra.c (lra): Add code to deal with fails by splitting hard reg
17345         live ranges.
17347 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17349         PR target/83193
17350         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17351         Accept complain bool parameter.  Only emit errors if it is true.
17352         (arm_parse_cpu_option_name): Likewise.
17353         (arm_target_thumb_only): Adjust callers of the above.
17354         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17355         prototype to take a default true bool parameter.
17356         (arm_parse_arch_option_name): Likewise.
17358 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17359             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17361         PR jit/64089
17362         PR jit/84288
17363         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17364         * configure: Regenerate.
17365         * configure.ac ("linker --version-script option"): New.
17366         ("linker soname option"): New.
17368 2018-03-09  Richard Biener  <rguenther@suse.de>
17370         PR tree-optimization/84775
17371         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17372         immediate uses of predicate stmts and mark them modified.
17374         Revert
17375         PR tree-optimization/84178
17376         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17377         to caller.
17378         (version_loop_for_if_conversion): Delay update_ssa call.
17379         (tree_if_conversion): Delay update_ssa until after predicate
17380         insertion.
17382 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17384         PR target/84763
17385         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17386         when the function accesses prior frames.
17388 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17390         PR debug/84456
17391         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17392         gen_llsym, otherwise call maybe_gen_llsym.
17394         PR inline-asm/84742
17395         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17396         has ',' character inside of it.
17398 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17400         PR target/84748
17401         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17402         as clobbering CC_REGNUM.
17404 2018-03-08  Richard Biener  <rguenther@suse.de>
17406         PR middle-end/84552
17407         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17408         (follow_copies_to_constant): Do not follow SSA names registered
17409         for update.
17411 2018-03-08  Richard Biener  <rguenther@suse.de>
17413         PR tree-optimization/84178
17414         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17415         to caller.
17416         (version_loop_for_if_conversion): Delay update_ssa call.
17417         (tree_if_conversion): Delay update_ssa until after predicate
17418         insertion.
17420 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17422         PR tree-optimization/84178
17423         * tree-if-conv.c (release_bb_predicate): Remove the
17424         the assertion that the stmts have NULL use_ops.
17425         Discard the statements, asserting that they haven't
17426         yet been added to a BB.
17428 2018-03-08  Richard Biener  <rguenther@suse.de>
17430         PR tree-optimization/84746
17431         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17432         (phi_translate): Pass in destination ANTIC_OUT set.
17433         (phi_translate_1): Likewise.  For a simplified result lookup
17434         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17435         (phi_translate_set): Adjust.
17436         (do_pre_regular_insertion): Likewise.
17437         (do_pre_partial_partial_insertion): Likewise.
17439 2018-03-08  Martin Liska  <mliska@suse.cz>
17441         PR gcov-profile/84735
17442         * doc/gcov.texi: Document usage of profile files.
17443         * gcov-io.h: Document changes in the format.
17445 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17447         PR debug/84404
17448         PR debug/84408
17449         * dwarf2out.c (struct dw_line_info_table): Update comments for
17450         view == -1.
17451         (FORCE_RESET_NEXT_VIEW): New.
17452         (FORCE_RESETTING_VIEW_P): New.
17453         (RESETTING_VIEW_P): Check for -1 too.
17454         (ZERO_VIEW_P): Likewise.
17455         (new_line_info_table): Force-reset next view.
17456         (dwarf2out_begin_function): Likewise.
17457         (dwarf2out_source_line): Simplify zero_view_p initialization.
17458         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17459         view directly.  Omit view when omitting .loc at line 0.
17461 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17463         PR tree-optimization/84740
17464         * tree-switch-conversion.c (process_switch): Call build_constructors
17465         only if info.phi_count is non-zero.
17467         PR tree-optimization/84739
17468         * tree-tailcall.c (find_tail_calls): Check call arguments against
17469         DECL_ARGUMENTS (current_function_decl) rather than
17470         DECL_ARGUMENTS (func) when checking for tail recursion.
17472 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17474         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17475         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17476         Volker Reichelt's entry and add entries for people that perform
17477         GCC fuzzy testing and report numerous bugs.
17479 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17481         PR target/82411
17482         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17483         readonly data in sdata, if that is disabled.
17484         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17485         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17486         -mreadonly-in-sdata option.
17488 2018-03-07  Martin Sebor  <msebor@redhat.com>
17490         PR tree-optimization/84468
17491         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17492         basic block when looking for nul assignment.
17494 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17496         PR target/84277
17497         * except.h (output_function_exception_table): Adjust prototype.
17498         * except.c (output_function_exception_table): Remove FNNAME parameter
17499         and add SECTION parameter.  Ouput one part of the table at a time.
17500         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17501         the first part of the exception table and emit unwind directives.
17502         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17503         (i386_pe_seh_cold_init): Likewise.
17504         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17505         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17506         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17507         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17508         * config/i386/winnt.c: Include except.h.
17509         (struct seh_frame_state): Add reg_offset, after_prologue and
17510         in_cold_section fields.
17511         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17512         (i386_pe_seh_cold_init): New function.
17513         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17514         to seh->in_cold_section.
17515         (seh_emit_push): Record the offset of the push.
17516         (seh_emit_save): Record the offet of the save.
17517         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17518         Test seh->after_prologue to disregard the epilogue.
17519         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17520         (i386_pe_end_cold_function): New function.
17522 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17524         PR fortran/84565
17525         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17526         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17528         PR c++/84704
17529         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17530         on tmp_var.
17531         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17532         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17534         PR middle-end/84723
17535         * multiple_target.c: Include tree-inline.h and intl.h.
17536         (expand_target_clones): Diagnose and fail if node->definition and
17537         !tree_versionable_function_p (node->decl).
17539 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17541         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17542         sprint_ul.
17543         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17544         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17545         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17547 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17549         PR target/84710
17550         * combine.c (try_combine): Use reg_or_subregno instead of handling
17551         just paradoxical SUBREGs and REGs.
17553 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17555         * config/arc/arc.c (arc_finalize_pic): Remove function.
17556         (arc_must_save_register): We use single base PIC register, remove
17557         checks to save/restore the PIC register.
17558         (arc_expand_prologue): Likewise.
17559         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17560         Remove.
17561         (arc_verify_short): Likewise.
17562         (arc_attr_type): Likewise.
17563         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17564         (walk_stores): Likewise.
17565         (arc_address_cost): Make it static.
17566         (arc_verify_short): Likewise.
17567         (branch_dest): Likewise.
17568         (arc_attr_type): Likewise.
17569         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17570         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17571         (arc_final_prescan_insn): Remove inserting the nops due to
17572         hardware hazards.  It is done in reorg step.
17573         (insn_length_variant_t): Remove.
17574         (insn_length_parameters_t): Likewise.
17575         (arc_insn_length_parameters): Likewise.
17576         (arc_get_insn_variants): Likewise.
17577         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17579 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17581         PR inline-asm/84683
17582         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17583         assertion failure.
17585         PR tree-optimization/84687
17586         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17587         on new_node->decl.
17588         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17590 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17592         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17593         Rename to ppc_speculation_barrier.
17594         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17595         __builtin_ppc_speculation_barrier.
17597 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17599         PR target/84700
17600         * combine.c (combine_simplify_rtx): Don't try to simplify if
17601         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17602         are equal to x.
17604 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17606         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17607         to 32 bytes when compiling for POWER9.
17609 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17611         PR target/84564
17612         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17613         regparm >= 3 with no arg reg available also for calls with
17614         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
17616         PR target/84524
17617         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17618         orig,vex.
17619         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
17621 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
17623         PR target/84264
17624         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17626 2018-03-05  Richard Biener  <rguenther@suse.de>
17628         PR tree-optimization/84486
17629         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17630         When inserting a __builtin_assume_aligned call set the LHS
17631         SSA name alignment info accordingly.
17633 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
17635         PR tree-optimization/84114
17636         * config/aarch64/aarch64.c (aarch64_reassociation_width)
17637         Avoid reassociation of FLOAT_MODE addition.
17639 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
17641         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17642         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17643         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17644         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17645         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17646         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17647         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17648         and -mwbnoinvd.
17649         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17650         __builtin_ia32_wbinvd): New builtins.
17651         (SPECIAL_ARGS2): New.
17652         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17653         (SPECIAL_ARGS2): New.
17654         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17655         (ix86_valid_target_attribute_inner_p): Ditto.
17656         (ix86_init_mmx_sse_builtins): Add special_args2.
17657         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17658         TARGET_WBNOINVD_P): New.
17659         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17660         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17661         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17662         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17663         * config/i386/pconfigintrin.h: New file.
17664         * config/i386/wbnoinvdintrin.h: Ditto.
17665         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17666         wbnoinvdintrin.h.
17667         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17669 2018-03-05  Richard Biener  <rguenther@suse.de>
17671         PR tree-optimization/84670
17672         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17673         member.
17674         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17675         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17676         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17677         doesn't grow if all successors (recursively) were visited at least
17678         once.
17680 2018-03-05  Richard Biener  <rguenther@suse.de>
17682         PR tree-optimization/84650
17683         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17684         if executed in the loop pipeline.
17686 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17688         * doc/configfiles.texi (Configuration Files): Move info about
17689         conditionalizing $target-protos.h to...
17690         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17691         differs from $target-protos.h.
17693 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17694             Chung-Ju Wu  <jasonwucj@gmail.com>
17696         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17697         * config/nds32/nds32-multiple.md (setmemsi): Define.
17698         * config/nds32/nds32-memory-manipulation.c
17699         (nds32_gen_dup_4_byte_to_word_value): New.
17700         (emit_setmem_word_loop): New.
17701         (emit_setmem_byte_loop): New.
17702         (nds32_expand_setmem_loop): New.
17703         (nds32_expand_setmem_loop_v3m): New.
17704         (nds32_expand_setmem_unroll): New.
17705         (nds32_expand_setmem): New.
17707 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17708             Chung-Ju Wu  <jasonwucj@gmail.com>
17710         * config/nds32/nds32-memory-manipulation.c
17711         (nds32_emit_load_store): New.
17712         (nds32_emit_post_inc_load_store): New.
17713         (nds32_emit_mem_move): New.
17714         (nds32_emit_mem_move_block): New.
17715         (nds32_expand_movmemsi_loop_unknown_size): New.
17716         (nds32_expand_movmemsi_loop_known_size): New.
17717         (nds32_expand_movmemsi_loop): New.
17718         (nds32_expand_movmemsi_unroll): New.
17719         (nds32_expand_movmemqi): Rename ...
17720         (nds32_expand_movmemsi): ... to this.
17721         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17722         (movmemsi): ... to this.
17723         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17724         (nds32_expand_movmemsi): ... to this.
17726 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17727             Monk Chiang  <sh.chiang04@gmail.com>
17728             Chung-Ju Wu  <jasonwucj@gmail.com>
17730         * config/nds32/nds32-protos.h
17731         (nds32_expand_load_multiple): New arguments.
17732         (nds32_expand_store_multiple): Ditto.
17733         (nds32_valid_multiple_load_store): Rename ...
17734         (nds32_valid_multiple_load_store_p): ... to this.
17735         * config/nds32/nds32-memory-manipulation.c
17736         (nds32_expand_load_multiple): Refine implementation.
17737         (nds32_expand_store_multiple): Ditto.
17738         * config/nds32/nds32-multiple.md
17739         (load_multiple): Update nds32_expand_load_multiple interface.
17740         (store_multiple): Update nds32_expand_store_multiple interface.
17741         * config/nds32/nds32-predicates.c
17742         (nds32_valid_multiple_load_store): Rename ...
17743         (nds32_valid_multiple_load_store_p): ... to this and refine
17744         implementation.
17745         * config/nds32/predicates.md
17746         (nds32_load_multiple_and_update_address_operation): New predicate.
17747         (nds32_store_multiple_and_update_address_operation): New predicate.
17749 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17750             Chung-Ju Wu  <jasonwucj@gmail.com>
17752         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17753         (combo): New attribute.
17754         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17756 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17758         * config/nds32/nds32.opt: Change -mcmodel= default value.
17760 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17761             Monk Chiang  <sh.chiang04@gmail.com>
17762             Chung-Ju Wu  <jasonwucj@gmail.com>
17764         * config/nds32/constants.md (unspec_element): New enum.
17765         * config/nds32/constraints.md (Umw): New constraint.
17766         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17767         * config/nds32/nds32-intrinsic.md: Likewise.
17768         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17769         (nds32_valid_smw_lwm_base_p): New.
17770         (nds32_output_smw_single_word): New.
17771         (nds32_output_lmw_single_word): New.
17772         (nds32_expand_unaligned_load): New.
17773         (nds32_expand_unaligned_store): New.
17774         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17775         (nds32_output_smw_single_word): Declare.
17776         (nds32_output_lmw_single_word): Declare.
17777         (nds32_expand_unaligned_load): Declare.
17778         (nds32_expand_unaligned_store): Declare.
17779         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17780         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17781         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17782         NDS32_BUILTIN_UASTORE_DW.
17783         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17784         predicate.
17786 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17787             Kito Cheng  <kito.cheng@gmail.com>
17788             Chung-Ju Wu  <jasonwucj@gmail.com>
17790         * config/nds32/nds32-intrinsic.c
17791         (nds32_expand_builtin_null_ftype_reg): Delete.
17792         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17793         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17794         (nds32_read_argument): New.
17795         (nds32_legitimize_target): Ditto.
17796         (nds32_legitimize_argument): Ditto.
17797         (nds32_check_constant_argument): Ditto.
17798         (nds32_expand_unop_builtin): Ditto.
17799         (nds32_expand_unopimm_builtin): Ditto.
17800         (nds32_expand_binop_builtin): Ditto.
17801         (nds32_builtin_decl_impl): Ditto.
17802         (builtin_description): Ditto.
17803         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17804         (nds32_init_builtins_impl): Ditto.
17805         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17806         (nds32_builtin_decl): New.
17807         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17808         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17810 2018-03-02  Jeff Law  <law@redhat.com>
17812         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17813         (redundant_insn, fill_simple_delay_slots): Likewise.
17814         (fill_slots_from_thread): Likewise.
17815         * resource.c (mark_referenced_resources): Likewise.
17816         (mark_set_resources, find_dead_or_set_registers): Likewise.
17818 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17820         * substring-locations.h (format_warning_va): Formatting fix for
17821         ATTRIBUTE_GCC_DIAG.
17822         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17823         argument.
17824         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17825         * substring-locations.c: Include intl.h.
17826         (format_warning_va): Turned into small wrapper around
17827         format_warning_n_va, renamed to ...
17828         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17829         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17830         use ngettext.
17831         (format_warning_at_substring_n): New function.
17832         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17833         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17834         format_warning_at_substring with just a shorter name instead of
17835         const function pointer.
17836         (fmtwarn_n): New function.
17837         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17838         appropriate, get rid of all the fmtstr temporaries, move conditionals
17839         with G_() wrapped string literals directly into fmtwarn arguments,
17840         cast dir.len to (int), formatting fixes.
17842 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17844         * doc/invoke.texi: Remove "Cilk Plus" references.
17846 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17847             Richard Biener  <rguenther@suse.de>
17849         PR ipa/84628
17850         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17851         for error or warning attributes if CALL_FROM_THUNK_P is set.
17852         Formatting fixes.
17854 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17856         PR target/56540
17857         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17858         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17860         PR target/56540
17861         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17862         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17864         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17865         instead of -1U in last predictors element's probability member.
17867 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17869         PR ipa/83983
17870         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17871         arguments if they are comparable.
17873 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17875         PR tree-optimization/84634
17876         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17877         masks and masked_loop_p with a single loop_masks, making sure it's
17878         null for bb vectorization.
17880 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17882         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17883         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17884         loop->force_vectorize to check whether there is no alias.
17886 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17888         PR target/84614
17889         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17890         prototypes.
17891         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17892         comments.
17893         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17894         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17895         instead of a loop around prev_real_insn.
17896         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17897         prev_real_insn.
17899         PR inline-asm/84625
17900         * config/i386/i386.c (ix86_print_operand): Use conditional
17901         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17902         zero vector.
17904 2018-03-02  Richard Biener  <rguenther@suse.de>
17906         PR tree-optimization/84427
17907         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17908         (bitmap_set_subtract_values): Rewrite to handle multiple
17909         exprs per value.
17910         (clean): Likewise.
17911         (prune_clobbered_mems): Likewise.
17912         (phi_translate): Take edge instead of pred/phiblock.
17913         (phi_translate_1): Likewise.
17914         (phi_translate_set): Likewise.  Insert all translated
17915         exprs for a value into the set, keeping possibly multiple
17916         expressions per value.
17917         (compute_antic_aux): Adjust for phi_translate changes.
17918         When intersecting union the expressions and prune those
17919         not in the final value set, keeping possibly multiple
17920         expressions per value.  Do not use value-insertion
17921         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17922         all expressions.  Add verification that the value-sets
17923         only shrink during iteration.
17924         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17925         (do_pre_regular_insertion): Likewise.
17926         (do_pre_partial_partial_insertion): Likewise.
17928 2018-03-02  Richard Biener  <rguenther@suse.de>
17930         PR target/82005
17931         * config/darwin.c (saved_debug_info_level): New static global.
17932         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17933         (darwin_asm_lto_end): Restore debug info generation settings.
17935 2018-03-01  Martin Liska  <mliska@suse.cz>
17937         PR sanitizer/82484
17938         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17939         volatile arguments.
17941 2018-03-01  Richard Biener  <rguenther@suse.de>
17943         PR debug/84645
17944         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17945         type annotation with LTO when debug was disabled at compile-time.
17947 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17949         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17950         XINT with INTVAL.
17951         (mips_final_postscan_insn): Likewise.
17953 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17955         PR rtl-optimization/84528
17956         * alias.c (init_alias_target): Add commentary.
17957         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17958         a unique base value if the frame pointer is not eliminated
17959         to the stack pointer.
17961 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17963         PR rtl-optimization/83327
17964         * lra-int.h (hard_regs_spilled_into): Declare.
17965         * lra.c (hard_regs_spilled_into): Define.
17966         (init_reg_info): Init hard_regs_spilled_into.
17967         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17968         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17969         (process_bb_lives): Handle hard_regs_spilled_into.
17970         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17971         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17973 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17975         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17976         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17977         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17978         * config/rs6000/aix72.h: New file.
17980 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17982         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17983         instead of warning_at with conditional singular and plural messages
17984         where possible.
17986         PR target/52991
17987         * stor-layout.c (update_alignment_for_field): For
17988         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17989         && !DECL_PACKED (field), do the alignment update, just use
17990         only desired_align instead of MAX (type_align, desired_align)
17991         as the alignment.
17992         (place_field): Don't do known_align < desired_align handling
17993         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17994         is non-NULL, instead do it after rli->prev_field handling and
17995         only if not within a bitfield word.  For DECL_PACKED (field)
17996         use type_align of BITS_PER_UNIT.
17998 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
18000         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18001         superfluous parentheses and trailing spaces.
18003 2018-02-28  Richard Biener  <rguenther@suse.de>
18005         PR tree-optimization/84584
18006         * graphite-scop-detection.c (scop_detection::add_scop): Discard
18007         SCoPs with fake exit edge.
18009 2018-02-28  Martin Liska  <mliska@suse.cz>
18011         PR testsuite/84597
18012         * timevar.c (timer::print): Fix format to properly print 100%
18013         values.
18015 2018-02-28  Richard Biener  <rguenther@suse.de>
18017         PR middle-end/84607
18018         * genmatch.c (capture_info::walk_match): Do not mark
18019         captured expressions without operands as expr_p given
18020         they act more like predicates and should be subject to
18021         "lost tail" side-effect preserving.
18023 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
18025         PR rtl-optimization/81611
18026         * auto-inc-dec.c (attempt_change): Move dead note from
18027         mem_insn if it's the next use of regno
18028         (find_address): Take address use of reg holding
18029         non-incremented value.  Add parm to limit search to the named
18030         reg only.
18031         (merge_in_block): Attempt to use a mem insn that is the next
18032         use of the original regno.
18034 2018-02-27  Martin Sebor  <msebor@redhat.com>
18036         PR c++/83871
18037         * doc/invoke.texi (-Wmissing-attributes): New option.
18038         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18040 2018-02-27  Martin Sebor  <msebor@redhat.com>
18042         PR translation/84207
18043         * diagnostic-core.h (warning_n, error_n, inform_n): Change
18044         n argument to unsigned HOST_WIDE_INT.
18045         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18046         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
18047         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18048         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18050 2018-02-27  Richard Biener  <rguenther@suse.de>
18052         PR tree-optimization/84512
18053         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18054         Do not use the estimate returned from record_stmt_cost for
18055         the scalar iteration cost but sum properly using add_stmt_cost.
18057 2018-02-27  Richard Biener  <rguenther@suse.de>
18059         PR tree-optimization/84466
18060         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18061         Adjust last change to less strictly validate use operands.
18063 2018-02-27  Martin Liska  <mliska@suse.cz>
18065         PR gcov-profile/84548
18066         * gcov.c (process_file): Allow partial overlap and consider it
18067         also as group functions.
18068         (output_lines): Properly calculate range of lines for a group.
18070 2018-02-27  Martin Liska  <mliska@suse.cz>
18072         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18073         'ggc' suffixes.  Change first column width.
18074         (timer::print): Fix formatting of the column.
18076 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
18078         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18079         preserve inline entry blocks for the sake of debug inline
18080         entry point markers alone.
18081         (remove_unused_locals): Suggest in comments a better place to
18082         force the preservation of inline entry blocks that are
18083         otherwise unused, but do not preserve them.
18085 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18087         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18089 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18091         PR target/84039
18092         * config/i386/constraints.md (Bs): Replace
18093         ix86_indirect_branch_register with
18094         TARGET_INDIRECT_BRANCH_REGISTER.
18095         (Bw): Likewise.
18096         * config/i386/i386.md (indirect_jump): Likewise.
18097         (tablejump): Likewise.
18098         (*sibcall_memory): Likewise.
18099         (*sibcall_value_memory): Likewise.
18100         Peepholes of indirect call and jump via memory: Likewise.
18101         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18102         (*sibcall_value_GOT_32): Likewise.
18103         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18104         (GOT_memory_operand): Likewise.
18105         (call_insn_operand): Likewise.
18106         (sibcall_insn_operand): Likewise.
18107         (GOT32_symbol_operand): Likewise.
18108         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18110 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18112         PR rtl-optimization/83496
18113         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18114         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
18115         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18116         redundant insn, if any.
18117         (relax_delay_slots): Likewise.
18118         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18120 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
18122         PR tree-optimization/83965
18123         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18124         that grouped statements are part of a reduction chain.  Return
18125         true if the statement is not marked as a reduction itself but
18126         is part of a group.
18127         (vect_recog_dot_prod_pattern): Don't check whether the statement
18128         is part of a group here.
18129         (vect_recog_sad_pattern): Likewise.
18130         (vect_recog_widen_sum_pattern): Likewise.
18132 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
18134         PR debug/84545
18135         * final.c (rest_of_clean_state): Also look for calls inside sequences.
18137 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
18139         PR target/84530
18140         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18141         the bool argument.
18142         (ix86_output_indirect_function_return): New prototype.
18143         (ix86_split_simple_return_pop_internal): Likewise.
18144         * config/i386/i386.c (indirect_return_via_cx): New.
18145         (indirect_return_via_cx_bnd): Likewise.
18146         (indirect_thunk_name): Handle return va CX_REG.
18147         (output_indirect_thunk_function): Create alias for
18148         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18149         (ix86_output_indirect_jmp): Remove the bool argument.
18150         (ix86_output_indirect_function_return): New function.
18151         (ix86_split_simple_return_pop_internal): Likewise.
18152         * config/i386/i386.md (*indirect_jump): Don't pass false
18153         to ix86_output_indirect_jmp.
18154         (*tablejump_1): Likewise.
18155         (simple_return_pop_internal): Change it to define_insn_and_split.
18156         Call ix86_split_simple_return_pop_internal to split it for
18157         -mfunction-return=.
18158         (simple_return_indirect_internal): Call
18159         ix86_output_indirect_function_return instead of
18160         ix86_output_indirect_jmp.
18162 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
18164         PR bootstrap/84405
18165         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18166         memset and value initialization afterwards.
18168 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
18170         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18172 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18174         PR target/84521
18175         * common/config/aarch64/aarch64-common.c
18176         (aarch_option_optimization_table[]): Switch
18177         off fomit-frame-pointer
18179 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18180             Chung-Ju Wu  <jasonwucj@gmail.com>
18182         * config/nds32/nds32-multiple.md (load_multiple): Disallow
18183         volatile memory.
18184         (store_multiple): Ditto.
18186 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
18188         * config.gcc: Add --with-cpu support for nds32 target.
18189         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18190         * config/nds32/nds32.opt: Add -mcpu= option.
18192 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
18194         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18195         isel=yes): Warn for these deprecated options.
18197 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
18199         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18200         ISA_2_5_MASKS_EMBEDDED.
18202 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
18204         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18205         p->max as pointers rather than using iterative_hash_expr.
18207 2018-02-23  Carl Love  <cel@us.ibm.com>
18209         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18210         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18211         BU_P8V_OVERLOAD_2.
18212         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18213         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18214         P8V_BUILTIN_VEC_VUNSIGNED2.
18216 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
18218         PR target/81572
18219         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18220         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18221         LRA_UNKNOWN_ALT.
18222         * lra-constraints.c (curr_insn_transform): Set up
18223         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
18224         LRA_UNKNOWN_ALT.
18225         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18226         * lra-eliminations.c (spill_pseudos): Ditto.
18227         (process_insn_for_elimination): Ditto.
18228         * lra-lives.c (reg_early_clobber_p): Use the new macros.
18229         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18230         LRA_NON_CLOBBERED_ALT.
18232 2018-02-22  Martin Sebor  <msebor@redhat.com>
18234         PR tree-optimization/84480
18235         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18236         to maybe_diag_stxncpy_trunc.  Call it.
18237         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18238         from gimple_fold_builtin_strcpy.  Print inlining stack.
18239         (handle_builtin_stxncpy): Print inlining stack.
18240         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18242 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
18244         PR target/84176
18245         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18246         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18247         and -fcheck-pointer-bounds are used together.
18248         (indirect_thunk_prefix): New enum.
18249         (indirect_thunk_need_prefix): New function.
18250         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
18251         "_nt" instead of "_bnd" for NOTRACK prefix.
18252         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18253         (output_indirect_thunk_function): Likewise.
18254         (): Likewise.
18255         (ix86_code_end): Update output_indirect_thunk_function calls.
18256         (ix86_output_indirect_branch_via_reg): Replace
18257         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18258         (ix86_output_indirect_branch_via_push): Likewise.
18259         (ix86_output_function_return): Likewise.
18260         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18261         incompatible with -fcf-protection=branch and
18262         -fcheck-pointer-bounds.
18264 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18266         PR target/83335
18267         * config/aarch64/aarch64.c (aarch64_print_address_internal):
18268         Change gcc_assert call to output_operand_lossage.
18270 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18272         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18274 2018-02-22  DJ Delorie  <dj@redhat.com>
18275             Sebastian Perta  <sebastian.perta@renesas.com>
18276             Oleg Endo  <olegendo@gcc.gnu.org>
18278         * config/rx/rx.c (rx_rtx_costs): New function.
18279         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18281 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18283         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18285 2018-02-22  Martin Liska  <mliska@suse.cz>
18287         PR driver/83193
18288         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18289         Add "native" as a possible value.
18291 2018-02-22  Martin Liska  <mliska@suse.cz>
18293         PR driver/83193
18294         * config/i386/i386.c (ix86_option_override_internal):
18295         Add "native" as a possible value for -march and -mtune.
18297 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18299         PR target/84502
18300         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18301         to all type variants.
18303         PR tree-optimization/84503
18304         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18305         width as info->bitpos + info->bitsize - start.
18306         (merged_store_group::merge_overlapping): Simplify width computation.
18307         (check_no_overlap): New function.
18308         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18309         start + width and last_order of the group, fail if check_no_overlap
18310         fails.
18311         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18312         to group if check_no_overlap fails.
18314 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18316         * config/rs6000/altivec.md: Delete contraint arguments to
18317         define_expand, define_split, and define_peephole2, and in
18318         define_insn_and_split if always unused.
18319         * config/rs6000/darwin.md: Ditto.
18320         * config/rs6000/dfp.md: Ditto.
18321         * config/rs6000/rs6000.md: Ditto.
18322         * config/rs6000/sync.md: Ditto.
18323         * config/rs6000/vector.md: Ditto.
18324         * config/rs6000/vsx.md: Ditto.
18326 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18328         * config/rs6000/altivec.md: Write output control strings as braced
18329         blocks instead of double-quoted strings.
18330         * config/rs6000/darwin.md: Ditto.
18331         * config/rs6000/rs6000.md: Ditto.
18332         * config/rs6000/vector.md: Ditto.
18333         * config/rs6000/vsx.md: Ditto.
18335 2018-02-21  Jason Merrill  <jason@redhat.com>
18337         PR c++/84314 - ICE with templates and fastcall attribute.
18338         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18340 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18342         * ipa-cp.c (determine_versionability): Fix comment typos.
18344 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18346         PR c/84229
18347         * ipa-cp.c (determine_versionability): Do not version functions caling
18348         va_arg_pack.
18350 2018-02-21  Martin Liska  <mliska@suse.cz>
18352         PR driver/83193
18353         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18354         Add "native" as a possible value.
18355         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18356         the macro when native cpu detection is available.
18358 2018-02-21  Martin Liska  <mliska@suse.cz>
18360         PR driver/83193
18361         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18362         Add "native" as a possible value.
18363         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18364         when native cpu detection is available.
18366 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18367             Martin Sebor  <msebor@redhat.com>
18369         PR tree-optimization/84478
18370         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18371         false.
18372         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18373         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18374         support which is conservatively correct, for 2 only stay conservative
18375         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18376         argument to the 2 argument get_range_strlen, adjust 6 arg
18377         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18378         false.
18379         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18380         (gimple_fold_builtin_strlen): Pass true as last argument to
18381         get_range_strlen.
18383 2018-02-20  Martin Sebor  <msebor@redhat.com>
18385         PR middle-end/84095
18386         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18387         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18388         (builtin_memref::builtin_memref): Factor out parts into
18389         set_base_and_offset and call it.
18391 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18393         PR middle-end/84406
18394         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18395         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18396         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18397         search at the associated MODE_INT.
18399 2018-02-20  Jeff Law  <law@redhat.com>
18401         PR middle-end/82123
18402         PR tree-optimization/81592
18403         PR middle-end/79257
18404         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18405         for range data rather than using global data.
18406         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18407         range data rather than using global data.
18408         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18409         pass it to children as needed.
18410         (struct directive::fmtresult): Similarly.
18411         (struct directive::set_width): Similarly.
18412         (struct directive::set_precision): Similarly.
18413         (format_integer, format_directive, parse_directive): Similarly.
18414         (format_none): Accept unnamed vr_values parameter.
18415         (format_percent, format_floating, format_character): Similarly.
18416         (format_string, format_plain): Similarly.
18417         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18418         the EVRP range analyzer for range data rather than using global data.
18419         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18420         gimple-ssa-evrp-analyze.h
18421         (class sprintf_dom_walker): Add after_dom_children member function.
18422         Add evrp_range_analyzer member.
18423         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18424         range analyzer as needed.
18425         (sprintf_dom_walker::after_dom_children): New member function.
18426         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18427         if not optimizing.
18428         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18429         (evrp_range_analyzer::pop_to_marker): Likewise.
18431 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18433         PR tree-optimization/84419
18434         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18435         with the required type if its current type is compatible but
18436         different.
18438 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18440         PR middle-end/82004
18441         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18442         after vectorization.
18444 2018-02-20  Martin Liska  <mliska@suse.cz>
18446         PR driver/83193
18447         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18448         possible values if we don't have a hint.
18450 2018-02-20  Martin Liska  <mliska@suse.cz>
18452         PR c/84310
18453         PR target/79747
18454         * final.c (shorten_branches): Build align_tab array with one
18455         more element.
18456         * opts.c (finish_options): Add alignment option limit check.
18457         (MAX_CODE_ALIGN): Likewise.
18458         (MAX_CODE_ALIGN_VALUE): Likewise.
18459         * doc/invoke.texi: Document maximum allowed option value for
18460         all -falign-* options.
18462 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18464         PR target/84146
18465         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18466         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18467         * var-tracking.c (emit_note_insn_var_location): Remove all references
18468         to NOTE_INSN_CALL_ARG_LOCATION.
18469         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18470         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18471         Use copy_rtx_if_shared.
18472         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18473         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18474         (dwarf2out_var_location): Remove handling of
18475         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18476         on call_insn.
18477         * final.c (final_scan_insn): Remove all references to
18478         NOTE_INSN_CALL_ARG_LOCATION.
18479         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18480         before dumping final insns.
18481         * except.c (emit_note_eh_region_end): Remove all references to
18482         NOTE_INSN_CALL_ARG_LOCATION.
18483         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18484         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18485         * config/arc/arc.c (hwloop_optimize): Likewise.
18486         * config/arm/arm.c (create_fix_barrier): Likewise.
18487         * config/s390/s390.c (s390_chunkify_start): Likewise.
18488         * config/sh/sh.c (find_barrier): Likewise.
18489         * config/i386/i386.c (rest_of_insert_endbranch,
18490         ix86_seh_fixup_eh_fallthru): Likewise.
18491         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18492         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18493         * config/frv/frv.c (frv_function_prologue): Likewise.
18494         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18495         reg note.
18496         (note_outside_basic_block_p): Remove all references to
18497         NOTE_INSN_CALL_ARG_LOCATION.
18498         * gengtype.c (adjust_field_rtx_def): Likewise.
18499         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18500         Likewise.
18501         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18502         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18504         PR c++/84444
18505         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18506         is ADDR_EXPR.
18508         PR tree-optimization/84452
18509         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18510         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18511         is NULL.
18513 2018-02-19  Martin Liska  <mliska@suse.cz>
18515         PR sanitizer/82183
18516         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18518 2018-02-19  Martin Liska  <mliska@suse.cz>
18519             Richard Sandiford  <richard.sandiford@linaro.org>
18521         PR tree-optimization/82491
18522         * gimple-fold.c (get_base_constructor): Make earlier bail out
18523         to prevent ubsan.
18525 2018-02-19  Carl Love  <cel@us.ibm.com>
18527         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18528         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18529         BU_P8V_OVERLOAD_1.
18530         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18531         P8V_BUILTIN_VEC_NEG.
18533 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18535         * config/rl78/rl78.md (movdf): New define expand.
18537 2018-02-19  Martin Liska  <mliska@suse.cz>
18539         PR other/80589
18540         * doc/invoke.texi: Fix typo.
18541         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18543 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18545         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18546         handle rs6000_single_float and rs6000_double_float specially for
18547         e500 family CPUs.
18549 2018-02-16  Jeff Law  <law@redhat.com>
18551         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18552         (pop_regs): Use it.
18554 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18556         PR ipa/84425
18557         * ipa-inline.c (inline_small_functions): Fix a typo.
18559 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18561         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18563 2018-02-16  Carl Love  <cel@us.ibm.com>
18565         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18566         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18567         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18568         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18569         expansion to P8V_BUILTIN_VEC_FLOAT2.
18571 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18573         PR rtl-optimization/70023
18574         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18575         src_regno into account.
18577 2018-02-16  Carl Love  <cel@us.ibm.com>
18579         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18580         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18581         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18582         * config/rs6000/rs6000.c: Remove case statements for
18583         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18584         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18585         and P9V_BUILTIN_VEC_VINSERT4B.
18586         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18587         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18588         * config/rs6000/vsx.md:
18589         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18590         vec_insert4b.
18592 2018-02-16  Carl Love  <cel@us.ibm.com>
18594         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18595         vec_insert4b.
18596         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18597         definitions.
18598         * config/rs6000/rs6000-c.c: Add the definitions for
18599         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18600         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18601         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18602         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18603         definition for insert4b and define insn *insert3b_internal.
18604         * doc/extend.texi: Add documentation for vec_extract4b.
18606 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18608         * doc/extend.texi (Backwards Compatibility): Mention friend
18609         injection.  Note for-scope is deprecated.
18610         * doc/invoke.texi (-ffriend-injection): Deprecate.
18612 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
18614         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18615         that moved to I2, also allow destinations that are a paradoxical
18616         subreg (instead of a normal reg).
18618 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
18620         PR target/83831
18621         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18622         to QImode.
18624 2018-02-16  Richard Biener  <rguenther@suse.de>
18626         PR tree-optimization/84037
18627         PR tree-optimization/84016
18628         PR target/82862
18629         * config/i386/i386.c (ix86_builtin_vectorization_cost):
18630         Adjust vec_construct for the fact we need additional higher latency
18631         128bit inserts for AVX256 and AVX512 vector builds.
18632         (ix86_add_stmt_cost): Scale vector construction cost for
18633         elementwise loads.
18635 2018-02-16  Richard Biener  <rguenther@suse.de>
18637         PR tree-optimization/84417
18638         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18639         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18640         (non_rewritable_lvalue_p): Likewise, use poly-ints.
18642 2018-02-16  Martin Liska  <mliska@suse.cz>
18644         PR sanitizer/84307
18645         * internal-fn.def (ASAN_CHECK): Set proper flags.
18646         (ASAN_MARK): Likewise.
18648 2018-02-16  Julia Koval  <julia.koval@intel.com>
18650         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18651         from PTA_CANNONLAKE.
18653 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18655         PR target/84272
18656         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18657         Use ++iter rather than iter++ for std::list iterators.
18658         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18659         defer deleting them until all nodes in the forest are processed.  Do
18660         free even leaf nodes.  Change to_process into auto_vec.
18662         PR bootstrap/84405
18663         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18664         * vec.h (vec_default_construct): Use memset instead of placement new
18665         if BROKEN_VALUE_INITIALIZATION is defined.
18666         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18667         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18668         is defined.
18670         PR rtl-optimization/83723
18671         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18672         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18673         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18674         recursive calls.
18675         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18676         callers.
18677         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18679 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18681         PR rtl-optimization/81443
18682         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18683         from inner REGs to paradoxical SUBREGs.
18685 2018-02-16  Richard Biener  <rguenther@suse.de>
18687         PR tree-optimization/84399
18688         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18689         For operands we can analyze at their definition make sure we can
18690         analyze them at each use as well.
18692 2018-02-16  Richard Biener  <rguenther@suse.de>
18694         PR tree-optimization/84190
18695         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18696         volatile accesses if the decl isn't volatile.
18698 2018-02-15  Jason Merrill  <jason@redhat.com>
18700         PR c++/84314 - ICE with templates and fastcall attribute.
18701         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18702         TYPE_CANONICAL on an existing type.
18704 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18706         PR tree-optimization/84383
18707         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18708         dstoff nor call operand_equal_p if dstbase is NULL.
18710         PR tree-optimization/84334
18711         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18712         also a CONSTANT_CLASS_P, punt.
18714 2018-02-14  Jim Wilson  <jimw@sifive.com>
18716         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18717         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18718         to where locals are set.  Add TARGET_RVC support.
18719         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18721 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18723         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18725 2018-02-14  Martin Sebor  <msebor@redhat.com>
18727         PR tree-optimization/83698
18728         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18729         arrays constrain the offset range to their bounds.
18730         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18731         (builtin_access::overlap): Avoid setting the size of overlap if it's
18732         already been set.
18733         (maybe_diag_overlap): Also consider arrays when deciding what values
18734         of offsets to include in diagnostics.
18736 2018-02-14  Martin Sebor  <msebor@redhat.com>
18738         PR c/84108
18739         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18740         that correspond to the kind of a declaration.
18742 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18744         PR target/83984
18745         * config/pa/pa.md: Load address of PIC label using the linkage table
18746         if the label is nonlocal.
18748 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18750         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18751         warning message if user requests -maltivec=be.
18752         * doc/invoke.texi: Document deprecation of -maltivec=be.
18754 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18756         PR target/84220
18757         * config/rs6000/rs6000-c.c: Update definitions for
18758         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18759         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18761 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18763         PR target/84239
18764         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18765         add _get_ssp intrinsics. Remove argument from
18766         __builtin_ia32_rdssp[d|q].
18767         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18768         * config/i386/i386-builtin.def: Remove argument from
18769         __builtin_ia32_rdssp[d|q].
18770         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18771         ix86_expand_special_args_builtin for _rdssp[d|q].
18772         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18773         Clear register before usage.
18774         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18775         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18777 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18779         PR tree-optimization/84357
18780         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18781         operand 1 of an ARRAY_REF too.
18783 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18785         PR target/83831
18786         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18787         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18788         declarations.
18789         (set_of_reg): New struct.
18790         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18791         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18792         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18793         functions.
18794         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18795         Split into bitclr, bitset, bitinvert patterns if appropriate.
18796         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18797         use rx_fuse_in_memory_bitop.
18798         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18799         to named insn, correct maximum insn length.
18801 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18803         PR target/79242
18804         * machmode.def: Define a complex mode for PARTIAL_INT.
18805         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18806         MODE_PARTIAL_INT.
18807         * doc/rtl.texi: Document CSPImode.
18808         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18809         handling.
18810         (msp430_hard_regno_nregs_with_padding): Likewise.
18812 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18814         PR target/84279
18815         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18817 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18819         PR rtl-optimization/84169
18820         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18821         we generated a parallel as new i3 and we split that to new i2 and i3
18822         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18823         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18824         those to i2, not i1.  Partially rewrite this scan code.
18826 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18828         PR c/82210
18829         * stor-layout.c (place_field): For variable length fields, adjust
18830         offset_align afterwards not just based on the field's alignment,
18831         but also on the size.
18833         PR middle-end/84309
18834         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18835         of exps and logs in the use_exp2 case.
18837 2018-02-13  Jeff Law  <law@redhat.com>
18839         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18840         entry for "vector".
18842         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18843         ARGS as unused.
18845 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18847         PR debug/84342
18848         PR debug/84319
18849         * common.opt (gas-loc-support, gas-locview-support): New.
18850         (ginline-points, ginternal-reset-location-views): New.
18851         * doc/invoke.texi: Document them.  Use @itemx where intended.
18852         (gvariable-location-views): Adjust.
18853         * target.def (reset_location_view): New.
18854         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18855         (TARGET_RESET_LOCATION_VIEW): New.
18856         * doc/tm.texi: Rebuilt.
18857         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18858         (dwarf2out_default_as_locview_support): New.
18859         (output_asm_line_debug_info): Use option variables.
18860         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18861         (output_loc_list): Likewise.
18862         (add_high_low_attributes): Check option variables.
18863         Don't output entry view attribute in strict mode.
18864         (gen_inlined_subroutine_die): Check option variables.
18865         (dwarf2out_inline_entry): Likewise.
18866         (init_sections_and_labels): Likewise.
18867         (dwarf2out_early_finish): Likewise.
18868         (maybe_reset_location_view): New, from...
18869         (dwarf2out_var_location): ... here.  Call it.
18870         * debug.h (dwarf2out_default_as_loc_support): Declare.
18871         (dwarf2out_default_as_locview_support): Declare.
18872         * hooks.c (hook_int_rtx_insn_0): New.
18873         * hooks.h (hook_int_rtx_insn_0): Declare.
18874         * toplev.c (process_options): Take -gas-loc-support and
18875         -gas-locview-support from dwarf2out.  Enable
18876         -gvariable-location-views by default only with locview
18877         assembler support.  Enable -ginternal-reset-location-views by
18878         default only if the target defines the corresponding hook.
18879         Enable -ginline-points by default if location views are
18880         enabled; force it disabled if statement frontiers are
18881         disabled.
18882         * tree-inline.c (expand_call_inline): Check option variables.
18883         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18885 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18887         PR tree-optimization/84321
18888         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18889         handling.  Also check whether the anti-range contains any values
18890         that satisfy the mask; switch to a VR_RANGE if not.
18892 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18894         PR sanitizer/84340
18895         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18897 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18899         PR c++/83990
18900         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18901         of call statements, also set location of a load to a temporary.
18903 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18905         * config/rl78/rl78.c (add_vector_labels): New function.
18906         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18907         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18908         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18909         which checks that no arguments are passed.
18910         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18911         * doc/extend.texi: Documentation for the new attribute.
18913 2018-02-13  Andreas Schwab  <schwab@suse.de>
18915         * config/riscv/linux.h (CPP_SPEC): Define.
18917 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18919         PR target/84335
18920         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18921         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18922         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18923         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18924         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18925         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18926         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18927         temporarily for AES and PCLMUL builtins.
18929         PR tree-optimization/84339
18930         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18931         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18932         Formatting fixes.
18934         PR middle-end/84309
18935         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18936         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18937         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18938         inline function.
18939         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18940         inline function.
18941         * omp-simd-clone.h: New file.
18942         * omp-simd-clone.c: Include omp-simd-clone.h.
18943         (expand_simd_clones): No longer static.
18944         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18945         cgraph.h and omp-simd-clone.h.
18946         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18947         (vect_recog_widen_shift_pattern): Formatting fix.
18948         (vect_pattern_recog_1): Don't check optab for calls.
18950         PR target/84336
18951         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18952         operands[2] into a REG before using gen_lowpart on it.
18954 2018-02-12  Jeff Law  <law@redhat.com>
18956         PR target/83760
18957         * config/sh/sh.c (find_barrier): Consider a sibling call
18958         a barrier as well.
18960         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18961         successfully back substituting a reg.
18963 2018-02-12  Richard Biener  <rguenther@suse.de>
18965         PR tree-optimization/84037
18966         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18967         parameter, move visited init to caller.
18968         (vect_slp_analyze_operations): Separate cost from validity
18969         check, initialize visited once for all instances.
18970         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18971         for all instances.
18972         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18973         out an assert.
18974         (vect_model_promotion_demotion_cost): Likewise.
18975         (vectorizable_bswap): Guard cost modeling with !slp_node
18976         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18977         SLP stmts.
18978         (vectorizable_call): Likewise.
18979         (vectorizable_conversion): Likewise.
18980         (vectorizable_assignment): Likewise.
18981         (vectorizable_shift): Likewise.
18982         (vectorizable_operation): Likewise.
18983         (vectorizable_store): Likewise.
18984         (vectorizable_load): Likewise.
18985         (vectorizable_condition): Likewise.
18986         (vectorizable_comparison): Likewise.
18988 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18990         PR sanitizer/84307
18991         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18992         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18993         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18995 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18997         PR middle-end/83665
18998         * params.def (inline-min-speedup): Increase from 8 to 15.
18999         (max-inline-insns-auto): Decrease from 40 to 30.
19000         * ipa-split.c (consider_split): Add some buffer for function to
19001         be considered inlining candidate.
19002         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19003         default values.
19005 2018-02-12  Richard Biener  <rguenther@suse.de>
19007         PR tree-optimization/84037
19008         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19009         matched stmts if we cannot swap the non-matched ones.
19011 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19013         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19014         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19015         _mm_maskz_scalef_round_ss): New intrinsics.
19016         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19017         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19018         __builtin_ia32_scalefss_round): Remove.
19019         (__builtin_ia32_scalefsd_mask_round,
19020         __builtin_ia32_scalefss_mask_round): New intrinsics.
19021         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19022         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19023         ((match_operand:VF_128 2 "<round_nimm_predicate>"
19024         "<round_constraint>")): Changed to ...
19025         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19026         "<round_scalar_constraint>")): ... this.
19027         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19028         %0, %1, %2<round_op3>}"): Changed to ...
19029         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19030         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19031         %2<round_scalar_mask_op3>}"): ... this.
19032         * config/i386/subst.md (round_scalar_nimm_predicate): New.
19034 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
19036         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19037         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19038         (_mm_maskz_sqrt_round_ss): New intrinsics.
19039         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19040         (__builtin_ia32_sqrtsd_mask_round)
19041         (__builtin_ia32_sqrtss_mask_round): New builtins.
19042         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19043         (__builtin_ia32_sqrtss_round): Remove.
19044         (__builtin_ia32_sqrtsd_mask_round)
19045         (__builtin_ia32_sqrtss_mask_round): New builtins.
19046         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19047         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19048         ((match_operand:VF_128 1 "vector_operand"
19049         "xBm,<round_constraint>")): Changed to ...
19050         ((match_operand:VF_128 1 "vector_operand"
19051         "xBm,<round_scalar_constraint>")): ... this.
19052         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19053         %0, %2, %<iptr>1<round_op3>}): Changed to ...
19054         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19055         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19056         %<iptr>1<round_scalar_mask_op3>}): ... this.
19057         ((set_attr "prefix" "<round_prefix>")): Changed to ...
19058         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19060 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
19062         PR target/84266
19063         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19064         Cast vec_cmpeq result to correct type.
19065         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19066         Cast vec_cmpgt result to correct type.
19068 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
19070         * final.c (final_scan_insn_1): Renamed from...
19071         (final_scan_insn): ... this.  New wrapper, to recover
19072         seen from the outermost call in recursive ones.
19073         * config/sparc/sparc.c (output_return): Drop seen from call.
19074         (output_sibcall): Likewise.
19075         * config/visium/visium.c (output_branch): Likewise.
19077 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
19079         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19080         function label.
19082 2018-02-10  Alan Modra  <amodra@gmail.com>
19084         PR target/84300
19085         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19086         Specify LR as an input.
19088 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
19090         PR sanitizer/83987
19091         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19092         remove_member_access_dummy_vars): New functions.
19093         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19094         lower_omp_1, execute_lower_omp): Use them.
19096         PR rtl-optimization/84308
19097         * shrink-wrap.c (spread_components): Release todo vector.
19099 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
19101         PR rtl-optimization/57193
19102         * ira-color.c (struct allocno_color_data): Add member
19103         conflict_allocno_hard_prefs.
19104         (update_conflict_allocno_hard_prefs): New.
19105         (bucket_allocno_compare_func): Add a preference based on
19106         conflict_allocno_hard_prefs.
19107         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19108         (color_allocnos): Remove a dead code.  Initiate
19109         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
19111 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19113         PR target/84226
19114         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19115         constraint from =wa to wa.  Avoid a subreg on the output operand,
19116         instead use a pseudo and subreg it in a move.
19117         (p9_xxbrd_<mode>): Changed to ...
19118         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19119         (p9_xxbrd_v2df): New expander.
19120         (p9_xxbrw_<mode>): Changed to ...
19121         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19122         (p9_xxbrw_v4sf): New expander.
19124 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19126         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19128 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
19130         PR target/83926
19131         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19132         multiply in 32-bit mode.
19133         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19134         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19135         mode.
19137 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
19139         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19140         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19141         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19142         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19144 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
19146         PR lto/84213
19147         * dwarf2out.c (is_trivial_indirect_ref): New function.
19148         (dwarf2out_late_global_decl): Do not generate a location
19149         attribute for variables that have a non-trivial DECL_VALUE_EXPR
19150         and that are not defined in the current unit.
19152 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19154         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19155         instead of a libcall for UNORDERED.
19157 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
19159         PR target/82641
19160         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19161         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19163 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19165         PR target/PR84295
19166         * config/s390/s390.c (s390_set_current_function): Invoke
19167         s390_indirect_branch_settings also if fndecl didn't change.
19169 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19171         * config/rs6000/rs6000.md (blockage): Set length to zero.
19173 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
19175         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19177 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
19179         PR sanitizer/84285
19180         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19181         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19182         -static-lib*san.
19184         PR debug/84252
19185         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19186         PARALLEL incoming that failed vt_get_decl_and_offset check.
19188         PR middle-end/84237
19189         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19190         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19191         TREE_READONLY bit.
19192         (get_variable_section): For decls in named .bss* sections pass true as
19193         second argument to bss_initializer_p.
19195 2018-02-09  Marek Polacek  <polacek@redhat.com>
19196             Jakub Jelinek  <jakub@redhat.com>
19198         PR c++/83659
19199         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19200         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
19201         Sync some changes from cxx_fold_indirect_ref.
19203 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
19205         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19206         markers.
19207         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19208         (BLOCK_INLINE_ENTRY_LABEL): New.
19209         (dwarf2out_var_location): Disregard inline entry markers.
19210         (inline_entry_data): New struct.
19211         (inline_entry_data_hasher): New hashtable type.
19212         (inline_entry_data_hasher::hash): New.
19213         (inline_entry_data_hasher::equal): New.
19214         (inline_entry_data_table): New variable.
19215         (add_high_low_attributes): Add DW_AT_entry_pc and
19216         DW_AT_GNU_entry_view attributes if a pending entry is found
19217         in inline_entry_data_table.  Add old entry_pc attribute only
19218         if debug nonbinding markers are disabled.
19219         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19220         markers are enabled.
19221         (block_within_block_p, dwarf2out_inline_entry): New.
19222         (dwarf2out_finish): Check that no entries remained in
19223         inline_entry_data_table.
19224         * final.c (reemit_insn_block_notes): Handle inline entry notes.
19225         (final_scan_insn, notice_source_line): Likewise.
19226         (rest_of_clean_state): Skip inline entry markers.
19227         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19228         markers.
19229         * gimple.c (gimple_build_debug_inline_entry): New.
19230         * gimple.h (enum gimple_debug_subcode): Add
19231         GIMPLE_DEBUG_INLINE_ENTRY.
19232         (gimple_build_debug_inline_entry): Declare.
19233         (gimple_debug_inline_entry_p): New.
19234         (gimple_debug_nonbind_marker_p): Adjust.
19235         * insn-notes.def (INLINE_ENTRY): New.
19236         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19237         inline entry marker notes.
19238         (print_insn): Likewise.
19239         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19240         (INSN_DEBUG_MARKER_KIND): Likewise.
19241         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19242         * tree-inline.c (expand_call_inline): Build and insert
19243         debug_inline_entry stmt.
19244         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19245         inline entry blocks early, if nonbind markers are enabled.
19246         (dump_scope_block): Dump fragment info.
19247         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19248         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19249         (gimple_build_debug_inline_entry): New.
19250         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19251         Enable/disable inline entry points too.
19252         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19253         (DEBUG_INSN): Describe inline entry markers.
19255         * common.opt (gvariable-location-views): New.
19256         (gvariable-location-views=incompat5): New.
19257         * config.in: Rebuilt.
19258         * configure: Rebuilt.
19259         * configure.ac: Test assembler for view support.
19260         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19261         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19262         * dwarf2out.c (var_loc_view): New typedef.
19263         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19264         (dwarf2out_locviews_in_attribute): New.
19265         (dwarf2out_locviews_in_loclist): New.
19266         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19267         (enum dw_line_info_opcode): Add LI_adv_address.
19268         (struct dw_line_info_table): Add view.
19269         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19270         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19271         (zero_view_p): New variable.
19272         (ZERO_VIEW_P): New macro.
19273         (output_asm_line_debug_info): New.
19274         (struct var_loc_node): Add view.
19275         (add_AT_view_list, AT_loc_list): New.
19276         (add_var_loc_to_decl): Add view param.  Test it against last.
19277         (new_loc_list): Add view params.  Record them.
19278         (AT_loc_list_ptr): Handle loc and view lists.
19279         (view_list_to_loc_list_val_node): New.
19280         (print_dw_val): Handle dw_val_class_view_list.
19281         (size_of_die): Likewise.
19282         (value_format): Likewise.
19283         (loc_list_has_views): New.
19284         (gen_llsym): Set vl_symbol too.
19285         (maybe_gen_llsym, skip_loc_list_entry): New.
19286         (dwarf2out_maybe_output_loclist_view_pair): New.
19287         (output_loc_list): Output view list or entries too.
19288         (output_view_list_offset): New.
19289         (output_die): Handle dw_val_class_view_list.
19290         (output_dwarf_version): New.
19291         (output_compilation_unit_header): Use it.
19292         (output_skeleton_debug_sections): Likewise.
19293         (output_rnglists, output_line_info): Likewise.
19294         (output_pubnames, output_aranges): Update version comments.
19295         (output_one_line_info_table): Output view numbers in asm comments.
19296         (dw_loc_list): Determine current endview, pass it to new_loc_list.
19297         Call maybe_gen_llsym.
19298         (loc_list_from_tree_1): Adjust.
19299         (add_AT_location_description): Create view list attribute if
19300         needed, check it's absent otherwise.
19301         (convert_cfa_to_fb_loc_list): Adjust.
19302         (maybe_emit_file): Call output_asm_line_debug_info for test.
19303         (dwarf2out_var_location): Reset views as needed.  Precompute
19304         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19305         attribute.  Set view.
19306         (new_line_info_table): Reset next view.
19307         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19308         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19309         the assembler, or select appropriate line info opcodes.
19310         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19311         (optimize_string_length): Catch it.  Adjust.
19312         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19313         dw_val_class_view_list, and remove it if no longer needed.
19314         (hash_loc_list): Hash view numbers.
19315         (loc_list_hasher::equal): Compare them.
19316         (optimize_location_lists): Check whether a view list symbol is
19317         needed, and whether the locview attribute is present, and
19318         whether they match.  Remove the locview attribute if no longer
19319         needed.
19320         (index_location_lists): Call skip_loc_list_entry for test.
19321         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19322         Use output_dwarf_version.
19323         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19324         (struct dw_val_node): Add val_view_list.
19325         * final.c (SEEN_NEXT_VIEW): New.
19326         (set_next_view_needed): New.
19327         (clear_next_view_needed): New.
19328         (maybe_output_next_view): New.
19329         (final_start_function): Rename to...
19330         (final_start_function_1): ... this.  Take pointer to FIRST,
19331         add SEEN parameter.  Emit param bindings in the initial view.
19332         (final_start_function): Reintroduce SEEN-less interface.
19333         (final): Rename to...
19334         (final_1): ... this.  Take SEEN parameter.  Output final pending
19335         next view at the end.
19336         (final): Reintroduce seen-less interface.
19337         (final_scan_insn): Output pending next view before switching
19338         sections or ending a block.  Mark the next view as needed when
19339         outputting variable locations.  Notify debug backend of section
19340         changes, and of location view changes.
19341         (rest_of_handle_final): Adjust.
19342         * toplev.c (process_options): Autodetect value for debug variable
19343         location views option.  Warn on incompat5 without -gdwarf-5.
19344         * doc/invoke.texi (gvariable-location-views): New.
19345         (gvariable-location-views=incompat5): New.
19346         (gno-variable-location-views): New.
19348 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19350         PR tree-optimization/84136
19351         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19352         that the result of find_edge is non-NULL.
19354 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19356         PR target/83008
19357         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19358         storing integer register in SImode.  Fix cost of 256 and 512
19359         byte aligned SSE register store.
19361 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19363         * config/i386/i386.c (ix86_multiplication_cost): Fix
19364         multiplication cost for TARGET_AVX512DQ.
19366 2018-02-08  Marek Polacek  <polacek@redhat.com>
19368         PR tree-optimization/84238
19369         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19370         get_range_strlen.
19372 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19374         PR tree-optimization/84265
19375         * tree-vect-stmts.c (vectorizable_store): Don't treat
19376         VMAT_CONTIGUOUS accesses as grouped.
19377         (vectorizable_load): Likewise.
19379 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19381         PR tree-optimization/81635
19382         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19383         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19384         (test_round_for_mask): New functions.
19385         (wide_int_cc_tests): Call test_round_for_mask.
19386         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19387         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19388         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19389         range returned by get_range_info.
19391 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19393         PR ipa/81360
19394         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19395         * symtab.c: Include builtins.h
19396         (symtab_node::output_to_lto_symbol_table_p): Move here
19397         from lto-streamer-out.c:output_symbol_p.
19398         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19399         (output_symbol_p): Move all logic to symtab.c
19400         (produce_symtab): Update.
19402 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19404         * config/s390/s390-opts.h (enum indirect_branch): Define.
19405         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19406         (s390_indirect_branch_via_thunk)
19407         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19408         (enum s390_indirect_branch_type): Define.
19409         * config/s390/s390.c (struct s390_frame_layout, struct
19410         machine_function): Remove.
19411         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19412         (indirect_branch_table_label_no, indirect_branch_table_name):
19413         Define variables.
19414         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19415         (enum s390_indirect_branch_option): Define.
19416         (s390_return_addr_from_memory): New function.
19417         (s390_handle_string_attribute): New function.
19418         (s390_attribute_table): Add new attribute handler.
19419         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19420         (s390_indirect_branch_via_thunk): New function.
19421         (s390_indirect_branch_via_inline_thunk): New function.
19422         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19423         sibling call optimization for non z10 compiles.
19424         (s390_emit_call): Force indirect branch target to be a single
19425         register.  Add r1 clobber for non-z10 compiles.
19426         (s390_emit_epilogue): Emit return jump via return_use expander.
19427         (s390_reorg): Handle JUMP_INSNs as execute targets.
19428         (s390_option_override_internal): Perform validity checks for the
19429         new command line options.
19430         (s390_indirect_branch_attrvalue): New function.
19431         (s390_indirect_branch_settings): New function.
19432         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19433         (s390_output_indirect_thunk_function):  New function.
19434         (s390_code_end): Implement target hook.
19435         (s390_case_values_threshold): Implement target hook.
19436         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19437         macros.
19438         * config/s390/s390.h (struct s390_frame_layout)
19439         (struct machine_function): Move here from s390.c.
19440         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19441         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19442         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19443         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19444         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19445         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19446         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19447         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19448         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19449         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19450         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19451         (mnemonic attribute): Add values which aren't recognized
19452         automatically.
19453         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19454         pattern for branch conversion.  Fix mnemonic attribute.
19455         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19456         indirect branch via thunk if requested.
19457         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19458         ("*indirect_jump"): Disable for branch conversion using out of
19459         line thunks.
19460         ("indirect_jump_via_thunk<mode>_z10")
19461         ("indirect_jump_via_thunk<mode>")
19462         ("indirect_jump_via_inlinethunk<mode>_z10")
19463         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19464         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19465         ("casesi_jump_via_inlinethunk<mode>_z10")
19466         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19467         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19468         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19469         ("*indirect2_jump"): Disable for branch conversion.
19470         ("casesi_jump"): Turn into expander and expand patterns for branch
19471         conversion.
19472         ("return_use"): New expander.
19473         ("*return"): Emit return via thunk and rename it to ...
19474         ("*return<mode>"): ... this one.
19475         * config/s390/s390.opt: Add new options and and enum for the
19476         option values.
19478 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19480         * lra-constraints.c (match_reload): Unconditionally use
19481         gen_lowpart_SUBREG, rather than selecting between that
19482         and equivalent gen_rtx_SUBREG code.
19484 2018-02-08  Richard Biener  <rguenther@suse.de>
19486         PR tree-optimization/84233
19487         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19488         changed flag instead of boguously re-using phi_inserted.
19490 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19492         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19493         static local variables.
19495 2018-02-08  Richard Biener  <rguenther@suse.de>
19497         PR tree-optimization/84278
19498         * tree-vect-stmts.c (vectorizable_store): When looking for
19499         smaller vector types to perform grouped strided loads/stores
19500         make sure the mode is supported by the target.
19501         (vectorizable_load): Likewise.
19503 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19505         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19506         Increase LDP/STP opportunities by adding adjacent callee-saves.
19508 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19510         PR rtl-optimization/84068
19511         PR rtl-optimization/83459
19512         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19514 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19516         PR tree-optimization/84224
19517         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19518         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19519         non-zero arguments.
19521 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19523         PR target/84113
19524         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19525         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19526         count, remove one USE.
19528 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19530         * doc/install.texi (Configuration): Document the
19531         --with-long-double-format={ibm,ieee} PowerPC configuration
19532         options.
19534         PR target/84154
19535         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19536         Convert from define_expand to be define_insn_and_split.  Rework
19537         float/double/_Float128 conversions to QI/HI/SImode to work with
19538         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19539         conversions to QI/HImode types did a store and then a load to
19540         truncate the value.  For conversions to VSX registers, don't split
19541         the insn, instead emit the code directly.  Use the code iterator
19542         any_fix to combine signed and unsigned conversions.
19543         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19544         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19545         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19546         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19547         (fix_<mode>di2_hw): Likewise.
19548         (fixuns_<mode>di2_hw): Likewise.
19549         (fix_<mode>si2_hw): Likewise.
19550         (fixuns_<mode>si2_hw): Likewise.
19551         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19552         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19553         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19554         fix<uns>_trunc<SFDF:mode>si2_p8.
19555         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19556         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19557         (fix<uns>_<mode>_mem): Likewise.
19558         (fctiw<u>z_<mode>_mem): Likewise.
19559         (fix<uns>_<mode>_mem): Likewise.
19560         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19561         the register allocator from doing a direct move to the GPRs to do
19562         a store, and instead use the ISA 3.0 store byte/half-word from
19563         vector register instruction.  For IEEE 128-bit floating point,
19564         also optimize stores of 32-bit ints.
19565         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19567 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19569         * genextract.c (push_pathstr_operand): New function to support
19570         [a-zA-Z].
19571         (walk_rtx): Call push_pathstr_operand.
19572         (print_path): Support [a-zA-Z].
19574 2018-02-07  Richard Biener  <rguenther@suse.de>
19576         PR tree-optimization/84037
19577         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19578         (cse_and_gimplify_to_preheader): Declare.
19579         (vect_get_place_in_interleaving_chain): Likewise.
19580         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19581         ivexpr_map.
19582         (_loop_vec_info::~_loop_vec_info): Delete it.
19583         (cse_and_gimplify_to_preheader): New function.
19584         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19585         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19586         (vectorizable_load): Likewise.  For grouped stores always base
19587         the IV on the first element.
19588         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19589         condition before gimplifying.
19591 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19593         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19594         *DIV_EXPR and *MOD_EXPR.
19596 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19598         PR target/84248
19599         * config/i386/i386.c (ix86_option_override_internal): Mask out
19600         the CF_SET bit when checking -fcf-protection.
19602 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19604         PR libgomp/84217
19605         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19606         enough.
19608 2018-02-07  Richard Biener  <rguenther@suse.de>
19610         PR tree-optimization/84204
19611         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19612         this place.
19614         PR tree-optimization/84205
19615         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19616         special-case isl_ast_op_zdiv_r.
19618         PR tree-optimization/84223
19619         * graphite-scop-detection.c (gather_bbs::before_dom_children):
19620         Only add conditions from within the region.
19621         (gather_bbs::after_dom_children): Adjust.
19623 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
19625         PR target/84209
19626         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19627         * config/avr/avr.md: Only post-reload split REG-REG moves if
19628         either register is GENERAL_REG_P.
19630 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19632         PR tree-optimization/84235
19633         * tree-ssa-scopedtables.c
19634         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19635         if the subtraction is performed in floating point type where NaNs are
19636         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19637         build 1.  Formatting fix.
19639 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
19641         PR target/84146
19642         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19643         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19644         and skip it regardless of bb boundaries.  Use CALL_P macro,
19645         don't test INSN_P (insn) together with CALL_P or JUMP_P check
19646         unnecessarily, formatting fix.
19648 2018-02-06  Michael Collison  <michael.collison@arm.com>
19650         * config/arm/thumb2.md:
19651         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19652         (*thumb_mov_notscc): Ditto.
19654 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19656         PR target/84154
19657         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19658         unsigned_fix, not "s".
19660 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19662         * configure.ac (gcc_fn_eh_frame_ro): New function.
19663         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19664         correct .eh_frame permissions.
19665         * configure: Regenerate.
19667 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19669         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19670         irrelevant options.
19672 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19674         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19675         Display warning message for -mno-speculate-indirect-jumps.
19677 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19679         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19680         Undocumented.
19681         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19683 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19685         PR tree-optimization/84225
19686         * tree-eh.c (find_trapping_overflow): Only call
19687         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19689 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19691         PR target/84145
19692         * config/i386/i386.c: Reimplement the check of possible options
19693         -mibt/-mshstk conbination. Change error messages.
19694         * doc/invoke.texi: Fix a typo: remove extra '='.
19696 2018-02-06  Marek Polacek  <polacek@redhat.com>
19698         PR tree-optimization/84228
19699         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19701 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19703         PR target/82641
19704         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19705         emitted arch directives.
19706         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19707         __ARM_FEATURE_COPROC before changing architectures.
19709 2018-02-06  Richard Biener  <rguenther@suse.de>
19711         * config/i386/i386.c (print_reg): Fix typo.
19712         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19714 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19716         * configure: Regenerate.
19718 2018-02-05  Martin Sebor  <msebor@redhat.com>
19720         PR tree-optimization/83369
19721         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19722         inlining context.
19724 2018-02-05  Martin Liska  <mliska@suse.cz>
19726         * doc/invoke.texi: Cherry-pick upstream r323995.
19728 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19730         * ira.c (ira_init_register_move_cost): Adjust comment.
19732 2018-02-05  Martin Liska  <mliska@suse.cz>
19734         PR gcov-profile/84137
19735         * doc/gcov.texi: Fix typo in documentation.
19737 2018-02-05  Martin Liska  <mliska@suse.cz>
19739         PR gcov-profile/83879
19740         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19741         using dlopen functionality.
19743 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19745         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19746         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19747         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19748         _mm_maskz_range_round_ss): New intrinsics.
19749         (__builtin_ia32_rangesd128_round)
19750         (__builtin_ia32_rangess128_round): Remove.
19751         (__builtin_ia32_rangesd128_mask_round,
19752         __builtin_ia32_rangess128_mask_round): New builtins.
19753         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19754         __builtin_ia32_rangess128_round): Remove.
19755         (__builtin_ia32_rangesd128_mask_round,
19756         __builtin_ia32_rangess128_mask_round): New builtins.
19757         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19758         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19759         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19760         "<round_saeonly_constraint>")): Changed to ...
19761         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19762         "<round_saeonly_scalar_constraint>")): ... this.
19763         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19764         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19765         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19766         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19767         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19769 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19771         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19772         options.
19773         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19774         Remove all values except native, 8540 and 8548.
19776 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19778         * config/i386/i386.c (ix86_output_function_return): Pass
19779         INVALID_REGNUM, instead of -1, as invalid register number to
19780         indirect_thunk_name and output_indirect_thunk.
19782 2018-02-02  Julia Koval  <julia.koval@intel.com>
19784         * config.gcc: Add -march=icelake.
19785         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19786         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19787         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19788         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19789         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19790         (processor_target_table): Add icelake.
19791         (ix86_option_override_internal): Handle new PTAs.
19792         (get_builtin_code_for_version): Handle icelake.
19793         (M_INTEL_COREI7_ICELAKE): New.
19794         (fold_builtin_cpu): Handle icelake.
19795         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19796         * doc/invoke.texi: Add -march=icelake.
19798 2018-02-02  Julia Koval  <julia.koval@intel.com>
19800         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19801         to wide_int_bitmask.
19802         * wide-int-bitmask.h: New.
19804 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19806         PR target/84066
19807         * config/i386/i386.md: Replace Pmode with word_mode in
19808         builtin_setjmp_setup and builtin_longjmp to support x32.
19810 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19812         PR target/56010
19813         PR target/83743
19814         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19815         #include "opts.h".
19816         (rs6000_supported_cpu_names): New static variable.
19817         (linux_cpu_translation_table): Likewise.
19818         (elf_platform) <cpu>: Define new static variable and use it.
19819         Translate kernel AT_PLATFORM name to canonical name if needed.
19820         Error if platform name is unknown.
19822 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19824         PR target/84089
19825         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19827 2018-02-01  Jeff Law  <law@redhat.com>
19829         PR target/84128
19830         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19831         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19832         the scratch if RELEASE_VIA_POP is false.
19833         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19834         If we have to save a temporary register, decrement SIZE appropriately.
19835         Pass new arguments to release_scratch_register_on_entry.
19836         (ix86_adjust_stack_and_probe): Likewise.
19837         (ix86_emit_probe_stack_range): Pass new arguments to
19838         release_scratch_register_on_entry.
19840 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19842         PR rtl-optimization/84157
19843         * combine.c (change_zero_ext): Use REG_P predicate in
19844         front of HARD_REGISTER_P predicate.
19846 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19848         * config/avr/avr.c (avr_option_override): Move disabling of
19849         -fdelete-null-pointer-checks to...
19850         * common/config/avr/avr-common.c (avr_option_optimization_table):
19851         ...here.
19853 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19855         PR tree-optimization/81635
19856         * tree-data-ref.c (split_constant_offset_1): For types that
19857         wrap on overflow, try to use range info to prove that wrapping
19858         cannot occur.
19860 2018-02-01  Renlin Li  <renlin.li@arm.com>
19862         PR target/83370
19863         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19864         TAILCALL_ADDR_REGS.
19865         (aarch64_register_move_cost): Likewise.
19866         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19867         TAILCALL_ADDR_REGS.
19868         (REG_CLASS_NAMES): Likewise.
19869         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19870         TAILCALL_ADDR_REGS. Remove IP registers.
19871         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19873 2018-02-01  Richard Biener  <rguenther@suse.de>
19875         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19876         for specifying RPO order and allow NULL for that.
19877         * domwalk.c (dom_walker::dom_walker): Likewise.
19878         (dom_walker::walk): Handle NULL RPO order.
19879         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19880         in RPO order.
19881         (rewrite_update_dom_walker): Likewise.
19882         (mark_def_dom_walker): Likewise.
19884 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19886         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19887         (aarch64_maybe_expand_sve_subreg_move): Declare.
19888         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19889         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19890         predicate.
19891         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19892         that are semantically a reverse operation.
19893         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19894         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19895         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19896         functions.
19897         (aarch64_can_change_mode_class): For big-endian, forbid changes
19898         between two SVE modes if they have different element sizes.
19900 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19902         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19903         the TImode handling for big-endian targets.
19905 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19907         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19908         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19909         not just bytes.
19910         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19911         Remove BSWAP handing for big-endian targets and use the form of
19912         LD1RQ appropariate for the mode.
19914 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19916         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19917         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19918         duplicated element.
19920 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19922         PR tearget/83845
19923         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19924         check for operands that need to go through aarch64_sve_reload_be.
19926 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19928         PR tree-optimization/81661
19929         PR tree-optimization/84117
19930         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19931         * tree-eh.c: Include gimplify.h.
19932         (find_trapping_overflow, replace_trapping_overflow,
19933         rewrite_to_non_trapping_overflow): New functions.
19934         * tree-vect-loop.c: Include tree-eh.h.
19935         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19936         * tree-data-ref.c: Include tree-eh.h.
19937         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19939 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19941         PR rtl-optimization/84123
19942         * combine.c (change_zero_ext): Check if hard register satisfies
19943         can_change_dest_mode before calling gen_lowpart_SUBREG.
19945 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19947         PR target/82444
19948         * ira.c (ira_init_register_move_cost): Remove assert.
19950 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19952         PR rtl-optimization/84071
19953         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19954         * doc/tm.texi: Regenerate.
19956 2018-01-31  Richard Biener  <rguenther@suse.de>
19958         PR tree-optimization/84132
19959         * tree-data-ref.c (analyze_miv_subscript): Properly
19960         check whether evolution_function_is_affine_multivariate_p
19961         before calling gcd_of_steps_may_divide_p.
19963 2018-01-31  Julia Koval  <julia.koval@intel.com>
19965         PR target/83618
19966         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19967         * config/i386/i386.md (rdpid_rex64) New.
19968         (rdpid): Make 32bit only.
19970 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19972         PR lto/84105
19973         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19974         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19976 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19978         Revert
19979         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19981         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19983 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19985         PR rtl-optimization/84071
19986         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19987         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19989 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19991         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19992         (arc_attribute_table): Add 'aux' attribute.
19993         (arc_in_small_data_p): Consider aux like variables.
19994         (arc_is_aux_reg_p): New function.
19995         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19996         (arc_get_aux_arg): New function.
19997         (prepare_move_operands): Handle aux-register access.
19998         (arc_handle_aux_attribute): New function.
19999         * doc/extend.texi (ARC Variable attributes): Add subsection.
20001 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
20003         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20004         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20005         (arc_attribute_table): Add 'uncached' attribute.
20006         (arc_print_operand): Print '.di' flag for uncached memory
20007         accesses.
20008         (arc_in_small_data_p): Do not consider for small data the uncached
20009         types.
20010         (arc_is_uncached_mem_p): New function.
20011         * config/arc/predicates.md (compact_store_memory_operand): Check
20012         for uncached memory accesses.
20013         (nonvol_nonimm_operand): Likewise.
20014         * doc/extend.texi (ARC Type Attribute): New subsection.
20016 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
20018         PR c/84100
20019         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20020         falign-loops=): Add Optimization flag.
20022 2018-01-30  Jeff Law  <law@redhat.com>
20024         PR target/84064
20025         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20026         INT_REGISTERS_SAVED.  Check it prior to calling
20027         get_scratch_register_on_entry.
20028         (ix86_adjust_stack_and_probe): Similarly.
20029         (ix86_emit_probe_stack_range): Similarly.
20030         (ix86_expand_prologue): Corresponding changes.
20032 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20034         PR target/40411
20035         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20036         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20038 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
20040         PR target/84112
20041         * lra-constraints.c (curr_insn_transform): Process AND in the
20042         address.
20044 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
20046         PR rtl-optimization/83986
20047         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20048         dependence against last_pending_memory_flush in addition to
20049         pending_jump_insns.
20051 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
20053         PR tree-optimization/81611
20054         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20055         copies.
20057 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20059         PR target/83758
20060         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20061         a reg rtx.
20063 2018-01-30  Richard Biener  <rguenther@suse.de>
20064             Jakub Jelinek  <jakub@redhat.com>
20066         PR tree-optimization/84111
20067         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20068         inner loops added during recursion, as they don't have up-to-date
20069         SSA form.
20071 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20073         PR ipa/81360
20074         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20075         (can_inline_edge_by_limits_p): ... here.
20076         (can_early_inline_edge_p, check_callers,
20077         update_caller_keys, update_callee_keys, recursive_inlining,
20078         add_new_edges_to_heap, speculation_useful_p,
20079         inline_small_functions,
20080         inline_small_functions, flatten_function,
20081         inline_to_all_callers_1): Update.
20083 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
20085         * profile-count.c (profile_count::combine_with_ipa_count): Handle
20086         zeros correctly.
20088 2018-01-30  Richard Biener  <rguenther@suse.de>
20090         PR tree-optimization/83008
20091         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20092         invariant and constant vector uses in stmts when they need
20093         more than one stmt.
20095 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20097         PR bootstrap/84017
20098         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20099         * configure: Regenerate.
20101 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20103         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20104         pattern.
20105         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20106         Use gen_rtx_REG rather than gen_lowpart.
20108 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20110         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20111         rather than 0 when creating partial subregs.
20113 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
20115         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20116         of usage.
20118 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
20120         PR target/81550
20121         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20122         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20123         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20124         flags.  This restores the settings used before the 2017-07-24.
20125         Turning off pre increment/decrement/modify allows IVOPTS to
20126         optimize DF/SF loops where the index is an int.
20128 2018-01-29  Richard Biener  <rguenther@suse.de>
20129             Kelvin Nilsen  <kelvin@gcc.gnu.org>
20131         PR bootstrap/80867
20132         * tree-vect-stmts.c (vectorizable_call): Don't call
20133         targetm.vectorize_builtin_md_vectorized_function if callee is
20134         NULL.
20136 2018-01-22  Carl Love  <cel@us.ibm.com>
20138         * doc/extend.tex: Fix typo in second arg in
20139         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20141 2018-01-29  Richard Biener  <rguenther@suse.de>
20143         PR tree-optimization/84086
20144         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20145         (flush_ssaname_freelist): When SSA names were released reset
20146         the SCEV hash table.
20148 2018-01-29  Richard Biener  <rguenther@suse.de>
20150         PR tree-optimization/84057
20151         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20152         removed paths when removing edges.
20154 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
20156         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20157         -mfunction-return=@var{choice}.
20159 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20161         PR diagnostic/84034
20162         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20163         Handle CR like TAB.
20164         (layout::print_source_line): Likewise.
20165         (test_get_line_width_without_trailing_whitespace): Add test cases.
20167 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
20169         PR middle-end/84040
20170         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20171         debug insns.
20173 2018-01-26  Jim Wilson  <jimw@sifive.com>
20175         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20177         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20178         specified.
20180 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20182         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20183         and CMP + SUB-immediate -> SUBS.
20185 2018-01-26  Martin Sebor  <msebor@redhat.com>
20187         PR tree-optimization/83896
20188         * tree-ssa-strlen.c (get_string_len): Rename...
20189         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
20190         Avoid assuming length is constant.
20191         (handle_char_store): Use HOST_WIDE_INT for string length.
20193 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
20195         PR target/81763
20196         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20197         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20199 2018-01-26  Richard Biener  <rguenther@suse.de>
20201         PR rtl-optimization/84003
20202         * dse.c (record_store): Only record redundant stores when
20203         the earlier store aliases at least all accesses the later one does.
20205 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
20207         PR rtl-optimization/83985
20208         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20209         REG_CFA_RESTORE insns.
20210         (delete_unmarked_insns): Don't ignore separate shrink wrapping
20211         REG_CFA_RESTORE insns here.
20213         PR c/83989
20214         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20215         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20217 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20219         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20220         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20221         (arc_init): Likewise.
20222         (arc_override_options): Likewise.
20223         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20224         value.
20225         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20226         support.
20227         * config/arc/arc.h (TARGET_DBNZ): Define.
20228         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20229         properly set the tune attribute.
20230         (dbnz): Use TARGET_DBNZ guard.
20231         * config/arc/arc.opt (mtune): Add core3 option.
20233 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20235         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20236         recognize new pic like addresses.
20237         (arc_delegitimize_address): Clean up.
20239 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20241         * config/arc/arc-arches.def: Option mrf16 valid for all
20242         architectures.
20243         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20244         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20245         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20246         * config/arc/arc-tables.opt: Regenerate.
20247         * config/arc/arc.c (arc_conditional_register_usage): Handle
20248         reduced register file case.
20249         (arc_file_start): Set must have build attributes.
20250         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20251         mrf16 option value.
20252         * config/arc/arc.opt (mrf16): Add new option.
20253         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20254         * config/arc/genmultilib.awk: Handle new mrf16 option.
20255         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20256         * config/arc/t-multilib: Regenerate.
20257         * doc/invoke.texi (ARC Options): Document mrf16 option.
20259 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20261         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20262         * config/arc/arc.c (arc_handle_secure_attribute): New function.
20263         (arc_attribute_table): Add 'secure_call' attribute.
20264         (arc_print_operand): Print secure call operand.
20265         (arc_function_ok_for_sibcall): Don't optimize tail calls when
20266         secure.
20267         (arc_is_secure_call_p): New function.  * config/arc/arc.md
20268         (call_i): Add support for sjli instruction.
20269         (call_value_i): Likewise.
20270         * config/arc/constraints.md (Csc): New constraint.
20272 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20273             John Eric Martin  <John.Martin@emmicro-us.com>
20275         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20276         * config/arc/arc.c (_arc_jli_section): New struct.
20277         (arc_jli_section): New type.
20278         (rc_jli_sections): New static variable.
20279         (arc_handle_jli_attribute): New function.
20280         (arc_attribute_table): Add jli_always and jli_fixed attribute.
20281         (arc_file_end): New function.
20282         (TARGET_ASM_FILE_END): Define.
20283         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20284         (arc_add_jli_section): New function.
20285         (jli_call_scan): Likewise.
20286         (arc_reorg): Call jli_call_scan.
20287         (arc_output_addsi): Remove 'S' from printing asm operand.
20288         (arc_is_jli_call_p): New function.
20289         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20290         operand.
20291         (movhi_insn): Likewise.
20292         (movsi_insn): Likewise.
20293         (movsi_set_cc_insn): Likewise.
20294         (loadqi_update): Likewise.
20295         (load_zeroextendqisi_update): Likewise.
20296         (load_signextendqisi_update): Likewise.
20297         (loadhi_update): Likewise.
20298         (load_zeroextendhisi_update): Likewise.
20299         (load_signextendhisi_update): Likewise.
20300         (loadsi_update): Likewise.
20301         (loadsf_update): Likewise.
20302         (movsicc_insn): Likewise.
20303         (bset_insn): Likewise.
20304         (bxor_insn): Likewise.
20305         (bclr_insn): Likewise.
20306         (bmsk_insn): Likewise.
20307         (bicsi3_insn): Likewise.
20308         (cmpsi_cc_c_insn): Likewise.
20309         (movsi_ne): Likewise.
20310         (movsi_cond_exec): Likewise.
20311         (clrsbsi2): Likewise.
20312         (norm_f): Likewise.
20313         (normw): Likewise.
20314         (swap): Likewise.
20315         (divaw): Likewise.
20316         (flag): Likewise.
20317         (sr): Likewise.
20318         (kflag): Likewise.
20319         (ffs): Likewise.
20320         (ffs_f): Likewise.
20321         (fls): Likewise.
20322         (call_i): Remove 'S' asm letter, add jli instruction.
20323         (call_value_i): Likewise.
20324         * config/arc/arc.op (mjli-always): New option.
20325         * config/arc/constraints.md (Cji): New constraint.
20326         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20327         operand.
20328         (subsf3_fpx): Likewise.
20329         (mulsf3_fpx): Likewise.
20330         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20331         asm operand.
20332         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20333         function attrbutes.
20334         * doc/invoke.texi (ARC): Document mjli-always option.
20336 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20338         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20339         avoid addition with 0 and use incw and decw where possible.
20341 2018-01-26  Richard Biener  <rguenther@suse.de>
20343         PR tree-optimization/81082
20344         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20345         association if it requires casting to unsigned.
20346         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20347         from fold_plusminus_mult_expr to catch important cases late when
20348         range info is available.
20350 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20352         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20353         * configure.ac (hidden_linkonce): New test.
20354         * configure: Regenerate.
20355         * config.in: Regenerate.
20357 2018-01-26  Julia Koval  <julia.koval@intel.com>
20359         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20360         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20361         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20362         _mm_mask_bitshuffle_epi64_mask): Fix type.
20363         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20364         USI_FTYPE_V4DI_V4DI_USI): Remove.
20365         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20366         __builtin_ia32_vpshufbitqmb256_mask,
20367         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20368         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20369         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20371 2018-01-26  Alan Modra  <amodra@gmail.com>
20373         PR target/84033
20374         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20375         UNSPEC_VBPERMQ.  Sort other unspecs.
20377 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20379         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20381 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20383         PR middle-end/83055
20384         * predict.c (drop_profile): Do not push/pop cfun; update also
20385         node->count.
20386         (handle_missing_profiles): Fix logic looking for zero profiles.
20388 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20390         PR middle-end/83977
20391         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20392         on functions with #pragma omp declare simd or functions with simd
20393         attribute.
20394         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20395         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20396         Remove trailing \n from warning_at calls.
20398 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20400         PR target/84028
20401         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20402         for neutered workers.
20404 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20406         PR target/68467
20407         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20408         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20410 2018-01-24  Jeff Law  <law@redhat.com>
20412         PR target/83994
20413         * i386.c (get_probe_interval): Move to earlier point.
20414         (ix86_compute_frame_layout): If -fstack-clash-protection and
20415         the frame is larger than the probe interval, then use pushes
20416         to save registers rather than reg->mem moves.
20417         (ix86_expand_prologue): Remove conditional for int_registers_saved
20418         assertion.
20420 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20422         PR target/84014
20423         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20424         min/max for never referenced object.
20426 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20428         PR middle-end/83977
20429         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20430         here.
20431         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20432         attributes from DECL_ATTRIBUTES (decl) without affecting
20433         DECL_ATTRIBUTES (current_function_decl).
20434         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20435         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20437 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20439         PR tree-optimization/83979
20440         * fold-const.c (fold_comparison): Use constant_boolean_node
20441         instead of boolean_{true,false}_node.
20443 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20445         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20446         with zero counts.
20448 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20450         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20451         Simplify the clause that sets the length attribute.
20452         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20453         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20454         clause that sets the length attribute.
20455         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20457 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20459         PR target/83589
20460         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20461         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20462         Add strict parameter.
20463         (prevent_branch_around_nothing): Insert dummy insn between branch to
20464         label and label with no ptx insn inbetween.
20465         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20467 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20469         PR target/81352
20470         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20471         for neutered threads in warp.
20472         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20474 2018-01-24  Richard Biener  <rguenther@suse.de>
20476         PR tree-optimization/83176
20477         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20478         operands.
20480 2018-01-24  Richard Biener  <rguenther@suse.de>
20482         PR tree-optimization/82819
20483         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20484         code generating pluses that are no-ops in the target precision.
20486 2018-01-24  Richard Biener  <rguenther@suse.de>
20488         PR middle-end/84000
20489         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20491 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20493         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20494         to merge probabilities.
20495         * predict.c (probably_never_executed): Also mark as cold functions
20496         with global 0 profile and guessed local profile.
20497         * profile-count.c (profile_probability::combine_with_count): New
20498         member function.
20499         * profile-count.h (profile_probability::operator*,
20500         profile_probability::operator*=, profile_probability::operator/,
20501         profile_probability::operator/=): Reduce precision to adjusted
20502         and set value to guessed on contradictory divisions.
20503         (profile_probability::combine_with_freq): Remove.
20504         (profile_probability::combine_wiht_count): Declare.
20505         (profile_count::force_nonzero):: Set to adjusted.
20506         (profile_count::probability_in):: Set quality to adjusted.
20507         * tree-ssa-tail-merge.c (replace_block_by): Use
20508         combine_with_count.
20510 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20511             Jim Wilson  <jimw@sifive.com>
20513         * config/riscv/riscv.c (riscv_stack_boundary): New.
20514         (riscv_option_override): Set riscv_stack_boundary.  Handle
20515         riscv_preferred_stack_boundary_arg.
20516         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20517         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20518         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20519         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20520         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20521         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20523 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20525         PR target/83905
20526         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20527         of struct ix86_frame.
20528         (ix86_expand_epilogue): Likewise.  Add a local variable for
20529         the reg_save_offset field in struct ix86_frame.
20531 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20533         PR tree-optimization/82604
20534         * tree-loop-distribution.c (enum partition_kind): New enum item
20535         PKIND_PARTIAL_MEMSET.
20536         (partition_builtin_p): Support above new enum item.
20537         (generate_code_for_partition): Ditto.
20538         (compute_access_range): Differentiate cases that equality can be
20539         proven at all loops, the innermost loops or no loops.
20540         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20541         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20542         (finalize_partitions, distribute_loop): Don't fuse partition of
20543         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20544         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20545         parloop is enabled.
20547 2018-01-23  Martin Liska  <mliska@suse.cz>
20549         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20550         order to ignore the predictor.
20551         (PRED_POLYMORPHIC_CALL): Likewise.
20552         (PRED_RECURSIVE_CALL): Likewise.
20554 2018-01-23  Martin Liska  <mliska@suse.cz>
20556         * tree-profile.c (tree_profiling): Print function header to
20557         aware reader which function we are working on.
20558         * value-prof.c (gimple_find_values_to_profile): Do not print
20559         not interesting value histograms.
20561 2018-01-23  Martin Liska  <mliska@suse.cz>
20563         * profile-count.h (enum profile_quality): Add
20564         profile_uninitialized as the first value. Do not number values
20565         as they are zero based.
20566         (profile_count::verify): Update sanity check.
20567         (profile_probability::verify): Likewise.
20569 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20571         * doc/invoke.texi (ffor-scope): Deprecate.
20573 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20575         PR tree-optimization/83510
20576         * domwalk.c (set_all_edges_as_executable): New function.
20577         (dom_walker::dom_walker): Convert bool param
20578         "skip_unreachable_blocks" to enum reachability.  Move setup of
20579         edge flags to set_all_edges_as_executable and only do it when
20580         reachability is REACHABLE_BLOCKS.
20581         * domwalk.h (enum dom_walker::reachability): New enum.
20582         (dom_walker::dom_walker): Convert bool param
20583         "skip_unreachable_blocks" to enum reachability.
20584         (set_all_edges_as_executable): New decl.
20585         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20586         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20587         "reachability".
20588         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20589         but converting true to REACHABLE_BLOCKS.
20590         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20591         * tree-vrp.c
20592         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20593         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20594         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20595         REACHABLE_BLOCKS.
20596         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20597         if check_all_array_refs will be called.
20599 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20601         * tree.c (selftest::test_location_wrappers): Add more test
20602         coverage.
20604 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20606         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20607         (selftest::test_bit_in_range): Likewise.
20609 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20611         PR testsuite/83888
20612         * doc/sourcebuild.texi (vect_float): Say that the selector
20613         only describes the situation when -funsafe-math-optimizations is on.
20614         (vect_float_strict): Document.
20616 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20618         PR tree-optimization/83965
20619         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20620         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20621         instead of checking only for a reduction.
20622         (vect_recog_widen_sum_pattern): Likewise.
20624 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20626         * predict.c (probably_never_executed): Only use precise profile info.
20627         (compute_function_frequency): Skip after inlining hack since we now
20628         have quality checking.
20630 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20632         * profile-count.h (profile_probability::very_unlikely,
20633         profile_probability::unlikely, profile_probability::even): Set
20634         precision to guessed.
20636 2018-01-23  Richard Biener  <rguenther@suse.de>
20638         PR tree-optimization/83963
20639         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20640         Properly terminate dominator walk when crossing the exit edge not
20641         when visiting its source block.
20643 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
20645         PR c++/83918
20646         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20647         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20649 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
20651         PR tree-optimization/83957
20652         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20653         semicolon after for body surrounded by braces.
20655         PR tree-optimization/83081
20656         * profile-count.h (profile_probability::split): New method.
20657         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20658         Use profile_probability::split.
20659         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20660         when splitting a single conditional jump into 2.
20662 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20664         PR tree-optimization/69452
20665         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20666         decl.
20668 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20670         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20671         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20672         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20674 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20676         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20677         declaration.
20678         * config/rl78/rl78.md (movdi): New define_expand.
20679         * config/rl78/rl78.c (rl78_split_movdi): New function.
20681 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20683         PR target/83862
20684         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20685         no longer used.
20686         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20687         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20688         128-bit to produce an UNSPEC move to get the double word with the
20689         signbit and then a shift directly to do signbit.
20690         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20691         implementation with a new version that just does either a direct
20692         move or a regular move.  Move memory interface to separate insns.
20693         Move insns so they are next to the expander.
20694         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20695         with signbit move.  Split big and little endian case.
20696         (signbit<mode>2_dm_mem_le): Likewise.
20697         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20698         (signbit<mode>2_dm2): Likewise.
20700 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20702         * config/rl78/rl78.md (anddi3): New define_expand.
20704 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20706         * config/rl78/rl78.md (umindi3): New define_expand.
20708 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20710         * config/rl78/rl78.md (smindi3): New define_expand.
20712 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20714         * config/rl78/rl78.md (smaxdi3): New define_expand.
20716 2018-01-22  Carl Love  <cel@us.ibm.com>
20718         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20719         LVX_V1TI): Add macro expansion.
20720         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20721         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20722         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20723         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20724         Change check to determine if the instruction is a byte reversing
20725         entry.  Fix typo in comment.
20726         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20727         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20728         Add def_builtin calls for new builtins.
20729         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20730         Add define_insn expansion.
20732 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20734         * config/rl78/rl78.md (umaxdi3): New define_expand.
20736 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20738         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20739         for non-QImode registers.
20741 2018-01-22  Richard Biener  <rguenther@suse.de>
20743         PR tree-optimization/83963
20744         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20745         including the loop exit block.
20746         (scop_detection::merge_sese): Likewise.
20747         (scop_detection::add_scop): Do it here instead.
20749 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20751         * doc/sourcebuild.texi (arm_softfloat): Document.
20753 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20755         PR gcc/77734
20756         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20757         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20758         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20760 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20761             David Edelsohn  <dje.gcc@gmail.com>
20763         PR target/83946
20764         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20765         Change "crset eq" to "crset 2".
20766         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20767         (*call_indirect_aix<mode>_nospec): Likewise.
20768         (*call_value_indirect_aix<mode>_nospec): Likewise.
20769         (*call_indirect_elfv2<mode>_nospec): Likewise.
20770         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20771         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20772         change assembly output from . to $.
20773         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20774         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20775         (*tablejump<mode>_internal1_nospec): Likewise.
20777 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20779         PR target/80870
20780         * config/sh/sh_optimize_sett_clrt.cc:
20781         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20783 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20785         PR tree-optimization/83940
20786         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20787         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20788         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20789         use it to pass back the definition type.
20790         (vect_check_store_rhs): Likewise rhs_dt_out.
20791         (vect_build_gather_load_calls): Add a mask_dt argument and use
20792         it instead of a call to vect_is_simple_use.
20793         (vectorizable_store): Update calls to vect_check_load_store_mask
20794         and vect_check_store_rhs.  Use the dt returned by the latter instead
20795         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20796         instead of calls to vect_is_simple_use.  Pass the scalar rather
20797         than the vector operand to vect_is_simple_use when handling
20798         second and subsequent copies of an rhs value.
20799         (vectorizable_load): Update calls to vect_check_load_store_mask
20800         and vect_build_gather_load_calls.  Use the cached mask_dt and
20801         gs_info.offset_dt instead of calls to vect_is_simple_use.
20803 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20805         PR middle-end/83945
20806         * tree-emutls.c: Include gimplify.h.
20807         (lower_emutls_2): New function.
20808         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20809         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20810         it before further processing.
20812         PR target/83930
20813         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20814         UINTVAL (trueop1) instead of INTVAL (op1).
20816 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20818         PR debug/81570
20819         PR debug/83728
20820         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20821         INCOMING_FRAME_SP_OFFSET if not defined.
20822         (scan_trace): Add ENTRY argument.  If true and
20823         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20824         emit a note to adjust the CFA offset.
20825         (create_cfi_notes): Adjust scan_trace callers.
20826         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20827         INCOMING_FRAME_SP_OFFSET in the CIE.
20828         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20829         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20830         Likewise.
20831         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20832         * doc/tm.texi: Regenerated.
20834 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20836         PR rtl-optimization/83147
20837         * lra-constraints.c (remove_inheritance_pseudos): Use
20838         lra_substitute_pseudo_within_insn.
20840 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20841             Cesar Philippidis  <cesar@codesourcery.com>
20843         PR target/83920
20844         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20846 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20848         PR target/83790
20849         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20850         spaces for function labels.
20852 2018-01-19  Martin Liska  <mliska@suse.cz>
20854         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20855         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20856         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20857         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20858         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20859         (PRED_CONST_RETURN): Change from 69 to 65.
20860         (PRED_NULL_RETURN): Change from 91 to 71.
20861         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20862         (PRED_LOOP_GUARD): Change from 66 to 73.
20864 2018-01-19  Martin Liska  <mliska@suse.cz>
20866         * predict.c (predict_insn_def): Add new assert.
20867         (struct branch_predictor): Change type to signed integer.
20868         (test_prediction_value_range): Amend test to cover
20869         PROB_UNINITIALIZED.
20870         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20871         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20872         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20873         (PRED_LOOP_IV_COMPARE): Likewise.
20874         * predict.h (PROB_UNINITIALIZED): Define new constant.
20876 2018-01-19  Martin Liska  <mliska@suse.cz>
20878         * predict.c (dump_prediction): Add new format for
20879         analyze_brprob.py script which is enabled with -details
20880         suboption.
20881         * profile-count.h (precise_p): New function.
20883 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20885         PR tree-optimization/83922
20886         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20887         there are no statements that need masking.
20888         (vect_active_double_reduction_p): New function.
20889         (vect_analyze_loop_operations): Use it when handling phis that
20890         are not in the loop header.
20892 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20894         PR tree-optimization/83914
20895         * tree-vect-loop.c (vectorizable_induction): Don't convert
20896         init_expr or apply the peeling adjustment for inductions
20897         that are nested within the vectorized loop.
20899 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20901         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20902         instead of NEG.
20904 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20906         PR sanitizer/81715
20907         PR testsuite/83882
20908         * function.h (gimplify_parameters): Add gimple_seq * argument.
20909         * function.c: Include gimple.h and options.h.
20910         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20911         for the added local temporaries if needed.
20912         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20913         if there are any parameter cleanups, wrap whole body into a
20914         try/finally with the cleanups.
20916 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20918         PR target/82964
20919         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20920         Use GET_MODE_CLASS for scalar floating point.
20922 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20924         PR ipa/82256
20925         patch by PaX Team
20926         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20927         Fix call of call_cgraph_insertion_hooks.
20929 2018-01-18  Martin Sebor  <msebor@redhat.com>
20931         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20933 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20935         PR ipa/83619
20936         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20937         frequencies.
20939 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20941         PR other/70268
20942         * common.opt: (-ffile-prefix-map): New option.
20943         * opts.c (common_handle_option): Defer it.
20944         * opts-global.c (handle_common_deferred_options): Handle it.
20945         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20946         * file-prefix-map.h: New file.
20947         (remap_debug_filename, add_debug_prefix_map): ...here.
20948         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20949         * final.c (debug_prefix_map, add_debug_prefix_map
20950         remap_debug_filename): Move to...
20951         * file-prefix-map.c: New file.
20952         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20953         generalize, get rid of alloca(), use strrchr() instead of strchr().
20954         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20955         Implement in terms of add_prefix_map().
20956         (remap_macro_filename, remap_debug_filename): Implement in term of
20957         remap_filename().
20958         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20959         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20960         * dbxout.c: Include file-prefix-map.h.
20961         * varasm.c: Likewise.
20962         * vmsdbgout.c: Likewise.
20963         * xcoffout.c: Likewise.
20964         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20965         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20966         * doc/invoke.texi (-ffile-prefix-map): Document.
20967         (-fdebug-prefix-map): Update description.
20969 2018-01-18  Martin Liska  <mliska@suse.cz>
20971         * config/i386/i386.c (indirect_thunk_name): Document that also
20972         lfence is emitted.
20973         (output_indirect_thunk): Document why both instructions
20974         (pause and lfence) are generated.
20976 2018-01-18  Richard Biener  <rguenther@suse.de>
20978         PR tree-optimization/83887
20979         * graphite-scop-detection.c
20980         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20981         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20982         (scop_detection::merge_sese): Re-implement with a flood-fill
20983         algorithm that properly finds a SESE region if it exists.
20985 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20987         PR c/61240
20988         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20989         pointer_diff optimizations use view_convert instead of convert.
20991 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20993         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20994         Generate different code for -mno-speculate-indirect-jumps.
20995         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20996         (*call_indirect_aix<mode>): Disable for
20997         -mno-speculate-indirect-jumps.
20998         (*call_indirect_aix<mode>_nospec): New define_insn.
20999         (*call_value_indirect_aix<mode>): Disable for
21000         -mno-speculate-indirect-jumps.
21001         (*call_value_indirect_aix<mode>_nospec): New define_insn.
21002         (*sibcall_nonlocal_sysv<mode>): Generate different code for
21003         -mno-speculate-indirect-jumps.
21004         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21006 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21008         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21009         long double type, set the flags for noting the default long double
21010         type, even if we don't pass or return a long double type.
21012 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
21014         PR ipa/83051
21015         * ipa-inline.c (flatten_function): Do not overwrite final inlining
21016         failure.
21018 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
21020         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21021         support for merge[hl].
21022         (fold_mergehl_helper): New helper function.
21023         (tree-vector-builder.h): New #include for tree_vector_builder usage.
21024         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21025         (altivec_vmrglw_direct): Add xxmrglw insn.
21027 2018-01-17  Andrew Waterman  <andrew@sifive.com>
21029         * config/riscv/riscv.c (riscv_conditional_register_usage): If
21030         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21032 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
21034         PR lto/83121
21035         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21036         call the lto_location_cache before reading the
21037         DECL_SOURCE_LOCATION of the types.
21039 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
21040             Richard Sandiford  <richard.sandiford@linaro.org>
21042         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21043         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21044         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21045         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21046         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21047         Add declaration.
21048         * config/aarch64/constraints.md (aarch64_movti_operand):
21049         Limit immediates.
21050         * config/aarch64/predicates.md (Uti): Add new constraint.
21052 2018-01-17  Carl Love  <cel@us.ibm.com>
21054         * config/rs6000/vsx.md (define_expand xl_len_r,
21055         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21056         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21057         lxvll.
21058         (define_expand, define_insn): Move the shift left from  the
21059         define_insn to the define_expand for lxvl and stxvl instructions.
21060         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21061         and XL_LEN_R definitions to PURE.
21063 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
21065         * config/i386/i386.c (indirect_thunk_name): Declare regno
21066         as unsigned int.  Compare regno with INVALID_REGNUM.
21067         (output_indirect_thunk): Ditto.
21068         (output_indirect_thunk_function): Ditto.
21069         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
21070         in the call to output_indirect_thunk_function.
21072 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
21074         PR middle-end/83884
21075         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21076         rather than the size of inner_type to determine the stack slot size
21077         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21079 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
21081         PR target/83546
21082         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21083         to PTA_SILVERMONT.
21085 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
21087         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21088         endian Linux systems to optionally enable multilibs for selecting
21089         the long double type if the user configured an explicit type.
21090         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21091         have no long double multilibs if not defined.
21092         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21093         warn if the user used -mabi={ieee,ibm}longdouble and we built
21094         multilibs for long double.
21095         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21096         appropriate multilib option.
21097         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21098         multilib options.
21099         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21100         for building long double multilibs.
21101         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21103 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
21105         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21106         copies.
21108         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21109         64 bits.
21110         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21111         128 bits.
21113         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21114         variables.
21116         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21117         return value.
21119 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21121         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21122         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21124 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21126         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21127         different rtl trees depending on TARGET_64BIT.
21128         (rs6000_gen_lvx): Likewise.
21130 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
21132         * config/visium/visium.md (nop): Tweak comment.
21133         (hazard_nop): Likewise.
21135 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21137         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21138         -mspeculate-indirect-jumps.
21139         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21140         for -mno-speculate-indirect-jumps.
21141         (*call_indirect_elfv2<mode>_nospec): New define_insn.
21142         (*call_value_indirect_elfv2<mode>): Disable for
21143         -mno-speculate-indirect-jumps.
21144         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21145         (indirect_jump): Emit different RTL for
21146         -mno-speculate-indirect-jumps.
21147         (*indirect_jump<mode>): Disable for
21148         -mno-speculate-indirect-jumps.
21149         (*indirect_jump<mode>_nospec): New define_insn.
21150         (tablejump): Emit different RTL for
21151         -mno-speculate-indirect-jumps.
21152         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21153         (tablejumpsi_nospec): New define_expand.
21154         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21155         (tablejumpdi_nospec): New define_expand.
21156         (*tablejump<mode>_internal1): Disable for
21157         -mno-speculate-indirect-jumps.
21158         (*tablejump<mode>_internal1_nospec): New define_insn.
21159         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21160         option.
21162 2018-01-16  Artyom Skrobov tyomitch@gmail.com
21164         * caller-save.c (insert_save): Drop unnecessary parameter.  All
21165         callers updated.
21167 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21168             Richard Biener  <rguenth@suse.de>
21170         PR libgomp/83590
21171         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21172         return early, inline manually is_gimple_sizepos.  Make sure if we
21173         call gimplify_expr we don't end up with a gimple constant.
21174         * tree.c (variably_modified_type_p): Don't return true for
21175         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
21176         * gimplify.h (is_gimple_sizepos): Remove.
21178 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21180         PR tree-optimization/83857
21181         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21182         vectorizable_live_operation for pure SLP statements.
21183         (vectorizable_live_operation): Handle PHIs.
21185 2018-01-16  Richard Biener  <rguenther@suse.de>
21187         PR tree-optimization/83867
21188         * tree-vect-stmts.c (vect_transform_stmt): Precompute
21189         nested_in_vect_loop_p since the scalar stmt may get invalidated.
21191 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21193         PR c/83844
21194         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21195         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21196         If off is not INTEGER_CST, issue a may not be aligned warning
21197         rather than isn't aligned.  Use isn%'t rather than isn't.
21198         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21199         into MULT_EXPR.
21200         <case MULT_EXPR>: Improve the case when bottom and one of the
21201         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21202         operand, in that case check if the other operand is multiple of
21203         bottom divided by the INTEGER_CST operand.
21205 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21207         PR target/83858
21208         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21209         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21210         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21211         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21212         * config/pa/pa.c (pa_function_arg_advance): Likewise.
21213         (pa_function_arg, pa_arg_partial_bytes): Likewise.
21214         (pa_function_arg_size): New function.
21216 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21218         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21219         in a separate statement.
21221 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
21223         PR tree-optimization/83847
21224         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21225         group gathers and scatters.
21227 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
21229         PR rtl-optimization/86620
21230         * params.def (max-sched-ready-insns): Bump minimum value to 1.
21232         PR rtl-optimization/83213
21233         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21234         to last if both are JUMP_INSNs.
21236         PR tree-optimization/83843
21237         * gimple-ssa-store-merging.c
21238         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21239         store_immediate_info for bswap/nop orig_stores.
21241 2018-01-15  Andrew Waterman  <andrew@sifive.com>
21243         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21244         !TARGET_MUL.
21245         <UDIV>: Increase cost if !TARGET_DIV.
21247 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
21249         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21250         (define_attr "cr_logical_3op"): New.
21251         (cceq_ior_compare): Adjust.
21252         (cceq_ior_compare_complement): Adjust.
21253         (*cceq_rev_compare): Adjust.
21254         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21255         (is_cracked_insn): Adjust.
21256         (insn_must_be_first_in_group): Adjust.
21257         * config/rs6000/40x.md: Adjust.
21258         * config/rs6000/440.md: Adjust.
21259         * config/rs6000/476.md: Adjust.
21260         * config/rs6000/601.md: Adjust.
21261         * config/rs6000/603.md: Adjust.
21262         * config/rs6000/6xx.md: Adjust.
21263         * config/rs6000/7450.md: Adjust.
21264         * config/rs6000/7xx.md: Adjust.
21265         * config/rs6000/8540.md: Adjust.
21266         * config/rs6000/cell.md: Adjust.
21267         * config/rs6000/e300c2c3.md: Adjust.
21268         * config/rs6000/e500mc.md: Adjust.
21269         * config/rs6000/e500mc64.md: Adjust.
21270         * config/rs6000/e5500.md: Adjust.
21271         * config/rs6000/e6500.md: Adjust.
21272         * config/rs6000/mpc.md: Adjust.
21273         * config/rs6000/power4.md: Adjust.
21274         * config/rs6000/power5.md: Adjust.
21275         * config/rs6000/power6.md: Adjust.
21276         * config/rs6000/power7.md: Adjust.
21277         * config/rs6000/power8.md: Adjust.
21278         * config/rs6000/power9.md: Adjust.
21279         * config/rs6000/rs64.md: Adjust.
21280         * config/rs6000/titan.md: Adjust.
21282 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21284         * config/i386/predicates.md (indirect_branch_operand): Rewrite
21285         ix86_indirect_branch_register logic.
21287 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21289         * config/i386/constraints.md (Bs): Update
21290         ix86_indirect_branch_register check.  Don't check
21291         ix86_indirect_branch_register with GOT_memory_operand.
21292         (Bw): Likewise.
21293         * config/i386/predicates.md (GOT_memory_operand): Don't check
21294         ix86_indirect_branch_register here.
21295         (GOT32_symbol_operand): Likewise.
21297 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21299         * config/i386/predicates.md (constant_call_address_operand):
21300         Rewrite ix86_indirect_branch_register logic.
21301         (sibcall_insn_operand): Likewise.
21303 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21305         * config/i386/constraints.md (Bs): Replace
21306         ix86_indirect_branch_thunk_register with
21307         ix86_indirect_branch_register.
21308         (Bw): Likewise.
21309         * config/i386/i386.md (indirect_jump): Likewise.
21310         (tablejump): Likewise.
21311         (*sibcall_memory): Likewise.
21312         (*sibcall_value_memory): Likewise.
21313         Peepholes of indirect call and jump via memory: Likewise.
21314         * config/i386/i386.opt: Likewise.
21315         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21316         (GOT_memory_operand): Likewise.
21317         (call_insn_operand): Likewise.
21318         (sibcall_insn_operand): Likewise.
21319         (GOT32_symbol_operand): Likewise.
21321 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21323         PR middle-end/83837
21324         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21325         type rather than type addr's type points to.
21326         (expand_omp_atomic_mutex): Likewise.
21327         (expand_omp_atomic): Likewise.
21329 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21331         PR target/83839
21332         * config/i386/i386.c (output_indirect_thunk_function): Use
21333         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21334         for  __x86_return_thunk.
21336 2018-01-15  Richard Biener  <rguenther@suse.de>
21338         PR middle-end/83850
21339         * expmed.c (extract_bit_field_1): Fix typo.
21341 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21343         PR target/83687
21344         * config/arm/iterators.md (VF): New mode iterator.
21345         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21346         Remove integer-related logic from pattern.
21347         (neon_vabd<mode>_3): Likewise.
21349 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21351         PR middle-end/82694
21352         * common.opt (fstrict-overflow): No longer an alias.
21353         (fwrapv-pointer): New option.
21354         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21355         also for pointer types based on flag_wrapv_pointer.
21356         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21357         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21358         opts->x_flag_wrapv got set.
21359         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21360         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21361         POINTER_TYPE_OVERFLOW_UNDEFINED.
21362         * match.pd: Likewise in address comparison pattern.
21363         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21365 2018-01-15  Richard Biener  <rguenther@suse.de>
21367         PR lto/83804
21368         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21369         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21370         Reset type names to their identifier if their TYPE_DECL doesn't
21371         have linkage (and thus is used for ODR and devirt).
21372         (save_debug_info_for_decl): Remove.
21373         (save_debug_info_for_type): Likewise.
21374         (add_tree_to_fld_list): Adjust.
21375         * tree-pretty-print.c (dump_generic_node): Make dumping of
21376         type names more robust.
21378 2018-01-15  Richard Biener  <rguenther@suse.de>
21380         * BASE-VER: Bump to 8.0.1.
21382 2018-01-14  Martin Sebor  <msebor@redhat.com>
21384         PR other/83508
21385         * builtins.c (check_access): Avoid warning when the no-warning bit
21386         is set.
21388 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21390         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21391         * ira-color (allocno_hard_regs_compare): Likewise.
21393 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21395         PR target/83013
21396         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21397         Use .pushsection/.popsection.
21399 2018-01-14  Martin Sebor  <msebor@redhat.com>
21401         PR c++/81327
21402         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21404 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21406         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21407         entry from extra_headers.
21408         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21409         extra_headers, make the list bitwise identical to the i?86-*-* one.
21411 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21413         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21414         -mcmodel=large with -mindirect-branch=thunk,
21415         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21416         -mfunction-return=thunk-extern.
21417         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21418         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21419         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21421 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21423         * config/i386/i386.c (print_reg): Print the name of the full
21424         integer register without '%'.
21425         (ix86_print_operand): Handle 'V'.
21426         * doc/extend.texi: Document 'V' modifier.
21428 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21430         * config/i386/constraints.md (Bs): Disallow memory operand for
21431         -mindirect-branch-register.
21432         (Bw): Likewise.
21433         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21434         (GOT_memory_operand): Likewise.
21435         (call_insn_operand): Likewise.
21436         (sibcall_insn_operand): Likewise.
21437         (GOT32_symbol_operand): Likewise.
21438         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21439         for -mindirect-branch-register.
21440         (tablejump): Likewise.
21441         (*sibcall_memory): Likewise.
21442         (*sibcall_value_memory): Likewise.
21443         Disallow peepholes of indirect call and jump via memory for
21444         -mindirect-branch-register.
21445         (*call_pop): Replace m with Bw.
21446         (*call_value_pop): Likewise.
21447         (*sibcall_pop_memory): Replace m with Bs.
21448         * config/i386/i386.opt (mindirect-branch-register): New option.
21449         * doc/invoke.texi: Document -mindirect-branch-register option.
21451 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21453         * config/i386/i386-protos.h (ix86_output_function_return): New.
21454         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21455         set function_return_type.
21456         (indirect_thunk_name): Add ret_p to indicate thunk for function
21457         return.
21458         (output_indirect_thunk_function): Pass false to
21459         indirect_thunk_name.
21460         (ix86_output_indirect_branch_via_reg): Likewise.
21461         (ix86_output_indirect_branch_via_push): Likewise.
21462         (output_indirect_thunk_function): Create alias for function
21463         return thunk if regno < 0.
21464         (ix86_output_function_return): New function.
21465         (ix86_handle_fndecl_attribute): Handle function_return.
21466         (ix86_attribute_table): Add function_return.
21467         * config/i386/i386.h (machine_function): Add
21468         function_return_type.
21469         * config/i386/i386.md (simple_return_internal): Use
21470         ix86_output_function_return.
21471         (simple_return_internal_long): Likewise.
21472         * config/i386/i386.opt (mfunction-return=): New option.
21473         (indirect_branch): Mention -mfunction-return=.
21474         * doc/extend.texi: Document function_return function attribute.
21475         * doc/invoke.texi: Document -mfunction-return= option.
21477 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21479         * config/i386/i386-opts.h (indirect_branch): New.
21480         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21481         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21482         with local indirect jump when converting indirect call and jump.
21483         (ix86_set_indirect_branch_type): New.
21484         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21485         (indirectlabelno): New.
21486         (indirect_thunk_needed): Likewise.
21487         (indirect_thunk_bnd_needed): Likewise.
21488         (indirect_thunks_used): Likewise.
21489         (indirect_thunks_bnd_used): Likewise.
21490         (INDIRECT_LABEL): Likewise.
21491         (indirect_thunk_name): Likewise.
21492         (output_indirect_thunk): Likewise.
21493         (output_indirect_thunk_function): Likewise.
21494         (ix86_output_indirect_branch_via_reg): Likewise.
21495         (ix86_output_indirect_branch_via_push): Likewise.
21496         (ix86_output_indirect_branch): Likewise.
21497         (ix86_output_indirect_jmp): Likewise.
21498         (ix86_code_end): Call output_indirect_thunk_function if needed.
21499         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21500         needed.
21501         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21502         (ix86_attribute_table): Add indirect_branch.
21503         * config/i386/i386.h (machine_function): Add indirect_branch_type
21504         and has_local_indirect_jump.
21505         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21506         to true.
21507         (tablejump): Likewise.
21508         (*indirect_jump): Use ix86_output_indirect_jmp.
21509         (*tablejump_1): Likewise.
21510         (simple_return_indirect_internal): Likewise.
21511         * config/i386/i386.opt (mindirect-branch=): New option.
21512         (indirect_branch): New.
21513         (keep): Likewise.
21514         (thunk): Likewise.
21515         (thunk-inline): Likewise.
21516         (thunk-extern): Likewise.
21517         * doc/extend.texi: Document indirect_branch function attribute.
21518         * doc/invoke.texi: Document -mindirect-branch= option.
21520 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21522         PR ipa/83051
21523         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21525 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21527         * ipa-inline.c (want_inline_small_function_p): Return false if
21528         inlining has already failed with CIF_FINAL_ERROR.
21529         (update_caller_keys): Call want_inline_small_function_p before
21530         can_inline_edge_p.
21531         (update_callee_keys): Likewise.
21533 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21535         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21536         New function.
21537         (rs6000_quadword_masked_address_p): Likewise.
21538         (quad_aligned_load_p): Likewise.
21539         (quad_aligned_store_p): Likewise.
21540         (const_load_sequence_p): Add comment to describe the outer-most loop.
21541         (mimic_memory_attributes_and_flags): New function.
21542         (rs6000_gen_stvx): Likewise.
21543         (replace_swapped_aligned_store): Likewise.
21544         (rs6000_gen_lvx): Likewise.
21545         (replace_swapped_aligned_load): Likewise.
21546         (replace_swapped_load_constant): Capitalize argument name in
21547         comment describing this function.
21548         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21549         and stores that access quad-word aligned addresses and replace
21550         with stvx or lvx instructions when appropriate.
21551         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21552         New function prototype.
21553         (rs6000_quadword_masked_address_p): Likewise.
21554         (rs6000_gen_lvx): Likewise.
21555         (rs6000_gen_stvx): Likewise.
21556         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21557         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21558         when memory address is aligned.
21559         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21560         this split to select lvx instruction when memory address is aligned.
21561         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21562         instruction when memory address is aligned.
21563         (*vsx_le_perm_load_v16qi): Likewise.
21564         (four unnamed splitters): Modify to select the stvx instruction
21565         when memory is aligned.
21567 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21569         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21570         which appears in the queue multiple times.
21572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21573             Alan Hayward  <alan.hayward@arm.com>
21574             David Sherwood  <david.sherwood@arm.com>
21576         * tree-vectorizer.h (vec_lower_bound): New structure.
21577         (_loop_vec_info): Add check_nonzero and lower_bounds.
21578         (LOOP_VINFO_CHECK_NONZERO): New macro.
21579         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21580         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21581         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21582         fields.  Make seg_len the distance travelled, not including the
21583         access size.
21584         (dr_direction_indicator): Declare.
21585         (dr_zero_step_indicator): Likewise.
21586         (dr_known_forward_stride_p): Likewise.
21587         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21588         tree-ssanames.h.
21589         (runtime_alias_check_p): Allow runtime alias checks with
21590         variable strides.
21591         (operator ==): Compare access_size and align.
21592         (prune_runtime_alias_test_list): Rework for new distinction between
21593         the access_size and seg_len.
21594         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21595         segment lengths.
21596         (get_segment_min_max): New function.
21597         (create_intersect_range_checks): Use it.
21598         (dr_step_indicator): New function.
21599         (dr_direction_indicator): Likewise.
21600         (dr_zero_step_indicator): Likewise.
21601         (dr_known_forward_stride_p): Likewise.
21602         * tree-loop-distribution.c (data_ref_segment_size): Return
21603         DR_STEP * (niters - 1).
21604         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21605         constructor.
21606         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21607         (vect_preserves_scalar_order_p): New function, split out from...
21608         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
21609         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21610         (vect_vfa_access_size): New function.
21611         (vect_vfa_align): Likewise.
21612         (vect_compile_time_alias): Take access_size_a and access_b arguments.
21613         (dump_lower_bound): New function.
21614         (vect_check_lower_bound): Likewise.
21615         (vect_small_gap_p): Likewise.
21616         (vectorizable_with_step_bound_p): Likewise.
21617         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21618         depencies if the vectorization factor is 1.  Convert the checks
21619         for nonzero steps into checks on the bounds of DR_STEP.  Try using
21620         a bunds check for variable steps if the minimum required step is
21621         relatively small. Update calls to the dr_with_seg_len
21622         constructor and to vect_compile_time_alias.
21623         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21624         function.
21625         (vect_loop_versioning): Call it.
21626         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21627         when retrying.
21628         (vect_estimate_min_profitable_iters): Account for any bounds checks.
21630 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21631             Alan Hayward  <alan.hayward@arm.com>
21632             David Sherwood  <david.sherwood@arm.com>
21634         * doc/sourcebuild.texi (vect_scatter_store): Document.
21635         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21636         optabs.
21637         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21638         Document.
21639         * genopinit.c (main): Add supports_vec_scatter_store and
21640         supports_vec_scatter_store_cached to target_optabs.
21641         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21642         IFN_MASK_SCATTER_STORE.
21643         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21644         functions.
21645         * internal-fn.h (internal_store_fn_p): Declare.
21646         (internal_fn_stored_value_index): Likewise.
21647         * internal-fn.c (scatter_store_direct): New macro.
21648         (expand_scatter_store_optab_fn): New function.
21649         (direct_scatter_store_optab_supported_p): New macro.
21650         (internal_store_fn_p): New function.
21651         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21652         IFN_MASK_SCATTER_STORE.
21653         (internal_fn_mask_index): Likewise.
21654         (internal_fn_stored_value_index): New function.
21655         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21656         for scatter stores.
21657         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21658         * optabs-query.c (supports_vec_scatter_store_p): New function.
21659         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21660         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21661         true for scatter stores.
21662         (vect_gather_scatter_fn_p): Handle scatter stores too.
21663         (vect_check_gather_scatter): Consider using scatter stores if
21664         supports_vec_scatter_store_p.
21665         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21666         scatter stores too.
21667         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21668         internal_fn_stored_value_index.
21669         (check_load_store_masking): Handle scatter stores too.
21670         (vect_get_store_rhs): Make public.
21671         (vectorizable_call): Use internal_store_fn_p.
21672         (vectorizable_store): Handle scatter store internal functions.
21673         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21674         when deciding whether the end of the group has been reached.
21675         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21676         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21677         (mask_scatter_store<mode>): New insns.
21679 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21680             Alan Hayward  <alan.hayward@arm.com>
21681             David Sherwood  <david.sherwood@arm.com>
21683         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21684         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21685         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21686         function.
21687         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21688         Use vect_truncate_gather_scatter_offset if we can't treat the
21689         operation as a normal gather load or scatter store.
21690         (get_group_load_store_type): Take the gather_scatter_info
21691         as argument.  Try using a gather load or scatter store for
21692         single-element groups.
21693         (get_load_store_type): Update calls to get_group_load_store_type
21694         and vect_use_strided_gather_scatters_p.
21696 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21697             Alan Hayward  <alan.hayward@arm.com>
21698             David Sherwood  <david.sherwood@arm.com>
21700         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21701         optional tree argument.
21702         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21703         null target hooks.
21704         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21705         but continue to use the current value as a fallback.
21706         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21707         to compare the updates.
21708         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21709         (get_load_store_type): Use it when handling a strided access.
21710         (vect_get_strided_load_store_ops): New function.
21711         (vect_get_data_ptr_increment): Likewise.
21712         (vectorizable_load): Handle strided gather loads.  Always pass
21713         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21715 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21716             Alan Hayward  <alan.hayward@arm.com>
21717             David Sherwood  <david.sherwood@arm.com>
21719         * doc/md.texi (gather_load@var{m}): Document.
21720         (mask_gather_load@var{m}): Likewise.
21721         * genopinit.c (main): Add supports_vec_gather_load and
21722         supports_vec_gather_load_cached to target_optabs.
21723         * optabs-tree.c (init_tree_optimization_optabs): Use
21724         ggc_cleared_alloc to allocate target_optabs.
21725         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21726         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21727         functions.
21728         * internal-fn.h (internal_load_fn_p): Declare.
21729         (internal_gather_scatter_fn_p): Likewise.
21730         (internal_fn_mask_index): Likewise.
21731         (internal_gather_scatter_fn_supported_p): Likewise.
21732         * internal-fn.c (gather_load_direct): New macro.
21733         (expand_gather_load_optab_fn): New function.
21734         (direct_gather_load_optab_supported_p): New macro.
21735         (direct_internal_fn_optab): New function.
21736         (internal_load_fn_p): Likewise.
21737         (internal_gather_scatter_fn_p): Likewise.
21738         (internal_fn_mask_index): Likewise.
21739         (internal_gather_scatter_fn_supported_p): Likewise.
21740         * optabs-query.c (supports_at_least_one_mode_p): New function.
21741         (supports_vec_gather_load_p): Likewise.
21742         * optabs-query.h (supports_vec_gather_load_p): Declare.
21743         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21744         and memory_type field.
21745         (NUM_PATTERNS): Bump to 15.
21746         * tree-vect-data-refs.c: Include internal-fn.h.
21747         (vect_gather_scatter_fn_p): New function.
21748         (vect_describe_gather_scatter_call): Likewise.
21749         (vect_check_gather_scatter): Try using internal functions for
21750         gather loads.  Recognize existing calls to a gather load function.
21751         (vect_analyze_data_refs): Consider using gather loads if
21752         supports_vec_gather_load_p.
21753         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21754         (vect_get_gather_scatter_offset_type): Likewise.
21755         (vect_convert_mask_for_vectype): Likewise.
21756         (vect_add_conversion_to_patterm): Likewise.
21757         (vect_try_gather_scatter_pattern): Likewise.
21758         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21759         (vect_vect_recog_func_ptrs): Add it.
21760         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21761         internal_fn_mask_index and internal_gather_scatter_fn_p.
21762         (check_load_store_masking): Take the gather_scatter_info as an
21763         argument and handle gather loads.
21764         (vect_get_gather_scatter_ops): New function.
21765         (vectorizable_call): Check internal_load_fn_p.
21766         (vectorizable_load): Likewise.  Handle gather load internal
21767         functions.
21768         (vectorizable_store): Update call to check_load_store_masking.
21769         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21770         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21771         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21772         (aarch64_gather_scale_operand_d): New predicates.
21773         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21774         (mask_gather_load<mode>): New insns.
21776 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21777             Alan Hayward  <alan.hayward@arm.com>
21778             David Sherwood  <david.sherwood@arm.com>
21780         * optabs.def (fold_left_plus_optab): New optab.
21781         * doc/md.texi (fold_left_plus_@var{m}): Document.
21782         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21783         * internal-fn.c (fold_left_direct): Define.
21784         (expand_fold_left_optab_fn): Likewise.
21785         (direct_fold_left_optab_supported_p): Likewise.
21786         * fold-const-call.c (fold_const_fold_left): New function.
21787         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21788         * tree-parloops.c (valid_reduction_p): New function.
21789         (gather_scalar_reductions): Use it.
21790         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21791         (vect_finish_replace_stmt): Declare.
21792         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21793         (needs_fold_left_reduction_p): New function, split out from...
21794         (vect_is_simple_reduction): ...here.  Accept reductions that
21795         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21796         (vect_force_simple_reduction): Also store the reduction type in
21797         the assignment's STMT_VINFO_REDUC_TYPE.
21798         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21799         (merge_with_identity): New function.
21800         (vect_expand_fold_left): Likewise.
21801         (vectorize_fold_left_reduction): Likewise.
21802         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21803         scalar phi in place for it.  Check for target support and reject
21804         cases that would reassociate the operation.  Defer the transform
21805         phase to vectorize_fold_left_reduction.
21806         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21807         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21808         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21810 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21812         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21813         call to ifc_temp_var.
21815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21816             Alan Hayward  <alan.hayward@arm.com>
21817             David Sherwood  <david.sherwood@arm.com>
21819         * target.def (legitimize_address_displacement): Take the original
21820         offset as a poly_int.
21821         * targhooks.h (default_legitimize_address_displacement): Update
21822         accordingly.
21823         * targhooks.c (default_legitimize_address_displacement): Likewise.
21824         * doc/tm.texi: Regenerate.
21825         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21826         as an argument, moving assert of ad->disp == ad->disp_term to...
21827         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21828         Try calling targetm.legitimize_address_displacement before expanding
21829         the address rather than afterwards, and adjust for the new interface.
21830         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21831         Match the new hook interface.  Handle SVE addresses.
21832         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21833         new hook interface.
21835 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21837         * Makefile.in (OBJS): Add early-remat.o.
21838         * target.def (select_early_remat_modes): New hook.
21839         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21840         * doc/tm.texi: Regenerate.
21841         * targhooks.h (default_select_early_remat_modes): Declare.
21842         * targhooks.c (default_select_early_remat_modes): New function.
21843         * timevar.def (TV_EARLY_REMAT): New timevar.
21844         * passes.def (pass_early_remat): New pass.
21845         * tree-pass.h (make_pass_early_remat): Declare.
21846         * early-remat.c: New file.
21847         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21848         function.
21849         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21851 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21852             Alan Hayward  <alan.hayward@arm.com>
21853             David Sherwood  <david.sherwood@arm.com>
21855         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21856         vfm1 with a bound_epilog parameter.
21857         (vect_do_peeling): Update calls accordingly, and move the prologue
21858         call earlier in the function.  Treat the base bound_epilog as 0 for
21859         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21860         this base when peeling for gaps.
21861         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21862         with fully-masked loops.
21863         (vect_estimate_min_profitable_iters): Handle the single peeled
21864         iteration in that case.
21866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21867             Alan Hayward  <alan.hayward@arm.com>
21868             David Sherwood  <david.sherwood@arm.com>
21870         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21871         single-element interleaving even if the size is not a power of 2.
21872         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21873         accesses for single-element interleaving if the group size is
21874         not a power of 2.
21876 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21877             Alan Hayward  <alan.hayward@arm.com>
21878             David Sherwood  <david.sherwood@arm.com>
21880         * doc/md.texi (fold_extract_last_@var{m}): Document.
21881         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21882         * optabs.def (fold_extract_last_optab): New optab.
21883         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21884         * internal-fn.c (fold_extract_direct): New macro.
21885         (expand_fold_extract_optab_fn): Likewise.
21886         (direct_fold_extract_optab_supported_p): Likewise.
21887         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21888         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21889         EXTRACT_LAST_REDUCTION.
21890         (get_initial_def_for_reduction): Do not create an initial vector
21891         for EXTRACT_LAST_REDUCTION reductions.
21892         (vectorizable_reduction): Leave the scalar phi in place for
21893         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21894         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21895         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21896         transform phase to vectorizable_condition.
21897         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21898         split out from...
21899         (vect_finish_stmt_generation): ...here.
21900         (vect_finish_replace_stmt): New function.
21901         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21902         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21903         pattern.
21904         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21906 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21907             Alan Hayward  <alan.hayward@arm.com>
21908             David Sherwood  <david.sherwood@arm.com>
21910         * doc/md.texi (extract_last_@var{m}): Document.
21911         * optabs.def (extract_last_optab): New optab.
21912         * internal-fn.def (EXTRACT_LAST): New internal function.
21913         * internal-fn.c (cond_unary_direct): New macro.
21914         (expand_cond_unary_optab_fn): Likewise.
21915         (direct_cond_unary_optab_supported_p): Likewise.
21916         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21917         loops using EXTRACT_LAST.
21918         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21919         (extract_last_<mode>): ...this optab.
21920         (vec_extract<mode><Vel>): Update accordingly.
21922 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21923             Alan Hayward  <alan.hayward@arm.com>
21924             David Sherwood  <david.sherwood@arm.com>
21926         * target.def (empty_mask_is_expensive): New hook.
21927         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21928         * doc/tm.texi: Regenerate.
21929         * targhooks.h (default_empty_mask_is_expensive): Declare.
21930         * targhooks.c (default_empty_mask_is_expensive): New function.
21931         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21932         if the target says that empty masks are expensive.
21933         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21934         New function.
21935         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21938             Alan Hayward  <alan.hayward@arm.com>
21939             David Sherwood  <david.sherwood@arm.com>
21941         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21942         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21943         (vect_use_loop_mask_for_alignment_p): New function.
21944         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21945         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21946         niters_skip argument.  Make sure that the first niters_skip elements
21947         of the first iteration are inactive.
21948         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21949         Update call to vect_set_loop_masks_directly.
21950         (get_misalign_in_elems): New function, split out from...
21951         (vect_gen_prolog_loop_niters): ...here.
21952         (vect_update_init_of_dr): Take a code argument that specifies whether
21953         the adjustment should be added or subtracted.
21954         (vect_update_init_of_drs): Likewise.
21955         (vect_prepare_for_masked_peels): New function.
21956         (vect_do_peeling): Skip prologue peeling if we're using a mask
21957         instead.  Update call to vect_update_inits_of_drs.
21958         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21959         mask_skip_niters.
21960         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21961         alignment.  Do not include the number of peeled iterations in
21962         the minimum threshold in that case.
21963         (vectorizable_induction): Adjust the start value down by
21964         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21965         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21966         Take the number of skipped iterations into account when calculating
21967         the loop bounds.
21968         * tree-vect-stmts.c (vect_gen_while_not): New function.
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         * doc/sourcebuild.texi (vect_fully_masked): Document.
21975         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21976         default value to 0.
21977         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21978         split out from...
21979         (vect_analyze_loop_2): ...here. Don't check the vectorization
21980         factor against the number of loop iterations if the loop is
21981         fully-masked.
21983 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21984             Alan Hayward  <alan.hayward@arm.com>
21985             David Sherwood  <david.sherwood@arm.com>
21987         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21988         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21989         (dump_groups): Update accordingly.
21990         (iv_use::mem_type): New member variable.
21991         (address_p): New function.
21992         (record_use): Add a mem_type argument and initialize the new
21993         mem_type field.
21994         (record_group_use): Add a mem_type argument.  Use address_p.
21995         Remove obsolete null checks of base_object.  Update call to record_use.
21996         (find_interesting_uses_op): Update call to record_group_use.
21997         (find_interesting_uses_cond): Likewise.
21998         (find_interesting_uses_address): Likewise.
21999         (get_mem_type_for_internal_fn): New function.
22000         (find_address_like_use): Likewise.
22001         (find_interesting_uses_stmt): Try find_address_like_use before
22002         calling find_interesting_uses_op.
22003         (addr_offset_valid_p): Use the iv mem_type field as the type
22004         of the addressed memory.
22005         (add_autoinc_candidates): Likewise.
22006         (get_address_cost): Likewise.
22007         (split_small_address_groups_p): Use address_p.
22008         (split_address_groups): Likewise.
22009         (add_iv_candidate_for_use): Likewise.
22010         (autoinc_possible_for_pair): Likewise.
22011         (rewrite_groups): Likewise.
22012         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22013         (determine_group_iv_cost): Update after split of USE_ADDRESS.
22014         (get_alias_ptr_type_for_ptr_address): New function.
22015         (rewrite_use_address): Rewrite address uses in calls that were
22016         identified by find_address_like_use.
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         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22023         TARGET_MEM_REFs.
22024         * gimple-expr.h (is_gimple_addressable: Likewise.
22025         * gimple-expr.c (is_gimple_address): Likewise.
22026         * internal-fn.c (expand_call_mem_ref): New function.
22027         (expand_mask_load_optab_fn): Use it.
22028         (expand_mask_store_optab_fn): Likewise.
22030 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22031             Alan Hayward  <alan.hayward@arm.com>
22032             David Sherwood  <david.sherwood@arm.com>
22034         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22035         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22036         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22037         (cond_umax@var{mode}): Document.
22038         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22039         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22040         (cond_umin_optab, cond_umax_optab): New optabs.
22041         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22042         (COND_IOR, COND_XOR): New internal functions.
22043         * internal-fn.h (get_conditional_internal_fn): Declare.
22044         * internal-fn.c (cond_binary_direct): New macro.
22045         (expand_cond_binary_optab_fn): Likewise.
22046         (direct_cond_binary_optab_supported_p): Likewise.
22047         (get_conditional_internal_fn): New function.
22048         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22049         Cope with reduction statements that are vectorized as calls rather
22050         than assignments.
22051         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22052         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22053         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22054         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22055         (UNSPEC_COND_EOR): New unspecs.
22056         (optab): Add mappings for them.
22057         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22058         (sve_int_op, sve_fp_op): New int attributes.
22060 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22061             Alan Hayward  <alan.hayward@arm.com>
22062             David Sherwood  <david.sherwood@arm.com>
22064         * optabs.def (while_ult_optab): New optab.
22065         * doc/md.texi (while_ult@var{m}@var{n}): Document.
22066         * internal-fn.def (WHILE_ULT): New internal function.
22067         * internal-fn.h (direct_internal_fn_supported_p): New override
22068         that takes two types as argument.
22069         * internal-fn.c (while_direct): New macro.
22070         (expand_while_optab_fn): New function.
22071         (convert_optab_supported_p): Likewise.
22072         (direct_while_optab_supported_p): New macro.
22073         * wide-int.h (wi::udiv_ceil): New function.
22074         * tree-vectorizer.h (rgroup_masks): New structure.
22075         (vec_loop_masks): New typedef.
22076         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22077         and fully_masked_p.
22078         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22079         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22080         (vect_max_vf): New function.
22081         (slpeel_make_loop_iterate_ntimes): Delete.
22082         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22083         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22084         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22085         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22086         internal-fn.h, stor-layout.h and optabs-query.h.
22087         (vect_set_loop_mask): New function.
22088         (add_preheader_seq): Likewise.
22089         (add_header_seq): Likewise.
22090         (interleave_supported_p): Likewise.
22091         (vect_maybe_permute_loop_masks): Likewise.
22092         (vect_set_loop_masks_directly): Likewise.
22093         (vect_set_loop_condition_masked): Likewise.
22094         (vect_set_loop_condition_unmasked): New function, split out from
22095         slpeel_make_loop_iterate_ntimes.
22096         (slpeel_make_loop_iterate_ntimes): Rename to..
22097         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
22098         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22099         (vect_do_peeling): Update call accordingly.
22100         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22101         loops.
22102         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22103         mask_compare_type, can_fully_mask_p and fully_masked_p.
22104         (release_vec_loop_masks): New function.
22105         (_loop_vec_info): Use it to free the loop masks.
22106         (can_produce_all_loop_masks_p): New function.
22107         (vect_get_max_nscalars_per_iter): Likewise.
22108         (vect_verify_full_masking): Likewise.
22109         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22110         retries, and free the mask rgroups before retrying.  Check loop-wide
22111         reasons for disallowing fully-masked loops.  Make the final decision
22112         about whether use a fully-masked loop or not.
22113         (vect_estimate_min_profitable_iters): Do not assume that peeling
22114         for the number of iterations will be needed for fully-masked loops.
22115         (vectorizable_reduction): Disable fully-masked loops.
22116         (vectorizable_live_operation): Likewise.
22117         (vect_halve_mask_nunits): New function.
22118         (vect_double_mask_nunits): Likewise.
22119         (vect_record_loop_mask): Likewise.
22120         (vect_get_loop_mask): Likewise.
22121         (vect_transform_loop): Handle the case in which the final loop
22122         iteration might handle a partial vector.  Call vect_set_loop_condition
22123         instead of slpeel_make_loop_iterate_ntimes.
22124         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22125         (check_load_store_masking): New function.
22126         (prepare_load_store_mask): Likewise.
22127         (vectorizable_store): Handle fully-masked loops.
22128         (vectorizable_load): Likewise.
22129         (supportable_widening_operation): Use vect_halve_mask_nunits for
22130         booleans.
22131         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22132         (vect_gen_while): New function.
22133         * config/aarch64/aarch64.md (umax<mode>3): New expander.
22134         (aarch64_uqdec<mode>): New insn.
22136 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22137             Alan Hayward  <alan.hayward@arm.com>
22138             David Sherwood  <david.sherwood@arm.com>
22140         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22141         (reduc_xor_scal_optab): New optabs.
22142         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22143         (reduc_xor_scal_@var{m}): Document.
22144         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22145         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22146         internal functions.
22147         * fold-const-call.c (fold_const_call): Handle them.
22148         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22149         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22150         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22151         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22152         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22153         (UNSPEC_XORV): New unspecs.
22154         (optab): Add entries for them.
22155         (BITWISEV): New int iterator.
22156         (bit_reduc_op): New int attributes.
22158 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22159             Alan Hayward  <alan.hayward@arm.com>
22160             David Sherwood  <david.sherwood@arm.com>
22162         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22163         * internal-fn.def (VEC_SHL_INSERT): New internal function.
22164         * optabs.def (vec_shl_insert_optab): New optab.
22165         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22166         (duplicate_and_interleave): Likewise.
22167         * tree-vect-loop.c: Include internal-fn.h.
22168         (neutral_op_for_slp_reduction): New function, split out from
22169         get_initial_defs_for_reduction.
22170         (get_initial_def_for_reduction): Handle option 2 for variable-length
22171         vectors by loading the neutral value into a vector and then shifting
22172         the initial value into element 0.
22173         (get_initial_defs_for_reduction): Replace the code argument with
22174         the neutral value calculated by neutral_op_for_slp_reduction.
22175         Use gimple_build_vector for constant-length vectors.
22176         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22177         but the first group_size elements have a neutral value.
22178         Use duplicate_and_interleave otherwise.
22179         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22180         Update call to get_initial_defs_for_reduction.  Handle SLP
22181         reductions for variable-length vectors by creating one vector
22182         result for each scalar result, with the elements associated
22183         with other scalar results stubbed out with the neutral value.
22184         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22185         Require IFN_VEC_SHL_INSERT for double reductions on
22186         variable-length vectors, or SLP reductions that have
22187         a neutral value.  Require can_duplicate_and_interleave_p
22188         support for variable-length unchained SLP reductions if there
22189         is no neutral value, such as for MIN/MAX reductions.  Also require
22190         the number of vector elements to be a multiple of the number of
22191         SLP statements when doing variable-length unchained SLP reductions.
22192         Update call to vect_create_epilog_for_reduction.
22193         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22194         and remove initial values.
22195         (duplicate_and_interleave): Make public.
22196         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22197         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22199 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22200             Alan Hayward  <alan.hayward@arm.com>
22201             David Sherwood  <david.sherwood@arm.com>
22203         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22204         (can_duplicate_and_interleave_p): New function.
22205         (vect_get_and_check_slp_defs): Take the vector of statements
22206         rather than just the current one.  Remove excess parentheses.
22207         Restriction rejectinon of vect_constant_def and vect_external_def
22208         for variable-length vectors to boolean types, or types for which
22209         can_duplicate_and_interleave_p is false.
22210         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22211         (duplicate_and_interleave): New function.
22212         (vect_get_constant_vectors): Use gimple_build_vector for
22213         constant-length vectors and suitable variable-length constant
22214         vectors.  Use duplicate_and_interleave for other variable-length
22215         vectors.  Don't defer the update when inserting new statements.
22217 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22218             Alan Hayward  <alan.hayward@arm.com>
22219             David Sherwood  <david.sherwood@arm.com>
22221         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22222         min_profitable_iters doesn't go negative.
22224 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22225             Alan Hayward  <alan.hayward@arm.com>
22226             David Sherwood  <david.sherwood@arm.com>
22228         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22229         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22230         * optabs.def (vec_mask_load_lanes_optab): New optab.
22231         (vec_mask_store_lanes_optab): Likewise.
22232         * internal-fn.def (MASK_LOAD_LANES): New internal function.
22233         (MASK_STORE_LANES): Likewise.
22234         * internal-fn.c (mask_load_lanes_direct): New macro.
22235         (mask_store_lanes_direct): Likewise.
22236         (expand_mask_load_optab_fn): Handle masked operations.
22237         (expand_mask_load_lanes_optab_fn): New macro.
22238         (expand_mask_store_optab_fn): Handle masked operations.
22239         (expand_mask_store_lanes_optab_fn): New macro.
22240         (direct_mask_load_lanes_optab_supported_p): Likewise.
22241         (direct_mask_store_lanes_optab_supported_p): Likewise.
22242         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22243         parameter.
22244         (vect_load_lanes_supported): Likewise.
22245         * tree-vect-data-refs.c (strip_conversion): New function.
22246         (can_group_stmts_p): Likewise.
22247         (vect_analyze_data_ref_accesses): Use it instead of checking
22248         for a pair of assignments.
22249         (vect_store_lanes_supported): Take a masked_p parameter.
22250         (vect_load_lanes_supported): Likewise.
22251         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22252         vect_store_lanes_supported and vect_load_lanes_supported.
22253         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22254         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22255         parameter.  Don't allow gaps for masked accesses.
22256         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
22257         and vect_load_lanes_supported.
22258         (get_load_store_type): Take a masked_p parameter and update
22259         call to get_group_load_store_type.
22260         (vectorizable_store): Update call to get_load_store_type.
22261         Handle IFN_MASK_STORE_LANES.
22262         (vectorizable_load): Update call to get_load_store_type.
22263         Handle IFN_MASK_LOAD_LANES.
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         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22270         modes for SVE.
22271         * config/aarch64/aarch64-protos.h
22272         (aarch64_sve_struct_memory_operand_p): Declare.
22273         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22274         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22275         (VPRED, vpred): Handle SVE structure modes.
22276         * config/aarch64/constraints.md (Utx): New constraint.
22277         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22278         (aarch64_sve_struct_nonimmediate_operand): New predicates.
22279         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22280         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22281         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22282         structure modes.  Split into pieces after RA.
22283         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22284         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22285         New patterns.
22286         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22287         SVE structure modes.
22288         (aarch64_classify_address): Likewise.
22289         (sizetochar): Move earlier in file.
22290         (aarch64_print_operand): Handle SVE register lists.
22291         (aarch64_array_mode): New function.
22292         (aarch64_sve_struct_memory_operand_p): Likewise.
22293         (TARGET_ARRAY_MODE): Redefine.
22295 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22296             Alan Hayward  <alan.hayward@arm.com>
22297             David Sherwood  <david.sherwood@arm.com>
22299         * target.def (array_mode): New target hook.
22300         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22301         * doc/tm.texi: Regenerate.
22302         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22303         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22304         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22305         targetm.array_mode.
22306         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22307         type sizes.
22309 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22310             Alan Hayward  <alan.hayward@arm.com>
22311             David Sherwood  <david.sherwood@arm.com>
22313         * fold-const.c (fold_binary_loc): Check the argument types
22314         rather than the result type when testing for a vector operation.
22316 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22318         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22319         * doc/tm.texi: Regenerate.
22321 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22322             Alan Hayward  <alan.hayward@arm.com>
22323             David Sherwood  <david.sherwood@arm.com>
22325         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22326         (sve): Document new AArch64 extension.
22327         * doc/md.texi (w): Extend the description of the AArch64
22328         constraint to include SVE vectors.
22329         (Upl, Upa): Document new AArch64 predicate constraints.
22330         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22331         enum.
22332         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22333         (msve-vector-bits=): New option.
22334         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22335         SVE when these are disabled.
22336         (sve): New extension.
22337         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22338         modes.  Adjust their number of units based on aarch64_sve_vg.
22339         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22340         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22341         aarch64_addr_query_type.
22342         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22343         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22344         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22345         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22346         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22347         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22348         (aarch64_simd_imm_zero_p): Delete.
22349         (aarch64_check_zero_based_sve_index_immediate): Declare.
22350         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22351         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22352         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22353         (aarch64_sve_float_mul_immediate_p): Likewise.
22354         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22355         rather than an rtx.
22356         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22357         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22358         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22359         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22360         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22361         (aarch64_regmode_natural_size): Likewise.
22362         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22363         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22364         left one place.
22365         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22366         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22367         for VG and the SVE predicate registers.
22368         (V_ALIASES): Add a "z"-prefixed alias.
22369         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22370         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22371         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22372         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22373         (REG_CLASS_NAMES): Add entries for them.
22374         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22375         and the predicate registers.
22376         (aarch64_sve_vg): Declare.
22377         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22378         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22379         (REGMODE_NATURAL_SIZE): Define.
22380         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22381         SVE macros.
22382         * config/aarch64/aarch64.c: Include cfgrtl.h.
22383         (simd_immediate_info): Add a constructor for series vectors,
22384         and an associated step field.
22385         (aarch64_sve_vg): New variable.
22386         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22387         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22388         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22389         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22390         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22391         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22392         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22393         (aarch64_get_mask_mode): New functions.
22394         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22395         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22396         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22397         predicate modes and predicate registers.  Explicitly restrict
22398         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22399         to store a vector mode if it is recognized by
22400         aarch64_classify_vector_mode.
22401         (aarch64_regmode_natural_size): New function.
22402         (aarch64_hard_regno_caller_save_mode): Return the original mode
22403         for predicates.
22404         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22405         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22406         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22407         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22408         functions.
22409         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22410         does not overlap dest if the function is frame-related.  Handle
22411         SVE constants.
22412         (aarch64_split_add_offset): New function.
22413         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22414         them aarch64_add_offset.
22415         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22416         and update call to aarch64_sub_sp.
22417         (aarch64_add_cfa_expression): New function.
22418         (aarch64_expand_prologue): Pass extra temporary registers to the
22419         functions above.  Handle the case in which we need to emit new
22420         DW_CFA_expressions for registers that were originally saved
22421         relative to the stack pointer, but now have to be expressed
22422         relative to the frame pointer.
22423         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22424         functions above.
22425         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22426         IP0 and IP1 values for SVE frames.
22427         (aarch64_expand_vec_series): New function.
22428         (aarch64_expand_sve_widened_duplicate): Likewise.
22429         (aarch64_expand_sve_const_vector): Likewise.
22430         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22431         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22432         into the register, rather than emitting a SET directly.
22433         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22434         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22435         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22436         (offset_9bit_signed_scaled_p): New functions.
22437         (aarch64_replicate_bitmask_imm): New function.
22438         (aarch64_bitmask_imm): Use it.
22439         (aarch64_cannot_force_const_mem): Reject expressions involving
22440         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22441         (aarch64_classify_index): Handle SVE indices, by requiring
22442         a plain register index with a scale that matches the element size.
22443         (aarch64_classify_address): Handle SVE addresses.  Assert that
22444         the mode of the address is VOIDmode or an integer mode.
22445         Update call to aarch64_classify_symbol.
22446         (aarch64_classify_symbolic_expression): Update call to
22447         aarch64_classify_symbol.
22448         (aarch64_const_vec_all_in_range_p): New function.
22449         (aarch64_print_vector_float_operand): Likewise.
22450         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22451         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22452         and the FP immediates 1.0 and 0.5.
22453         (aarch64_print_address_internal): Handle SVE addresses.
22454         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22455         (aarch64_regno_regclass): Handle predicate registers.
22456         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22457         data modes.
22458         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22459         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22460         (aarch64_convert_sve_vector_bits): New function.
22461         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22462         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22463         rather than an rtx.
22464         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22465         Handle SVE vector and predicate modes.  Accept VL-based constants
22466         that need only one temporary register, and VL offsets that require
22467         no temporary registers.
22468         (aarch64_conditional_register_usage): Mark the predicate registers
22469         as fixed if SVE isn't available.
22470         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22471         Return true for SVE vector and predicate modes.
22472         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22473         rather than an unsigned int.  Handle SVE modes.
22474         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22475         SVE modes.
22476         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22477         if SVE is enabled.
22478         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22479         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22480         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22481         (aarch64_sve_float_mul_immediate_p): New functions.
22482         (aarch64_sve_valid_immediate): New function.
22483         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22484         Explicitly reject structure modes.  Check for INDEX constants.
22485         Handle PTRUE and PFALSE constants.
22486         (aarch64_check_zero_based_sve_index_immediate): New function.
22487         (aarch64_simd_imm_zero_p): Delete.
22488         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22489         vector modes.  Accept constants in the range of CNT[BHWD].
22490         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22491         ask for an Advanced SIMD mode.
22492         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22493         (aarch64_simd_vector_alignment): Handle SVE predicates.
22494         (aarch64_vectorize_preferred_vector_alignment): New function.
22495         (aarch64_simd_vector_alignment_reachable): Use it instead of
22496         the vector size.
22497         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22498         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22499         functions.
22500         (MAX_VECT_LEN): Delete.
22501         (expand_vec_perm_d): Add a vec_flags field.
22502         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22503         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22504         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22505         for SVE modes.
22506         (aarch64_evpc_rev): Rename to...
22507         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22508         (aarch64_evpc_rev_global): New function.
22509         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22510         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22511         MAX_VECT_LEN.
22512         (aarch64_evpc_sve_tbl): New function.
22513         (aarch64_expand_vec_perm_const_1): Update after rename of
22514         aarch64_evpc_rev.  Handle SVE permutes too, trying
22515         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22516         than aarch64_evpc_tbl.
22517         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22518         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22519         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22520         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22521         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22522         (aarch64_expand_sve_vcond): New functions.
22523         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22524         of aarch64_vector_mode_p.
22525         (aarch64_dwarf_poly_indeterminate_value): New function.
22526         (aarch64_compute_pressure_classes): Likewise.
22527         (aarch64_can_change_mode_class): Likewise.
22528         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22529         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22530         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22531         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22532         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22533         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22534         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22535         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22536         constraints.
22537         (Dn, Dl, Dr): Accept const as well as const_vector.
22538         (Dz): Likewise.  Compare against CONST0_RTX.
22539         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22540         of "vector" where appropriate.
22541         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22542         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22543         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22544         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22545         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22546         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22547         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22548         (v_int_equiv): Extend to SVE modes.
22549         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22550         mode attributes.
22551         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22552         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22553         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22554         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22555         (SVE_COND_FP_CMP): New int iterators.
22556         (perm_hilo): Handle the new unpack unspecs.
22557         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22558         attributes.
22559         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22560         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22561         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22562         (aarch64_equality_operator, aarch64_constant_vector_operand)
22563         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22564         (aarch64_sve_nonimmediate_operand): Likewise.
22565         (aarch64_sve_general_operand): Likewise.
22566         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22567         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22568         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22569         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22570         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22571         (aarch64_sve_float_arith_immediate): Likewise.
22572         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22573         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22574         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22575         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22576         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22577         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22578         (aarch64_sve_float_arith_operand): Likewise.
22579         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22580         (aarch64_sve_float_mul_operand): Likewise.
22581         (aarch64_sve_vec_perm_operand): Likewise.
22582         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22583         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22584         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22585         as well as const_vector.
22586         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22587         in file.  Use CONST0_RTX and CONSTM1_RTX.
22588         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22589         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22590         Use aarch64_simd_imm_zero.
22591         * config/aarch64/aarch64-sve.md: New file.
22592         * config/aarch64/aarch64.md: Include it.
22593         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22594         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22595         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22596         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22597         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22598         (sve): New attribute.
22599         (enabled): Disable instructions with the sve attribute unless
22600         TARGET_SVE.
22601         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22602         aarch64_expand_mov_immediate.
22603         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22604         CNT[BHSD] immediates.
22605         (movti): Split CONST_POLY_INT moves into two halves.
22606         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22607         Split additions that need a temporary here if the destination
22608         is the stack pointer.
22609         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22610         (*add<mode>3_poly_1): New instruction.
22611         (set_clobber_cc): New expander.
22613 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22615         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22616         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
22617         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22618         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22619         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
22620         Change innermode from fixed_mode_size to machine_mode.
22621         (simplify_subreg): Update call accordingly.  Handle a constant-sized
22622         subreg of a variable-length CONST_VECTOR.
22624 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22625             Alan Hayward  <alan.hayward@arm.com>
22626             David Sherwood  <david.sherwood@arm.com>
22628         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22629         (add_offset_to_base): New function, split out from...
22630         (create_mem_ref): ...here.  When handling a scale other than 1,
22631         check first whether the address is valid without the offset.
22632         Add it into the base if so, leaving the index and scale as-is.
22634 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22636         PR c++/83778
22637         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22638         fold_for_warn before checking if arg2 is INTEGER_CST.
22640 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
22642         * config/rs6000/predicates.md (load_multiple_operation): Delete.
22643         (store_multiple_operation): Delete.
22644         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22645         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22646         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22647         guarded by TARGET_STRING.
22648         (rs6000_output_load_multiple): Delete.
22649         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22650         OPTION_MASK_STRING / TARGET_STRING handling.
22651         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22652         (const rs6000_opt_masks) <"string">: Change mask to 0.
22653         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22654         (MASK_STRING): Delete.
22655         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22656         parts.  Simplify.
22657         (load_multiple): Delete.
22658         (*ldmsi8): Delete.
22659         (*ldmsi7): Delete.
22660         (*ldmsi6): Delete.
22661         (*ldmsi5): Delete.
22662         (*ldmsi4): Delete.
22663         (*ldmsi3): Delete.
22664         (store_multiple): Delete.
22665         (*stmsi8): Delete.
22666         (*stmsi7): Delete.
22667         (*stmsi6): Delete.
22668         (*stmsi5): Delete.
22669         (*stmsi4): Delete.
22670         (*stmsi3): Delete.
22671         (movmemsi_8reg): Delete.
22672         (corresponding unnamed define_insn): Delete.
22673         (movmemsi_6reg): Delete.
22674         (corresponding unnamed define_insn): Delete.
22675         (movmemsi_4reg): Delete.
22676         (corresponding unnamed define_insn): Delete.
22677         (movmemsi_2reg): Delete.
22678         (corresponding unnamed define_insn): Delete.
22679         (movmemsi_1reg): Delete.
22680         (corresponding unnamed define_insn): Delete.
22681         * config/rs6000/rs6000.opt (mno-string): New.
22682         (mstring): Replace by deprecation warning stub.
22683         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22685 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22687         * regrename.c (regrename_do_replace): If replacing the same
22688         reg multiple times, try to reuse last created gen_raw_REG.
22690         PR debug/81155
22691         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22692         main to workaround a bug in GDB.
22694 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22696         PR target/83737
22697         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22699 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22701         PR rtl-optimization/80481
22702         * ira-color.c (get_cap_member): New function.
22703         (allocnos_conflict_by_live_ranges_p): Use it.
22704         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22705         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22707 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22709         PR target/83628
22710         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22711         (*saddl_se_1): Ditto.
22712         (*ssubsi_1): Ditto.
22713         (*ssubl_se_1): Ditto.
22715 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22717         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22718         rather than wi::to_widest for DR_INITs.
22719         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22720         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22721         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22722         INTEGER_CSTs.
22723         (vect_analyze_group_access_1): Note that here.
22725 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22727         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22728         polynomial type sizes.
22730 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22732         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22733         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22734         (gimple_add_tmp_var): Likewise.
22736 2018-01-12  Martin Liska  <mliska@suse.cz>
22738         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22739         (gimple_alloc_sizes): Likewise.
22740         (dump_gimple_statistics): Use PRIu64 in printf format.
22741         * gimple.h: Change uint64_t to int.
22743 2018-01-12  Martin Liska  <mliska@suse.cz>
22745         * tree-core.h: Use uint64_t instead of int.
22746         * tree.c (tree_node_counts): Likewise.
22747         (tree_node_sizes): Likewise.
22748         (dump_tree_statistics): Use PRIu64 in printf format.
22750 2018-01-12  Martin Liska  <mliska@suse.cz>
22752         * Makefile.in: As qsort_chk is implemented in vec.c, add
22753         vec.o to linkage of gencfn-macros.
22754         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22755         passing the info to record_node_allocation_statistics.
22756         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22757         and pass the info.
22758         * ggc-common.c (struct ggc_usage): Add operator== and use
22759         it in operator< and compare function.
22760         * mem-stats.h (struct mem_usage): Likewise.
22761         * vec.c (struct vec_usage): Remove operator< and compare
22762         function. Can be simply inherited.
22764 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22766         PR target/81616
22767         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22768         * tree-ssa-math-opts.c: Include domwalk.h.
22769         (convert_mult_to_fma_1): New function.
22770         (fma_transformation_info): New type.
22771         (fma_deferring_state): Likewise.
22772         (cancel_fma_deferring): New function.
22773         (result_of_phi): Likewise.
22774         (last_fma_candidate_feeds_initial_phi): Likewise.
22775         (convert_mult_to_fma): Added deferring logic, split actual
22776         transformation to convert_mult_to_fma_1.
22777         (math_opts_dom_walker): New type.
22778         (math_opts_dom_walker::after_dom_children): New method, body moved
22779         here from pass_optimize_widening_mul::execute, added deferring logic
22780         bits.
22781         (pass_optimize_widening_mul::execute): Moved most of code to
22782         math_opts_dom_walker::after_dom_children.
22783         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22784         * config/i386/i386.c (ix86_option_override_internal): Added
22785         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22787 2018-01-12  Richard Biener  <rguenther@suse.de>
22789         PR debug/83157
22790         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22791         inline instance vars.
22793 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22795         PR target/81819
22796         * config/rx/rx.c (rx_is_restricted_memory_address):
22797         Handle SUBREG case.
22799 2018-01-12  Richard Biener  <rguenther@suse.de>
22801         PR tree-optimization/80846
22802         * target.def (split_reduction): New target hook.
22803         * targhooks.c (default_split_reduction): New function.
22804         * targhooks.h (default_split_reduction): Declare.
22805         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22806         target requests first reduce vectors by combining low and high
22807         parts.
22808         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22809         (get_vectype_for_scalar_type_and_size): Export.
22810         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22811         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22812         * doc/tm.texi: Regenerate.
22813         * config/i386/i386.c (ix86_split_reduction): Implement
22814         TARGET_VECTORIZE_SPLIT_REDUCTION.
22816 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22818         PR target/83368
22819         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22820         in PIC mode except for TARGET_VXWORKS_RTP.
22821         * config/sparc/sparc.c: Include cfgrtl.h.
22822         (TARGET_INIT_PIC_REG): Define.
22823         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22824         (sparc_pic_register_p): New predicate.
22825         (sparc_legitimate_address_p): Use it.
22826         (sparc_legitimize_pic_address): Likewise.
22827         (sparc_delegitimize_address): Likewise.
22828         (sparc_mode_dependent_address_p): Likewise.
22829         (gen_load_pcrel_sym): Remove 4th parameter.
22830         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22831         (sparc_expand_prologue): Do not call load_got_register here.
22832         (sparc_flat_expand_prologue): Likewise.
22833         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22834         (sparc_use_pseudo_pic_reg): New function.
22835         (sparc_init_pic_reg): Likewise.
22836         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22837         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22839 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22841         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22842         Add item for branch_cost.
22844 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22846         PR rtl-optimization/83565
22847         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22848         not extend the result to a larger mode for rotate operations.
22849         (num_sign_bit_copies1): Likewise.
22851 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22853         PR target/40411
22854         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22855         -symbolic.
22856         Use values-Xc.o for -pedantic.
22857         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22859 2018-01-12  Martin Liska  <mliska@suse.cz>
22861         PR ipa/83054
22862         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22863         New function.
22864         (possible_polymorphic_call_targets): Use it.
22865         (ipa_devirt): Likewise.
22867 2018-01-12  Martin Liska  <mliska@suse.cz>
22869         * profile-count.h (enum profile_quality): Use 0 as invalid
22870         enum value of profile_quality.
22872 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22874         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22875         -mext-string options.
22877 2018-01-12  Richard Biener  <rguenther@suse.de>
22879         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22880         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22881         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22882         Likewise.
22883         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22885 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22887         * configure.ac (--with-long-double-format): Add support for the
22888         configuration option to change the default long double format on
22889         PowerPC systems.
22890         * config.gcc (powerpc*-linux*-*): Likewise.
22891         * configure: Regenerate.
22892         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22893         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22894         used without modification.
22896 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22898         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22899         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22900         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22901         MISC_BUILTIN_SPEC_BARRIER.
22902         (rs6000_init_builtins): Likewise.
22903         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22904         enum value.
22905         (speculation_barrier): New define_insn.
22906         * doc/extend.texi: Document __builtin_speculation_barrier.
22908 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22910         PR target/83203
22911         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22912         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22913         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22914         iterators.
22915         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22916         integral modes instead of "ss" and "sd".
22917         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22918         vectors with 32-bit and 64-bit elements.
22919         (vecdupssescalarmodesuffix): New mode attribute.
22920         (vec_dup<mode>): Use it.
22922 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22924         PR target/83330
22925         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22926         frame if argument is passed on stack.
22928 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22930         PR target/82682
22931         * ree.c (combine_reaching_defs): Optimize also
22932         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22933         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22935 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22937         PR middle-end/83189
22938         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22940 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22942         PR middle-end/83718
22943         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22944         after they are computed.
22946 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22948         PR tree-optimization/83695
22949         * gimple-loop-linterchange.cc
22950         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22951         reset cached scev information after interchange.
22952         (pass_linterchange::execute): Remove call to scev_reset_htab.
22954 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22956         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22957         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22958         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22959         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22960         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22961         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22962         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22963         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22964         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22965         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22966         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22967         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22968         (V_lane_reg): Likewise.
22969         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22970         New define_expand.
22971         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22972         (vfmal_lane_low<mode>_intrinsic,
22973         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22974         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22975         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22976         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22977         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22978         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22980 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22982         * config/arm/arm-cpus.in (fp16fml): New feature.
22983         (ALL_SIMD): Add fp16fml.
22984         (armv8.2-a): Add fp16fml as an option.
22985         (armv8.3-a): Likewise.
22986         (armv8.4-a): Add fp16fml as part of fp16.
22987         * config/arm/arm.h (TARGET_FP16FML): Define.
22988         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22989         when appropriate.
22990         * config/arm/arm-modes.def (V2HF): Define.
22991         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22992         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22993         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22994         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22995         vfmsl_low, vfmsl_high): New set of builtins.
22996         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22997         (vfml_op): New code attribute.
22998         (VFMLHALVES): New int iterator.
22999         (VFML, VFMLSEL): New mode attributes.
23000         (V_reg): Define mapping for V2HF.
23001         (V_hi, V_lo): New mode attributes.
23002         (VF_constraint): Likewise.
23003         (vfml_half, vfml_half_selector): New int attributes.
23004         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23005         define_expand.
23006         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23007         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23008         New define_insn.
23009         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23010         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23011         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23012         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
23013         documentation.
23014         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23015         Document new effective target and option set.
23017 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23019         * config/arm/arm-cpus.in (armv8_4): New feature.
23020         (ARMv8_4a): New fgroup.
23021         (armv8.4-a): New arch.
23022         * config/arm/arm-tables.opt: Regenerate.
23023         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23024         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23025         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23026         Add matching rules for -march=armv8.4-a and extensions.
23027         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23029 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
23031         PR target/81821
23032         * config/rx/rx.md (BW): New mode attribute.
23033         (sync_lock_test_and_setsi): Add mode suffix to insn output.
23035 2018-01-11  Richard Biener  <rguenther@suse.de>
23037         PR tree-optimization/83435
23038         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23039         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23040         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23042 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23043             Alan Hayward  <alan.hayward@arm.com>
23044             David Sherwood  <david.sherwood@arm.com>
23046         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23047         field.
23048         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
23049         (aarch64_print_address_internal): Use it to check for a zero offset.
23051 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23052             Alan Hayward  <alan.hayward@arm.com>
23053             David Sherwood  <david.sherwood@arm.com>
23055         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23056         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23057         Return a poly_int64 rather than a HOST_WIDE_INT.
23058         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23059         rather than a HOST_WIDE_INT.
23060         * config/aarch64/aarch64.h (aarch64_frame): Protect with
23061         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
23062         hard_fp_offset, frame_size, initial_adjust, callee_offset and
23063         final_offset from HOST_WIDE_INT to poly_int64.
23064         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23065         to_constant when getting the number of units in an Advanced SIMD
23066         mode.
23067         (aarch64_builtin_vectorized_function): Check for a constant number
23068         of units.
23069         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23070         GET_MODE_SIZE.
23071         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23072         attribute instead of GET_MODE_NUNITS.
23073         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23074         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23075         GET_MODE_SIZE for fixed-size registers.
23076         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23077         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23078         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23079         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23080         (aarch64_print_operand, aarch64_print_address_internal)
23081         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23082         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23083         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23084         Handle polynomial GET_MODE_SIZE.
23085         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
23086         wider than SImode without modification.
23087         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23088         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23089         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23090         passing and returning SVE modes.
23091         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23092         rather than GEN_INT.
23093         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23094         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23095         (aarch64_allocate_and_probe_stack_space): Likewise.
23096         (aarch64_layout_frame): Cope with polynomial offsets.
23097         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23098         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
23099         polynomial offsets.
23100         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23101         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23102         poly_int64 rather than a HOST_WIDE_INT.
23103         (aarch64_get_separate_components, aarch64_process_components)
23104         (aarch64_expand_prologue, aarch64_expand_epilogue)
23105         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23106         (aarch64_anchor_offset): New function, split out from...
23107         (aarch64_legitimize_address): ...here.
23108         (aarch64_builtin_vectorization_cost): Handle polynomial
23109         TYPE_VECTOR_SUBPARTS.
23110         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23111         GET_MODE_NUNITS.
23112         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23113         number of elements from the PARALLEL rather than the mode.
23114         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23115         rather than GET_MODE_BITSIZE.
23116         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23117         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23118         (aarch64_expand_vec_perm_const_1): Handle polynomial
23119         d->perm.length () and d->perm elements.
23120         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
23121         Apply to_constant to d->perm elements.
23122         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23123         polynomial CONST_VECTOR_NUNITS.
23124         (aarch64_move_pointer): Take amount as a poly_int64 rather
23125         than an int.
23126         (aarch64_progress_pointer): Avoid temporary variable.
23127         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23128         the mode attribute instead of GET_MODE.
23130 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23131             Alan Hayward  <alan.hayward@arm.com>
23132             David Sherwood  <david.sherwood@arm.com>
23134         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23135         x exists before using it.
23136         (aarch64_add_constant_internal): Rename to...
23137         (aarch64_add_offset_1): ...this.  Replace regnum with separate
23138         src and dest rtxes.  Handle the case in which they're different,
23139         including when the offset is zero.  Replace scratchreg with an rtx.
23140         Use 2 additions if there is no spare register into which we can
23141         move a 16-bit constant.
23142         (aarch64_add_constant): Delete.
23143         (aarch64_add_offset): Replace reg with separate src and dest
23144         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
23145         Use aarch64_add_offset_1.
23146         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23147         an rtx rather than an int.  Take the delta as a poly_int64
23148         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
23149         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23150         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23151         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23152         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23153         and aarch64_add_sp.
23154         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23155         aarch64_add_constant.
23157 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23159         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23160         Use scalar_float_mode.
23162 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23164         * config/aarch64/aarch64-simd.md
23165         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23166         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23167         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23168         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23169         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23170         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23171         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23172         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23173         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23174         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23176 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23178         PR target/83514
23179         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23180         targ_options->x_arm_arch_string is non NULL.
23182 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
23184         * config/aarch64/aarch64.h
23185         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
23187 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
23189         PR target/82096
23190         * expmed.c (emit_store_flag_force): Swap if const op0
23191         and change VOIDmode to mode of op0.
23193 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
23195         PR rtl-optimization/83761
23196         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23197         than bytes to mode_for_size.
23199 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23201         PR middle-end/83189
23202         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23203         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23204         profile.
23206 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23208         PR middle-end/83575
23209         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23210         when in layout mode.
23211         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23212         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23213         partition fixup.
23215 2018-01-10  Michael Collison  <michael.collison@arm.com>
23217         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23218         * config/aarch64/aarch64-option-extension.def: Add
23219         AARCH64_OPT_EXTENSION of 'fp16fml'.
23220         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23221         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23222         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23223         * config/aarch64/constraints.md (Ui7): New constraint.
23224         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23225         (VFMLA_SEL_W): Ditto.
23226         (f16quad): Ditto.
23227         (f16mac1): Ditto.
23228         (VFMLA16_LOW): New int iterator.
23229         (VFMLA16_HIGH): Ditto.
23230         (UNSPEC_FMLAL): New unspec.
23231         (UNSPEC_FMLSL): Ditto.
23232         (UNSPEC_FMLAL2): Ditto.
23233         (UNSPEC_FMLSL2): Ditto.
23234         (f16mac): New code attribute.
23235         * config/aarch64/aarch64-simd-builtins.def
23236         (aarch64_fmlal_lowv2sf): Ditto.
23237         (aarch64_fmlsl_lowv2sf): Ditto.
23238         (aarch64_fmlalq_lowv4sf): Ditto.
23239         (aarch64_fmlslq_lowv4sf): Ditto.
23240         (aarch64_fmlal_highv2sf): Ditto.
23241         (aarch64_fmlsl_highv2sf): Ditto.
23242         (aarch64_fmlalq_highv4sf): Ditto.
23243         (aarch64_fmlslq_highv4sf): Ditto.
23244         (aarch64_fmlal_lane_lowv2sf): Ditto.
23245         (aarch64_fmlsl_lane_lowv2sf): Ditto.
23246         (aarch64_fmlal_laneq_lowv2sf): Ditto.
23247         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23248         (aarch64_fmlalq_lane_lowv4sf): Ditto.
23249         (aarch64_fmlsl_lane_lowv4sf): Ditto.
23250         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23251         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23252         (aarch64_fmlal_lane_highv2sf): Ditto.
23253         (aarch64_fmlsl_lane_highv2sf): Ditto.
23254         (aarch64_fmlal_laneq_highv2sf): Ditto.
23255         (aarch64_fmlsl_laneq_highv2sf): Ditto.
23256         (aarch64_fmlalq_lane_highv4sf): Ditto.
23257         (aarch64_fmlsl_lane_highv4sf): Ditto.
23258         (aarch64_fmlalq_laneq_highv4sf): Ditto.
23259         (aarch64_fmlsl_laneq_highv4sf): Ditto.
23260         * config/aarch64/aarch64-simd.md:
23261         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23262         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23263         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23264         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23265         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23266         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23267         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23268         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23269         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23270         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23271         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23272         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23273         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23274         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23275         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23276         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23277         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23278         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23279         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23280         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23281         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23282         (vfmlsl_low_u32): Ditto.
23283         (vfmlalq_low_u32): Ditto.
23284         (vfmlslq_low_u32): Ditto.
23285         (vfmlal_high_u32): Ditto.
23286         (vfmlsl_high_u32): Ditto.
23287         (vfmlalq_high_u32): Ditto.
23288         (vfmlslq_high_u32): Ditto.
23289         (vfmlal_lane_low_u32): Ditto.
23290         (vfmlsl_lane_low_u32): Ditto.
23291         (vfmlal_laneq_low_u32): Ditto.
23292         (vfmlsl_laneq_low_u32): Ditto.
23293         (vfmlalq_lane_low_u32): Ditto.
23294         (vfmlslq_lane_low_u32): Ditto.
23295         (vfmlalq_laneq_low_u32): Ditto.
23296         (vfmlslq_laneq_low_u32): Ditto.
23297         (vfmlal_lane_high_u32): Ditto.
23298         (vfmlsl_lane_high_u32): Ditto.
23299         (vfmlal_laneq_high_u32): Ditto.
23300         (vfmlsl_laneq_high_u32): Ditto.
23301         (vfmlalq_lane_high_u32): Ditto.
23302         (vfmlslq_lane_high_u32): Ditto.
23303         (vfmlalq_laneq_high_u32): Ditto.
23304         (vfmlslq_laneq_high_u32): Ditto.
23305         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23306         (AARCH64_FL_FOR_ARCH8_4): New.
23307         (AARCH64_ISA_F16FML): New ISA flag.
23308         (TARGET_F16FML): New feature flag for fp16fml.
23309         (doc/invoke.texi): Document new fp16fml option.
23311 2018-01-10  Michael Collison  <michael.collison@arm.com>
23313         * config/aarch64/aarch64-builtins.c:
23314         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23315         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23316         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23317         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23318         (AARCH64_ISA_SHA3): New ISA flag.
23319         (TARGET_SHA3): New feature flag for sha3.
23320         * config/aarch64/iterators.md (sha512_op): New int attribute.
23321         (CRYPTO_SHA512): New int iterator.
23322         (UNSPEC_SHA512H): New unspec.
23323         (UNSPEC_SHA512H2): Ditto.
23324         (UNSPEC_SHA512SU0): Ditto.
23325         (UNSPEC_SHA512SU1): Ditto.
23326         * config/aarch64/aarch64-simd-builtins.def
23327         (aarch64_crypto_sha512hqv2di): New builtin.
23328         (aarch64_crypto_sha512h2qv2di): Ditto.
23329         (aarch64_crypto_sha512su0qv2di): Ditto.
23330         (aarch64_crypto_sha512su1qv2di): Ditto.
23331         (aarch64_eor3qv8hi): Ditto.
23332         (aarch64_rax1qv2di): Ditto.
23333         (aarch64_xarqv2di): Ditto.
23334         (aarch64_bcaxqv8hi): Ditto.
23335         * config/aarch64/aarch64-simd.md:
23336         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23337         (aarch64_crypto_sha512su0qv2di): Ditto.
23338         (aarch64_crypto_sha512su1qv2di): Ditto.
23339         (aarch64_eor3qv8hi): Ditto.
23340         (aarch64_rax1qv2di): Ditto.
23341         (aarch64_xarqv2di): Ditto.
23342         (aarch64_bcaxqv8hi): Ditto.
23343         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23344         (vsha512h2q_u64): Ditto.
23345         (vsha512su0q_u64): Ditto.
23346         (vsha512su1q_u64): Ditto.
23347         (veor3q_u16): Ditto.
23348         (vrax1q_u64): Ditto.
23349         (vxarq_u64): Ditto.
23350         (vbcaxq_u16): Ditto.
23351         * config/arm/types.md (crypto_sha512): New type attribute.
23352         (crypto_sha3): Ditto.
23353         (doc/invoke.texi): Document new sha3 option.
23355 2018-01-10  Michael Collison  <michael.collison@arm.com>
23357         * config/aarch64/aarch64-builtins.c:
23358         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23359         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23360         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23361         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23362         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23363         (AARCH64_ISA_SM4): New ISA flag.
23364         (TARGET_SM4): New feature flag for sm4.
23365         * config/aarch64/aarch64-simd-builtins.def
23366         (aarch64_sm3ss1qv4si): Ditto.
23367         (aarch64_sm3tt1aq4si): Ditto.
23368         (aarch64_sm3tt1bq4si): Ditto.
23369         (aarch64_sm3tt2aq4si): Ditto.
23370         (aarch64_sm3tt2bq4si): Ditto.
23371         (aarch64_sm3partw1qv4si): Ditto.
23372         (aarch64_sm3partw2qv4si): Ditto.
23373         (aarch64_sm4eqv4si): Ditto.
23374         (aarch64_sm4ekeyqv4si): Ditto.
23375         * config/aarch64/aarch64-simd.md:
23376         (aarch64_sm3ss1qv4si): Ditto.
23377         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23378         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23379         (aarch64_sm4eqv4si): Ditto.
23380         (aarch64_sm4ekeyqv4si): Ditto.
23381         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23382         (sm3part_op): Ditto.
23383         (CRYPTO_SM3TT): Ditto.
23384         (CRYPTO_SM3PART): Ditto.
23385         (UNSPEC_SM3SS1): New unspec.
23386         (UNSPEC_SM3TT1A): Ditto.
23387         (UNSPEC_SM3TT1B): Ditto.
23388         (UNSPEC_SM3TT2A): Ditto.
23389         (UNSPEC_SM3TT2B): Ditto.
23390         (UNSPEC_SM3PARTW1): Ditto.
23391         (UNSPEC_SM3PARTW2): Ditto.
23392         (UNSPEC_SM4E): Ditto.
23393         (UNSPEC_SM4EKEY): Ditto.
23394         * config/aarch64/constraints.md (Ui2): New constraint.
23395         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23396         * config/arm/types.md (crypto_sm3): New type attribute.
23397         (crypto_sm4): Ditto.
23398         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23399         (vsm3tt1aq_u32): Ditto.
23400         (vsm3tt1bq_u32): Ditto.
23401         (vsm3tt2aq_u32): Ditto.
23402         (vsm3tt2bq_u32): Ditto.
23403         (vsm3partw1q_u32): Ditto.
23404         (vsm3partw2q_u32): Ditto.
23405         (vsm4eq_u32): Ditto.
23406         (vsm4ekeyq_u32): Ditto.
23407         (doc/invoke.texi): Document new sm4 option.
23409 2018-01-10  Michael Collison  <michael.collison@arm.com>
23411         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23412         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23413         (AARCH64_FL_FOR_ARCH8_4): New.
23414         (AARCH64_FL_V8_4): New flag.
23415         (doc/invoke.texi): Document new armv8.4-a option.
23417 2018-01-10  Michael Collison  <michael.collison@arm.com>
23419         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23420         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23421         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23422         * config/aarch64/aarch64-option-extension.def: Add
23423         AARCH64_OPT_EXTENSION of 'sha2'.
23424         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23425         (crypto): Disable sha2 and aes if crypto disabled.
23426         (crypto): Enable aes and sha2 if enabled.
23427         (simd): Disable sha2 and aes if simd disabled.
23428         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23429         New flags.
23430         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23431         (TARGET_SHA2): New feature flag for sha2.
23432         (TARGET_AES): New feature flag for aes.
23433         * config/aarch64/aarch64-simd.md:
23434         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23435         conditional on TARGET_AES.
23436         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23437         (aarch64_crypto_sha1hsi): Make pattern conditional
23438         on TARGET_SHA2.
23439         (aarch64_crypto_sha1hv4si): Ditto.
23440         (aarch64_be_crypto_sha1hv4si): Ditto.
23441         (aarch64_crypto_sha1su1v4si): Ditto.
23442         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23443         (aarch64_crypto_sha1su0v4si): Ditto.
23444         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23445         (aarch64_crypto_sha256su0v4si): Ditto.
23446         (aarch64_crypto_sha256su1v4si): Ditto.
23447         (doc/invoke.texi): Document new aes and sha2 options.
23449 2018-01-10  Martin Sebor  <msebor@redhat.com>
23451         PR tree-optimization/83781
23452         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23453         as string arrays.
23455 2018-01-11  Martin Sebor  <msebor@gmail.com>
23456             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23458         PR tree-optimization/83501
23459         PR tree-optimization/81703
23461         * tree-ssa-strlen.c (get_string_cst): Rename...
23462         (get_string_len): ...to this.  Handle global constants.
23463         (handle_char_store): Adjust.
23465 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23466             Jim Wilson  <jimw@sifive.com>
23468         * config/riscv/riscv-protos.h (riscv_output_return): New.
23469         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23470         (riscv_attribute_table, riscv_output_return),
23471         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23472         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23473         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23474         function.
23475         (riscv_expand_prologue): Add early return for naked function.
23476         (riscv_expand_epilogue): Likewise.
23477         (riscv_function_ok_for_sibcall): Return false for naked function.
23478         (riscv_set_current_function): New.
23479         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23480         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23481         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23482         * doc/extend.texi (RISC-V Function Attributes): New.
23484 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23486         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23487         check for 128-bit long double before checking TCmode.
23488         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23489         128-bit long doubles before checking TFmode or TCmode.
23490         (FLOAT128_IBM_P): Likewise.
23492 2018-01-10  Martin Sebor  <msebor@redhat.com>
23494         PR tree-optimization/83671
23495         * builtins.c (c_strlen): Unconditionally return zero for the empty
23496         string.
23497         Use -Warray-bounds for warnings.
23498         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23499         for non-constant array indices with COMPONENT_REF, arrays of
23500         arrays, and pointers to arrays.
23501         (gimple_fold_builtin_strlen): Determine and set length range for
23502         non-constant character arrays.
23504 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23506         PR middle-end/81897
23507         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23508         empty blocks.
23510 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23512         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23514 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23516         PR target/83399
23517         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23518         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23519         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23520         indexed_or_indirect_operand predicate.
23521         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23522         (*vsx_le_perm_load_v8hi): Likewise.
23523         (*vsx_le_perm_load_v16qi): Likewise.
23524         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23525         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23526         (*vsx_le_perm_store_v8hi): Likewise.
23527         (*vsx_le_perm_store_v16qi): Likewise.
23528         (eight unnamed splitters): Likewise.
23530 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23532         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23533         * config/rs6000/emmintrin.h: Likewise.
23534         * config/rs6000/mmintrin.h: Likewise.
23535         * config/rs6000/xmmintrin.h: Likewise.
23537 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23539         PR c++/43486
23540         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23541         "public_flag".
23542         * tree.c (tree_nop_conversion): Return true for location wrapper
23543         nodes.
23544         (maybe_wrap_with_location): New function.
23545         (selftest::check_strip_nops): New function.
23546         (selftest::test_location_wrappers): New function.
23547         (selftest::tree_c_tests): Call it.
23548         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23549         (maybe_wrap_with_location): New decl.
23550         (EXPR_LOCATION_WRAPPER_P): New macro.
23551         (location_wrapper_p): New inline function.
23552         (tree_strip_any_location_wrapper): New inline function.
23554 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23556         PR target/83735
23557         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23558         stack_realign_offset for the largest alignment of stack slot
23559         actually used.
23560         (ix86_find_max_used_stack_alignment): New function.
23561         (ix86_finalize_stack_frame_flags): Use it.  Set
23562         max_used_stack_alignment if we don't realign stack.
23563         * config/i386/i386.h (machine_function): Add
23564         max_used_stack_alignment.
23566 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23568         * config/arm/arm.opt (-mbranch-cost): New option.
23569         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23570         account.
23572 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23574         PR target/83629
23575         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23576         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23578 2018-01-10  Richard Biener  <rguenther@suse.de>
23580         PR debug/83765
23581         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23582         early out so it also covers the case where we have a non-NULL
23583         origin.
23585 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23587         PR tree-optimization/83753
23588         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23589         for non-strided grouped accesses if the number of elements is 1.
23591 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23593         PR target/81616
23594         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23595         * i386.h (TARGET_USE_GATHER): Define.
23596         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23598 2018-01-10  Martin Liska  <mliska@suse.cz>
23600         PR bootstrap/82831
23601         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23602         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23603         partitioning.
23604         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23605         CLEANUP_NO_PARTITIONING is not set.
23607 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23609         * doc/rtl.texi: Remove documentation of (const ...) wrappers
23610         for vectors, as a partial revert of r254296.
23611         * rtl.h (const_vec_p): Delete.
23612         (const_vec_duplicate_p): Don't test for vector CONSTs.
23613         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23614         * expmed.c (make_tree): Likewise.
23616         Revert:
23617         * common.md (E, F): Use CONSTANT_P instead of checking for
23618         CONST_VECTOR.
23619         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23620         checking for CONST_VECTOR.
23622 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23624         PR middle-end/83575
23625         * predict.c (force_edge_cold): Handle in more sane way edges
23626         with no prediction.
23628 2018-01-09  Carl Love  <cel@us.ibm.com>
23630         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23631         V4SI, V4SF types.
23632         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23633         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23634         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23635         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
23636         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23637         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
23638         * config/rs6000/rs6000-protos.h: Add extern defition for
23639         rs6000_generate_float2_double_code.
23640         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23641         function.
23642         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23643         (float2_v2df): Add define_expand.
23645 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
23647         PR target/83628
23648         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23649         op_mode in the force_to_mode call.
23651 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23653         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23654         instead of checking each element individually.
23655         (aarch64_evpc_uzp): Likewise.
23656         (aarch64_evpc_zip): Likewise.
23657         (aarch64_evpc_ext): Likewise.
23658         (aarch64_evpc_rev): Likewise.
23659         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23660         instead of checking each element individually.  Return true without
23661         generating rtl if
23662         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23663         whether all selected elements come from the same input, instead of
23664         checking each element individually.  Remove calls to gen_rtx_REG,
23665         start_sequence and end_sequence and instead assert that no rtl is
23666         generated.
23668 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23670         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23671         order of HIGH and CONST checks.
23673 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23675         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23676         if the destination isn't an SSA_NAME.
23678 2018-01-09  Richard Biener  <rguenther@suse.de>
23680         PR tree-optimization/83668
23681         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23682         move prologue...
23683         (canonicalize_loop_form): ... here, renamed from ...
23684         (canonicalize_loop_closed_ssa_form): ... this and amended to
23685         swap successor edges for loop exit blocks to make us use
23686         the RPO order we need for initial schedule generation.
23688 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23690         PR tree-optimization/64811
23691         * match.pd: When optimizing comparisons with Inf, avoid
23692         introducing or losing exceptions from comparisons with NaN.
23694 2018-01-09  Martin Liska  <mliska@suse.cz>
23696         PR sanitizer/82517
23697         * asan.c (shadow_mem_size): Add gcc_assert.
23699 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23701         Don't save registers in main().
23703         PR target/83738
23704         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23705         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23706         * config/avr/avr.c (avr_set_current_function): Don't error if
23707         naked, OS_task or OS_main are specified at the same time.
23708         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23709         OS_main.
23710         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23711         attribute.
23712         * common/config/avr/avr-common.c (avr_option_optimization_table):
23713         Switch on -mmain-is-OS_task for optimizing compilations.
23715 2018-01-09  Richard Biener  <rguenther@suse.de>
23717         PR tree-optimization/83572
23718         * graphite.c: Include cfganal.h.
23719         (graphite_transform_loops): Connect infinite loops to exit
23720         and remove fake edges at the end.
23722 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23724         * ipa-inline.c (edge_badness): Revert accidental checkin.
23726 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23728         PR ipa/80763
23729         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23730         symbols; not inline clones.
23732 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23734         PR target/83507
23735         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23736         hard registers.  Formatting fixes.
23738         PR preprocessor/83722
23739         * gcc.c (try_generate_repro): Pass
23740         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23741         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23742         do_report_bug.
23744 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23745             Kito Cheng  <kito.cheng@gmail.com>
23747         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23748         (riscv_leaf_function_p): Delete.
23749         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23751 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23753         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23754         function.
23755         (do_ifelse): New function.
23756         (do_isel): New function.
23757         (do_sub3): New function.
23758         (do_add3): New function.
23759         (do_load_mask_compare): New function.
23760         (do_overlap_load_compare): New function.
23761         (expand_compare_loop): New function.
23762         (expand_block_compare): Call expand_compare_loop() when appropriate.
23763         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23764         option description.
23765         (-mblock-compare-inline-loop-limit): New option.
23767 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23769         PR target/83677
23770         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23771         Reverse order of second and third operands in first alternative.
23772         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23773         of first and second elements in UNSPEC_VPERMR vector.
23774         (altivec_expand_vec_perm_le): Likewise.
23776 2018-01-08  Jeff Law  <law@redhat.com>
23778         PR rtl-optimizatin/81308
23779         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23780         (process_switch): If group_case_labels makes a change, then set
23781         cfg_altered.
23782         (pass_convert_switch::execute): If a switch is converted, then
23783         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23785         PR rtl-optimization/81308
23786         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23787         splitting insns.
23789 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23791         PR target/83663 - Revert r255946
23792         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23793         generation for cases where splatting a value is not useful.
23794         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23795         across a vec_duplicate and a paradoxical subreg forming a vector
23796         mode to a vec_concat.
23798 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23800         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23801         -march=armv8.3-a variants.
23802         * config/arm/t-multilib: Likewise.
23803         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23805 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23807         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23808         to generate rtl.
23809         (cceq_ior_compare_complement): Give it a name so I can use it, and
23810         change boolean_or_operator predicate to boolean_operator so it can
23811         be used to generate a crand.
23812         (eqne): New code iterator.
23813         (bd/bd_neg): New code_attrs.
23814         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23815         a single define_insn.
23816         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23817         decrement (bdnzt/bdnzf/bdzt/bdzf).
23818         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23819         with the new names of the branch decrement patterns, and added the
23820         names of the branch decrement conditional patterns.
23822 2018-01-08  Richard Biener  <rguenther@suse.de>
23824         PR tree-optimization/83563
23825         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23826         cache.
23828 2018-01-08  Richard Biener  <rguenther@suse.de>
23830         PR middle-end/83713
23831         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23833 2018-01-08  Richard Biener  <rguenther@suse.de>
23835         PR tree-optimization/83685
23836         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23837         references to abnormals.
23839 2018-01-08  Richard Biener  <rguenther@suse.de>
23841         PR lto/83719
23842         * dwarf2out.c (output_indirect_strings): Handle empty
23843         skeleton_debug_str_hash.
23844         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23846 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23848         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23849         (emit_store_direct): Likewise.
23850         (arc_trampoline_adjust_address): Likewise.
23851         (arc_asm_trampoline_template): New function.
23852         (arc_initialize_trampoline): Use asm_trampoline_template.
23853         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23854         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23855         * config/arc/arc.md (flush_icache): Delete pattern.
23857 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23859         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23860         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23861         munaligned-access.
23863 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23865         PR target/83681
23866         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23867         by not USED_FOR_TARGET.
23868         (make_pass_resolve_sw_modes): Likewise.
23870 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23872         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23873         USED_FOR_TARGET.
23875 2018-01-08  Richard Biener  <rguenther@suse.de>
23877         PR middle-end/83580
23878         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23880 2018-01-08  Richard Biener  <rguenther@suse.de>
23882         PR middle-end/83517
23883         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23885 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23887         PR middle-end/81897
23888         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23889         basic blocks with a small number of successors.
23890         (convert_control_dep_chain_into_preds): Improve handling of
23891         forwarder blocks.
23892         (dump_predicates): Split apart into...
23893         (dump_pred_chain): ...here...
23894         (dump_pred_info): ...and here.
23895         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23896         (can_chain_union_be_invalidated_p): Improve check for invalidation
23897         of paths.
23898         (uninit_uses_cannot_happen): Avoid unnecessary if
23899         convert_control_dep_chain_into_preds yielded nothing.
23901 2018-01-06  Martin Sebor  <msebor@redhat.com>
23903         PR tree-optimization/83640
23904         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23905         subtracting negative offset from size.
23906         (builtin_access::overlap): Adjust offset bounds of the access to fall
23907         within the size of the object if possible.
23909 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23911         PR rtl-optimization/83699
23912         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23913         extract_bit_field_as_subreg to cases in which the extracted
23914         value is also a vector.
23916         * lra-constraints.c (process_alt_operands): Test for the equivalence
23917         substitutions when detecting a possible reload cycle.
23919 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23921         PR debug/83480
23922         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23923         by default if flag_selective_schedling{,2}.  Formatting fixes.
23925         PR rtl-optimization/83682
23926         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23927         if it has non-VECTOR_MODE element mode.
23928         (vec_duplicate_p): Likewise.
23930         PR middle-end/83694
23931         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23932         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23934 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23936         PR target/83604
23937         * config/i386/i386-builtin.def
23938         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23939         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23940         Require also OPTION_MASK_ISA_AVX512F in addition to
23941         OPTION_MASK_ISA_GFNI.
23942         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23943         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23944         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23945         to OPTION_MASK_ISA_GFNI.
23946         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23947         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23948         OPTION_MASK_ISA_AVX512BW.
23949         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23950         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23951         addition to OPTION_MASK_ISA_GFNI.
23952         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23953         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23954         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23955         to OPTION_MASK_ISA_GFNI.
23956         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23957         a requirement for all ISAs rather than any of them with a few
23958         exceptions.
23959         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23960         processing.
23961         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23962         bitmasks to be enabled with 3 exceptions, instead of requiring any
23963         enabled ISA with lots of exceptions.
23964         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23965         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23966         Change avx512bw in isa attribute to avx512f.
23967         * config/i386/sgxintrin.h: Add license boilerplate.
23968         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23969         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23970         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23971         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23972         defined.
23973         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23974         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23975         temporarily sse2 rather than sse if not enabled already.
23977         PR target/83604
23978         * config/i386/sse.md (VI248_VLBW): Rename to ...
23979         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23980         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23981         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23982         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23983         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23984         mode iterator instead of VI248_VLBW.
23986 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23988         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23989         (record_modified): Skip clobbers; add debug output.
23990         (param_change_prob): Use sreal frequencies.
23992 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23994         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23995         punt for user-aligned variables.
23997 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23999         * tree-chrec.c (chrec_contains_symbols): Return true for
24000         POLY_INT_CST.
24002 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
24004         PR target/82439
24005         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24006         of (x|y) == x for BICS pattern.
24008 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
24010         PR tree-optimization/83605
24011         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24012         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24013         can throw.
24015 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24017         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24018         * config/epiphany/rtems.h: New file.
24020 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24021             Uros Bizjak  <ubizjak@gmail.com>
24023         PR target/83554
24024         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24025         QIreg_operand instead of register_operand predicate.
24026         * config/i386/i386.c (ix86_rop_should_change_byte_p,
24027         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24028         comments instead of -fmitigate[-_]rop.
24030 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24032         PR bootstrap/81926
24033         * cgraphunit.c (symbol_table::compile): Switch to text_section
24034         before calling assembly_start debug hook.
24035         * run-rtl-passes.c (run_rtl_passes): Likewise.
24036         Include output.h.
24038 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24040         * tree-vrp.c (extract_range_from_binary_expr_1): Check
24041         range_int_cst_p rather than !symbolic_range_p before calling
24042         extract_range_from_multiplicative_op_1.
24044 2018-01-04  Jeff Law  <law@redhat.com>
24046         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24047         redundant test in assertion.
24049 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24051         * doc/rtl.texi: Document machine_mode wrapper classes.
24053 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24055         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24056         using tree_to_uhwi.
24058 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24060         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24061         the VEC_PERM_EXPR fold to fail.
24063 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24065         PR debug/83585
24066         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24067         to switched_sections.
24069 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24071         PR target/83680
24072         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24073         test for d.testing.
24075 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
24077         PR target/83387
24078         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24079         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24081 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24083         PR debug/83666
24084         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24085         is BLKmode and bitpos not zero or mode change is needed.
24087 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
24089         PR target/83675
24090         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24091         TARGET_VIS2.
24093 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
24095         PR target/83628
24096         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24097         instead of MULT rtx.  Update all corresponding splitters.
24098         (*saddl_se): Ditto.
24099         (*ssub<modesuffix>): Ditto.
24100         (*ssubl_se): Ditto.
24101         (*cmp_sadd_di): Update split patterns.
24102         (*cmp_sadd_si): Ditto.
24103         (*cmp_sadd_sidi): Ditto.
24104         (*cmp_ssub_di): Ditto.
24105         (*cmp_ssub_si): Ditto.
24106         (*cmp_ssub_sidi): Ditto.
24107         * config/alpha/predicates.md (const23_operand): New predicate.
24108         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24109         Look for ASHIFT, not MULT inner operand.
24110         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24112 2018-01-04  Martin Liska  <mliska@suse.cz>
24114         PR gcov-profile/83669
24115         * gcov.c (output_intermediate_file): Add version to intermediate
24116         gcov file.
24117         * doc/gcov.texi: Document new field 'version' in intermediate
24118         file format. Fix location of '-k' option of gcov command.
24120 2018-01-04  Martin Liska  <mliska@suse.cz>
24122         PR ipa/82352
24123         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24125 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
24127         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24129 2018-01-03  Martin Sebor  <msebor@redhat.com>
24131         PR tree-optimization/83655
24132         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24133         checking calls with invalid arguments.
24135 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24137         * tree-vect-stmts.c (vect_get_store_rhs): New function.
24138         (vectorizable_mask_load_store): Delete.
24139         (vectorizable_call): Return false for masked loads and stores.
24140         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
24141         instead of gimple_assign_rhs1.
24142         (vectorizable_load): Handle IFN_MASK_LOAD.
24143         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24145 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24147         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24148         split out from..,
24149         (vectorizable_mask_load_store): ...here.
24150         (vectorizable_load): ...and here.
24152 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24154         * tree-vect-stmts.c (vect_build_all_ones_mask)
24155         (vect_build_zero_merge_argument): New functions, split out from...
24156         (vectorizable_load): ...here.
24158 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24160         * tree-vect-stmts.c (vect_check_store_rhs): New function,
24161         split out from...
24162         (vectorizable_mask_load_store): ...here.
24163         (vectorizable_store): ...and here.
24165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24167         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24168         split out from...
24169         (vectorizable_mask_load_store): ...here.
24171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24173         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24174         (vect_model_store_cost): Take a vec_load_store_type instead of a
24175         vect_def_type.
24176         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24177         (vect_model_store_cost): Take a vec_load_store_type instead of a
24178         vect_def_type.
24179         (vectorizable_mask_load_store): Update accordingly.
24180         (vectorizable_store): Likewise.
24181         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24185         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24186         IFN_MASK_LOAD calls here rather than...
24187         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24190             Alan Hayward  <alan.hayward@arm.com>
24191             David Sherwood  <david.sherwood@arm.com>
24193         * expmed.c (extract_bit_field_1): For vector extracts,
24194         fall back to extract_bit_field_as_subreg if vec_extract
24195         isn't available.
24197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24198             Alan Hayward  <alan.hayward@arm.com>
24199             David Sherwood  <david.sherwood@arm.com>
24201         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24202         they are variable or constant sized.
24203         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24204         slots for constant-sized data.
24206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24207             Alan Hayward  <alan.hayward@arm.com>
24208             David Sherwood  <david.sherwood@arm.com>
24210         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24211         handling COND_EXPRs with boolean comparisons, try to find a better
24212         basis for the mask type than the boolean itself.
24214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24216         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24217         is calculated and how it can be overridden.
24218         * genmodes.c (max_bitsize_mode_any_mode): New variable.
24219         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24220         if defined.
24221         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24222         if nonzero.
24224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24225             Alan Hayward  <alan.hayward@arm.com>
24226             David Sherwood  <david.sherwood@arm.com>
24228         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24229         Remove the mode argument.
24230         (aarch64_simd_valid_immediate): Remove the mode and inverse
24231         arguments.
24232         * config/aarch64/iterators.md (bitsize): New iterator.
24233         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24234         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24235         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24236         aarch64_simd_valid_immediate.
24237         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24238         (aarch64_reg_or_bic_imm): Likewise.
24239         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24240         with an insn_type enum and msl with a modifier_type enum.
24241         Replace element_width with a scalar_mode.  Change the shift
24242         to unsigned int.  Add constructors for scalar_float_mode and
24243         scalar_int_mode elements.
24244         (aarch64_vect_float_const_representable_p): Delete.
24245         (aarch64_can_const_movi_rtx_p)
24246         (aarch64_simd_scalar_immediate_valid_for_move)
24247         (aarch64_simd_make_constant): Update call to
24248         aarch64_simd_valid_immediate.
24249         (aarch64_advsimd_valid_immediate_hs): New function.
24250         (aarch64_advsimd_valid_immediate): Likewise.
24251         (aarch64_simd_valid_immediate): Remove mode and inverse
24252         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
24253         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24254         and aarch64_float_const_representable_p on the result.
24255         (aarch64_output_simd_mov_immediate): Remove mode argument.
24256         Update call to aarch64_simd_valid_immediate and use of
24257         simd_immediate_info.
24258         (aarch64_output_scalar_simd_mov_immediate): Update call
24259         accordingly.
24261 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24262             Alan Hayward  <alan.hayward@arm.com>
24263             David Sherwood  <david.sherwood@arm.com>
24265         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24266         (mode_nunits): Likewise CONST_MODE_NUNITS.
24267         * machmode.def (ADJUST_NUNITS): Document.
24268         * genmodes.c (mode_data::need_nunits_adj): New field.
24269         (blank_mode): Update accordingly.
24270         (adj_nunits): New variable.
24271         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24272         parameter.
24273         (emit_mode_size_inline): Set need_bytesize_adj for all modes
24274         listed in adj_nunits.
24275         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24276         listed in adj_nunits.  Don't emit case statements for such modes.
24277         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24278         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
24279         nothing if adj_nunits is nonnull.
24280         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24281         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24282         (emit_mode_fbit): Update use of print_maybe_const_decl.
24283         (emit_move_size): Likewise.  Treat the array as non-const
24284         if adj_nunits.
24285         (emit_mode_adjustments): Handle adj_nunits.
24287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24289         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24290         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24291         (VECTOR_MODES): Use it.
24292         (make_vector_modes): Take the prefix as an argument.
24294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24295             Alan Hayward  <alan.hayward@arm.com>
24296             David Sherwood  <david.sherwood@arm.com>
24298         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24299         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24300         for MODE_VECTOR_BOOL.
24301         * machmode.def (VECTOR_BOOL_MODE): Document.
24302         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24303         (make_vector_bool_mode): New function.
24304         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24305         MODE_VECTOR_BOOL.
24306         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24307         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24308         Likewise.
24309         * stor-layout.c (int_mode_for_mode): Likewise.
24310         * tree.c (build_vector_type_for_mode): Likewise.
24311         * varasm.c (output_constant_pool_2): Likewise.
24312         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24313         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24314         for MODE_VECTOR_BOOL.
24315         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24316         of mode class checks.
24317         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24318         instead of a list of mode class checks.
24319         (expand_vector_scalar_condition): Likewise.
24320         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24322 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24323             Alan Hayward  <alan.hayward@arm.com>
24324             David Sherwood  <david.sherwood@arm.com>
24326         * machmode.h (mode_size): Change from unsigned short to
24327         poly_uint16_pod.
24328         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24329         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24330         or if measurement_type is not polynomial.
24331         (fixed_size_mode::includes_p): Check for constant-sized modes.
24332         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24333         return a poly_uint16 rather than an unsigned short.
24334         (emit_mode_size): Change the type of mode_size from unsigned short
24335         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24336         (emit_mode_adjustments): Cope with polynomial vector sizes.
24337         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24338         for GET_MODE_SIZE.
24339         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24340         for GET_MODE_SIZE.
24341         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24342         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24343         * caller-save.c (setup_save_areas): Likewise.
24344         (replace_reg_with_saved_mem): Likewise.
24345         * calls.c (emit_library_call_value_1): Likewise.
24346         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24347         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24348         (gen_lowpart_for_combine): Likewise.
24349         * convert.c (convert_to_integer_1): Likewise.
24350         * cse.c (equiv_constant, cse_insn): Likewise.
24351         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24352         (cselib_subst_to_values): Likewise.
24353         * dce.c (word_dce_process_block): Likewise.
24354         * df-problems.c (df_word_lr_mark_ref): Likewise.
24355         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24356         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24357         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24358         (rtl_for_decl_location): Likewise.
24359         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24360         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24361         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24362         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24363         (expand_expr_real_1): Likewise.
24364         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24365         (pad_below): Likewise.
24366         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24367         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24368         * ira.c (get_subreg_tracking_sizes): Likewise.
24369         * ira-build.c (ira_create_allocno_objects): Likewise.
24370         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24371         (ira_sort_regnos_for_alter_reg): Likewise.
24372         * ira-costs.c (record_operand_costs): Likewise.
24373         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24374         (resolve_simple_move): Likewise.
24375         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24376         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24377         (lra_constraints): Likewise.
24378         (CONST_POOL_OK_P): Reject variable-sized modes.
24379         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24380         (add_pseudo_to_slot, lra_spill): Likewise.
24381         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24382         * optabs-query.c (get_best_extraction_insn): Likewise.
24383         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24384         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24385         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24386         * recog.c (offsettable_address_addr_space_p): Likewise.
24387         * regcprop.c (maybe_mode_change): Likewise.
24388         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24389         * regrename.c (build_def_use): Likewise.
24390         * regstat.c (dump_reg_info): Likewise.
24391         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24392         (find_reloads, find_reloads_subreg_address): Likewise.
24393         * reload1.c (eliminate_regs_1): Likewise.
24394         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24395         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24396         (simplify_binary_operation_1, simplify_subreg): Likewise.
24397         * targhooks.c (default_function_arg_padding): Likewise.
24398         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24399         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24400         (verify_gimple_assign_ternary): Likewise.
24401         * tree-inline.c (estimate_move_cost): Likewise.
24402         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24403         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24404         (get_address_cost_ainc): Likewise.
24405         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24406         (vect_supportable_dr_alignment): Likewise.
24407         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24408         (vectorizable_reduction): Likewise.
24409         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24410         (vectorizable_operation, vectorizable_load): Likewise.
24411         * tree.c (build_same_sized_truth_vector_type): Likewise.
24412         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24413         * var-tracking.c (emit_note_insn_var_location): Likewise.
24414         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24415         (ADDR_VEC_ALIGN): Likewise.
24417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24418             Alan Hayward  <alan.hayward@arm.com>
24419             David Sherwood  <david.sherwood@arm.com>
24421         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24422         unsigned short.
24423         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24424         or if measurement_type is polynomial.
24425         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24426         * combine.c (make_extraction): Likewise.
24427         * dse.c (find_shift_sequence): Likewise.
24428         * dwarf2out.c (mem_loc_descriptor): Likewise.
24429         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24430         (extract_bit_field, extract_low_bits): Likewise.
24431         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24432         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24433         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24434         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24435         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24436         * reload.c (find_reloads): Likewise.
24437         * reload1.c (alter_reg): Likewise.
24438         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24439         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24440         * tree-if-conv.c (predicate_mem_writes): Likewise.
24441         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24442         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24443         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24444         * valtrack.c (dead_debug_insert_temp): Likewise.
24445         * varasm.c (mergeable_constant_section): Likewise.
24446         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24449             Alan Hayward  <alan.hayward@arm.com>
24450             David Sherwood  <david.sherwood@arm.com>
24452         * expr.c (expand_assignment): Cope with polynomial mode sizes
24453         when assigning to a CONCAT.
24455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24456             Alan Hayward  <alan.hayward@arm.com>
24457             David Sherwood  <david.sherwood@arm.com>
24459         * machmode.h (mode_precision): Change from unsigned short to
24460         poly_uint16_pod.
24461         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24462         short.
24463         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24464         or if measurement_type is not polynomial.
24465         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24466         in which the mode is already known to be a scalar_int_mode.
24467         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24468         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24469         initializer.
24470         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24471         for GET_MODE_PRECISION.
24472         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24473         for GET_MODE_PRECISION.
24474         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24475         as polynomial.
24476         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24477         (expand_field_assignment, make_extraction): Likewise.
24478         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24479         (get_last_value): Likewise.
24480         * convert.c (convert_to_integer_1): Likewise.
24481         * cse.c (cse_insn): Likewise.
24482         * expr.c (expand_expr_real_1): Likewise.
24483         * lra-constraints.c (simplify_operand_subreg): Likewise.
24484         * optabs-query.c (can_atomic_load_p): Likewise.
24485         * optabs.c (expand_atomic_load): Likewise.
24486         (expand_atomic_store): Likewise.
24487         * ree.c (combine_reaching_defs): Likewise.
24488         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24489         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24490         * tree.h (type_has_mode_precision_p): Likewise.
24491         * ubsan.c (instrument_si_overflow): Likewise.
24493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24494             Alan Hayward  <alan.hayward@arm.com>
24495             David Sherwood  <david.sherwood@arm.com>
24497         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24498         polynomial numbers of units.
24499         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24500         (valid_vector_subparts_p): New function.
24501         (build_vector_type): Remove temporary shim and take the number
24502         of units as a poly_uint64 rather than an int.
24503         (build_opaque_vector_type): Take the number of units as a
24504         poly_uint64 rather than an int.
24505         * tree.c (build_vector_from_ctor): Handle polynomial
24506         TYPE_VECTOR_SUBPARTS.
24507         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24508         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24509         (build_vector_from_val): If the number of units is variable,
24510         use build_vec_duplicate_cst for constant operands and
24511         VEC_DUPLICATE_EXPR otherwise.
24512         (make_vector_type): Remove temporary is_constant ().
24513         (build_vector_type, build_opaque_vector_type): Take the number of
24514         units as a poly_uint64 rather than an int.
24515         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24516         VECTOR_CST_NELTS.
24517         * cfgexpand.c (expand_debug_expr): Likewise.
24518         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24519         (store_constructor, expand_expr_real_1): Likewise.
24520         (const_scalar_mask_from_tree): Likewise.
24521         * fold-const-call.c (fold_const_reduction): Likewise.
24522         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24523         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24524         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24525         (fold_relational_const): Likewise.
24526         (native_interpret_vector): Likewise.  Change the size from an
24527         int to an unsigned int.
24528         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24529         TYPE_VECTOR_SUBPARTS.
24530         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24531         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24532         duplicating a non-constant operand into a variable-length vector.
24533         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24534         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24535         * ipa-icf.c (sem_variable::equals): Likewise.
24536         * match.pd: Likewise.
24537         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24538         * print-tree.c (print_node): Likewise.
24539         * stor-layout.c (layout_type): Likewise.
24540         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24541         * tree-cfg.c (verify_gimple_comparison): Likewise.
24542         (verify_gimple_assign_binary): Likewise.
24543         (verify_gimple_assign_ternary): Likewise.
24544         (verify_gimple_assign_single): Likewise.
24545         * tree-pretty-print.c (dump_generic_node): Likewise.
24546         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24547         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24548         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24549         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24550         (vect_shift_permute_load_chain): Likewise.
24551         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24552         (expand_vector_condition, optimize_vector_constructor): Likewise.
24553         (lower_vec_perm, get_compute_type): Likewise.
24554         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24555         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24556         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24557         (vect_recog_mask_conversion_pattern): Likewise.
24558         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24559         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24560         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24561         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24562         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24563         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24564         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24565         (supportable_widening_operation): Likewise.
24566         (supportable_narrowing_operation): Likewise.
24567         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24568         Likewise.
24569         * varasm.c (output_constant): Likewise.
24571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24572             Alan Hayward  <alan.hayward@arm.com>
24573             David Sherwood  <david.sherwood@arm.com>
24575         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24576         so that both the length == 3 and length != 3 cases set up their
24577         own permute vectors.  Add comments explaining why we know the
24578         number of elements is constant.
24579         (vect_permute_load_chain): Likewise.
24581 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24582             Alan Hayward  <alan.hayward@arm.com>
24583             David Sherwood  <david.sherwood@arm.com>
24585         * machmode.h (mode_nunits): Change from unsigned char to
24586         poly_uint16_pod.
24587         (ONLY_FIXED_SIZE_MODES): New macro.
24588         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24589         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24590         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24591         New typedefs.
24592         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24593         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24594         or if measurement_type is not polynomial.
24595         * genmodes.c (ZERO_COEFFS): New macro.
24596         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24597         poly_uint16.
24598         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24599         Use ZERO_COEFFS when emitting initializers.
24600         * data-streamer.h (bp_pack_poly_value): New function.
24601         (bp_unpack_poly_value): Likewise.
24602         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24603         for GET_MODE_NUNITS.
24604         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24605         for GET_MODE_NUNITS.
24606         * tree.c (make_vector_type): Remove temporary shim and make
24607         the real function take the number of units as a poly_uint64
24608         rather than an int.
24609         (build_vector_type_for_mode): Handle polynomial nunits.
24610         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24611         * emit-rtl.c (const_vec_series_p_1): Likewise.
24612         (gen_rtx_CONST_VECTOR): Likewise.
24613         * fold-const.c (test_vec_duplicate_folding): Likewise.
24614         * genrecog.c (validate_pattern): Likewise.
24615         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24616         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24617         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24618         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24619         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24620         * rtlanal.c (subreg_get_info): Likewise.
24621         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24622         (vect_grouped_load_supported): Likewise.
24623         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24624         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24625         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24626         (simplify_const_unary_operation, simplify_binary_operation_1)
24627         (simplify_const_binary_operation, simplify_ternary_operation)
24628         (test_vector_ops_duplicate, test_vector_ops): Likewise.
24629         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24630         instead of CONST_VECTOR_NUNITS.
24631         * varasm.c (output_constant_pool_2): Likewise.
24632         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24633         explicit-encoded elements in the XVEC for variable-length vectors.
24635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24637         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24640             Alan Hayward  <alan.hayward@arm.com>
24641             David Sherwood  <david.sherwood@arm.com>
24643         * coretypes.h (fixed_size_mode): Declare.
24644         (fixed_size_mode_pod): New typedef.
24645         * builtins.h (target_builtins::x_apply_args_mode)
24646         (target_builtins::x_apply_result_mode): Change type to
24647         fixed_size_mode_pod.
24648         * builtins.c (apply_args_size, apply_result_size, result_vector)
24649         (expand_builtin_apply_args_1, expand_builtin_apply)
24650         (expand_builtin_return): Update accordingly.
24652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24654         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24655         * cselib.c (cselib_hash_rtx): Likewise.
24656         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24657         CONST_VECTOR encoding.
24659 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24660             Jeff Law  <law@redhat.com>
24662         PR target/83641
24663         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24664         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24665         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24666         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24668         PR target/83641
24669         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24670         explicitly probe *sp in a noreturn function if there were any callee
24671         register saves or frame pointer is needed.
24673 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24675         PR debug/83621
24676         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24677         BLKmode for ternary, binary or unary expressions.
24679         PR debug/83645
24680         * var-tracking.c (delete_vta_debug_insn): New inline function.
24681         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24682         insns from get_insns () to NULL instead of each bb separately.
24683         Use delete_vta_debug_insn.  No longer static.
24684         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24685         delete_vta_debug_insns callers.
24686         * rtl.h (delete_vta_debug_insns): Declare.
24687         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24688         instead of variable_tracking_main.
24690 2018-01-03  Martin Sebor  <msebor@redhat.com>
24692         PR tree-optimization/83603
24693         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24694         arguments past the endof the argument list in functions declared
24695         without a prototype.
24696         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24697         Avoid checking when arguments are null.
24699 2018-01-03  Martin Sebor  <msebor@redhat.com>
24701         PR c/83559
24702         * doc/extend.texi (attribute const): Fix a typo.
24703         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24704         issuing -Wsuggest-attribute for void functions.
24706 2018-01-03  Martin Sebor  <msebor@redhat.com>
24708         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24709         offset_int::from instead of wide_int::to_shwi.
24710         (maybe_diag_overlap): Remove assertion.
24711         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24712         * gimple-ssa-sprintf.c (format_directive): Same.
24713         (parse_directive): Same.
24714         (sprintf_dom_walker::compute_format_length): Same.
24715         (try_substitute_return_value): Same.
24717 2018-01-03  Jeff Law  <law@redhat.com>
24719         PR middle-end/83654
24720         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24721         non-constant residual for zero at runtime and avoid probing in
24722         that case.  Reorganize code for trailing problem to mirror handling
24723         of the residual.
24725 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24727         PR tree-optimization/83501
24728         * tree-ssa-strlen.c (get_string_cst): New.
24729         (handle_char_store): Call get_string_cst.
24731 2018-01-03  Martin Liska  <mliska@suse.cz>
24733         PR tree-optimization/83593
24734         * tree-ssa-strlen.c: Include tree-cfg.h.
24735         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24736         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24737         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24738         to false.
24739         (strlen_dom_walker::before_dom_children): Call
24740         gimple_purge_dead_eh_edges. Dump tranformation with details
24741         dump flags.
24742         (strlen_dom_walker::before_dom_children): Update call by adding
24743         new argument cleanup_eh.
24744         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24746 2018-01-03  Martin Liska  <mliska@suse.cz>
24748         PR ipa/83549
24749         * cif-code.def (VARIADIC_THUNK): New enum value.
24750         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24751         thunks.
24753 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24755         * sse.md (mov<mode>_internal): Tighten condition for when to use
24756         vmovdqu<ssescalarsize> for TI and OI modes.
24758 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24760         Update copyright years.
24762 2018-01-03  Martin Liska  <mliska@suse.cz>
24764         PR ipa/83594
24765         * ipa-visibility.c (function_and_variable_visibility): Skip
24766         functions with noipa attribure.
24768 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24770         * gcc.c (process_command): Update copyright notice dates.
24771         * gcov-dump.c (print_version): Ditto.
24772         * gcov.c (print_version): Ditto.
24773         * gcov-tool.c (print_version): Ditto.
24774         * gengtype.c (create_file): Ditto.
24775         * doc/cpp.texi: Bump @copying's copyright year.
24776         * doc/cppinternals.texi: Ditto.
24777         * doc/gcc.texi: Ditto.
24778         * doc/gccint.texi: Ditto.
24779         * doc/gcov.texi: Ditto.
24780         * doc/install.texi: Ditto.
24781         * doc/invoke.texi: Ditto.
24783 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24785         * vector-builder.h (vector_builder::m_full_nelts): Change from
24786         unsigned int to poly_uint64.
24787         (vector_builder::full_nelts): Update prototype accordingly.
24788         (vector_builder::new_vector): Likewise.
24789         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24790         (vector_builder::operator ==): Likewise.
24791         (vector_builder::finalize): Likewise.
24792         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24793         Take the number of elements as a poly_uint64 rather than an
24794         unsigned int.
24795         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24796         from unsigned int to poly_uint64.
24797         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24798         (vec_perm_indices::new_vector): Likewise.
24799         (vec_perm_indices::length): Likewise.
24800         (vec_perm_indices::nelts_per_input): Likewise.
24801         (vec_perm_indices::input_nelts): Likewise.
24802         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24803         number of elements per input as a poly_uint64 rather than an
24804         unsigned int.  Use the original encoding for variable-length
24805         vectors, rather than clamping each individual element.
24806         For the second and subsequent elements in each pattern,
24807         clamp the step and base before clamping their sum.
24808         (vec_perm_indices::series_p): Handle polynomial element counts.
24809         (vec_perm_indices::all_in_range_p): Likewise.
24810         (vec_perm_indices_to_tree): Likewise.
24811         (vec_perm_indices_to_rtx): Likewise.
24812         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24813         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24814         (tree_vector_builder::new_binary_operation): Handle polynomial
24815         element counts.  Return false if we need to know the number
24816         of elements at compile time.
24817         * fold-const.c (fold_vec_perm): Punt if the number of elements
24818         isn't known at compile time.
24820 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24822         * vec-perm-indices.h (vec_perm_builder): Change element type
24823         from HOST_WIDE_INT to poly_int64.
24824         (vec_perm_indices::element_type): Update accordingly.
24825         (vec_perm_indices::clamp): Handle polynomial element_types.
24826         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24827         (vec_perm_indices::all_in_range_p): Likewise.
24828         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24829         than shwi trees.
24830         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24831         polynomial vec_perm_indices element types.
24832         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24833         * fold-const.c (fold_vec_perm): Likewise.
24834         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24835         * tree-vect-generic.c (lower_vec_perm): Likewise.
24836         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24837         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24838         element type to HOST_WIDE_INT.
24840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24841             Alan Hayward  <alan.hayward@arm.com>
24842             David Sherwood  <david.sherwood@arm.com>
24844         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24845         rather than an int.  Use plus_constant.
24846         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24847         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24849 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24850             Alan Hayward  <alan.hayward@arm.com>
24851             David Sherwood  <david.sherwood@arm.com>
24853         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24854         a HOST_WIDE_INT to a poly_int64.
24856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24857             Alan Hayward  <alan.hayward@arm.com>
24858             David Sherwood  <david.sherwood@arm.com>
24860         * calls.c (load_register_parameters): Cope with polynomial
24861         mode sizes.  Require a constant size for BLKmode parameters
24862         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24863         forces a parameter to be padded at the lsb end in order to
24864         fill a complete number of words, require the parameter size
24865         to be ordered wrt UNITS_PER_WORD.
24867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24868             Alan Hayward  <alan.hayward@arm.com>
24869             David Sherwood  <david.sherwood@arm.com>
24871         * reload1.c (spill_stack_slot_width): Change element type
24872         from unsigned int to poly_uint64_pod.
24873         (alter_reg): Treat mode sizes as polynomial.
24875 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24876             Alan Hayward  <alan.hayward@arm.com>
24877             David Sherwood  <david.sherwood@arm.com>
24879         * reload.c (complex_word_subreg_p): New function.
24880         (reload_inner_reg_of_subreg, push_reload): Use it.
24882 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24883             Alan Hayward  <alan.hayward@arm.com>
24884             David Sherwood  <david.sherwood@arm.com>
24886         * lra-constraints.c (process_alt_operands): Reject matched
24887         operands whose sizes aren't ordered.
24888         (match_reload): Refer to this check here.
24890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24891             Alan Hayward  <alan.hayward@arm.com>
24892             David Sherwood  <david.sherwood@arm.com>
24894         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24895         that the mode size is in the set {1, 2, 4, 8, 16}.
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         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24902         Use plus_constant instead of gen_rtx_PLUS.
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         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24909         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24910         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24911         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24912         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24913         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24914         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24915         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24916         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24917         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24918         a poly_int64.
24919         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24920         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24921         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24922         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24923         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24924         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24925         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24926         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24927         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24928         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24929         function.
24930         * expr.c (emit_move_resolve_push): Treat the input and result
24931         of PUSH_ROUNDING as a poly_int64.
24932         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24933         (emit_push_insn): Likewise.
24934         * lra-eliminations.c (mark_not_eliminable): Likewise.
24935         * recog.c (push_operand): Likewise.
24936         * reload1.c (elimination_effects): Likewise.
24937         * rtlanal.c (nonzero_bits1): Likewise.
24938         * calls.c (store_one_arg): Likewise.  Require the padding to be
24939         known at compile time.
24941 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24942             Alan Hayward  <alan.hayward@arm.com>
24943             David Sherwood  <david.sherwood@arm.com>
24945         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24946         Use plus_constant instead of gen_rtx_PLUS.
24948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24949             Alan Hayward  <alan.hayward@arm.com>
24950             David Sherwood  <david.sherwood@arm.com>
24952         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24953         rather than an int.
24955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24956             Alan Hayward  <alan.hayward@arm.com>
24957             David Sherwood  <david.sherwood@arm.com>
24959         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24960         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24961         via stack temporaries.  Treat the mode size as polynomial too.
24963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24964             Alan Hayward  <alan.hayward@arm.com>
24965             David Sherwood  <david.sherwood@arm.com>
24967         * expr.c (expand_expr_real_2): When handling conversions involving
24968         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24969         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24970         as a poly_uint64 too.
24972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24973             Alan Hayward  <alan.hayward@arm.com>
24974             David Sherwood  <david.sherwood@arm.com>
24976         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24979             Alan Hayward  <alan.hayward@arm.com>
24980             David Sherwood  <david.sherwood@arm.com>
24982         * combine.c (can_change_dest_mode): Handle polynomial
24983         REGMODE_NATURAL_SIZE.
24984         * expmed.c (store_bit_field_1): Likewise.
24985         * expr.c (store_constructor): Likewise.
24986         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24987         and polynomial REGMODE_NATURAL_SIZE.
24988         (gen_lowpart_common): Likewise.
24989         * reginfo.c (record_subregs_of_mode): Likewise.
24990         * rtlanal.c (read_modify_subreg_p): Likewise.
24992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24993             Alan Hayward  <alan.hayward@arm.com>
24994             David Sherwood  <david.sherwood@arm.com>
24996         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24997         numbers of elements.
24999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25000             Alan Hayward  <alan.hayward@arm.com>
25001             David Sherwood  <david.sherwood@arm.com>
25003         * match.pd: Cope with polynomial numbers of vector elements.
25005 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25006             Alan Hayward  <alan.hayward@arm.com>
25007             David Sherwood  <david.sherwood@arm.com>
25009         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25010         in a POINTER_PLUS_EXPR.
25012 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25013             Alan Hayward  <alan.hayward@arm.com>
25014             David Sherwood  <david.sherwood@arm.com>
25016         * omp-simd-clone.c (simd_clone_subparts): New function.
25017         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25018         (ipa_simd_modify_function_body): Likewise.
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         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25025         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25026         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25027         (expand_vector_condition, vector_element): Likewise.
25028         (subparts_gt): New function.
25029         (get_compute_type): Use subparts_gt.
25030         (count_type_subparts): Delete.
25031         (expand_vector_operations_1): Use subparts_gt instead of
25032         count_type_subparts.
25034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25035             Alan Hayward  <alan.hayward@arm.com>
25036             David Sherwood  <david.sherwood@arm.com>
25038         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25039         (vect_compile_time_alias): ...this new function.  Do the calculation
25040         on poly_ints rather than trees.
25041         (vect_prune_runtime_alias_test_list): Update call accordingly.
25043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25044             Alan Hayward  <alan.hayward@arm.com>
25045             David Sherwood  <david.sherwood@arm.com>
25047         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25048         numbers of units.
25049         (vect_schedule_slp_instance): Likewise.
25051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25052             Alan Hayward  <alan.hayward@arm.com>
25053             David Sherwood  <david.sherwood@arm.com>
25055         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25056         constant and extern definitions for variable-length vectors.
25057         (vect_get_constant_vectors): Note that the number of units
25058         is known to be constant.
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         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25065         of units as polynomial.  Choose between WIDE and NARROW based
25066         on multiple_p.
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-stmts.c (simd_clone_subparts): New function.
25073         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25075 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25076             Alan Hayward  <alan.hayward@arm.com>
25077             David Sherwood  <david.sherwood@arm.com>
25079         * tree-vect-stmts.c (vectorizable_call): Treat the number of
25080         vectors as polynomial.  Use build_index_vector for
25081         IFN_GOMP_SIMD_LANE.
25083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25084             Alan Hayward  <alan.hayward@arm.com>
25085             David Sherwood  <david.sherwood@arm.com>
25087         * tree-vect-stmts.c (get_load_store_type): Treat the number of
25088         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25089         for variable-length vectors.
25090         (vectorizable_mask_load_store): Treat the number of units as
25091         polynomial, asserting that it is constant if the condition has
25092         already been enforced.
25093         (vectorizable_store, vectorizable_load): Likewise.
25095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25096             Alan Hayward  <alan.hayward@arm.com>
25097             David Sherwood  <david.sherwood@arm.com>
25099         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25100         of units as polynomial.  Punt if we can't tell at compile time
25101         which vector contains the final result.
25103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25104             Alan Hayward  <alan.hayward@arm.com>
25105             David Sherwood  <david.sherwood@arm.com>
25107         * tree-vect-loop.c (vectorizable_induction): Treat the number
25108         of units as polynomial.  Punt on SLP inductions.  Use an integer
25109         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
25110         cast of such a series for variable-length floating-point
25111         reductions.
25113 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25114             Alan Hayward  <alan.hayward@arm.com>
25115             David Sherwood  <david.sherwood@arm.com>
25117         * tree.h (build_index_vector): Declare.
25118         * tree.c (build_index_vector): New function.
25119         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25120         of units as polynomial, forcibly converting it to a constant if
25121         vectorizable_reduction has already enforced the condition.
25122         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
25123         to create a {1,2,3,...} vector.
25124         (vectorizable_reduction): Treat the number of units as polynomial.
25125         Choose vectype_in based on the largest scalar element size rather
25126         than the smallest number of units.  Enforce the restrictions
25127         relied on above.
25129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25130             Alan Hayward  <alan.hayward@arm.com>
25131             David Sherwood  <david.sherwood@arm.com>
25133         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25134         number of units as polynomial.
25136 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25137             Alan Hayward  <alan.hayward@arm.com>
25138             David Sherwood  <david.sherwood@arm.com>
25140         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25141         * target.def (autovectorize_vector_sizes): Return the vector sizes
25142         by pointer, using vector_sizes rather than a bitmask.
25143         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25144         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25145         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25146         Likewise.
25147         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25148         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25149         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25150         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25151         * omp-general.c (omp_max_vf): Likewise.
25152         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25153         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25154         * tree-vect-loop.c (vect_analyze_loop): Likewise.
25155         * tree-vect-slp.c (vect_slp_bb): Likewise.
25156         * doc/tm.texi: Regenerate.
25157         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25158         to a poly_uint64.
25159         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25160         the vector size as a poly_uint64 rather than an unsigned int.
25161         (current_vector_size): Change from an unsigned int to a poly_uint64.
25162         (get_vectype_for_scalar_type): Update accordingly.
25163         * tree.h (build_truth_vector_type): Take the size and number of
25164         units as a poly_uint64 rather than an unsigned int.
25165         (build_vector_type): Add a temporary overload that takes
25166         the number of units as a poly_uint64 rather than an unsigned int.
25167         * tree.c (make_vector_type): Likewise.
25168         (build_truth_vector_type): Take the number of units as a poly_uint64
25169         rather than an unsigned int.
25171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25172             Alan Hayward  <alan.hayward@arm.com>
25173             David Sherwood  <david.sherwood@arm.com>
25175         * target.def (get_mask_mode): Take the number of units and length
25176         as poly_uint64s rather than unsigned ints.
25177         * targhooks.h (default_get_mask_mode): Update accordingly.
25178         * targhooks.c (default_get_mask_mode): Likewise.
25179         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25180         * doc/tm.texi: Regenerate.
25182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25183             Alan Hayward  <alan.hayward@arm.com>
25184             David Sherwood  <david.sherwood@arm.com>
25186         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25187         * omp-general.c (omp_max_vf): Likewise.
25188         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25189         (expand_omp_simd): Handle polynomial safelen.
25190         * omp-low.c (omplow_simd_context): Add a default constructor.
25191         (omplow_simd_context::max_vf): Change from int to poly_uint64.
25192         (lower_rec_simd_input_clauses): Update accordingly.
25193         (lower_rec_input_clauses): Likewise.
25195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25196             Alan Hayward  <alan.hayward@arm.com>
25197             David Sherwood  <david.sherwood@arm.com>
25199         * tree-vectorizer.h (vect_nunits_for_cost): New function.
25200         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25201         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25202         (vect_analyze_slp_cost): Likewise.
25203         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25204         (vect_model_load_cost): Likewise.
25206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25207             Alan Hayward  <alan.hayward@arm.com>
25208             David Sherwood  <david.sherwood@arm.com>
25210         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25211         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25212         from an unsigned int * to a poly_uint64_pod *.
25213         (calculate_unrolling_factor): New function.
25214         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
25216 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25217             Alan Hayward  <alan.hayward@arm.com>
25218             David Sherwood  <david.sherwood@arm.com>
25220         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25221         from an unsigned int to a poly_uint64.
25222         (_loop_vec_info::slp_unrolling_factor): Likewise.
25223         (_loop_vec_info::vectorization_factor): Change from an int
25224         to a poly_uint64.
25225         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25226         (vect_get_num_vectors): New function.
25227         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25228         (vect_get_num_copies): Use vect_get_num_vectors.
25229         (vect_analyze_data_ref_dependences): Change max_vf from an int *
25230         to an unsigned int *.
25231         (vect_analyze_data_refs): Change min_vf from an int * to a
25232         poly_uint64 *.
25233         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25234         than an unsigned HOST_WIDE_INT.
25235         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25236         (vect_analyze_data_ref_dependence): Change max_vf from an int *
25237         to an unsigned int *.
25238         (vect_analyze_data_ref_dependences): Likewise.
25239         (vect_compute_data_ref_alignment): Handle polynomial vf.
25240         (vect_enhance_data_refs_alignment): Likewise.
25241         (vect_prune_runtime_alias_test_list): Likewise.
25242         (vect_shift_permute_load_chain): Likewise.
25243         (vect_supportable_dr_alignment): Likewise.
25244         (dependence_distance_ge_vf): Take the vectorization factor as a
25245         poly_uint64 rather than an unsigned HOST_WIDE_INT.
25246         (vect_analyze_data_refs): Change min_vf from an int * to a
25247         poly_uint64 *.
25248         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25249         vfm1 as a poly_uint64 rather than an int.  Make the same change
25250         for the returned bound_scalar.
25251         (vect_gen_vector_loop_niters): Handle polynomial vf.
25252         (vect_do_peeling): Likewise.  Update call to
25253         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25254         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25255         be constant.
25256         * tree-vect-loop.c (vect_determine_vectorization_factor)
25257         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25258         (vect_get_known_peeling_cost): Likewise.
25259         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25260         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25261         (vect_transform_loop): Likewise.  Use the lowest possible VF when
25262         updating the upper bounds of the loop.
25263         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
25264         rather than an int.
25265         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25266         polynomial unroll factors.
25267         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25268         (vect_make_slp_decision): Likewise.
25269         (vect_supported_load_permutation_p): Likewise, and polynomial
25270         vf too.
25271         (vect_analyze_slp_cost): Handle polynomial vf.
25272         (vect_slp_analyze_node_operations): Likewise.
25273         (vect_slp_analyze_bb_1): Likewise.
25274         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25275         than an unsigned HOST_WIDE_INT.
25276         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25277         (vectorizable_load): Handle polynomial vf.
25278         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25279         a poly_uint64.
25280         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25283             Alan Hayward  <alan.hayward@arm.com>
25284             David Sherwood  <david.sherwood@arm.com>
25286         * match.pd: Handle bit operations involving three constants
25287         and try to fold one pair.
25289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25291         * tree-vect-loop-manip.c: Include gimple-fold.h.
25292         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25293         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
25294         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25295         Add a path that uses a step of VF instead of 1, but disable it
25296         for now.
25297         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25298         and niters_no_overflow parameters.  Update calls to
25299         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25300         Create a new SSA name if the latter choses to use a ste other
25301         than zero, and return it via niters_vector_mult_vf_var.
25302         * tree-vect-loop.c (vect_transform_loop): Update calls to
25303         vect_do_peeling, vect_gen_vector_loop_niters and
25304         slpeel_make_loop_iterate_ntimes.
25305         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25306         (vect_gen_vector_loop_niters): Update declarations after above changes.
25308 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25310         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25311         128-bit round to integer instructions.
25312         (ceil<mode>2): Likewise.
25313         (btrunc<mode>2): Likewise.
25314         (round<mode>2): Likewise.
25316 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25318         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25319         unaligned VSX load/store on P8/P9.
25320         (expand_block_clear): Allow the use of unaligned VSX
25321         load/store on P8/P9.
25323 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25325         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25326         New function.
25327         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25328         swap associated with both a load and a store.
25330 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25332         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25333         * config/riscv/riscv.md (clear_cache): Use it.
25335 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25337         * web.c: Remove out-of-date comment.
25339 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25341         * expr.c (fixup_args_size_notes): Check that any existing
25342         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25343         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25344         (emit_single_push_insn): ...here.
25346 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25348         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25349         (const_vector_encoded_nelts): New function.
25350         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25351         (const_vector_int_elt, const_vector_elt): Declare.
25352         * emit-rtl.c (const_vector_int_elt_1): New function.
25353         (const_vector_elt): Likewise.
25354         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25355         of CONST_VECTOR_ELT.
25357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25359         * expr.c: Include rtx-vector-builder.h.
25360         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25361         directly on the tree encoding.
25362         (const_vector_from_tree): Likewise.
25363         * optabs.c: Include rtx-vector-builder.h.
25364         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25365         sequence of "u" values.
25366         * vec-perm-indices.c: Include rtx-vector-builder.h.
25367         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25368         directly on the vec_perm_indices encoding.
25370 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25372         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25373         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25374         * rtx-vector-builder.h: New file.
25375         * rtx-vector-builder.c: Likewise.
25376         * rtl.h (rtx_def::u2): Add a const_vector field.
25377         (CONST_VECTOR_NPATTERNS): New macro.
25378         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25379         (CONST_VECTOR_DUPLICATE_P): Likewise.
25380         (CONST_VECTOR_STEPPED_P): Likewise.
25381         (CONST_VECTOR_ENCODED_ELT): Likewise.
25382         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25383         (unwrap_const_vec_duplicate): Likewise.
25384         (const_vec_series_p): Check for a non-duplicated vector encoding.
25385         Say that the function only returns true for integer vectors.
25386         * emit-rtl.c: Include rtx-vector-builder.h.
25387         (gen_const_vec_duplicate_1): Delete.
25388         (gen_const_vector): Call gen_const_vec_duplicate instead of
25389         gen_const_vec_duplicate_1.
25390         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25391         (gen_const_vec_duplicate): Use rtx_vector_builder.
25392         (gen_const_vec_series): Likewise.
25393         (gen_rtx_CONST_VECTOR): Likewise.
25394         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25395         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25396         Build a new vector rather than modifying a CONST_VECTOR in-place.
25397         (handle_special_swappables): Update call accordingly.
25398         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25399         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25400         Build a new vector rather than modifying a CONST_VECTOR in-place.
25401         (handle_special_swappables): Update call accordingly.
25403 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25405         * simplify-rtx.c (simplify_const_binary_operation): Use
25406         CONST_VECTOR_ELT instead of XVECEXP.
25408 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25410         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25411         the selector elements to be different from the data elements
25412         if the selector is a VECTOR_CST.
25413         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25414         ssizetype for the selector.
25416 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25418         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25419         before testing each element individually.
25420         * tree-vect-generic.c (lower_vec_perm): Likewise.
25422 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25424         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25425         * selftest-run-tests.c (selftest::run_tests): Call it.
25426         * vector-builder.h (vector_builder::operator ==): New function.
25427         (vector_builder::operator !=): Likewise.
25428         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25429         (vec_perm_indices::all_from_input_p): New function.
25430         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25431         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25432         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25433         instead of reading the VECTOR_CST directly.  Detect whether both
25434         vector inputs are the same before constructing the vec_perm_indices,
25435         and update the number of inputs argument accordingly.  Use the
25436         utility functions added above.  Only construct sel2 if we need to.
25438 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25440         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25441         the broadcast of the low byte.
25442         (expand_mult_highpart): Use an explicit encoding for the permutes.
25443         * optabs-query.c (can_mult_highpart_p): Likewise.
25444         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25445         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25446         (vectorizable_bswap): Likewise.
25447         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25448         explicit encoding for the power-of-2 permutes.
25449         (vect_permute_store_chain): Likewise.
25450         (vect_grouped_load_supported): Likewise.
25451         (vect_permute_load_chain): Likewise.
25453 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25455         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25456         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25457         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25458         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25459         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25460         (vect_gen_perm_mask_any): Likewise.
25462 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25464         * int-vector-builder.h: New file.
25465         * vec-perm-indices.h: Include int-vector-builder.h.
25466         (vec_perm_indices): Redefine as an int_vector_builder.
25467         (auto_vec_perm_indices): Delete.
25468         (vec_perm_builder): Redefine as a stand-alone class.
25469         (vec_perm_indices::vec_perm_indices): New function.
25470         (vec_perm_indices::clamp): Likewise.
25471         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25472         (vec_perm_indices::new_vector): New function.
25473         (vec_perm_indices::new_expanded_vector): Update for new
25474         vec_perm_indices class.
25475         (vec_perm_indices::rotate_inputs): New function.
25476         (vec_perm_indices::all_in_range_p): Operate directly on the
25477         encoded form, without computing elided elements.
25478         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25479         encoding.  Update for new vec_perm_indices class.
25480         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25481         the given vec_perm_builder.
25482         (expand_vec_perm_var): Update vec_perm_builder constructor.
25483         (expand_mult_highpart): Use vec_perm_builder instead of
25484         auto_vec_perm_indices.
25485         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25486         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25487         or double series encoding as appropriate.
25488         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25489         vec_perm_indices instead of auto_vec_perm_indices.
25490         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25491         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25492         (vect_permute_store_chain): Likewise.
25493         (vect_grouped_load_supported): Likewise.
25494         (vect_permute_load_chain): Likewise.
25495         (vect_shift_permute_load_chain): Likewise.
25496         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25497         (vect_transform_slp_perm_load): Likewise.
25498         (vect_schedule_slp_instance): Likewise.
25499         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25500         (vectorizable_mask_load_store): Likewise.
25501         (vectorizable_bswap): Likewise.
25502         (vectorizable_store): Likewise.
25503         (vectorizable_load): Likewise.
25504         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25505         vec_perm_indices instead of auto_vec_perm_indices.  Use
25506         tree_to_vec_perm_builder to read the vector from a tree.
25507         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25508         vec_perm_builder instead of a vec_perm_indices.
25509         (have_whole_vector_shift): Use vec_perm_builder and
25510         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25511         truncation to calc_vec_perm_mask_for_shift.
25512         (vect_create_epilog_for_reduction): Likewise.
25513         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25514         from auto_vec_perm_indices to vec_perm_indices.
25515         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25516         instead of changing individual elements.
25517         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25518         the vector in d.perm.
25519         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25520         from auto_vec_perm_indices to vec_perm_indices.
25521         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25522         instead of changing individual elements.
25523         (arm_vectorize_vec_perm_const): Use new_vector to install
25524         the vector in d.perm.
25525         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25526         Update vec_perm_builder constructor.
25527         (rs6000_expand_interleave): Likewise.
25528         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25529         (rs6000_expand_interleave): Likewise.
25531 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25533         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25534         to qimode could truncate the indices.
25535         * optabs.c (expand_vec_perm_var): Likewise.
25537 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25539         * Makefile.in (OBJS): Add vec-perm-indices.o.
25540         * vec-perm-indices.h: New file.
25541         * vec-perm-indices.c: Likewise.
25542         * target.h (vec_perm_indices): Replace with a forward class
25543         declaration.
25544         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25545         * optabs.h: Include vec-perm-indices.h.
25546         (expand_vec_perm): Delete.
25547         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25548         (expand_vec_perm_const): Declare.
25549         * target.def (vec_perm_const_ok): Replace with...
25550         (vec_perm_const): ...this new hook.
25551         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25552         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25553         * doc/tm.texi: Regenerate.
25554         * optabs.def (vec_perm_const): Delete.
25555         * doc/md.texi (vec_perm_const): Likewise.
25556         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25557         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25558         expand_vec_perm for constant permutation vectors.  Assert that
25559         the mode of variable permutation vectors is the integer equivalent
25560         of the mode that is being permuted.
25561         * optabs-query.h (selector_fits_mode_p): Declare.
25562         * optabs-query.c: Include vec-perm-indices.h.
25563         (selector_fits_mode_p): New function.
25564         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25565         is defined, instead of checking whether the vec_perm_const_optab
25566         exists.  Use targetm.vectorize.vec_perm_const instead of
25567         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25568         fit in the vector mode before using a variable permute.
25569         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25570         vec_perm_indices instead of an rtx.
25571         (expand_vec_perm): Replace with...
25572         (expand_vec_perm_const): ...this new function.  Take the selector
25573         as a vec_perm_indices rather than an rtx.  Also take the mode of
25574         the selector.  Update call to shift_amt_for_vec_perm_mask.
25575         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25576         Use vec_perm_indices::new_expanded_vector to expand the original
25577         selector into bytes.  Check whether the indices fit in the vector
25578         mode before using a variable permute.
25579         (expand_vec_perm_var): Make global.
25580         (expand_mult_highpart): Use expand_vec_perm_const.
25581         * fold-const.c: Includes vec-perm-indices.h.
25582         * tree-ssa-forwprop.c: Likewise.
25583         * tree-vect-data-refs.c: Likewise.
25584         * tree-vect-generic.c: Likewise.
25585         * tree-vect-loop.c: Likewise.
25586         * tree-vect-slp.c: Likewise.
25587         * tree-vect-stmts.c: Likewise.
25588         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25589         Delete.
25590         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25591         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25592         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25593         (aarch64_vectorize_vec_perm_const): ...this new function.
25594         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25595         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25596         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25597         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25598         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25599         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25600         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25601         into...
25602         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25603         check for NEON modes.
25604         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25605         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25606         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25607         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25608         into...
25609         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
25610         the old VEC_PERM_CONST conditions.
25611         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25612         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25613         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25614         (ia64_vectorize_vec_perm_const_ok): Merge into...
25615         (ia64_vectorize_vec_perm_const): ...this new function.
25616         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25617         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25618         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25619         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25620         * config/mips/mips.c (mips_expand_vec_perm_const)
25621         (mips_vectorize_vec_perm_const_ok): Merge into...
25622         (mips_vectorize_vec_perm_const): ...this new function.
25623         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25624         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25625         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25626         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25627         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25628         (rs6000_expand_vec_perm_const): Delete.
25629         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25630         Delete.
25631         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25632         (altivec_expand_vec_perm_const_le): Take each operand individually.
25633         Operate on constant selectors rather than rtxes.
25634         (altivec_expand_vec_perm_const): Likewise.  Update call to
25635         altivec_expand_vec_perm_const_le.
25636         (rs6000_expand_vec_perm_const): Delete.
25637         (rs6000_vectorize_vec_perm_const_ok): Delete.
25638         (rs6000_vectorize_vec_perm_const): New function.
25639         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25640         an element count and rtx array.
25641         (rs6000_expand_extract_even): Update call accordingly.
25642         (rs6000_expand_interleave): Likewise.
25643         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25644         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25645         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25646         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25647         (rs6000_expand_vec_perm_const): Delete.
25648         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25649         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25650         (altivec_expand_vec_perm_const_le): Take each operand individually.
25651         Operate on constant selectors rather than rtxes.
25652         (altivec_expand_vec_perm_const): Likewise.  Update call to
25653         altivec_expand_vec_perm_const_le.
25654         (rs6000_expand_vec_perm_const): Delete.
25655         (rs6000_vectorize_vec_perm_const_ok): Delete.
25656         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25657         reference to the SPE evmerge intructions.
25658         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25659         an element count and rtx array.
25660         (rs6000_expand_extract_even): Update call accordingly.
25661         (rs6000_expand_interleave): Likewise.
25662         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25663         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25664         new function.
25665         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25667 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25669         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25670         vector mode and that that mode matches the mode of the data
25671         being permuted.
25672         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25673         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25674         directly using expand_vec_perm_1 when forcing selectors into
25675         registers.
25676         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25680         * optabs-query.h (can_vec_perm_p): Delete.
25681         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25682         * optabs-query.c (can_vec_perm_p): Split into...
25683         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25684         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25685         particular selector is valid.
25686         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25687         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25688         (vect_grouped_load_supported): Likewise.
25689         (vect_shift_permute_load_chain): Likewise.
25690         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25691         (vect_transform_slp_perm_load): Likewise.
25692         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25693         (vectorizable_bswap): Likewise.
25694         (vect_gen_perm_mask_checked): Likewise.
25695         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25696         implementations of variable permutation vectors into account
25697         when deciding which selector to use.
25698         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25699         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25700         with a false third argument.
25701         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25702         to test whether the constant selector is valid and can_vec_perm_var_p
25703         to test whether a variable selector is valid.
25705 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25707         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25708         * optabs-query.c (can_vec_perm_p): Likewise.
25709         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25710         instead of vec_perm_indices.
25711         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25712         (vect_gen_perm_mask_checked): Likewise,
25713         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25714         (vect_gen_perm_mask_checked): Likewise,
25716 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25718         * optabs-query.h (qimode_for_vec_perm): Declare.
25719         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25720         (qimode_for_vec_perm): ...this new function.
25721         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25723 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25725         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25726         does not have a conditional at the top.
25728 2018-01-02  Richard Biener  <rguenther@suse.de>
25730         * ipa-inline.c (big_speedup_p): Fix expression.
25732 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25734         PR target/81616
25735         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25736         for generic 4->6.
25738 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25740         PR target/81616
25741         Generic tuning.
25742         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25743         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25744         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25745         cond_taken_branch_cost 3->4.
25747 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25749         PR tree-optimization/83581
25750         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25751         TODO_cleanup_cfg if any changes have been made.
25753         PR middle-end/83608
25754         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25755         convert_modes if target mode has the right side, but different mode
25756         class.
25758         PR middle-end/83609
25759         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25760         last argument when extracting from CONCAT.  If either from_real or
25761         from_imag is NULL, use expansion through memory.  If result is not
25762         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25763         the parts directly to inner mode, if even that fails, use expansion
25764         through memory.
25766         PR middle-end/83623
25767         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25768         check for bswap in mode rather than HImode and use that in expand_unop
25769         too.
25771 Copyright (C) 2018 Free Software Foundation, Inc.
25773 Copying and distribution of this file, with or without modification,
25774 are permitted in any medium without royalty provided the copyright
25775 notice and this notice are preserved.